PHP – random div names?

  • Author
  • #511271


    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">
    jQuery('.dates .a').fadeOut(300, function(){
    jQuery('.dates .share').fadeIn(300);
    jQuery('.dates .share').fadeOut(300, function(){
    jQuery('.dates .a').fadeIn(300);

    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!



    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.

The topic ‘PHP – random div names?’ is closed to new replies.