dcsimg
www.webdeveloper.com
Results 1 to 4 of 4

Thread: Jquery is messing up my scripts, need to convert one query script to js

  1. #1
    Join Date
    Oct 2012
    Posts
    15

    Jquery is messing up my scripts, need to convert one query script to js

    My jQuery code stopped working in FF and IE and messes up my links, they are blue even though they are styled to be white in every mode.
    The code is to insert a cover div onto each element of an array. Each element of the array is already in it's own div, class name result. I need to write this out in javascript, anyone got any suggestions? Thanks. If you want to see it... whatarethelotterynumbers.org still works in Chrome
    Code:
    function cover() {
    	
    	shufl();	<!--Shuffles the array-->
    		
         $(".result").each(function()
    	{
    		$("<div/>", {"class":"cover"}).appendTo($(this)).fadeIn(250).click(function()
    		{	$(this).fadeOut(1500);
    		});
    	});
    	
    }

  2. #2
    Join Date
    Mar 2007
    Location
    localhost
    Posts
    2,881
    Try asking your JQuery questions here... http://www.webdeveloper.com/forum/fo...ch-as-JScript)
    STOP using $ prefix on JavaScript variable names...
    Please remember to wrap any code you have in forum tags:-

    [CODE]...[/CODE] [HTML]...[/HTML] [PHP]...[/PHP]

    If you can't think outside the box, you will be trapped forever with no escape...

  3. #3
    This looks like something else that isn't JavaScript's job -- looks like it should be markup and/or CSS. You want DIV in there, why aren't they already in the markup? Just what are you even trying to do with those DIV?

    Though without seeing the markup you're applying it to it's hard to figure out what it is you are trying to do.

    ... but that could just be the mess of cryptically useless jQuery daisy-chain nonsense. not a fan.

  4. #4
    Join Date
    Oct 2012
    Posts
    15
    Quote Originally Posted by deathshadow View Post
    You want DIV in there, why aren't they already in the markup? Just what are you even trying to do with those DIV?

    Though without seeing the markup you're applying it to it's hard to figure out what it is you are trying to do.

    ... but that could just be the mess of cryptically useless jQuery daisy-chain nonsense. not a fan.
    The div's are being inserted over existing elements of an array "result" and they are a variable. They are to cover each element with a background image that fades out when clicked to reveal the number in the array. A lotto number picker site.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles