Difference between revisions of "MediaWiki:Common.js"

From Johnisdead Wiki
Jump to navigation Jump to search
(Created page with "$('.expand-button').on('click', function(){ $('.special-text').toggleClass('-expanded'); if ($('.special-text').hasClass('-expanded')) { $('.expand-button').html('Collapse Co...")
 
Line 1: Line 1:
$('.expand-button').on('click', function(){
+
$('.toggle-collapse').on('click', function(){
 
$('.special-text').toggleClass('-expanded');  
 
$('.special-text').toggleClass('-expanded');  
 
if ($('.special-text').hasClass('-expanded')) {
 
if ($('.special-text').hasClass('-expanded')) {
$('.expand-button').html('Collapse Content');
+
$('.toggle-collapse').html('Collapse Content');
 
} else {
 
} else {
$('.expand-button').html('Continue Reading');
+
$('.toggle-collapse').html('Continue Reading');
 
}
 
}
 
});
 
});

Revision as of 16:14, 28 December 2019

$('.toggle-collapse').on('click', function(){
$('.special-text').toggleClass('-expanded'); 
if ($('.special-text').hasClass('-expanded')) {
$('.toggle-collapse').html('Collapse Content');
} else {
$('.toggle-collapse').html('Continue Reading');
}
});