Im searching a code split. I want to a link first click run a MySQL query and change link.
I found it this, but is only change text:
<script type="text/javascript">
$(document).ready(function() {
// hides the slickbox as soon as the DOM is ready
// (a little sooner than page load)
$('#slickbox').hide();
// toggles the slickbox on clicking the noted link
$('a#slickbox-toggle').click(function() {
$('#slickbox').slideToggle(400);
return false;
});
});
</script>
$(this).text($(this).text() == 'Show box' ? 'Hide box' : 'Show box');
Example: Facebook like button =>
Like (56 likes)
Click (update likes ...... ..... likecount+=1) Unlike (57 likes)
How can i do this?