if ($("input[type='checkbox']").attr('checked') == "checked")
<input type="checkbox" />
<a href="#">Change CheckBox</a>
And rest @Sinetheta has another working version for you! :)
So you need to trigger the change event
.trigger('change') so that event knows that change took place. Let me know if I am missing anything.
This method is a shortcut for .bind('change', handler) in the first two variations, and .trigger('change') in the third. The center code herehange event is sent to an element when its value changes. This event is limited to elements, boxes and elements. For select boxes, checkboxes, and radio buttons, the event is fired immediately when the user makes a selection with the mouse, but for the other element types the event is deferred until the element loses focus.
Thanks :) !