Given the code entered:
<div id="Tab1"> <input type="text" id="ctl100_Tab1_one_text"/> <input type="text" id="ctl100_Tab1_two_text"/> </div> <div id="Tab2"> <input type="text" id="ctl100_Tab2_one_text"/> <input type="text" id="ctl100_Tab2_two_text"/> </div>
And the question is:
I want all text fields in Tab1 to be split to Tab2
$('#tab1 input:text')
However, given the name of your question:
How can I get elements in jQuery, starting from a specific template and ending with another template?
You can use:
$('input:text[id^=startsWithPattern][id$=endsWithPattern]');
Using ^= (attribute-begins-with selector) and $= (attribute-end-with selectors) .
As shown with JS Fiddle demo .
source share