views:

21

answers:

1

I'm developing a chrome extension for twitter.com users. I need to trigger click event for the "new tweet" link using jQuery (javascript) but I couldn't can anyone help?

$("#new-tweet").trigger('click'); // not working :(

alt text

+1  A: 

Works for me. Are you sure the document is ready? Eg, when are you trying to run this code?

thenduks
yes the document is ready ... the script is working from the browser console but it isn't working the extension code file.
Khaled Musaied
Then I think you'll need to paste code for more help.
thenduks