Avatar of error77
error77

asked on 

JQuery Code modification needed

Hi all,

I need to tweet some functionality a bit.

Right now I am using this code:

$('body').ready(function() { self.open(); });

I have some links from Page A to page B.

I basically want this popup ONLY to open if it's coming from one of these link on page A

Is that tweek possible please?

THanks
JavaScriptAJAX

Avatar of undefined
Last Comment
error77
ASKER CERTIFIED SOLUTION
Avatar of Proculopsis
Proculopsis

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of error77
error77

ASKER

Good idea although the only proble is that the code:

$('body').ready(function() { self.open(); });

is actually in a .JS file and not on page B ... would that be a problem?
Avatar of error77
error77

ASKER

Basically I have a few links...

<a id="link1" href="link1.com">Link here</a>

Now ... I know that this code works:

$('body').ready(function() { self.open(); });

and popups the window, so I don't want to change that ..

I just need to wrap and IF which basically says:

If the refer link if Link1 then popup

example:

If (ID="link1") {
$('body').ready(function() { self.open(); });
}

or something like that?

Hope this helps

THanks
JavaScript
JavaScript

JavaScript is a dynamic, object-based language commonly used for client-side scripting in web browsers. Recently, server side JavaScript frameworks have also emerged. JavaScript runs on nearly every operating system and in almost every mainstream web browser.

127K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo