Last active
October 27, 2021 15:08
-
-
Save Mgregchi/fd2796e51c260e9ff99f277ec2f309b9 to your computer and use it in GitHub Desktop.
Access and use html elements from a page loaded with JQuery
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function(){ | |
$("#loader").click(function(){ | |
$("#container").load("/jquery-load-shopping-basket/", | |
function(e){ | |
//Mix | |
$("empty-basket-search") | |
.prevObject[0] | |
.getElementById("empty-basket-search") | |
.addEventListner("keypress", | |
function(e){ | |
$("#single-label").text("You've clicked: ".concat(e.keyCode)) | |
}) | |
}) | |
}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment