10 * @class Roo.bootstrap.Link
11 * @extends Roo.bootstrap.Component
12 * Bootstrap Link Class
13 * @cfg {String} alt image alternative text
14 * @cfg {String} href a tag href
15 * @cfg {String} target (_self|_blank|_parent|_top) target for a href.
16 * @cfg {String} html the content of the link.
17 * @cfg {Boolean} preventDefault (true | false) default false
22 * @param {Object} config The config object
25 Roo.bootstrap.Link = function(config){
26 Roo.bootstrap.Link.superclass.constructor.call(this, config);
32 * The img click event for the img.
33 * @param {Roo.EventObject} e
39 Roo.extend(Roo.bootstrap.Link, Roo.bootstrap.Component, {
43 preventDefault: false,
45 getAutoCreate : function(){
49 html : this.html || 'html-missing'
56 cfg.href = this.href || '#';
58 cfg.target = this.target;
64 initEvents: function() {
67 this.el.on('click', this.onClick, this);
73 if(this.preventDefault){
76 //Roo.log('img onclick');
77 this.fireEvent('click', this, e);