Determine the jqueryURL parameter and determine the menu style _ jquery

Source: Internet
Author: User
Determine the jqueryURL and determine the menu style. For more information, see. js. Refer to the following articles. The Code is as follows:


$ (Function (){
Var Param = window. location. href. split ('? ') [1];
Var Uid;
Var aq = Param. indexOf ('&');
If (aq <0 ){
Uid = Param. substring (4 );
} Else {
Var Psd = Param. split ('&') [0];
Uid = Psd. substring (4 );
}
Var _ NaN =/^ \ d {1, 5} $ /;
If (! _NaN.exe c (Uid )){
Alert ("parameter error! ");
History. go (-1 );
};
$ (". L_l_list_rp li"). addClass ("l_m_out ");
$ (". L_l_list_rp li"). find ("a"). each (function (e ){
Var lid = $ (this). attr ("href"). substring (5 );
If (lid = Uid ){
$ (". L_l_list_rp li: eq (" + e + ")"). removeClass ("l_m_out"). addClass ("l_m_on ")
}
});
$ (". L_l_list_rp li"). each (function (){
If ($ (this). hasClass ("l_m_out ")){
$ (This). hover (function (){
$ (This). removeClass ("l_m_out"). addClass ("l_m_on ")
},
Function (){
$ (This). removeClass ("l_m_on"). addClass ("l_m_out ")
})
}
});
$ (". L_l_list_rp li"). click (function (){
Var href = $ (this). find ("a"). attr ("href ");
Location. href = href;
})
})

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.