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

Thread: jquery issue

  1. #1
    New Coder
    Join Date
    Oct 2010
    Posts
    16
    Thanks
    1
    Thanked 0 Times in 0 Posts

    jquery issue

    is anyone here good with it?

    i got this script on krissales.com that I'm working on. I've figured out the ajax hash tagging, it works perfectly. However I'm customizing the fade in, fade out **** and I got part of it working. it'll load the page twice, if you see what I mean. I just want it to load once, on fade in, and once on fade out, however it does it twice.

    Does anyone know what the hell it is, that I'm doing wrong?

    This is the code I have:

    Code:
      function page_load($href) {
                if($href != undefined && $href.substring(0, 2) == '#/') {
             $('#content').load($href.substring(2)); // replace body the #content with loaded html
     
             $('#content').fadeOut('slow', function() {   
             $('#content').fadeIn('slow');
    });
    the full core is at:

    http://www.krissales.com/_lib/_js/core.js

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,994
    Thanks
    4
    Thanked 2,662 Times in 2,631 Posts
    Not sure why you posted this in other server side issues. JS is completely client side.
    Moving from Other server side languages / issues to javascript > javascript frameworks

  • #3
    New Coder
    Join Date
    Oct 2010
    Posts
    16
    Thanks
    1
    Thanked 0 Times in 0 Posts
    still need help.

    actually not anymore. I got it!

    Code:
    function page_load($href) {
      if($href != undefined && $href.substring(0, 2) == '#/') {
        // replace body the #content with loaded html
        $('#content').load($href.substring(2), function () {
          $('#content').hide().fadeIn('slow');
        });
      }
    }
    Last edited by Sniickerz; 11-08-2012 at 04:52 PM.


  •  

    Posting Permissions

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