Welcome Guest, Not a member yet? Register   Sign In
jquery help
#4

[eluser]Patrick K[/eluser]
Code:
if($(this).attr("page_id") == <?php echo $page_id; ?>)


page_id isn't a valid HTML attribute. I think you're using it incorrectly. for example:

Code:
<img src="sss" alt="image_name" title="this title" />

you'd .attr("alt") or .attr("title")

if you want it to work you'd have to:

Code:
<a href="" title="1" class="unique-name"></a>

var page_id = $('#unique-name").attr('title');

if (page_id == &lt;? echo $page_id; ?&gt;){
  //hilight the sonuvabitchere.
}


Messages In This Thread
jquery help - by El Forum - 01-23-2010, 03:39 PM
jquery help - by El Forum - 01-23-2010, 04:11 PM
jquery help - by El Forum - 01-24-2010, 12:30 AM
jquery help - by El Forum - 01-24-2010, 01:34 AM



Theme © iAndrew 2016 - Forum software by © MyBB