how can you make a processing jquery button, like the follow

for example the twitter follow button when pressed it sends an ajax call through php script and then displays unfollow:how could that be acheived using jquery and css? ……………………………………. Something like this:$(“#folow”).click(function () $.ajax( type: “POST”, url: “someAction….

via Css Website development » Search Results » ajax:

how can you make a processing jquery button, like the follow

for example the twitter follow button when pressed it sends an ajax call through php script and then displays unfollow:
how could that be acheived using jquery and css?
…………………………………….

Something like this:
$(“#folow”).click(function ()
$.ajax(

type: “POST”,
url: “someAction.php”,
success: function(result)
$(“#folow”).val(‘unfolow’);
// do some more stuff

});
});This will make the ajax call to an php action, and change the buttons text to something else when the ayax call is succesfull. In the php action you do the ‘logic you need’.
for more info over tha ajaxcall see: http://api.jquery.com/jQuery.ajax/
…………………………………….

I think you want jQuery UI, especially the button plugin: http://jqueryui.com/demos/button/
You can easily use it:
$(‘#my-button’).button();

For more info: how can you make a processing jquery button, like the follow

Css Website development » Search Results » ajax

how can you make a processing jquery button, like the follow

Share this post:

Related Posts

Leave a Comment