Jump to content

if == class


kade119

Recommended Posts

What i'm trying to do but am a complete beginner.. is write a small php script that will make my menu item active based on the class and not the 'a' tag  could someone help me?

 

$class =  ???

 

<div id="serviceBox">
<span class="jFlowControl"><a class="s-item1" <?php if ($class == 's-item1'){ ?>class="active"<?php } ?>></a></span>
<span class="jFlowControl s-item2"><a></a></span>
<span class="jFlowControl"><a class="s-item3"></a></span>
<span class="jFlowControl"><a class="s-item4"></a></span>
<span class="jFlowControl"><a class="s-item5"></a></span>
</div>

Link to comment
https://forums.phpfreaks.com/topic/198791-if-class/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.