Jquery Toggle between two functions

HTML
1
<h1 class="text-center">Toggle between two
    functions</h1>
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
CSS
1
2
/*
This is a very basic construction on
        how to toggle between two functions
        using jQuery plugin.
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
JAVASCRIPT
1
2
jQuery.fn.clickToggle = function(a,b) {
function cb(){ [b,a][this._tog^=1]
        .call(this); }
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Expand for more options Login