• dolbysound

    (@dolbysound)


    Hi,
    I use jquery tooltip to ad buble info in my link, simply ad class=”tooltip” in my href link.

    I would like ad a class in my category link (href ! not li)

    By défaut, i’ve :

    <ul id="nav">
          <li class="..."><a href="#">Logos</a></li>
      </ul>

    I would like :

    <ul id="nav">
          <li class="..."><a CLASS="TOOLTIP" href="#">Logos</a></li>
      </ul>

    How to do it ?

Viewing 5 replies - 1 through 5 (of 5 total)
  • stvwlf

    (@stvwlf)

    This should work

    <script type=”text/javascript”>
    jQuery(document).ready(function(){
    jQuery(“ul#nav a”).addClass(“tooltip”);
    });
    </script>

    stvwlf

    (@stvwlf)

    You have to load the jQuery library first, by the way…

    in header.php in your theme,
    put this
    <?php wp_enqueue_script('jquery'); ?>

    somewhere before this line
    <?php wp_head(); ?>

    Then put the script after the wp_head() line

    <script type="text/javascript">
    jQuery(document).ready(function(){
    jQuery("ul#nav a").addClass("tooltip");
    });
    </script>

    Thread Starter dolbysound

    (@dolbysound)

    Nice on Firefox but doesn’t work on IE6-IE7 ?! Why ??

    stvwlf

    (@stvwlf)

    You’ll have to check that with whoever made the jQuery tooltip routine

    Thread Starter dolbysound

    (@dolbysound)

    yes, jquery version is now update and all is ok ! Thx

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to ad a link class in wp_list_categories ?’ is closed to new replies.