paulkinzett / toolbar

A tooltip style toolbar jQuery plugin
http://paulkinzett.github.com/toolbar/
MIT License
2.3k stars 321 forks source link

content passed to jquery.toolbar.js is displayed as undefined? #38

Open keerthica opened 10 years ago

keerthica commented 10 years ago

populateContent: function() { var self = this; var location = self.toolbar.find('.tool-items'); var content = $(self.options.content).clone().find('a').addClass('tool-item gradient'); location.html(content); location.find('.tool-item').on('click', function(event) { event.preventDefault(); self.$elem.trigger('toolbarItemClick', this); });

},

the above code: $(self.options.content) getting displayed as undefined. we are passing values from our js below

allHeaders.each(function() { var thisHeader = jQuery(this).attr("id"); var thisBody = jQuery("

"); jQuery(thisBody).append(""); jQuery(thisBody).append(""+jQuery("#no-filter-criteria").text()+""); });

we are passing content like this jQuery10(thisHeader).toolbar({ content: '#toolBar-'+ JSUtils.prototype.escapeDot(jQuery10(thisHeader).attr("id")), position: 'bottom', hideOnClick: true });

NOTE: we are using jquery datatable and displaying values through JSON.

Kindly let us know why content passed to toolbar is displayed as undefined?