PluginProbe
Super RSS Reader – Add attractive RSS Feed Widget / 4.6
Super RSS Reader – Add attractive RSS Feed Widget v4.6
trunk 0.8 2.0 2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8 3.0 3.1 3.2 4.0 4.0.1 4.1 4.2 4.3 4.4 4.4.1 4.5 4.6 4.7 4.8 All 33 releases
super-rss-reader / public / js / script.js

script.js in Super RSS Reader – Add attractive RSS Feed Widget 4.6, at public/js/script.js

47 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /*
2 * Super RSS Reader, WordPress plugin
3 * Aakash Chakravarthy, www.aakashweb.com
4 */
5
6 (function($){
7 $(document).ready(function(){
8
9 var widget = $('.srr-main');
10 widget.find('.srr-wrap').hide();
11 widget.find('.srr-wrap:first').show();
12 widget.find('.srr-tab-wrap li:first').addClass('srr-active-tab');
13
14 $('.srr-tab-wrap li').click(function(){
15 var id = $(this).attr('data-tab');
16 var parent = $(this).parent().parent();
17
18 $(this).parent().children('li').removeClass('srr-active-tab');
19 $(this).addClass('srr-active-tab');
20
21 parent.find('.srr-wrap').hide();
22
23 $srrTicker = parent.find('.srr-wrap[data-id=' + id + ']');
24 $srrTicker.show();
25
26 if($srrTicker.height() == 0){
27 var visibleItems = $srrTicker.data('visible');
28 var tempHeight = $srrTicker.find('.srr-item:first-child').outerHeight() * visibleItems;
29 $srrTicker.height(tempHeight);
30 }
31
32 });
33
34 // Add the ticker to the required elements
35 $('.srr-vticker').each(function(){
36 var visible = $(this).attr('data-visible');
37 var interval = $(this).attr('data-speed');
38 var height = (parseInt(visible) <= 20 ? 'auto' : visible );
39 var ticker = $(this).easyTicker({
40 'visible': visible,
41 'height': height,
42 'interval': interval
43 });
44 });
45
46 });
47 }(jQuery));