JQuery User Interface

  Home  Client Side Scripting  JQuery User Interface


“JQuery User Interface frequently Asked Questions by expert members with experience in JQuery UI. These questions and answers will help you strengthen your technical skills, prepare for the new job test and quickly revise the concepts”



17 JQuery User Interface Questions And Answers

3⟩ Can you explain JQuery UI?

JQuery UI is a library which is built on top of JQuery library. JQuery UI comes with cool widgets, effects and interaction mechanism.

 228 views

6⟩ How is body onload() function is different from document.ready() function used in jQuery?

Document.ready() function is different from body onload() function because off 2 reasons.

1. We can have more than one document.ready() function in a page where we can have only one onload function.

2. Document.ready() function is called as soon as DOM is loaded where body.onload() function is called when everything gets loaded on the page that includes DOM, images and all associated resources of the page.

 221 views

8⟩ What does dollar Sign ($) means in JQuery?

Dollar Sign is nothing but it’s an alias for JQuery. Take a look at below jQuery code

$(document).ready(function(){

});

Over here $ sign can be replaced with “jQuery ” keyword.

jQuery(document).ready(function(){

});

 227 views

11⟩ How can we submit a form by ajax using Jquery?

Please follow below code to submit a form by ajax using jquery

$(‘#formid).submit(function() {

$.ajax({

type: “POST”,

url: “back.php”,

data: “name=php&location=india”,

success: function(msg) {

alert( “Data Saved: ” + msg );

}

});

}

Where formid is the form ID.”POST” is the method by which you want to send data.You can also use “GET” method.”back.php” is the php file which you want to call.”name=php&location=india” This is values of control. success: function(msg){ alert (“Data Saved: ” + msg); } This is a success function, This will execute after success of you post.Often in Ajax back.php does not refresh because this is cached by browser. To avoid this issue add [cache: false,] in above code.Loads data synchronously. Blocks the browser while the requests is active. It is better to block user interaction by other means when synchronization is necessary.

To avoid this issue add [async: false,] in above code.

 218 views

12⟩ How can we modify css class using JQuery library?

Suppose that Css class has following defination

.class

{

font-size:10px;

font-weight:normal;

color:#000000;

}

now we want to add border property on above class, so we should follow below code.

$(“.class”).css(“border”,”1px solid blue”);

Where $(“.class”) name of css class. Now .class will automatically add border property in his class definition.

 233 views

13⟩ How can we apply css in div element using JQuery library?

This is example to apply css on a div element which have id name myDivId.

$(”#myDivId “).css(”border”,”3px solid red”);

To apply css on all div elements use below code.$(“div”).css(“border”,”3px solid red”);

Where$(“div”) pointing all div elements in the page.For You need to use.$(”P”) on above code.

 238 views

15⟩ Can we combine Jquery combined with other libraries?

Jquery combined with other java script libraries like prototype, mootools that time Jquery coding will be conflict with other libraries.

So that time use this command for non -conflict jquery with other java script libraries.

jQuery.noConflict();

 212 views

16⟩ What is Jquery? How Jquery will work?

Jquery is lightweight javascript library file.

Jquery run in all browsers.

Jquery is client side scripting language.

Jquery browser depended framework.

Jquery developed by javascript.

 215 views

17⟩ What is jQuery UI?

jQuery UI is a JavaScript library that provides abstractions for low-level interaction and animation, advanced effects and high-level, themeable widgets, built on top of the jQuery JavaScript library, that can be used to build interactive web applications. It was released in September 2007, announced in a blog post by John Resig on jquery.com. The latest release, 1.10.4, requires jQuery 1.6 or later.

 217 views