jquery - How to work with multiple "instances" of the same form in a document -
What is the easiest way to work with multiple instances of duplicate form with duplicated controls? < Pre> Forms are being provided as partial control @ (using AjaxBeginForm () ... Only one DivTest_xxx will appear at one time because I'm showing the hidden / reloaded one. As part of the partially presented part I have some JS functions I $$ ("# divTest") DoSomething is not always planned as usual. In reality every source There are many elements on the r and the visibility of each is being handled in the generic JS functions in the form, so, with the same control ID, I completely element. I am quite new to jquery Any help is appreciated, what is the best way to handle this type of situation? Thanks You do not want to have many elements with the same ID For example, say divTest_Control2 is currently one of the most visible jquery selectors to access specific elements: $ ('# DivTest_Control2 .divTest') ... & lt; Div id = "divTest_Control1" & gt; & Lt; Form id = "frmBaseClass" & gt; & Lt; Div id = "divTest" & gt; & Lt; / Div & gt; & Lt; / Form & gt; & Lt; / Div & gt; & Lt; Div id = "divTest_Control2" & gt; & Lt; Form id = "frmBaseClass" & gt; & Lt; Div id = "divTest" & gt; & Lt; / Div & gt; & Lt; / Form & gt; & Lt; / Div & gt;
Comments
Post a Comment