Categories
Programming Web

jQuery: missing method toggleAttr for toggling attributes

Today I needed some JS-Code for toggling an DOM elements attribute. Because there is no such feature in the jQuery core, I implemented it. Perhaps it’s useful for you, so here it is :)

Categories
Programming Web

jQuery: copy events from one element to another

At the moment, I improve my ApToggleSwitch plugin and stumbled over a problem which leads to a nice jQuery function I want to share. Perhaps this code can be useful for you!

The problem was that I have to copy a special event from one html element to another – in my case I only wanted the change event to be copied. I found some posts how to copy events, but the solutions did not work perfectly, so I had to merge the solutions presented in this thread.

Categories
Programming Web

New jQuery plugin: ApToggleSwitch

Last month I searched for a nice component to improve checkboxes. Checkboxes are okay but I think that a toggle switch is a nicer representation of the TRUE/FALSE status. Furthermore on touch devices checkboxes are sometimes too small, so users really have to aim to click the control.

In total I found a lot of different solutions out there, really inspiring CSS and JavaScript code, but no one was clean, simple and also had a nice look. That’s the reason why I implemented another toggle switch control, inspired by HTC Sense interface!

Have a look!

Categories
Programming Web

jQuery Plugins for all

I added a new section right now where I publish my jQuery plugins. At the moment there is only the apOverlay plugin. But in the next few month there come some more – I have to rewrite some plugins for general usage first ;)