Jump to content

Jquery auto hide


Recommended Posts

Hi guys using this code to hide table contents but how can i make the table hidden on page load

$('.header').click(function () {    var $this = $(this);    $(this).nextUntil('tr.header').slideToggle(100).promise().done(function () {        $this.find('span').text(function (_, value) {            return value == '-' ? '+' : '-'        });    });});

http://jsfiddle.net/y4Mdy/

 

Thanks

Link to post
Share on other sites

what have you tried? this seems like a very trivial thing, I'm sure there would be plenty of google searches for this...

 

https://www.google.com/search?q=hide+element+on+page+load+jquery&oq=hide+element+on+page+load+jquery&aqs=chrome..69i57j0l3.6532j0&sourceid=chrome&ie=UTF-8

 

 

$(document).ready(function(){  $('.table-selector-here').hide();});
Link to post
Share on other sites

Thanks for the reply but that does'nt work with my code i dont need to hid a div just the table cells

 

ah, ok. that really wasn't clear from your original post though.

 

 

Hi guys using this code to hide table contents but how can i make the table hidden on page load

Edited by thescientist
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...