jquery elements selecting from diffrent forms on button click listners

ok so i have three forms on the front page of my site and im not the best with jquery selectors or the .each functions .... so i have the j query ui buttons linked to an event listener thats sends an ajax post but the problem is i cant just specifies the form i want ! heres my code
fields...... fields...... fields...... fields......
fields...... fields...... fields...... fields...... fields......
fields...... fields...... fields...... fields...... fields......
$(function(){ $('button').click(function(event) { $('form .... i wanna hide all forms once clicked .. working!!!').hide(); event.preventDefault(); $('pload').html(''); // heres where i get the data from all forms i just want one.... var page = 'form.'+$('form').serialize(); var huh = $('input:hidden').val(); var data = 'pop='+huh+'&page='+page; $.post('source/php/bots/authorize.php',data,function(data){ $('#pager_master_div').html(data); $('pload').html(''); }); }); });

以上就是jquery elements selecting from diffrent forms on button click listners的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » jQuery 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏