Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript How to animate Select2 dropdown?

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #151161
    marianico2
    Participant

    I’m modifiying Select2 plugin to add an animation when the user open the dropdown. I’m trying to do it with jquery, but if you found a CSS3 solution is welcome too.

    Check this fiddle (I’m sorry becouse I had to add the modified plugin in the js tab…): http://jsfiddle.net/RmsMT/5/

    I’ve replace this:

    this.dropdown.show();
    

    by this at line 1296:

    this.dropdown.slideDown("slow");
    

    And this:

    this.dropdown.hide();
    

    by this at line 1329:

    this.dropdown.slideUp("slow");
    

    As you see when you click the select to open the dropdown, it slides down slowly until it reaches the zone of the items, which is showed without the animation.

    I can’t see what I’m doing wrong so if you have any idea or advice will be appreciated. If you need more info, let me know and I’ll edit the post.

    #261976
    Ranazomic
    Participant

    don’t have the CSS file? can see you have change the name of the elements

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.