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;
})
})