About Lesson
318 total views, 1 views today
Let’s take a look at the show/hide element methods.
Q.fn.hide = function () {
return this.each(function(e){
e.style.display = 'none';
});
}
Q.fn.show = function () {
return this.each(function(e){
e.style.display = 'block';
});
}
To hide the element we simply loop through all selections and set each element’s style.display property to “none”.
To show the element we loop through all selections and set each element’s style.display property to “block”.
Let’s test the code
setTimeout(()=> {
Q(“#tasks”).hide();
}, 1000);
setTimeout(()=> {
qQ”#tasks”).show();
}, 3000);
Exercise Files
No Attachment Found
Lesson List
Coding the library
In this session we will create the DOM library step by step
0/19
Building the Slide Show/ Image Gallery App
In this session we will code a slide show/image gallery app using the library we created.
0/1
This feature has been disabled by the administrator