blade1989 / NewOS

Seeking for a new os? you've come to the right place!
http://blade1989.github.io/NewOS/
0 stars 0 forks source link

Article are much to in-depth for some users #4

Closed blade1989 closed 9 years ago

blade1989 commented 9 years ago

As the ubuntu.html page implies, the article can be pretty in-depth. It is best to create a simple to `advanced``button, so users can choose how much they want to know about Ubuntu,and derivatives.

blade1989 commented 9 years ago

With a jquery script, we can hide selected sections.


Jquery

$(document).ready(function() {
    $(".detailed").hide();
    $(".simple_detailed").show();

    $('.simple_detailed').click(function() {
        $(".detailed").slideToggle();
    });

});

Button to switch between hide and show sections.

 <button class="simple_detailed">advanced</button>

Add the class="detailed" class to hide them and it will not display the content until the button is clicked. Example

    <button class="simple_detailed">advanced</button>

    <section class="detailed">
        Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
        tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
        quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
        consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
        cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
        proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
    </section>
blade1989 commented 9 years ago

The code mentioned above works great, though in early stages. It still needs further refinement. But, I find this bug to be fixed.