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 5 of 5
  1. #1
    New Coder
    Join Date
    Jun 2012
    Posts
    57
    Thanks
    13
    Thanked 0 Times in 0 Posts

    Cool Blur Function Trouble

    I have a website that has a "shop" where you can use "coins" to buy stuff.
    Right now, I am creating the shop and testing it out so please take a look at it here
    http://coinawards.net63.net/structure/shop.php

    (Hint: Do NOT login and view this page because it is not updated for logged in people ATM)

    So when you click the box that says "Buy for 40 coins" it will pop up a light blue box that says "added to your cart".

    Although there is no actual cart adding thus far, it will be added later.

    Right now, my code says that once the 'buy' button is BLURRED, the popup should disappear... but it doesn't. I'll post my code below in the hopes that someone knows how to fix it!



    Code:
    function init()
    
    {
    
    var buyinfobutton = $(".buyinfo");
    
    buyinfobutton.on("click",AddToCart);
    
    buyinfobutton.on("blur",popUpVanish);
    
    $('#confirmbox').hide();
    
    }
    
    onload = init;
    
    var shoppingcart = {};
    
    function AddToCart()
    
    {
    
    $('#confirmbox').show('normal');
    
    }
    
    function popUpVanish()
    
    {
    
    $('#confirmbox').hide();
    
    }

    Also,
    if you see my site and think it need some improvement on an area (some parts are bad, I know) please note it down as well! Thanks!

  • #2
    Regular Coder
    Join Date
    Apr 2012
    Location
    St. Louis, MO
    Posts
    985
    Thanks
    7
    Thanked 101 Times in 101 Posts
    Are there any messages in the error console?
    ^_^

    If anyone knows of a website that can offer ColdFusion help that isn't controlled by neurotic, pedantic jerks* (stackoverflow.com), please PM me with a link.
    *
    The neurotic, pedantic jerks are not the owners; just the people who are in control of the "popularity contest".

  • #3
    New Coder
    Join Date
    Jun 2012
    Posts
    57
    Thanks
    13
    Thanked 0 Times in 0 Posts
    There are no errors in the console.

  • #4
    Regular Coder
    Join Date
    Apr 2012
    Location
    St. Louis, MO
    Posts
    985
    Thanks
    7
    Thanked 101 Times in 101 Posts
    Instead of using onload, use $(document).ready();
    ^_^

    If anyone knows of a website that can offer ColdFusion help that isn't controlled by neurotic, pedantic jerks* (stackoverflow.com), please PM me with a link.
    *
    The neurotic, pedantic jerks are not the owners; just the people who are in control of the "popularity contest".

  • Users who have thanked WolfShade for this post:

    zingzing45 (03-29-2013)

  • #5
    New Coder
    Join Date
    Jun 2012
    Posts
    57
    Thanks
    13
    Thanked 0 Times in 0 Posts

    Smile Thanks

    I fixed the problem,
    it had something to do with a "tabattribute of -1".
    Thanks for your advice though.


  •  

    Tags for this Thread

    Posting Permissions

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