asigning class after page load? with page attribute
PermalinkHere is an interesting one for you all? My site dev.sportolutions.com, currently loads a background image based on a page attribute using the code below.
Now I have a HTML5 fade effect which using the js(jQuery i believe) file in theme I add to the wrapper class after the page is loaded I think! ( so it fades the picture) Not very good at js coding.
I would also like to add the background image div after load as well but am not sure if I can As it pulls a page attribute also?
current php page
<div class="wrapper pageimage-<? Loader::model('collection_attributes'); $ak = CollectionAttributeKey::getByHandle('background_image'); $value = $c->getCollectionAttributeValue($ak); echo $value; ?> ">
Current Js file
$(document).ready( function () { $('.wrapper').addClass('fade-in two'); $(window).resize(); // To initially run the function: })
Any Ideas? could thsi be done in jQuery
Appreciate any ideas
Carl