jquery - How can I get button events in the following code? -
i new jquery , don't know how events when press button on following code. please me.
<div class="key"> <div class="buttonwrapper"> <span data-i18n="keypad.one" class="button i18n"></span> </div> </div>
first want capture element want use, using $()
. in case:
$(".button")
then after have gotten element using $()
want bind event it. in case .click()
event:
$(".button").click(function(){ // insert want happen when clicks button here });
to learn more jquery, recommend looking @ api. more information .click()
event click here. learn more events in general click here.
Comments
Post a Comment