Can jQuery provide a fallback for failed AJAX calls? This is my try:
function update() {
var requestOK = false;
$.getJSON(url, function(){
alert('request successful');
requestOK = true;
});
if (!requestOK) {
alert('request failed');
}
}
Unfortunately, even if the callback function of the $...
Hiya,
I'm trying to get a toggle effect but not quite sure how to do it or what to look for. (i jave Jquery loaded).
assume html similar to
<table class="left-dates">
<tr><td>All Dates</td></tr>
<tr><td>01 dec 2009</td></tr>
<tr><td>02 dec 2009</td></tr>
<tr><td>03 dec 2009</td></tr>
<tr><td>04 dec 2009</td></tr>...
$("sth").not(':animated').animate();
hey
is this the best way to animate element after being sure that it's not being animated at the same moment ?
thanks
...
I would really like a way to observe changes to a node and trigger functions based on those changes.
I'm going to define "changes" as:
Attribute edits/additions/deletions to a node and all descendants.
Text node edits/additions/deletions inside a node and all descendants.
Events bound/unbound to a node and all descendents.
The additio...
i'm developing a widget that is fetching data from the internet via ajax and i want to provide a error message, if the widget cannot connect to the server. i'm doing the request with jquery's ajax object which provides a error callback function, but it's not called when there is no internet connection, only if the request is made but fai...
Hello
I am trying to use Jquery to find TD's with X or Y content (text) inside. For example:
http://sotkra.com/btol/index.php
From left to right, the 7th COLUMN that reads 'TIPO MONEDA' displays either PESOS or DOLARES. I'd like to be able to do the following:
1.- Select TD's with the text 'DOLARES' or 'PESOS' and add a class to them...
I'm attempting to use a side navigation to display table rows by category using jQuery.
<ul class="side-nav">
<li class="head">categories</li>
<li><a class="item" href="#">Show all</a></li>
<li><a class="accessories" href="#">Accessories</a></li>
<li><a class="books" href="#">Books</a></li>
<li><a class="electronics" href="#">Electr...
Basically what I want the script to do, is add my affiliate ID to all Amazon links posted by my users.(Kinda what SO is doing, minus the whole redirect/racking thing)
Here is the code I'm using, and for some reason it's not working.
<script type="text/javascript">
$(document).ready(function() {
$('a[href*='amazon.com']').each(...
I'm working on an application that allows user to select multiple entries. Once those entries are selected, the user can choose to delete them all. When clicking on the delete button (after selected one or more entries), a modal dialog window is displayed showing the entries that the user has selected with a confirmation button.
Current...
Hi,
I have a html page like this
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script src="JScript2.js" type="text/javascript"></script>
<script src="JScript.js" type="text/javascript"></script>
<title></title>
</head>
<body >
<div ><input type=text id="uxTextBox" /></div>
</body>
</html>
and 2 javascript fil...
I have run into a problem where the user enters data and if there are single quotes at all, the script errors out.
What's the best way to handle single quotes that users enter so it doesn't interfere with the jquery/javascript?
UPDATE:
I'm sending it through ajax to a database. here is the data parameter for a json ajax call.
data:...
Hi,
I have very little javascript knowledge, so it seems a very basic question, but could not find a way to do that.
I have a 1024*768 fixed area like this:
There will be a javascript button on the right side of the "Section A". When I click that button, Section A will be automatically resized and it will be something like this:
...
I've got an html anchor element:
<a title="Some stuff here">Link Text</a>
...and I want to get the contents of the title so I can use it for something else:
$('a').click(function() {
var title = $(this).getTheTitleAttribute();
alert(title);
});
How can I do this?
...
I am trying to run a simple ASP.Net Web Application/Site on Vista Box. Unable to run any JavaScript when I hit F5. However when I deploy the same to local IIS and call the application using IE8 this application works and the JavaScript executes.
Another observation, when I copy the URL (example: http://localhost%3AXXXXX/yyy/Default.aspx...
How to find a <input> whose type is text and value is "no"?
...
Hi All,
I want to fetch all the option values(selected/unselected) in a selectbox on click of a button. Is this possible..?? If it is a yes how can i achieve that..??
Thanks in advance
...
What's wrong with the code?
$('<tr><td><input type="button" value="No" /></td></tr>')
.appendTo('table')
.find('input[type=text]')
.select()
.end()
.find("input[type='text'][value='No']")
.click(function() {$(this).parents('tr').remove();})
...
Something like follows:
$target.replace('<div>test</div>')
...
I'm following a tutorial to create a simple jquery tabs show/hide content.
Wondering if there's a way to re-engineer it to use a list of radio buttons instead of a list?
Tutorial here:
http://www.sohtanaka.com/web-design/simple-tabs-w-css-jquery/
My js:
$(".tab_content").hide(); //Hide all content
$("ul.tabs li:first").addClass("...
Often times in applications I have a property that would normally .animate(), but every now and then must change instantly. Usually I just set the speed to 0 when doing this, but in an application I'm developing now, my situation is the opposite and performance is much more important. This property is set with .css() on window .resize(),...