I want an image to change every second. I'm having trouble with setInterval. Could someone post a quick snippet on how to do this
This is what I came up with.
var images = 'images/image_*.png';
for(var i = 1; i <= 5; i++){
function changeImg(){
var path = images.replace('*', i);
$('img').attr('src', path);
}
setIn...
What is the difference between jquery and jquery UI? are they both different framework? Is jquery library needed to work jquery UI? or both works standalone? what is difference between any jquery tab plugin and jquery UI Tab? which is better to use?
...
Hi,
I'm creating a web application which loads tabs using AJAX. My problem is that if I have multiple tabs, jQuery reloads a tab every time I click it again (after visiting another tab).
Here is my code:
index.html:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd...
$('#element').css({'background-color':'none'});
The code above doesn't work. Is there a way to do it?
...
I have a situation where my website needs to quickly retrieve data from my server via AJAX.
My website runs on port 80, serving normal web pages. I normally run my AJAX server on port 8001 (I use JSONP and this works fine). This works for most users. However, some users are blocked from high ports by their local firewalls.
In order to ...
Hi!
I'd like to change the background position of a CSS-class while hovering a li-element.
HTML:
<div id="carousel">
<ul id="submenu">
<li>Apple</li>
<li>Orange</li>
</ul>
</div>
CSS:
#carousel {
float: left;
width: 960px;
height: 360px;
background: url(../images/carousel.png);
}
Any sug...
jQuery code:
$(document).ready(function() {
$("#post_submit").click(function(event) {
event.preventDefault();
$("#show").load("post.php", {
submit: $("#post_submit").val(),
title: $("#title").val(),
body: $("#body").val(),
tags: $("#tags").val()
});
});
});
This works fine, and the information...
Hi,
I am looking for a charts library to be displayed on a website. I will use intensively this library (for area, line and bar charts mainly), so I prefer to secure my choice before starting implementing.
The list of website chart libraries that I have initially considered are:
Plotkit
Emprise JS Charts
Sparkline
Protochart
gRaphae...
I have a Problem with Jquery dropdown and Firefox.
Thats the situation:
in the index.html there is a dropdown selection with 3 options. Each of theme has a html file.
In the second dropdown there is again 3 Options after i select the first dropdown.
The Problem is in the second Dropdown.
Firefox always takes the last from the file. ...
I have a bunch of elements that look like this:
<span class='tags' id='html'>html</span>
<span class='tags' id='php'>php</span>
<span class='tags' id='sql'>sql</span>
How would I get the name of the id of the one I hover over, so I could output something like "You're hovering over the html tag". (What I want to do isn't that arbitrar...
For reference: http://www.favsav.com/-public
You'll notice that if you hover over a list item, the meta data slides up. If you leave your mouse still on top, and then move a smidgen to the left or right, it triggers again. There's some other silliness going on if you move around
The code is pretty simple:
$('li.post').hover(funct...
My code:
$(document).ready(function() {
$('.tags').hover(function() {
var id = this.id;
$.post("tag_process.php", { tag: id }, function(data) {
$("#entries").html(data);
});
});
});
I want #entries to hide(); when .tags isn't being hovered over. Is that possible?
...
Hi,
In my web app, I am using jQuery to select all the links on the page and intercept where they go to so that I can switch to a different part of the page with AJAX. The problem is that some of these links are in InfoWindows (if that's what they're called) on a Google Map. For some reason the jQuery selector $('a') isn't selecting them...
I want to do something to an HTML element after it has been processed by some other js process over which I have no control.
for example, given
... ...
and some 3rd party async app does $('div.x').each(function(){ /* do stuff */; this.addClass('processed');});
Is there some strategy for registering an interest in the div when its cl...
What am I doing wrong, my html is rendered as such:
<td colspan="2"><input id="ctl00_ContentPlaceHolder1_Login1_RememberMe"
type="checkbox" name="ctl00$ContentPlaceHolder1$Login1$RememberMe" />
<label for="ctl00_ContentPlaceHolder1_Login1_RememberMe">Remember me next time.
</label></td>
I want to wrap everything inside the
TD ...
I have a series of elements setup like the example below:
<div id="floater"></div>
<div id="alert"></div>
<div id="news"></div>
<div id="links"></div>
When a link in the links div is clicked I used jQuery to animate the floater div to its position so as the user can easily reference the last link they clicked.
However. alert is setup...
For anchor links i want to removes the dotted focus outlines for mouse events, but want to display them when for keyboard tabbed navigation.? Is there any javascript, jquery method?
Method should be compatible all A-grade browsers. including IE6.
Although all pure css methods to remove dotted lines do not works in IE 6.
But remember i...
Hi
I am wondering how do I first detect if Javascript is enabled/disabled. Disabling javascript on this site revealed that stackoverflow uses something called the tag.
Is this like the standard way of doing it? Does it work on all the browsers?Which browser versions does it not work on(ie IE6)?.
Do I just stick in the body or the hea...
I create the cookie in jQuery. I can verify it in Firefox. But when I try to print the cookie or assign into another value I cant get it. I also use sessions. And I started the session in PHP.
My code to print or assign the cookie value is shown below
echo $_COOKIE['a'];
for assigning the value
$b=$_COOKIE['a'];
The cookie created ...
My page is altered after loading by a lot of jQuery to get the layout I want. (Decision based alignment etc.) But at first when I load it it doesn't work (messed up alignment). I close it, follow the link to the page and it works perfectly. But then I refresh the page (F5) and it's messed up again. And it seems to function differently on...