Common JS effects need to be updated when... js effects are updated ..
1. Accordion Effect
JS:
$ (Function () {var aMenuOneLi = $ (". menu-one> li "); var aMenuTwo = $ (". menu-two "); $ (". menu-one> li>. header "). each (function (I) {$ (this ). mouseover (function () {// mouseover: hover the mouse over the mouse; click: click if ((((amenutwo[ I ]).css ("display") = "block") {// $ (aMenuTwo [I]). slideUp (300); // $ (aMenuOneLi [I]). removeClass ("menu-show"); // $ (aMenuOneLi [I]). addClass ("firstChild");} else {for (var j = 0; j <aMenuTwo. length; j ++) {$ (aMenuTwo [j]). slideUp (300); // $ (aMenuOneLi [j]). removeClass ("menu-show") ;}$ (aMenuTwo [I]). slideDown (300); // $ (aMenuOneLi [I]). removeClass ("firstChild ");}});});});
Example:
<Ul class = "menu-one"> <li> <a class = "header" href = "imageList. aspx? NodeCode = 00050001 "> Quality Control of tungsten and rare earths </a> <dl class =" menu-two "> <dt> sdfsdf </dt> </dl> </li> <a class = "header" href = "imageList. aspx? NodeCode = 00050002 "> Research on Tungsten and rare earth </a> <dl class =" menu-two "> <dt> sdfsdf </dt> </dl> </li> <a class = "header" href = "imageList. aspx? NodeCode = 00050003 "> Training for tungsten and rare earth </a> <dl class =" menu-two "> <dt> sdfsdf </dt> </dl> </li> </ul>
2. tab switching
JS:
// The function cutover (id, etype) {var tabContainer =$ ("#" + id ). find (". tabContainer "); var panelContainer =$ (" # "+ id ). find (". panelContainer "); tabContainer. find ("dl> dt "). each (function (I, e) {if (etype = "1") {$ (e ). hover (function () {tabContainer. find ("dl> dt "). removeClass ("on"); $ (e ). addClass ("on"); panelContainer. children ("div "). hide (); panelContainer. children ("div "). eq (I ). show () ;}) ;}if (etype = "2") {$ (e ). click (function () {tabContainer. find ("dl> dt "). removeClass ("on"); $ (e ). addClass ("on"); panelContainer. children ("div "). hide (); panelContainer. children ("div "). eq (I ). show ();});}});};
Example:
<Div class = "centerLeft1" id = "news_box"> <div class = "tabContainer"> <dl> <dt class = ""> success stories </dt> <dt class = "on"> industry news </dt> </dl> </div> <div class = "panelContainer"> <div class = "cgal"> function request (paras) {var url = location. href; var paraString = url. substring (url. indexOf ("? ") + 1, url. length ). split ("&"); var paraObj = {} for (I = 0; j = paraString [I]; I ++) {paraObj [j. substring (0, j. indexOf ("= ")). toLowerCase ()] = j. substring (j. indexOf ("=") + 1, j. length);} var returnValue = paraObj [paras. toLowerCase ()]; if (typeof (returnValue) = "undefined") {return ";} else {return returnValue ;}}
4. Set as Homepage
Function setHome (obj, url) {try {obj. style. behavior = 'url (# default # homepage) '; obj. setHomePage (url);} catch (e) {if (window. netscape) {try {netscape. security. privilegeManager. enablePrivilege ('universalxpconnect ');} catch (e) {alert ('Sorry, this operation was rejected by the browser! \ N enter "about: config" in the address bar of the browser, press \ n, set the value of [signed. applets. codebase_principal_support] to true, and double-click it. ');} Var prefs = Components. classes ['@ mozilla.org/preferences-service%1'%.getservice (Components. interfaces. nsIPrefBranch); prefs. setCharPref ('browser. startup. homepage ', url);} else {alert ('Sorry, your browser cannot complete this operation. \ N you must manually set '+ url +' to the homepage. ');}}}
5. Add to favorites
Function AddFavorite (title, url) {try {window. external. addFavorite (url, title);} catch (e) {try {window. sidebar. addPanel (title, url, "");} catch (e) {alert ("sorry, your browser cannot complete this operation. \ N failed to add to favorites. use Ctrl + D to add ");}}}
6. Simplified and Traditional Chinese Conversion
Var Default_isFT = 0 // whether the default value is traditional, 0-simplified, 1-traditional var StranIt_Delay = 50 // The translation delay is Millisecond (this is designed to make the webpage appear smoothly first) // ------- the code starts. Do not change it to ------- // convert the text function StranText (txt, toFT, chgTxt) {if (txt = "| txt = null) return "" toFT = null? BodyIsFt: toFT if (chgTxt) txt = txt. replace (toFT? "Jane": "fan"), (toFT? "Fan": "") if (toFT) {return Traditionalized (txt)} else {return Simplized (txt) }}// convert the object using recursion, layer-by-layer exploitation of the text function StranBody (fobj) {if (typeof (fobj) = "object") {var obj = fobj. childNodes} else {var tmptxt = StranLink_Obj.innerHTML.toString () if (tmptxt. indexOf ("") <0) {BodyIsFt = 1 StranLink_Obj.innerHTML = StranText (tmptxt, 0, 1) StranLink. title = StranText (StranLink. title, 0, 1)} else {Bo DyIsFt = 0 StranLink_Obj.innerHTML = StranText (tmptxt, 1, 1) StranLink. title = StranText (StranLink. title, 1, 1)} setCookie (JF_cn, BodyIsFt, 7) var obj = document. body. childNodes} for (var I = 0; I <obj. length; I ++) {var OO = obj. item (I) if ("| BR | HR | TEXTAREA | ". indexOf ("|" + OO. tagName + "|")> 0 | OO = StranLink_Obj) continue; if (OO. title! = "" & OO. title! = Null) OO. title = StranText (OO. title); if (OO. alt! = "" & OO. alt! = Null) OO. alt = StranText (OO. alt); if (OO. tagName = "INPUT" & OO. value! = "" & OO. type! = "Text" & OO. type! = "Hidden") OO. value = StranText (OO. value); if (OO. nodeType = 3) {OO. data = StranText (OO. data)} else StranBody (OO)} function JTPYStr () {return 'Ten thousand and ugly professional Cong Dong Si lost two Yan Feng Lin Li Ju Yiwu leqiao Xi Xiang book purchase chaos in the loss of cloud supply Mu yi yuan only from lun cangyi, the high price of the masses, will attack the umbrella Wei Chuan, and Lun Yu, the pseudo-queue, the rest of the Commission, the Xia, the investigation side of the overseas Chinese, the Friends of the two husband and wife, the debt is dumped. compensation for the loss of the storage of the children against the party LAN Guan xingz animal maintenance in the gang book write junnong Zun Feng Chong condition frozen net miserable Ling cut together a few Phoenix Xiao with Kai Jian drag Liu, then just create and delete others, please refer to the anti-yundun drama, persuade the office to do the necessary work, and collect the power of the worker, even the yunyun District Medical Association, China, sell Lu halogen, lie Wei, but fail the factory office experienced a severe pressure on the toilet room, and the comment of the xiaxiao County, the comment of the county, the double hair, the comment the employee was stunned, and he was stunned. Hello, You can't spray it. You can yell at it. jiang Luya Yu Jiao Yu Ying Yu Miao Ma sun xuexiao Ning bao shi Chong Xi Xian Gong Kuan bin sleeping to guide Shou yi er Chen Yao dead during the full-layer renewal session, I was a member of the yiyu region, who was a member of the yiyu region. shuai Shi's tent curtain is shown with a frame to help you handle the power of the screen and wide village qinglu library should be under the temple Pang waste when opening and abandoning Zhang mi bending and playing strong when recording Yan through the diameter of the Yu Yi Yu worried about the state of the Huai Yu pity total Yu Lian Jin evil Xiao Kai Xiao angry Yu Yue Yu hanging Xiao jie fear Miserable Yu i'm used to being angry, and I'm willing to block myself from being lazy, busy, and busy. stop twisting and choose to hang up and throw, and throw, throw, and throw. shake your hands, shake your hands, shake your hands, gather your enemies, collect your data, fight your hands, and cut off your old days. yang Xiaojie, a leader of miscellaneous power bars, is a zhushu jujube, a gun, fengxiao cabinet, a comment, a comment The sample of the tree habitat in the oak column is located at the same time. sakura published cupboard when the eaves of Huan Yu ou J Yu residual zookeeper broken hub when the split felt when the gas Hydrogen argon gas HuiHan sewage soup when the troughs did not leak when the city is busy, the city is busy. When the city is busy, the city is busy, and the city is busy. zookeeper vortex scalpers distrip up and down the yundun Yuanyuan region where the stains gradually spread over the Yu wenyou Bay wet burst and splash slow rolling slow full dirty filtering lu'an Beach please refer to the following example: I love ye now, I have been very careful about the problem. xian Yi Lu Wei Yi yi Xian Yan Jian Qian Pan Yi Cheng Wei Jiao Ji Kuang Lu code brick Yan Ti sharpen the Gravel Foundation, the silicon Shuo, And the zookeeper are indeed in the way of the zookeeper, the alkali, the United States, the United States pique que Yaoyao pique Dou Jing vertical competition Zookeeper basket barrier cataloa Indica Rice glutinous rice and Guangdong dung grain glutinous rice longlun's paper-based spinning and cutting-edge twisted series of silk embroidery and Sui Ji XU Xu Yu Long long rope Wei long silk Cable zookeeper, Zookeeper, and zookeeper are banned from the Internet. titanium gum pulse dirty umbilical brain pus takeu foot off the face wax-cured ankle greasy wonton Teng Yu Ship Cabin Yan Yi festival Wu Lu Yu flushula loose and peushed petabytes of grass-roots petabyte. zookeeper received Ying Ling even though the shrimps have an eclipse ant, the silkworms, oysters, oysters, and moles have been used to fill in the Grass-roots so when attacking the crotch, you can see the inspection system, and you can see the inspection system. I would like to write a statement to identify, discuss, discuss, and answer the remarks. I would like to write a statement to make it difficult to answer the question. comment on the diagnosis and treatment of the famous words, the famous words, the original words, the original words please tell me what to say when you say "hey" and ask Nono to read the lecture class when you say "Hey, sorry, you have to talk about it. q: Why? goods vendors are greedy and poor, and purchase and store goods in the same place. paste your loan and trade fee, and the thief, Jia rewards and rewards for the promotion of the game the rolling stock of rolling stock A young generation of Hui roll rim rolling and cutting-edge rolling xun di Yu Zheng Yu Tang potassium-braze SMBs and vanadium-fishing zookeeper-calcium-pu-titanium blunt notes Zhong sodium-barium-steel-Zookeeper key Qin Jun-tungsten-hook-SC-Zookeeper button Palladium-assisted coin-dropping pliers cobalt-assisted zookeeper-drill-down of molybdenum, Ta, potassium-modified uranium, iron, platinum, bell-coated lead-rivet, cerium-xuan, bismuth-Bismuth-and-Bismuth-in-the-row-handling of Rh-er-3 copper, aluminum, indium, hazelnut, shovel, ammonium, silver, petabyte, TB chain, pin lock, lithium, hazelnut, zirconium ossclient rust file front zinc taobaoer cutting-edge antimony taobaoer cutting-edge zinc taobaoer cutting-edge zookeeper zookeeper magnesium plating zookeeper cadmium tweezers engraved nickel zookeeper boring zookeeper mirror zookeeper please refer to the following documents for further discussion: min chen Yi, Shaanxi Province, Sichuan Province, insurance, and hidden likes, difficulties, chicks, smog, Milli, Jing, Wei Ren, Han Yi, Yun, Yun, top of the Yun page stubborn Gu Dun Jing treasure and scalability wonton bread wonton The horse was running on the horse, and the horse was running in the camel. zookeeper zookeeper hip joint catfish zookeeper inspector inspector the birds of the birds, the birds zookeeper zookeeper zookeeper zookeeper in the consultation, Fan song did not try the noise and won't be idle and dirty ';} function FTPYStr () {return 'copyright and industry leading two major issues: Why does it mean that our company has been using Alibaba Cloud products? we are pleased to announce that Alibaba Cloud's leading group members have been using Alibaba Cloud's dynamic route for customers. Please refer to the following link for more information: I strongly recommend that you have reached the upper limit when using Alibaba Cloud products. alibaba Cloud's business operations and marketing campaigns have been fiercely promoted in our region, and our country has been released. are there any problems in the future? please refer to the following link for more information: our country's leading region's leading country's leading province's leading country please refer to the following link for more information: I have been reading this article. I have been reading this article. please refer to the following link for more information: please refer to the following link for more information: Please refer to the following link for more information: they have been in the same region. please refer to the following link for more information: when there is no such change, there will be a number of legal reasons. When there is no such change, there will be a number of legal reasons. please refer to the following documents for our Organization: Please refer to these documents for our reference. Please refer to these documents as follows: please refer to the following link for more information: there has been a number of attacks in the market, and there has been a number of attacks in the market. please refer to the following link for more information: please refer to the following link for more information: please refer to the following link for more information: Please refer to the following link for more information: there have been many computer science and technology companies around the world. There have been many large numbers of computer science and technology companies around the world. there are two major problems in the future. please check whether there are too many attempts to handle these issues. there are two major problems in this process: please refer to the following link for more information: please refer to the following link for more information: <G id = "1"> online analytics </G> <G id = "2"> online analytics </G>. please refer to the following link for more information: please refer to the following link for more information: please refer to the following link for more information: Please refer to the following link for more information: please refer to the following link for more information: please refer to the following link for more information: please refer to the following link for more information: in our opinion, our regulatory requirements have been improved, and our customers have been informed that our customers have been optimized, and our customers are advised to accept the proposed policies. he is a senior vice president of Alibaba Cloud. He has made some heated discussions about the legal representative's legal representative. He has been informed of the legal representative's legal representative. please refer to the following link for more information: who should I know? Why? please refer to the following link for more information: Why? there are two major problems: Alibaba Cloud has been making a huge number of vehicles available in different regions. The number of vehicles around the world has been increased by the number of vehicles around the world. please refer to the following link for more information: please refer to the following link for more information: please refer to the following link for more information: there are two major reasons for this problem: please refer to the following link for more information: please refer to the following link for more information: please refer to the following link for more information: please refer to the following link for more information: please refer to the following link for more information: Please refer to the following link for more information: please refer to the following link for more information: there are two major problems in the future. please refer to the following link for more information: there have been several attempts to improve the performance of these attacks. please refer to the following link for more information: please refer to the following link for more information: please refer to the following link for more information: please refer to the following link for more information: please refer to the following link for more information: Please refer to the following link for more information: there are too many reasons why there are too many reasons why? ';} function Traditionalized (cc) {var str = '', ss = JTPYStr (), tt = FTPYStr (); for (var I = 0; I <cc. length; I ++) {if (cc. charCodeAt (I)> 10000 & ss. indexOf (cc. charAt (I ))! =-1) str + = tt. charAt (ss. indexOf (cc. charAt (I); else str + = cc. charAt (I);} return str;} function Simplized (cc) {var str = '', ss = JTPYStr (), tt = FTPYStr (); for (var I = 0; I <cc. length; I ++) {if (cc. charCodeAt (I)> 10000 & tt. indexOf (cc. charAt (I ))! =-1) str + = ss. charAt (tt. indexOf (cc. charAt (I); else str + = cc. charAt (I) ;}return str;} function setCookie (name, value) // cookie settings {var argv = setCookie. arguments; var argc = setCookie. arguments. length; var expires = (argc> 2 )? Argv [2]: null; if (expires! = Null) {var LargeExpDate = new Date (); LargeExpDate. setTime (LargeExpDate. getTime () + (expires * 1000*3600*24);} document. cookie = name + "=" + escape (value) + (expires = null )? "": ("; Expires =" + LargeExpDate. toGMTString ();} function getCookie (Name) // cookies read {var search = Name + "=" if (document. cookie. length> 0) {offset = document. cookie. indexOf (search) if (offset! =-1) {offset + = search. length end = document. cookie. indexOf (";", offset) if (end =-1) end = document. cookie. length return unescape (document. cookie. substring (offset, end)} else return ""} var StranLink_Obj = document. getElementById ("StranLink") if (StranLink_Obj) {var JF_cn = "ft" + self. location. hostname. toString (). replace (/\. /g, "") var BodyIsFt = getCookie (JF_cn) if (BodyIsFt! = "1") BodyIsFt = Default_isFT with (StranLink_Obj) {if (typeof (document. all )! = "Object") // non-IE browser {href = "javascript: StranBody ()"} else {href = "#"; onclick = new Function ("StranBody (); return false ")} title = StranText (" click to browse in Traditional Chinese ", 1, 1) innerHTML = StranText (innerHTML, 1, 1 )} if (BodyIsFt = "1") {setTimeout ("StranBody ()", StranIt_Delay )}}View Code
Example:
1 <a href = "javascript: StranBody ();" id = "StranLink" name = "StranLink"> traditional Chinese </a>
7. jQuery attr css assignment, get
$ ("# Left_117 "). attr ("class", "menu-show"); // attr defines attributes of a tag, such as: class, $ ("# ft_117" ).css ("display ", "block"); // css defines the element $ ("# left_117") in the style "). attr ("class"); // obtain the value of the tag's built-in attributes, such as: class, $ ("# ft_117" ).css ("display "); // obtain the value of the element in the style, such as display, width...