jQuery

jQuery :contains selector and unicode characters

March 24, 2010
By SeanJA

I have an element like this (to save space in the menu since they can put up to 255 characters in it): <span class="tool_tip" title="The full title">The ful&#8230;</span> While this seems to work: jQuery('span:contains(…)'); this does not: jQuery('span:contains(&#8230;)'); I am pretty sure that it would be bad to use the first one because if...
Read more »

Tags: , , , , ,
Posted in Javascript, Open Source, Programming, jQuery | No Comments »

Using the jQuery-UI Autocomplete Widget

March 10, 2010
By SeanJA

The latest version of jQuery-ui has an autocomplete widget. No more looking for one that will work (you get the point) with the version of jQuery that you have. All you have to do is pull the latest one down from the jQuery-ui site and you are good to go. First the jQuery to...
Read more »

Posted in Computer, Databases, Javascript, Open Source, PHP, Plugin, Programming, jQuery | 3 Comments »

Simple Tool Tip with jQuery

December 1, 2009
By SeanJA

I saw a post that talked about how to make a simple tool tip with jQuery, but that post did not make a plugin of it. It just added the function to the global scape, meaning that it was not chainable and it would only be applied to the a element. So I took...
Read more »

Posted in Javascript, Plugin, jQuery | No Comments »

A couple useful jQuery Snippets

August 9, 2009
By SeanJA

For popups, just add class=”popup” jQuery('a.popup').live('click', function(){ newwindow=window.open($(this).attr('href'),'','height=200,width=150'); if (window.focus) {newwindow.focus()} return false; }); To open in a new tab, add class=”newTab” jQuery('a.newTab').live('click', function(){ newwindow=window.open($(this).href); jQuery(this).target = "_blank"; return false; }); Check if something is in view function in_view(elem){ var docViewTop = jQuery(window).scrollTop(); var docViewBottom = docViewTop + jQuery(window).height();   var elemTop = jQuery(elem).offset().top;...
Read more »

Posted in Javascript, Open Source, Programming, jQuery | 9 Comments »

A better way to use jQuery in WordPress Themes

July 1, 2009
By SeanJA

Since a lot of people come to my blog looking for a way to add jQuery into their wordpress themes, it turns out that there is a better way to do it than the way that I previously blogged. You can include jQuery from the current WordPress install by calling: wp_enqueue_script("jquery"); Followed by: wp_head();...
Read more »

Posted in Javascript, Open Source, PHP, Programming, Wordpress, jQuery | 2 Comments »