Every line of 'javascript trigger click' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.
26 triggerClick() { 27 this.onClickCallbacks.forEach(callback => callback()); 28 }
59 function qgs_trigger(event) { 60 if (event.key !== `Enter`) return; 61 event.preventDefault(); 62 location.href = `/giveaways/search?q=${encodeURIComponent(event.currentTarget.value)}`; 63 }
214 handleClick() { 215 this.props.clickHandler(); 216 }
36 makeClickHandler(triggerKey, jsOnly) { 37 return e => { 38 e.preventDefault(); 39 40 this.setState({ 41 completed: { ...this.state.completed, [triggerKey]: false }, 42 [triggerKey]: String(Date.now()), 43 jsOnly, 44 }); 45 }; 46 }
145 function onClick(e) { 146 var el = e.target 147 148 // Ignore command click, control click, and non-left click 149 if (e.metaKey || e.which !== 1) return 150 151 // Ignore if already prevented 152 if (e.defaultPrevented) return 153 154 // Also look up for parent links (<a></a>) 155 while (el) { 156 var url = el.href 157 if (url) { 158 159 // Ignore if created by Tracks 160 if (el.hasAttribute && el.hasAttribute('data-router-ignore')) return 161 162 // Ignore links meant to open in a different window or frame 163 if (el.target && el.target !== '_self') return 164 165 // Ignore hash links to the same page 166 var hashIndex = url.indexOf('#') 167 if (~hashIndex && url.slice(0, hashIndex) === window.location.href.replace(/#.*/, '')) { 168 return 169 } 170 171 e._tracksLink = el 172 history.push(url, true, null, e) 173 return 174 } 175 176 el = el.parentNode 177 } 178 }
151 function dropDownMenu (trigger_id) { 152 153 // console.log('Trigger ID: ' + trigger_id); 154 155 // get Menu-Item position X/Y 156 var menuItemH = $(trigger_id).height(); 157 // console.log(menuItemH); 158 var menuPos = $('#'+trigger_id).offset(); 159 // console.log(menuPos); 160 161 var menuPosY = parseInt(menuPos.top) + 25; 162 var menuPosX = parseInt(menuPos.left) - 10; // dropdown content has 10px margin. 163 164 var dropDownMenuID = $("#"+trigger_id).next('ul').attr('id'); 165 166 if (!dropDownMenuID) { 167 dropDownMenuID = trigger_id + '-content'; 168 $("#"+trigger_id).next('ul').attr('id', dropDownMenuID); 169 } 170 171 $("#"+dropDownMenuID).insertAfter('#footer'); 172 $("#"+dropDownMenuID).css({ 173 top: menuPosY, 174 left: menuPosX 175 }).slideDown('fast'); 176 177 return true; 178 }
20 onClick() { 21 if (typeof jQuery === 'undefined') { 22 console.log('jQuery is not loaded'); 23 return; 24 } 25 26 if (!this.data.hasOwnProperty('selector')) { 27 console.log('target selector missing for modal'); 28 return; 29 } 30 31 jQuery('.ui.modal.' + this.data.selector) 32 .modal({ 33 onApprove: this.onOk, 34 onDeny: this.onCancel 35 }) 36 .modal('show'); 37 38 }
15 leftclick() { 16 this.js_trigger("onLeftClick"); 17 }
82 function trigger (el, eventName) { 83 var customEvent = new CustomEvent(eventName); 84 el.dispatchEvent(customEvent); 85 }
20 function trigger_hover(this_) { 21 reinit_buttons(); 22 // actions on focus into the button 23 if ($(this_).hasClass(selected_chosen)) { 24 $(this_).addClass(selected_preselected); 25 } else { 26 $(this_).addClass(selected); 27 } 28 return false 29 }