not sure what var image = $(".fullst").eq(i).html(); returns, but the 'backgroundImage' (or 'background-image'; either one is fine) value should look something like 'url(path/to/image.jpg)'

--Karl
_________________
Karl Swedberg
www.englishrules.com
www.learningjquery.com



On May 8, 2007, at 6:29 PM, joomlafreak wrote:


It is url of image relative to this file.

Pls see this url
http://www.joomlaprodigy.com/test/jquery/mod_contentsliderjp.php

thanks for your help.

On May 8, 6:22 pm, "Karl Rudd" <[EMAIL PROTECTED]> wrote:
It should work. What end up in "image"? It should be a URL (relative
to the page).

Karl Rudd

On 5/9/07, joomlafreak <[EMAIL PROTECTED]> wrote:



I am trying to use css("background-image",image) but it does not set
the image as background. What am I doing wrong. here is the code.

function changeit(imgnum){
 $(".story").each(function(i){
    var item = $(".story").eq(i);
        var image = $(".fullst").eq(i).html();

    if ( item != "") {
        if(i != imagenum){
                $(item).fadeOut("slow");
        }
        else{
$(item).css("background-image",image).fadeIn ("slow");
        }
  }
 });

thanks in advance for help


Reply via email to