As per requirement, I need to scroll horizontal text with specific size consider I have text with 60 character and display area size is 40 then result should be
- Need to display 42 character and then start scroll for remaining 18 characters
- Then place that 1st 42 character alone
I tried with marquee but unable to fit exact size with below sample code
if (nameText.length >= 42) {
oldStr = $("#Guide-Info-Title", m_jQInfo).html();
oldStr = oldStr.replace(/\<marquee>/g, "");
oldStr = oldStr.replace(/<\/marquee>/g, "");
$("#Guide-Info-Title", m_jQInfo).html(oldStr);
oldStr = nameText + ' ' + ' ';
NewStr = oldStr + nameText.substr(0, 42);
$("#Guide-Info-Title", m_jQInfo).html("<marquee behavior=alternate direction=left loop=1 scrolldelay=10>" + NewStr + "</marquee>");
}
Anyone please help me to achieve my requirement?