بدون مزيد من اللغط ، سأقوم فقط بنشر رمز للجميع.
<script> $ (function () {// تمييز الارتباط الحالي/النشط الملاحة اليسرى لتحديد التنقل النشط الحالي $ ('ul.main-menu li a'). كل (function () {var wo = window.location.href.substring (window.location.href.lastindexof ('/') + 1 ، window.location.href.lactind (. ($ (هذا) .attr ('href') == (wo + ".html"))) {$ (this) .parent (). addClass ('active') ؛ $ (this) .parents (). addClass ('active') ؛ $ (this) .parents ('li'). "syd" == wo) && ($ (this) .attr ('href') == "dbs.html"))) {$ (this) .parent (). addClass ('active') ؛ $ (this) .parents (). addClass ('active') ؛ $ (this) .parents ('li'). find ( الصفحة الرئيسية*/$ (". Main-Menu A"). انقر فوق (function () {// قم بتعيين li الحالي على $ $ (this) .find ("i: first"). toggleclass ("glyphicon-minus") ؛}) ؛ $ (". $ (هذا) .Parent ('li'). الأشقاء ('. نشط "). العثور على (" i: first "). toggleclass (" glyphicon-minus ") ؛ // ALERT ($ (this) .index ()) blings (". نشط"). removeclass ("نشط"). الأطفال ("ul"). slideup ('fast') ؛ $ (هذا).ما سبق هو البرنامج النصي للتنقل في JavaScript الذي قدمه المحرر لتحديد التنقل الحالي. آمل أن يكون ذلك مفيدًا للجميع. إذا كان لديك أي أسئلة ، فيرجى ترك رسالة لي وسوف يرد المحرر على الجميع في الوقت المناسب. شكرا جزيلا لدعمكم لموقع wulin.com!