Using JavaScript

Using jQquery

jQuery is included with the help of AJS (Atlassian JavaScript)

(function($) {
    /**
     * When the document is ready
     */
    AJS.toInit(function() {   
	   $('#rw_wrapper').prepend("Hello world!");
	   alert("Hello world!");           
    });    
})(AJS.$);

 

Using RefinedWiki JavaScript API and jQuery

Create a link to the activity stream popup.

(function($) { 
    /**
     * When the document is ready
     */
    AJS.toInit(function() {
    	// Create a button
    	var myLink = $('<a>Activity stream</a>');
        
		// Bind the click event
        myLink.click(RWA.Category.showCategory('My category key'));
          
		// Prepend the link
        $('#rw_wrapper').prepend(myLink);         
    }); 
})(AJS.$);

Related pages

JavaScript API Documentation