I would like to fadeOut() an image on the page and remove it from the DOM after the animation is finished. Sounds easy enough?
Example code (image has the id "img1"):
$("#img1").fadeOut("slow", function() { $(this).remove() });
This does does not work. When I inspect the page with Firebug the image is still there. It is just hidd...
I'm trying to build a reusable $.ajax method for my current application but I'm struggling to find solid information about how to build the data: section dynamically ...
Currently I'm looking at something similar to the function below, but I'm not sure how to implement this w/ jQuery 1.3.x (or if this type of thing was moved into the co...
I want to use Thickbox (or one of the varieties) on our site to display information messages returned from the server. Examples include warning messages returned from biz logic, etc.
The first place to need this functionality will be the navigation buttons on an asp:wizard control. When the user tries to move forward, we validate thei...
Hi All,
I'm trying to use jQuery in a bookmarklet, which means I don't have control of the page into which the JavaScript will be inserted. From what I've read of noConflict, it requires that jQuery be inserted first. In the case of a bookmarklet, just the opposite is true.
So - does anyone have any suggestions on whether or not this...
I am looking for the simplest way to disable a whole HTML element (typically a <div>).
With "disable" I mean a way to prevent the user to click on any of the elements contained into the element. For instance, if you have a form into the disabled element, the form elements won't catch the focus. I've tried with a method that traverses t...
Trying to hit two elements with one load() and not successful in what I am trying. This is what I have now to refresh a section on the page and it works fine.
$('#refreshme_'+request).load("http://www.example.com/add_list/");
I tried this
$('#refreshme_'+request, .xPlanner).load("http://www.example.com/add_list/");
and that did n...
k... Strager was able to help me a bit. However, it's still not working quite right. Need someone that knows both MVC and jQuery please...
I have a page that has a image that when clicked on will launch a dialog box that gives the ability to upload a file. Once the dialog closes the image is supposed to refresh with what was uploaded/st...
So I have been exploring different methods to clean up and test my JavaScript. I figured just like any other language one way to get better is to read good code. jQuery is very popular so it must have a certain degree of good coding.
So why when I run jQuery through JSLint's validation it gives me this message:
Error:
Problem ...
When trying to use the code presented here link text I ran into some problems, which was suggested to open up a new question for this problem. Im an using that code here link text trying to create a backchannel for a meeting (it uses the twitter search api to display data, so try please try it with some hashkey to get data in).
The probl...
This question is similar to this one about animation queues, but the answers in that thread are very specific and not easily generalised.
In my web application, messages are reported back to the user (info boxes, errors & warnings, etc) by outputting a div with class="alert" eg:
<div class="alert">Login successful</div>
<div class="ale...
It looks like there is a bug in jQuery UI Dialog where there closeOnEscape doesn't work properly, such that escape will still close the dialog. One possible solution is to unbind the keydown on the overlay, but this doesn't seem to work.
Is there another solution that works?
Here is the link for bug and fix for 1.6, but 1.5.3 is still ...
How to change the background color of UL 'li' on click?
EDIT
i can change li "a" but what about the entire li
this works:
$(".clickableUL").click(function() {
$(this).find("li a").addClass("active");
});
but find("li") does nothing. I want the LI highlighted not just the text of the link.
...
I've been using the jQuery library in our company website for a few weeks longer than its "official Microsoft endorsement". As we find ourselves applying it more and more throughout the site, questions are now being asked about our design vision and implementation strategy for jQuery. Currently, we have none.
I've put some initial tho...
I want to fade in text when loading a page, w/ the background-color slowly fading in as well.
<div id="alert-box">
<p>This is the alert box, this message will display 5 seconds after page is loaded, with the background-color fading in.</p>
</div>
Here is what I have for the jQuery for now:
$(document.body).click(function () {
$...
Is there any reason why JQuery would not work when used in an ASPX page? We have been trying to get working a simple call like this:
$(document).ready(function() {
alert("This is SPARTA!!!!!!!!!");
});
An the alert box is never shown. I've had some experience with JS and ASP.Net before with buttons and I know that I have to return...
I'm in the process of building a back-end admin panel for a site and I'm having an issue with the jQuery and AJAX code is use to build the page.
On load, I bind actions to certain table fields allowing users to add or delete a colour or size. When they submit the form, I empty the table and use AJAX to generate a new one, then put the n...
Dear all I am using JQuery My list has following
<div id="wrapper">
<ul id="testnav">
<li class="test1"><a href="/link">Heading</a>
<ul>
<li><a href="/link">Sub Heading</a></li>
<li><a href="/link">Sub Heading</a></li>
<li><a href="/link">...
I have an ASP.NET website. Very huge!
The latest addition I've made, everything is JavaScript/AJAX enabled.
I send HTML and JavaScript code back from the server to the client, and the client will inject the HTML into a DIV - and inject the JavaScript into the DOM using this:
$('<script type="text/javascript">' + script + '</sc' + 'rip...
I've defined some global keyboard handling using jQuery's keypress event.
Is there a way to suppress these events for input/textarea fields so as not to interfere with typing?
I've used some hacks with conditions based on element selectors, but those had a big performance impact as they were fired on every single keypress.
(Some of tho...
I have a very dynamic UI that provides the end user 2 detail views (each one a step deeper than the previous). When i get to the bottom of this chain I would like the ability to "preview" a pdf file ... but the only luck I have thus far is using window.open(url) and this pops up an additional browser window in IE6/7 (not desired if at a...