I want to do ajax call on window load and use a url which is inside div#links
This is what I've come up with so far:
$(window).load(function() {
baseUrl = $("#links a").attr("href");
$.ajax({
url: baseUrl,
type: "get",
dataType: "",
success: function(data) {
// from here not important
HTML:
<div id="links"></div>
Links are created dynamicly:
$('<a href="' + text + lnk + '">' + text + lnk + '</a>')
.appendTo($('#links'));
However this doesn't seem to work.