Skip to content

Instantly share code, notes, and snippets.

View joshuaogle's full-sized avatar
👨‍🎨
Making the cloud a better place to live

Joshua Ogle joshuaogle

👨‍🎨
Making the cloud a better place to live
View GitHub Profile
@joshuaogle
joshuaogle / Reusable jQuery Effects
Created November 10, 2010 21:13
Code used in JoshuaOgle.com and in an upcoming article on ID based reusable jquery for simple effects
/* Reusable Effects */
$('[id*=toggle-]').live('click',function() {
var container = $(this).attr("id").replace("toggle-","");
$('#'+container).toggle();
return false;
});
$('[id*=slide-]').live('click',function() {
var container = $(this).attr("id").replace("slide-","");
$('#'+container).slideToggle();
return false;