Search the Community
Showing results for tags 'JQuery'.
-
An example on how to inject jQuery into a web page It can be useful to manage the page from AutoIt using jQuery. Idea from here: http://www.learningjquery.com/2009/04/better-stronger-safer-jquerify-bookmarklet Suggestions and improvements are welcome #include <ie.au3> Example() Func Example() Local $oIE = _IECreate("www.google.com") Local $jQuery = _jQuerify($oIE) MsgBox(0, "Version", "jQuery version: " & $jQuery.fn.jquery) MsgBox(0, "Example", "click ok to exit." & @CRLF & "Google logo will fad
-
Split multiple selectors for use with jQuery
guinness posted a topic in Developer General Discussion
I needed a quick and dirty approach to splitting up jQuery multiple selectors, so I could record if a selector pattern had already been used. So I came up with this "quick 'n' dirty" hack. If someone can up with better let me know. I tried to look at the sizzle source, but didn't have enough time to plough through 2000 lines of code. // Split the following multiple selectors into an array var selector = '#nav-bar-temp-1 a, #nav-bar-temp-2 a'; console.log(getSelectors(selector)); /** * Get a list of selectors (singule or multiple) * * @param {string} selector A valid jQuery- 2 replies
-
- jquery
- javascript
-
(and 3 more)
Tagged with:
-
(function goodExample($) { var $selector = $('.someClass'); // Stop flickering $selector.hide(); $selector.css({ background: 'blue', }); $selector.show(); }(window.jQuery)); (function badExample($) { // Stop flickering $('.someClass').hide(); $('.someClass').css({ background: 'blue', }); $('.someClass').show(); }(window.jQuery)); By not caching jQuery selector objects, means each time the DOM needs to be traversed to find each element with the class name of 'some
-
I was look at the difference between the current jQuery and v3.0. What I noticed was the following had be changed in once section of the code. Now I am wondering is there a performance difference in an interpreted language with regards to >= compared to just >, or is it pure readability only? Is it the fact there is one less char to check before before evaluating? variable >= 0 (v2.0.*) changed to variable > -1 (v3.0.*)
-
Hello, this is a little piece of code, I use to generate an index.html page. (The index.html is a starting point to navigate through the local file structure and openend via a link from our web application.) Workflow: 1) Read the file structure (recursive) 2) Write the html file (which includes, the images as inline html, the css and the complete javascript [all minified]) The files can be sorted by --> 0 = filename, 1 = file creation time, 2 = Size of file Thanks to KaFu and Melba23 #region ;************ Includes ************ #include-once #include <Array.au3> #endr