var $forms = $('form.vote');
$forms.submit(function(){
return false;
});
$('.votebtn').on('click',function(){
$this.closest('form').trigger('vote_now', [$(this).val()]);
});
$forms.on('vote_now',function(value){
alert(value);
});
vote_now
をトリガーして値をポップアップする必要がありますが、何か問題があります。それは何ですか?.trigger()a .on()
あなたはhttp://jsfiddle.netでこの問題を再現してもらえますか? – JesseBuesking
http://jsfiddle.net/6ZHy4/ – Michelle