Why is this jQuery script stopping my form validation from working?

Discussion in 'jQuery' started by Airwalk Enterprise, Inc, Mar 25, 2011.

  1. #1
    So here is the script:

    // fade effect for links and sharing

    $(document).ready(function() {
    $('a').hover(function() {
    $(this).fadeTo("fast", 0.4); }
    , function() {
    $(this).fadeTo("fast", 1.0); }
    ); $(".st_facebook_large, .st_twitter_large, .st_myspace_large, .st_digg_large, .st_stumbleupon_large, .st_ybuzz_large, .st_linkedin_large, .st_aim_large, .st_delicious_large, .st_reddit_large").hover(function() {
    $(this).fadeTo("fast", 0.4); }
    , function() {
    $(this).fadeTo("fast", 0.9); }
    );

    // scroll to top fuction


    $(window).scroll(function () {
    }
    ); $('.top').click(function() {
    $('html, body').animate( {
    scrollTop : 0}
    , 'slow'); return false; }
    ); }
    );

    // infinite blink fade

    function effectFadeIn(classname) {
    $("."+classname).fadeTo("slow", 1.0).fadeTo("slow", 1.0, effectFadeOut(classname))
    }
    function effectFadeOut(classname) {
    $("."+classname).fadeTo("slow", 0.5).fadeTo("slow", 0.5, effectFadeIn(classname))
    }
    $(document).ready(function(){
    effectFadeIn('blink');
    });

    It's the bottom infinite blink fade section. If I remove this my form validation works fine. Any ideas??
     
    Airwalk Enterprise, Inc, Mar 25, 2011 IP
  2. Cash Nebula

    Cash Nebula Peon

    Messages:
    1,197
    Likes Received:
    67
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Firebug give an error "too much recursion". I've never seen that before, but I guess it means you should try another method.

    Try this:
    
    function doBlink(s) {
    	$(s).fadeTo("slow", 0.5, function() {
    		$(s).fadeTo("slow", 1.0, doBlink(s));
    	});
    }
    
    $(document).ready(function() {
    	doBlink(".blink");
    });
    
    Code (markup):
     
    Cash Nebula, Mar 25, 2011 IP
  3. Airwalk Enterprise, Inc

    Airwalk Enterprise, Inc Peon

    Messages:
    126
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Worked like a charm, thanks!

    If there's anything I can you you with, just let me know @

    airwalk-design.com
     
    Airwalk Enterprise, Inc, Mar 25, 2011 IP
  4. Cash Nebula

    Cash Nebula Peon

    Messages:
    1,197
    Likes Received:
    67
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Cash Nebula, Mar 25, 2011 IP