jquery - $('select').click(function() not work properly -
plase @ link below
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
Post a Comment