Chosen.jquery.js incompatible jquery-1.9.1

Asked

Viewed 84 times

0

I am using Jquery-. 1.9.1 in my application and would like to use the Chosen.jquery.js component however this component uses 1.6.4. I want to use this component within the dialog that is opened by jquery 1.9.1. I tried to use noConflict yet it didn’t work.

 $(document).ready(function() {
                    $(".chosen-select").chosen();
});
z<html>
<body>
    <head>
        <title>Add a title</title>
        <link rel="stylesheet" href="~/Content/chosen.css">
    </head>
    <body>
        <select class="chosen-select" tabindex="8" multiple style="width:350px;" data-placeholder="Your Favorite Types of Bear">
            <option value=""></option>
            <option>American Black Bear</option>
            <option>Asiatic Black Bear</option>
            <option>Brown Bear</option>
            <option>Giant Panda</option>
            <option selected>Sloth Bear</option>
            <option disabled>Sun Bear</option>
            <option>Polar Bear</option>
            <option disabled>Spectacled Bear</option>
        </select>
      


        <script src="~/Content/jquery-1.9.1.js"></script>
    <script src="~/Content/chosen.jquery.js"></script>
        
        <script>
               
        </script>
    </body>
    </html>

  • Dude Chosen supports 1.4 up look at it in git jQuery support: 1.4+ I tested it here with this version of jquery q vc said q funciono de boa. has certain that the problem of incompatibility is this?

  • @Jasarorion para min does not work. This error happens Uncaught Typeerror: $(...). Chosen is not a Function

  • choosen working with js 1.9.1 https://jsfiddle.net/v4cwv9qg/

  • i think you should not use ~ in the path of your files.

1 answer

0

Browser other questions tagged

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