How to use this.remove method in Appium Xcuitest Driver

Best JavaScript code snippet using appium-xcuitest-driver

animation-active.js

Source:animation-active.js Github

copy

Full Screen

1(function ($) {2 "use strict";3 4 /*----------------------5 Animation active js6 -----------------------*/7 $("button.btn.ant-nk-st.bounce-ac").on('click', function(){8 $(".animation-img .animate-one").addClass("animated bounce").one("webkitAnimationEnd mozAnimationEnd oAnimationEnd animationend", function(){9 $(this).removeClass("animated bounce");10 });11 });12 $("button.btn.ant-nk-st.flash-ac").on('click', function(){13 $(".animation-img .animate-one").addClass("animated flash").one("webkitAnimationEnd mozAnimationEnd oAnimationEnd animationend", function(){14 $(this).removeClass("animated flash");15 });16 });1718 $("button.btn.ant-nk-st.pulse-ac").on('click', function(){19 $(".animation-img .animate-one").addClass("animated pulse").one("webkitAnimationEnd mozAnimationEnd oAnimationEnd animationend", function(){20 $(this).removeClass("animated pulse");21 });22 });23 $("button.btn.ant-nk-st.rubberBand-ac").on('click', function(){24 $(".animation-img .animate-one").addClass("animated rubberBand").one("webkitAnimationEnd mozAnimationEnd oAnimationEnd animationend", function(){25 $(this).removeClass("animated rubberBand");26 });27 });28 $("button.btn.ant-nk-st.bounceIn-ac").on('click', function(){29 $(".animation-img .animate-two").addClass("animated bounceIn").one("webkitAnimationEnd mozAnimationEnd oAnimationEnd animationend", function(){30 $(this).removeClass("animated bounceIn");31 });32 });33 $("button.btn.ant-nk-st.bounceInDown-ac").on('click', function(){34 $(".animation-img .animate-two").addClass("animated bounceInDown").one("webkitAnimationEnd mozAnimationEnd oAnimationEnd animationend", function(){35 $(this).removeClass("animated bounceInDown");36 });37 });3839 $("button.btn.ant-nk-st.bounceInLeft-ac").on('click', function(){40 $(".animation-img .animate-two").addClass("animated bounceInLeft").one("webkitAnimationEnd mozAnimationEnd oAnimationEnd animationend", function(){41 $(this).removeClass("animated bounceInLeft");42 });43 });44 $("button.btn.ant-nk-st.bounceInUp-ac").on('click', function(){45 $(".animation-img .animate-two").addClass("animated bounceInUp").one("webkitAnimationEnd mozAnimationEnd oAnimationEnd animationend", function(){46 $(this).removeClass("animated bounceInUp");47 });48 });49 $("button.btn.ant-nk-st.bounceOut-ac").on('click', function(){50 $(".animation-img .animate-three").addClass("animated bounceOut").one("webkitAnimationEnd mozAnimationEnd oAnimationEnd animationend", function(){51 $(this).removeClass("animated bounceOut");52 });53 });54 $("button.btn.ant-nk-st.bounceOutDown-ac").on('click', function(){55 $(".animation-img .animate-three").addClass("animated bounceOutDown").one("webkitAnimationEnd mozAnimationEnd oAnimationEnd animationend", function(){56 $(this).removeClass("animated bounceOutDown");57 });58 });5960 $("button.btn.ant-nk-st.bounceOutLeft-ac").on('click', function(){61 $(".animation-img .animate-three").addClass("animated bounceOutLeft").one("webkitAnimationEnd mozAnimationEnd oAnimationEnd animationend", function(){62 $(this).removeClass("animated bounceOutLeft");63 });64 });65 $("button.btn.ant-nk-st.bounceOutRight-ac").on('click', function(){66 $(".animation-img .animate-three").addClass("animated bounceOutRight").one("webkitAnimationEnd mozAnimationEnd oAnimationEnd animationend", function(){67 $(this).removeClass("animated bounceOutRight");68 });69 });70 $("button.btn.ant-nk-st.fadeIn-ac").on('click', function(){71 $(".animation-img .animate-four").addClass("animated fadeIn").one("webkitAnimationEnd mozAnimationEnd oAnimationEnd animationend", function(){72 $(this).removeClass("animated fadeIn");73 });74 });75 $("button.btn.ant-nk-st.fadeInDown-ac").on('click', function(){76 $(".animation-img .animate-four").addClass("animated fadeInDown").one("webkitAnimationEnd mozAnimationEnd oAnimationEnd animationend", function(){77 $(this).removeClass("animated fadeInDown");78 });79 });8081 $("button.btn.ant-nk-st.fadeInDownBig-ac").on('click', function(){82 $(".animation-img .animate-four").addClass("animated fadeInDownBig").one("webkitAnimationEnd mozAnimationEnd oAnimationEnd animationend", function(){83 $(this).removeClass("animated fadeInDownBig");84 });85 });86 $("button.btn.ant-nk-st.fadeInLeft-ac").on('click', function(){87 $(".animation-img .animate-four").addClass("animated fadeInLeft").one("webkitAnimationEnd mozAnimationEnd oAnimationEnd animationend", function(){88 $(this).removeClass("animated fadeInLeft");89 });90 });91 $("button.btn.ant-nk-st.fadeOut-ac").on('click', function(){92 $(".animation-img .animate-five").addClass("animated fadeOut").one("webkitAnimationEnd mozAnimationEnd oAnimationEnd animationend", function(){93 $(this).removeClass("animated fadeOut");94 });95 });96 $("button.btn.ant-nk-st.fadeOutDown-ac").on('click', function(){97 $(".animation-img .animate-five").addClass("animated fadeOutDown").one("webkitAnimationEnd mozAnimationEnd oAnimationEnd animationend", function(){98 $(this).removeClass("animated fadeOutDown");99 });100 });101102 $("button.btn.ant-nk-st.fadeOutDownBig-ac").on('click', function(){103 $(".animation-img .animate-five").addClass("animated fadeOutDownBig").one("webkitAnimationEnd mozAnimationEnd oAnimationEnd animationend", function(){104 $(this).removeClass("animated fadeOutDownBig");105 });106 });107 $("button.btn.ant-nk-st.fadeOutLeft-ac").on('click', function(){108 $(".animation-img .animate-five").addClass("animated fadeOutLeft").one("webkitAnimationEnd mozAnimationEnd oAnimationEnd animationend", function(){109 $(this).removeClass("animated fadeOutLeft");110 });111 });112 $("button.btn.ant-nk-st.flip-ac").on('click', function(){113 $(".animation-img .animate-six").addClass("animated flip").one("webkitAnimationEnd mozAnimationEnd oAnimationEnd animationend", function(){114 $(this).removeClass("animated flip");115 });116 });117 $("button.btn.ant-nk-st.flipInX-ac").on('click', function(){118 $(".animation-img .animate-six").addClass("animated flipInX").one("webkitAnimationEnd mozAnimationEnd oAnimationEnd animationend", function(){119 $(this).removeClass("animated flipInX");120 });121 });122123 $("button.btn.ant-nk-st.flipInY-ac").on('click', function(){124 $(".animation-img .animate-six").addClass("animated flipInY").one("webkitAnimationEnd mozAnimationEnd oAnimationEnd animationend", function(){125 $(this).removeClass("animated flipInY");126 });127 });128 $("button.btn.ant-nk-st.flipOutX-ac").on('click', function(){129 $(".animation-img .animate-six").addClass("animated flipOutX").one("webkitAnimationEnd mozAnimationEnd oAnimationEnd animationend", function(){130 $(this).removeClass("animated flipOutX");131 });132 });133 $("button.btn.ant-nk-st.slideInUp-ac").on('click', function(){134 $(".animation-img .animate-seven").addClass("animated slideInUp").one("webkitAnimationEnd mozAnimationEnd oAnimationEnd animationend", function(){135 $(this).removeClass("animated slideInUp");136 });137 });138 $("button.btn.ant-nk-st.slideInDown-ac").on('click', function(){139 $(".animation-img .animate-seven").addClass("animated slideInDown").one("webkitAnimationEnd mozAnimationEnd oAnimationEnd animationend", function(){140 $(this).removeClass("animated slideInDown");141 });142 });143144 $("button.btn.ant-nk-st.slideInLeft-ac").on('click', function(){145 $(".animation-img .animate-seven").addClass("animated slideInLeft").one("webkitAnimationEnd mozAnimationEnd oAnimationEnd animationend", function(){146 $(this).removeClass("animated slideInLeft");147 });148 });149 $("button.btn.ant-nk-st.slideInRight-ac").on('click', function(){150 $(".animation-img .animate-seven").addClass("animated slideInRight").one("webkitAnimationEnd mozAnimationEnd oAnimationEnd animationend", function(){151 $(this).removeClass("animated slideInRight");152 });153 });154 $("button.btn.ant-nk-st.rotateIn-ac").on('click', function(){155 $(".animation-img .animate-eight").addClass("animated rotateIn").one("webkitAnimationEnd mozAnimationEnd oAnimationEnd animationend", function(){156 $(this).removeClass("animated rotateIn");157 });158 });159 $("button.btn.ant-nk-st.rotateInDownLeft-ac").on('click', function(){160 $(".animation-img .animate-eight").addClass("animated rotateInDownLeft").one("webkitAnimationEnd mozAnimationEnd oAnimationEnd animationend", function(){161 $(this).removeClass("animated rotateInDownLeft");162 });163 });164165 $("button.btn.ant-nk-st.rotateInDownRight-ac").on('click', function(){166 $(".animation-img .animate-eight").addClass("animated rotateInDownRight").one("webkitAnimationEnd mozAnimationEnd oAnimationEnd animationend", function(){167 $(this).removeClass("animated rotateInDownRight");168 });169 });170 $("button.btn.ant-nk-st.rotateInUpLeft-ac").on('click', function(){171 $(".animation-img .animate-eight").addClass("animated rotateInUpLeft").one("webkitAnimationEnd mozAnimationEnd oAnimationEnd animationend", function(){172 $(this).removeClass("animated rotateInUpLeft");173 });174 });175 $("button.btn.ant-nk-st.rotateOut-ac").on('click', function(){176 $(".animation-img .animate-nine").addClass("animated rotateOut").one("webkitAnimationEnd mozAnimationEnd oAnimationEnd animationend", function(){177 $(this).removeClass("animated rotateOut");178 });179 });180 $("button.btn.ant-nk-st.rotateOutDownLeft-ac").on('click', function(){181 $(".animation-img .animate-nine").addClass("animated rotateOutDownLeft").one("webkitAnimationEnd mozAnimationEnd oAnimationEnd animationend", function(){182 $(this).removeClass("animated rotateOutDownLeft");183 });184 });185186 $("button.btn.ant-nk-st.rotateOutDownRight-ac").on('click', function(){187 $(".animation-img .animate-nine").addClass("animated rotateOutDownRight").one("webkitAnimationEnd mozAnimationEnd oAnimationEnd animationend", function(){188 $(this).removeClass("animated rotateOutDownRight");189 });190 });191 $("button.btn.ant-nk-st.rotateOutUpLeft-ac").on('click', function(){192 $(".animation-img .animate-nine").addClass("animated rotateOutUpLeft").one("webkitAnimationEnd mozAnimationEnd oAnimationEnd animationend", function(){193 $(this).removeClass("animated rotateOutUpLeft");194 });195 });196 $("button.btn.ant-nk-st.slideOutUp-ac").on('click', function(){197 $(".animation-img .animate-ten").addClass("animated slideOutUp").one("webkitAnimationEnd mozAnimationEnd oAnimationEnd animationend", function(){198 $(this).removeClass("animated slideOutUp");199 });200 });201 $("button.btn.ant-nk-st.slideOutDown-ac").on('click', function(){202 $(".animation-img .animate-ten").addClass("animated slideOutDown").one("webkitAnimationEnd mozAnimationEnd oAnimationEnd animationend", function(){203 $(this).removeClass("animated slideOutDown");204 });205 });206207 $("button.btn.ant-nk-st.slideOutLeft-ac").on('click', function(){208 $(".animation-img .animate-ten").addClass("animated slideOutLeft").one("webkitAnimationEnd mozAnimationEnd oAnimationEnd animationend", function(){209 $(this).removeClass("animated slideOutLeft");210 });211 });212 $("button.btn.ant-nk-st.slideOutRight-ac").on('click', function(){213 $(".animation-img .animate-ten").addClass("animated slideOutRight").one("webkitAnimationEnd mozAnimationEnd oAnimationEnd animationend", function(){214 $(this).removeClass("animated slideOutRight");215 });216 });217 $("button.btn.ant-nk-st.zoomIn-ac").on('click', function(){218 $(".animation-img .animate-eleven").addClass("animated zoomIn").one("webkitAnimationEnd mozAnimationEnd oAnimationEnd animationend", function(){219 $(this).removeClass("animated zoomIn");220 });221 });222 $("button.btn.ant-nk-st.zoomInDown-ac").on('click', function(){223 $(".animation-img .animate-eleven").addClass("animated zoomInDown").one("webkitAnimationEnd mozAnimationEnd oAnimationEnd animationend", function(){224 $(this).removeClass("animated zoomInDown");225 });226 });227228 $("button.btn.ant-nk-st.zoomInLeft-ac").on('click', function(){229 $(".animation-img .animate-eleven").addClass("animated zoomInLeft").one("webkitAnimationEnd mozAnimationEnd oAnimationEnd animationend", function(){230 $(this).removeClass("animated zoomInLeft");231 });232 });233 $("button.btn.ant-nk-st.zoomInRight-ac").on('click', function(){234 $(".animation-img .animate-eleven").addClass("animated zoomInRight").one("webkitAnimationEnd mozAnimationEnd oAnimationEnd animationend", function(){235 $(this).removeClass("animated zoomInRight");236 });237 });238 $("button.btn.ant-nk-st.zoomOut-ac").on('click', function(){239 $(".animation-img .animate-twelve").addClass("animated zoomOut").one("webkitAnimationEnd mozAnimationEnd oAnimationEnd animationend", function(){240 $(this).removeClass("animated zoomOut");241 });242 });243 $("button.btn.ant-nk-st.zoomOutDown-ac").on('click', function(){244 $(".animation-img .animate-twelve").addClass("animated zoomOutDown").one("webkitAnimationEnd mozAnimationEnd oAnimationEnd animationend", function(){245 $(this).removeClass("animated zoomOutDown");246 });247 });248249 $("button.btn.ant-nk-st.zoomOutLeft-ac").on('click', function(){250 $(".animation-img .animate-twelve").addClass("animated zoomOutLeft").one("webkitAnimationEnd mozAnimationEnd oAnimationEnd animationend", function(){251 $(this).removeClass("animated zoomOutLeft");252 });253 });254 $("button.btn.ant-nk-st.zoomOutRight-ac").on('click', function(){255 $(".animation-img .animate-twelve").addClass("animated zoomOutRight").one("webkitAnimationEnd mozAnimationEnd oAnimationEnd animationend", function(){256 $(this).removeClass("animated zoomOutRight");257 });258 });259 /*----------------------260 Animation dropdown active js261 -----------------------*/262 $("button.triger-fadeIn").on('click', function(){263 $(".triger-fadeIn-dp").addClass("animated fadeIn").one("webkitAnimationEnd mozAnimationEnd oAnimationEnd animationend", function(){264 $(this).removeClass("animated fadeIn");265 });266 });267 $("button.triger-fadeInUp").on('click', function(){268 $(".triger-fadeInUp-dp").addClass("animated fadeInUp").one("webkitAnimationEnd mozAnimationEnd oAnimationEnd animationend", function(){269 $(this).removeClass("animated fadeInUp");270 });271 });272 $("button.triger-fadeInLeft").on('click', function(){273 $(".triger-fadeInLeft-dp").addClass("animated fadeInLeft").one("webkitAnimationEnd mozAnimationEnd oAnimationEnd animationend", function(){274 $(this).removeClass("animated fadeInLeft");275 });276 });277 $("button.triger-shake").on('click', function(){278 $(".triger-shake-dp").addClass("animated shake").one("webkitAnimationEnd mozAnimationEnd oAnimationEnd animationend", function(){279 $(this).removeClass("animated shake");280 });281 });282 $("button.triger-swing").on('click', function(){283 $(".triger-swing-dp").addClass("animated swing").one("webkitAnimationEnd mozAnimationEnd oAnimationEnd animationend", function(){284 $(this).removeClass("animated swing");285 });286 });287 $("button.triger-jello").on('click', function(){288 $(".triger-jello-dp").addClass("animated jello").one("webkitAnimationEnd mozAnimationEnd oAnimationEnd animationend", function(){289 $(this).removeClass("animated jello");290 });291 });292 $("button.triger-bounceIn").on('click', function(){293 $(".triger-bounceIn-dp").addClass("animated bounceIn").one("webkitAnimationEnd mozAnimationEnd oAnimationEnd animationend", function(){294 $(this).removeClass("animated bounceIn");295 });296 });297 $("button.triger-bounceInUp").on('click', function(){298 $(".triger-bounceInUp-dp").addClass("animated bounceInUp").one("webkitAnimationEnd mozAnimationEnd oAnimationEnd animationend", function(){299 $(this).removeClass("animated bounceInUp");300 });301 });302 $("button.triger-flip").on('click', function(){303 $(".triger-flip-dp").addClass("animated flip").one("webkitAnimationEnd mozAnimationEnd oAnimationEnd animationend", function(){304 $(this).removeClass("animated flip");305 });306 });307 $("button.triger-flipInX").on('click', function(){308 $(".triger-flipInX-dp").addClass("animated flipInX").one("webkitAnimationEnd mozAnimationEnd oAnimationEnd animationend", function(){309 $(this).removeClass("animated flipInX");310 });311 });312 $("button.triger-flipInY").on('click', function(){313 $(".triger-flipInY-dp").addClass("animated flipInY").one("webkitAnimationEnd mozAnimationEnd oAnimationEnd animationend", function(){314 $(this).removeClass("animated flipInY");315 });316 });317 $("button.triger-rotateIn").on('click', function(){318 $(".triger-rotateIn-dp").addClass("animated rotateIn").one("webkitAnimationEnd mozAnimationEnd oAnimationEnd animationend", function(){319 $(this).removeClass("animated rotateIn");320 });321 });322 $("button.triger-zoomIn").on('click', function(){323 $(".triger-zoomIn-dp").addClass("animated zoomIn").one("webkitAnimationEnd mozAnimationEnd oAnimationEnd animationend", function(){324 $(this).removeClass("animated zoomIn");325 });326 });327 ...

Full Screen

Full Screen

blink.js

Source:blink.js Github

copy

Full Screen

12///////////////////////////////////////////////////////3// 开关量4///////////////////////////////////////////////////////5var basePath = "/Monitoring/Templates/Common/";6var grey = "grey.png";7var white = "white.png";8var redD = "redD.png";9var redL = "redL.png";10var greenD = "greenD.png";11var greenL = "greenL.png";12var yellowD = "yellowD.png";13var yellowL = "yellowL.png";14var blue = "blue.png";15function getImgTag(src) {16 return '<img src="' + basePath + src + '" style="width:100%;height:100%;" />';17}18function blink() {19 if (window["blink"] == "0")20 window["blink"] = "1";21 else22 window["blink"] = "0";23 $(".blink").each(function () {24 var pattern = /[^\.^\/]+\.png/gi;25 var match = $(this).html().match(pattern);26 if (window["blink"] == "0") {27 if (match == redL)28 $(this).html(getImgTag(redD));29 if (match == greenL)30 $(this).html(getImgTag(greenD));31 if (match == yellowL)32 $(this).html(getImgTag(yellowD));33 }34 else {35 if (match == redD)36 $(this).html(getImgTag(redL));37 if (match == greenD)38 $(this).html(getImgTag(greenL));39 if (match == yellowD)40 $(this).html(getImgTag(yellowL));41 }42 });43};44function handleValueRRE_circle() {45 $(".ValueRRE_circle").each(function () {46 var attr_rd = '#' + $(this).attr('RD');47 var attr_rn = '#' + $(this).attr('RN');48 var attr_err = '#' + $(this).attr('ERR');49 var combination = $(attr_rd).val() + $(attr_rn).val() + $(attr_err).val();50 var content;51 switch (combination) {52 case '000':53 content = getImgTag(yellowL);54 $(this).removeClass("blink").addClass("blink");55 break;56 case '010':57 content = getImgTag(greenL);58 $(this).removeClass("blink").addClass("blink");59 break;60 case '100':61 content = getImgTag(yellowL);62 $(this).removeClass("blink");63 break;64 case '110':65 content = getImgTag(greenL);66 $(this).removeClass("blink");67 break;68 default:69 content = getImgTag(redL);70 $(this).removeClass("blink").addClass("blink");71 break;72 }73 $(this).html(content);74 });75}76function handleValueRA_circle() {77 $(".ValueRA_circle").each(function () {78 var attr_rn = '#' + $(this).attr('RN');79 var attr_alr = '#' + $(this).attr('ALR');80 var combination = $(attr_rn).val() + $(attr_alr).val();81 var content;82 switch (combination) {83 case '00':84 content = getImgTag(yellowL);85 $(this).removeClass("blink");86 break;87 case '10':88 content = getImgTag(greenL);89 $(this).removeClass("blink");90 break;91 default:92 content = getImgTag(redL);93 $(this).removeClass("blink").addClass("blink");94 break;95 }96 $(this).html(content);97 });98}99function handleValueRAA() {100 $(".ValueRAA_circle").each(function () {101 var attr_r = '#' + $(this).attr('R');102 var attr_a = '#' + $(this).attr('A');103 var attr_alm = '#' + $(this).attr('ALM');104 var combination = $(attr_r).val() + $(attr_a).val() + $(attr_alm).val();105 var content;106 switch (combination) {107 case '000':108 content = getImgTag(grey);109 $(this).removeClass("blink");110 break;111 case '010':112 content = getImgTag(greenL);113 $(this).removeClass("blink").addClass("blink");114 break;115 case '011':116 content = getImgTag(redL);117 $(this).removeClass("blink").addClass("blink");118 break;119 case '100':120 content = getImgTag(yellowL);121 $(this).removeClass("blink");122 break;123 case '101':124 content = getImgTag(redL);125 $(this).removeClass("blink");126 break;127 case '110':128 content = getImgTag(greenL);129 $(this).removeClass("blink");130 break;131 default:132 content = getImgTag(white);133 $(this).removeClass("blink");134 break;135 }136 $(this).html(content);137 });138}139function handleValueRAA_2() {140 $(".ValueRAA_2").each(function () {141 var attr_r2 = '#' + $(this).attr('R2');142 var attr_a = '#' + $(this).attr('A');143 var attr_alm = '#' + $(this).attr('ALM');144 var combination = $(attr_r2).val() + $(attr_a).val() + $(attr_alm).val();145 var content;146 switch (combination) {147 case '000':148 content = getImgTag(grey);149 $(this).removeClass("blink");150 break;151 case '010':152 content = getImgTag(greenL);153 $(this).removeClass("blink").addClass("blink");154 break;155 case '100':156 content = getImgTag(yellowL);157 $(this).removeClass("blink");158 break;159 case '101':160 content = getImgTag(redL);161 $(this).removeClass("blink");162 break;163 case '110':164 content = getImgTag(greenL);165 $(this).removeClass("blink");166 break;167 case '111':168 content = getImgTag(white);169 $(this).removeClass("blink");170 break;171 default:172 content = getImgTag(redL);173 $(this).removeClass("blink").addClass("blink");174 break;175 }176 $(this).html(content);177 });178}179function handleValueRAB() {180 $(".ValueRAB").each(function () {181 var attr_r1 = '#' + $(this).attr('R1');182 var attr_a = '#' + $(this).attr('A');183 var attr_b = '#' + $(this).attr('B');184 var combination = $(attr_r1).val() + $(attr_a).val() + $(attr_b).val();185 var content;186 switch (combination) {187 case '000':188 content = getImgTag(grey);189 $(this).removeClass("blink");190 break;191 case '010':192 content = getImgTag(greenL);193 $(this).removeClass("blink").addClass("blink");194 break;195 case '100':196 content = getImgTag(yellowL);197 $(this).removeClass("blink");198 break;199 case '110':200 content = getImgTag(greenL);201 $(this).removeClass("blink");202 break;203 case '111':204 content = getImgTag(redL);205 $(this).removeClass("blink");206 break;207 default:208 content = getImgTag(redL);209 $(this).removeClass("blink").addClass("blink");210 break;211 }212 $(this).html(content);213 });214}215function handleValueAB() {216 $(".ValueAB").each(function () {217 var attr_a = '#' + $(this).attr('A');218 var attr_b = '#' + $(this).attr('B');219 var combination = $(attr_a).val() + $(attr_b).val();220 var content;221 switch (combination) {222 case '00':223 content = getImgTag(white);224 $(this).removeClass("blink");225 break;226 case '10':227 content = getImgTag(greenL);228 $(this).removeClass("blink");229 break;230 case '11':231 content = getImgTag(redL);232 $(this).removeClass('blink');233 break;234 default:235 content = getImgTag(redL);236 $(this).removeClass("blink").addClass("blink");237 break;238 }239 $(this).html(content);240 });241}242function handleValueA_1() {243 $(".ValueA_1").each(function () {244 var attr_a1 = '#' + $(this).attr('A1');245 var combination = $(attr_a1).val();246 var content;247 switch (combination) {248 case '0':249 content = getImgTag(grey);250 $(this).removeClass("blink");251 break;252 case '1':253 content = getImgTag(greenL);254 $(this).removeClass("blink");255 break;256 }257 $(this).html(content);258 });259}260function handleValueA_2() {261 $(".ValueA_2").each(function () {262 var attr_a2 = '#' + $(this).attr('A2');263 var combination = $(attr_a2).val();264 var content;265 switch (combination) {266 case '0':267 content = getImgTag(yellowL);268 $(this).removeClass("blink");269 break;270 case '1':271 content = getImgTag(greenL);272 $(this).removeClass("blink");273 break;274 }275 $(this).html(content);276 });277}278function handleValueA() {279 $(".ValueA").each(function () {280 var attr_a = '#' + $(this).attr('A');281 var combination = $(attr_a).val();282 var content;283 switch (combination) {284 case '0':285 content = getImgTag(white);286 $(this).removeClass("blink");287 break;288 case '1':289 content = getImgTag(greenL);290 $(this).removeClass("blink");291 break;292 }293 $(this).html(content);294 });295}296function handleValueW() {297 $(".ValueW").each(function () {298 var attr_r = '#' + $(this).attr('R');299 var attr_a = '#' + $(this).attr('A');300 var attr_alm = '#' + $(this).attr('ALM');301 var combination = $(attr_r).val() + $(attr_a).val() + $(attr_alm).val();302 var content;303 switch (combination) {304 case '000':305 content = getImgTag(grey);306 $(this).removeClass("blink");307 break;308 case '010':309 content = getImgTag(greenL);310 $(this).removeClass("blink").addClass("blink");311 break;312 case '011':313 content = getImgTag(blue);314 $(this).removeClass("blink");315 break;316 case '100':317 content = getImgTag(yellowL);318 $(this).removeClass("blink");319 break;320 case '110':321 content = getImgTag(greenL);322 $(this).removeClass("blink");323 break;324 case '111':325 content = getImgTag(yellowL);326 $(this).removeClass("blink").addClass("blink");327 break;328 default:329 content = getImgTag(redL);330 $(this).removeClass("blink");331 break;332 }333 $(this).html(content);334 });335}336function handleValueARA() {337 $(".ValueARA").each(function () {338 var attr_a = '#' + $(this).attr('A');339 var attr_r = '#' + $(this).attr('R');340 var attr_alm = '#' + $(this).attr('ALM');341 var combination = $(attr_a).val() + $(attr_r).val() + $(attr_alm).val();342 var content;343 switch (combination) {344 case '000':345 content = getImgTag(white);346 $(this).removeClass("blink");347 break;348 case '010':349 content = getImgTag(yellowL);350 $(this).removeClass("blink");351 break;352 case '100':353 content = getImgTag(greenL);354 $(this).removeClass("blink").addClass("blink");355 break;356 case '110':357 content = getImgTag(greenL);358 $(this).removeClass("blink");359 break;360 default:361 content = getImgTag(redL);362 $(this).removeClass("blink");363 break;364 }365 $(this).html(content);366 });367}368$(document).ready(function () {369 // 开关量1000ms一闪370 setInterval(blink, 500);371});372function SwitchingValueRender() {373 handleValueRRE_circle();374 handleValueRA_circle();375 handleValueRAA();376 handleValueRAA_2();377 handleValueRAB();378 handleValueAB();379 handleValueA_1();380 handleValueA_2();381 handleValueA();382 handleValueW();383 handleValueARA();...

Full Screen

Full Screen

animate.js

Source:animate.js Github

copy

Full Screen

1jQuery(document).ready(function($) {23 4 //animate effect 5 $(".e_flash").hover(6 function () {7 $(this).addClass("animated flash");8 },9 function () {10 $(this).removeClass("animated flash");11 }12 );13 $(".e_bounce").hover(14 function () {15 $(this).addClass("animated bounce");16 },17 function () {18 $(this).removeClass("animated bounce");19 }20 );21 22 $(".e_shake").hover(23 function () {24 $(this).addClass("animated shake");25 },26 function () {27 $(this).removeClass("animated shake");28 }29 );30 $(".e_tada").hover(31 function () {32 $(this).addClass("animated tada");33 },34 function () {35 $(this).removeClass("animated tada");36 }37 );38 $(".e_swing").hover(39 function () {40 $(this).addClass("animated swing");41 },42 function () {43 $(this).removeClass("animated swing");44 }45 );46 $(".e_wobble").hover(47 function () {48 $(this).addClass("animated wobble");49 },50 function () {51 $(this).removeClass("animated wobble");52 }53 );54 $(".e_wiggle").hover(55 function () {56 $(this).addClass("animated wiggle");57 },58 function () {59 $(this).removeClass("animated wiggle");60 }61 );62 $(".e_pulse").hover(63 function () {64 $(this).addClass("animated pulse");65 },66 function () {67 $(this).removeClass("animated pulse");68 }69 );70 71 72 $(".e_flip").hover(73 function () {74 $(this).addClass("animated flip");75 },76 function () {77 $(this).removeClass("animated flip");78 }79 );80 $(".e_flipInX").hover(81 function () {82 $(this).addClass("animated flipInX");83 },84 function () {85 $(this).removeClass("animated flipInX");86 }87 );88 $(".e_flipOutX").hover(89 function () {90 $(this).addClass("animated flipOutX");91 },92 function () {93 $(this).removeClass("animated flipOutX");94 }95 );96 $(".e_flipInY").hover(97 function () {98 $(this).addClass("animated flipInY");99 },100 function () {101 $(this).removeClass("animated flipInY");102 }103 );104 $(".e_flipOutY").hover(105 function () {106 $(this).addClass("animated flipOutY");107 },108 function () {109 $(this).removeClass("animated flipOutY");110 }111 ); 112 113 //Fading entrances114 $(".e_fadeIn").hover(115 function () {116 $(this).addClass("animated fadeIn");117 },118 function () {119 $(this).removeClass("animated fadeIn");120 }121 ); 122 $(".e_fadeInUp").hover(123 function () {124 $(this).addClass("animated fadeInUp");125 },126 function () {127 $(this).removeClass("animated fadeInUp");128 }129 ); 130 $(".e_fadeInDown").hover(131 function () {132 $(this).addClass("animated fadeInDown");133 },134 function () {135 $(this).removeClass("animated fadeInDown");136 }137 );138 $(".e_fadeInLeft").hover(139 function () {140 $(this).addClass("animated fadeInLeft");141 },142 function () {143 $(this).removeClass("animated fadeInLeft");144 }145 );146 $(".e_fadeInRight").hover(147 function () {148 $(this).addClass("animated fadeInRight");149 },150 function () {151 $(this).removeClass("animated fadeInRight");152 }153 ); 154 $(".e_fadeInUpBig").hover(155 function () {156 $(this).addClass("animated fadeInUpBig");157 },158 function () {159 $(this).removeClass("animated fadeInUpBig");160 }161 ); 162 $(".e_fadeInUpBig").hover(163 function () {164 $(this).addClass("animated fadeInUpBig");165 },166 function () {167 $(this).removeClass("animated fadeInUpBig");168 }169 ); 170 $(".e_fadeInDownBig").hover(171 function () {172 $(this).addClass("animated fadeInDownBig");173 },174 function () {175 $(this).removeClass("animated fadeInDownBig");176 }177 ); 178 $(".e_fadeInLeftBig").hover(179 function () {180 $(this).addClass("animated fadeInLeftBig");181 },182 function () {183 $(this).removeClass("animated fadeInLeftBig");184 }185 ); 186 $(".e_fadeInRightBig").hover(187 function () {188 $(this).addClass("animated fadeInRightBig");189 },190 function () {191 $(this).removeClass("animated fadeInRightBig");192 }193 ); 194 195 196 //Fading exits197 $(".e_fadeOut").hover(198 function () {199 $(this).addClass("animated fadeOut");200 },201 function () {202 $(this).removeClass("animated fadeOut");203 }204 ); 205 $(".e_fadeOutUp").hover(206 function () {207 $(this).addClass("animated fadeOutUp");208 },209 function () {210 $(this).removeClass("animated fadeOutUp");211 }212 ); 213 $(".e_fadeOutDown").hover(214 function () {215 $(this).addClass("animated fadeOutDown");216 },217 function () {218 $(this).removeClass("animated fadeOutDown");219 }220 ); 221 $(".e_fadeOutLeft").hover(222 function () {223 $(this).addClass("animated fadeOutLeft");224 },225 function () {226 $(this).removeClass("animated fadeOutLeft");227 }228 ); 229 $(".e_fadeOutRight").hover(230 function () {231 $(this).addClass("animated fadeOutRight");232 },233 function () {234 $(this).removeClass("animated fadeOutRight");235 }236 ); 237 $(".e_fadeOutUpBig").hover(238 function () {239 $(this).addClass("animated fadeOutUpBig");240 },241 function () {242 $(this).removeClass("animated fadeOutUpBig");243 }244 ); 245 $(".e_fadeOutDownBig").hover(246 function () {247 $(this).addClass("animated fadeOutDownBig");248 },249 function () {250 $(this).removeClass("animated fadeOutDownBig");251 }252 ); 253 $(".e_fadeOutLeftBig").hover(254 function () {255 $(this).addClass("animated fadeOutLeftBig");256 },257 function () {258 $(this).removeClass("animated fadeOutLeftBig");259 }260 ); 261 $(".e_fadeOutRightBig").hover(262 function () {263 $(this).addClass("animated fadeOutRightBig");264 },265 function () {266 $(this).removeClass("animated fadeOutRightBig");267 }268 ); 269 270 271 //Bouncing entrances272 $(".e_bounceIn").hover(273 function () {274 $(this).addClass("animated bounceIn");275 },276 function () {277 $(this).removeClass("animated bounceIn");278 }279 );280 $(".e_bounceInDown").hover(281 function () {282 $(this).addClass("animated bounceInDown");283 },284 function () {285 $(this).removeClass("animated bounceInDown");286 }287 );288 $(".e_bounceInUp").hover(289 function () {290 $(this).addClass("animated bounceInUp");291 },292 function () {293 $(this).removeClass("animated bounceInUp");294 }295 ); 296 $(".e_bounceInLeft").hover(297 function () {298 $(this).addClass("animated bounceInLeft");299 },300 function () {301 $(this).removeClass("animated bounceInLeft");302 }303 );304 $(".e_bounceInRight").hover(305 function () {306 $(this).addClass("animated bounceInRight");307 },308 function () {309 $(this).removeClass("animated bounceInRight");310 }311 );312 313 314 //Bouncing exits315 $(".e_bounceOut").hover(316 function () {317 $(this).addClass("animated bounceOut");318 },319 function () {320 $(this).removeClass("animated bounceOut");321 }322 );323 $(".e_bounceOutDown").hover(324 function () {325 $(this).addClass("animated bounceOutDown");326 },327 function () {328 $(this).removeClass("animated bounceOutDown");329 }330 );331 $(".e_bounceOutUp").hover(332 function () {333 $(this).addClass("animated bounceOutUp");334 },335 function () {336 $(this).removeClass("animated bounceOutUp");337 }338 ); 339 $(".e_bounceOutLeft").hover(340 function () {341 $(this).addClass("animated bounceOutLeft");342 },343 function () {344 $(this).removeClass("animated bounceOutLeft");345 }346 );347 $(".e_bounceOutRight").hover(348 function () {349 $(this).addClass("animated bounceOutRight");350 },351 function () {352 $(this).removeClass("animated bounceOutRight");353 }354 );355 356 357 //Rotating entrances 358 $(".e_rotateIn").hover(359 function () {360 $(this).addClass("animated rotateIn");361 },362 function () {363 $(this).removeClass("animated rotateIn");364 }365 );366 $(".e_rotateInDownLeft").hover(367 function () {368 $(this).addClass("animated rotateInDownLeft");369 },370 function () {371 $(this).removeClass("animated rotateInDownLeft");372 }373 );374 $(".e_rotateInDownRight").hover(375 function () {376 $(this).addClass("animated rotateInDownRight");377 },378 function () {379 $(this).removeClass("animated rotateInDownRight");380 }381 );382 $(".e_rotateInUpRight").hover(383 function () {384 $(this).addClass("animated rotateInUpRight");385 },386 function () {387 $(this).removeClass("animated rotateInUpRight");388 }389 );390 $(".e_rotateInUpLeft").hover(391 function () {392 $(this).addClass("animated rotateInUpLeft");393 },394 function () {395 $(this).removeClass("animated rotateInUpLeft");396 }397 );398 399 400 //Rotating exits401 $(".e_rotateOut").hover(402 function () {403 $(this).addClass("animated rotateOut");404 },405 function () {406 $(this).removeClass("animated rotateOut");407 }408 );409 $(".e_rotateOutDownLeft").hover(410 function () {411 $(this).addClass("animated rotateOutDownLeft");412 },413 function () {414 $(this).removeClass("animated rotateOutDownLeft");415 }416 );417 $(".e_rotateOutDownRight").hover(418 function () {419 $(this).addClass("animated rotateOutDownRight");420 },421 function () {422 $(this).removeClass("animated rotateOutDownRight");423 }424 ); 425 $(".e_rotateOutUpLeft").hover(426 function () {427 $(this).addClass("animated rotateOutUpLeft");428 },429 function () {430 $(this).removeClass("animated rotateOutUpLeft");431 }432 );433 $(".e_rotateOutUpRight").hover(434 function () {435 $(this).addClass("animated rotateOutUpRight");436 },437 function () {438 $(this).removeClass("animated rotateOutUpRight");439 }440 );441 442 443 //Lightspeed444 $(".e_lightSpeedIn").hover(445 function () {446 $(this).addClass("animated lightSpeedIn");447 },448 function () {449 $(this).removeClass("animated lightSpeedIn");450 }451 );452 $(".e_lightSpeedOut").hover(453 function () {454 $(this).addClass("animated lightSpeedOut");455 },456 function () {457 $(this).removeClass("animated lightSpeedOut");458 }459 );460 461 //specials462 $(".e_hinge").hover(463 function () {464 $(this).addClass("animated hinge");465 },466 function () {467 $(this).removeClass("animated hinge");468 }469 );470 $(".e_rollIn").hover(471 function () {472 $(this).addClass("animated rollIn");473 },474 function () {475 $(this).removeClass("animated rollIn");476 }477 ); 478 $(".e_rollOut").hover(479 function () {480 $(this).addClass("animated rollOut");481 },482 function () {483 $(this).removeClass("animated rollOut");484 }485 );486487488 ...

Full Screen

Full Screen

humane.js

Source:humane.js Github

copy

Full Screen

...69 this.el = el70 this.removeEvent = ENV.bind(function(){71 var timeoutAfterMove = ENV.config(this.currentMsg.timeoutAfterMove,this.timeoutAfterMove)72 if (!timeoutAfterMove){73 this.remove()74 } else {75 setTimeout(ENV.bind(this.remove,this),timeoutAfterMove)76 }77 },this)78 this.transEvent = ENV.bind(this._afterAnimation,this)79 this._run()80 },81 _afterTimeout: function () {82 if (!ENV.config(this.currentMsg.waitForMove,this.waitForMove)) this.remove()83 else if (!this.removeEventsSet) {84 ENV.on(doc.body,'mousemove',this.removeEvent)85 ENV.on(doc.body,'click',this.removeEvent)86 ENV.on(doc.body,'keypress',this.removeEvent)87 ENV.on(doc.body,'touchstart',this.removeEvent)88 this.removeEventsSet = true89 }90 },91 _run: function () {92 if (this._animating || !this.queue.length || !this.el) return93 this._animating = true94 if (this.currentTimer) {95 clearTimeout(this.currentTimer)96 this.currentTimer = null...

Full Screen

Full Screen

Selector.js

Source:Selector.js Github

copy

Full Screen

1/*2 Copyright (c) 2004-2011, The Dojo Foundation All Rights Reserved.3 Available via Academic Free License >= 2.1 OR the modified BSD license.4 see: http://dojotoolkit.org/license for details5*/6//>>built7define("dojo/dnd/Selector",["../_base/array","../_base/declare","../_base/kernel","../_base/lang","../dom","../dom-construct","../mouse","../_base/NodeList","../on","../touch","./common","./Container"],function(_1,_2,_3,_4,_5,_6,_7,_8,on,_9,_a,_b){8var _c=_2("dojo.dnd.Selector",_b,{constructor:function(_d,_e){9if(!_e){10_e={};11}12this.singular=_e.singular;13this.autoSync=_e.autoSync;14this.selection={};15this.anchor=null;16this.simpleSelection=false;17this.events.push(on(this.node,_9.press,_4.hitch(this,"onMouseDown")),on(this.node,_9.release,_4.hitch(this,"onMouseUp")));18},singular:false,getSelectedNodes:function(){19var t=new _8();20var e=_a._empty;21for(var i in this.selection){22if(i in e){23continue;24}25t.push(_5.byId(i));26}27return t;28},selectNone:function(){29return this._removeSelection()._removeAnchor();30},selectAll:function(){31this.forInItems(function(_f,id){32this._addItemClass(_5.byId(id),"Selected");33this.selection[id]=1;34},this);35return this._removeAnchor();36},deleteSelectedNodes:function(){37var e=_a._empty;38for(var i in this.selection){39if(i in e){40continue;41}42var n=_5.byId(i);43this.delItem(i);44_6.destroy(n);45}46this.anchor=null;47this.selection={};48return this;49},forInSelectedItems:function(f,o){50o=o||_3.global;51var s=this.selection,e=_a._empty;52for(var i in s){53if(i in e){54continue;55}56f.call(o,this.getItem(i),i,this);57}58},sync:function(){59_c.superclass.sync.call(this);60if(this.anchor){61if(!this.getItem(this.anchor.id)){62this.anchor=null;63}64}65var t=[],e=_a._empty;66for(var i in this.selection){67if(i in e){68continue;69}70if(!this.getItem(i)){71t.push(i);72}73}74_1.forEach(t,function(i){75delete this.selection[i];76},this);77return this;78},insertNodes:function(_10,_11,_12,_13){79var _14=this._normalizedCreator;80this._normalizedCreator=function(_15,_16){81var t=_14.call(this,_15,_16);82if(_10){83if(!this.anchor){84this.anchor=t.node;85this._removeItemClass(t.node,"Selected");86this._addItemClass(this.anchor,"Anchor");87}else{88if(this.anchor!=t.node){89this._removeItemClass(t.node,"Anchor");90this._addItemClass(t.node,"Selected");91}92}93this.selection[t.node.id]=1;94}else{95this._removeItemClass(t.node,"Selected");96this._removeItemClass(t.node,"Anchor");97}98return t;99};100_c.superclass.insertNodes.call(this,_11,_12,_13);101this._normalizedCreator=_14;102return this;103},destroy:function(){104_c.superclass.destroy.call(this);105this.selection=this.anchor=null;106},onMouseDown:function(e){107if(this.autoSync){108this.sync();109}110if(!this.current){111return;112}113if(!this.singular&&!_a.getCopyKeyState(e)&&!e.shiftKey&&(this.current.id in this.selection)){114this.simpleSelection=true;115if(_7.isLeft(e)){116e.stopPropagation();117e.preventDefault();118}119return;120}121if(!this.singular&&e.shiftKey){122if(!_a.getCopyKeyState(e)){123this._removeSelection();124}125var c=this.getAllNodes();126if(c.length){127if(!this.anchor){128this.anchor=c[0];129this._addItemClass(this.anchor,"Anchor");130}131this.selection[this.anchor.id]=1;132if(this.anchor!=this.current){133var i=0,_17;134for(;i<c.length;++i){135_17=c[i];136if(_17==this.anchor||_17==this.current){137break;138}139}140for(++i;i<c.length;++i){141_17=c[i];142if(_17==this.anchor||_17==this.current){143break;144}145this._addItemClass(_17,"Selected");146this.selection[_17.id]=1;147}148this._addItemClass(this.current,"Selected");149this.selection[this.current.id]=1;150}151}152}else{153if(this.singular){154if(this.anchor==this.current){155if(_a.getCopyKeyState(e)){156this.selectNone();157}158}else{159this.selectNone();160this.anchor=this.current;161this._addItemClass(this.anchor,"Anchor");162this.selection[this.current.id]=1;163}164}else{165if(_a.getCopyKeyState(e)){166if(this.anchor==this.current){167delete this.selection[this.anchor.id];168this._removeAnchor();169}else{170if(this.current.id in this.selection){171this._removeItemClass(this.current,"Selected");172delete this.selection[this.current.id];173}else{174if(this.anchor){175this._removeItemClass(this.anchor,"Anchor");176this._addItemClass(this.anchor,"Selected");177}178this.anchor=this.current;179this._addItemClass(this.current,"Anchor");180this.selection[this.current.id]=1;181}182}183}else{184if(!(this.current.id in this.selection)){185this.selectNone();186this.anchor=this.current;187this._addItemClass(this.current,"Anchor");188this.selection[this.current.id]=1;189}190}191}192}193e.stopPropagation();194e.preventDefault();195},onMouseUp:function(){196if(!this.simpleSelection){197return;198}199this.simpleSelection=false;200this.selectNone();201if(this.current){202this.anchor=this.current;203this._addItemClass(this.anchor,"Anchor");204this.selection[this.current.id]=1;205}206},onMouseMove:function(){207this.simpleSelection=false;208},onOverEvent:function(){209this.onmousemoveEvent=on(this.node,_9.move,_4.hitch(this,"onMouseMove"));210},onOutEvent:function(){211if(this.onmousemoveEvent){212this.onmousemoveEvent.remove();213delete this.onmousemoveEvent;214}215},_removeSelection:function(){216var e=_a._empty;217for(var i in this.selection){218if(i in e){219continue;220}221var _18=_5.byId(i);222if(_18){223this._removeItemClass(_18,"Selected");224}225}226this.selection={};227return this;228},_removeAnchor:function(){229if(this.anchor){230this._removeItemClass(this.anchor,"Anchor");231this.anchor=null;232}233return this;234}});235return _c;...

Full Screen

Full Screen

register.js

Source:register.js Github

copy

Full Screen

1$(function() {2 /*顶部下拉菜单显示隐藏*/3 (function() {4 $('#biz-service').hover(function() {5 $(this).addClass('hover');6 }, function() {7 $(this).removeClass('hover');8 });9 $('#site-nav').hover(function() {10 $(this).addClass('hover');11 }, function() {12 $(this).removeClass('hover');13 });14 })();15 /*用户名验证*/16 (function() {17 $('#regName').focus(function() {18 $(this).removeClass('highlight2').addClass('highlight1');19 $('#regName_succeed').removeClass('succeed');20 $('#regName_error').removeClass('error').addClass('focus').html('4-20位字符,支持汉字、字母、数字及"-"、"_"组合');21 }).blur(function() {22 if ($(this).val().length >= 4 && $(this).val().length <= 20) {23 $.ajax({24 url: 'findname.html',25 type: 'GET',26 data: 'username=' + $('#regName').val(),27 success: function(data) {28 if (data == 'true') {29 $('#regName').removeClass('highlight1');30 $('#regName_succeed').addClass('succeed');31 $('#regName_error').removeClass('focus').html('');32 $('#registsubmit').attr('disabled', false);33 } else {34 $('#regName').removeClass('highlight1').addClass('highlight2');35 $('#regName_succeed').removeClass('succeed');36 $('#regName_error').removeClass('focus').addClass('error').html('该用户名已被使用,请重新输入。');37 $('#registsubmit').attr('disabled', true);38 }39 }40 });41 } else if ($(this).val() == '') {42 $(this).removeClass('highlight1');43 $('#regName_error').removeClass('focus').html('');44 $('#registsubmit').attr('disabled', true);45 } else {46 $(this).removeClass('highlight1').addClass('highlight2');47 $('#regName_succeed').removeClass('succeed');48 $('#regName_error').removeClass('focus').addClass('error').html('用户名长度只能在4-20位字符之间');49 $('#registsubmit').attr('disabled', true);50 }51 });52 })();53 $('#pwd').focus(function() {54 $(this).removeClass('highlight2').addClass('highlight1');55 $('#pwd_succeed').removeClass('succeed');56 $('#pwd_error').removeClass('error').addClass('focus').html('<span>6-20位字符,建议由字母,数字和符号两种以上组合组合</span>');57 }).blur(function() {58 if ($(this).val().length >= 6 && $(this).val().length <= 20) {59 $('#pwd').removeClass('highlight1');60 $('#pwd_succeed').addClass('succeed');61 $('#pwd_error').removeClass('focus').html('');62 $('#registsubmit').attr('disabled', false);63 } else if ($(this).val() == '') {64 $(this).removeClass('highlight1');65 $('#pwd_error').removeClass('focus').html('');66 $('#registsubmit').attr('disabled', true);67 } else {68 $(this).removeClass('highlight1').addClass('highlight2');69 $('#pwd_succeed').removeClass('succeed');70 $('#pwd_error').removeClass('focus').addClass('error').html('密码长度只能在6-20位字符之间');71 $('#registsubmit').attr('disabled', true);72 }73 });74 $('#pwdRepeat').focus(function() {75 $(this).removeClass('highlight2').addClass('highlight1');76 $('#pwdRepeat_succeed').removeClass('succeed');77 $('#pwdRepeat_error').removeClass('error').addClass('focus').html('请再次输入密码');78 }).blur(function() {79 if ($(this).val().length >= 6 && $(this).val().length <= 20) {80 if ($(this).val() == $('#pwd').val()) {81 $('#pwdRepeat').removeClass('highlight1');82 $('#pwdRepeat_succeed').addClass('succeed');83 $('#pwdRepeat_error').removeClass('focus').html('');84 $('#registsubmit').attr('disabled', false);85 } else {86 $(this).removeClass('highlight1').addClass('highlight2');87 $('#pwdRepeat_succeed').removeClass('succeed');88 $('#pwdRepeat_error').removeClass('focus').addClass('error').html('两次输入密码不一致');89 $('#registsubmit').attr('disabled', true);90 }91 } else if ($(this).val() == '') {92 $(this).removeClass('highlight1');93 $('#pwdRepeat_error').removeClass('focus').html('');94 $('#registsubmit').attr('disabled', true);95 } else {96 $(this).removeClass('highlight1').addClass('highlight2');97 $('#pwdRepeat_succeed').removeClass('succeed');98 $('#pwdRepeat_error').removeClass('focus').addClass('error').html('密码长度只能在6-20位字符之间');99 $('#registsubmit').attr('disabled', true);100 }101 });102 $('#phone').focus(function() {103 $(this).removeClass('highlight2').addClass('highlight1');104 $('#phone_error').addClass('focus').html('完成验证后,你可以用该手机号登录和找回密码');105 }).blur(function() {106 $(this).removeClass('highlight1');107 $('#phone_error').removeClass('focus').html('');108 });109 $('#mobileCode').focus(function() {110 $(this).addClass('highlight1');111 }).blur(function() {112 $(this).removeClass('highlight1');113 });...

Full Screen

Full Screen

scripts.js

Source:scripts.js Github

copy

Full Screen

1$(function () {2 // Mobile navigation.3 $('.js-menu-trigger').click(function (event) {4 event.preventDefault();5 $('.b-main-menu').toggleClass('m-active');6 });7 // News clips.8 if ($('.js-news-wrapper a').length > 1) {9 $('.js-news-wrapper a:gt(0)').hide();10 setInterval(function () {11 $('.js-news-wrapper a:first').fadeOut(1000, function () {12 $(this).next().fadeIn(1000).end().appendTo('.js-news-wrapper');13 });14 }, 6000);15 }16 // Background images.17 /*18 setInterval(function () {19 var current = $('.e-bg.m-visible')20 , next = current.is(':last-child') ? $('.e-bg:first-child') : current.next();21 next.addClass('m-visible');22 current.removeClass('m-visible');23 }, 6500);24 */25 // Products slider.26 // @see http://unslider.com/27 var slider = $('.b-slider');28 if (slider.unslider) {29 var sliderData = slider.data('unslider');30 slider.unslider({31 animateHeight:true,32 arrows: false,33 autoplay: true,34 delay: 6000,35 dots: true,36 fluid:true,37 keys: false,38 activeClass: 'active'39 });40 // Resize slider on window resize41 $( window ).resize(function() {42 var active_slide_height = slider.find('li.active').outerHeight();43 slider.height(active_slide_height);44 });45 }46 // Smooth scrolling.47 var nav = $('nav');48 if (nav.localScroll) {49 nav.localScroll({50 hash: true51 });52 }53 // equalize elements54 function equalize(){55 if (document.body.clientWidth >= 641) {56 var maxHeight = 0;57 $("#products-columns .col-header").each(function(){58 $(this).removeAttr("style");59 });60 $("#products-columns .col-header").each(function(){61 if ($(this).height() > maxHeight) { maxHeight = $(this).height(); }62 });63 $("#products-columns .col-header").each(function(){64 $(this).height(maxHeight);65 });66 var maxHeight2 = 0;67 $("#products-columns .col-content").each(function(){68 $(this).removeAttr("style");69 });70 $("#products-columns .col-content").each(function(){71 if ($(this).height() > maxHeight2) { maxHeight2 = $(this).height(); }72 });73 $("#products-columns .col-content").each(function(){74 $(this).height(maxHeight2);75 });76 }77 else{78 $("#products-columns .col-header").each(function(){79 $(this).removeAttr("style");80 });81 $("#products-columns .col-content").each(function(){82 $(this).removeAttr("style");83 });84 }85 if (document.body.clientWidth > 1025) {86 var maxHeight = 0;87 $("#services-columns .col-header").each(function(){88 $(this).removeAttr("style");89 });90 $("#services-columns .col-header").each(function(){91 if ($(this).height() > maxHeight) { maxHeight = $(this).height(); }92 });93 $("#services-columns .col-header").each(function(){94 $(this).height(maxHeight);95 });96 var maxHeight2 = 0;97 $("#services-columns .col-content").each(function(){98 $(this).removeAttr("style");99 });100 $("#services-columns .col-content").each(function(){101 if ($(this).height() > maxHeight2) { maxHeight2 = $(this).height(); }102 });103 $("#services-columns .col-content").each(function(){104 $(this).height(maxHeight2);105 });106 }107 else{108 $("#services-columns .col-header").each(function(){109 $(this).removeAttr("style");110 });111 $("#services-columns .col-content").each(function(){112 $(this).removeAttr("style");113 });114 }115 }116 $(document).ready(function(){117 window.setTimeout(equalize, 100);118 });119 window.addEventListener("resize", equalize);...

Full Screen

Full Screen

navigation.js

Source:navigation.js Github

copy

Full Screen

1$( document ).ready(function() {2 // Gestion du menu sur petits écrans3 $( 'body' ).on('click', '#navigation-button.inactive', function(e) {4 $( '#navigation-button' ).removeClass( 'inactive' );5 $( '#navigation-button' ).addClass( 'active' );6 $( '#navigation-button-container' ).addClass( 'active' );7 $( '#mobile-navigation' ).addClass( 'active' );8 $( 'body' ).append( '<div id="mobile-navigation-overlay" class="mobile-navigation-overlay"></div>' );9 $( '#mobile-navigation-overlay' ).css({'filter' : 'alpha(opacity=50)'}).fadeIn(100);10 });11 $( 'body' ).on('click', '#navigation-button.active, #mobile-navigation-overlay', function(e) {12 $( '#navigation-button' ).removeClass( 'active' );13 $( '#navigation-button' ).addClass( 'inactive' );14 $( '#navigation-button-container' ).removeClass( 'active' );15 $( '#mobile-navigation' ).removeClass( 'active' );16 $( '#mobile-navigation-overlay' ).fadeOut(100, function() {17 $( '#mobile-navigation-overlay' ).remove();18 });19 });20 $( 'body' ).on('click', '#mobile-navigation > li.inactive', function(e) {21 $( '#mobile-navigation > li' ).removeClass( 'active' );22 $( '#mobile-navigation > li' ).addClass( 'inactive' );23 $( this ).removeClass( 'inactive' );24 $( this ).addClass( 'active' );25 $( '#mobile-navigation ul' ).removeClass( 'active' );26 $( this ).children('ul').addClass( 'active' );27 });28 $( 'body' ).on('click', '#mobile-navigation > li.active', function(e) {29 $( this ).removeClass( 'active' );30 $( this ).addClass( 'inactive' );31 $( '#mobile-navigation ul' ).removeClass( 'active' );32 });33 // Gestion du menu sur grands écrans34 $( '#desktop-navigation .first-level ul li a' ).click(function(event) {35 if(!$( this ).parent().hasClass('home'))36 {37 event.preventDefault();38 if( $(this).hasClass('active'))39 {40 // On cache le menu41 $( '.container' ).removeClass( 'navigation-opened' );42 $( '#desktop-navigation .second-level' ).each(function() {43 $( this ).removeClass( 'navigation-open' );44 });45 $( '#desktop-navigation .first-level ul li a' ).each(function() {46 $( this ).removeClass( 'active' );47 $( this ).removeClass( 'opened' );48 });49 }50 else {51 $( '#desktop-navigation .first-level ul li a' ).each(function() {52 $( this ).removeClass( 'active' );53 $( this ).addClass( 'opened' );54 });55 $( this ).addClass( 'active' );56 var page = $( this ).parent().attr( 'class' );57 // console.log(page);58 $( '#desktop-navigation .second-level' ).each(function() {59 $( this ).removeClass( 'navigation-open' );60 if ($( this ).hasClass( page )) 61 {62 $( this ).addClass( 'navigation-open' );63 }64 });65 $( '.container' ).addClass( 'navigation-opened' );66 }67 }68 });69 $(document).on('click', function(event) {70 // Si le clic est en dehors du menu, ou sur le lien actif71 if (!$(event.target).closest('#desktop-navigation').length) {72 // On cache le menu73 $( '.container' ).removeClass( 'navigation-opened' );74 $( '#desktop-navigation .second-level' ).each(function() {75 $( this ).removeClass( 'navigation-open' );76 });77 $( '#desktop-navigation .first-level ul li a' ).each(function() {78 $( this ).removeClass( 'active' );79 $( this ).removeClass( 'opened' );80 });81 }82 });...

Full Screen

Full Screen

Using AI Code Generation

copy

Full Screen

1const wd = require('wd');2const chai = require('chai');3const chaiAsPromised = require('chai-as-promised');4chai.use(chaiAsPromised);5const should = chai.should();6const expect = chai.expect;7const assert = chai.assert;8const caps = {9};10describe('XCUITestDriver - Remove Element', function () {11 this.timeout(300000);12 before(async () => {13 await driver.init(caps);14 });15 after(async () => {16 await driver.quit();17 });18 it('should remove an element from the view hierarchy', async () => {19 await driver.elementByAccessibilityId('Buttons').click();

Full Screen

Using AI Code Generation

copy

Full Screen

1const { remote } = require('webdriverio');2(async () => {3 const browser = await remote({4 capabilities: {5 }6 })7 await browser.removeApp('com.myapp');8 await browser.deleteSession();9})().catch((e) => console.error(e))10const { remote } = require('webdriverio');11(async () => {12 const browser = await remote({13 capabilities: {14 }15 })16 await browser.removeApp('com.myapp');17 await browser.deleteSession();18})().catch((e) => console.error(e))19const { remote } = require('webdriverio');20(async () => {21 const browser = await remote({22 capabilities: {

Full Screen

Using AI Code Generation

copy

Full Screen

1var wd = require('wd');2var assert = require('assert');3var desired = require('./desired');4 .init(desired)5 .elementByAccessibilityId('Alert Views').click()6 .elementByAccessibilityId('Text Entry').click()7 .elementByClassName('XCUIElementTypeTextField').sendKeys('hello world')8 .elementByClassName('XCUIElementTypeTextField').clear()9 .elementByClassName('XCUIElementTypeTextField').sendKeys('hello world')10 .remove()11 .nodeify(function(err) {12 assert.ok(err);13 assert.equal(err.message, 'The element has been removed from the DOM');14 console.log(err);15 });16module.exports = {17};

Full Screen

Using AI Code Generation

copy

Full Screen

1this.remove = function (elementId) {2 return this.proxyCommand(`/element/${elementId}/value`, 'DELETE');3};4this.remove = function (elementId) {5 return this.proxyCommand(`/element/${elementId}/value`, 'DELETE');6};7this.remove = function (elementId) {8 return this.proxyCommand(`/element/${elementId}/value`, 'DELETE');9};10this.remove = function (elementId) {11 return this.proxyCommand(`/element/${elementId}/value`, 'DELETE');12};13this.remove = function (elementId) {14 return this.proxyCommand(`/element/${elementId}/value`, 'DELETE');15};16this.remove = function (elementId) {17 return this.proxyCommand(`/element/${elementId}/value`, 'DELETE');18};19this.remove = function (elementId) {20 return this.proxyCommand(`/element/${elementId}/value`, 'DELETE');21};22this.remove = function (elementId) {23 return this.proxyCommand(`/element/${elementId}/value`, 'DELETE');24};25this.remove = function (elementId) {26 return this.proxyCommand(`/element/${elementId}/value`, 'DELETE');27};28this.remove = function (elementId) {29 return this.proxyCommand(`/element/${elementId}/value`, 'DELETE');30};31this.remove = function (elementId) {32 return this.proxyCommand(`/element/${elementId}/value`, 'DELETE');33};34this.remove = function (elementId) {35 return this.proxyCommand(`/element/${elementId}/value`, 'DELETE');36};

Full Screen

Using AI Code Generation

copy

Full Screen

1var fs = require('fs');2var webdriverio = require('webdriverio');3var opts = {4 desiredCapabilities: {5 },6};7var client = webdriverio.remote(opts);8 .init()9 .then(function() {10 return client.remove('/var/mobile/Containers/Data/Application/6D9D6F0C-6F8E-4D4A-8F0A-6F8F1A4E4F4F/Documents/test.txt');11 })12 .then(function() {13 return client.end();14 })15 .catch(function(err) {16 console.log(err);17 });

Full Screen

Using AI Code Generation

copy

Full Screen

1it('should remove an element', async function () {2 let el = await this.driver.findElement("accessibility id", "Buttons");3 await this.driver.remove(el);4});5it('should remove an element', async function () {6 let el = await this.driver.findElement("accessibility id", "Buttons");7 await this.driver.remove(el);8});9it('should remove an element', async function () {10 let el = await this.driver.findElement("accessibility id", "Buttons");11 await this.driver.remove(el);12});13it('should remove an element', async function () {14 let el = await this.driver.findElement("accessibility id", "Buttons");15 await this.driver.remove(el);16});17it('should remove an element', async function () {18 let el = await this.driver.findElement("accessibility id", "Buttons");19 await this.driver.remove(el);20});21it('should remove an element', async function () {22 let el = await this.driver.findElement("accessibility id", "Buttons");23 await this.driver.remove(el);24});25it('should remove an element', async function () {26 let el = await this.driver.findElement("accessibility id", "Buttons");27 await this.driver.remove(el);28});29it('should remove an element', async function () {30 let el = await this.driver.findElement("accessibility id", "Buttons");31 await this.driver.remove(el);32});33it('should remove an element', async function () {34 let el = await this.driver.findElement("accessibility id", "Buttons");35 await this.driver.remove(el);36});37it('should remove an element', async function () {38 let el = await this.driver.findElement("accessibility id", "Buttons");39 await this.driver.remove(el);40});41it('should remove an element', async

Full Screen

Using AI Code Generation

copy

Full Screen

1const wdio = require('webdriverio');2const opts = {3 capabilities: {4 }5};6async function main() {7 const client = await wdio.remote(opts);8 const el = await client.$('~Buttons');9 await el.click();10 const removeBtn = await client.$('~Remove');11 await removeBtn.click();12 const removeBtn2 = await client.$('~Remove');13 await removeBtn2.click();14 const removeBtn3 = await client.$('~Remove');15 await removeBtn3.click();16 const removeBtn4 = await client.$('~Remove');17 await removeBtn4.click();18 const removeBtn5 = await client.$('~Remove');19 await removeBtn5.click();20 const removeBtn6 = await client.$('~Remove');21 await removeBtn6.click();22 const removeBtn7 = await client.$('~Remove');23 await removeBtn7.click();24 const removeBtn8 = await client.$('~Remove');25 await removeBtn8.click();26 const removeBtn9 = await client.$('~Remove');27 await removeBtn9.click();28 const removeBtn10 = await client.$('~Remove');29 await removeBtn10.click();30 const removeBtn11 = await client.$('~Remove');31 await removeBtn11.click();32 const removeBtn12 = await client.$('~Remove');33 await removeBtn12.click();34 const removeBtn13 = await client.$('~Remove');35 await removeBtn13.click();36 const removeBtn14 = await client.$('~Remove');37 await removeBtn14.click();38 const removeBtn15 = await client.$('~Remove');39 await removeBtn15.click();40 const removeBtn16 = await client.$('~Remove');41 await removeBtn16.click();42 const removeBtn17 = await client.$('~Remove');43 await removeBtn17.click();

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run Appium Xcuitest Driver automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Sign up Free
_

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful