Hi, I've been coding my ass off today. My brain can't think anymore. Before i go to sleep i though i would post this here hopefully someone will help me. I have this code: $('#message').html("<div class='ui-widget'><div class='ui-state-highlight ui-corner-all' style='margin-top: 20px; padding: 0 .7em;'><p><span class='ui-icon ui-icon-info' style='float: left; margin-right: .3em;'></span><strong>Success!</strong> Your URL has been shortened.</p><br/><br/>"); Code (markup): I need help putting a twitter code which is: Share it: window.open("<a href='https://twitter.com/intent/tweet?original_referer=http%3A%2F%2Fmub.me%2Fmub.me&source=Mub.me&text=&url=http%3A%2F%2Fblablabla.com'><img src='images/twitter.png'")> Code (markup): How do i integrate the twitter code so it would be inside this message without any errors. If you have a better alternative method. Please also post below Thanks very much.
You need to wrap script tags around it, however javascript tries to deal with HTML itself (which is fails badly at doing with the </script> tag), so add everything into the .html(); function except for </script> and then use .append('<'); and then .append('\script'); and then finally .append('>'); It seems ridiculous but its the only way I've ever found to get it to work. You may possibly need to repeat for the initial <script> tag. Thanks Andrew