need help landingpage jquery script

alex lahcen

Newbie
Joined
May 21, 2020
Messages
13
Reaction score
1
yo guys i need help please , i want to change the cpa link in this website http://tweakcity.co/# but i am done trying cuz of jquery script . so if anyone dealing with jquery please help
 
if you are using something like jQuery

<button id="btn" type="button">Click Me!</button>

$('#btn').click(function() {
alert('something')//
});
 
One thing to note, a direct bind to an element won't work if the element is dynamic so trying to bind a click event to a button that doesn't exist when the jQuery code executes won't bind.

Instead, you use event delegation by binding the click event to a parent element that does exist. Events in JavaScript bubble up to the outermost document object, so you can actually listen for click events on a div that has a dynamic button inside of it.

Code:
$('div').on('click', 'button', function() {
    // do something
});

What this code does is say, "hey parent div, when you receive a click event that originated from #btn, execute my function's code.

I'm not sure if this helps you in any way since I don't know what your issue is in the OP.
 
if you are using something like jQuery

<button id="btn" type="button">Click Me!</button>

$('#btn').click(function() {
alert('something')//
});
yes my script is
<div class="modal-body">
<h1>Injection required!</h1>
<p>Follow the instructions on the next screen.</p>
<div class="modal-btn btn-injection">
<a>Start injection</a>
 
Back
Top