Re. DOM lessons in javascript


#1

To make our projects visible when the 'Recent Projects' button is clicked, jQuery provides a function named show, which is the opposite of hide.

To show an element, the syntax looks as such:

$('.example-class').show();
show is attached directly to the jQuery selector.
show will change the CSS attribute display: none to a visible display property, therefore showing the element.
For the above under java script I have coded the following:

function main() {
$('.skillset').hide();
$('.skillset').fadeIn(1000);
$('.projects').hide();
$('.projects-button').on('click', function(){
// $('.projects').show();
});
$(document).ready(main());
But it is giving me an error:
Oops! The test returned an error. Maybe you have a syntax error, or a typo. See full error.

Am not able to identify the error & proceed beyond this
Pls help


#2

The topic is missing a link to the exercise. Please post.


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.