Hello everyone!
I’m designing a web and I want a full background and I’m doing it this way:
1. Add the .js files into the js folder.
2. Create a block and type the javascript code.
3. Add the block into the layout xml.
This is the block code:
<?php $this->genBlockBegin ($block) ?>
<script type="text/javascript">
$(document).ready(function(){
$(document).bgStretcher({
images: ['../images/bg.jpg'], imageWidth: 1600, imageHeight: 900
});
});
</script>
<?php $this->genBlockEnd ($block) ?>
In my first try the code works fine, with only one exception, the image was showed just in the bg block but not in all blocks. Now is not working anymore =/
Firebug says:
$(document).ready is not a function
$(document).ready(function(){
I don’t know whats wrong I think I need to nest all the blocks in one block but is this a good idea?
Any comment solution or help will be appreciate.
Greets!