Search Google

Monday 14 July 2014

Learn advance html css jquery @bestsite

 
---------------------------------



Jquery

HTML
1
2
3
4
<div class="notice-warning">
  <div class="notice-close">&#215;</div>
  <strong>Warning!</strong> I&#8217;m about to lose my cool.
</div>
JavaScript
1
2
3
$('.notice-close').on('click', function(event){
  $('.notice-warning').remove();
});

Demo

See the Pen Event by Shay Howe (@shayhowe) on CodePen.

Event Methods

jQuery provides quite a few methods, all of which are based around registering user behaviors as they interact with the browser. These methods register quite a few events, most popularly, but not limited to, browser, form, keyboard, and mouse events. The most popular of these methods include:

Browser Events

  • .resize()
  • .scroll()

Document Loading

  • .ready()

Event Handler Attachment

  • .off()
  • .on()
  • .one()
  • jQuery.proxy()
  • .trigger()
  • .triggerHandler()
  • .unbind()
  • .undelegate()

Event Object

  • event.currentTarget
  • event.preventDefault()
  • event.stopPropagation()
  • event.target
  • event.type

Form Events

  • .blur()
  • .change()
  • .focus()
  • .select()
  • .submit()

Keyboard Events

  • .focusin()
  • .focusout()
  • .keydown()
  • .keypress()
  • .keyup()

Mouse Events

  • .click()
  • .dblclick()
  • .focusin()
  • .focusout()
  • .hover()
  • .mousedown()
  • .mouseenter()
  • .mouseleave()
  • .mousemove()
  • .mouseout()
  • .mouseover()
  • .mouseup

No comments:

Post a Comment