{"id":43971,"date":"2014-09-26T05:36:27","date_gmt":"2014-09-26T04:36:27","guid":{"rendered":"https:\/\/pl.wordpress.org\/support\/topic\/slider-jquery-maly-problem\/"},"modified":"2016-08-05T22:08:38","modified_gmt":"2016-08-05T22:08:38","slug":"slider-jquery-maly-problem","status":"closed","type":"topic","link":"https:\/\/pl.wordpress.org\/support\/topic\/slider-jquery-maly-problem\/","title":{"rendered":"Slider jquery ma\u0142y problem"},"content":{"rendered":"<p>Witajcie,<\/p>\n<p>stawiam w\u0142a\u015bnie stron\u0119 opart\u0105 o WordPressa i mam malutki problem. Korzystam z motywu Vantage i postanowi\u0142em na dole i na g\u00f3rze strony g\u0142\u00f3wnej wstawi\u0107 slidery. Na g\u00f3rze zwyk\u0142y reklamowy (ten dzia\u0142a bez problemu) i drugi na dole przewijaj\u0105cy loga klient\u00f3w. Wykorzysta\u0142em do tego widget do wstawiania tekstu lub htmla. G\u00f3rny slider dzia\u0142a jak nale\u017cy. Dolny ma problem. <\/p>\n<p>Kod kt\u00f3ry wklejam (od dolnego slidera) to:<\/p>\n<pre><code>,&lt;!-- it works the same with all jquery version from 1.x to 2.x --&gt;\n    &lt;script type=&quot;text\/javascript&quot; src=&quot;..\/js\/jquery-1.9.1.min.js&quot;&gt;&lt;\/script&gt;\n    &lt;!-- use jssor.slider.mini.js (40KB) or jssor.sliderc.mini.js (32KB, with caption, no slideshow) or jssor.sliders.mini.js (28KB, no caption, no slideshow) instead for release --&gt;\n    &lt;!-- jssor.slider.mini.js = jssor.sliderc.mini.js = jssor.sliders.mini.js = (jssor.core.js + jssor.utils.js + jssor.slider.js) --&gt;\n    &lt;script type=&quot;text\/javascript&quot; src=&quot;..\/js\/jssor.core.js&quot;&gt;&lt;\/script&gt;\n    &lt;script type=&quot;text\/javascript&quot; src=&quot;..\/js\/jssor.utils.js&quot;&gt;&lt;\/script&gt;\n    &lt;script type=&quot;text\/javascript&quot; src=&quot;..\/js\/jssor.slider.js&quot;&gt;&lt;\/script&gt;\n    &lt;script&gt;\n\n        jQuery(document).ready(function ($) {\n            var options = {\n                $AutoPlay: true,\n\n                $PauseOnHover: false,                               \/\/[Optional] Whether to pause when mouse over if a slideshow is auto playing, default value is false\n\n                $ArrowKeyNavigation: false,   \t\t\t            \/\/Allows arrow key to navigate or not\n                $SlideWidth: 216,                                   \/\/[Optional] Width of every slide in pixels, the default is width of &#039;slides&#039; container\n                $SlideHeight: 66,                                  \/\/[Optional] Height of every slide in pixels, the default is width of &#039;slides&#039; container\n                $SlideSpacing: 1, \t\t\t\t\t                \/\/Space between each slide in pixels\n                $DisplayPieces: 5,                                  \/\/Number of pieces to display (the slideshow would be disabled if the value is set to greater than 1), the default value is 1\n                $ParkingPosition: 1      \t\t ,                                \/\/The offset position to park slide (this options applys only when slideshow disabled).\n\n                $ArrowNavigatorOptions: {                       \/\/[Optional] Options to specify and enable arrow navigator or not\n                    $Class: $JssorArrowNavigator$,              \/\/[Requried] Class to create arrow navigator instance\n                    $ChanceToShow: 2,                               \/\/[Required] 0 Never, 1 Mouse Over, 2 Always\n                    $AutoCenter: 2,                                 \/\/[Optional] Auto center arrows in parent container, 0 No, 1 Horizontal, 2 Vertical, 3 Both, default value is 0\n                    $Steps: 1                                       \/\/[Optional] Steps to go for each navigation request, default value is 1\n                }\n            };\n\n            var jssor_slider1 = new $JssorSlider$(&quot;slider1_container&quot;, options);\n\n            \/\/responsive code begin\n            \/\/you can remove responsive code if you don&#039;t want the slider scales while window resizes\n            function ScaleSlider() {\n                var parentWidth = jssor_slider1.$Elmt.parentNode.clientWidth;\n                if (parentWidth)\n                    jssor_slider1.$SetScaleWidth(Math.min(parentWidth, 1080));\n                else\n                    window.setTimeout(ScaleSlider, 30);\n            }\n\n            ScaleSlider();\n\n            if (!navigator.userAgent.match(\/(iPhone|iPod|iPad|BlackBerry|IEMobile)\/)) {\n                $(window).bind(&#039;resize&#039;, ScaleSlider);\n            }\n\n            \/\/if (navigator.userAgent.match(\/(iPhone|iPod|iPad)\/)) {\n            \/\/    $(window).bind(&quot;orientationchange&quot;, ScaleSlider);\n            \/\/}\n            \/\/responsive code end\n        });\n    &lt;\/script&gt;\n    &lt;!-- Jssor Slider Begin --&gt;\n    &lt;!-- You can move inline styles to css file or css block. --&gt;\n    &lt;div id=&quot;slider1_container&quot; style=&quot;position: relative; top: 0px; left: 0px; width: 1080px;\n        height: 66px; overflow: hidden;&quot;&gt;\n        &lt;!-- Slides Container --&gt;\n        &lt;div u=&quot;slides&quot; style=&quot;cursor: move; position: absolute; left: 0px; top: 0px; width: 1080px; height: 66px;\n            overflow: hidden;&quot;&gt;\n            &lt;div&gt;&lt;img u=&quot;image&quot; src=&quot;..\/img\/klienci\/mono\/1.png&quot;  \/&gt;&lt;\/div&gt;\n\t\t\t &lt;div&gt;&lt;img u=&quot;image&quot; src=&quot;..\/img\/klienci\/mono\/1.png&quot; \/&gt;&lt;\/div&gt;\n\t\t\t  &lt;div&gt;&lt;img u=&quot;image&quot; src=&quot;..\/img\/klienci\/mono\/1.png&quot; onmouseover=&quot;this.src=&#039;..\/img\/klienci\/kolor\/1k.png&#039;;&quot; onmouseout=&quot;this.src=&#039;..\/img\/klienci\/mono\/1.png&#039;;&quot; \/&gt;&lt;\/div&gt;\n\t\t\t   &lt;div&gt;&lt;img u=&quot;image&quot; src=&quot;..\/img\/klienci\/mono\/1.png&quot; onmouseover=&quot;this.src=&#039;..\/img\/klienci\/kolor\/1k.png&#039;;&quot; onmouseout=&quot;this.src=&#039;..\/img\/klienci\/mono\/1.png&#039;;&quot; \/&gt;&lt;\/div&gt;\n            &lt;div&gt;&lt;img u=&quot;image&quot; src=&quot;..\/img\/klienci\/mono\/2.png&quot; onmouseover=&quot;this.src=&#039;..\/img\/klienci\/kolor\/2k.png&#039;;&quot; onmouseout=&quot;this.src=&#039;..\/img\/klienci\/mono\/2.png&#039;;&quot;\/&gt;&lt;\/div&gt;\n            &lt;div&gt;&lt;img u=&quot;image&quot; src=&quot;..\/img\/klienci\/mono\/3.png&quot; onmouseover=&quot;this.src=&#039;..\/img\/klienci\/kolor\/3k.png&#039;;&quot; onmouseout=&quot;this.src=&#039;..\/img\/klienci\/mono\/3.png&#039;;&quot;\/&gt;&lt;\/div&gt;\n            &lt;div&gt;&lt;img u=&quot;image&quot; src=&quot;..\/img\/klienci\/mono\/4.png&quot; onmouseover=&quot;this.src=&#039;..\/img\/klienci\/kolor\/4k.png&#039;;&quot; onmouseout=&quot;this.src=&#039;..\/img\/klienci\/mono\/4.png&#039;;&quot;\/&gt;&lt;\/div&gt;\n            &lt;div&gt;&lt;img u=&quot;image&quot; src=&quot;..\/img\/klienci\/mono\/5.png&quot; onmouseover=&quot;this.src=&#039;..\/img\/klienci\/kolor\/5k.png&#039;;&quot; onmouseout=&quot;this.src=&#039;..\/img\/klienci\/mono\/5.png&#039;;&quot;\/&gt;&lt;\/div&gt;\n            &lt;div&gt;&lt;img u=&quot;image&quot; src=&quot;..\/img\/klienci\/mono\/6.png&quot; onmouseover=&quot;this.src=&#039;..\/img\/klienci\/kolor\/6k.png&#039;;&quot; onmouseout=&quot;this.src=&#039;..\/img\/klienci\/mono\/6.png&#039;;&quot;\/&gt;&lt;\/div&gt;\n            &lt;div&gt;&lt;img u=&quot;image&quot; src=&quot;..\/img\/klienci\/mono\/7.png&quot; onmouseover=&quot;this.src=&#039;..\/img\/klienci\/kolor\/7k.png&#039;;&quot; onmouseout=&quot;this.src=&#039;..\/img\/klienci\/mono\/7.png&#039;;&quot;\/&gt;&lt;\/div&gt;\n            &lt;div&gt;&lt;img u=&quot;image&quot; src=&quot;..\/img\/klienci\/mono\/8.png&quot; onmouseover=&quot;this.src=&#039;..\/img\/klienci\/kolor\/8k.png&#039;;&quot; onmouseout=&quot;this.src=&#039;..\/img\/klienci\/mono\/8.png&#039;;&quot;\/&gt;&lt;\/div&gt;\n            &lt;div&gt;&lt;img u=&quot;image&quot; src=&quot;..\/img\/klienci\/mono\/9.png&quot; onmouseover=&quot;this.src=&#039;..\/img\/klienci\/kolor\/9k.png&#039;;&quot; onmouseout=&quot;this.src=&#039;..\/img\/klienci\/mono\/9.png&#039;;&quot;\/&gt;&lt;\/div&gt;\n            &lt;div&gt;&lt;img u=&quot;image&quot; src=&quot;..\/img\/klienci\/mono\/10.png&quot; onmouseover=&quot;this.src=&#039;..\/img\/klienci\/kolor\/10k.png&#039;;&quot; onmouseout=&quot;this.src=&#039;..\/img\/klienci\/mono\/10.png&#039;;&quot;\/&gt;&lt;\/div&gt;\n            &lt;div&gt;&lt;img u=&quot;image&quot; src=&quot;..\/img\/klienci\/mono\/11.png&quot; onmouseover=&quot;this.src=&#039;..\/img\/klienci\/kolor\/11k.png&#039;;&quot; onmouseout=&quot;this.src=&#039;..\/img\/klienci\/mono\/11.png&#039;;&quot;\/&gt;&lt;\/div&gt;\n            &lt;div&gt;&lt;img u=&quot;image&quot; src=&quot;..\/img\/klienci\/mono\/12.png&quot; onmouseover=&quot;this.src=&#039;..\/img\/klienci\/kolor\/12k.png&#039;;&quot; onmouseout=&quot;this.src=&#039;..\/img\/klienci\/mono\/12.png&#039;;&quot;\/&gt;&lt;\/div&gt;\n            &lt;div&gt;&lt;img u=&quot;image&quot; src=&quot;..\/img\/klienci\/mono\/13.png&quot; onmouseover=&quot;this.src=&#039;..\/img\/klienci\/kolor\/13k.png&#039;;&quot; onmouseout=&quot;this.src=&#039;..\/img\/klienci\/mono\/13.png&#039;;&quot;\/&gt;&lt;\/div&gt;\n            &lt;div&gt;&lt;img u=&quot;image&quot; src=&quot;..\/img\/klienci\/mono\/14.png&quot; onmouseover=&quot;this.src=&#039;..\/img\/klienci\/kolor\/14k.png&#039;;&quot; onmouseout=&quot;this.src=&#039;..\/img\/klienci\/mono\/14.png&#039;;&quot;\/&gt;&lt;\/div&gt;\n            &lt;div&gt;&lt;img u=&quot;image&quot; src=&quot;..\/img\/klienci\/mono\/15.png&quot; onmouseover=&quot;this.src=&#039;..\/img\/klienci\/kolor\/15k.png&#039;;&quot; onmouseout=&quot;this.src=&#039;..\/img\/klienci\/mono\/15.png&#039;;&quot;\/&gt;&lt;\/div&gt;\n            &lt;div&gt;&lt;img u=&quot;image&quot; src=&quot;..\/img\/klienci\/mono\/16.png&quot; onmouseover=&quot;this.src=&#039;..\/img\/klienci\/kolor\/16k.png&#039;;&quot; onmouseout=&quot;this.src=&#039;..\/img\/klienci\/mono\/16.png&#039;;&quot;\/&gt;&lt;\/div&gt;\n        &lt;\/div&gt;\n\n    &lt;\/div&gt;<\/code><\/pre>\n<p>Raczej nie jest to problem z bibliotekami js bo skopiowa\u0142em je do katalogu js w katalogu g\u0142\u00f3wnym. Wybaczcie je\u015bli problem jest b\u0142ahy ale jestem w tym pocz\u0105tkuj\u0105cy i sp\u0119dzi\u0142em ju\u017c ca\u0142\u0105 noc na szukaniu rozwi\u0105zania&#8230;<\/p>\n<p>B\u0119d\u0119 wdzi\u0119czny za sugeste.<\/p>\n<p>Dodam \u017ce robi\u0105c zwyk\u0142\u0105 stron\u0119 html z tym sliderem wszystko dzia\u0142a jak nale\u017cy.<\/p>\n<p>Pozdrawiam<br \/>\nMarcin<\/p>\n","protected":false},"template":"","class_list":["post-43971","topic","type-topic","status-closed","hentry","topic-tag-jquery","topic-tag-problem","topic-tag-slider"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/pl.wordpress.org\/support\/wp-json\/wp\/v2\/topic\/43971","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pl.wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/pl.wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/pl.wordpress.org\/support\/wp-json\/wp\/v2\/topic\/43971\/revisions"}],"wp:attachment":[{"href":"https:\/\/pl.wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=43971"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}