JQuery Learning Basics:
What is JQ? • An excellent JS library, large-scale development of the necessary JQ benefits? • Simplify the complex operation of JS • No need to care about compatibility • Provide a number of practical methods how to learn JQ? www.jquery.com JQ is only the auxiliary tool, must face correctly • Need to study the JQ design idea in stages? • Select page elements – simulate CSS selection elements – unique expression selection – Multiple filtering methods JQ notation – Method function – Chain operation – Value assignment JQ and JS relationship – can coexist and not mix
Instance:
<!DOCTYPE HTML><HTML><Head><MetaCharSet= "Utf-8"><title>jquery Basics</title></Head><Body><Divclass= "box"ID= "Div1">Test</Div> </Div><ul> <Li></Li> <Lititle= "Hello"></Li> <binclass= "box"></Li> <Liclass= "box"></Li> <Lititle= "Hello"></Li></ul></Body><Scriptsrc= "Jquery-1.10.1.min.js"></Script><Scripttype= "Text/javascript">//How to select elements: //$ ("#div1"). CSS (' background ', ' blue '); //$ (' div '). css (' background ', ' red ') //$ ('. Box '). CSS (' background ', ' green ');$('Li:eq (2)'). CSS ('background','Red'); //EQ is the equivalent of an array subscript;$('Li:even'). CSS ('background','Black'); $('li:odd'). CSS ('background','Pink');//even is an odd meaning; odd is an even number.//$ (' li '). Filter (' [Title=hello] '). CSS (' background ', ' blue ');//$ (' li '). Filter ('. box '). CSS (' background ', ' green ');</Script></HTML>
jquery Study note 2015-8-15 (94th Day)