Randy C
Randy C

Reputation: 47

Jquery .load() doesn't seem to be working in firefox

I've tried to find the answer to this by searching through Stackoverflow, and I've found a lot of closely related answers, but none seem to give me quite what I'm looking for. Most are much more complicated scenarios and just don't apply. Anyhow, what I'm doing is calling to a certain page of my site using the url, and then as well identifying a specific element on the page to be loaded into another div #getter. This script works flawlessly in IE and Chrome, but I'm having no luck at all with Firefox. Any ideas? Here is the code:

<script>
$("#getter").load("http://$domain/member/?show=feed .content");
</script>

Upvotes: 1

Views: 78

Answers (3)

Abhilash
Abhilash

Reputation: 1610

If you need absolute path and have to have a php variable, try

$("#getter").load("http://<?php echo $domain;?>/member/?show=feed .content");

Although, it isn't a great idea to mix php and js, sometimes one just has to.

Upvotes: 0

RDK
RDK

Reputation: 4560

Try this code (with out domain):

<script>
$("#getter").load("/member/?show=feed .content");
</script>

Upvotes: 2

Pranay Rana
Pranay Rana

Reputation: 176896

i thinks its better to put code in

$(document).ready(function()
{
   $("#getter").load("http://$domain/member/?show=feed .content");
});

there might be cause its get called before dom get loaded

Upvotes: 1

Related Questions