1 : How to check an element is exist in a form using JQuery or not?
Options:
  1. if (#("myControlId")){
      // your logic goes here
    }
    
  2. if ($("#myControlId").exists){
      // your logic goes here
    }
    
  3. if ($("#myControlId")){
      // your logic goes here
    }
    
  4. if (exists("#myControlId")){
      // your logic goes here
    }
    

Answer: Option 3

Explanation:

You can use check the element is exists or not using simple if statement and the control id of an element for eg

if ($("#myControlId")){
  // your logic goes here
}
Discuss this in Forums

How do you rate this queston?  Very Easy  Easy  Average  Above Average  Tough

2 : How to remove css class using JQuery?
Options:
  1. class.add("yourCSSClass")
  2. #cssClass("myDiv").remove("className")
  3. removeClass("#myDiv")
  4. $("divId").removeClass("yourCSSClass");

Answer: Option 4

Explanation:

You can use removeCLass() function of JQuery to add css class to a control. for eg $("divId").removeClass("yourCSSClass"); Discuss this in Forums

How do you rate this queston?  Very Easy  Easy  Average  Above Average  Tough

3 : How to add css class to a control using JQuery?
Options:
  1. $("divId").addClass("yourCSSClass");
  2. #cssClass("myDiv").add("className")
  3. addClass("#myDiv")
  4. class.add("yourCSSClass")

Answer: Option 1

Explanation:

You can use addClass() function of JQuery to add css class to a control. for eg $("divId").addClass("yourCSSClass"); Discuss this in Forums

How do you rate this queston?  Very Easy  Easy  Average  Above Average  Tough

4 : How to select an element using JQuery?
Options:
  1. $("#myDiv")
  2. element("myDiv")
  3. #("myDiv")
  4. select.element("myDiv")

Answer: Option 1

Explanation:

You can use $("#myDiv") code to select an element using Query. In this code we select an element whose id is myDiv. Discuss this in Forums

How do you rate this queston?  Very Easy  Easy  Average  Above Average  Tough

5 : How to make control enabled using JQuery?
Options:
  1. attr('disabled', true);
  2. attr('enabled', true);
  3. attr('enabled', false);
  4. removeAttr('disabled');

Answer: Option 4

Explanation:

By default all the control will be enabled. But if you would like to control enable you can use removeAttr('disabled') to make control enabled foe eg. $('#myControl').removeAttr('disabled'); Discuss this in Forums

How do you rate this queston?  Very Easy  Easy  Average  Above Average  Tough




Download StudyAlways app from google play





First they ignore you, then they ridicule you, then they fight you, and then you win.
-Mahatma Gandhi