Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML

James Ingmire
James Ingmire
11,901 Points

Show/Hide Table Data. Is there a course available?

I have a timetable, Mon-Sun with certain times in which activities take place each day.

I would like to show these to the user by selecting the day and the results show; in table format. This would help save space on the page, however I can't find a html, css course on treehouse available?

Any advice or info would be helpful, thanks.

You could do this really easily with some JavaScript, more specifically using the jQuery library. I'm pretty sure HTML is for presentation only and allows no inherent interactivity, such as what you would need when "selecting the day."

James Ingmire
James Ingmire
11,901 Points

Any links you know of in order to learn this, can't find any on treehouse :(

3 Answers

There is a jQuery Basics course here: http://teamtreehouse.com/library/jquery-basics

However, I would recommend you go through the entire JavaScript Foundations course here first: http://teamtreehouse.com/library/javascript-foundations

It might not be necessary, but it will provide you with some valuable context to work in.

Learn that and what you want to do will be as easy as results.show()

Kevin Korte
Kevin Korte
28,149 Points

Not specifically that I remember, but you certainly could learn enough about this sort of functionally through lessons here to build this feature yourself.

The first question to get started that must be asked is whether or not the data that populates the table that you want to filter for lives in a database (and if so what is the back-end language used to retrieve it) or whether this information lives inside of the web file itself, essentially a static website?

James Ingmire
James Ingmire
11,901 Points

No its just simple static data inputted into table elements. Just wanted a simple click and show kind of action, not learnt javascript yet, is this possible in css ? I can not find any courses covering these elements tho, gone threw the html css courses already :(

Kevin Korte
Kevin Korte
28,149 Points

Yep easy enough the Javascript and Jquery lessons will get you pointed in the right direction. I don't believe there is anyway to so exactly what you want in straight CSS, but something to keep in the back of your mind is the css :target pseudo class. Might not work for you here, but it could become of some use to you.