Posts tagged: javascript

JavaScript language advanced Tips & Tricks

http://code.google.com/p/jslibs/wiki/JavascriptTips#language_advanced_Tips_&_Tricks

Browser PONG

http://stewd.io/pong/

About Pong: http://en.wikipedia.org/wiki/Pong

How to strip <script> elements from HTML source – Prototype solution

stripScripts() -> string
Strips a string of anything that looks like an HTML script block.

Example:

1
2
'a <a href="#">link</a><script>alert("hello world!")</script>'.stripScripts();
// -> 'a <a href="#">link</a>'

A href=”javascript: return false;” breaks in IE

Does not always work in IE. Workarounds:

1
<a href="#" onClick="return false;">

OR

1
<a href="javascript:;">

jQuery Date Format Plugin

http://plugins.jquery.com/project/jquery-dateFormat

WordPress Themes