jquery - $('select').click(function() not work properly -


plase @ link below

jsfiddle

in above link when click on select tag using mouse click, @ first time click not expand option value.

    $('select').click(function(){         $(this).attr("size",1);          var x = "select[tabindex='" + (parseint($(this).attr('tabindex'),10) + 1) + "']";                $(x).fadeto('fast',1.0);                 });  

this function on onclick event fire,this function create problem want function select option option list.

please show me possible way..

use $('select').change() instead of $('select').click(). click not event select.

according comment think need this

$('select option').click(function () {     $(this).parent().attr("size", 1);     $(this).parent().val(this.value);     var x = "select[tabindex='" + (parseint($(this).parent().attr('tabindex'), 10) + 1) + "']";     $(x).fadeto('fast', 1.0); }); 

Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -