Hello,
I'm creating new image using
img = new Image();
img.src = image_url;
Then I'm assigning img.src to the img tag's src in DOM
$("#my_img").attr("src", img.src);
How can I know that img.src has 100% loaded? What is the best practice?
img.complete seem to me little buggy in some browsers.
So, in another words, I need to assign...
Hi all,
i'm trying to implement on my page the jQuery UI Sortable plugin, but it isn't working.
Can anyone help me with this error? I think it might be something simple that is escaping me.
the link to preview is: http://jsbin.com/ebixi3
the link to jsbin edit is: http://jsbin.com/ebixi3/edit
Thanks all in advance.
...
Good afternoon.
I have a little problem with triggering the change of a select box in jQuery.
I have juts built a plugin that takes a select box with it's options and turns it into an iPhone style (what I call) roller - basically a fixed height element with an up and down arrow on the right that makes the list in the box go up and down...
This is HTML Code.
<div id="Slogan">
<h1>
<img src="img1.gif" />
<img src="img2.gif" />
<img src="img3.gif" />
<img src="img4.gif" />
<img src="img5.gif" />
</h1>
</div>
#slogan {float:left;position:relative;width:100%;}
I want show all image randomly but one by one like slide show, with fade-in fade-out effect. How to do with jquery...
Hi,
If I had two sets of classes, like so
<div class = "link 1"></div>
<div class = "link 2"></div>
<div class = "link 3"></div>
....
<div class = "link x"></div>
and
<div class = "target 1"></div>
<div class = "target 2"></div>
<div class = "target 3"></div>
....
<div class = "target x"></div>
how can i get the nth link to scr...
I only have very limited control over a flash application. The only thing I can do is modify some links in an XML that it reads from.
I want to execute JS code based on the selected item in flash. I can link to something like: currentpage.html#some_anchor, but is there any way for me to detect the URL change from jQuery?
...
how to set all links in iframe to "google.com" by javascript or jQuery ?
...
I am doing Ajax call using jQuery and my URL is like
http://localhost;3327/DummyAps/Demo.aspx
In Demo.aspx page i have a WebMethod, which i wanted to call. While doing jQuery ajax call i am giving the URL as "/DemoWebMethod", where "DemoWebMethod" is the Webmethod present in Demo.aspx page.
But while calling the WebMethod it is calli...
I have a single URL i am using as an image gallery. At this URL is a thumbs div (i'm only showing four thumbs for the sake of brevity):
<div id="thumbs">
<img src="graphics/thumbs/01.jpg" width="190" height="190" class="thumb objects" id="project01" />
<img src="graphics/thumbs/08.jpg" width="190" height="190" class="thumb web" id="pro...
Hi all
I'm working on an ASP.NET Web Project with some AJAX magic. As my GridView's data needs up to 15 seconds to be gathered, I send the page to the client and fire an asynchronous update of an UpdatePanel via jQuery/JScript (see below).
This works well, so far. Now I'd like to skip this step when the user navigates to the next page ...
Hi,
I would like to use Fancybox to display a registration form within an iFrame. Then once the user has filled in his/her details.
The details should be processed using the ajax mechanisms within Jquery/Fancybox and the values displayed within the same Fancybox iframe.
How can this be implemented, I have been scratching my head all ...
I generate a recaptcha box on a form like this.
<?php
$recaptcha = new Zend_Service_ReCaptcha("key", "key");
echo $recaptcha->getHTML();
?>
and perform form validation using javascript. I would like to change the captcha phrase each time user unsuccessfully submits form. Can this be done using javascript?
thanks
...
Im having a question regarding jqtouch and ipad device. Is it possible to achieve parallarer scrolling with jqtouch and ipad? im thinking of creating 1:1 size images related on ipad screen and would want that whole viewport is scrolling.
To define paraller scrolling with this case, some objects moves in different speed (in depth), than...
Hey all,
I get the following Error:
jquery1.4.2.js
Line: 2828
Error: The Object does not support the method.
My JavaScript Code:
$(document).ready(function () {
//When page loads...
$(".tab_content").hide(); //Hide all content
$("ul.tabs li:first").addClass("active").show(); //Activate first tab
$(".tab_conten...
The jquery function that I'm using is:
$.getJSON("rpc2.php?queryString=" +inputString+"", function(data) {
if(data.length >0) {
$.each(data, function(i, data){
var city= data.city;
var country= data.country;
$('#suggestions').show();
$('#autoSuggestionsList').html('<li>'+ city+'</li>');
});
}
});
The PHP looks like:
if(strlen($qu...
I have a photographer's gallery here.
In my friends, Firefox and Safari, everything is smooth. However, IE8 seems to not call the callback after the XHR has loaded (if it has, I tried checking with Fiddle, but couldn't get my head around whether it has actually loaded or not).
It just seems to sit there loading forever. I'm not sure wh...
Hello everyone,
For my website, I am trying to make an horizontal navigation.
The navigation works well with the plugin jQuery.serialScroll, however I do not manage to make sure that the item selected is centered, notably when the different items have different widths.
I can change the offset, but it will change for the whole slideshow...
Hello,
I am trying to use google transliterate and translate some text from english to a diffrent language. I am able to do this using the following code in the javascript.
var options = {
sourceLanguage:
google.elements.transliteration.LanguageCode.ENGLISH,
...
I saw there is an answered question about whether there is a difference between using $(document).ready(function(){}) and $(function(){}) (there isn't), but my question is which is the preferred syntax and why.
I've been using jQuery for about a year and have always used the $(document).ready() syntax; but lately on SO and in some other...
I have a div for example, and when you pick it up to start dragging, it snaps the div so the cursor/mouse is in the middle of it.
This is the code..
// DEFINE DEFAULT VARIABLES
var _target=null, _dragx=null, _dragy=null, _rotate=null, _resort=null;
var _dragging=false, _sizing=false, _animate=false;
var _rotating=0, _width=0, _height...