JQuery

Removing chosen jquery select box replacement

0

$("select").removeClass("chzn-done").css('display', 'inline').data('chosen', null);
$("*[class*=chzn]").remove();

[rb] Load all forms/links within tabs in the same place with jquery

1

One of the things that probably most of the people stumbled upon while working with jquery tabs is reloading the content of a form submit/link within the same window/tab window. That’s pretty simple to achieve with the following code:

//this one will work for forms
$("#tabs form").live( 'submit' , function() {
		var self = this;
		$.ajax({
		  type: (!$(this).attr('method') ? 'post' : $(this).attr('method')),
		  url: $(this).attr('action'),
		  data: $(this).serialize(),
		  success: function(data) { $('.ui-tabs-panel:visible').html(data); }
		});
		return false;
	});
//this one will work for links
$("#tabs > div a").live( 'click' , function() {
		var self = this;
		$.ajax({
		  type: 'get',
		  url: $(this).attr('href'),
		  success: function(response) { $('.ui-tabs-panel:visible').html(response); }
		});
		return false;
});

While there might be some other implementations with a smoother code, this will do what is supposed to …

JQuery true background changer

0

While looking for a background changer, i couldn’t find one that would fit my needs … that’s when i realize that it would take less to make one myself … while it might not work just perfect yet, it was just enough for what i needed … damn laziness …

Test case: http://www.insightmed.eu/showcase.html

JScript plugin: http://www.insightmed.eu/media/interactive/vendor.jquery.js

Usage: $(‘selector’).bgChange({ images: ['image 1', 'image 2', 'image 3', 'etc.'], dir: ‘images dir’, apply_classes: ['apply these classes to the helper used for the effect'] });

Go to Top