How to use this.stop method in Appium Xcuitest Driver

Best JavaScript code snippet using appium-xcuitest-driver

dataView.js

Source:dataView.js Github

copy

Full Screen

1/**2 * echarts组件:提示框3 *4 * @desc echarts基于Canvas,纯Javascript图表库,提供直观,生动,可交互,可个性化定制的数据统计图表。5 * @author Kener (@Kener-林峰, kener.linfeng@gmail.com)6 *7 */8define(function (require) {9 var Base = require('./base');10 var ecConfig = require('../config');11 var zrUtil = require('zrender/tool/util');12 13 /**14 * 构造函数15 * @param {Object} messageCenter echart消息中心16 * @param {ZRender} zr zrender实例17 * @param {Object} option 提示框参数18 * @param {HtmlElement} dom 目标对象19 */20 function DataView(ecTheme, messageCenter, zr, option, myChart) {21 Base.call(this, ecTheme, messageCenter, zr, option, myChart);22 this.dom = myChart.dom;23 24 // dataview dom & css25 this._tDom = document.createElement('div');26 this._textArea = document.createElement('textArea');27 this._buttonRefresh = document.createElement('button');28 this._buttonClose = document.createElement('button');29 this._hasShow = false;30 // 缓存一些高宽数据31 this._zrHeight = zr.getHeight();32 this._zrWidth = zr.getWidth();33 34 this._tDom.className = 'echarts-dataview';35 this.hide();36 this.dom.firstChild.appendChild(this._tDom);37 if (window.addEventListener) {38 this._tDom.addEventListener('click', this._stop);39 this._tDom.addEventListener('mousewheel', this._stop);40 this._tDom.addEventListener('mousemove', this._stop);41 this._tDom.addEventListener('mousedown', this._stop);42 this._tDom.addEventListener('mouseup', this._stop);43 // mobile支持44 this._tDom.addEventListener('touchstart', this._stop);45 this._tDom.addEventListener('touchmove', this._stop);46 this._tDom.addEventListener('touchend', this._stop);47 }48 else {49 this._tDom.attachEvent('onclick', this._stop);50 this._tDom.attachEvent('onmousewheel', this._stop);51 this._tDom.attachEvent('onmousemove', this._stop);52 this._tDom.attachEvent('onmousedown', this._stop);53 this._tDom.attachEvent('onmouseup', this._stop);54 }55 }56 57 DataView.prototype = {58 type : ecConfig.COMPONENT_TYPE_DATAVIEW,59 _lang : ['Data View', 'close', 'refresh'],60 // 通用样式61 _gCssText : 'position:absolute;'62 + 'display:block;'63 + 'overflow:hidden;'64 + 'transition:height 0.8s,background-color 1s;'65 + '-moz-transition:height 0.8s,background-color 1s;'66 + '-webkit-transition:height 0.8s,background-color 1s;'67 + '-o-transition:height 0.8s,background-color 1s;'68 + 'z-index:1;'69 + 'left:0;'70 + 'top:0;',71 hide : function () {72 this._sizeCssText = 'width:' + this._zrWidth + 'px;'73 + 'height:' + 0 + 'px;'74 + 'background-color:#f0ffff;';75 this._tDom.style.cssText = this._gCssText + this._sizeCssText;76 // 这是个很恶心的事情77 /*78 this.dom.onselectstart = function () {79 return false;80 };81 */82 },83 show : function (newOption) {84 this._hasShow = true;85 var lang = this.query(this.option, 'toolbox.feature.dataView.lang')86 || this._lang;87 this.option = newOption;88 this._tDom.innerHTML = '<p style="padding:8px 0;margin:0 0 10px 0;'89 + 'border-bottom:1px solid #eee">'90 + (lang[0] || this._lang[0])91 + '</p>';92 var customContent = this.query(93 this.option, 'toolbox.feature.dataView.optionToContent'94 );95 if (typeof customContent != 'function') {96 this._textArea.value = this._optionToContent();97 }98 else {99 // innerHTML the custom optionToContent;100 this._textArea = document.createElement('div');101 this._textArea.innerHTML = customContent(this.option);102 }103 this._textArea.style.cssText =104 'display:block;margin:0 0 8px 0;padding:4px 6px;overflow:auto;'105 + 'width:100%;'106 + 'height:' + (this._zrHeight - 100) + 'px;';107 this._tDom.appendChild(this._textArea);108 this._buttonClose.style.cssText = 'float:right;padding:1px 6px;';109 this._buttonClose.innerHTML = lang[1] || this._lang[1];110 var self = this;111 this._buttonClose.onclick = function (){112 self.hide();113 };114 this._tDom.appendChild(this._buttonClose);115 if (this.query(this.option, 'toolbox.feature.dataView.readOnly')116 === false117 ) {118 this._buttonRefresh.style.cssText =119 'float:right;margin-right:10px;padding:1px 6px;';120 this._buttonRefresh.innerHTML = lang[2] || this._lang[2];121 this._buttonRefresh.onclick = function (){122 self._save();123 };124 this._textArea.readOnly = false;125 this._textArea.style.cursor = 'default';126 }127 else {128 this._buttonRefresh.style.cssText =129 'display:none';130 this._textArea.readOnly = true;131 this._textArea.style.cursor = 'text';132 }133 this._tDom.appendChild(this._buttonRefresh);134 this._sizeCssText = 'width:' + this._zrWidth + 'px;'135 + 'height:' + this._zrHeight + 'px;'136 + 'background-color:#fff;';137 this._tDom.style.cssText = this._gCssText + this._sizeCssText;138 // 这是个很恶心的事情139 /*140 this.dom.onselectstart = function () {141 return true;142 };143 */144 },145 _optionToContent : function () {146 var i;147 var j;148 var k;149 var len;150 var data;151 var valueList;152 var axisList = [];153 var content = '';154 if (this.option.xAxis) {155 if (this.option.xAxis instanceof Array) {156 axisList = this.option.xAxis;157 } else {158 axisList = [this.option.xAxis];159 }160 for (i = 0, len = axisList.length; i < len; i++) {161 // 横纵默认为类目162 if ((axisList[i].type || 'category') == 'category') {163 valueList = [];164 for (j = 0, k = axisList[i].data.length; j < k; j++) {165 valueList.push(this.getDataFromOption(axisList[i].data[j]));166 }167 content += valueList.join(', ') + '\n\n';168 }169 }170 }171 if (this.option.yAxis) {172 if (this.option.yAxis instanceof Array) {173 axisList = this.option.yAxis;174 } else {175 axisList = [this.option.yAxis];176 }177 for (i = 0, len = axisList.length; i < len; i++) {178 if (axisList[i].type == 'category') {179 valueList = [];180 for (j = 0, k = axisList[i].data.length; j < k; j++) {181 valueList.push(this.getDataFromOption(axisList[i].data[j]));182 }183 content += valueList.join(', ') + '\n\n';184 }185 }186 }187 var series = this.option.series;188 var itemName;189 for (i = 0, len = series.length; i < len; i++) {190 valueList = [];191 for (j = 0, k = series[i].data.length; j < k; j++) {192 data = series[i].data[j];193 if (series[i].type == ecConfig.CHART_TYPE_PIE194 || series[i].type == ecConfig.CHART_TYPE_MAP195 ) {196 itemName = (data.name || '-') + ':';197 }198 else {199 itemName = '';200 }201 202 if (series[i].type == ecConfig.CHART_TYPE_SCATTER) {203 data = this.getDataFromOption(data).join(', ');204 }205 valueList.push(itemName + this.getDataFromOption(data));206 }207 content += (series[i].name || '-') + ' : \n';208 content += valueList.join(209 series[i].type == ecConfig.CHART_TYPE_SCATTER ? '\n': ', '210 );211 content += '\n\n';212 }213 return content;214 },215 _save : function () {216 var customContent = this.query(217 this.option, 'toolbox.feature.dataView.contentToOption'218 );219 if (typeof customContent != 'function') {220 var text = this._textArea.value.split('\n');221 var content = [];222 for (var i = 0, l = text.length; i < l; i++) {223 text[i] = this._trim(text[i]);224 if (text[i] !== '') {225 content.push(text[i]);226 }227 }228 this._contentToOption(content);229 }230 else {231 // return the textArea dom for custom contentToOption232 customContent(this._textArea, this.option);233 }234 this.hide();235 236 var self = this;237 setTimeout(238 function (){239 self.messageCenter && self.messageCenter.dispatch(240 ecConfig.EVENT.DATA_VIEW_CHANGED,241 null,242 {option : self.option},243 self.myChart244 );245 },246 // 有动画,所以高级浏览器时间更长点247 self.canvasSupported ? 800 : 100248 );249 },250 _contentToOption : function (content) {251 var i;252 var j;253 var k;254 var len;255 var data;256 var axisList = [];257 var contentIdx = 0;258 var contentValueList;259 var value;260 if (this.option.xAxis) {261 if (this.option.xAxis instanceof Array) {262 axisList = this.option.xAxis;263 } else {264 axisList = [this.option.xAxis];265 }266 for (i = 0, len = axisList.length; i < len; i++) {267 // 横纵默认为类目268 if ((axisList[i].type || 'category') == 'category'269 ) {270 contentValueList = content[contentIdx].split(',');271 for (j = 0, k = axisList[i].data.length; j < k; j++) {272 value = this._trim(contentValueList[j] || '');273 data = axisList[i].data[j];274 if (typeof axisList[i].data[j].value != 'undefined'275 ) {276 axisList[i].data[j].value = value;277 }278 else {279 axisList[i].data[j] = value;280 }281 }282 contentIdx++;283 }284 }285 }286 if (this.option.yAxis) {287 if (this.option.yAxis instanceof Array) {288 axisList = this.option.yAxis;289 } else {290 axisList = [this.option.yAxis];291 }292 for (i = 0, len = axisList.length; i < len; i++) {293 if (axisList[i].type == 'category') {294 contentValueList = content[contentIdx].split(',');295 for (j = 0, k = axisList[i].data.length; j < k; j++) {296 value = this._trim(contentValueList[j] || '');297 data = axisList[i].data[j];298 if (typeof axisList[i].data[j].value != 'undefined'299 ) {300 axisList[i].data[j].value = value;301 }302 else {303 axisList[i].data[j] = value;304 }305 }306 contentIdx++;307 }308 }309 }310 var series = this.option.series;311 for (i = 0, len = series.length; i < len; i++) {312 contentIdx++;313 if (series[i].type == ecConfig.CHART_TYPE_SCATTER) {314 for (var j = 0, k = series[i].data.length; j < k; j++) {315 contentValueList = content[contentIdx];316 value = contentValueList.replace(' ','').split(',');317 if (typeof series[i].data[j].value != 'undefined'318 ) {319 series[i].data[j].value = value;320 }321 else {322 series[i].data[j] = value;323 }324 contentIdx++;325 }326 }327 else {328 contentValueList = content[contentIdx].split(',');329 for (var j = 0, k = series[i].data.length; j < k; j++) {330 value = (contentValueList[j] || '').replace(/.*:/,'');331 value = this._trim(value);332 value = (value != '-' && value !== '')333 ? (value - 0)334 : '-';335 if (typeof series[i].data[j].value != 'undefined'336 ) {337 series[i].data[j].value = value;338 }339 else {340 series[i].data[j] = value;341 }342 }343 contentIdx++;344 }345 }346 },347 _trim : function (str){348 var trimer = new RegExp(349 '(^[\\s\\t\\xa0\\u3000]+)|([\\u3000\\xa0\\s\\t]+\x24)', 'g'350 );351 return str.replace(trimer, '');352 },353 // 阻塞zrender事件354 _stop : function (e){355 e = e || window.event;356 if (e.stopPropagation) {357 e.stopPropagation();358 }359 else {360 e.cancelBubble = true;361 }362 },363 /**364 * zrender事件响应:窗口大小改变365 */366 resize : function () {367 this._zrHeight = this.zr.getHeight();368 this._zrWidth = this.zr.getWidth();369 if (this._tDom.offsetHeight > 10) {370 this._sizeCssText = 'width:' + this._zrWidth + 'px;'371 + 'height:' + this._zrHeight + 'px;'372 + 'background-color:#fff;';373 this._tDom.style.cssText = this._gCssText + this._sizeCssText;374 this._textArea.style.cssText = 'display:block;margin:0 0 8px 0;'375 + 'padding:4px 6px;overflow:auto;'376 + 'width:100%;'377 + 'height:' + (this._zrHeight - 100) + 'px;';378 }379 },380 /**381 * 释放后实例不可用,重载基类方法382 */383 dispose : function () {384 if (window.removeEventListener) {385 this._tDom.removeEventListener('click', this._stop);386 this._tDom.removeEventListener('mousewheel', this._stop);387 this._tDom.removeEventListener('mousemove', this._stop);388 this._tDom.removeEventListener('mousedown', this._stop);389 this._tDom.removeEventListener('mouseup', this._stop);390 // mobile支持391 this._tDom.removeEventListener('touchstart', this._stop);392 this._tDom.removeEventListener('touchmove', this._stop);393 this._tDom.removeEventListener('touchend', this._stop);394 }395 else {396 this._tDom.detachEvent('onclick', this._stop);397 this._tDom.detachEvent('onmousewheel', this._stop);398 this._tDom.detachEvent('onmousemove', this._stop);399 this._tDom.detachEvent('onmousedown', this._stop);400 this._tDom.detachEvent('onmouseup', this._stop);401 }402 this._buttonRefresh.onclick = null;403 this._buttonClose.onclick = null;404 if (this._hasShow) {405 this._tDom.removeChild(this._textArea);406 this._tDom.removeChild(this._buttonRefresh);407 this._tDom.removeChild(this._buttonClose);408 }409 this._textArea = null;410 this._buttonRefresh = null;411 this._buttonClose = null;412 this.dom.firstChild.removeChild(this._tDom);413 this._tDom = null;414 }415 };416 417 zrUtil.inherits(DataView, Base);418 419 require('../component').define('dataView', DataView);420 421 return DataView;...

Full Screen

Full Screen

lineDecorations.js

Source:lineDecorations.js Github

copy

Full Screen

1/*---------------------------------------------------------------------------------------------2 * Copyright (c) Microsoft Corporation. All rights reserved.3 * Licensed under the MIT License. See License.txt in the project root for license information.4 *--------------------------------------------------------------------------------------------*/5'use strict';6import * as strings from '../../../base/common/strings.js';7var LineDecoration = /** @class */ (function () {8 function LineDecoration(startColumn, endColumn, className, type) {9 this.startColumn = startColumn;10 this.endColumn = endColumn;11 this.className = className;12 this.type = type;13 }14 LineDecoration._equals = function (a, b) {15 return (a.startColumn === b.startColumn16 && a.endColumn === b.endColumn17 && a.className === b.className18 && a.type === b.type);19 };20 LineDecoration.equalsArr = function (a, b) {21 var aLen = a.length;22 var bLen = b.length;23 if (aLen !== bLen) {24 return false;25 }26 for (var i = 0; i < aLen; i++) {27 if (!LineDecoration._equals(a[i], b[i])) {28 return false;29 }30 }31 return true;32 };33 LineDecoration.filter = function (lineDecorations, lineNumber, minLineColumn, maxLineColumn) {34 if (lineDecorations.length === 0) {35 return [];36 }37 var result = [], resultLen = 0;38 for (var i = 0, len = lineDecorations.length; i < len; i++) {39 var d = lineDecorations[i];40 var range = d.range;41 if (range.endLineNumber < lineNumber || range.startLineNumber > lineNumber) {42 // Ignore decorations that sit outside this line43 continue;44 }45 if (range.isEmpty() && (d.type === 0 /* Regular */ || d.type === 3 /* RegularAffectingLetterSpacing */)) {46 // Ignore empty range decorations47 continue;48 }49 var startColumn = (range.startLineNumber === lineNumber ? range.startColumn : minLineColumn);50 var endColumn = (range.endLineNumber === lineNumber ? range.endColumn : maxLineColumn);51 result[resultLen++] = new LineDecoration(startColumn, endColumn, d.inlineClassName, d.type);52 }53 return result;54 };55 LineDecoration.compare = function (a, b) {56 if (a.startColumn === b.startColumn) {57 if (a.endColumn === b.endColumn) {58 if (a.className < b.className) {59 return -1;60 }61 if (a.className > b.className) {62 return 1;63 }64 return 0;65 }66 return a.endColumn - b.endColumn;67 }68 return a.startColumn - b.startColumn;69 };70 return LineDecoration;71}());72export { LineDecoration };73var DecorationSegment = /** @class */ (function () {74 function DecorationSegment(startOffset, endOffset, className) {75 this.startOffset = startOffset;76 this.endOffset = endOffset;77 this.className = className;78 }79 return DecorationSegment;80}());81export { DecorationSegment };82var Stack = /** @class */ (function () {83 function Stack() {84 this.stopOffsets = [];85 this.classNames = [];86 this.count = 0;87 }88 Stack.prototype.consumeLowerThan = function (maxStopOffset, nextStartOffset, result) {89 while (this.count > 0 && this.stopOffsets[0] < maxStopOffset) {90 var i = 0;91 // Take all equal stopping offsets92 while (i + 1 < this.count && this.stopOffsets[i] === this.stopOffsets[i + 1]) {93 i++;94 }95 // Basically we are consuming the first i + 1 elements of the stack96 result.push(new DecorationSegment(nextStartOffset, this.stopOffsets[i], this.classNames.join(' ')));97 nextStartOffset = this.stopOffsets[i] + 1;98 // Consume them99 this.stopOffsets.splice(0, i + 1);100 this.classNames.splice(0, i + 1);101 this.count -= (i + 1);102 }103 if (this.count > 0 && nextStartOffset < maxStopOffset) {104 result.push(new DecorationSegment(nextStartOffset, maxStopOffset - 1, this.classNames.join(' ')));105 nextStartOffset = maxStopOffset;106 }107 return nextStartOffset;108 };109 Stack.prototype.insert = function (stopOffset, className) {110 if (this.count === 0 || this.stopOffsets[this.count - 1] <= stopOffset) {111 // Insert at the end112 this.stopOffsets.push(stopOffset);113 this.classNames.push(className);114 }115 else {116 // Find the insertion position for `stopOffset`117 for (var i = 0; i < this.count; i++) {118 if (this.stopOffsets[i] >= stopOffset) {119 this.stopOffsets.splice(i, 0, stopOffset);120 this.classNames.splice(i, 0, className);121 break;122 }123 }124 }125 this.count++;126 return;127 };128 return Stack;129}());130var LineDecorationsNormalizer = /** @class */ (function () {131 function LineDecorationsNormalizer() {132 }133 /**134 * Normalize line decorations. Overlapping decorations will generate multiple segments135 */136 LineDecorationsNormalizer.normalize = function (lineContent, lineDecorations) {137 if (lineDecorations.length === 0) {138 return [];139 }140 var result = [];141 var stack = new Stack();142 var nextStartOffset = 0;143 for (var i = 0, len = lineDecorations.length; i < len; i++) {144 var d = lineDecorations[i];145 var startColumn = d.startColumn;146 var endColumn = d.endColumn;147 var className = d.className;148 // If the position would end up in the middle of a high-low surrogate pair, we move it to before the pair149 if (startColumn > 1) {150 var charCodeBefore = lineContent.charCodeAt(startColumn - 2);151 if (strings.isHighSurrogate(charCodeBefore)) {152 startColumn--;153 }154 }155 if (endColumn > 1) {156 var charCodeBefore = lineContent.charCodeAt(endColumn - 2);157 if (strings.isHighSurrogate(charCodeBefore)) {158 endColumn--;159 }160 }161 var currentStartOffset = startColumn - 1;162 var currentEndOffset = endColumn - 2;163 nextStartOffset = stack.consumeLowerThan(currentStartOffset, nextStartOffset, result);164 if (stack.count === 0) {165 nextStartOffset = currentStartOffset;166 }167 stack.insert(currentEndOffset, className);168 }169 stack.consumeLowerThan(1073741824 /* MAX_SAFE_SMALL_INTEGER */, nextStartOffset, result);170 return result;171 };172 return LineDecorationsNormalizer;173}());...

Full Screen

Full Screen

script.js

Source:script.js Github

copy

Full Screen

1/* Author: olegnax23*/4$(document).ready(function() {56 jQuery('.slider').fadeIn(300);7 jQuery('#slider').fadeIn(300);8 if ($("#s4").length) {9 $(function() {10 $('#s4')11 .after('<div id="nav">')12 .cycle({13 fx: 'fade',14 speed: 3000,15 timeout: 6000,16 pause: 1,17 pager: '#nav'18 });19 });20 };21 if ($("#slider").length) {22 $(window).load(function() {23 $('#slider').nivoSlider();24 });25 };26 jQuery('ul.sf-menu').superfish();27 // prettyPhoto28 if ($("a[rel^='prettyPhoto']").length) {29 $("a[rel^='prettyPhoto']").prettyPhoto({theme:'light_rounded'});30 };31 // lightbox image32 $(".video_rollover").prepend("<span></span>");33 $(".video_rollover span").stop().animate({opacity:0},0)3435 $(".video_rollover").hover(function(){36 $(this).find("span").stop().animate({opacity:1},300)37 }, function(){38 $(this).find("span").stop().animate({opacity:0},100)39 });40 $(".image_rollover").prepend("<span></span>")41 $(".image_rollover span").stop().animate({opacity:0},0)4243 $(".image_rollover, .videos").hover(function(){44 $(this).find("span").stop().animate({opacity:1},300)45 }, function(){46 $(this).find("span").stop().animate({opacity:0},100)47 });484950 if ($(".carousel2").length) {51 $(".carousel2").jCarouselLite({52 btnNext: ".next",53 btnPrev: ".prev",54 scroll: 155 });56 };5758 $("#pricing_table .grid_price").hover(function() {59 $(this).stop().animate({ marginTop: "-10px", paddingTop:"25px", marginBottom: "-10px", marginLeft: "-5px", marginRight: "-5px", paddingLeft: "25px", paddingRight: "25px", width: "180px", height: "358px" }, 200);60 $(this).find('.bottom_bg').stop().animate({height:"69px"}, 200);61 $(this).find('.bottom_bg div').stop().animate({height:"69px"}, 200);62 },function(){63 $(this).stop().animate({ marginTop: "0px", paddingTop:"15px", marginBottom: "0px", marginLeft: "0px", marginRight: "0px", paddingLeft: "20px", paddingRight: "20px", width: "180px", height: "348px" }, 300);64 $(this).find('.bottom_bg').stop().animate({height:"59px"},300);65 $(this).find('.bottom_bg div').stop().animate({height:"59px"},300);66 });676869 $("#pricing_table3 .grid_price").hover(function() {70 $(this).stop().animate({ marginTop: "-10px", paddingTop:"25px", marginBottom: "-10px", marginLeft: "-5px", marginRight: "-5px", paddingLeft: "25px", paddingRight: "25px", width: "225px", height: "358px" }, 200);71 $(this).find('.bottom_bg').stop().animate({height:"69px"}, 200);72 $(this).find('.bottom_bg div').stop().animate({height:"69px"}, 200);73 },function(){74 $(this).stop().animate({ marginTop: "0px", paddingTop:"15px", marginBottom: "0px", marginLeft: "0px", marginRight: "0px", paddingLeft: "20px", paddingRight: "20px", width: "225px", height: "348px" }, 300);75 $(this).find('.bottom_bg').stop().animate({height:"59px"},300);76 $(this).find('.bottom_bg div').stop().animate({height:"59px"},300);77 });7879if ($(".checked_block").length) {80$('input:checkbox:not([safari])').checkbox();81}82838485 jQuery.validator.addMethod("defaultInvalid", function(value, element) {86 return value != element.defaultValue;87 }, "");888990});91jQuery('.list1 li').hover(function(){92 jQuery(this).stop().css({backgroundPosition: "-16px 8px"});93 jQuery(this).stop().animate({ backgroundPosition: "-13px 8px" }, 300);94}, function(){95 jQuery(this).stop().animate({ backgroundPosition: "-13px 8px" }, 200);96 jQuery(this).stop().css({backgroundPosition: "-16px 8px"});97});98jQuery('.list2 li').hover(function(){99 jQuery(this).stop().css({backgroundPosition: "-16px 8px"});100 jQuery(this).stop().animate({ backgroundPosition: "20px -32px" }, 300);101}, function(){102 jQuery(this).stop().animate({ backgroundPosition: "20px -32px" }, 200);103 jQuery(this).stop().css({backgroundPosition: "-16px 8px"});104});105jQuery('.list3 li').hover(function(){106 jQuery(this).stop().css({backgroundPosition: "-16px 8px"});107 jQuery(this).stop().animate({ backgroundPosition: "20px -32px" }, 300);108}, function(){109 jQuery(this).stop().animate({ backgroundPosition: "20px -32px" }, 200);110 jQuery(this).stop().css({backgroundPosition: "-16px 8px"});111});112$(function() {113 $(".sf-menu li a").append('<strong class="shover"> </strong>');114 // set opacity to nill on page load115 $(".sf-menu li a strong").css("opacity","0");116 // on mouse over117 $(".sf-menu li a ").hover(function () {118 // animate opacity to full119120 $(this).find(".shover").stop().animate({121 opacity: 1122 }, 'slow');123 },124 // on mouse out125 function () {126 // animate opacity to nill127 $(this).find(".shover").stop().animate({128 opacity: 0129 }, 'slow');130 });131 });132133function initMenu() {134 $('.sidebar_menu ul').hide();135 $('.sidebar_menu li.parrent > a').click(136 function() {137 $('.sidebar_menu').find('.parrent').toggleClass('sidebar_menu_act');138 $(this).next().slideToggle('normal');139 }140 );141 }142$(document).ready(function() {initMenu();});143144145146147 ...

Full Screen

Full Screen

scripts.js

Source:scripts.js Github

copy

Full Screen

1jQuery(document).ready(function(){2 3 jQuery("a[data-gal^='prettyPhoto']").prettyPhoto({4 animationSpeed: 'normal',5 padding: 40,6 opacity: 0.35,7 showTitle: true,8 allowresize: true,9 counter_separator_label: '/', 10 theme: 'facebook' 11 });12 jQuery('#custommenu .menu:first-child').addClass ('menu-item');13 jQuery('.cms-home .products-grid:first li:first-child').append ('<em></em>');14 15 jQuery('div.wp-custom-menu-popup a ').hover(function(){16 jQuery(this).stop(true,false).animate({paddingLeft:"7px", color:"#cc450f"}, {duration: 300});17 },function(){18 jQuery(this).stop(true,false).animate({paddingLeft:"0px", color:"#8e8c8c"}, {duration: 300});19 });20 21 jQuery('.products-grid .product-name a').hover(function(){22 jQuery(this).stop(true,false).animate({color:"#434343"}, {duration: 300});23 },function(){24 jQuery(this).stop(true,false).animate({color:"#DF4B11"}, {duration: 300});25 });26 27 jQuery('.cms-home .products-grid .product-name a').hover(function(){28 jQuery(this).stop(true,false).animate({color:"#DF4B11"}, {duration: 300});29 },function(){30 jQuery(this).stop(true,false).animate({color:"#434343"}, {duration: 300});31 });32 33 jQuery('.footer .col-1 ul li a, .footer .col-2 ul li a, .footer .col-3 ul li a ').hover(function(){34 jQuery(this).stop(true,false).animate({paddingLeft:"10px"}, {duration: 300});35 },function(){36 jQuery(this).stop(true,false).animate({paddingLeft:"0px"}, {duration: 300});37 });38 39 jQuery('.list-icon li a').hover(function(){40 jQuery(this).stop(true,false).animate({paddingTop:"10px", marginTop:"4px" }, {duration: 300});41 },function(){42 jQuery(this).stop(true,false).animate({paddingTop:"0px", marginTop:"0px"}, {duration: 300});43 });44 45 jQuery('.col-main .product-image').hover(function(){46 jQuery(this).stop(true,false).animate({borderTopColor: '#000', borderLeftColor: '#000', borderRightColor: '#000', borderBottomColor: '#000'}, {duration: 450});47 },function(){48 jQuery(this).stop(true,false).animate({borderTopColor: '#EAEAE6', borderLeftColor: '#EAEAE6', borderRightColor: '#EAEAE6', borderBottomColor: '#EAEAE6'}, {duration: 450});49 });50 51 jQuery('.mini-products-list .product-image').hover(function(){52 jQuery(this).stop(true,false).animate({borderTopColor: '#000', borderLeftColor: '#000', borderRightColor: '#000', borderBottomColor: '#000'}, {duration: 450});53 },function(){54 jQuery(this).stop(true,false).animate({borderTopColor: '#fff', borderLeftColor: '#fff', borderRightColor: '#fff', borderBottomColor: '#fff'}, {duration: 450});55 });56 5758 jQuery(document).ready(function(){59 if(navigator.userAgent.indexOf('Chrome')!=-1){60 jQuery('body').addClass('chrome-fix');61 }62 });63 64});65jQuery(document).ready(function(){66 var fl=false, 67 fl2=false;68 jQuery('.block-cart-header .cart-content').hide();69 jQuery('.block-cart-header .amount a, .block-cart-header .cart-content').hover(function(){70 jQuery('.block-cart-header .cart-content').stop(true, true).slideDown(400);71 },function(){72 jQuery('.block-cart-header .cart-content').stop(true, true).delay(400).slideUp(300);73 }); ...

Full Screen

Full Screen

stop.js

Source:stop.js Github

copy

Full Screen

1var Stop = function(stop){2 if(stop)3 this.stop = stop;4 else5 this.stop = {type:'Feature',properties:{},geometry:{type:'Point',coordinates:[]}}6};7Stop.prototype.getProperty = function(pname){8 return this.stop.properties[pname];9}10Stop.prototype.getPoint = function(){11 return this.stop.geometry.coordinates;12}13Stop.prototype.getLon = function(){14 return this.stop.geometry.coordinates[0];15}16Stop.prototype.getLat = function(){17 return this.stop.geometry.coordinates[1];18}19Stop.prototype.getId = function(){20 return this.stop.properties.stop_id;21}22Stop.prototype.getName = function(){23 return this.stop.properties.stop_name;24}25Stop.prototype.getGeoFeat = function(){26 return this.stop.geometry;27}28Stop.prototype.getRoutes = function(){29 return this.stop.properties.routes;30}31Stop.prototype.getTrips = function(){32 return this.stop.properties.groups;33}34Stop.prototype.getFeature = function(){35 return this.stop;36}37Stop.prototype.setPoint = function(lonlat){38 this.stop.geometry.coordinates = lonlat;39}40Stop.prototype.setLon = function(lon){41 this.stop.geometry.coordinates[0] = lon;42}43Stop.prototype.setLat = function(lat){44 this.stop.geometry.coordinates[1] = lat;45}46Stop.prototype.setId = function(id){47 this.stop.properties.stop_id = id; 48}49Stop.prototype.setName = function(name){50 this.stop.properties.stop_name = id;51}52Stop.prototype.setRoutes = function(routes){53 this.stop.properties.routes = routes;54}55Stop.prototype.setTrips = function(groups){56 this.stop.properties.groups = groups;57}58Stop.prototype.addRoute = function(route){59 if(!this.stop.properties.routes)60 this.stop.properties.routes = [];61 this.stop.properties.routes.push(route);62}63Stop.prototype.addTrip = function(group){64 if(!this.stop.properties.groups)65 this.stop.properties.groups = [];66 this.stop.properties.groups.push(group);67}68Stop.prototype.delRoute = function(route){69 var routes = this.stop.properties.routes,ix = routes.indexOf(route);70 if(ix>0)71 routes.splice(ix,1);72}73Stop.prototype.delTrip = function(group){74 var groups = this.stop.properties.groups, ix = groups.indexOf(group);75 if(ix>0)76 groups.splice(ix,1);77}78Stop.prototype.hasNoGroups = function(){79 var list = this.stop.properties.groups;80 return !list || list.length === 0;81}82Stop.prototype.inGroup = function(gid){83 return this.stop.properties.groups.indexOf(gid) >= 0;84}85Stop.prototype.inRoute = function(rid){86 return this.stop.properties.routes.indexOf(rid) >= 0;87}88Stop.prototype.setEdited = function(){89 this.stop.edited = true;90}91Stop.prototype.setNormal = function(){92 this.stop.edited = false;93}94Stop.prototype.isEdited = function(){95 return this.stop.edited === true;96}97Stop.prototype.setRemoval = function(){98 return this.stop.properties.removed = true;99}100Stop.prototype.wasRemoved = function(){101 return this.stop.properties.removed;102}103Stop.prototype.isNew = function(){104 return this.stop.isNew;105}106Stop.prototype.isDeleted = function(){107 return this.stop.deleted;108}109Stop.prototype.setNew = function(tf){110 this.stop.isNew = tf;111}112Stop.prototype.setDeleted = function(tf){113 this.stop.deleted = tf;114}115Stop.prototype.setSequence = function(id){116 this.stop.sequence = id;117}118Stop.prototype.getSequence = function(){119 return this.stop.sequence;120}...

Full Screen

Full Screen

action-link.js

Source:action-link.js Github

copy

Full Screen

1/**2 * Copyright © 2015 Magento. All rights reserved.3 * See COPYING.txt for license details.4 */5/*jshint jquery:true*/6define([7 "jquery",8 "jquery/ui"9], function($){10 "use strict";11 12 $.widget('mage.actionLink', {13 /**14 * Button creation15 * @protected16 */17 _create: function() {18 this._bind();19 },20 /**21 * Bind handler on button click22 * @protected23 */24 _bind: function() {25 var keyCode = $.ui.keyCode;26 this._on({27 mousedown: function(e){28 this._stopPropogation(e);29 },30 mouseup: function(e){31 this._stopPropogation(e);32 },33 click: function(e) {34 this._stopPropogation(e);35 this._triggerEvent();36 },37 keydown: function(e) {38 switch (e.keyCode) {39 case keyCode.ENTER:40 case keyCode.NUMPAD_ENTER:41 this._stopPropogation(e);42 this._triggerEvent();43 break;44 }45 },46 keyup: function(e) {47 switch (e.keyCode) {48 case keyCode.ENTER:49 case keyCode.NUMPAD_ENTER:50 this._stopPropogation(e);51 break;52 }53 }54 });55 },56 /**57 * @param {Object} e - event object58 * @private59 */60 _stopPropogation: function(e) {61 e.stopImmediatePropagation();62 e.preventDefault();63 },64 /**65 * @private66 */67 _triggerEvent: function() {68 $(this.options.related || this.element)69 .trigger(this.options.event, this.options.eventData ? [this.options.eventData] : [{}]);70 }71 });72 73 return $.mage.actionLink;...

Full Screen

Full Screen

boxes.js

Source:boxes.js Github

copy

Full Screen

1 $(document).ready(function(){2 //To switch directions up/down and left/right just place a "-" in front of the top/left attribute3 //Vertical Sliding4 $('.boxgrid.slidedown').hover(function(){5 $(".cover", this).stop().animate({top:'-260px'},{queue:false,duration:300});6 }, function() {7 $(".cover", this).stop().animate({top:'0px'},{queue:false,duration:300});8 });9 //Horizontal Sliding10 $('.boxgrid.slideright').hover(function(){11 $(".cover", this).stop().animate({left:'325px'},{queue:false,duration:300});12 }, function() {13 $(".cover", this).stop().animate({left:'0px'},{queue:false,duration:300});14 });15 //Diagnal Sliding16 $('.boxgrid.thecombo').hover(function(){17 $(".cover", this).stop().animate({top:'260px', left:'325px'},{queue:false,duration:300});18 }, function() {19 $(".cover", this).stop().animate({top:'0px', left:'0px'},{queue:false,duration:300});20 });21 //Partial Sliding (Only show some of background)22 $('.boxgrid.peek').hover(function(){23 $(".cover", this).stop().animate({top:'90px'},{queue:false,duration:160});24 }, function() {25 $(".cover", this).stop().animate({top:'0px'},{queue:false,duration:160});26 });27 //Full Caption Sliding (Hidden to Visible)28 $('.boxgrid.captionfull').hover(function(){29 $(".cover", this).stop().animate({top:'160px'},{queue:false,duration:160});30 }, function() {31 $(".cover", this).stop().animate({top:'260px'},{queue:false,duration:160});32 });33 //Caption Sliding (Partially Hidden to Visible)34 $('.boxgrid.caption').hover(function(){35 $(".cover", this).stop().animate({top:'160px'},{queue:false,duration:160});36 }, function() {37 $(".cover", this).stop().animate({top:'220px'},{queue:false,duration:160});38 }); ...

Full Screen

Full Screen

captions.js

Source:captions.js Github

copy

Full Screen

1$(document).ready(function(){2 //To switch directions up/down and left/right just place a "-" in front of the top/left attribute3 //Vertical Sliding4 $('.boxgrid.slidedown').hover(function(){5 $(".cover", this).stop().animate({top:'-260px'},{queue:false,duration:300});6 }, function() {7 $(".cover", this).stop().animate({top:'0px'},{queue:false,duration:300});8 });9 //Horizontal Sliding10 $('.boxgrid.slideright').hover(function(){11 $(".cover", this).stop().animate({left:'325px'},{queue:false,duration:300});12 }, function() {13 $(".cover", this).stop().animate({left:'0px'},{queue:false,duration:300});14 });15 //Diagnal Sliding16 $('.boxgrid.thecombo').hover(function(){17 $(".cover", this).stop().animate({top:'260px', left:'325px'},{queue:false,duration:300});18 }, function() {19 $(".cover", this).stop().animate({top:'0px', left:'0px'},{queue:false,duration:300});20 });21 22 //Partial Sliding (Only show some of background)23 $('.boxgrid.peek').hover(function(){24 $(".cover", this).stop().animate({top:'70px'},{queue:false,duration:160});25 }, function() {26 $(".cover", this).stop().animate({top:'0px'},{queue:false,duration:160});27 });28 //Full Caption Sliding (Hidden to Visible)29 $('.news.element').hover(function(){30 $(".cover", this).stop().animate({top:'0px'},{queue:false,duration:160});31 }, function() {32 $(".cover", this).stop().animate({top:'-100px'},{queue:false,duration:160});33 });34 //Caption Sliding (Partially Hidden to Visible)35 $('.boxgrid.caption').hover(function(){36 $(".cover", this).stop().animate({top:'160px'},{queue:false,duration:160});37 }, function() {38 $(".cover", this).stop().animate({top:'220px'},{queue:false,duration:160});39 });...

Full Screen

Full Screen

Using AI Code Generation

copy

Full Screen

1var wd = require('wd');2var assert = require('assert');3var desired = {4};5 .init(desired)6 .elementByName('Settings')7 .click()8 .then(() => driver.sleep(5000))9 .then(() => driver.stop())10 .then(() => driver.quit())11 .catch((err) => {12 console.error(err);13 driver.quit();14 });

Full Screen

Using AI Code Generation

copy

Full Screen

1const XCUITestDriver = require('appium-xcuitest-driver').XCUITestDriver;2const driver = new XCUITestDriver();3driver.stop();4const XCUITestDriver = require('appium-xcuitest-driver');5const driver = new XCUITestDriver();6driver.stop();7const XCUITestDriver = require('appium-xcuitest-driver');8const driver = new XCUITestDriver.XCUITestDriver();9driver.stop();10const XCUITestDriver = require('appium-xcuitest-driver');11const driver = new XCUITestDriver.XCUITestDriver();12driver.stop();13const XCUITestDriver = require('appium-xcuitest-driver');14const driver = new XCUITestDriver.XCUITestDriver();15driver.stop();16const XCUITestDriver = require('appium-xcuitest-driver');17const driver = new XCUITestDriver.XCUITestDriver();18driver.stop();19const XCUITestDriver = require('appium-xcuitest-driver');20const driver = new XCUITestDriver.XCUITestDriver();21driver.stop();22const XCUITestDriver = require('appium-xc

Full Screen

Using AI Code Generation

copy

Full Screen

1describe('Test', function() {2 it('should work', function() {3 browser.pause(2000);4 this.stop();5 });6});7{8 "scripts": {9 },10 "dependencies": {11 }12}13exports.config = {14 capabilities: [{15 }],

Full Screen

Using AI Code Generation

copy

Full Screen

1describe('Test Appium Xcuitest Driver', function() {2 it('should be able to use this.stop', function() {3 this.stop();4 });5});6Appium version (or git revision) that exhibits the issue: 1.6.47Last Appium version that did not exhibit the issue (if applicable): N/A8Node.js version (unless using Appium.app|exe): v7.9.0

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