Skip to content

Instantly share code, notes, and snippets.

@Srijancse-zz
Created August 27, 2016 05:52
Show Gist options
  • Save Srijancse-zz/26e725c56a554aec97f8f8da63d12808 to your computer and use it in GitHub Desktop.
Save Srijancse-zz/26e725c56a554aec97f8f8da63d12808 to your computer and use it in GitHub Desktop.
$("a").on('click', function() {
if ($(this).text() === "Preview") {
$(this).parent().toggleClass("current");
checkCurrent();
}
});
function checkCurrent() {
if ($('div[rel="wikiEditor-ui-view-preview"]').hasClass("current")) {
console.log("You are offline and clicked Preview");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment