I've been looking for an "Ajax CMS" but decided to learn jQuery to learn how to code it myself in order to earn some geek-girl cred among my male colleagues. I've learn a lot about jQuery in a week but as you can imagine I still have a lot to learn.
I have successfully animated an image (move to the left and increase opacity) when the mouse hovers a div and reset the image (move it back to its original position and reset the opacity) when the mouse move outside the div. So far so good...
Here comes the question: What I need to do -and don't know how to - is when the user clicks on the div the image should stay in the hover position while still being able to hover any other divs and activate the animation normally.
When a different div is clicked the previous "Clicked" div should return (animate) to its original position and the new "Clicked" div should stay in the hover position. Content will be loaded when the divs are clicked but there won't be page refresh since I'm loading the content by using the load funtion of jQuery.
This is what I'm trying to do: I want a simple image container to swap the image inside it by clicking the nav buttons on the right like 1, 2, 3.Here's my code:
HTML Code HTML4Strict: <div id="item1"> <div class="img-container shadow" style="background-image:url(images/gallery/tcg1.jpg)">[code].....
My jQuery code is not right. I want it to turn off the "hover" class and the "show" class of the others when you click one. I think I need some kind of if..else? how to write it? I have a bg image set on the container div so there's an initial image to view.I also need multiple of these on the same page!
I am showing an image possibly 957x30 pixels size on a page. Whenever there is a mouseover or hover on this image, it is swapped with another image (say 957x130 pixels) by expanding its division in slidedown fashion and stays visible for few seconds before swapping back with first image.
I'm trying to do a basic image swap when a link is mouseovered. The idea is that you hover over a group of links that is associated with that image, and the image lights up. I have different sets of links and images all over the page.markup looks something like this:
I have four links that use graphics to create an unvisited and visited state (using CSS). The link actually changes a section of text elsewhere on that page, so the user doesn't leave the page. The clicked, visited graphic reflects what text you are reading. You can then select a different link, and new text reflects the link you clicked on. What goes wrong is that if you click all four links, you eventually get all four visited graphics showing.
What I want is this. You click on the graphic and the graphic changes to visited. You then select a different link and that state goes to visited but the previous link that is visited too, changes back to unvisited. Therefore when you click on any link, that visited state is shown, and all others always reset to unvisited. The results is that the visited graphic reflects the current text on that page.
I'm trying to get the hover over image selected based on the current page. I've used an external jquery.url.js library to access file and href information. The if statement is reached correctly, but I can't get the code within it to work. Each image is stored within an anchor and, as with the hover code (included), I'm trying to change the end of its source file name from '_off'to '_on' so it's active.
I am creating a custom gallery that I require an image and text to swap on click of an anchored thumbnail. I have successfully managed to change the image on click however I can't seem to manage changing the text. Currently when a user clicks on the thumbnail both the image and text is swapped however when the user clicks on another anchored thumbnail (after clicking on the first) the image swaps correctly but the text does not change My Code
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:
When I mouseover over the list items below, I would like a DIV that I specify (in this case corresponding by number - but I would like the flexibility to define the div name individually if numbers don't exist, or don't match up [I'm using Drupal, and everything is dynamically generated]) to slide out, or just appear, beneath it (the list will be inline). It needs to stay open so people can click the link that appears in the DIV, but when you mouseout from the DIV or the list item, the div needs to disappear.
My HTML looks more like this: <div id = "navigation"
I'm not familiar with how this code is working, and have been trying to work it out, but I'm not sure I understand the use of "idx" and how the singular "slide" term comes into play.
I used this on-click changeable background code for my website code...
And now I have the same question as the original poster: is there any way to get it so that the chosen background stays put even if the page is refreshed or navigated away from? Or is it not possible because all my pages are separate files? code...
I have a horizontal menu with some subitems. At the moment when I click on the main menu the submenu is being shown and it remains open even if I click anywhere on the page. But here is the tricky part, when I click on a menu item (in the submenu) I want the submenu to display the items on which the page is.For example the menu looks like this:home
I have a menu with some items containing a submenu. The submenu's should open when a parent is clicked and contains submenu's, and when traveling to another page (from the item clicked, for example a parent of submenu item), the submenu should remain active and visible.
When I click on a parent (at the moment the hrefs contain no links just #), the submenu opens. But when I click another main item, the submenu of the previous parent remain visible, and the submenu of the parent just clicked is also visible, while I only want the submenu of the parent clicked to be visible or when parent with no submenu the submenu should be invisible.
I want this to work EXACTLY like Facebook, so that when you click in the "Write a comment..." input field and it makes your photo and COMMENT button appear. Viewing their source doesn't help me. Here are my divs
I am trying to put together a purse shopping site - I would like to have the various views of the same purse in thumbnails under one image then when the customer clicks on the thumbnail the larger image will go into the viewing area. The general layout is like this page - [URL] So when someone clicks on the smallest image I would like it to replace the other image on the page and the larger image becomes the thumbnail. How is this accomplished?
I currently have several instances of a video player placed on the page by number of XML nodes. Each player has a source of one of 2 video codecs, dependent on browser as to which one will be read. The issue I am having is that on click of a thumb 1 video player and its corresponding sources is animated into view and plays. That is all fine, yet when selecting a different thumb the previous video continues to play unless I place the statement in green into my click function. This works until I add another node into my xml, and or place more video.pause without videos actually being in the xml (undefined, of coarse). I have been trying to find the syntax to replace the source with the corresponding thumb id (url, url2) and utilize only one player, but I have failed in my searches. Is it possible to swap the source upon clicking on the thumbs? $('video').player.pause(); is not recognized.
There will be an unvisited button (color of my choice)
There will be a hover state which Is green.
There will be a visited link button that is purple.
There will be a currently active page button that will be red.
I have a script that works for 3 of the for states. The script that I have also will not keep the purple, visited state, as standard text based links will when a page has allready been visited. Does anyone have a script that will work for what I want to do for all states.
I don't know how to build a script of my own, but plan on learning.
Does anyone have a script that will work for what I want to do for all 4 link/swap states that I want incorporated?