Question of the Twitter’s button API‘click’, function()) and


Are you able to offer me some simple code of how to use‘click’, function()) and to see which node in the page was clicked?

Please refer to to see the detail, I want to differentiate the Twitter button on page header and page body, but I don’t know the detail of this API, it always return “object”, I’ve no idea of how to use this API to check and see the content of the return value.


The “object” that you get back in is a DOM element and you can do anything you can do with a DOM element in Javascript with it. Here’s an example of opening a Javascript alert with the ID of the DOM node:'click', captureElement); function captureElement(event) { var dom_element =; var dom_id =; var dom_class_name = dom_element.className; alert("The DOM element that was clicked had this id: " + dom_id + ". And class name: " + dom_class_name); }


is it possible to pass some values to the called function…
wrapping the code with in the following code disables the normal tweet button…
i ma trying the codes like this

twttr.ready(function (twttr) {'tweet', twitnshare('tws_likings', '<?php echo $sess_uid;?>', href)); });


I could work it out with by modifying the code like this one below

but the same thing creates problem as i have same tweet button put onto while loop and hence it gets triggered as many times as the while loop has been set to run…??

closed #5

closed #6