Posted in jquery
56
5:05 am, May 10, 2022
 

jquery load wait function

load something in jquery, wait for it to load then do something else

HTML

<div id="myElement">..</div>

Scripts

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>

Javascript

$('#myElement').load('https://kruxor.com/', function() {
  /* add another function here to run when the something.html file has loaded */
  console.log("kruxor.com has loaded...");
});
..

View Statistics
This Week
18
This Month
56
This Year
56

No Items Found.

Add Comment
Type in a Nick Name here
 
Search Code
Search Code by entering your search text above.
Welcome

This is my test area for webdev. I keep a collection of code here, mostly for my reference. Also if i find a good link, i usually add it here and then forget about it.

You could also follow me on twitter or not... does anyone even use twitter anymore?

If you found something useful or like my work, you can buy me a coffee here. Mmm Coffee. ☕

❤️👩‍💻🎮

Random Quote

'Dawnie' used to say, "It's really quite simple: Be kind, and the rest takes care of itself. Never do anything that's not kind".


Dawn Atherton
Random CSS Property

:in-range

The :in-range CSS pseudo-class represents an <input> element whose current value is within the range limits specified by the min and max attributes.
:in-range css reference