Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    May 2012
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Need help with Ajax

    Im building a site and am using ajax to load content without refreshing. Im also using a content slider within one of the content pages. It works perfectly on first inital load but when you click to another content and come back its seems as if the javascript is broken. The content loads but the content slider doesnt work anymore unless you refresh the page.
    here is the link area

    <ul id="nav">
    <li><a href="feature">Feature</a></li>
    <li><a href="story">Success Stories</a></li>
    <li><a href="techspec">Tech Specs</a></li>
    </ul>
    <div id="content">
    <script src="js/jquery-1.7.2.min.js"></script>
    <script src="js/general.js"></script>
    </div>

    here is the java code for the div content
    $(document).ready(function() {
    //inital
    $('content').load('content/feature.html');
    //handle menu click
    $('ul#nav li a').click(function() {
    var page = $(this).attr('href');
    $('#content').load('content/' + page + '.html');
    return false;
    });
    });

    For the content slider im using the Featured Content Slider v2.4. I was wondering as to what i should do. Could i use a onclick refresh because it seems to work when you refresh the page. It just a issue when you click to a different link and come back to the same link that it doesnt work anymore

  • #2
    New to the CF scene
    Join Date
    May 2012
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Im having trouble adding a .onclick refresh. Can you please help

  • #3
    New to the CF scene
    Join Date
    May 2012
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    No help?? OK thanks anyways


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •