Need help? Check out our Support site, then

PHP - random div names?

  1. I have a piece of php I'm using on wordpress blog posts. It is a simple fade in/ fade out, but it works by knowing the div's exact class.
    <script type="text/javascript"><br /> jQuery(function(){<br /> jQuery('.story-wrap').mouseenter(<br /> function(){<br /> jQuery('.dates .a').fadeOut(300, function(){<br /> jQuery('.dates .share').fadeIn(300);<br /> });<br /> }<br /> );<br /> jQuery('.story-wrap').mouseleave(<br /> function(){<br /> jQuery('.dates .share').fadeOut(300, function(){<br /> jQuery('.dates .a').fadeIn(300);<br /> });<br /> }<br /> );<br /> });<br /> </script>
    It works great but when I use it on an archive page and there is more than one instance of the div class, they all react at the same time. I want each div to react separately, eg you hover div one and only div one reacts not every div.

    Is there some way I can create a random div name each time dynamicaly and have the script work with that somehow??

    Thanks so much for any help!

  2. You did not specify a blog address or reason for posting when you created this topic.

    This support forum is for blogs hosted at If your question is about a self-hosted WordPress blog then you'll find help at the forums.

    If you don't understand the difference between and, you may find this information helpful.

    If you forgot to include a link to your blog, you can reply and include it below. It'll help people to answer your question.

    This is an automated message.

Topic Closed

This topic has been closed to new replies.

About this Topic