MediaWiki:Common.js: Difference between revisions

ਕੋਈ ਸੋਧ ਸਾਰ ਨਹੀਂ
No edit summary
No edit summary
 
(One intermediate revision by the same user not shown)
Line 17: Line 17:




function toggleImage() {
mw.loader.using( ['mediawiki.util', 'jquery.client'], function() {
  var img = document.getElementById("mw-Mycanvas2");
$(document).ready(function() {
  if (img.src.includes("TopSide")) {
  $("#mw-Mycanvas2").click(function() {
    img.src = "https://simplywoodgrading.com/mediawiki/images/a/ab/20mmSoundKnot_ReededSide.jpg?20230319101142";
    if ($(this).attr("src").includes("TopSide")) {
  } else {
      $(this).attr("src", "https://simplywoodgrading.com/mediawiki/images/a/ab/20mmSoundKnot_ReededSide.jpg?20230319101142");
    img.src = "https://simplywoodgrading.com/mediawiki/images/e/ea/20mmSoundKnot_TopSide.jpg?20230319084600";
    } else {
   }
      $(this).attr("src", "https://simplywoodgrading.com/mediawiki/images/e/ea/20mmSoundKnot_TopSide.jpg?20230319084600");
}
    }
   });
});
});