• <nav id="cwumo"><code id="cwumo"></code></nav>
  • <menu id="cwumo"><strong id="cwumo"></strong></menu>

    jQuery實現高亮顯示的方法介紹

    時間:2024-08-20 13:28:35 jQuery Mobile 我要投稿
    • 相關推薦

    關于jQuery實現高亮顯示的方法介紹

      本文實例講述了jQuery實現高亮顯示的方法。分享給大家供大家參考。具體如下:

      主要功能代碼如下:

      var v = window.location.pathname; $(".hd ul li a").each(function (i) { var vherf = $(this).attr("href"); if (v == vherf) { $(".hd ul li").eq(i).addClass("on") } else { $(".hd ul li").eq(i).removeClass("on") }})

      使用時設置on的css高亮部分樣式即可。

      希望本文所述對大家的jQuery程序設計有所幫助。

    【jQuery實現高亮顯示的方法介紹】相關文章:

    關于jquery簡單圖片切換顯示效果實現方法介紹03-29

    jQuery(js)如何獲取文字寬度(顯示長度)03-29

    jQuery中prev()方法用法03-30

    jQuery中replaceAll()方法用法03-30

    asp.net+jquery Jsonp使用方法介紹03-29

    用SQL實現查詢數據不顯示錯誤數據的方法03-29

    在Word2010 如何設置搜索結果以黃色高亮背景顯示04-04

    asp.net richTextBox中高亮顯示選中字符串03-29

    jquery之超簡單的div顯示和隱藏特效demo簡介03-29

    日韩激情