nJDSK.widgets.addItem


Adds a new widget to the sidebar

nJDSK.widgets.addItem(wdgId, wdgTitle, wdgContent, wdgFunction)

Parameters

  • string wdgId widget id
  • string wdgTitle widget title
  • string wdgContent widget content
  • function wdgFunction widget behavior

Example

nJDSK.widgets.addItem('wdgClock','Clock','<div class="wdg-clock"></div>',function(id){

	var x_id = id;
	alert('Widget '+x_id+' has been created');
});