If I have following html code
<div id="tabs">
<ul>
<li><a href="#tab-One" class="tabLink">This is tab one</a></li>
<li><a href="#tab-Two" class="tabLink">This is tab two</a></li>
...
</ul>
</div>
How could I fetch this string to some js variable One or Two (this will be ofcourse dynamic data).
This string is exactly between #tab- and class=
Assuming you want to do this on click, you could do the following