Home Blog Portfolio Development Contact Us Recommends
Building One Application at a Time

Archive for the ‘JavaScript’ Category

AJAX with OK status but still throwing error

Tuesday, March 2nd, 2010

Just a quick note to say AJAX can be tricky and difficult to debug on occasion. (more…)

Using Pages to Hold Content for a Wordpress Template Page

Thursday, April 9th, 2009

I have been using pages to hold content in Wordpress templates for some time now.  The problem I have with it is that every time I need to perform such an action I cannot remember how to do it nor where I have done it before. (more…)

Jquery Auto Scroll on Click

Tuesday, January 6th, 2009

Have you ever created a page that has hidden div containers that are activated by a link that has a slide down effect on it?  In case you haven’t there is a slight problem when displaying content that needs to be shown and slid down when the trigger is at the bottom of the browser window.  It is quite possible the visitor may never see the effect or the content.

The code below will help with this issue:


function slide_body(container, duration)
{
window.setTimeout( function() {
var p = $(container).position();
var h = $(container).height();
var s = p.top + h;

$('html,body').animate( { scrollTop:s }, 1000 );
}, duration);
}

container (block level element) – the container of the content that is being shown
examples: ‘#container’, ‘.container’, ‘p .container’…

duration (time in milliseconds) – the time it takes for the animation of the sliding content

Comments and questions welcome… video coming soon!

Wordpress TinyMCE Editor Black Background Fix

Tuesday, November 11th, 2008

For about 2-3 hours I was sifting through the support forums and blogs throughout the web and was not able to find a fix for this weird bug/feature in the Wordpress (there were a few fixes but none of them worked for this instance). (more…)