I'm trying to create a portfolio website in which I have multiple galleries showing different work on the same page . Each to work separately and change the default image on click. I have seen it work here: h[URL]
I was able to follow this: [URL] but then couldn't duplicate it.
i am going to add thumbnail images on the right side of this page[URL]...like found on this page[URL]... also i am going to give the arrows the ability to navigate through the images i asked for advice in a different forum and was told that the image swaps i have in ggallen.html should not be inline as it clogs up the page...makes sense. i would like to know the best way to add the image swap function, or whatever is best for the job, to the thumbnails. also i would guess there is a more concise way of achieving the navigational behavior for the arrows than making separate divs which are shown/ hid on click.
I am not very well versed in js, but am attempting to figure this out. (Gotta start somewhere, right?) I want this to be unobtrusive js, if possible with no js specifics in the html (though additional or changes to classes/IDs would be fine). I've started with PPK's mouseover script, which is working just fine. To this, I want to add some onclick behaviors. Code:
I have built a webpage that is all one template and the use of an iframe to change the content and not reload the page graphics every time. The way the page is laid out is a background image in the farthest back table behind another table of a background image that is transparent and over lays the bottom table image.
I want the menu buttons; with the existing rollover image for them alone, to change the bottom layer background image "on click". The only code sources i have found will swap images in the same table area and not to any image existing in the entire document.
Does anyone know of a good MIT-Licensed, or MIT-style image swap and disjointed rollover solution? All the ones I've seen are either GPL or personal-use only. The examples of img replacement scripts I've seen on stackoverflow are either only for personal use (I believe every example on the site is personal only, unless stated?), or too narrow in scope.
Any help would be great as the docs.jquery.com site has great demos on almost everything except how to swap images. I don't mind if its a block of code or a plugin, although preferrably something small and simple would be great.
It sounds like a big ask, but I thought I would ask as this place is super-friendly, unlike some of the other js libraries' forums' I've been to.
I have this little snippet of code that swaps a toggle image for news for a plus or minus sign showing if the div is open or closed. This code has worked before but i made a couple modifications today and it stopped working unexpectedly and i'm not sure why its failing. I am presetting the div tag with a plus sign with css and then modifying it with javascript. The problem i am having is that when the div tag has been opened it does not swap the image to min.gif anylonger. It remains max.gif.
I'm trying to create two array's on this page: [URL]
Both array's would be activated by clicking their respective links -- the "I've got more to say" graphic would activate the text array in the bubble.
The "Meet my friends" graphic would activate the image array that changes the picture of the celebrities (ignore the terrible formatting of the 2nd pic).
I'm going to have a relatively large amount of text array variables and probably 5-10 image array variables.
Currently, the meet my friends button changes one image, but then it won't change back and is basically broken. The text array is currently activated by refreshing the page and I can't get that button to work at all.
I am trying to make an image swap to another image, based on two variables.
i.e. Change an image of a blue car with silver wheels to a red car with black wheels.
The variables are the 1. colour of the car and 2. colour of the wheels. The visitor to the page will click on a coloured car icon to swap the image to the correct coloured car and then on a coloured wheel icon to change the wheel colour.
I have pre-prepared jpegs of all of the combinations of car/wheel colour.
Not sure at all about how to do this, or even if Javascript is the right way to go.
I am building a site with ads that I want to rotate positions (this way I can keep it fair for advertisers- the bottom ad rotates up to the top) upon refreshing the page, searching through the site, or each time the user visits. I have three images (sponsor1.jpg, sponsor2.jpg,sponsor3.jpg) that are always displayed vertically in the right banner. I assume this is just a simple javascript slideshow tweaked a bit but can't figure it out.
I find plenty of js scripts that will rotate several images through one image location, but I want image POSITION 1 to start with sponsor1.jpg, image POSITION 2 to start with sponsor2.jpg..and so on... then upon refreshing the page image POSITION 1 is holding sponsor2.jpg, image POSITION 2 is holding sponsor3.jpg... etc
I have been spending all morning trying different solutions. I'm trying to change two images ('bigpic' and 'desc') when someone clicks on a respective thumbnail. I have the swap working for 'bigpic' but cannot add the swap for 'desc' and get it to work. I used the Insert Image Object from Dreamweaver since I am not a Javascript coder and I've been looking through books and online and cannot find the answer. Here is the javascript code I have in the head:
<script type="text/javascript"> function MM_swapImage() { //v3.0 var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3) if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];} } //--> </script>
Im trying to have a click event that replaces an image on the page with a new image that has been selected randomly from an array. I have solved PART of this already (can get the random image to appear).
However, instead of appearing on the page where the old image was, the new image appears in a blank page.
My research indicates that this blank page location-problem is a result of using document.write in the Function. Therefore, I know I need to find a different way to accomplish this, but am failing miserably.
I have been trying for hours and hours and HOURS to figure out proper syntax for accomplishing this via elements, functions, variables and mootools.
A bit of my research:
-I found this---but havent figured out how to implement it in my scenario:
Source: [url]
-I found this---but havent figured out how to implement it in my scenario:
I am using jquery with the cookie plugin and I have multiple image buttons that can hide/show multiple elements. My question is how can I add a cookie to this code to remember whether each separate element is opened or closed?
The code, $(document).ready(function() { // choose text for the show/hide link - can contain HTML (e.g. an image) var showText='<div class="expanddown"></div>'; var hideText='<div class="expandup"></div>'; // initialise the visibility check var is_visible = false; // append show/hide links to the element directly preceding the element with a class of "toggle" $('.toggle').prev().append('<a href="#" class="togglelink">'+hideText+'</a>'); // capture clicks on the toggle links $('a.togglelink').click(function() { // switch visibility is_visible = !is_visible; // change the link depending on whether the element is shown or hidden $(this).html( (!is_visible) ? hideText : showText); // toggle the display - uncomment the next line for a basic "accordion" style //$('.toggle').hide();$('a.toggleLink').html(showText); $(this).parent().next('.toggle').slideToggle('fast'); // return false so any link destination is not followed return false; }); }); HTML, <a class="togglelink" href="#"></a> <div class="toggle"> Content </div>
I have two images, a before and after. I was hoping to rollover the "after shot" where a little button pops up in the center where you can click on "after" which swaps the "after" image with the "before" image.
I'm using Javascript to change an image on a page without reloading the page. The problem is that my images are various widths (but identical heights), yet each image I change it to uses the width of the first image.
Im trying to have a click event that replaces an image on the page with a new image that has been selected randomly from an array. I have solved PART of this already (can get the random image to appear).
However, instead of appearing on the page where the old image was, the new image appears in a blank page.
My research indicates that thisblank page location-problem is a result of using document.write in the Function. Therefore, I know I need to find a different way to accomplish this, but am failing miserably.
I have been trying for hours and hours and HOURS to figure out proper syntax for accomplishing this via elements, functions, variables and mootools.
A bit of my research:
I found this---but havent figured out how to implement it in my scenario:
I found this---but havent figured out how to implement it in my scenario:
I have gotten my script to do exactly what I want it to do with one exception. I have some thumbnail images that people can mouse over and the actual image is 100px by 75px. That is what I use for my thumbnail and they reside in www.website.com/images/thumbs/image1.jpg. I have the large version of the image that resides in www.website.com/images/image1.jpg. Its actual size is 640px by 480. When I mouse over my thumbnail, I don't want the thumbnail to appear for the larger image, I want the large image to appear instead? Let me know if you need ellaboration.
Javascript <script language="JavaScript"> function Change_Big_One(thumb){ document.getElementById('BigOne').src=thumb.src.replace("_th","")
I have a page HTML. In HTML have 1 button, when click into button that'll appear 1 window. In this window, it's show 1 image and after 5s it will change the other image. I can't do this.
how to make the image a hyperlink to specific urls rather than the image in its own page in the contenflow.js? I've found that if you comment out this line: window.location.href=A You will successfully delete the hyperlinks that link to the full size image. However, I'd like to have a click on each image take you to individual specific pages. PS> I'm a designer not a javascript coder -- so detailed explanations are needed. Documentation: [URL]
Using a UI dialog I'd like to load in 10 or so images. Each would be unique and after you click on one the following needs to happen:
1. Image appears on the parent page in a specified ID.
2. A "hidden" field is updated so that when the user submits the db is updated with their selection.
3. Dialog closes automatically.
That's it. Basically it would work similar to "datepicker".I'm using the latest 1.4 and ui and been making great progress as learning basics. I need to do the above and it seems like such a no brainier and or it should already exist but after 2 days of searching and trial and error...
I was trying to apply 2 javascript effects on one image.on the image. It works like it should until I put in the light box effect.The lightbox also works, it just depends on which order I put them in the code on which one will come through.I am relatively new to javascript and I am learning as I go along. Below I inserted part of my code geared towards these two effects. I know I have everything else in the code correct (the body) because they work individually, just not put together (or maybe I have to put a line of code in the body to enable it to work?). Essentially, I want the image to be dulled out when the visitor opens the page, get brighter when they roll over it, then trigger the lightbox when they click on it.
The easy option would be to use an image swap for the dull/bright mouseOver effect; however, I like the way it is done by tutorialhero.The first three scripts are for the light box and the second two are for the rollover. The style sheets are as follows- lightbox, about page layout, rollover effect. Is it possible to have both these effects on the same image?
I have been using Flash to create a slide show that starts with a single image. Then the image caption slides up from the bottom followed by a longer description coming in from the right side of the image (which includes links in the text). The description and caption then slide away, and a new image is transitioned into the old image's place. Is it possible to create something like this with jQuery? The s3slider jQuery plugin is very similar to what I'm looking for, but I can't seem to get two captions to appear over the same image.
I implemented some coding tor create a random image on the page with a corresponding 'alt' tag and all was fine for a while...Then I got ambitions and modified the script to generate code that would generate two seperate sets of random image and associated 'alt' tag pairs.... and all seemed fine for a while....... however after having used the code on my page for a while I notice that occasionally I get a broken file link to the image which then fails to show... and shows the 'alt' text of "undefined".All the code links to images are correct and all images DO show from time to time with the tags.... only occasionally this extra blank/undefined pair is generatedHere's the code...
<SCRIPT LANGUAGE="JavaScript"> <!-- Begin // Set up the image files to be used.
I have 3 smaller thumbnail images and when I click on any of them, the resulting image displays in the larger image space.
The tricky part is that I want the larger image to become a link that changes, depending on which image is displaying. (I don't want the little images to be links.)
Click here [url] for a visual to explain what I am wanting to do.
Here is what I have for script...but I can't figure out the links...This script works fine, but I can't figure out how to make the larger image have 3 separate links, depending on which image is displaying in it.
The idea is simple, one area map replaces the image with image A, the other area map replaces the image with image B sort of like this page. The code I have so far is below. How this is supposed to go?
Code: img.imenu {margin: 2px 0px; height: 20px; width: 175px; border-width: 0px; border-width: 0px; margin-top: 2px; margin-bottom:2px;} </style> <script type="text/javascript"> function mouseOverMap(area) { if (var image = document.getElementById("TheMap")){ image.src = image.src.replace("old.png","new.png"); } else if (var image = document.getElementById("TheMap2")){ image.src = image.src.replace("old.png","new2.png"); } function mouseOutMap(area) { var image = document.getElementById("TheMap"); // not sure what you want to do with this image.src = image.src.replace("new.png","old.png"); } </script>