PageSourceSearch

https://www.gotoassignmenthelp.com/blog/wp-content/themes/Newspaper/template-part/js/ImageScroll.js

js gotoassignmenthelp.com collected 2026-10-03 19:14:54 UTC 1,918 bytes, 58 lines download raw bytes

1// Author: Jogis
2// Website: http://imagescroll.qiniudn.com/test1.html
3// Plugin Website: https://github.com/yesvods/jquery-ImageScroll
4(function($){
5  $.fn.imageScroll = function(opts){
6    var defaults = {
7      orientation:"left",
8      speed:600,
9      interval:1500,
10      hoverPause:true,
11      callback:function(){ return false;}
12    }
13    var options = $.extend(defaults, opts);
14    var _this = this;
15    function scroll() {
16      var $firstLi = $(_this).children().first();
17      var $lastLi = $(_this).children().last();
18      var liOuterWidth = $firstLi.outerWidth(true);
19      //In case that parent take a center text-algin layout
20      if($(_this).parent().css("text-align").toLowerCase()=="center"){
21        liOuterWidth*=2;
22      }
23      console.log();
24      switch(options.orientation){
25        case "left":
26        case "top":
27          $firstLi.animate({
28            "margin-left":"-="+liOuterWidth+"px"
29          },options.speed,function(){
30            $firstLi.css("margin-left","+="+liOuterWidth+"px");
31            $lastLi.after($firstLi);
32          });
33          break;
34        case "right":
35        case "bottom":
36          $firstLi.animate({
37            "margin-left":"+="+liOuterWidth+"px"
38          },options.speed,function(){
39            $firstLi.css("margin-left","-="+liOuterWidth+"px");
40            $firstLi.before($lastLi);
41          });
42          break;
43      }
44      //binding this to callback action scope link which make coding native
45      options.callback.call(_this);
46    }
47    var scrollInterval = setInterval(scroll,options.interval);
48    //setting the hover motion
49    if(options.hoverPause){
50      $(this).hover(function(){
51        clearInterval(scrollInterval);
52      },function(){
53        scrollInterval = setInterval(scroll,options.interval);
54      });
55    }
56    return this;
57  }
58})(window.jQuery || window.Zepto);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.