0

I am using jquery's load function to updated a div inside my jsp. However the issue is, even if I give the wrong div id the correct div gets updated but if I give the correct div id , it doesn't work.

Inside my jsp:

<div id="markers" class="height-400"></div>

Inside Js:

$("#marker").load(location.href + " #marker>*", ""); //works (notice marker instead of markers)

$("#markers").load(location.href + " #markers>*", ""); // Doesn't work

Can someone please help me understand what's going on here. Referring to this post Refresh/reload the content in Div using jquery/ajax

Naxi
  • 1,504
  • 5
  • 33
  • 72

1 Answers1

0

Try using the code without the double quotes after your CLASS/ID.

$("#markers").load(location.href + " #markers>*");

kunal panchal
  • 798
  • 5
  • 21