I have a dynamically generated amount of forms on a page with readonly set on all of the fields as well as a css class. Each form has it’s own edit button in an anchor tag, which when clicked I would like to use removeClass() and attr(‘readonly’, false) to reveal the form pertaining to that edit button. However if I supply the func with a class click handler this obviously reveals every form on the page which is not the desired result.
I don’t need any code as I would like to work towards the solution myself but if anyone knows of any articles or something in particular that I should look at/use please fire away!!!
Thanks
SOLVED! $(‘.prefRoute’).delegate(‘.editPrefRoute’, ‘click’ , function() { if($(this).parent().siblings(‘table’).hasClass(‘selected’)) { //DO STUFF HERE $(this).parent().siblings(‘table’).removeClass(‘selected’); } else { $(this).parent().siblings(‘table’).attr(‘class’, ‘selected’); //DO STUFF HERE } });