Problems with CSS and jQuery

Asked

Viewed 42 times

1

I have a style defined for my select Boxs and I have on change in select to run the site of the select box, when use style does not perform the onchange or does not go to the site I have in my options.

<select  class="styledselect_form_1"  onchange="location = this.value;">
    <option value="">Número de linhas</option>
    <option value="Confirmatl.php?trl=5">5</option>
    <option value="Confirmatl.php?trl=10">10</option>
    <option value="Confirmatl.php?trl=15">15</option>
    <option value="Confirmatl.php?trl=20">20</option>
    <option value="Confirmatl.php?trl=25">25</option>
    <option value="Confirmatl.php?trl=30">30</option>
</select>

The css :

.styledselect_form_1    {
    background: url(../images/forms/form_select.gif) left no-repeat;
    border: none;
    border-left: none;
    color: #393939;
    cursor: pointer;
    display: block;
    font-family: Arial;
    font-size: 12px;
    height: 24px;
    margin: 0px 0px 0px 0px;
    padding: 7px 0 0 6px;
    text-align: left;
    width: 192px;
}

the script:

<script src="js/jquery/jquery.selectbox-0.5_style_2.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
    $('.styledselect_form_1').selectbox({ inputClass: "styledselect_form_1" });
    $('.styledselect_form_2').selectbox({ inputClass: "styledselect_form_2" });
});
</script>
  • 1

    I couldn’t understand what your problem is... try to be a little clearer please

  • It works for me... -> https://jsfiddle.net/byc24rvr/ You can explain better what is failing?

  • Here also worked, must be another mistake and he could not explain.

  • Take a look at the browser CONSOLE to see if there is any incidence of error. Depending on the error or even the order that the JS scripts were arranged, such functionality does not work.

  • it is with some error in the plugin selectbox that is using! probably the plugin is not running the expected behavior.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.