Ricky Barnes has Published 119 Articles

What is an Event Object in jQuery?

Ricky Barnes

Ricky Barnes

Updated on 11-Dec-2019 06:32:29

410 Views

The callback function takes a single parameter; when the handler is called the JavaScript event object will be passed through it.The event object is often unnecessary and the parameter is omitted, as sufficient context is usually available when the handler is bound to know exactly what needs to be done ... Read More

What are event attributes in jQuery?

Ricky Barnes

Ricky Barnes

Updated on 11-Dec-2019 06:21:12

500 Views

jQuery events have attributes such as for keyup and keydown events, if the Ctrl key was pressed, timestamp when the event created, etc.The following are some of the event properties/attributes available:S.NoProperty & Description1altKeySet to true if the Alt key was pressed when the event was triggered, false if not. The ... Read More

How can I bind all events on a DOM element using jQuery?

Ricky Barnes

Ricky Barnes

Updated on 11-Dec-2019 06:04:49

689 Views

The bind( type, [data], fn ) method binds a handler to one or more events (like click) for each matched element. It can also bind custom events.Possible event values − blur, focus, load, resize, scroll, unload, click etc.Here is the description of all the parameters used by this method −type − ... Read More

How to check the element type of an event target with jQuery?

Ricky Barnes

Ricky Barnes

Updated on 11-Dec-2019 06:02:58

2K+ Views

To check the element type pf an event target, using the is() method.ExampleYou can try to run the following code to check the element type:Live Demo $(document).ready(function(){    $( "ul" ).click(function( event ) {       var target = $( event.target );       ... Read More

How to fetch nth div from an HTML page using jQuery?

Ricky Barnes

Ricky Barnes

Updated on 09-Dec-2019 07:59:33

272 Views

To fetch the nth div from an HTML page, use the jQuery eq() method. It is used to access the index of an element in jQuery. The eq() method refers the position of the element.ExampleYou can try to run the following code to learn how to fetch nth div from ... Read More

How to access index of an element in jQuery?

Ricky Barnes

Ricky Barnes

Updated on 09-Dec-2019 07:58:09

877 Views

To access the index of an element in jQuery, use the eq() method. The eq() method refers the position of the element.ExampleYou can try to run the following code to learn how to access index of an element in jQuery, Live Demo $(document).ready(function(){    $('ul li').eq(2).css({'background-color':'#E6B16A'});}); ... Read More

How to access element with nth index in jQuery?

Ricky Barnes

Ricky Barnes

Updated on 09-Dec-2019 07:50:04

1K+ Views

To access element with nth index from an HTML page, use the jQuery eq() method. It is used to access the index of an element in jQuery. The eq() method refers the position of the element.ExampleYou can try to run the following code to access element with nth index in ... Read More

How to remove all CSS classes using jQuery?

Ricky Barnes

Ricky Barnes

Updated on 06-Dec-2019 10:33:52

5K+ Views

To remove all classes, use the removeClass() method with no parameters. This will remove all of the item's classes.ExampleYou can try to run the following code to remove all CSS classes using jQuery:Live Demo           jQuery Selector                 ... Read More

What is GRUB in Linux?

Ricky Barnes

Ricky Barnes

Updated on 30-Jul-2019 22:30:23

10K+ Views

The GRUB (Grand Unified Bootloader) is a bootloader available from the GNU project. A bootloader is very important as it is impossible to start an operating system without it. It is the first program which starts when the program is switched on. The bootloader transfers the control to the operating ... Read More

Advertisements