Apply Jquery Effect to Block That's Included With a Theme
Permalink 1 user found helpful
So, umm, like yeah... I am working on some relatively simple blocks that will be included with a theme that I'm working. I need to apply a jquery effect to them. I want to do it in such a way that I could possibly release them as stand-alone blocks in the marketplace.
What's the best way to go about doing this?
What's the best way to go about doing this?
Thanks! That worked just dandy for me!
Does this method also work for adding a stylesheet? If so, what would be the markup for that?
My block works so far, except for when you go back to edit it, the text does not show. What would cause that?
Does this method also work for adding a stylesheet? If so, what would be the markup for that?
My block works so far, except for when you go back to edit it, the text does not show. What would cause that?
You can append stylesheets in similar fashion by using css method:
both methods take $pkgHandle as a second argument so if you're packaging the block for marketplace the js/css file will be loaded from packages/yourpackage/css or js...
Can you be a bit more specific on the edit problem? Are you able to edit the block even though the text doesn't show? How are you outputting the contents in view.php?
$html = Loader::helper('html'); $this->addHeaderItem($html->css('mycssfile.css'));
both methods take $pkgHandle as a second argument so if you're packaging the block for marketplace the js/css file will be loaded from packages/yourpackage/css or js...
Can you be a bit more specific on the edit problem? Are you able to edit the block even though the text doesn't show? How are you outputting the contents in view.php?
will load the js file in root/js/myjsfile.js