Skip to content

Instantly share code, notes, and snippets.

@puikinsh
Created April 26, 2014 11:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save puikinsh/11318090 to your computer and use it in GitHub Desktop.
Save puikinsh/11318090 to your computer and use it in GitHub Desktop.
Sparkling Theme JavaScript edit to fix problem with responsive Google Adsense units
// Bootstrap specific functions and styling
// first set the body to hide and show everything when fully loaded
jQuery(document.body).hide();
jQuery(document).ready(function(){
jQuery(".comment-reply-link").addClass("btn btn-sm btn-default");
jQuery("#submit").addClass("btn btn-default");
jQuery(".wpcf7-submit").addClass("btn btn-default");
jQuery(".wp-caption").addClass("thumbnail");
jQuery(".tagcloud a ").css("font-size", "12px");
jQuery('input[type="submit"]').addClass("btn btn-default");
jQuery(".widget_rss ul").addClass("media-list");
jQuery(".postform").addClass("form-control");
jQuery("table#wp-calendar").addClass("table table-striped")
jQuery(document.body).show();
});
// jQuery powered scroll to top
jQuery(document).ready(function(){jQuery(window).scroll(function(){if(jQuery(this).scrollTop()>100){jQuery(".scroll-to-top").fadeIn()}else{jQuery(".scroll-to-top").fadeOut()}});jQuery(".scroll-to-top").click(function(){jQuery("html, body").animate({scrollTop:0},800);return false})})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment