Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You may make an HTML like this:</p> <pre><code>&lt;div class="main_view"&gt; &lt;div class="window"&gt; &lt;div class="image_reel"&gt; &lt;a href="#"&gt; &lt;img width="948" src="Images/Home/LIV.jpg" alt=""&gt;&lt;/a&gt; &lt;a href="#"&gt; &lt;img width="948" src="Images/Home/JUM.jpg" alt=""&gt;&lt;/a&gt; &lt;a href="#"&gt; &lt;img width="948" src="Images/Home/LOV.jpg" alt=""&gt;&lt;/a&gt; &lt;a href="#"&gt; &lt;img width="948" src="Images/Home/BLI.jpg" alt=""&gt;&lt;/a&gt; &lt;/div&gt; &lt;div class="pictureslide"&gt; &lt;h2&gt; Livestrong&lt;/h2&gt; &lt;p&gt; Mobile donations to fight cancer and improve lives.&lt;/p&gt; &lt;a href="http://thirteen23.com/work/#livestrong-donation"&gt;See more&lt;/a&gt; &lt;/div&gt; &lt;div class="pictureslide"&gt; &lt;h2&gt; Jumpshot&lt;/h2&gt; &lt;p&gt; The lighter side of serious software.&lt;/p&gt; &lt;a href="/#jumpshot"&gt;See more&lt;/a&gt; &lt;/div&gt; &lt;div class="pictureslide"&gt; &lt;h2&gt; Flashback&lt;/h2&gt; &lt;p&gt; An exciting way to explore, stylize, and share your Facebook photos.&lt;/p&gt; &lt;a href="/#flashback"&gt;See more&lt;/a&gt; &lt;/div&gt; &lt;div class="pictureslide"&gt; &lt;h2&gt; Love Universe&lt;/h2&gt; &lt;p&gt; Blurring the line between product and lifestyle.&lt;/p&gt; &lt;a href="/#love-universe"&gt;See more&lt;/a&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="paging"&gt; &lt;a href="#" rel="1"&gt; &lt;img src="Images/Home/LIV_sm.jpg" alt=""&gt;&lt;/a&gt; &lt;a href="#" rel="2"&gt; &lt;img src="Images/Home/JUM_sm.jpg" alt=""&gt;&lt;/a&gt; &lt;a href="#" rel="3"&gt; &lt;img src="Images/Home/LOV_sm.jpg" alt=""&gt;&lt;/a&gt; &lt;a href="#" rel="4"&gt; &lt;img src="Images/Home/BLI_sm.jpg" alt=""&gt;&lt;/a&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p>then your JS:</p> <pre><code>var MainPageSlider = function (windowObj,element) { var parent = $("#"+element);//element is the ID of the Master/Parent of this HTMLCode parent.data('imagewidth', windowObj.imageWidth); parent.data('imageSum', windowObj.imagesum + 1); $(".paging a:first", parent).addClass("active"); var intervalCulture; var imageReelWidth = parent.data('imagewidth') * parent.data('imageSum'); $(".image_reel", parent).css({ 'width': imageReelWidth }); rotate = function () { var triggerID = $active.attr("rel") - 1; var image_reelPosition = triggerID * (parent.data('imagewidth') + 30); $(".paging a", parent).removeClass('active'); $active.addClass('active'); $(".image_reel", parent).animate({ left: -image_reelPosition }, 500); }; rotateSwitch = function () { play = setInterval(function () { $active = $('.paging a.active', parent).next(); if ($active.length === 0) { $active = $('.paging a:first', parent); } rotate(); }, 7000); }; rotateSwitch(); $(".image_reel a", parent).hover(function () { clearInterval(play); }, function () { rotateSwitch(); }); $(".paging a", parent).click(function () { $active = $(this); clearInterval(play); rotate(); rotateSwitch(); return false; }); }; MainPageSlider(windowObj,'element');//element is the Parent of this HTML </code></pre> <p>And then add proper styles to your code. Also, write a function for hover as you require.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload