Jump to content
  • 0

jcarousellite+Custom Widget


sh1va
 Share

Question

На офицальном сайте вроде как указанно как ее установить

$(".widget .jCarouselLite").jCarouselLite({
btnNext: ".widget .next",
btnPrev: ".widget .prev",
speed: 800,
easing: "backout"
});

$(".widget img").click(function() {
$(".widget .mid img").attr("src", $(this).attr("src"));
})

но у меня она не работает, не появляется большое окно с изображением

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>instante</title>
<link href="style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="jcarousellite.js"></script>
<script type="text/javascript" src="mousewheel.js"></script>
<script type="text/javascript" language="JavaScript">
$(function() {
$(".scroll").jCarouselLite({
btnNext: ".next",
btnPrev: ".prev",
mouseWheel: true,
vertical: true,
visible: 10,
speed: 100,
scroll: 3

});
});

$(".widget img").click(function() {
$(".widget .mid img").attr("src", $(this).attr("src"));
})
</script>
</head>
<body>
<button class="prev"><<</button>

<div class="scroll">
<ul>
<li><img src="foto/foto1.jpg" alt="" width="70" height="47" ></li>
<li><img src="foto/foto2.jpg" alt="" width="70" height="47" ></li>
<li><img src="foto/foto1.jpg" alt="" width="70" height="47" ></li>
<li><img src="foto/foto2.jpg" alt="" width="70" height="47" ></li>
<li><img src="foto/foto1.jpg" alt="" width="70" height="47" ></li>
<li><img src="foto/foto2.jpg" alt="" width="70" height="47" ></li>
<li><img src="foto/foto1.jpg" alt="" width="70" height="47" ></li>
<li><img src="foto/foto2.jpg" alt="" width="70" height="47" ></li>
<li><img src="foto/foto1.jpg" alt="" width="70" height="47" ></li>
<li><img src="foto/foto2.jpg" alt="" width="70" height="47" ></li>
<li><img src="foto/foto1.jpg" alt="" width="70" height="47" ></li>
<li><img src="foto/foto2.jpg" alt="" width="70" height="47" ></li>
</ul>
</div>
<button class="next">>></button>

</body>
</html>

Edited by sh1va
Link to comment
Share on other sites

9 answers to this question

Recommended Posts

  • 0
да вроде все подключил...

Видать не всё, взял ваш код, заменил в нём:

<script type="text/javascript" src="http://code.jquery.com/jquery-latest.pack.js"></script>
<script type="text/javascript" src="http://www.gmarwaha.com/jquery/jcarousellite/js/jquery.jcarousellite.min.js"></script>
<script type="text/javascript" src="http://brandonaaron.net/jquery/plugins/mousewheel/jquery.mousewheel.js"></script>

Всё заработало

Link to comment
Share on other sites

  • 0
Видать не всё, взял ваш код, заменил в нём:

<script type="text/javascript" src="http://code.jquery.com/jquery-latest.pack.js"></script>
<script type="text/javascript" src="http://www.gmarwaha.com/jquery/jcarousellite/js/jquery.jcarousellite.min.js"></script>
<script type="text/javascript" src="http://brandonaaron.net/jquery/plugins/mousewheel/jquery.mousewheel.js"></script>

Всё заработало

вот и я про то-же

Link to comment
Share on other sites

  • 0

А, всё допетрил:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>instante</title>
<link href="style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.pack.js"></script>
<script type="text/javascript" src="http://www.gmarwaha.com/jquery/jcarousellite/js/jquery.jcarousellite.min.js"></script>
<script type="text/javascript" src="http://brandonaaron.net/jquery/plugins/mousewheel/jquery.mousewheel.js"></script>
<script type="text/javascript">
$(function() {
$(".Scroll").jCarouselLite({
btnNext: ".next",
btnPrev: ".prev",
mouseWheel: true,
vertical: true,
visible: 10,
speed: 100,
scroll: 3
});

$(".Scroll img").click(function() {
$(".mid img").attr("src", $(this).attr("src"));
})
});
</script>
</head>
<body>
<div class="mid"><img src="1.jpg" alt="preview"></div>

<a href="#" class="prev"><<<</a>
<div class="Scroll">


<ul>
<li><img src="1.jpg" alt="" width="70" height="47" ></li>
<li><img src="2.jpg" alt="" width="70" height="47" ></li>
<li><img src="3.jpg" alt="" width="70" height="47" ></li>
<li><img src="foto/foto2.jpg" alt="" width="70" height="47" ></li>
<li><img src="foto/foto1.jpg" alt="" width="70" height="47" ></li>
<li><img src="foto/foto2.jpg" alt="" width="70" height="47" ></li>
<li><img src="foto/foto1.jpg" alt="" width="70" height="47" ></li>
<li><img src="foto/foto2.jpg" alt="" width="70" height="47" ></li>
<li><img src="foto/foto1.jpg" alt="" width="70" height="47" ></li>
<li><img src="foto/foto2.jpg" alt="" width="70" height="47" ></li>
<li><img src="foto/foto1.jpg" alt="" width="70" height="47" ></li>
<li><img src="foto/foto2.jpg" alt="" width="70" height="47" ></li>
</ul>

</div>
<a href="#" class="next">>>></a>

</body>
</html>

ну как-то так

Link to comment
Share on other sites

  • 0
Какая большая картинка ? Этож карусель, здесь скролиться крутиться должно. Дык крутиться

P.S. На оффсайте они тоже не увеличиваются

Да у меня тоже все вертелось )

$(".Scroll img").click(function() {

$(".mid img").attr("src", $(this).attr("src"));

спасибо ) теперь у меня тоже все заработало )

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. See more about our Guidelines and Privacy Policy