Please enable JavaScript.
Coggle requires JavaScript to display documents.
Javascript Programming (Advance Javascript Features (ES6/TS) (Classes…
Javascript Programming
Intermediate Javascript
-
-
Common Built-In Objects
-
Promise Object: (resolve, reject)=>{}.then().catch().
JSON Object: parse(), stringify()
Generator Object: next(),return(), throw()
-
-
Function Object: apply(), call(), bind()
-
-
-
JQuery ($)
-
Events
Mouse Events (shortcuts)
.mousedown( [eventData ], handler )
.mouseenter( [eventData ], handler )
.hover( handlerIn, handlerOut )
.mouseleave( [eventData ], handler )
.dblclick( [eventData ], handler )
.mousemove( [eventData ], handler )
.contextmenu( [eventData ], handler )
.mouseout( [eventData ], handler )
.mouseover( [eventData ], handler )
.mouseup( [eventData ], handler )
.click( [eventData ], handler )
.toggle( handler, handler [, handler ] )
-
Main Method
$("selector").off( events [, selector filter ] [, handler ] )
$("selector").on(events [, selector filter][,data], handlerFn)
Form Events (shortcuts)
.focusin( [eventData ], handler )
.focusout( [eventData ], handler )
.focus( [eventData ], handler )
.select( [eventData ], handler )
.change( [eventData ], handler )
.blur( [eventData ], handler )
.submit( [eventData ], handler )
Content Manipulation
$("selector").prepend("newContent") - inside tag, at front
-
$("selector").append("newContent") - inside tag, at end
-
-
-
-
-
-
-
-
$("selector").replaceWith("content") - see above, content can be a callback function
-
AJAX
-
-
-
-
-
-
-
$.get( url [, data ] [, success ] [, dataType ] )
$.getJSON( url [, data ] [, success ] )
$.getScript( url [, success ] )
$.load( url [, data ] [, complete ] )
-
$.post( url [, data ] [, success ] [, dataType ] )
$.ajax( url [, settings ] ) - basic method, shortcuts below
Animation Effects
$("selector").hide(optTime, optEffect);
$("selector").toggle("slow", completionFn);
$("selector").show(optionalTime, optionalEffect);
-
-
$("selector").fadeTo(optTime, optOpacity, completionFn)
$("selector").slideDown(optTime, effect, completionFn)
$("selector").slideToggle(optTime, effect, completionFn)
$("selector").slideUp(optTime, effect, completionFn)
-
Selector Filters
:gt(), :lt(), eq() - greater than, less than, equal
-
-
-
-
-
-
-
-
-
-
Attribute Manipulation
$("img").attr({ src: "image.jpg", title:"IMAGE"}) - add attrib using object
$("a").attr("target", "_blank") - add attribute, open in new tab
-
-
-