php - Styling an active link targeting an iframe -
i have html code links' target iframe. want add style, highlighted links. want make active link highlighted css( or/with php), i'm trying avoid javascript.
here code:
<ul> <li><a href="http://en.wikipedia.org/wiki/rhenium" target="box">rhenium</a></li> <li><a href="http://en.wikipedia.org/wiki/tellurium" target="box">tellurium</a></li> <li><a href="http://en.wikipedia.org/wiki/tin" target="box">tin</a></li> </ul> <iframe name="box" src="http://en.wikipedia.org/wiki/rhenium"></iframe>
best view: http://jsfiddle.net/wb8e8/
i've tried lot of css tricks, including non displayed iframe , combined different selectors (~ + >) < li >, goes messy , make css size big. i've tried php conditions too, i've couldn't manage accomplish result. so, how make work? how make highlighted link when iframe displays content of url?
why not javascript?
$(function() { $('ul li').click( function() { $(this).addclass('active').siblings().removeclass('active'); }); });
Comments
Post a Comment