Blog Archives

Easy Tabbed Navigation With jQuery

Here is the HTML Markup <h4 class=”single-company-tab-wrapper hide-if-no-js”>   <a class=”single-company-tabs” href=”#info”>Info</a>   <a class=”single-company-tabs” href=”#contact”>Contact</a> </h4>   <div id=”info” class=”tab-content”>   <p>Content of info tab</p> </div>   <div id=”contact” class=”tab-content”>   <p>Content of contact tab</p> </div> And here is the jQuery jQuery( document

Posted in WordPress Tagged with: , , ,

Smooth Scroll Page When Clicking Anchor Link – jQuery

Add this to your jQuery file. // Smooth scroll When Clicking Anchor // @refer https://stackoverflow.com/a/7717572/8255629 var jQueryroot = $(‘html, body’); $(‘a[href^="#"]’).click(function () {   jQueryroot.animate({     scrollTop: $( $.attr(this, ‘href’) ).offset().top   }, 1000);   return false; });

Posted in WordPress Tagged with: , ,
Email Stamp

Free Newsletter

Get my newest blog posts and insider tips. No more than a few emails a year.

Just enter your email address below and click Sign Up Now

Please enter all required fields
Correct invalid entries

You have Successfully Subscribed!