View Poll Results: Was this helpfull?
- Voters
- 5. You may not vote on this poll
-
Yes
5 100.00% -
No - you already know
0 0% -
No - its just bable to me
0 0%
Results 1 to 5 of 5
Threaded View
-
13th Jan 2010, 09:58 PM #1OPMemberWebsite's:
litewarez.net litewarez.com triniwarez.comIntroduction to jQuery
Heya all,
Just another tutorial from Meee
this time ill be going threw some of the jQuery usability with you
Firstly let me say im not expert in this i fell i am pretty good so i dont want people commenting about ive use incorrect terms for things etc.....
Lets get started
Ok firstly to me jQuery is like a box and n that box are lots of other boxes... each box can do something to a part of your site weather its a form a table a div it dont matter!
each box within the box is a function and what a function does is perform a set of javascript on a selection of your site, the selection is also called an element!
.................
jQuery is a function itself and the function is know as $ "doller sign"
ok lets get into some jQuery
PHP Code:
/*make sure jquery is loaded into your site before you perform any off the below code*/
/*
In javascript you shauld always make sure the document/page is fully loaded and ready,
this basically means when the DOM is fully compiled where ready! and we do this by the blow code
*/
$(document).ready(function(){
});
/*
Explaination:
The first symbol is the $ and this is jquery functiom
The next slice is (document) and this is what im telling jquery im using NOTE: $(item)
Now i have passed the document object into jquery i want to run a function on it witch is where the . comes in
$(document).ready() The .ready() is a function that will be run on document and takes 1 parameter witch is whats known as a callback function!
*/
ok we established how jquery runs functions on certain objects/id/classes we tell it to lets play around with a little css
PHP Code:$(document).ready(function(){
/*Jquery is loaded and the document is ready to be manipulated */
//Lets grab the div below and run the hover function on it
$('#KWWHunction').hover(
function(){ /*this function will be run when the mouse is over the div*/
/*Theres a special variable you can use in functions like this that is the element of the div and its called this*/
$(this).css('background-color','green')
}
function(){/*this function will be run when the mouse is NOT over the div*/
$(this).css('background-color','redd')
}
)
});
/*Header*/
<div id="KWWHunction">This is a div container on your site</div>
/*Footer*/
Ok thats the end of this tutorial and i hope you now know how to use jquery basics and make sure you check out the jquery documentation for examples and other wicked functions packed into it!!!litewarez Reviewed by litewarez on . Introduction to jQuery Heya all, Just another tutorial from Meee :D this time ill be going threw some of the jQuery usability with you Firstly let me say im not expert in this i fell i am pretty good so i dont want people commenting about ive use incorrect terms for things etc..... Lets get started Rating: 5Join Litewarez.net today and become apart of the community.
Unique | Clean | Advanced (All with you in mind)
Downloads | Webmasters
Notifications,Forum,Chat,Community all at Litewarez Webmasters
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
JQuery and RegExr Help :|
By Porsche_maniak in forum Web Development AreaReplies: 4Last Post: 1st Jun 2012, 12:26 AM -
JQuery help
By xElliex in forum Web Development AreaReplies: 5Last Post: 25th Aug 2011, 10:38 PM -
jQuery Tooltips Help
By Chris2k in forum Web Development AreaReplies: 1Last Post: 11th May 2011, 07:18 PM -
jQuery tooltip help :S
By Porsche_maniak in forum Web Development AreaReplies: 5Last Post: 20th Oct 2010, 04:27 PM -
jQuery tooltip help
By devilzkrazy in forum Technical Help Desk SupportReplies: 0Last Post: 22nd May 2010, 04:24 PM
themaCreator - create posts from...
Version 3.17 released. Open older version (or...