You can just use 

var pos = $("#page");

And for the css...

$("body").setStyle("background","#727271 url(squelettes/images/
axome_fond.gif) repeat-x "+pos.offsetLeft+"px 0");


...i think that's right....

-----Original Message-----
From: Sebastien BRUNEL [mailto:[email protected]] 
Sent: Tuesday, 21 July 2009 6:37 PM
To: MooTools Users
Subject: [Moo] Convert Jquery to Mootools


Hi
I have developped this function in jquery for a website, and i have to
use it on another site which is using mootools. I've tried to convert
it, but no way to make it works. So i ask for your help.
The goal of this 2 function is to have a good view of my banner,
without the gap of one or two pixel due to the resolution of users.

Thanks you and sorry for my bad english.

$(function (){
        var pos = $("#page").get(0);
        $("body").css("background","#727271 url(squelettes/images/
axome_fond.gif) repeat-x "+pos.offsetLeft+"px 0");

});

$(window).bind('resize', function() {
        var pos = $("#page").get(0);
        $("body").css("background","#727271 url(squelettes/images/
axome_fond.gif) repeat-x "+pos.offsetLeft+"px 0");

Reply via email to