$jQuery

Plan your Research & Development and track all outcomes

Get Started. It's Free
or sign up with your email address
Rocket clouds
$jQuery by Mind Map: $jQuery

1. Selectors $([some selector])

1.1. #id

1.2. .class

1.3. :visible / :hidden

1.4. :first/:last

1.5. :even / :odd

1.6. :eq(0) / :nth(0)

1.7. [foo=bar]

1.7.1. "foo" attribute value is exactly equal to "bar"

1.7.2. Types

1.7.2.1. :password, :radio,  :checkbox,  :submit,  :image, :reset,  :button, :file

2. Events

2.1. .hover()

2.1.1. hover (overfunc, outfunc)

2.2. .toggle()

2.2.1. toggle(evenfunc, oddfunc)

2.3. .event ()

2.3.1. mouseleave, mousemove, mouseout,  mouseover, mouseup, resize, scroll, select,  submit, unload, blur, change, click, dblclick, error, focus,keydown, keypress, keyup, load, mousedown, mouseenter

2.4. .trigger()

2.4.1. trigger (type, data)

2.5. .bind() / .unbind()

2.5.1. bind (type,data,func)

2.5.2. unbind (type,func)

3. DOM Manipulation

3.1. before(content) / after(content)

3.1.1. Creates a new sibling before/after element

3.2. insertBefore(expr) / insertAfter(expr)

3.2.1. Attach selected elements as new sibling to others

3.3. prepend(content) / append(content)

3.3.1. Creates a new child node at the beginning/end

3.4. empty()

3.4.1. Removes all child nodes and content

3.5. remove()

3.5.1. Remove element from DOM

3.6. clone([boolean])

3.6.1. Clone event handlers if passed true

4. CSS

4.1. css(name)

4.1.1. Get val from first element in list only

4.1.2. css(key,val)

4.1.3. css( {key:val, key:val} )

4.2. offset() / position()

4.2.1. Returns {top,left} relative to doc or offset parent

4.3. scrollTop([num]) / scrollLeft([num])

4.3.1. Scroll position of first element only

4.4. height() / height(val) / width() / width(val)

4.5. innerHeight() / innerWidth()

5. Effects

5.1. Speed

5.1.1. slow

5.1.2. fast

5.1.3. normal

5.1.4. #ms

5.2. animate

5.2.1. animate(params, speed, easing, callback)

5.2.2. animate (params, options)

5.3. hide/show (speed [,callback])

5.4. fade

5.4.1. fadeIn (speed, callback)

5.4.2. fadeOut (speed, callback)

5.4.3. fadeTo(speed, opacity, callback)

5.5. slide

5.5.1. slideUp(speed, callback)

5.5.2. slideDown(speed, callback)

5.5.3. slideToggle(speed, callback)

5.6. toggle

5.6.1. toggle (speed,fn)

5.6.2. toggle( [ boolean] )

6. Ajax

6.1. get

6.1.1. $.get ( url, properties, fn(data) )

6.2. getJSON

6.2.1. $.getJSON (url,props,fn(json) )

6.3. post

6.3.1. $.post ( url, props, fn(data) )

6.4. load

6.4.1. .load (url, props, fn(responseText,status,xhr) )

6.5. .serialize()

6.5.1. single=Single&multiple=Multiple

6.6. .serializeArray()

6.6.1. [  {    name:"a",      value: "1"  },  {    name: "b",    value: "2"  }]

7. Attributes

7.1. attr()

7.1.1. attr(name)

7.1.2. attr(name, func)

7.1.3. attr(name,val)

7.1.4. attr({name:val})

7.1.5. removeAttr(name)

7.2. class()

7.2.1. addClass(c)

7.2.2. hasClass(c)

7.2.3. removeClass(c)

7.2.4. toggleClass(c[,switch])

7.3. html()

7.3.1. html(content)

7.3.1.1. Add new html content

7.3.2. html()

7.3.2.1. Read html content

7.4. text()

7.4.1. text()

7.4.1.1. Read content without html tags

7.4.2. text(content)

7.4.2.1. Adding new content, text only

7.5. val()

7.5.1. val()

7.5.1.1. Read current value of form element)

7.5.1.1.1. input

7.5.1.1.2. textarea

7.5.1.1.3. selectbox

7.5.1.1.4. checkbox

7.5.1.1.5. radio

7.5.1.1.6. button

7.5.2. val(content)

7.5.2.1. Set new content to form element

8. Traversing

8.1. add

8.1.1. Append more elements to the set of matched elements

8.1.2. add(expr)

8.1.3. add(html)

8.1.4. add(Element)

8.2. contains

8.2.1. $("div").contains('text') === $("div :contains('text')")

8.3. filter

8.3.1. Leave elements matching expr or func returning true

8.4. find

8.4.1. $("p").find("span") === $("p span")

8.5. is(expr [,expr])

8.5.1. Returns true if any in set matches expr. Complex selectors ok

8.5.1.1. $('checkbox').is(':checked')

8.6. parent([expr])

8.6.1. Immediate parent, if matches expr

9. Types

9.1. Array

9.1.1. $.each (obj, func)

9.1.1.1. For loop similar to for...in

9.1.2. $.unique (array)

9.1.2.1. Removes all duplicates from given array

9.1.3. $.map (array, func)

9.1.3.1. Edit every element through internal loop and update given array

9.1.4. $.isArray (obj)

9.1.4.1. Checks if given variable is array or not

9.1.5. $.inArray (value, array)

9.1.5.1. Checks  if given value is contained in array

9.2. String

9.2.1. $.trim (str)

9.2.1.1. Removes empty spaces from begin/end

9.2.2. .concat()

9.2.2.1. string1.concat(str2)

9.2.2.1.1. Merge 2 strings

9.2.3. indexOf(searchvalue, [start])

9.2.3.1. Returns the position of the first occurrence of a specified value

9.2.4. substr(start, [length])

9.2.5. toLowerCase()

9.2.6. toUpperCase()

9.2.7. replace(searchvalue, newvalue)

9.2.8. slice(start, [end])

9.2.8.1. Extracts part of the string and returns it in a new variable

9.2.9. split(separator, [limit])

9.2.9.1. var myString = "23/05/2013"; var arr = myString.split('/');

9.2.9.1.1. [ 23,05, 2013 ]

9.2.10. String(Int)

9.2.10.1. Converts number to string

9.3. Number

9.3.1. $.isNumeric(Object)

9.3.1.1. Returns true if the object is a number.

9.3.2. .parseInt()

9.3.2.1. Converts string to int

9.3.3. .parseFloat()

9.3.3.1. Converts string to float value

9.3.4. .isNaN()

9.3.4.1. Parsing something that isn't a number results in NaN.