PluginProbe
Super RSS Reader – Add attractive RSS Feed Widget / 3.1
Super RSS Reader – Add attractive RSS Feed Widget v3.1
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 3.1, at public/js/script.js

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