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

  • 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 >

  • 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 >

  • 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));

Sign In or Register to comment.