Tag Archives: javascript

Javascript: How to Force a Page Reload and Jump to a Specified Anchor Name in the Process

Anchor names are a great little browser extra that allows you to quickly jump to different sections on a web page courtesy of a handy little # declaration in the page URL. However, these do sometimes get in the way, … Continue reading

Posted in Javascript | Tagged , , , , , | Leave a comment

JavaScript: Grab a part of a String with the Substring Function!

javascript-girl-shiny-black-top

Considering I work with PHP day in and day out, it is no wonder that I completely forgot that JavaScript also comes up with its super handy substring function, for when you need to grab only a specific part of … Continue reading

Posted in Javascript | Tagged , , , , , | Leave a comment

JavaScript: Execute a Function every Couple of Seconds with setInterval

javascript-girl-shiny-black-top

With pages being very much dynamic these days, developers often need a page to do something every now and then, so as to keep the viewer’s attention or to update the page without having to do a page reload – … Continue reading

Posted in Javascript | Tagged , , , | Leave a comment

jQuery: Get the Text for a Currently Selected List Option instead of the Option Value

jquery-girl-black-stretch-top

If you develop websites and work with JavaScript, but have never heard of jQuery before, then it is probably best that you start reading up on it right now. After all, as they like to put it themselves, jQuery is … Continue reading

Posted in jQuery | Tagged , , , , , , , | Leave a comment

JavaScript: Calculate the Number of Days in a Month

javascript-girl-shiny-black-top

A simple way to calculate how many days are in a month in Javascript is to leverage Javascript’s built in date overflow feature – basically if you give it an incorrect date it automatically adjusts it to the correct one by assuming that the overflow are days which need simply to be added to the given date. Continue reading

Posted in Javascript | Tagged , , , , , , | Leave a comment