Sleek Interactive
4159 Enquist Rd
Campbell River, BC V9H 1A4

OFFICE: 778 420 3918
MOBILE: 250 204 6475

Recent Blog Posts

*content_window*

Reserved words in Javascript "Content_Window" is not the only match in this case....

September 19th, 2011

scrollup(),scrolldown() is not a function

Odd Javascript behaviour scrollup(),scrolldown() is not a function - possible reserved words...

August 31st, 2011

CSS !important

Using !important with inline styles

August 28th, 2011

Custom CSS Cursors

Learn how to add custom cursors to any CSS element in your website....

August 23rd, 2011

Social Networking Timestamp Operator

Learn to create a Timestamp Operator in PHP using the PHP Date function...

August 23rd, 2011

Blog Posts » Javascript »

scrollup(),scrolldown() is not a function


BLOG CATEGORY: Javascript | Posted on: August 31st, 2011

Although I have not found the answer, I thought I should at least document it as a possible bug.

I had a project that involved doing a scrolling area

using a couple of custom buttons. The scroll is animated using jQuery animating the scrollTop property.

I wrote a couple of simple functions to handle the jQuery and named them scrollup() and scrolldown().  I uploaded my changes and received the ERROR: scrollup() is not a function. I checked my spelling on the function and the call and everything looked fine. Exhausted all other traditional avenues for debugging and found nothing .... time went by ......

..... yep .......................

............. a lot of time went by ...... and then I decided I would try something different in desperation .... I renamed the functions scroll_up() and scroll_down() and ...... they work fine. WTF

Weird stuff. I imagine they are reserved by the browser (in this case all browsers had same issue) or something but can't find a whole lot of information on it.  No traces of them being reserved here

Close External Browser Window