wordpress - Targetting the background of a div for a jquery parrallax scroller -


i'm trying edit wordpress plugin targets background image of body makes scroll page. code plugin quoted below.

i want same effect target background images of other divs can't work using

$(".class").style.backgroundposition = "0px " + (0 -              (math.max(document.documentelement.scrolltop,               document.body.scrolltop) / 4)) + "px"; 

but not working. i've tried use dom path target div document.div.class.style.backgroundposition = .....

can shed light on why isn't working?

    $(window).scroll(function () {       document.body.style.backgroundposition =           "0px " +              (0 -                 (math.max(document.documentelement.scrolltop, document.body.scrolltop) / 4)             ) + "px";     }); 


Comments

Popular posts from this blog

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -

javascript - oscilloscope of speaker input stops rendering after a few seconds -