Results 1 to 5 of 5

Thread: JavaScript generates empty div

Threaded View

  1. #1
    Join Date
    Feb 2010

    JavaScript generates empty div

    I'm in an early stage of redesigning a website and have come across a very annoying problem.

    The following JS snippet is necessary to show/hide an arrow to navigate across the page:

    		.insertBefore('ul#gallery > li:even a');
    	var galleryeven = $('ul#gallery > li:even:not(:last) div');
    	var galleryodd = $('ul#gallery > li:odd');
    	var galleryimg = $('ul#gallery > li > a > img');
    Unfortunately it also generates an empty div <div></div> before every <a href. It's clearly visible using Firebug. Without that particular piece of code the page is working perfectly fine too, but I want the arrows to show up on mouseover.

    Please find the beta page on http://beta.beautifullalaland.com/scrolltest4.html and check the code (look for <!-- script inserts <div> before a href -->). A textbox with 2 links is at the very end of the gallery.
    Last edited by Pris; 06-30-2010 at 09:01 AM.
    What desert?

Thread Information

Users Browsing this Thread

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

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
HTML5 Development Center