Now I have a span with its overflow hidden like so in HTML and CSS – I’m using it for the twitter post on this website: http://benjaminpotter.org/clients/c3carlingford/
HTML & inline CSS
<span style='width:686px; height:50%; display:block; white-space: nowrap; padding-top:14px; padding-left:10px; overflow:hidden;'></span>
Now I need to somehow detect when the div does overflow, and then when it does, allow the text to scroll through with jQuery or something similar.
Any idea how to do these two things?
You can do it by wrapping the overflowing span with a div element and have the div be overflown:
This way when you add your new twit to the html you can check if the span element’s width is larger than its parent element:
And then apply any jquery code you would like.