JQuery load help

Posted by mtwallet on Stack Overflow See other posts from Stack Overflow or by mtwallet
Published on 2010-04-01T15:47:09Z Indexed on 2010/04/01 15:53 UTC
Read the original article Hit count: 308

Filed under:
|

Hi. I am trying to use load() to place some html into a div on a page. I have a bunch of links like this:

    <div id="slideshow">
        <div id="slides">
        <div class="projects">
            <a href="work/mobus.html" title="Mobus Fabrics Website">
                <img src="images/work/mobus.jpg" alt="Mobus Fabrics Website" width="280" height="100" />
            </a>

            <a href="work/eglin.html" title="Eglin Ltd Website">
                <img src="images/work/eglin.jpg" alt="Eglin Ltd Website" width="280" height="100" />
            </a>

            <a href="work/first-brands.html" title="First Brands Website">
                <img src="images/work/first-brands.jpg" alt="First Brands Website" width="280" height="100" />
            </a>
        </div>

        <a id="prev"></a>
        <a id="next"></a>
    </div>

and my jquery code looks like this:

$('.projects a').click(function() {
    $('#work').load(this.href);
});

The problem is when clicked the html is placed in the #work div the html is loaded in another page. Please can anyone help?

© Stack Overflow or respective owner

Related posts about jquery-ajax

Related posts about jQuery