I have a function $ that returns element by its Id, the code is something like this:
I want to extend the object that this function returns with some functions like 'show', 'hide', 'opacity' etc. Prototype an jQuery are written this way.Code:function $(element){ if(typeof(element) == 'string'){ return document.getElementById(element); } }
So I want to type this:
for hidding the given element. It's not the problem in changinh the style of element, but in extending the $ function.Code:$('elementname').hide();


Reply With Quote


Bookmarks