par
ddd » 21 oct. 2011, 00:09
Merci pour cette rapidité !
le ( " ) dans le pluging jquery-1.2.6.js à été supprimer;
mais le problème reste le même
voici le script .js et .php du full background peut-être qu'ils éclaireront quelqu'un.
/**
* Full Size Backgrounded
*
* @version 1.0
* @author Vaska
*/
function bg_img_resize()
{
var w = $(window).width();
var h = $(window).height();
var iw = $('#the-background img').attr('width');
var ih = $('#the-background img').attr('height');
var rw = iw / ih;
var rh = ih / iw;
var sc = h * rw;
if (sc >= w) {
nh = h;
nw = sc;
} else {
sc = w * rh;
nh = sc;
nw = w;
}
$('#the-background img').css({height: nh, width: nw});
}
$(document).ready(function(){ bg_img_resize(); });
$(window).resize(function(){ bg_img_resize(); });
$(window).resize(function(){
bg_img_resize();
$('#the-background').css({ 'top' : 0, 'left' : 0 });
});
$(window).scroll(function(){
bg_img_resize();
$('#the-background').css({ 'top' : 0, 'left' : 0 });
});
et le code php:
<?php if (!defined('SITE')) exit('No direct script access allowed');
/**
* Full Size Backgrounded
*
* @version 1.0
* @author Vaska
*/
function full_background()
{
// we'll just get it from the page background image
global $rs;
if ($rs['bgimg'] != '') {
// get the dimensions
$size = getimagesize(DIRNAME . '/files/' . $rs['bgimg']);
return "<img src='" . BASEURL . "/files/$rs[bgimg]' width='$size[0]' height='$size[1]' alt=''/>";
}
return;
}
?>
pour le reste des scripts .js, je vais devoir éclaircir tout ça !