Question

i need to add one class at body when i click on.

i know is : $("body").addClass.("ex4Trigger"); but it doesn't work.

I want that when I click on the body, it does something like that =>

<a href="/link/open" class="ex4Trigger">....</a>

i dont know if he as possible with that :

var sasClickUrl = "/link/open";
var sasClickTarget = "_self";

document.write('<style>');
document.write('body {');
document.write('background-image: url("/gallery/background/image.jpg")!important;');
document.write('background-repeat: repeat-y;');
if ('top' == 'top with offset') {
    document.write('background-position:center 0px;');
} else {
    document.write('background-position:center top;');
}
if ('FFFFFF' != "") document.write('background-color: #FFFFFF;');
document.write('padding: 0px 0 0 0;');
if (0) document.write('background-attachment: inherit;');
if (sasClickUrl != "") document.write('cursor: pointer;');
document.write('}');
if (sasClickUrl != "" && !0) document.write('body > *{cursor: default;}');
document.write('</style>');
if (sasClickUrl != "") {
    function OpenWin(page) {
        if (sasClickTarget == "_parent") window.open(page);
        else document.location = page;

    }
    sasBackClick2213491 = function (e) {
        var bglink = sasClickUrl;
        EE = e ? e : event;
        if (!EE) return;
        var tg = EE.target ? EE.target : EE.srcElement;
        if ((!tg || tg.tagName != "BODY") && tg.parentNode.tagName != "BODY") return;
        var BackLink = OpenWin("" + bglink);
    };
    document.onclick = sasBackClick2213491;
}
document.write('\r\n');
document.write('\r\n');

thx for help (PS Sorry for my bad english)

Was it helpful?

Solution

$('body').click('function'){ $(this).addClass('ex4trigger'); }
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top