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 trialJames Ingmire
11,901 PointsShow/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.
James Ingmire
11,901 PointsAny links you know of in order to learn this, can't find any on treehouse :(
3 Answers
miikis
44,957 PointsThere 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
28,149 PointsNot 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
11,901 PointsNo 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
28,149 PointsYep 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.
James Ingmire
11,901 Pointshttps://developer.mozilla.org/en-US/docs/Web/CSS/:target#Examples
Will be giving this a read, thanks Kevin.
James Ingmire
11,901 PointsThank you both!
miikis
44,957 Pointsmiikis
44,957 PointsYou 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."