Using Masonry/Wookmark jQuery plugin on Custom Pages addon?
camrymps
New
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...
0
Comments
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 >
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));