javascript - jQuery function not moving... can't find anything wrong with it? -
i'm trying take these moving clouds: http://vintageskytheme.tumblr.com/ (it's theme i've bought themeforest, tumblr)
i'm trying put on wordpress. here: http://pawprintsinmypancakes.com/
it used $() function , see giving errors in console every 30 milliseconds know rest of code working... when change jquery()... console silent. have no idea whats wrong
2 things:
1: change following code:
//set css of header. jquery('#head_interior').css("background-position", current + " bottom"); jquery('#head_exterior').css("background-position", current2 + " bottom");
to this:
//set css of header. jquery('#head_interior').css("background-position", current + "px bottom"); jquery('#head_exterior').css("background-position", current2 + "px bottom");
note "px" added before "bottom". need these when setting css styles, because css allows px, em, pt, etc... if don't tell unit use, it'll happily ignore values.
that clouds moving.
2: $ object getting overwritten. not sure where. suggest wrap code in call jquery object, so:
jquery(function(){ // existing code here });
that standard way of doing things jquery don't pollute global scope.
Comments
Post a Comment