Last active
October 27, 2021 15:08
-
-
Save Mgregchi/cdd189d737d9e5652f3aeede8542d64a to your computer and use it in GitHub Desktop.
Access and use html elements from page loaded with JQuery .load()
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){ | |
$(this).find("#empty-basket-search") | |
.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