rt.
<div id="searchProgram">
<div class="program"></div>
<div class="program"></div>
<div class="program"></div>
</div>
$(".program").click(function(){
var channelIndex = $(this).index();
$("-sharpsearchProgram").children().css({"display":"none"});
$("-sharpsearchProgram div:nth-child(channelIndex)").css({"display":"block"});
});
this cannot modify the style of the child div. Error:
resolved, the last line is changed to:
$("-sharpsearchProgram div:nth-child("+channelIndex+")").css({"display":"block"});
});