Quantcast
Channel: Toolset » All Posts
Viewing all articles
Browse latest Browse all 20145

Reply To: Is there a way to create a tooltip that will displlay contents of a custom field

$
0
0

Ajax got to her :) Is likely not a big deal to make script work provided it is prepared, has a "refresh" feature. But seems like a bug or error if not aware!

Think what I posted is a bit wrong though – or too much silly code. This does the same thing and more. Only have to supply function callback given to Views. Rest is done by Views or some magic. Works!

jQuery(document).ready(function($) {
	callback1 = function() {
		// Job no. 1: Open links in new windows/tab
		$( ".links a" ).on( 'click', function() {
			$(this).attr( 'target','_blank' );
		});

		// Job no. 2: Do something if X is chosen in select box
		var tax_term_check = $( "select option:selected" ).val();
		// console.log( 'You selected ' + tax_term_check );
		if( tax_term_check == 'wordpress' ) {
			$( ".links" ).prepend( "<p>WordPress was chosen</p>" );
		};
    };
});

Viewing all articles
Browse latest Browse all 20145

Trending Articles