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 :)

Continue reading jQuery: missing method toggleAttr for toggling attributes

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.

Continue reading jQuery: copy events from one element to another

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!