I have a list with display:none and some code to show element 3:
HTML:
<ul> <li>item 1</li> <li>item 2</li> <li>item 3</li> <li>item 4</li> </ul>
jquery:
var item = '1'; $("li:gt(1):lt(1)").show();
Is it possible to get var inside gt select? Al, I can think it
$("li:gt('+item+'):lt(1)").show();
Does not work. It can be done? If not what else can I try?
Example: http://jsfiddle.net/BSakQ/5/
source share