When working in Javascript with element sizes you need to know width and height but the real effective sizes includes padding, margins and borders. So I created a jQuery function that will return an element's dimensions as an object and will detail both horizontal and vertical: borders, padding, margins and complete size. I use this when I write JS scripts to resize Elements based on screen resolution.
Read the rest of this entry »
I'm a Sunday Javascript-coder. Using my C++ skills and the 'basicest' of JS knowledge I sometimes manage to pull out what I need out of JS. This is my replacement for the setInterval/clearInterval Javascript function pack. I needed something to work in jQuery style ... even if it can be used without. I wanted an object where to stop / start the interval easily and I managed to do it.
It's [probably] not optimal and probably a JS guru would humiliate me with this code but this is it, take it or leave it and enjoy it. Wondering what can be achieved with it? Look on your right at the fading ads. That's what I needed it for. I'll create some nice news tickers too using this.
Read the rest of this entry »
I was working on a plugin and wanting to add a checkbox near a text area to toggle it's wrap. I add the basic jQuery code and use …attr('wrap', 'off') but figure this: IT'S NOT WORKING!
Read the rest of this entry »