slick slider get every image offset - javascript

How to get slick slider every image offset. As my requirement, I have using fig caption in every image right bottom. So I need image offset. Anyone help me is this possible for the slick slider.
<div class="your-class">
<div>
<img src="images/img1.jpg" />
<div class=" img-cnt ">
<p>Image 1</p>
</div>
</div>
<div><img src="images/img2.jpg" />
<div class="img-cnt">
<p>Image 2</p>
</div>
</div>
<div>
<img src="images/img3.jpg" />
<div class=" img-cnt ">
<p>Image 1</p>
</div>
</div>
</div>
<script type="text/javascript ">
$(document).ready(function() {
$('.your-class').slick({});
});
</script>

Related

make section show with a click event

I am trying to make a section appear when my button is clicked and instead I am getting a blank screen. I am not sure why this is. Any suggestions would be helpful. I am trying to display the arnold-page div.
<section class="middlePage"><!-- START MIDDLE SECTION -->
<div class="album-nav">
<button class="arnold">Arnold</button>
<button class="cats">Cats</button>
<button class="dogs">Dogs</button>
<button class="batman">Batman</button>
<button class="lions">Lions</button>
<button class="tigers">Tigers</button>
</div>
<div class="arnold-page"> <!-- START DIV display-on --><h1>Arnold</h1>
<div id="arnold1">
<img src=" ">
<p>Photo 1</p>
</div>
<div id="arnold2">
<img src="images/arnold.jpg">
<p>Photo 2</p>
</div>
<div id="arnold3">
<img src=" ">
<p>Photo 3</p>
</div>
<div id="arnold4">
<img src=" ">
<p>Photo 4</p>
</div>
<div id="arnold5">
<img src=" ">
<p>Photo 5</p>
</div>
<div id="arnold6">
<img src=" ">
<p>Photo 6</p>
</div>
</div> <!-- END DIV display-on -->
</section><!-- END MIDDLE SECTION -->
backButton1.on('click', function() {
bottomPage1.hide();
middlePage.hide();
arnoldPage.show();
});
Try This Script
$(function(){
//Default hide section
$(".arnold-page").hide();
$(".arnold").on("click",function()
{
$(".arnold-page").show()
});
})
You can achieve the result by setting the display property to none, and on clicking the button, change the display property to block or inline.
<!--Jquery -->
$(document).ready(function(){
$(".arnold-page").css("display","none");
$(".arnold").click(function(){
$(".arnold-page").css("display","block");
});
});

js css slider tutorial issue

I've been trying my hand at a js slider tutorial and have been trying to get the slider to appear without having to click on one of the links (paris and milan etc).
So page opens, there's the slider.
I've tried having the div of the slider thumb container on the page without having
<ul id="fp_galleryList" class="fp_galleryList">
<li>Paris</li>
<li>New York</li>
</ul>
but it just shows up blank.
I'd really appreciate a nudge in the right direction.
Here's the tutorial for reference:link
Jsfiddle #pete fixed the fiddle
I'm sorry my fiddle doesn't work but my code is there. (First time using Jsfiddle and Stackoverflow so please be nice ;))
<div id="fp_gallery" class="fp_gallery">
<ul id="fp_galleryList" class="fp_galleryList">
<li>Paris</li>
<li>New York</li>
</ul>
<div id="fp_thumbContainer">
<div id="fp_thumbScroller">
<div class="container">
<div class="content">
<div>
<img src="images/album1/thumbs/1.jpg" alt="images/album1/1.jpg" class="thumb" />
</div>
</div>
<div class="content">
<div>
<img src="images/album1/thumbs/2.jpg" alt="images/album1/2.jpg" class="thumb" />
</div>
</div>
<div class="content">
<div>
<img src="images/album1/thumbs/3.jpg" alt="images/album1/3.jpg" class="thumb" />
</div>
</div>
<div class="content">
<div>
<img src="images/album1/thumbs/1.jpg" alt="images/album1/1.jpg" class="thumb" />
</div>
</div>
<div class="content">
<div>
<img src="images/album1/thumbs/2.jpg" alt="images/album1/2.jpg" class="thumb" />
</div>
</div>
<div class="content">
<div>
<img src="images/album1/thumbs/3.jpg" alt="images/album1/3.jpg" class="thumb" />
</div>
</div>
<div class="content">
<div>
<img src="images/album1/thumbs/1.jpg" alt="images/album1/1.jpg" class="thumb" />
</div>
</div>
<div class="content">
<div>
<img src="images/album1/thumbs/2.jpg" alt="images/album1/2.jpg" class="thumb" />
</div>
</div>
<div class="content">
<div>
<img src="images/album1/thumbs/3.jpg" alt="images/album1/3.jpg" class="thumb" />
</div>
</div>
<div class="content">
<div>
<img src="images/album1/thumbs/1.jpg" alt="images/album1/1.jpg" class="thumb" />
</div>
</div>
<div class="content">
<div>
<img src="images/album1/thumbs/2.jpg" alt="images/album1/2.jpg" class="thumb" />
</div>
</div>
<div class="content">
<div>
<img src="images/album1/thumbs/3.jpg" alt="images/album1/3.jpg" class="thumb" />
</div>
</div>
</div>
</div>
</div>
</div>
<div id="fp_scrollWrapper" class="fp_scrollWrapper">
<span id="fp_prev_thumb" class="fp_prev_thumb"></span>
<div id="slider" class="slider"></div>
<span id="fp_next_thumb" class="fp_next_thumb"></span>
</div>
<div id="fp_overlay" class="fp_overlay"></div>
<div id="fp_loading" class="fp_loading"></div>
<div id="fp_next" class="fp_next"></div>
<div id="fp_prev" class="fp_prev"></div>
<div id="fp_close" class="fp_close">Close preview</div>
<!-- JAVASCRIPT -->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js"></script>
<script type="text/javascript" src="js/jquery.easing.1.3.js"></script>
<script type="text/javascript">

Display image only if it enter in some define position

I have one vertical slider page.
in every slide I have one image and I have iphone container.
like
now this page slides vertically show next slides comes in center and its also contains image on center.
now I want something like that image only displayed when its comes in iphone container.
as here in second image my images showing even out of iphone container so I dont want to do that
my code
<div style="display: block; position: fixed; top: 14.5px; left: 684px;" class="iphone_container"><img title="" src="/img/iphon.png"></div>
<div class="port_list">
<div class="port_wrap" id="slide_1" style="background-color: #344a18;position: relative">
<div class="proj_brief"></div>
<div class="">
<div class="">
<img src="" />
</div>
</div>
</div>
<div class="port_wrap" id="slide_1" style="background-color: #344a18;position: relative">
<div class="proj_brief"></div>
<div class="">
<div class="">
<img src="" />
</div>
</div>
</div>
<div class="port_wrap" id="slide_1" style="background-color: #344a18;position: relative">
<div class="proj_brief"></div>
<div class="">
<div class="">
<img src="" />
</div>
</div>
</div>
</div>
You create a container div for your phone and put there a div for the sildes. with overflow:hidden you can hide the additional content.
<div id="phone">
<div id="slides">
<img src="pic1.png" />
<img src="pic2.png" />
<img src="pic3.png" />
</div>
</div>
<input type="button" value="slide up" onclick="slide('up')" />
<input type="button" value="slide down" onclick="slide('down')" />
Check this fiddle: http://jsfiddle.net/qfzBk/2/

Jquery Cycle and Pixastic fast blur

I am trying to cycle my image and blur the background image but the problem is it only blurs the first image but not the next image.
<div id="banner_images">
<div id="banner_cycle_wrapper">
<div id="banner_bg_cycle">
<img src="source.png" class="blur">
</div>
<div id="banner_cycle_container">
<img src="source.png">
</div>
</div>
<div id="banner_cycle_wrapper" >
<div id="banner_bg_cycle">
<img alt="" src="source.png" class="blur">
</div>
<div id="banner_cycle_container">
<img src="source.png">
</div>
</div>
</div>
$('#banner_images').cycle({
fx: 'fade',
timeout: 2000
});
$(".blur").pixastic("blurfast", {amount:0.5});
I think you are missing CLASS to add in that
class="blur"
this should be added to each image you want to have the same effect.
Updated Code:
<div id="banner_images">
<div id="banner_cycle_wrapper">
<div id="banner_bg_cycle">
<img alt="" src="source.png"/>
</div>
<div id="banner_cycle_container">
<img alt="" src="img1.png" class="blur" />
<img alt="" src="img2.png" class="blur" />
</div>
</div>
</div>
I hope this will help :)

Lightbox Gallery Issue

I am hoping someone can help me with this issue ...
I am wanting each of the 6 images to be it's own Gallery, and for the Life of me am Beyond Lost!
Here is the JS code:
$(function(){
// lightbox image
$(".lightbox-image").append("<span></span>");
$(".lightbox-image").hover(function(){
$(this).find("img").stop().animate({opacity:0.5}, "normal")
}, function(){
$(this).find("img").stop().animate({opacity:1}, "normal")
});
});
Here is the HTML:
<div class="pad_left1">
<div class="wrapper pad_bot1">
<div class="cols"> <img src="images/page3_img1.png" alt="">
<p><strong class="font1">Company Logos</strong>???enter text here???<br><br>
</p>
</div>
<div class="cols pad_left1"> <img src="images/page3_img2.png" alt="">
<p><strong class="font1">Business Cards</strong>???enter text here???<br>
</p>
</div>
</div>
<div class="wrapper pad_bot1">
<div class="cols"> <img src="images/page3_img3.png" alt="">
<p><strong class="font1">Photography/Photo Edits</strong>???enter text here???<br><br>
</p>
</div>
<div class="cols pad_left1"> <img src="images/page3_img4.png" alt="">
<p><strong class="font1">Band Logos/Album Covers</strong>???enter text here???<br>
</p>
</div>
</div>
<div class="wrapper pad_bot1">
<div class="cols"> <img src="images/page3_img5.png" alt="">
<p><strong class="font1">Random Designs</strong>???enter text here???<br>
</p>
</div>
<div class="cols pad_left1"> <img src="images/page3_img6.png" alt="">
<p><strong class="font1">Websites</strong>???enter text here???<br>
</p>
</div>
</div>
</div>
It's simple try to do it this way if you need a set of gallery
<div>
image #1
image #2
image #3
</div>
<div>
image #4
image #5
image #6
</div>

Categories

Resources