WordPress.org

Ready to get started?Download WordPress

Forums

Tiny Forge
[resolved] Add simple show/hide div ajax (4 posts)

  1. yandoos
    Member
    Posted 8 months ago #

    Can anybody tell me where I can add a short ajax function to toggle show/hide that I can then use on a div on a page please?
    I tried in theme function and it broke the wordpress website until I manually removed it.

    $(function() {
    $('#toggle').click(function() {
    $('.toggle').toggle('slow');
    return false;
    });
    });

    Link <div class="toggle">

    Thank you

  2. Tomas Mackevicius
    Member
    Theme Author

    Posted 8 months ago #

    This one looks like out of the theme support scope. If nobody will answer, I will close topic in a couple of days.

  3. yandoos
    Member
    Posted 8 months ago #

    Its ok I worked it out. I simply added the jquery to the theme header.

    Thanks

  4. Tomas Mackevicius
    Member
    Theme Author

    Posted 8 months ago #

    jQuery can be added with a ready to use code in functions.php: section // 5.9 - Add optional meta tags, scripts to head if you use straight Tiny Forge or section 2.2 - Add optional meta tags, scripts to head in Tiny Forge Child theme.

Reply

You must log in to post.

About this Theme

About this Topic

Tags

No tags yet.