Below is a Javascript to add a Twitter sharing button to a gallery lightbox script. The problem is that if the button gets clicked the Twitter text shows “document.title =(my_titles[set_position]);” instead of the actually document title. How to fix that?
social_tools: '<div class="twitter"><a href="https://twitter.com/share" class="twitter-share-button" data-url="http://www.example.com" data-text="document.title =(my_titles[set_position]);" data-count="none">Tweet</a></div>'
}, my_settings);
Thanks.
Uli
You are writing
document.titleinside a string.