Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

Using Masonry/Wookmark jQuery plugin on Custom Pages addon?

camrympscamrymps New
edited April 2013 in Vanilla 2.0 - 2.8

Is it possible to use the Masonry/Wookmark jQuery plugin on a custom page from the custom page addon? If so, how would I go about that? This is what I have so far, but it does not work...

http://tinypic.com/r/fyuy1/6

Tagged:

Comments

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited April 2013

    You would create a page and in that page you add the

    < script type="text/javascript" >

    $(document).ready(function() {

    $('#myContent li').wookmark({offset: 2
    });

    < /script >

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited April 2013

    The style sheet link would have to be added to the function

    like

    $this->AddCssFile or

    $Sender->AddCssFile('link to css file'); to the CustomPages plugin functions

    You could use classes and ID that already exist in Vanilla.

    < script type="text/javascript" >

    $(document).ready(function() {

    $('#Content ul li img') .wookmark({offset: 2 });

    < /script >

  • Options
    hgtonighthgtonight ∞ · New MVP

    If you are willing to edit the plugin, I would also suggest adding the js file in there with $Sender->AddJsFile($this->GetResource('js/jsfile.js', FALSE, FALSE));

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

Sign In or Register to comment.