Get URL parameter string – jQuery

Category: Code Snippets

var getUrlParameter = function getUrlParameter(sParam) { var sPageURL = decodeURIComponent(window.location.search.substring(1)), sURLVariables = sPageURL.split(‘&’), sParameterName, i; for (i = 0; i < sURLVariables.length; i++) { sParameterName = sURLVariables[i].split(‘=’); if (sParameterName[0] === sParam) { return sParameterName[1] === undefined ? true : sParameterName[1]; } } }; And this is how you can use this function assuming the URL… Read more »

Continue Reading

Add class to body based on the URL – jQuery

Category: Code Snippets

// find the pathname var urlPath = window.location.pathname; //convert to lowercase urlPath.match(/\/(.*?)(\+|$)/)[1].toLowerCase(); // remove the first character urlPath = urlPath.replace(/\//g, ‘-‘).slice(1); //remove file extension urlPath = urlPath.replace(/\.[^/.]+$/, “”); // add class to body $(document.body).addClass(urlPath); // If body has no class its propably the homepage $(‘body:not([class])’).addClass(‘home’);  

Continue Reading

What are the Most Common Problems in Website Design & Development?

Category: Newsletter

When I began learning web design, I built websites using Adobe Dreamweaver because I could see a visual output of what I was building. This was familiar to me because I was used to designing in Illustrator and Photoshop. However, when the site wasn’t working I had no choice but to use the source code tab and… Read more »

Continue Reading

7 Steps to Build a Website for Your Business

Category: Articles

1. Dream This is the most challenging and the most fun step in the process. Here you can picture what your website looks like, how it works, what pages will be included, etc. Visit multiple websites and look at their navigation, pictures, colors, and overall presentation. What things did you like and dislike? 2. Plan… Read more »

Continue Reading