Posts

Showing posts with the label show/hide

Explaining The Basics Of A Show/Hide Implementation Of The Css :Target

I institute the code on StackOverflow for a uncomplicated CSS based hide/show scenario , it is an incredibly curt slice of code, exactly for the uninitiated it is hard to sympathise at showtime what is truly going on. So what I did showtime is to intermission downward the CSS into what happens at page charge fourth dimension as well as what happens at the indicate at which a target is linked to: /* happens on charge */ .answer, #show { display: none; } /* happens when demo is clicked */ #hide:target { display: none; } #hide:target + #show, #hide:target .answer { display: inline; } To explain: At charge fourth dimension whatever chemical component division where the shape is answer  or the id is show  is laid upwardly non to display.  When a target amongst an id of hide is "targeted", i.e. from a link amongst <a href="#hide">[Text]</a> , then: the content amongst the hide id volition non display. any chemical component divi...

How To Show/Hide Read To A Greater Extent Than Link Alongside Jquery?

Sometimes y'all convey long text together with few infinite to demo it, amongst jQuery together with CSS is real unproblematic to enshroud component division of the text together with usage a "Read more" link. So, this is the HTML, delight banking concern complaint that the value of links DIV ID is replicated equally CLASS inward the links together with inward the extra text: <div class="section"> <div id="lorem"> Lorem ipsum dolor sit down amet <a class="read lorem" href="http://www.blogger.com/blogger.g?blogID=2335294175322090003#">(Read more...)</a>  <a class="read enshroud lorem" href="http://www.blogger.com/blogger.g?blogID=2335294175322090003#">(Hide...)</a>  </div> <div class="more lorem"> Praesent commodo, tellus vehicula facilisis laoreet,enim tellus sagittis metus, vel posuere risus tellus vel quam. Praesent fermentum, risus nec sagittis volu...