javascript - How to create a single running text using extjs4.2? -
how create running text marquee non standard html element in extjs4.2 ?
this snippet code i've done far :
ext.loader.setconfig({ enabled: true, paths: { ext: '.' } }); ext.require([ 'ext.form.*', 'ext.xtemplate']); ext.onready(function () { //ext.msg.alert('fiddle', ext.get('info').dom.innerhtml); ext.define('v_label', { extend: 'ext.form.label', xtype: 'runningtext', renderto: ext.getbody(), constructor: function (config) { var me = this; var lbl = ext.get('info').dom.innerhtml; this.data = { title: 'title sample', item: 'item sample' }; this.tpl = lbl; // contentel: 'info', this.height = 40; ext.apply(me, config); me.callparent(); } }); ext.create('v_label'); }); <script src="http://dev.sencha.com/deploy/ext-4.0.2a/ext-all-debug.js"></script> <link rel="stylesheet" type="text/css" href="http://extjs.cachefly.net/ext-4.1.1-gpl/resources/css/ext-all-debug.css" /> <div id="info"> <marquee scrollamount='4' onmouseout="this.setattribute('scrollamount', 4, 0);" onmouseover="this.setattribute('scrollamount', 0, 0);"><font size='5' color='red'><strong>{title} : {item}</strong></font> </marquee> </div> i define can create dynamic label , store data dynamically data:{}.
you can see running text, it's double see. i've try store marquee tag tpl stuck because single quotes, double quotes , javascript change attribute marquee.
my question : how make single running text ?
or,
maybe way create running text in extjs4.2 ?
based on code, change lbl following.
// use backslash var lbl = '<div id=\'info\'><marquee scrollamount=\'4\' onmouseout=\"this.setattribute(\'scrollamount\', 4, 0);\" onmouseover=\"this.setattribute(\'scrollamount\', 0, 0);\"><font size=\'5\' color=\'red\'><strong>{title} : {item}</strong></font></marquee></div>';
Comments
Post a Comment