Am trying to use animate marginLeft on text within a div, which is itself being animated by j.truncate, but it doesn’t seem to be working.
J truncate is working fine for me and so is my animate margin left, but combined, they dont work yet.
Any answers out there?
Here’s j.truncate by itself http://jsfiddle.net/cress/QLgqe/19/ (have used different text)
Here’s the animate by itself http://jsfiddle.net/cress/pZ6aL/2/
Here’s the combo of j.truncate and animate http://jsfiddle.net/cress/mGnvu/10/
Your first problem was some minor syntax errors, which I fixed for you in the fiddle below.
The second was that your DOM had been changed — the jTruncate plugin modifies the DIV it acts on so that the selector
$('#works > p')no longer worked. Changing it to$('#works p')would fix things, but might not always be specific enough; changing it to$('#works span.truncate_more > p')solved everything.http://jsfiddle.net/mblase75/mGnvu/12/