Results 1 to 3 of 3

Thread: Photo Album script v2.0

  1. #1
    Join Date
    Aug 2008
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Photo Album script v2.0

    1) Script Title: Photo Album script v2.0

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...photoalbum.htm

    3) Describe problem: Is it possible to take out (delete) the numbers on the navigation links (highlighted yellow color)? My goal is to have it navigate with images and not numbers.

    I was able to add a background image of a grey bullet for the 1st set of pics, and a background image of a white bullets for the 2nd and 3rd set not clicked on. But I cant delete the numbers from the navigation. It happens automatically. Finally i cheated and turned them white and added padding to the top to get rid of them, but I know this isn't the right way.

    Can someone help me, my head's gonna explode!!

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    There is nothing wrong with the way you did it. However, an idle swipe of that area with the mouse button depressed could highlight the now 'invisible' numbers. Here is where in the script that the text I believe you wish to eliminate is generated:

    Code:
    photogallery.prototype.createNav=function(gdiv, pdiv , ptext){
    	var instanceOfGallery=this
    	var navHTML=""
    	for (var i=0; i<this.pagecount; i++)
    		navHTML+='<a href="#navigate" rel="'+i+'">'+ptext[1]+(i+1)+'</a> ' //build sequential nav links
    	pdiv.innerHTML=ptext[0]+' '+navHTML
    	var navlinks=pdiv.getElementsByTagName("a")
    	navlinks[0].className="current" //Select first link by default
    	this.previouspage=navlinks[0] //Set previous clicked on link to current link for future ref
    	for (var i=0; i<navlinks.length; i++){
    		navlinks[i].onclick=function(){
    			instanceOfGallery.previouspage.className="" //"Unhighlight" last link clicked on...
    			this.className="current" //while "highlighting" currently clicked on flatview link (setting its class name to "selected"
    			instanceOfGallery.showpage(gdiv, this.getAttribute("rel"))
    			instanceOfGallery.previouspage=this //Set previous clicked on link to current link for future ref
    			return false
    		}
    	}
    }
    Let's zoom in on that line:

    Code:
    navHTML+='<a href="#navigate" rel="'+i+'">'+ptext[1]+(i+1)+'</a> ' //build sequential nav links
    If you want no text there, you could make it:

    Code:
    navHTML+='<a href="#navigate" rel="'+i+'">&nbsp;</a> ' //build sequential nav links
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Aug 2008
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Got it! Thanks so much John. Looks beautiful. =)

Bookmarks

Posting Permissions

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