How can I simulate a click on a jQuery UI radio button?

后端 未结 3 1763
花落未央
花落未央 2021-02-19 23:27

I have some radio buttons

&l
3条回答
  •  臣服心动
    2021-02-20 00:01

    $(document).ready(function(){ $( ".radioVote" ).buttonset(); $('[for^=radio]').click(function() { var theRadioElement = $(this).prev(); alert("Button" + theRadioElement.attr('id') + " clicked. VALUE:" + theRadioElement.val()); }); });

    This example shows how to get the ID and Value when you click on a label that belongs to a jQueryUI radio.

    Happy coding :)

提交回复
热议问题