Jump to content

User:Shoodho/common.js

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Shoodho (talk | contribs) at 19:17, 11 February 2016. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
var editlink = document.getElementById("ca-ve-edit");





function editlinkcliked(evt) {
	    $('#p-views').append('<input type="button" value="My button" onclick="savecahnges()">'); // Create the element  
 // .button() // Ask jQuery UI to buttonize it  
 // .click(function(){ alert('I was clicked!');}); //
 //   alert("clicked");
 //oo-ui-buttonElement-button :- save button
 // var x = document.getElementsByClassName("example");
 var element =  document.getElementById('oo-ui-buttonElement-button');

}
function savecahnges()
{
	document.getElementsByClassName('oo-ui-buttonElement-button').style.color="red";
	alert("ola");
}

editlink.addEventListener("click", editlinkcliked, false);

//$(document).load(function () {
//    alert('Loaded');
//});