Thursday, 15 July 2010

javascript - Issue with title for image in jquery mobile -



javascript - Issue with title for image in jquery mobile -

am having next code, in title not displaying totally when putting cursor on it, if title given "the value", title shown only "the" , not "the value". can allow me know whats mistake.please.

var str1 = "the value"; var str; if (str1.length > 10) { str = str1.substring(0, 10); str = str + "..."; } <li><div id=' + itemid + ' class="append_content" title=' + str1 + '><div class="append_pic"><img style="width:54px; height:54px;" src='+icon+'></div><div class="append_text">' + str + '</div></li>

you lacking proper encapsulation attribute definitions. required write ="'+ variable+'" if variable contains spaces. please observe:

title=' + str1 +'

should

title="'+ str1 +'"

and should other attributes, well.

javascript jquery html css jquery-mobile

No comments:

Post a Comment