Jump to content
Fórum Script Brasil
  • 0

Carrossel em Javascript


Comparini

Question

Olá pessoal, estou com um problema, bem vamos lá....

Fiz um carrossel em Javascript, ele rola no mozilla, mas no IE7, aparece todas as imagens de uma vez, elas não ficam dentro do DIV?

segue o código java script:

$(function(){

// variável global

des = 0;

// botão RIGHT

$('a#right').click(function(e){

e.preventDefault();

if(des == -1792){

des = -1792;

}else{

des = des - 896;

}

if(des == 0){

des = -896;

}

//$('div#content').css('left',des + 'px');

$('div#content').animate({

left: des

}, 500);

})

// botão LEFT

$('a#left').click(function(e){

e.preventDefault();

if(des == 0){

des = 0;

}else{

des = des + 896;

}

//$('div#content').css('left',des + 'px');

$('div#content').animate({

left: des

}, 500);

})

})

agora o código CSS:

div#slide{

width:896px;

height:241px;

border:4px solid #CCC;

float:left;

overflow:hidden;

*overflow:hidden !important;

*float:left !important;

}

a#left,

a#right{

width:20px;

height:241px;

border:4px solid #CCC;

overflow:hidden;

background:#DFDFDF;

display:block;

text-indent:-5000px;

float:left;

}

a#left:hover{ background:url('img/seta2.jpg') no-repeat }

a#right:hover{ background:url('img/seta.jpg') no-repeat }

div#content{

width:3080px;

height:241px;

position:relative;

}

div#content img{

float:left;

}

se alguém puder me ajudar agradeço

obrigado

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Forum Statistics

    • Total Topics
      152.2k
    • Total Posts
      652k
×
×
  • Create New...