Jquery :: Load New Page And Set IMG SRC With Click
Apr 19, 2010
I'm very new to jQuery and have run into a problem. I've successfully put together a script that will load images in a different div with fadeIn and fadeOut. Thumbnails are clicked on, and then the full size image will load. This content is all contained on a Gallery page. The problem is that I have a separate page section, appearing on all pages of the site, that holds thumbnails of recent gallery uploads.
When these are clicked, I want to load the Gallery page, and set the source of the full scale image. I've so far only been able to load the Gallery page with the default image source, of just get the full scale image to load. The first section of code below works fine, it's the part for the Gallery page. The other section is for the recent entries. I've removed the fadeIn and fadeOut since they won't be necessary.
Code:
$(document).ready(function(){
$(".galleryholder a").click(function(){
var imageSource = $(this).attr("href");
$("#frame img").fadeOut("slow", function() {
$(this).load(function() {
$(this).fadeIn("slow");
});
$("#frame img").attr({ src: imageSource })
});
return false;
});
});
$(document).ready(function(){
$(".recentholder a").click(function(){
var imageSource = $(this).attr("href");
$("#frame img").attr({ src: imageSource })
document.location.href = '../gallery'
return false;
});
});
View 2 Replies
ADVERTISEMENT
Feb 27, 2010
Is there a way to add event click on link created by dom after load page ?
View 2 Replies
View Related
Dec 31, 2011
I'm using the following code to attach a method to the click event of my button. It definitely works, but unfortunately the click event happens on page load even though no one has actually clicked on the button. How do I prevent this? $('#btn').bind('click',etCategories());
View 4 Replies
View Related
Nov 16, 2010
I recently added a section to my website that uses the Scrollable JQuery tool to load images from my Flickr account. When I initially load the page the "next" button requires two clicks before it will advance to the next set of images. This only happens on the first attempt following the page load. When I look at the code it appears that Scrollable fires an event on the first click that removes the "disabled" class on the "prev" anchor tag. It appears to skip the slider event that scrolls the images. You can view the issue here: [URL].
View 2 Replies
View Related
Aug 15, 2006
1. Load the first page of a series of pages into an iframe when you click a link
2. On each click load the next in order page
3. When last page has loaded if clicked again will start from the beginning.
What I am doing: I am creating a tutorial for a friend who cannot figure out how to use her new rental management program. I could use a manual slide show to have her click for the next image however, there are a LOT of tutorial images which show her what to do at that point. Her program contains a great number of setup screens, report screens etc. This means the slide show would be sitting there loading all these images before it will work. So, I figured, OK make a page with an iframe, and then I could put each image on it's own little page i.e. page1, page2 etc. Place a little button, or a next link, then have the link load the pages into the iframe in order.
View 5 Replies
View Related
Mar 30, 2011
I have questions related to three operations using jQuery:refresh a div element on page lo append an element on top of the other elements in div change an image (pending/accepted) from the div's elements I know that there are tutorials for that, but i am so short in time.I just finished my PHP courses, and i am too tired to get into the jQuery magic right now.ere is the situation that i am confronting. I have to files: propune.php (which is basically the page that has the form and the div that should be refreshed/appended) and propuneri.php (the file that is handling ajax calls).
propune.php
(partial) http://pastebin.com/SFJ7zSRJ
propuneri.php
[code].....
View 1 Replies
View Related
Jul 20, 2010
Can JQuery toggle be use to switch divs on page load instead of having to click a button to start the action? What would I have to write in the header to make this happen if this is possible?
View 2 Replies
View Related
Jan 18, 2011
I'm setting up a video gallery on a site. What I want to happen is that when the user clicks on a thumbnail it then opens and plays the corresponding video clip in shadowbox.
What shadowbox opens is a page which holds the video player object. What I need to happen is for the video reference to be passed to the page that shadowbox opens.
I don't know how to do this. I can get this working where the thumbnails are all on the same page as the video player object. The link on the thumbnail images is as follows:
<a href="javascript:loadVideo('rb6RuHSMY-8');"><img src="data/thumbnails/01.jpg" width="118" height="66" alt="video" /></a>
What I was trying to set up was to get the page that shadowbox opens to automatically run the loadVideo javascript with the reference variable passed to it in the url.
View 1 Replies
View Related
Apr 28, 2011
I'm trying to make it so that when a user clicks on a radio button, the image that is related to the radio button is displayed next to it (without reloading the page). At the moment all it shows is the image related to the currently saved option, which I'd like to keep on page load. Is this possible?
Here is my code for the radio buttons.
View 3 Replies
View Related
Nov 14, 2011
I need a script which click on random links on my webpage after page load?i have javascript code which open only link which i write in script but i want the code which click on any available link on my webpage the links change after every 10-15 seconds so i cant set a spacefic link in code...
View 7 Replies
View Related
Jan 13, 2010
I don't know if this can be done in Javascript, or requires any other language but i was wondering if this would be possible.I would like to embed this Javascript code in to a PHP file and then for it to run automatically upon the PHP file loading:
<td class="smallDesc"> <a name="fb_share" type="button_count" href="http://www.facebook.com/sharer.php">Share</a><script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script> </td>
[code]....
View 2 Replies
View Related
Sep 29, 2009
I want a script that would automatically load the content of my web page for preview when the user hovers on the link; and hence load and display it fully when he/she clicks it. I need something similar to the news component of www.yahoo.com home page.
View 1 Replies
View Related
Aug 20, 2011
How you handle back button scenario in firefox browser. The problem is when i click browser back button , the javascript on load is not executed and page is rendered from cache.
View 1 Replies
View Related
May 12, 2011
I have a single webpage that contains information on all 50 U.S. states. There are 50 links at the top to jump down to the state you want, and at the bottom of the information for each state a Back to Top link.
I'm making the Back to Top link into something more complex, and it will require three or four lines of code.
So that I don't have to repeat the code 50 times, and create a burden when I need to edit it, I want to place it in a .js file and call it x. Then below the information for each state I'll simply have:
Does calling code from a .js file 50 times slow down the page load? Which method would load faster?
View 3 Replies
View Related
Feb 8, 2011
Once you in, click on the button with the sign 'Click To Start Shopping' The problem is, the Flash doesn't load I bought this flash template and i was supposed to edit the FLA file for the serverpath. I guess i didn't put the server path correctly. Below is the code in the .FLS file
[Code]...
Below is the instruction from the documentation: 3. Once you have everything correctly running on local, then OPEN THE FLA, go to first frame, layer codes, open “action” panel and set there the final pàth on your server where all the files will be located (create a folder especifically for this): [URL]
View 3 Replies
View Related
Jul 14, 2010
Is it faster/more beneficial to have two snippets of code be generated by php at 2 different urls and then have a load function for each url? Or have the two snippets on one page, surrounded by id's and then load them that way?
View 1 Replies
View Related
Jan 30, 2009
I have some javascript code that does some GET and POST requests that are required. Sometimes it doesn't fully execute for the user because they close or click onto another page before the javascript is completely done. Is there anyway I can let all of the javascript load first and slow down the actual page load of the website.
View 3 Replies
View Related
Sep 4, 2011
I use jQuery load function to load another page into part ofcurrent page in asp.net. it is work correctly but insecond page i haveone instance ofCKEditor that is not loaded in first page after use load function.
View 1 Replies
View Related
Jun 4, 2011
I know the question begs a question. Why? I have no control over the DB or the Forms. Using 3rd Party based web app. I have this: $(document).ready(function() {
$("#MyButton").click(function (){ $('#CurrentPageInputTextArea').load('jqloadFrom.htm #OtherPageInputTextArea');
});
});
View 2 Replies
View Related
Feb 1, 2011
[Code]...
when i load page it does nothing only blank page, may have code in wrong place but not sure so can someone show me a working example so i can find out what i'm doing wrong also i would like the part of page to refresh evey 120 seconds is this possibe with jquery?
View 7 Replies
View Related
Jun 5, 2009
This is first shot at jQuery and I need some help to achieve what I intend to do.
I have a click event associated with a div
[Code]...
Currently the function is called on click. I would like to call that function for the ul on load. How do I do this?
View 1 Replies
View Related
Oct 24, 2011
I am using a 3 column layout. One column contains links and 2 columns contain content. I need to load the content to 2 Divs in one click. When a link is clicked it should load some file in column 2 and another file in column 3.
As of now I am loading only one div using jquery load function. But I need to load 2 divs. Below is the code Ib am using.
Or is there any other option to load 2 external files in 2 different div in one click
Example
Head
<script type="text/javascript">
$(document).ready(function(){
$('a.menu_links
[Code]....
View 2 Replies
View Related
Nov 27, 2011
I'm working on a large page with lots of AJAX and .load() requests. However I have a lot of .click attributes that are applied when the page is loaded and I have to reapply them every time AJAX reloads those elements. Is there an easy way of reapplying the .click attributes once an AJAX request is complete?
View 1 Replies
View Related
Sep 7, 2010
still have a problem with the following code:
<ul>
<li><a class="open-page" href="/somewhere.html">link1</a></li>
<li><a class="open-page" href="/elsewhere.html">link2</a></li>
</ul>
[Code].....
i also tried to use .live() - nothing. the links where opened by thecommon way browser handle this anchors - follow the link ;)
how to handle these added elements?
View 8 Replies
View Related
Jun 3, 2010
i have a basic 2 column page, on the left is the navigation, on the right the content.i'm loading in the content with the load() method - some php generated html code which looks like this e.g.
<div id="container">
<div id="toggle">TOGGLE</div>
<div id="showArticles">
[code]....
so if i click on the toggle div.. nothing happens so i tried to put a <p id="toggle"> in the navigation bar which is static (not being load()-ed in via jQuery) and it worked so it seems to me, that jQuery can't get the click event out of the load()-ed page
View 1 Replies
View Related
Mar 2, 2010
I am currently using load() to display content upon clicking a line. I would like to add another load function to the same anchor's click event. I tried applying the click function to the sam a.class but it did not work.I have the load a.class within an accordion. here is my current jQuerry functions on the page
$(document).ready(function() {
//ACCORDION BUTTON ACTION $('div.accBtn').click(function() {
$('div.accContent').slideUp('normal'); $(this).next().slideDown('normal');
});
[code]....
View 6 Replies
View Related