javascript - jquery binding events on selected tab -


i have few tabs same form inside of them, difference location of work in hidden element.

i'm loading tabs ajax href="blah.htm"

i want bind onclick element in form, problem since form same on tabs jquery operates on first instance, i.e. first tab.

question ..how can use jquery on selected tab instead on first tab?

you're not giving out lot of details, if guess correctly following work you

$('.myform input').click(function() { //do here }) 

ie. refer form class instead of ids or names.

with added bonus of having per tab onclick handlers 0 efforts:

$('#tab1 .myform input') 

Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -