Html miscellaneous
- Which of the following is not the fade method in jQuery?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
jQuery has various fade methods including fadeout(), fadeTo(), fadeToggle(), fadeIn().
The syntax of fadeIn() is $(selector).fadeIn(speed,callback);
For fadeout() we use $(selector).fadeOut(speed,callback);
For fadeToggle we use $(slecetor).fadeToggle(speed,callback);
For fadeTo() syntax is $(selector).fadeTo(speed,opacity,callback).
- hover() method is the combination of ____________.
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
hover() method is the combination of mouseleave() and mouseenter(). It takes two functions. When the mouse leaves HTML element then mouseleave() function is called and when mouse enters HTML element then mouseenter() function is called.
- Which of the following is not event method in jQuery?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: A
The actions that can be performed on the web page are called events. Some common DOM events are blur(), click(), bilnd(), change(), dbclick(), eroor(), delegate(), die(), event.data, event.currentTarget, event.pageX, mouseenter(), mousedown(), event.result, event.target, focus(), hover(), keydown(), focusout(), live(), load(), keyup() etc.
- In jQuery all the elements are selected by writing ____________.
-
View Hint View Answer Discuss in Forum
NA
Correct Option: B
In jQuery all the elments are selected by writing $(“*”). $(this) helps in selecting current HTML element. All the button elements are selected by writing $(“:button”). If we want to select a specific class we should write $(“.class_name”).
- What is the correct syntax of jQuery?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
The basic syntax of jQuery is $(selector).action(), $ sign defines access of jQuery, (selector) is HTML element, action() is for the jQuery action that is to be performed. E.g. $(“h1”).hide(), this will hide all the <h1> elements.