Site logo

Archived topic

jquery function in static site

5 replies · Started by Christoph on October 4, 2015

Viewing posts 1–6 of 6

Hey,

I´ve found out, that the more-tag is only working in articles but not in sites - is that right?

If so, i´d like to use this funktion:

$('#more').click(function() {
    jQuery(this).text('less about us');
    if($('#extra').is(':visible')){
          jQuery(this).text('Less about us');
    }else{
          jQuery(this).text('More about us');
    }
    $('#extra').slideToggle('fast');
    return false;
});

to hide/show html elements

<a href="#" id="more">More about us</a>
<div id="extra">ghjjkkhjhg</div>

Where are you wanting to use that function? On your Blog posts?

I´d like to use it in an Impressum page, to toggle an/off the details for "GTC", "site notice" and "liability"

Thank you very much!!!
That was the solution ;-)

No problem! :)

This archived topic is closed to new replies.