Ditty News Ticker - Version 2.2.11

Version Description

  • Resolved RTL, scrolling right issues
Download this release

Release Info

Developer metaphorcreations
Plugin Icon 128x128 Ditty News Ticker
Version 2.2.11
Comparing to
See all releases

Code changes from version 2.2.10 to 2.2.11

ditty-news-ticker.php CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://dittynewsticker.com/
5
  Description: Ditty News Ticker is a multi-functional data display plugin
6
  Text Domain: ditty-news-ticker
7
  Domain Path: languages
8
- Version: 2.2.10
9
  Author: Metaphor Creations
10
  Author URI: http://www.metaphorcreations.com
11
  Contributors: metaphorcreations
@@ -62,7 +62,7 @@ final class Ditty_News_Ticker {
62
 
63
  // Plugin version
64
  if ( ! defined( 'MTPHR_DNT_VERSION' ) ) {
65
- define( 'MTPHR_DNT_VERSION', '2.2.9' );
66
  }
67
 
68
  // Plugin Folder Path
5
  Description: Ditty News Ticker is a multi-functional data display plugin
6
  Text Domain: ditty-news-ticker
7
  Domain Path: languages
8
+ Version: 2.2.11
9
  Author: Metaphor Creations
10
  Author URI: http://www.metaphorcreations.com
11
  Contributors: metaphorcreations
62
 
63
  // Plugin version
64
  if ( ! defined( 'MTPHR_DNT_VERSION' ) ) {
65
+ define( 'MTPHR_DNT_VERSION', '2.2.11' );
66
  }
67
 
68
  // Plugin Folder Path
inc/static/css/style.css CHANGED
@@ -1,3 +1,9 @@
 
 
 
 
 
 
1
  .mtphr-dnt img {
2
  max-width: 100%;
3
  height: auto; }
@@ -130,10 +136,8 @@
130
  font-size: 30px;
131
  color: #FFF;
132
  margin: -15px 0 0 -15px;
133
- -webkit-animation: mtphr-dnt-spinner-rotation 0.8s infinite linear;
134
- -moz-animation: mtphr-dnt-spinner-rotation 0.8s infinite linear;
135
- -o-animation: mtphr-dnt-spinner-rotation 0.8s infinite linear;
136
- animation: mtphr-dnt-spinner-rotation 0.8s infinite linear; }
137
 
138
  @-webkit-keyframes mtphr-dnt-spinner-rotation {
139
  from {
@@ -141,23 +145,13 @@
141
  to {
142
  -webkit-transform: rotate(359deg); } }
143
 
144
- @-moz-keyframes mtphr-dnt-spinner-rotation {
145
- from {
146
- -moz-transform: rotate(0deg); }
147
- to {
148
- -moz-transform: rotate(359deg); } }
149
-
150
- @-o-keyframes mtphr-dnt-spinner-rotation {
151
- from {
152
- -o-transform: rotate(0deg); }
153
- to {
154
- -o-transform: rotate(359deg); } }
155
-
156
  @keyframes mtphr-dnt-spinner-rotation {
157
  from {
158
- transform: rotate(0deg); }
 
159
  to {
160
- transform: rotate(359deg); } }
 
161
 
162
  /* --------------------------------------------------------- */
163
  /* !Images */
@@ -174,12 +168,10 @@
174
  margin-top: 0; }
175
  .mtphr-dnt-image-container > *:last-child {
176
  margin-bottom: 0; }
177
- .mtphr-dnt-image-container.mtphr-dnt-image-caption-top .mtphr-dnt-image-photo,
178
- .mtphr-dnt-image-container.mtphr-dnt-image-caption-bottom .mtphr-dnt-image-photo {
179
  margin-top: 0;
180
  margin-bottom: 0; }
181
- .mtphr-dnt-image-container.mtphr-dnt-image-caption-top .mtphr-dnt-image-caption,
182
- .mtphr-dnt-image-container.mtphr-dnt-image-caption-bottom .mtphr-dnt-image-caption {
183
  position: absolute;
184
  left: 0;
185
  bottom: 0;
@@ -197,8 +189,8 @@
197
  display: block; }
198
  .mtphr-dnt-image-container.mtphr-dnt-image-caption-hover .mtphr-dnt-image-caption {
199
  opacity: 0;
200
- -webkit-transition: opacity 0.25s ease;
201
- transition: opacity 0.25s ease; }
202
  .mtphr-dnt-image-container.mtphr-dnt-image-caption-hover:hover .mtphr-dnt-image-caption {
203
  opacity: 1; }
204
  .mtphr-dnt-image-container .mtphr-dnt-image-photo {
@@ -257,10 +249,8 @@
257
 
258
  .mtphr-dnt-nav-hide {
259
  opacity: 0;
260
- -webkit-transition: opacity 0.3s linear;
261
- -moz-transition: opacity 0.3s linear;
262
- -o-transition: opacity 0.3s linear;
263
- transition: opacity 0.3s linear; }
264
 
265
  .mtphr-dnt-tick-container:hover .mtphr-dnt-nav-hide {
266
  opacity: 1; }
@@ -327,8 +317,8 @@
327
  background-color: #333;
328
  border-radius: 20px;
329
  opacity: .8;
330
- -webkit-transition: opacity 0.25s ease;
331
- transition: opacity 0.25s ease; }
332
  .mtphr-dnt-play-pause i:before {
333
  vertical-align: middle; }
334
  .mtphr-dnt-play-pause i.mtphr-dnt-icon-play {
@@ -350,17 +340,13 @@
350
  color: #666;
351
  background: #FFF;
352
  padding: 6px 8px 4px 7px;
353
- -webkit-border-radius: 5px;
354
- -moz-border-radius: 5px;
355
  border-radius: 5px;
356
  filter: alpha(opacity=50);
357
  -moz-opacity: .5;
358
  -khtml-opacity: .5;
359
  opacity: .5;
360
- -webkit-transition: opacity 0.2s linear;
361
- -moz-transition: opacity 0.2s linear;
362
- -o-transition: opacity 0.2s linear;
363
- transition: opacity 0.2s linear; }
364
 
365
  .mtphr-dnt-edit-link:hover {
366
  color: #666;
1
+ .rtl .mtphr-dnt {
2
+ direction: ltr; }
3
+
4
+ .rtl .mtphr-dnt-tick {
5
+ direction: rtl; }
6
+
7
  .mtphr-dnt img {
8
  max-width: 100%;
9
  height: auto; }
136
  font-size: 30px;
137
  color: #FFF;
138
  margin: -15px 0 0 -15px;
139
+ -webkit-animation: mtphr-dnt-spinner-rotation .8s infinite linear;
140
+ animation: mtphr-dnt-spinner-rotation .8s infinite linear; }
 
 
141
 
142
  @-webkit-keyframes mtphr-dnt-spinner-rotation {
143
  from {
145
  to {
146
  -webkit-transform: rotate(359deg); } }
147
 
 
 
 
 
 
 
 
 
 
 
 
 
148
  @keyframes mtphr-dnt-spinner-rotation {
149
  from {
150
+ -webkit-transform: rotate(0deg);
151
+ transform: rotate(0deg); }
152
  to {
153
+ -webkit-transform: rotate(359deg);
154
+ transform: rotate(359deg); } }
155
 
156
  /* --------------------------------------------------------- */
157
  /* !Images */
168
  margin-top: 0; }
169
  .mtphr-dnt-image-container > *:last-child {
170
  margin-bottom: 0; }
171
+ .mtphr-dnt-image-container.mtphr-dnt-image-caption-top .mtphr-dnt-image-photo, .mtphr-dnt-image-container.mtphr-dnt-image-caption-bottom .mtphr-dnt-image-photo {
 
172
  margin-top: 0;
173
  margin-bottom: 0; }
174
+ .mtphr-dnt-image-container.mtphr-dnt-image-caption-top .mtphr-dnt-image-caption, .mtphr-dnt-image-container.mtphr-dnt-image-caption-bottom .mtphr-dnt-image-caption {
 
175
  position: absolute;
176
  left: 0;
177
  bottom: 0;
189
  display: block; }
190
  .mtphr-dnt-image-container.mtphr-dnt-image-caption-hover .mtphr-dnt-image-caption {
191
  opacity: 0;
192
+ -webkit-transition: opacity .25s ease;
193
+ transition: opacity .25s ease; }
194
  .mtphr-dnt-image-container.mtphr-dnt-image-caption-hover:hover .mtphr-dnt-image-caption {
195
  opacity: 1; }
196
  .mtphr-dnt-image-container .mtphr-dnt-image-photo {
249
 
250
  .mtphr-dnt-nav-hide {
251
  opacity: 0;
252
+ -webkit-transition: opacity .3s linear;
253
+ transition: opacity .3s linear; }
 
 
254
 
255
  .mtphr-dnt-tick-container:hover .mtphr-dnt-nav-hide {
256
  opacity: 1; }
317
  background-color: #333;
318
  border-radius: 20px;
319
  opacity: .8;
320
+ -webkit-transition: opacity .25s ease;
321
+ transition: opacity .25s ease; }
322
  .mtphr-dnt-play-pause i:before {
323
  vertical-align: middle; }
324
  .mtphr-dnt-play-pause i.mtphr-dnt-icon-play {
340
  color: #666;
341
  background: #FFF;
342
  padding: 6px 8px 4px 7px;
 
 
343
  border-radius: 5px;
344
  filter: alpha(opacity=50);
345
  -moz-opacity: .5;
346
  -khtml-opacity: .5;
347
  opacity: .5;
348
+ -webkit-transition: opacity .2s linear;
349
+ transition: opacity .2s linear; }
 
 
350
 
351
  .mtphr-dnt-edit-link:hover {
352
  color: #666;
inc/static/js/ditty-news-ticker.min.js CHANGED
@@ -1,399 +1 @@
1
- /**
2
- * Ditty News Ticker
3
- * Date: 10/06/2014
4
- *
5
- * @author Metaphor Creations
6
- * @version 1.4.12
7
- *
8
- **/
9
- !function(ot){var e={init:function(st){return this.each(function(){
10
- /**
11
- * Initialize the ticker
12
- *
13
- * @since 1.0.0
14
- */
15
- function r(){
16
- // Save the tick count & total
17
- J.tick_count=N.find(".mtphr-dnt-tick").length,
18
- // Start the first tick
19
- 0<J.tick_count&&(
20
- // Setup a ticker scroll
21
- "scroll"===H.type?t():"rotate"===H.type&&v()),
22
- // Trigger the afterLoad callback
23
- H.after_load.call(K,N),K.trigger("mtphr_dnt_after_load_single",[J,Z]),ot("body").trigger("mtphr_dnt_after_load",[K,J,Z])}
24
- /**
25
- * Setup the ticker scroll
26
- *
27
- * @since 1.1.0
28
- */function n(){
29
- // Loop through the tick items
30
- N.find(".mtphr-dnt-tick").each(function(){
31
- // Find the greatest tick height
32
- ot(this).height()>Y&&(Y=ot(this).height()),"up"!==H.scroll_direction&&"down"!==H.scroll_direction||ot(this).css("height","auto")}),
33
- // Set the ticker height
34
- N.css("height",Y+"px")}function t(){var t=N.find(".mtphr-dnt-tick:first");if(t.attr("style")){var e,i=t.attr("style").split("width:");tt=!(1<i.length)}
35
- // Reset the ticks
36
- Z=[],
37
- //mtphr_dnt_scroll_set_height();
38
- N.imagesLoaded(function(){n(),
39
- // Loop through the tick items
40
- N.find(".mtphr-dnt-tick").each(function(){
41
- // Make sure the ticker is visible
42
- ot(this).show();
43
- // Add the tick data
44
- var t=[{headline:ot(this)}];
45
- // Add the tick to the array
46
- Z.push(t)}),
47
- // Set the initial position of the ticks
48
- u(),
49
- // Start the scroll loop
50
- a()}),
51
- // Clear the loop on mouse hover
52
- N.hover(function(){H.scroll_pause&&s()},function(){H.scroll_pause&&!J.paused&&o()})}function s(){clearInterval($)}function o(){a()}
53
- /**
54
- * Create the ticker scroll loop
55
- *
56
- * @since 1.0.8
57
- */function a(){
58
- // Start the ticker timer
59
- clearInterval($),$=setInterval(function(){for(var t=0;t<J.tick_count;t++)if(!0===Z[t][0].visible){var e="reset";"left"===H.scroll_direction||"right"===H.scroll_direction?"reset"===(e="left"===H.scroll_direction?i(t):c(t))?(e=Z[t][0].reset,Z[t][0].headline.stop(!0,!0).css("left",e+"px")):Z[t][0].headline.stop(!0,!0).animate({left:e+"px"},100,"linear"):"reset"===(e="up"===H.scroll_direction?p(t):l(t))?(e=Z[t][0].reset,Z[t][0].headline.stop(!0,!0).css("top",e+"px")):Z[t][0].headline.stop(!0,!0).animate({top:e+"px"},100,"linear"),Z[t][0].position=e}},100)}
60
- /**
61
- * Scroll the ticker left
62
- *
63
- * @since 1.0.0
64
- */function i(t){
65
- // Find the new position
66
- var e=parseFloat(Z[t][0].position-H.scroll_speed);
67
- // Reset the tick if off the screen
68
- return e<-(Z[t][0].headline.width()+H.offset)?e=_(t):e<parseFloat(X-Z[t][0].headline.width()-H.scroll_spacing)&&f(t),e}
69
- /**
70
- * Scroll the ticker right
71
- *
72
- * @since 1.0.0
73
- */function c(t){
74
- // Find the new position
75
- var e=Z[t][0].position+H.scroll_speed;
76
- // Reset the tick if off the screen
77
- return e>X+H.offset?e=_(t):e>H.scroll_spacing&&f(t),e}
78
- /**
79
- * Scroll the ticker up
80
- *
81
- * @since 1.0.0
82
- */function p(t){
83
- // Find the new position
84
- var e=Z[t][0].position-H.scroll_speed;
85
- // Reset the tick if off the screen
86
- return e<-(Z[t][0].headline.height()+H.offset)?e=_(t):e<Y-Z[t][0].headline.height()-H.scroll_spacing&&f(t),e}
87
- /**
88
- * Scroll the ticker down
89
- *
90
- * @since 1.0.0
91
- */function l(t){
92
- // Find the new position
93
- var e=Z[t][0].position+H.scroll_speed;
94
- // Reset the tick if off the screen
95
- return e>Y+H.offset?e=_(t):e>H.scroll_spacing&&f(t),e}
96
- /**
97
- * Check the current tick position
98
- *
99
- * @since 1.0.0
100
- */function _(t){return 1<J.tick_count&&(Z[t][0].visible=!1),
101
- // Add a scroll complete trigger
102
- J.tick_count===t+1&&(K.trigger("mtphr_dnt_scroll_complete",[J,Z]),ot("body").trigger("mtphr_dnt_scroll_complete",[K,J,Z])),"reset"}function e(t){!1===Z[t][0].visible&&(J.previous_tick=parseInt(t-1),J.previous_tick<0&&(J.previous_tick=parseInt(J.tick_count-1)),J.current_tick=t,J.next_tick=parseInt(t+1),J.next_tick>=J.tick_count&&(J.next_tick=0))}
103
- /**
104
- * Check the next tick visibility
105
- *
106
- * @since 1.0.0
107
- */function f(t){t===J.tick_count-1?H.scroll_loop&&(e(0),Z[0][0].visible=!0):(e(parseInt(t+1)),Z[t+1][0].visible=!0)}
108
- /**
109
- * Resize the scroll ticks
110
- *
111
- * @since 1.1.0
112
- */function d(){for(var t=0;t<J.tick_count;t++){
113
- // Set the tick position
114
- var e,i=Z[t][0].headline;switch(H.scroll_direction){case"left":e=X+H.offset,!1===Z[t][0].visible&&i.css("left",e+"px");break;case"right":e=parseInt("-"+(i.width()+H.offset)),!1===Z[t][0].visible&&i.css("left",e+"px");break;case"up":tt&&i.css("width",X),e=parseInt(Y+H.offset),!1===Z[t][0].visible&&i.css("top",e+"px");break;case"down":tt&&i.css("width",X),e=parseInt("-"+(i.height()+H.offset)),!1===Z[t][0].visible&&i.css("top",e+"px");break}
115
- // Adjust the tick data
116
- Z[t][0].width=i.width(),Z[t][0].height=i.height(),!1===Z[t][0].visible&&(Z[t][0].position=e),Z[t][0].reset=e}}
117
- /**
118
- * Reset the scroller for vertical scrolls
119
- *
120
- * @since 1.1.0
121
- */function u(){for(var t,e,i=0;i<J.tick_count;i++)if(Z[i]){switch(e=Z[i][0].headline,H.scroll_direction){case"left":t=X+H.offset,e.stop(!0,!0).css("left",t+"px");break;case"right":
122
- //console.log(settings.offset);
123
- t=parseInt("-"+(e.width()+H.offset)),
124
- /*
125
- if( mtphr_dnt_vars.is_rtl ) {
126
- position = parseInt('-'+($tick.width()+(ticker_width/2)));
127
- }
128
- */
129
- e.stop(!0,!0).css("left",t+"px");break;case"up":tt&&e.css("width",X),t=parseInt(Y+H.offset),e.stop(!0,!0).css("top",t+"px");break;case"down":tt&&e.css("width",X),t=parseInt("-"+(e.height()+H.offset)),e.stop(!0,!0).css("top",t+"px");break}Z[i][0].width=e.width(),Z[i][0].height=e.height(),Z[i][0].position=t,Z[i][0].reset=t,Z[i][0].visible=!1}
130
- // Reset the current tick
131
- // Set the ticks to display on init
132
- if(J.current_tick=0,
133
- // Set the first tick visibility
134
- Z[J.current_tick][0].visible=!0,H.scroll_init)for("left"===H.scroll_direction?t=.1*X:"right"===H.scroll_direction?t=.9*X:"up"===H.scroll_direction?t=.1*Y:"down"===H.scroll_direction&&(t=.9*Y),i=0;i<J.tick_count;i++)switch(e=Z[i][0].headline,H.scroll_direction){case"left":t<X&&(e.stop(!0,!0).css("left",t+"px"),Z[i][0].position=t,Z[i][0].visible=!0,t=t+Z[i][0].width+H.scroll_spacing);break;case"right":0<t&&(t-=Z[i][0].width,e.stop(!0,!0).css("left",t+"px"),Z[i][0].position=t,Z[i][0].visible=!0,t-=H.scroll_spacing);break;case"up":t<Y&&(e.stop(!0,!0).css("top",t+"px"),Z[i][0].position=t,Z[i][0].visible=!0,t=t+Z[i][0].height+H.scroll_spacing);break;case"down":0<t&&(t-=Z[i][0].height,e.stop(!0,!0).css("top",t+"px"),Z[i][0].position=t,Z[i][0].visible=!0,t-=H.scroll_spacing);break}}function h(){k()}function g(){clearInterval(et)}
135
- /**
136
- * Setup the ticker rotator
137
- *
138
- * @since 1.0.8
139
- */function v(){switch(
140
- // Loop through the tick items
141
- N.find(".mtphr-dnt-tick").each(function(){
142
- // Add the tick to the array
143
- Z.push(ot(this)),ot(this).imagesLoaded(function(){x()})}),
144
- // Resize the ticks
145
- x(),
146
- // Loop through the tick items
147
- N.find(".mtphr-dnt-tick").show(),H.rotate_type){case"fade":I(N,Z,parseInt(100*H.rotate_speed),H.rotate_ease);break;case"slide_left":D(N,Z,parseInt(100*H.rotate_speed),H.rotate_ease);break;case"slide_right":L(N,Z,parseInt(100*H.rotate_speed),H.rotate_ease);break;case"slide_down":j(N,Z,parseInt(100*H.rotate_speed),H.rotate_ease);break;case"slide_up":M(N,Z,parseInt(100*H.rotate_speed),H.rotate_ease);break}m(0),
148
- // Start the rotator rotate
149
- H.auto_rotate&&h(),
150
- // Clear the loop on mouse hover
151
- N.hover(function(){H.auto_rotate&&H.rotate_pause&&!J.running&&g()},function(){H.auto_rotate&&H.rotate_pause&&!J.running&&!J.paused&&h()})}
152
- /**
153
- * Create the ticker rotator loop
154
- *
155
- * @since 1.0.0
156
- */function k(){
157
- // Start the ticker timer
158
- g(),et=setInterval(function(){
159
- // Find the new tick
160
- var t=parseInt(J.current_tick+1);t===J.tick_count&&(t=0),y(t)},parseInt(1e3*H.rotate_delay))}
161
- /**
162
- * Create the rotator update call
163
- *
164
- * @since 1.1.7
165
- */function y(t){J.current_tick!==t&&(
166
- // Clear the interval
167
- H.auto_rotate&&g(),
168
- // Set the next variable
169
- J.next_tick=t,
170
- // Trigger the before change callback
171
- H.before_change.call(K,N),K.trigger("mtphr_dnt_before_change_single",[J,Z]),ot("body").trigger("mtphr_dnt_before_change",[K,J,Z]),
172
- // Set the running variable
173
- J.running=1,
174
- // Rotate the current tick out
175
- w(t),
176
- // Rotate the new tick in
177
- b(t),
178
- // Set the previous & current tick
179
- J.previous_tick=J.current_tick,J.current_tick=t,
180
- // Trigger the after change callback
181
- rt=setTimeout(function(){H.after_change.call(K,N),K.trigger("mtphr_dnt_after_change_single",[J,Z]),ot("body").trigger("mtphr_dnt_after_change",[K,J,Z]),
182
- // Reset the rotator type & variables
183
- it=H.rotate_type,J.reverse=0,J.running=0,
184
- // Restart the interval
185
- H.auto_rotate&&!J.paused&&k()},parseInt(100*H.rotate_speed)))}
186
- /**
187
- * Update the control links
188
- *
189
- * @since 1.0.0
190
- */function m(t){U&&(U.children("a").removeClass("active"),U.children('a[href="'+t+'"]').addClass("active"))}
191
- /**
192
- * Create the rotator in function calls
193
- *
194
- * @since 1.0.0
195
- */function b(t){switch(
196
- // Update the links
197
- m(t),it){case"fade":F(N,ot(Z[t]),ot(Z[J.current_tick]),parseInt(100*H.rotate_speed),H.rotate_ease);break;case"slide_left":W(N,ot(Z[t]),ot(Z[J.current_tick]),parseInt(100*H.rotate_speed),H.rotate_ease);break;case"slide_right":O(N,ot(Z[t]),ot(Z[J.current_tick]),parseInt(100*H.rotate_speed),H.rotate_ease);break;case"slide_down":E(N,ot(Z[t]),ot(Z[J.current_tick]),parseInt(100*H.rotate_speed),H.rotate_ease);break;case"slide_up":Q(N,ot(Z[t]),ot(Z[J.current_tick]),parseInt(100*H.rotate_speed),H.rotate_ease);break}}
198
- /**
199
- * Create the rotator out function calls
200
- *
201
- * @since 1.0.0
202
- */function w(t){switch(it){case"fade":C(N,ot(Z[J.current_tick]),ot(Z[t]),parseInt(100*H.rotate_speed),H.rotate_ease);break;case"slide_left":z(N,ot(Z[J.current_tick]),ot(Z[t]),parseInt(100*H.rotate_speed),H.rotate_ease);break;case"slide_right":T(N,ot(Z[J.current_tick]),ot(Z[t]),parseInt(100*H.rotate_speed),H.rotate_ease);break;case"slide_down":A(N,ot(Z[J.current_tick]),ot(Z[t]),parseInt(100*H.rotate_speed),H.rotate_ease);break;case"slide_up":R(N,ot(Z[J.current_tick]),ot(Z[t]),parseInt(100*H.rotate_speed),H.rotate_ease);break}}
203
- /**
204
- * Resize the rotator ticks
205
- *
206
- * @since 1.0.8
207
- */function x(){for(var t=0;t<J.tick_count;t++)
208
- // Set the width of the tick
209
- ot(Z[t]).width(X+"px"),J.current_tick!==t&&ot(Z[t]).css({left:parseFloat(X+H.offset)+"px"});
210
- // Resize the ticker
211
- var e=ot(Z[J.current_tick]).height();N.stop().css("height",e+"px")}
212
- /**
213
- * Rotator fade scripts
214
- *
215
- * @since 1.0.0
216
- */function I(t,e){
217
- // Get the first tick
218
- var i=e[0],r=i.height();
219
- // Find the width of the tick
220
- // Set the height of the ticker
221
- t.css("height",r+"px"),i.css({opacity:1,left:"auto"})}
222
- // Show the new tick
223
- function F(t,e,i,r,n){e.css({opacity:0,left:"auto"}),e.stop().animate({opacity:1},r,n);var s=e.height();
224
- // Resize the ticker
225
- t.stop().animate({height:s+"px"},r,n)}
226
- // Hide the old tick
227
- function C(t,e,i,r,n){e.stop().animate({opacity:0},r,n,function(){ot(this).css({left:parseFloat(X+H.offset)+"px"}),e.remove(),t.append(e)})}
228
- /**
229
- * Rotator slide left scripts
230
- *
231
- * @since 1.0.0
232
- */function D(t,e){
233
- // Get the first tick
234
- var i=e[0],r=i.height();
235
- // Find the dimensions of the tick
236
- // Set the height of the ticker
237
- t.css("height",r+"px"),
238
- // Set the initial position of the width & make sure it's visible
239
- i.css({opacity:1,left:0})}
240
- // Show the new tick
241
- function W(t,e,i,r,n){
242
- // Find the dimensions of the tick
243
- var s=e.height();
244
- // Set the initial position of the width & make sure it's visible
245
- e.css({opacity:1,left:parseFloat(X+H.offset)+"px"}),
246
- // Resize the ticker
247
- t.stop().animate({height:s+"px"},r,n,function(){}),
248
- // Slide the tick in
249
- e.stop().animate({left:"0"},r,n,function(){})}
250
- // Hide the old tick
251
- function z(t,e,i,r,n){
252
- // Slide the tick in
253
- e.stop().animate({left:"-"+parseFloat(X+H.offset)+"px"},r,n,function(){e.css({opacity:0}),e.remove(),t.append(e)})}
254
- /**
255
- * Rotator slide right scripts
256
- *
257
- * @since 1.0.0
258
- */function L(t,e){
259
- // Get the first tick
260
- var i=e[0],r=i.height();
261
- // Find the dimensions of the tick
262
- // Set the height of the ticker
263
- t.css("height",r+"px"),
264
- // Set the initial position of the width & make sure it's visible
265
- i.css({opacity:1,left:0})}
266
- // Show the new tick
267
- function O(t,e,i,r,n){
268
- // Find the dimensions of the tick
269
- var s=e.height();
270
- // Set the initial position of the width & make sure it's visible
271
- e.css({opacity:1,left:"-"+parseFloat(X+H.offset)+"px"}),
272
- // Resize the ticker
273
- t.stop().animate({height:s+"px"},r,n,function(){}),
274
- // Slide the tick in
275
- e.stop().animate({left:"0"},r,n)}
276
- // Hide the old tick
277
- function T(t,e,i,r,n){
278
- // Slide the tick in
279
- e.stop().animate({left:parseFloat(X+H.offset)+"px"},r,n,function(){e.css({opacity:0}),e.remove(),t.append(e)})}
280
- /**
281
- * Rotator slide down scripts
282
- *
283
- * @since 1.0.0
284
- */function j(t,e){
285
- // Get the first tick
286
- var i=e[0],r=i.height();
287
- // Find the height of the tick
288
- // Set the height of the ticker
289
- t.css("height",r+"px"),
290
- // Set the initial position of the width & make sure it's visible
291
- i.css({opacity:1,top:0,left:"auto"})}
292
- // Show the new tick
293
- function E(t,e,i,r,n){
294
- // Find the height of the tick
295
- var s=e.height();
296
- // Set the initial position of the width & make sure it's visible
297
- e.css({opacity:1,top:"-"+parseFloat(s+H.offset)+"px",left:"auto"}),
298
- // Resize the ticker
299
- t.stop().animate({height:s+"px"},r,n),
300
- // Slide the tick in
301
- e.stop().animate({top:"0"},r,n)}
302
- // Hide the old tick
303
- function A(t,e,i,r,n){
304
- // Find the height of the next tick
305
- var s=i.height();
306
- // Slide the tick in
307
- e.stop().animate({top:parseFloat(s+H.offset)+"px"},r,n,function(){e.css({opacity:0}),e.remove(),t.append(e)})}
308
- /**
309
- * Rotator slide up scripts
310
- *
311
- * @since 1.0.0
312
- */function M(t,e){
313
- // Get the first tick
314
- var i=e[0],r=i.height();
315
- // Find the height of the tick
316
- // Set the height of the ticker
317
- t.css({height:r+"px",left:"auto"}),
318
- // Set the initial position of the width & make sure it's visible
319
- i.css({opacity:1,top:0})}
320
- // Show the new tick
321
- function Q(t,e,i,r,n){
322
- // Find the height of the tick
323
- var s=e.height();
324
- // Set the initial position of the width & make sure it's visible
325
- e.css({opacity:1,top:parseFloat(i.height()+H.offset)+"px",left:"auto"}),
326
- // Resize the ticker
327
- t.stop().animate({height:s+"px"},r,n),
328
- // Slide the tick in
329
- e.stop().animate({top:"0"},r,n)}
330
- // Hide the old tick
331
- function R(t,e,i,r,n){
332
- // Find the height of the next tick
333
- var s=e.height();
334
- // Slide the tick in
335
- e.stop().animate({top:"-"+parseFloat(s+H.offset)+"px"},r,n,function(){e.css({opacity:0}),e.remove(),t.append(e)})}
336
- /* --------------------------------------------------------- */
337
- /* !Set the next item */
338
- /* --------------------------------------------------------- */function q(){if(J.running)return!1;
339
- // Find the new tick
340
- var t=parseInt(J.current_tick+1);t===J.tick_count&&(t=0),y(t)}
341
- /* --------------------------------------------------------- */
342
- /* !Set the previous item */
343
- /* --------------------------------------------------------- */function B(){if(J.running)return!1;
344
- // Find the new tick
345
- var t=parseInt(J.current_tick-1);t<0&&(t=J.tick_count-1),H.nav_reverse&&("slide_left"===H.rotate_type?it="slide_right":"slide_right"===H.rotate_type?it="slide_left":"slide_down"===H.rotate_type?it="slide_up":"slide_up"===H.rotate_type&&(it="slide_down"),J.reverse=1),y(t)}
346
- /**
347
- * Navigation clicks
348
- *
349
- * @since 1.0.0
350
- */
351
- /* --------------------------------------------------------- */
352
- /* !Play and pause - 2.0.4 */
353
- /* --------------------------------------------------------- */
354
- function G(t){t?(J.paused=!1,V.removeClass("paused"),"scroll"===H.type?o():h()):(J.paused=!0,V.addClass("paused"),"scroll"===H.type?s():g()),K.trigger("mtphr_dnt_play_pause",[J,Z])}
355
- // Create default options
356
- var H={id:"",type:"scroll",scroll_direction:"left",scroll_speed:10,scroll_pause:0,scroll_spacing:40,scroll_units:10,scroll_init:0,scroll_loop:1,rotate_type:"fade",auto_rotate:0,rotate_delay:10,rotate_pause:0,rotate_speed:10,rotate_ease:"easeOutExpo",nav_reverse:0,disable_touchswipe:0,offset:20,before_change:function(){},after_change:function(){},after_load:function(){}},J={id:H.id,tick_count:0,previous_tick:0,current_tick:0,next_tick:0,reverse:0,running:0,paused:0};
357
- // Useful variables. Play carefully.
358
- // Add any set options
359
- st&&ot.extend(H,st);
360
- // Create variables
361
- var K=ot(this),N=K.find(".mtphr-dnt-tick-contents"),P=K.find(".mtphr-dnt-nav-prev"),S=K.find(".mtphr-dnt-nav-next"),U=K.find(".mtphr-dnt-control-links"),V=K.find(".mtphr-dnt-play-pause"),X=N.outerWidth(!0),Y=0,Z=[],$,tt=!0,et,it=H.rotate_type,rt;
362
- // Add the vars
363
- if(N.data("ditty:vars",J),P&&"rotate"===H.type&&(P.bind("click",function(t){t.preventDefault(),B()}),S.bind("click",function(t){t.preventDefault(),q()}))
364
- /**
365
- * Nav controls
366
- *
367
- * @since 1.0.2
368
- */,U&&"rotate"===H.type&&U.children("a").bind("click",function(t){t.preventDefault();
369
- // Find the new tick
370
- var e=parseInt(ot(this).attr("href"));if(J.running)return!1;if(e===J.current_tick)return!1;var i=e<J.current_tick?1:0;H.nav_reverse&&i&&("slide_left"===H.rotate_type?it="slide_right":"slide_right"===H.rotate_type?it="slide_left":"slide_down"===H.rotate_type?it="slide_up":"slide_up"===H.rotate_type&&(it="slide_down"),J.reverse=1),y(e)}),V.bind("click",function(t){t.preventDefault(),G(J.paused)}),
371
- /* --------------------------------------------------------- */
372
- /* !Mobile swipe - 1.5.0 */
373
- /* --------------------------------------------------------- */
374
- "rotate"!==H.type||H.disable_touchswipe||N.swipe({triggerOnTouchEnd:!0,swipeLeft:function(){if(J.running)return!1;
375
- // Find the new tick
376
- var t=parseInt(J.current_tick+1);t===J.tick_count&&(t=0),"slide_left"!==H.rotate_type&&"slide_right"!==H.rotate_type||(it="slide_left"),y(t)},swipeRight:function(){if(J.running)return!1;
377
- // Find the new tick
378
- var t=parseInt(J.current_tick-1);t<0&&(t=J.tick_count-1),"slide_left"!==H.rotate_type&&"slide_right"!==H.rotate_type||(it="slide_right"),H.nav_reverse&&("slide_down"===H.rotate_type?it="slide_up":"slide_up"===H.rotate_type&&(it="slide_down"),J.reverse=1),y(t)}})
379
- /* --------------------------------------------------------- */
380
- /* !Listen for external events - 1.4.1 */
381
- /* --------------------------------------------------------- */,K.on("mtphr_dnt_next",function(){q()}),K.on("mtphr_dnt_prev",function(){B()}),K.on("mtphr_dnt_goto",function(t,e){y(parseInt(e))}),K.on("mtphr_dnt_pause",function(){G()}),K.on("mtphr_dnt_play",function(){G(!0)}),
382
- /**
383
- * Resize listener
384
- * Reset the ticker width
385
- *
386
- * @since 1.4.1
387
- */
388
- ot(window).resize(function(){
389
- // Resize the tickers if the width is different
390
- N.outerWidth()!==X&&(X=N.outerWidth(!0),"scroll"===H.type?("up"===H.scroll_direction||"down"===H.scroll_direction)&&tt?u():d():"rotate"===H.type&&x())}),
391
- /* --------------------------------------------------------- */
392
- /* !Listen for resize event from other plugins - 1.4.1 */
393
- /* --------------------------------------------------------- */
394
- K.on("mtphr_dnt_resize_single",function(){"scroll"===H.type?d():"rotate"===H.type&&x()}),ot("body").on("mtphr_dnt_resize",function(t,e){e&&0<=e.indexOf(H.id)&&("scroll"===H.type?d():"rotate"===H.type&&x())}),K.on("mtphr_dnt_replace_ticks",function(t,e,i){clearInterval($),K.find(".mtphr-dnt-tick").remove(),e.each(function(){N.append(ot(this))}),setTimeout(function(){r()},i)}),0===K.width())var nt=setInterval(function(){10<K.width()&&(clearInterval(nt),X=N.outerWidth(!0),r())},100);else r()})}};
395
- /**
396
- * Setup the class
397
- *
398
- * @since 1.0.0
399
- */ot.fn.ditty_news_ticker=function(t){return e[t]?e[t].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof t&&t?void ot.error("Method "+t+" does not exist in ditty_news_ticker"):e.init.apply(this,arguments)}}(jQuery);
1
+ !function(t){var e={init:function(e){return this.each((function(){function i(){N.tick_count=S.find(".mtphr-dnt-tick").length,N.tick_count>0&&("scroll"===K.type?n():"rotate"===K.type&&y()),K.after_load.call(P,S),P.trigger("mtphr_dnt_after_load_single",[N,tt]),t("body").trigger("mtphr_dnt_after_load",[P,N,tt])}function r(){S.find(".mtphr-dnt-tick").each((function(){t(this).height()>$&&($=t(this).height()),"up"!==K.scroll_direction&&"down"!==K.scroll_direction||t(this).css("height","auto")})),S.css("height",$+"px")}function n(){var e=S.find(".mtphr-dnt-tick:first");if(e.attr("style")){var i,n=e.attr("style").split("width:");it=!(n.length>1)}tt=[],S.imagesLoaded((function(){r(),S.find(".mtphr-dnt-tick").each((function(){t(this).show();var e=[{headline:t(this)}];tt.push(e)})),g(),a()})),S.hover((function(){K.scroll_pause&&s()}),(function(){K.scroll_pause&&!N.paused&&o()}))}function s(){clearInterval(et)}function o(){a()}function a(){clearInterval(et),et=setInterval((function(){for(var t=0;t<N.tick_count;t++)if(!0===tt[t][0].visible){var e="reset";"left"===K.scroll_direction||"right"===K.scroll_direction?"reset"===(e="left"===K.scroll_direction?c(t):p(t))?(e=tt[t][0].reset,tt[t][0].headline.stop(!0,!0).css("left",e+"px")):tt[t][0].headline.stop(!0,!0).animate({left:e+"px"},100,"linear"):"reset"===(e="up"===K.scroll_direction?l(t):_(t))?(e=tt[t][0].reset,tt[t][0].headline.stop(!0,!0).css("top",e+"px")):tt[t][0].headline.stop(!0,!0).animate({top:e+"px"},100,"linear"),tt[t][0].position=e}}),100)}function c(t){var e=parseFloat(tt[t][0].position-K.scroll_speed);return e<-(tt[t][0].headline.width()+K.offset)?e=f(t):e<parseFloat(Z-tt[t][0].headline.width()-K.scroll_spacing)&&u(t),e}function p(t){var e=tt[t][0].position+K.scroll_speed;return e>Z+K.offset?e=f(t):e>K.scroll_spacing&&u(t),e}function l(t){var e=tt[t][0].position-K.scroll_speed;return e<-(tt[t][0].headline.height()+K.offset)?e=f(t):e<$-tt[t][0].headline.height()-K.scroll_spacing&&u(t),e}function _(t){var e=tt[t][0].position+K.scroll_speed;return e>$+K.offset?e=f(t):e>K.scroll_spacing&&u(t),e}function f(e){return N.tick_count>1&&(tt[e][0].visible=!1),N.tick_count===e+1&&(P.trigger("mtphr_dnt_scroll_complete",[N,tt]),t("body").trigger("mtphr_dnt_scroll_complete",[P,N,tt])),"reset"}function d(t){!1===tt[t][0].visible&&(N.previous_tick=parseInt(t-1),N.previous_tick<0&&(N.previous_tick=parseInt(N.tick_count-1)),N.current_tick=t,N.next_tick=parseInt(t+1),N.next_tick>=N.tick_count&&(N.next_tick=0))}function u(t){t===N.tick_count-1?K.scroll_loop&&(d(0),tt[0][0].visible=!0):(d(parseInt(t+1)),tt[t+1][0].visible=!0)}function h(){for(var t=0;t<N.tick_count;t++){var e,i=tt[t][0].headline;switch(K.scroll_direction){case"left":e=Z+K.offset,!1===tt[t][0].visible&&i.css("left",e+"px");break;case"right":e=parseInt("-"+(i.width()+K.offset)),!1===tt[t][0].visible&&i.css("left",e+"px");break;case"up":it&&i.css("width",Z),e=parseInt($+K.offset),!1===tt[t][0].visible&&i.css("top",e+"px");break;case"down":it&&i.css("width",Z),e=parseInt("-"+(i.height()+K.offset)),!1===tt[t][0].visible&&i.css("top",e+"px");break}tt[t][0].width=i.width(),tt[t][0].height=i.height(),!1===tt[t][0].visible&&(tt[t][0].position=e),tt[t][0].reset=e}}function g(){for(var t,e,i=0;i<N.tick_count;i++)if(tt[i]){switch(e=tt[i][0].headline,K.scroll_direction){case"left":t=Z+K.offset,e.stop(!0,!0).css("left",t+"px");break;case"right":t=parseInt("-"+(e.width()+K.offset)),e.stop(!0,!0).css("left",t+"px");break;case"up":it&&e.css("width",Z),t=parseInt($+K.offset),e.stop(!0,!0).css("top",t+"px");break;case"down":it&&e.css("width",Z),t=parseInt("-"+(e.height()+K.offset)),e.stop(!0,!0).css("top",t+"px");break}tt[i][0].width=e.width(),tt[i][0].height=e.height(),tt[i][0].position=t,tt[i][0].reset=t,tt[i][0].visible=!1}if(N.current_tick=0,tt[N.current_tick][0].visible=!0,K.scroll_init)for("left"===K.scroll_direction?t=.1*Z:"right"===K.scroll_direction?t=.9*Z:"up"===K.scroll_direction?t=.1*$:"down"===K.scroll_direction&&(t=.9*$),i=0;i<N.tick_count;i++)switch(e=tt[i][0].headline,K.scroll_direction){case"left":t<Z&&(e.stop(!0,!0).css("left",t+"px"),tt[i][0].position=t,tt[i][0].visible=!0,t=t+tt[i][0].width+K.scroll_spacing);break;case"right":t>0&&(t-=tt[i][0].width,e.stop(!0,!0).css("left",t+"px"),tt[i][0].position=t,tt[i][0].visible=!0,t-=K.scroll_spacing);break;case"up":t<$&&(e.stop(!0,!0).css("top",t+"px"),tt[i][0].position=t,tt[i][0].visible=!0,t=t+tt[i][0].height+K.scroll_spacing);break;case"down":t>0&&(t-=tt[i][0].height,e.stop(!0,!0).css("top",t+"px"),tt[i][0].position=t,tt[i][0].visible=!0,t-=K.scroll_spacing);break}}function v(){m()}function k(){clearInterval(rt)}function y(){switch(S.find(".mtphr-dnt-tick").each((function(){tt.push(t(this)),t(this).imagesLoaded((function(){F()}))})),F(),S.find(".mtphr-dnt-tick").show(),K.rotate_type){case"fade":C(S,tt,parseInt(100*K.rotate_speed),K.rotate_ease);break;case"slide_left":z(S,tt,parseInt(100*K.rotate_speed),K.rotate_ease);break;case"slide_right":T(S,tt,parseInt(100*K.rotate_speed),K.rotate_ease);break;case"slide_down":A(S,tt,parseInt(100*K.rotate_speed),K.rotate_ease);break;case"slide_up":R(S,tt,parseInt(100*K.rotate_speed),K.rotate_ease);break}w(0),K.auto_rotate&&v(),S.hover((function(){K.auto_rotate&&K.rotate_pause&&!N.running&&k()}),(function(){K.auto_rotate&&K.rotate_pause&&!N.running&&!N.paused&&v()}))}function m(){k(),rt=setInterval((function(){var t=parseInt(N.current_tick+1);t===N.tick_count&&(t=0),b(t)}),parseInt(1e3*K.rotate_delay))}function b(e){N.current_tick!==e&&(K.auto_rotate&&k(),N.next_tick=e,K.before_change.call(P,S),P.trigger("mtphr_dnt_before_change_single",[N,tt]),t("body").trigger("mtphr_dnt_before_change",[P,N,tt]),N.running=1,I(e),x(e),N.previous_tick=N.current_tick,N.current_tick=e,st=setTimeout((function(){K.after_change.call(P,S),P.trigger("mtphr_dnt_after_change_single",[N,tt]),t("body").trigger("mtphr_dnt_after_change",[P,N,tt]),nt=K.rotate_type,N.reverse=0,N.running=0,K.auto_rotate&&!N.paused&&m()}),parseInt(100*K.rotate_speed)))}function w(t){X&&(X.children("a").removeClass("active"),X.children('a[href="'+t+'"]').addClass("active"))}function x(e){switch(w(e),nt){case"fade":D(S,t(tt[e]),t(tt[N.current_tick]),parseInt(100*K.rotate_speed),K.rotate_ease);break;case"slide_left":L(S,t(tt[e]),t(tt[N.current_tick]),parseInt(100*K.rotate_speed),K.rotate_ease);break;case"slide_right":j(S,t(tt[e]),t(tt[N.current_tick]),parseInt(100*K.rotate_speed),K.rotate_ease);break;case"slide_down":M(S,t(tt[e]),t(tt[N.current_tick]),parseInt(100*K.rotate_speed),K.rotate_ease);break;case"slide_up":q(S,t(tt[e]),t(tt[N.current_tick]),parseInt(100*K.rotate_speed),K.rotate_ease);break}}function I(e){switch(nt){case"fade":W(S,t(tt[N.current_tick]),t(tt[e]),parseInt(100*K.rotate_speed),K.rotate_ease);break;case"slide_left":O(S,t(tt[N.current_tick]),t(tt[e]),parseInt(100*K.rotate_speed),K.rotate_ease);break;case"slide_right":E(S,t(tt[N.current_tick]),t(tt[e]),parseInt(100*K.rotate_speed),K.rotate_ease);break;case"slide_down":Q(S,t(tt[N.current_tick]),t(tt[e]),parseInt(100*K.rotate_speed),K.rotate_ease);break;case"slide_up":B(S,t(tt[N.current_tick]),t(tt[e]),parseInt(100*K.rotate_speed),K.rotate_ease);break}}function F(){for(var e=0;e<N.tick_count;e++)t(tt[e]).width(Z+"px"),N.current_tick!==e&&t(tt[e]).css({left:parseFloat(Z+K.offset)+"px"});var i=t(tt[N.current_tick]).height();S.stop().css("height",i+"px")}function C(t,e){var i=e[0],r=i.height();t.css("height",r+"px"),i.css({opacity:1,left:"auto"})}function D(t,e,i,r,n){e.css({opacity:0,left:"auto"}),e.stop().animate({opacity:1},r,n);var s=e.height();t.stop().animate({height:s+"px"},r,n)}function W(e,i,r,n,s){i.stop().animate({opacity:0},n,s,(function(){t(this).css({left:parseFloat(Z+K.offset)+"px"}),i.remove(),e.append(i)}))}function z(t,e){var i=e[0],r=i.height();t.css("height",r+"px"),i.css({opacity:1,left:0})}function L(t,e,i,r,n){var s=e.height();e.css({opacity:1,left:parseFloat(Z+K.offset)+"px"}),t.stop().animate({height:s+"px"},r,n,(function(){})),e.stop().animate({left:"0"},r,n,(function(){}))}function O(t,e,i,r,n){e.stop().animate({left:"-"+parseFloat(Z+K.offset)+"px"},r,n,(function(){e.css({opacity:0}),e.remove(),t.append(e)}))}function T(t,e){var i=e[0],r=i.height();t.css("height",r+"px"),i.css({opacity:1,left:0})}function j(t,e,i,r,n){var s=e.height();e.css({opacity:1,left:"-"+parseFloat(Z+K.offset)+"px"}),t.stop().animate({height:s+"px"},r,n,(function(){})),e.stop().animate({left:"0"},r,n)}function E(t,e,i,r,n){e.stop().animate({left:parseFloat(Z+K.offset)+"px"},r,n,(function(){e.css({opacity:0}),e.remove(),t.append(e)}))}function A(t,e){var i=e[0],r=i.height();t.css("height",r+"px"),i.css({opacity:1,top:0,left:"auto"})}function M(t,e,i,r,n){var s=e.height();e.css({opacity:1,top:"-"+parseFloat(s+K.offset)+"px",left:"auto"}),t.stop().animate({height:s+"px"},r,n),e.stop().animate({top:"0"},r,n)}function Q(t,e,i,r,n){var s=i.height();e.stop().animate({top:parseFloat(s+K.offset)+"px"},r,n,(function(){e.css({opacity:0}),e.remove(),t.append(e)}))}function R(t,e){var i=e[0],r=i.height();t.css({height:r+"px",left:"auto"}),i.css({opacity:1,top:0})}function q(t,e,i,r,n){var s=e.height();e.css({opacity:1,top:parseFloat(i.height()+K.offset)+"px",left:"auto"}),t.stop().animate({height:s+"px"},r,n),e.stop().animate({top:"0"},r,n)}function B(t,e,i,r,n){var s=e.height();e.stop().animate({top:"-"+parseFloat(s+K.offset)+"px"},r,n,(function(){e.css({opacity:0}),e.remove(),t.append(e)}))}function G(){if(N.running)return!1;var t=parseInt(N.current_tick+1);t===N.tick_count&&(t=0),b(t)}function H(){if(N.running)return!1;var t=parseInt(N.current_tick-1);t<0&&(t=N.tick_count-1),K.nav_reverse&&("slide_left"===K.rotate_type?nt="slide_right":"slide_right"===K.rotate_type?nt="slide_left":"slide_down"===K.rotate_type?nt="slide_up":"slide_up"===K.rotate_type&&(nt="slide_down"),N.reverse=1),b(t)}function J(t){t?(N.paused=!1,Y.removeClass("paused"),"scroll"===K.type?o():v()):(N.paused=!0,Y.addClass("paused"),"scroll"===K.type?s():k()),P.trigger("mtphr_dnt_play_pause",[N,tt])}var K={id:"",type:"scroll",scroll_direction:"left",scroll_speed:10,scroll_pause:0,scroll_spacing:40,scroll_units:10,scroll_init:0,scroll_loop:1,rotate_type:"fade",auto_rotate:0,rotate_delay:10,rotate_pause:0,rotate_speed:10,rotate_ease:"easeOutExpo",nav_reverse:0,disable_touchswipe:0,offset:20,before_change:function(){},after_change:function(){},after_load:function(){}},N={id:K.id,tick_count:0,previous_tick:0,current_tick:0,next_tick:0,reverse:0,running:0,paused:0};e&&t.extend(K,e);var P=t(this),S=P.find(".mtphr-dnt-tick-contents"),U=P.find(".mtphr-dnt-nav-prev"),V=P.find(".mtphr-dnt-nav-next"),X=P.find(".mtphr-dnt-control-links"),Y=P.find(".mtphr-dnt-play-pause"),Z=S.outerWidth(!0),$=0,tt=[],et,it=!0,rt,nt=K.rotate_type,st;if(S.data("ditty:vars",N),U&&"rotate"===K.type&&(U.bind("click",(function(t){t.preventDefault(),H()})),V.bind("click",(function(t){t.preventDefault(),G()}))),X&&"rotate"===K.type&&X.children("a").bind("click",(function(e){e.preventDefault();var i=parseInt(t(this).attr("href"));if(N.running)return!1;if(i===N.current_tick)return!1;var r=i<N.current_tick?1:0;K.nav_reverse&&r&&("slide_left"===K.rotate_type?nt="slide_right":"slide_right"===K.rotate_type?nt="slide_left":"slide_down"===K.rotate_type?nt="slide_up":"slide_up"===K.rotate_type&&(nt="slide_down"),N.reverse=1),b(i)})),Y.bind("click",(function(t){t.preventDefault(),J(N.paused)})),"rotate"!==K.type||K.disable_touchswipe||S.swipe({triggerOnTouchEnd:!0,swipeLeft:function(){if(N.running)return!1;var t=parseInt(N.current_tick+1);t===N.tick_count&&(t=0),"slide_left"!==K.rotate_type&&"slide_right"!==K.rotate_type||(nt="slide_left"),b(t)},swipeRight:function(){if(N.running)return!1;var t=parseInt(N.current_tick-1);t<0&&(t=N.tick_count-1),"slide_left"!==K.rotate_type&&"slide_right"!==K.rotate_type||(nt="slide_right"),K.nav_reverse&&("slide_down"===K.rotate_type?nt="slide_up":"slide_up"===K.rotate_type&&(nt="slide_down"),N.reverse=1),b(t)}}),P.on("mtphr_dnt_next",(function(){G()})),P.on("mtphr_dnt_prev",(function(){H()})),P.on("mtphr_dnt_goto",(function(t,e){b(parseInt(e))})),P.on("mtphr_dnt_pause",(function(){J()})),P.on("mtphr_dnt_play",(function(){J(!0)})),t(window).resize((function(){S.outerWidth()!==Z&&(Z=S.outerWidth(!0),"scroll"===K.type?("up"===K.scroll_direction||"down"===K.scroll_direction)&&it?g():h():"rotate"===K.type&&F())})),P.on("mtphr_dnt_resize_single",(function(){"scroll"===K.type?h():"rotate"===K.type&&F()})),t("body").on("mtphr_dnt_resize",(function(t,e){e&&e.indexOf(K.id)>=0&&("scroll"===K.type?h():"rotate"===K.type&&F())})),P.on("mtphr_dnt_replace_ticks",(function(e,r,n){clearInterval(et),P.find(".mtphr-dnt-tick").remove(),r.each((function(){S.append(t(this))})),setTimeout((function(){i()}),n)})),0===P.width())var ot=setInterval((function(){P.width()>10&&(clearInterval(ot),Z=S.outerWidth(!0),i())}),100);else i()}))}};t.fn.ditty_news_ticker=function(i){return e[i]?e[i].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof i&&i?void t.error("Method "+i+" does not exist in ditty_news_ticker"):e.init.apply(this,arguments)}}(jQuery);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
inc/static/sass/style.scss CHANGED
@@ -1,5 +1,13 @@
1
  @import "bourbon/bourbon";
2
 
 
 
 
 
 
 
 
 
3
  .mtphr-dnt img {
4
  max-width: 100%;
5
  height: auto;
1
  @import "bourbon/bourbon";
2
 
3
+ .rtl {
4
+ .mtphr-dnt {
5
+ direction: ltr;
6
+ }
7
+ .mtphr-dnt-tick {
8
+ direction: rtl;
9
+ }
10
+ }
11
  .mtphr-dnt img {
12
  max-width: 100%;
13
  height: auto;
readme.txt CHANGED
@@ -72,6 +72,9 @@ The most common cause for an unresponsive ticker (when using scroll or rotate mo
72
 
73
  == Changelog ==
74
 
 
 
 
75
  = 2.2.10 =
76
  * Added settings option to make ticker posts private
77
 
@@ -516,4 +519,4 @@ The most common cause for an unresponsive ticker (when using scroll or rotate mo
516
 
517
  == Upgrade Notice ==
518
 
519
- Added settings option to make ticker posts private
72
 
73
  == Changelog ==
74
 
75
+ = 2.2.11 =
76
+ * Resolved RTL, scrolling right issues
77
+
78
  = 2.2.10 =
79
  * Added settings option to make ticker posts private
80
 
519
 
520
  == Upgrade Notice ==
521
 
522
+ Resolved RTL, scrolling right issues