Ed

Author's details

Date registered: February 17, 2011
AIM: ScopeXL
Jabber / Google Talk: Ed

Latest posts

  1. Match Numbers using RegExp — October 23, 2014
  2. Format Phone Numbers in JavaScript — October 30, 2013
  3. SharePoint 2013 Workspace Scroll Issue Fix — October 29, 2013
  4. Verify jQuery Version is at Least 1.x.x — July 7, 2012
  5. Attach .scroll() to AJAX loaded content — June 30, 2012

Most commented posts

  1. Move Row Up/Down with MySQL/PHP — 19 comments
  2. SharePoint 2013 Workspace Scroll Issue Fix — 11 comments
  3. Category Hierarchy into Select Box — 2 comments
  4. Verify jQuery Version is at Least 1.x.x — 2 comments
  5. Add jQuery code to AJAX loaded content — 1 comment

Author's posts listings

Oct 23

Match Numbers using RegExp

Since I use JavaScript as one of my primary development languages, I tend to need little helper functions to accomplish small tasks. One in particular I’ve needed more than any other is the ability to match a number, no matter how it was formatted. I found the following RegExp expression that has worked well for …

Continue reading »

Oct 30

Format Phone Numbers in JavaScript

Here is a quick function that will grab any group of integers from a string so you may format phone numbers (or any number based formatting) quickly. By default this function formats phone numbers in standard 7 digit or 10 digit formatting. Example: 123-4567 and (123) 456-7890. The function matches all digits from a string. …

Continue reading »

Oct 29

SharePoint 2013 Workspace Scroll Issue Fix

Some of you may have run into an issue using SharePoint 2013 where the SharePoint created div #s4-workspace does not properly set the height and width of the workspace container. I have run into this problem for accounts not granted administrative privileges (the accounts that are unable to see the SharePoint ribbon). A quick fix …

Continue reading »

Jul 07

Verify jQuery Version is at Least 1.x.x

Small function to verify if the jQuery library loaded is at least version 1.x.x (where you define the minimum version). Note this function does NOT need jQuery loaded to work, so you can use it to check if jQuery is loaded and version compare if you wish. if (jqueryGreaterThan(‘1.4.4’)) { // jQuery passed version verification, …

Continue reading »

Jun 30

Attach .scroll() to AJAX loaded content

If you need to listen for a scroll event on AJAX loaded content that is not the window.scroll or document.scroll you may have realized that the .scroll() event does not bubble. All hope is not lost, you can still achieve this (especially if you are needing to do it with an element with overflow:auto; or …

Continue reading »

Apr 18

CSS2 Background Compliant Vignette

Left Vignette

We all love the look and feel of vignettes on websites, however short of using CSS3 to display them as a background image, we are stuck using “hackish” CSS2 styling to achieve a 100% width vignette. Since my customers usually demand cross browser compatibility, I have developed a CSS2 compliant way of achieving a 100% …

Continue reading »

Apr 14

PHP Rewrite URLs using Output Buffer

I recently was in need of replacing URLs to SEO friendly ones, the only hiccup was I wanted to maintain the PHP $_GET params in the source code. As this is tried and true, and mod_rewrite can have its hiccups now and then. So after some research I found a solution that fit me perfectly. …

Continue reading »

Mar 20

Replace default hashtag scrolling in browser

Tired of the fluid-less jumps when going to a URL with a #hashtag? You can replace this using jQuery’s .scrollTo() method in the document.ready of your javascript. Here’s an example: $(document).ready(function() { if(window.location.hash) { $(‘html, body’).animate({ scrollTop: $(window.location.hash).offset().top }, 1000); } }); Now on page load this will fluidly scroll to the DOM element you’ve …

Continue reading »

Feb 19

jQuery UI Rename Tabs

I found myself in the position of needing jQuery UI’s tabs plugin to have the option of being renamed while still maintaining the tab. I came up with this function to easily rename a tab by passing the tab’s id selector and desired value. function renameTab(selector, value) { $(‘a[href=”‘ + selector + ‘”‘).text(value); } Keep …

Continue reading »

Nov 17

Move Row Up/Down with MySQL/PHP

Want to move rows with a click of a link and not have to worry about text boxes with position ID’s in them? Use this script/query to achieve this. Basically the idea is to have in your items table where it contains all the records you potentially want to move. In that table add a …

Continue reading »

Older posts «