Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Remove jquery function (for the AnythingZoomer plugin)

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #35382

    Hey everyone,
    I’m pretty new to the world of javascript so I have a question that’s probably pretty obvious to most…I was wondering if there was any way I could take off a function once I add it to an object? I want to use the AnythingZoomer, but I want the ability to toggle it on and off. So, how do I do that? They give the example:

    $("#zoom").anythingZoomer();

    That seems simple enough, but after that how do I take anythingZoomer off the #zoom object? Should I just change the ID when I want to turn off the functionality then change it back to add it again? Would that even work? Do I have to reload the element?

    #91557
    Mottie
    Member

    There isn’t any code to completely disable the zoomer plugin, but you could make it automatically show the large version using this code:

    $('#zoom').data('zoomer').showLarge();

    To switch it back to the small version use:

    $('#zoom').data('zoomer').showSmall();
    #91820

    Thanks!!!

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.