Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
- Opera: Press Ctrl-F5.
// side-bar collapsible
// current try
alert( 'According to the preferences, your gender is ' + mw.user.options.get( 'gender' ) );
$('body #content #mw-navigation #mw-panel .portal').on('click',function(){
// if open collapse, if closed expand
var element = this.getElementById('this.body'),
style = window.getComputedStyle(element),
display = style.getPropertyValue('display');
alert("the display is" + display);
});
// early bad tries
$(function() {
$( "body #mw-navigation #mw-panel" ).accordion({
collapsible: true
});
});
$(function(){
alert("Entered the function!");
$("#mw-head-base").hide();
$("#mw-navigation #mw-panel #p-logo").hide();
$("#mw-panel .portal .body:not(:first)").hide();
$("#mw-panel .portal .h3").hover(
function(event){
$("#mw-panel .portal .body").slideUp("fast");
$(this).parent("div").next("div").slideDown("fast");
}
function(event){
$(this).parent("div").next("div").slideUp("normal");
});
});
var tree = $('#wikitext-sidebar');
$('#p-logo').after( tree.html() );
tree.html('');
//to do list form logic
function addItem()
{
var form = document.getElementById(toDoList);
var items = form.getElementsByTagName(ul);
if document.getElementById(newItem)
{
var item = document.form.getElementById(newItem);
items = items.push(item);
var frag = document.createDocumentFragment();
for (var i=0; i<items.length; i++)
{
var listItem = document.form.createElement("li");
listItem.innerHTML = items[i];
listItem.appendChild(document.createTextNode(alphabet[i]));
frag.appendChild(listItem);
}
unorderedList.appendChild(frag);
}
else
{
alert("There is nothing to add!")
}
}