A jQuery plugin to display javascript alert messages before following the href.

  • Finish writing the unit tests.
  • Register on Bower.io

The code below...

<!-- Create the link that when clicked will need the alert message -->
<a href="#" class="alert">Delete Page</a>

<script>
// Finally call the script
$(function(){
	$('.alert').CWAlert();
});
</script>

... produces this

Delete Page
Property Type Default Description
message string Are you sure? The message which is displayed in the alert window.
beforeMessage callback '' A callback function which is fired before the message is shown.
messageTrue callback '' A callback function which is fired if the okay button is clicked in the alert window.
messageFalse callback '' A callback function which is fired if the cancel button is clicked in the alert window.

Below are some more examples of the script.

v0.1.1 4th March 2014 Updated grunt process slightly.
v0.1.0 2nd March 2014 Created the first version of the script based on previous created scripts.