diff --git a/application/views/header.php b/application/views/header.php index 0eda012..964f0a8 100644 --- a/application/views/header.php +++ b/application/views/header.php @@ -14,6 +14,7 @@ =script_tag('https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js');?> =script_tag('assets/js/scattport.js');?> =script_tag('assets/js/tablednd.jquery.js');?> +=script_tag('assets/js/jtip.js');?> diff --git a/assets/images/ajax-loader.gif b/assets/images/ajax-loader.gif new file mode 100644 index 0000000..b5ed0ce Binary files /dev/null and b/assets/images/ajax-loader.gif differ diff --git a/assets/images/arrow-left.gif b/assets/images/arrow-left.gif new file mode 100644 index 0000000..4c9e5c6 Binary files /dev/null and b/assets/images/arrow-left.gif differ diff --git a/assets/images/arrow-right.gif b/assets/images/arrow-right.gif new file mode 100644 index 0000000..3252c35 Binary files /dev/null and b/assets/images/arrow-right.gif differ diff --git a/assets/js/jtip.js b/assets/js/jtip.js new file mode 100644 index 0000000..d023e8f --- /dev/null +++ b/assets/js/jtip.js @@ -0,0 +1,158 @@ +/* + * JTip + * By Cody Lindley (http://www.codylindley.com) + * Under an Attribution, Share Alike License + * JTip is built on top of the very light weight jquery library. + */ + +/** + * On page load (as soon as it's ready) call JT_init + */ +$(document).ready(JT_init); + +/** + * Initializes JTip. + */ +function JT_init() { + $('a.jTip').hover(function() { + JT_show(this.href, this.id, this.name); + }, function() { + $('#JT').remove(); + }).click(function() { + return false; + }); +} + +/** + * Shows a tooltip. + * + * @param url + * @param linkId + * @param title + */ +function JT_show(url, linkId, title) { + if (title == false) title = ' '; + + var de = document.documentElement; + var w = self.innerWidth || (de&&de.clientWidth) || document.body.clientWidth; + var hasArea = w - getAbsoluteLeft(linkId); + + var clickElementY = getAbsoluteTop(linkId) - 3; // set y position + var clickElementX = 0; + + var queryString = url.replace(/^[^\?]+\??/,''); + var params = parseQuery(queryString); + + if (params['width'] === undefined) { + params['width'] = 250; + } + if (params['link'] !== undefined) { + $('#' + linkId).bind('click', function() { + window.location = params['link']; + }); + $('#' + linkId).css('cursor','pointer'); + } + + if (hasArea > (params['width'] * 1) + 75) { + $('body').append('