user2208486
user2208486

Reputation: 1

How do you use the jQuery dropkick change callback?

I've been working on this all day and I can't seem to find the answer! What I'm trying to do is take a <select> list and have each option be linked to a website with their value using onchange="window.open(this.options[this.selectedIndex].value,'_blank')". Is there any way to get this to work even using the change callback they have provided?

Upvotes: 0

Views: 1630

Answers (2)

saurav
saurav

Reputation: 3462

I know it is not very straightforward and most of the first time users got stuck in this. for now u can refer this sample code.

$(".CLASS_OF_SELECT_TAG").dropkick({
    change: function (value, label) {
           //Logic that you want to apply onchange event.
           //in your case some opening a window
    }
});

Cheers

Upvotes: 0

anujcd247
anujcd247

Reputation: 21

$(".select_element").dropkick({
     change:function(value,label){

 //your function code goes here
}});

Upvotes: 2

Related Questions