HTML Help
HTML Help Central . com

» Online Users: 77

0 members and 77 guests
No Members online
Most users ever online was 695, 02-16-2011 at 07:01 AM.

» Site Navigation

 > FAQ

» Domains For Sale

Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2014
    Posts
    133

    Lightbulb Image on click cycles through 3 pictures help?

    I basically would like to know how to make a manual gif.

    I have 3 images and i would like them to be in the center of a page.
    Only 1 should be shown at a time and when you click it, the image gets replaced by the next image.

    Is there a way to do this? :3

    ALSO it would be amazing if you could show me how to add a counter which displays how many times you have clicked the image.


    EDIT: I sorta would like it on the center of this page http://nzltruly.orgfree.com/TheGif.html

    PLEASE AND THANKS!
    Last edited by NZLTruly; 01-06-2015 at 11:19 PM.

  2. #2
    Join Date
    Mar 2014
    Posts
    133

    I found a code

    I found this code and it works but my picture is transparent so i need it to hide all other pictures behind it. :/
    Code:
    var imageObject = {
    	clickSwap : function(obj) {
    		obj.click(function() {
    			var activeImage = $(this).children('img.active');
    			activeImage.removeClass('active');
    			if (activeImage.next().length > 0) {
    				activeImage.next().addClass('active');
    			} else {
    				$(this).children('img:first-child').addClass('active');
    			}
    			return false;
    		});
    	}
    };
    $(function() {
    	imageObject.clickSwap($('#imageContainer'));
    });
    How do I go about it?

  3. #3
    Join Date
    Sep 2007
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    273
    Hi there NZLTruly,

    this attachment...


    ...contains a working example.
    http://www.htmlhelpcentral.com/messageboard/image.php?type=sigpic&userid=8698&dateline=1189772  724

  4. #4
    Join Date
    Mar 2014
    Posts
    133
    Coothead you always amaze me with your kindness and generosity. With a little tweeking I have made it larger and contain the images I wanted to use,

    THANKS A BUNCH

    and you can see what I did to it at the same url: http://nzltruly.orgfree.com/TheGif.html

  5. #5
    Join Date
    Sep 2007
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    273

    No problem, it is always a pleasure to help,
    in some small way, our antipodean friends.
    http://www.htmlhelpcentral.com/messageboard/image.php?type=sigpic&userid=8698&dateline=1189772  724

Similar Threads

  1. Replies: 1
    Last Post: 07-16-2013, 11:52 AM

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
  •  
Powered by vBadvanced CMPS v4.1.1