¡@

Home 

2014/10/16 ¤W¤È 12:03:56

jquery Programming Glossary: if

jQuery Mobile: document ready vs page events

http://stackoverflow.com/questions/14468659/jquery-mobile-document-ready-vs-page-events

using JQuery Mobile and I am having trouble understanding difference between classic document ready and jQuery Mobile page.. Mobile page events. Can someone tell me what is a real difference Why should document .ready be better then document .on.. that it works fine but on others it may cause erratic difficult to repeat weirdness to occur. Classic jQuery syntax document..

How can I upload files asynchronously with jQuery?

http://stackoverflow.com/questions/166221/how-can-i-upload-files-asynchronously-with-jquery

form progress progress First you can do some validation if you want. For example in the onChange event of the file ' file'.. Custom XMLHttpRequest var myXhr .ajaxSettings.xhr if myXhr.upload Check if upload property exists myXhr.upload.addEventListener.. var myXhr .ajaxSettings.xhr if myXhr.upload Check if upload property exists myXhr.upload.addEventListener 'progress'..

Event binding on dynamically created elements?

http://stackoverflow.com/questions/203198/event-binding-on-dynamically-created-elements

I add another 5k to my pages with a plugin I want to see if anyone knows a way to do this either with jQuery directly or.. or by another option. I can provide a code example if anyone needs it. jquery events share improve this question..

.prop() vs .attr()

http://stackoverflow.com/questions/5874652/prop-vs-attr

'style' or in this case do they do the same thing And if I do have to switch to using prop all the old attr calls will.. to switch to using prop all the old attr calls will break if i switch to 1.6 UPDATE See this fiddle http jsfiddle.net maniator.. Update 1 November 2012 My original answer applies specifically to jQuery 1.6. My advice remains the same but jQuery 1.6.1..

jQuery Mobile: document ready vs page events

http://stackoverflow.com/questions/14468659/jquery-mobile-document-ready-vs-page-events

loading jsFiddle example http jsfiddle.net Gajotres QGnft If AJAX is not enabled some events may not fire. Prevent page transition.. enabled some events may not fire. Prevent page transition If for some reason page transition needs to be prevented on some.. 1 Best solution would be to use pageinit to bind events. If you take a look at an official documentation you will find out..

How do I “think in AngularJS” if I have a jQuery background?

http://stackoverflow.com/questions/14994391/how-do-i-think-in-angularjs-if-i-have-a-jquery-background

with separation of concerns is dependency injection DI . If you come from a server side language from Java to PHP you're.. what are they Directives are actually extensions of HTML . If HTML doesn't do something you need it to do you write a directive.. about how to do it within the confines the AngularJS. If you don't know ask 19 times out of 20 the best way to do it..

How to filter the jqGrid data NOT using the built in search/filter box

http://stackoverflow.com/questions/2928371/how-to-filter-the-jqgrid-data-not-using-the-built-in-search-filter-box

to the url sending to server and reloading the grid data. If you have your own interface for searching filtering some select.. myReload .keyup function e keyupHandler e myReload this If user change selected option in select box with id StateId or.. parameter will be forwarded to .ajax as data parameter. If some from properties of data are functions these function will..

jQuery AJAX cross domain

http://stackoverflow.com/questions/3506208/jquery-ajax-cross-domain

either localhost or web server it works and alert Success If it is on different sides I mean testserver.php in web server..

XmlHttpRequest error: Origin null is not allowed by Access-Control-Allow-Origin

http://stackoverflow.com/questions/3595515/xmlhttprequest-error-origin-null-is-not-allowed-by-access-control-allow-origin

Origin null is not allowed by Access Control Allow Origin. If I query that URL from a browser directly it works fine. What.. people here are the simple troubleshooting instructions If you're trying to use JSONP make sure one of the following is.. . You're using .getJSON and included callback in the URL. If you're trying to do a cross domain XMLHttpRequest via CORS.....

Abort Ajax requests using jQuery

http://stackoverflow.com/questions/446594/abort-ajax-requests-using-jquery

MSDN . Cancels the current HTTP request. abort MDC . If the request has been sent already this method will abort the..

How can I make a redirect page in jQuery/JavaScript?

http://stackoverflow.com/questions/503093/how-can-i-make-a-redirect-page-in-jquery-javascript

user won't get stuck in a never ending back button fiasco. If you want to simulate someone clicking on a link use location.href.. to simulate someone clicking on a link use location.href . If you want to simulate an HTTP redirect use location.replace ...

.prop() vs .attr()

http://stackoverflow.com/questions/5874652/prop-vs-attr

with his recommendation to prefer attr . Original answer If you've only ever used jQuery and not the DOM directly this could.. between properties and attributes. This is a good thing. If you're a jQuery developer and are confused by this whole business..

How can I get query string values in JavaScript?

http://stackoverflow.com/questions/901115/how-can-i-get-query-string-values-in-javascript

of retrieving query string values via jQuery or without If so how If not is there a plugin which can do so javascript.. query string values via jQuery or without If so how If not is there a plugin which can do so javascript jquery url..

jQuery Mobile: Sending data from one page to the another

http://stackoverflow.com/questions/14776387/jquery-mobile-sending-data-from-one-page-to-the-another

`test` Table structure for table `users` CREATE TABLE IF NOT EXISTS `users` `user_id` int 11 NOT NULL AUTO_INCREMENT..

plugin illuminate 0.7 incompatible to jQuery 1.9.1 or jQuery-UI 1.10.3 -> TypeError: $.css(…) is undefined

http://stackoverflow.com/questions/18043125/plugin-illuminate-0-7-incompatible-to-jquery-1-9-1-or-jquery-ui-1-10-3-typeer

ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. modified version..

How to detect linked PDF on a page and show message to download Adobe reader using jquery?

http://stackoverflow.com/questions/1899913/how-to-detect-linked-pdf-on-a-page-and-show-message-to-download-adobe-reader-usi

'_blank' Adobe Reader a . p document .ready function IF NUMBER OF PDF LINKS IS MORE THAN ZERO INSIDE DIV WITH ID maincontent..

jsRender - How to call an external template from a nested template

http://stackoverflow.com/questions/19100184/jsrender-how-to-call-an-external-template-from-a-nested-template

value text option _if.tmpl.html tr td span class rightAlig IF span input type text id exp1_tbExp_ idSent class conditionInput..

Populate a DropDown/Select based on the value chosen on another DropDown

http://stackoverflow.com/questions/2174334/populate-a-dropdown-select-based-on-the-value-chosen-on-another-dropdown

not from business order The First DropDown uses this IF to check if a session is null then procedes to show a default..

Add autoFill capabilities to jQuery-UI 1.8.1

http://stackoverflow.com/questions/2933713/add-autofill-capabilities-to-jquery-ui-1-8-1

.val '' else THIS IS CURRENTLY NOT LOGGING THE UI DATA IF THE USER DOES NOT EXPLICITLY SELECT THE SUGGESTED TEXT PLEASE..

jquery how to find if div with specific id exists

http://stackoverflow.com/questions/3373763/jquery-how-to-find-if-div-with-specific-id-exists

my code li.friend .live 'click' function name this .text IF STATEMENT CHECKING FOR EXISTING DIV SHOULD GO HERE IF DIV DOES.. IF STATEMENT CHECKING FOR EXISTING DIV SHOULD GO HERE IF DIV DOES NOT EXIST THEN APPEND ELEMENT div#chatbar .append..

jQuery keypress left/right navigation

http://stackoverflow.com/questions/4104158/jquery-keypress-left-right-navigation

the global website body . Pseudo Code ON Global Document IF Key Press LEFT ARROW THEN animate #showroom css 'left' 980px.. Press LEFT ARROW THEN animate #showroom css 'left' 980px IF Key Press RIGHT ARROW THEN animate #showroom css 'left' 980px..

jQuery: keyup for TAB-key?

http://stackoverflow.com/questions/4762594/jquery-keyup-for-tab-key

key So i'm having some trouble getting my script to run IF the Tab key is pressed. After some quick googling the charcode..

Loading JS script for only iOS devices?

http://stackoverflow.com/questions/4875914/loading-js-script-for-only-ios-devices

a JS file I initially thought about using some kind of IF statement and doing it on window size but that started to get..

jQuery If DIV Doesn't Have Class “x”

http://stackoverflow.com/questions/520250/jquery-if-div-doesnt-have-class-x

luck even though it's a simple question of how to use an IF statement... jquery share improve this question Use the..

Looking for jQuery easing functions without using a plugin

http://stackoverflow.com/questions/5207301/looking-for-jquery-easing-functions-without-using-a-plugin

ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. t current time b.. ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. EDIT Martin's comment..

option in dropdown box that changes an input box

http://stackoverflow.com/questions/5629263/option-in-dropdown-box-that-changes-an-input-box

'#otherFieldOption' .change function HIDES THE INPUT FIELD IF ANOTHER DROPDOWN ITEM IS SELECTED ONCE THE HIDDEN FIELD IS LOADED.. .viewInput function this.hide SHOWS THE INPUT FIELD ITEM IF SELECTED .viewInput this .val .show jquery onchange drop down..

Setting a PHP $_SESSION['var'] using jQuery

http://stackoverflow.com/questions/607673/setting-a-php-sessionvar-using-jquery

I need to set a PHP _SESSION variable using the jQuery. IF the user clicks on an image I want to save a piece of information..

jQuery hover dependent on two elements

http://stackoverflow.com/questions/6132006/jquery-hover-dependent-on-two-elements

hover out I need to do something with setTimeout and an IF statement but I have not been able to make any progress in that..

Detect IF hovering over element with jQuery

http://stackoverflow.com/questions/8981463/detect-if-hovering-over-element-with-jquery

IF hovering over element with jQuery I'm not looking for an action..

jQuery Mobile: document ready vs page events

http://stackoverflow.com/questions/14468659/jquery-mobile-document-ready-vs-page-events

Mobile document ready vs page events I am using JQuery Mobile and I am having trouble understanding difference between classic document ready and jQuery Mobile page events. Can someone tell me what is a real difference Why should.. difference between classic document ready and jQuery Mobile page events. Can someone tell me what is a real difference Why should document .ready be better then document .on 'pageinit' What is the order of page events transition from.. This can be a very subtle bug. On some systems it may appear that it works fine but on others it may cause erratic difficult to repeat weirdness to occur. Classic jQuery syntax document .ready function To solve this problem and trust me this..

How can I upload files asynchronously with jQuery?

http://stackoverflow.com/questions/166221/how-can-i-upload-files-asynchronously-with-jquery

data input name file type file input type button value Upload form progress progress First you can do some validation if you want. For example in the onChange event of the file ' file' .change function var file this.files 0 var name file.name.. 'upload.php' Server script to process data type 'POST' xhr function Custom XMLHttpRequest var myXhr .ajaxSettings.xhr if myXhr.upload Check if upload property exists myXhr.upload.addEventListener 'progress' progressHandlingFunction false For.. to process data type 'POST' xhr function Custom XMLHttpRequest var myXhr .ajaxSettings.xhr if myXhr.upload Check if upload property exists myXhr.upload.addEventListener 'progress' progressHandlingFunction false For handling the progress..

Event binding on dynamically created elements?

http://stackoverflow.com/questions/203198/event-binding-on-dynamically-created-elements

brandonaaron.net docs livequery #getting started but before I add another 5k to my pages with a plugin I want to see if anyone knows a way to do this either with jQuery directly or by another option. I can provide a code example if anyone needs.. to see if anyone knows a way to do this either with jQuery directly or by another option. I can provide a code example if anyone needs it. jquery events share improve this question Deprecated You can try using live function. http docs.jquery.com..

.prop() vs .attr()

http://stackoverflow.com/questions/5874652/prop-vs-attr

'style' do i use this .prop 'style' or this .attr 'style' or in this case do they do the same thing And if I do have to switch to using prop all the old attr calls will break if i switch to 1.6 UPDATE See this fiddle http jsfiddle.net.. or in this case do they do the same thing And if I do have to switch to using prop all the old attr calls will break if i switch to 1.6 UPDATE See this fiddle http jsfiddle.net maniator JpUF2 The console logs the getAttribute as a string and.. javascript jquery dom attr prop share improve this question Update 1 November 2012 My original answer applies specifically to jQuery 1.6. My advice remains the same but jQuery 1.6.1 changed things slightly in the face of the predicted pile..

jQuery Mobile: document ready vs page events

http://stackoverflow.com/questions/14468659/jquery-mobile-document-ready-vs-page-events

and then handled when a page is removed from the DOM Page loading jsFiddle example http jsfiddle.net Gajotres QGnft If AJAX is not enabled some events may not fire. Prevent page transition If for some reason page transition needs to be prevented.. example http jsfiddle.net Gajotres QGnft If AJAX is not enabled some events may not fire. Prevent page transition If for some reason page transition needs to be prevented on some condition it can be done with this code document .on 'pagebeforechange'.. times. There are few ways to prevent this problem Solution 1 Best solution would be to use pageinit to bind events. If you take a look at an official documentation you will find out that pageinit will trigger ONLY once just like document ready..

How do I “think in AngularJS” if I have a jQuery background?

http://stackoverflow.com/questions/14994391/how-do-i-think-in-angularjs-if-i-have-a-jquery-background

in another section below. Dependency injection To help us out with separation of concerns is dependency injection DI . If you come from a server side language from Java to PHP you're probably familiar with this concept already but if you're a.. directives aren't just collections of jQuery like functions what are they Directives are actually extensions of HTML . If HTML doesn't do something you need it to do you write a directive to do it for you and then use it just as if it was part.. to solve in jQuery already before you reach for the try to think about how to do it within the confines the AngularJS. If you don't know ask 19 times out of 20 the best way to do it doesn't need jQuery and to try to solve it with jQuery results..

How to filter the jqGrid data NOT using the built in search/filter box

http://stackoverflow.com/questions/2928371/how-to-filter-the-jqgrid-data-not-using-the-built-in-search-filter-box

the interface is appending of some additional parameters to the url sending to server and reloading the grid data. If you have your own interface for searching filtering some select controls or checkboxes for example you should just append.. .keyup function e keyupHandler e myReload this #CityId .change myReload .keyup function e keyupHandler e myReload this If user change selected option in select box with id StateId or another select box with id CityId with mouse or keyboard the.. .ajax request which jqGrid do for us the value from postData parameter will be forwarded to .ajax as data parameter. If some from properties of data are functions these function will be called by .ajax . So the actual data from select boxes..

jQuery AJAX cross domain

http://stackoverflow.com/questions/3506208/jquery-ajax-cross-domain

arr Now my problem When both of these files on same server either localhost or web server it works and alert Success If it is on different sides I mean testserver.php in web server and test.php on localhost its not working alert Error is executing...

XmlHttpRequest error: Origin null is not allowed by Access-Control-Allow-Origin

http://stackoverflow.com/questions/3595515/xmlhttprequest-error-origin-null-is-not-allowed-by-access-control-allow-origin

20 callback processImages minx 30 miny 0 maxx 0 maxy 150 . Origin null is not allowed by Access Control Allow Origin. If I query that URL from a browser directly it works fine. What is going on and can I get around this Am I composing my query.. perform a CORS request from a file URL. To clarify for other people here are the simple troubleshooting instructions If you're trying to use JSONP make sure one of the following is the case You're using .get and set dataType to jsonp . You're.. is the case You're using .get and set dataType to jsonp . You're using .getJSON and included callback in the URL. If you're trying to do a cross domain XMLHttpRequest via CORS... Make sure you're testing via http . Scripts running via file..

Abort Ajax requests using jQuery

http://stackoverflow.com/questions/446594/abort-ajax-requests-using-jquery

so you can just use abort . See the documentation abort Method MSDN . Cancels the current HTTP request. abort MDC . If the request has been sent already this method will abort the request. var xhr .ajax type POST url some.php data name John..

How can I make a redirect page in jQuery/JavaScript?

http://stackoverflow.com/questions/503093/how-can-i-make-a-redirect-page-in-jquery-javascript

put the originating page in the session history meaning the user won't get stuck in a never ending back button fiasco. If you want to simulate someone clicking on a link use location.href . If you want to simulate an HTTP redirect use location.replace.. get stuck in a never ending back button fiasco. If you want to simulate someone clicking on a link use location.href . If you want to simulate an HTTP redirect use location.replace . For example similar behavior as an HTTP redirect window.location.replace..

.prop() vs .attr()

http://stackoverflow.com/questions/5874652/prop-vs-attr

it . I can see the difficulty they were in but still disagree with his recommendation to prefer attr . Original answer If you've only ever used jQuery and not the DOM directly this could be a confusing change although it is definitely an improvement.. developers will have to learn a bit about the difference between properties and attributes. This is a good thing. If you're a jQuery developer and are confused by this whole business about properties and attributes you need to take a step..

How can I get query string values in JavaScript?

http://stackoverflow.com/questions/901115/how-can-i-get-query-string-values-in-javascript

query string values in JavaScript Is there a plugin less way of retrieving query string values via jQuery or without If so how If not is there a plugin which can do so javascript jquery url plugins query string share improve this question.. values in JavaScript Is there a plugin less way of retrieving query string values via jQuery or without If so how If not is there a plugin which can do so javascript jquery url plugins query string share improve this question You don't..

jQuery Mobile: Sending data from one page to the another

http://stackoverflow.com/questions/14776387/jquery-mobile-sending-data-from-one-page-to-the-another

DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci USE `test` Table structure for table `users` CREATE TABLE IF NOT EXISTS `users` `user_id` int 11 NOT NULL AUTO_INCREMENT `user_name` varchar 64 NOT NULL `user_pass` varchar 64 NOT NULL..

plugin illuminate 0.7 incompatible to jQuery 1.9.1 or jQuery-UI 1.10.3 -> TypeError: $.css(…) is undefined

http://stackoverflow.com/questions/18043125/plugin-illuminate-0-7-incompatible-to-jquery-1-9-1-or-jquery-ui-1-10-3-typeer

STRICT LIABILITY OR TORT INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. modified version function .fn.illuminate function options var defaults intensity..

How to detect linked PDF on a page and show message to download Adobe reader using jquery?

http://stackoverflow.com/questions/1899913/how-to-detect-linked-pdf-on-a-page-and-show-message-to-download-adobe-reader-usi

href 'http www.adobe.com products acrobat readstep2.html' target '_blank' Adobe Reader a . p document .ready function IF NUMBER OF PDF LINKS IS MORE THAN ZERO INSIDE DIV WITH ID maincontent THEN THIS WILL PUT TIP PARAGRAPH AS LAST CHILD OF DIV..

jsRender - How to call an external template from a nested template

http://stackoverflow.com/questions/19100184/jsrender-how-to-call-an-external-template-from-a-nested-template

when called directly _dropdown.tmpl.html option value value text option _if.tmpl.html tr td span class rightAlig IF span input type text id exp1_tbExp_ idSent class conditionInput td td input type text id ret1_tbExp_ idSent td td td tr..

Populate a DropDown/Select based on the value chosen on another DropDown

http://stackoverflow.com/questions/2174334/populate-a-dropdown-select-based-on-the-value-chosen-on-another-dropdown

Order is merely an Int32 order from ordering in a schedule not from business order The First DropDown uses this IF to check if a session is null then procedes to show a default message or bring a selected value as default. if TempData..

Add autoFill capabilities to jQuery-UI 1.8.1

http://stackoverflow.com/questions/2933713/add-autofill-capabilities-to-jquery-ui-1-8-1

.ui autocomplete li textEquals ' this .val ' .size 0 this .val '' else THIS IS CURRENTLY NOT LOGGING THE UI DATA IF THE USER DOES NOT EXPLICITLY SELECT THE SUGGESTED TEXT PLEASE HELP log ui.item Selected ui.item.value aka ui.item.id..

jquery how to find if div with specific id exists

http://stackoverflow.com/questions/3373763/jquery-how-to-find-if-div-with-specific-id-exists

the element but I don't know how to find this....here is my code li.friend .live 'click' function name this .text IF STATEMENT CHECKING FOR EXISTING DIV SHOULD GO HERE IF DIV DOES NOT EXIST THEN APPEND ELEMENT div#chatbar .append div class.. is my code li.friend .live 'click' function name this .text IF STATEMENT CHECKING FOR EXISTING DIV SHOULD GO HERE IF DIV DOES NOT EXIST THEN APPEND ELEMENT div#chatbar .append div class 'labels' div id ' name ' style 'display none ' div..

jQuery keypress left/right navigation

http://stackoverflow.com/questions/4104158/jquery-keypress-left-right-navigation

systems. The user can navigate the content while he is on the global website body . Pseudo Code ON Global Document IF Key Press LEFT ARROW THEN animate #showroom css 'left' 980px IF Key Press RIGHT ARROW THEN animate #showroom css 'left'.. global website body . Pseudo Code ON Global Document IF Key Press LEFT ARROW THEN animate #showroom css 'left' 980px IF Key Press RIGHT ARROW THEN animate #showroom css 'left' 980px I need a solution without any crossover Browsers OSs conflicts...

jQuery: keyup for TAB-key?

http://stackoverflow.com/questions/4762594/jquery-keyup-for-tab-key

keyup for TAB key So i'm having some trouble getting my script to run IF the Tab key is pressed. After some quick googling the charcode for Tab is 9. Also while we're talking is there any better..

Loading JS script for only iOS devices?

http://stackoverflow.com/questions/4875914/loading-js-script-for-only-ios-devices

Is there a way I can specifically target IOS devices to serve a JS file I initially thought about using some kind of IF statement and doing it on window size but that started to get a bit complicated and affects other non IOS devices. It just..

jQuery If DIV Doesn't Have Class “x”

http://stackoverflow.com/questions/520250/jquery-if-div-doesnt-have-class-x

to signify that it's selected. Searched on Google to no luck even though it's a simple question of how to use an IF statement... jquery share improve this question Use the not selector. For example instead of .thumbs .hover try .thumbs..

Looking for jQuery easing functions without using a plugin

http://stackoverflow.com/questions/5207301/looking-for-jquery-easing-functions-without-using-a-plugin

STRICT LIABILITY OR TORT INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. t current time b begInnIng value c change In value d duration .easing.jswing.. STRICT LIABILITY OR TORT INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. EDIT Martin's comment contained a link to graphs of every easing function's time..

option in dropdown box that changes an input box

http://stackoverflow.com/questions/5629263/option-in-dropdown-box-that-changes-an-input-box

DIV WRAPPING THE HIDDEN FIELD 'otherField' '#otherField' '#otherFieldOption' .change function HIDES THE INPUT FIELD IF ANOTHER DROPDOWN ITEM IS SELECTED ONCE THE HIDDEN FIELD IS LOADED .each .viewInput function this.hide SHOWS THE INPUT FIELD.. ITEM IS SELECTED ONCE THE HIDDEN FIELD IS LOADED .each .viewInput function this.hide SHOWS THE INPUT FIELD ITEM IF SELECTED .viewInput this .val .show jquery onchange drop down menu inputbox share improve this question here is a..

Setting a PHP $_SESSION['var'] using jQuery

http://stackoverflow.com/questions/607673/setting-a-php-sessionvar-using-jquery

a PHP _SESSION 'var' using jQuery I need to set a PHP _SESSION variable using the jQuery. IF the user clicks on an image I want to save a piece of information associated with that image as a session variable in php...

jQuery hover dependent on two elements

http://stackoverflow.com/questions/6132006/jquery-hover-dependent-on-two-elements

part is the place where I'm getting stuck. I'm thinking on the hover out I need to do something with setTimeout and an IF statement but I have not been able to make any progress in that area. Is that even an approach worth trying HTML div id..

Detect IF hovering over element with jQuery

http://stackoverflow.com/questions/8981463/detect-if-hovering-over-element-with-jquery

IF hovering over element with jQuery I'm not looking for an action to call when hovering but instead a way to tell if an element..