tags:

views:

41

answers:

3

I have a php file sitting in a directory. The file has some content to it that is just html. All I would like to do is to use JQuery to get the file contents and place then in a div on my page.

 $(".page-intro").load("barware-title.php");

I have tried to use above code to load the page, but nothing happens.

Here is my Div

<div id="page-intro"></div>

I am at a loss for why this isn't working.

Thanks for the help.

+7  A: 

You need to address by id (#), not class (.)

$("#page-intro").load("barware-title.php");
Ben Dauphinee
+3  A: 

Your selector is wrong. You should use

$('#page-intro')

The .page-intro is looking for a class name of page-intro.

Tejs
+3  A: 

Change .page-intro to #page-intro. It's an id not a class.

Adam