Smooth Scroll with jQuery

Smooth Scroll with jQuery

Every now and then I get some really cool feature request, nothing too big – just something simple yet effective. Anchor links aren’t talked about much these days but they’re so useful in situations where you run into a really long website with a lot of content (or anything), you have to keep scrolling down just to get to the footer. Worse yet, what if the contact form is down at the footer – that’s a lot of wasted time, space and potential customers lost. Not a good thing.

The solution and probably the most simple and effective way is to add an anchor link. This can easily be done with plain HTML.

Continue reading “Smooth Scroll with jQuery”

Creating a custom modal with just jQuery and CSS

Custom Modals using Jquery

I was working on a site, it’s your standard WordPress site. I’ve worked with WordPress a long time and seen a lot of different scenarios. The client had this important image on their site that needed to be enlarged in a lightbox or modal, visitors just had a hard time reading small text. Of course you would think hey just use a bootstrap modal component. Well they didn’t have bootstrap installed – well they did but they were just parts of it based on another plugin they had installed. This would even further complicate things.

Modal from scratch

My second solution was to see if they had jquery installed – well of course they did. But is it in the header? In the footer? Some weird spot, yeah I’ve see that before. If it was in the footer where it ideally ought to be then we should be good right? Oh yeah by the way I haven’t even talked about writing the script – I’m looking for a good place to put the script first. Yeah, that’s this is just the first part. So I was thinking maybe I should just use a plugin for this – easy and get it over with. But why when I could write it all myself, so that’s what I did .
Continue reading “Creating a custom modal with just jQuery and CSS”

Expandable / Collapsible Text using jQuery

Expandable / Collapsible Text using jQuery

I’d like to first talk about my relationship with Javascript before I get into jQuery. I’ve known Javascript since the 90s, back when I was a young lad, Javascript freaked me out – I’ll admit I was really intimidated by Javascript more than I was with PHP. I mean they even have a modern looking official site for Javascript now that’s not so daunting.

Continue reading “Expandable / Collapsible Text using jQuery”