What is the difference between bind() and live() method in jQuery ?Jquery interview question set 2/Jquery Interview Questions and Answers for Freshers & Experienced

What is the difference between bind() and live() method in jQuery ?

The binding of event handlers are the most confusing part of jQuery for many developers working on jQuery projects. Many of them unsure of which is better to use. In this article we will see the main differences between Bind and Live methods in jQuery.

Bind() Method

The bind method will only bind event handlers for currently existing items. That means this works for the current element.

Example

$(document).ready(function () {
$('P').bind('click', function () {
alert("Example of Bind Method");
e.preventDefault();
});
});

Live() Method
The Live method can bind event handlers for currently existing items or future items.

Example

$(document).ready(function() {
$('P').live('click', function() {
alert("Example of live method");
e.preventDefault();
});
$('body').append('<p>Adding Future items</p>');

});

Posted Date:- 2021-09-01 05:10:00

How jQuery stores data related to an element?

What is the difference between jQuery.get() and jQuery.ajax() ?

What is Method Chaining in jQuery? What advantages does it offer?

What is the use of the val() method in jQuery?

What is the use of the serialize() method in jQuery?

Describe the functionality of read cookies, write cookies and delete cookies in jQuery.

Differentiate between width() vs css(‘width’) in jQuery.

What is jQuery Effects - Fading?

What is jQuery UI Sortable and how to use it?

What is chaining in jQuery?

How to add and remove CSS classes to an element using jQuery?

What is the use of the toggle() method in JQuery?

Difference between prop and attr?

What are all the ways to include jQuery on a page?

What is the difference between Map and Grep function in jQuery?

List the four parameters used for the jQuery Ajax method.

Can you give some situations or scenarios for using jQuery?

Can I use a jQuery library for server scripting?

Identify any difference between .detach() and .remove() of jQuery.

Explain any of the advantages of hosting a jQuery from CDN.

What are jQuery plugins?

What is queue() in Jquery? Use of queue() in jquery?

What is jQuery Datepicker in jQuery?

What is the use of html() method in JQuery?

Explain the functionality of jQuery UI (user interface).

Differentiate between jquery.min.js and jquery.js

Explain the Applications for jQuery Mobile.

What are the four parameters used for the jQuery Ajax method?

Briefly explain the bootstrap and JavaScript plug-in.

Differentiate between the ID and Class selector in jQuery.

What is the difference between $(window).load and $(document).ready function in jQuery?

What is the difference between bind() vs live() vs delegate() methods in jQuery?

Differentiate among .empty() vs .remove() vs .detach() in jQuery.

What is jQuery.noConflict?

Explain the difference between the .detach() and remove() methods in jQuery.

What is the advantage of hosting a jQuery using a CDN?

What is Qunit?

What is a Data Table plug-in for jQuery?

Is it possible that jQuery HTML works for both HTML and XML documents?

What is the difference between jquery.min.js and jquery.js?

What is jQuery connect?

What is the difference between onload() and document.ready() methods?

Define jQuery UI Autocomplete ?

What $(document).ready(function()) is and when to use it?

What is the history of jQuery UI and how to use it?

What is the usage of Draggable, Droppable, Resizable, Selectable in jQuery UI?

Define Add or Remove class in jQuery?

What is resize() function in jQuery?

What is the difference between bind() and live() method in jQuery ?

What are jQuery plugins?

Search
R4R Team
R4R provides Jquery Freshers questions and answers (Jquery Interview Questions and Answers) .The questions on R4R.in website is done by expert team! Mock Tests and Practice Papers for prepare yourself.. Mock Tests, Practice Papers,Jquery interview question set 2,Jquery Freshers & Experienced Interview Questions and Answers,Jquery Objetive choice questions and answers,Jquery Multiple choice questions and answers,Jquery objective, Jquery questions , Jquery answers,Jquery MCQs questions and answers Java, C ,C++, ASP, ASP.net C# ,Struts ,Questions & Answer, Struts2, Ajax, Hibernate, Swing ,JSP , Servlet, J2EE ,Core Java ,Stping, VC++, HTML, DHTML, JAVASCRIPT, VB ,CSS, interview ,questions, and answers, for,experienced, and fresher R4r provides Python,General knowledge(GK),Computer,PHP,SQL,Java,JSP,Android,CSS,Hibernate,Servlets,Spring etc Interview tips for Freshers and Experienced for Jquery fresher interview questions ,Jquery Experienced interview questions,Jquery fresher interview questions and answers ,Jquery Experienced interview questions and answers,tricky Jquery queries for interview pdf,complex Jquery for practice with answers,Jquery for practice with answers You can search job and get offer latters by studing r4r.in .learn in easy ways .