I have a random amount of DIVs (minimum 1, max of 10)
<div id="container">
<div class="foo">Content</div> <!-- div 1 -->
<div class="foo">Content</div> <!-- div 2 -->
<div class="foo">Content</div> <!-- div 3 -->
<div class="foo">Content</div> <!-- div 4 -->
<div class="foo">Content</div> <!-- div 5 -->
<div class="foo">Content</div> <!...
I'm trying to animate a dynamically created html element with CSS3 transitions.
I want the animation to start just before the element is created.
For these i create a class that set the original position of the element and then I set the target position by the jquery css() method
But the new element it just apears in the target posit...
var options = {
series: {lines: {fill: true, fillColor: "rgba(255, 255, 204, 0.5)"} },
xaxis: { mode: "time", timeformat: "%d %b %y", minTickSize: [1, "month"]} ,
yaxis: { max: 50000}
};
var d3;
var plot;
$(document).ready(function(){
d3 = <?echo $balarray;?>;
plot = $.plot($("#placeholder"), [d3],options );
$(...
Background
Let me start off by listing my opinion of jQuery:
I've been anti-jQuery for the longest time
I think it does have its uses and parts of its code can be reused
I feel if you're against something, you should know what you're "against"
I've created a number of examples and compared that to ways I've done things in the pa...
I have the rotatePics jquery script in my webpage:
$(document).ready(function(){
rotatePics(1);
});
function rotatePics(currentPhoto) {
var numberOfPhotos = $('.photos img').length;
currentPhoto = currentPhoto % numberOfPhotos;
$('.photos img').eq(currentPhoto).fadeOut(function() {
// re-order the z-index
$('.photos img'...
How do you refer to elements of array in Jquery? For instance - input type of text with name="a[]" attribute.
...
Sounds simple but it's giving me grief:
Tried this:
function validateAddress() {
if (!($('<%=txtPlaceName.ClientID%>').val() === "")
|| !($('<%=txtStreet.ClientID%>').val() === "")
|| !($('<%=txtAddress.ClientID%>').val() === "")
|| !($('<%=txtPostcode.ClientID%>').val() === "")) {
return true;
...
What is the correct event to use with autocomplete-type functionality? I'm doing something similar to autocomplete and tried using the "keypress" event, however, when I go to get the text out of the input that fired the even, it only has the text before the event was fired. Should I be using a different event, or perhaps just append th...
Is it possible to update a xml file using jQuery? Or do i have to use server side scripting to achieve it?
Thank You
...
IE9, Firefox 4, Opera 10.5, Safari 5, Chrome 4, WebKit 532.5 supports CSS3 border-radius.
Latest jquerycurvycorners 2.1.1 uses -moz-border-radius and not border-radius to create corners to old browsers. How to replace it to border-radius, border-top-left-radius, border-top-right-radius, border-bottom-right-radius, border-bottom-left-rad...
I'm using firebug and making lots of console.log, .info, .dir calls, etc. When the app runs on a machine with firebug turned off, it can cause errors. What's the best technique to avoid that? This seems to work:
// global scope
if (typeof(console) == 'undefined') {
console = {
info : function() {},
dir : function() {...
I have a bit of javascript that I have used successfully on one page, but does not work on another. I copied the block from one file to another, but it does not seem to be attaching the event at all. When I run the copied block from the console in Chrome or Firefox after the page loads, it works fine. All of the javascript before and ...
What event can i use to run code when a user visits another page then hits back to load my page again?
I wrote window.onload = function() { ... and it works when i hit refresh but not forward then back.
...
I have the following html element
<select id="selectStates" size="5" multiple="multiple" class="box">
<option value="tx">Texas</option>
<option value="ak">Alaska</option>
<option value="ca">California</option>
<option value="ws">Washington</option>
<option value="tn">Tennessee</option>
</select>
And I have a . It ...
I need to select all local links, regardless of if the start with
/path/to/page
http://mydomain.com/path/to/page
https://mydomain.com/path/to/page
and replace them with
/#/path/to/page
Thanks for your help.
Edit: As pointed out by dvhh in a comment, a better solution would be to target clicks. So sorry, I won't be testing solu...
Hello, I'm pretty new with JQuery, I'm trying to get this script to work. I'm trying to create a rotator on the homepage of a clients website but I can't get it to run! I get no errors, the files are were they're supposed to be, I can't for the life of me figure out what the problem is!
Here's a snipped of the code:
<script src="http:/...
I'm building a rudimentary ajax calendar using jquery and colorbox. Here's the link to the site in progress:
http://208.79.237.222/calendar/
When a user clicks on a link in the calendar controls, a script requests that page via ajax and updates the calendar.
The issue I'm having is with the pop up links in the calendar table. When you...
I'm doing some inline editing on the jqgrid. The client wants a confirmation dialog to appear that the user really wanted to save the changes made (similar to how delete works). In looking at http://github.com/tonytomov/jqGrid/blob/master/js/grid.inlinedit.js I've noticed that the editRow command takes these parameters.
table.jqGrid('...
Hi there,
I am using jquery to animate an object.
I am looking for a way to pause the animation on mouseover, and resume it after the mouse has left.
Is this possible?
...
I've added the minimum setup of jQuery Tools Overlay to my site. When it's opened, it hits the eye hard. I found this code snippet in the docs that shows how to create a custom animation, but it produces really weird and unpredictable results (website jumps to home directory and scrolls up when overlay is opened):
// loading animation
$...