I would like to know if there is a jQuery event that I can use to determine when a particular DIV's "Top" property has changed.
For instance, I have invisible content above a DIV. When that content becomes visible the DIV is shifted down. I would like to capture that event and then use the offset() function to get the X/Y coordinates....
I am trying to pass a dataString to to an ajax call using JQuery. In the call, I construct the get parameters and then send them to the php page on the receiving end. The trouble is that the data string has ampersands in them and the HTML strict validator is chocking on it.
Here is the code:
$(document).ready(function(){
$("input#em...
Hi all,
I'm using Jquery's toggle event to do some stuff when a user clicks a checkbox, like this:
$('input#myId').toggle(
function(){
//do stuff
},
function(){
//do other stuff
}
);
The problem is that the checkbox isn't being ticked when I click on the checkbox. (All the stuff I've put into the toggle event is working properly.)
...
Dear All,
I have using the code for developing tabs
$(document).ready(function() {
$('#container-1').tabs();
}
....
<div id="container-1">
<ul>
<li><a href="#fragment-1"><span>Home</span></a></li>
<li><a href="#fragment-2"><span>Contact</span></a></li>
</ul>
</div>
...
I used Themeroller to generate an app theme and I am using jQuery and jQuery UI to create some modal dialog alerts. They work fine (and look great) on Firefox 2 and 3, but the buttons are shifted to the right on IE 6 and 7. It looks like it's being bitten by the IE margin bugs, but I wanted to see if there was an easy fix before digging ...
I have some <tr> elements on my page with a click() event attached to an image that sits inside each one. I use this code
$(this).clone(true).appendTo("table#foo");
to do the following:
copy those <tr>s into a different table
preserve the click events on the images inside the <tr>s (because of the true argument)
All of that works ...
I have a simple email address sign up form as follows:
<form action="" id="newsletterform" method="get">
<input type="text" name="email" class="required email" id="textnewsletter" />
<input type="submit" id="signup" />
</form>
Here's what I want to be able to do:
Validate the form to look for an empty string or a incorr...
Hi all,
I have a web application that uses the current version of JQuery that needs to get some JSON objects back from a REST web service. I'm using the following call to $.getJSON:
$.getJSON("http://localhost:17245/Service.svc/?format=json", function(data) {alert(data.id);});
This call works fine in IE7 and I can call the service wit...
Ok, I'm doing a bunch of RIA/AJAX stuff and need to create a "pretty", custom confirm box which is a DIV (not the built-in javascript confirm). I'm having trouble determining how to accomplish a pause in execution to give the user a chance to accept or decline the condition before either resuming or halting execution. (depending upon the...
Can jQuery be extended so that I can use the above syntax?
I can't figure out how to prototype whatever it is $() returns, so that I can call $().$()
Thanks.
...
I was reading the great article about binding and unbinding events (because I am a js beginner using jQuery) on Karl Swedberg's blog, and I became totally puzzled at this part of the code (simplified for brevity):
function addItemUnbind() {
$Add a button but it won't have it's event added;
addItemUnbind();
});
Why is...
Dear All
I have designing the TabMenu Like following
<script type="text/javascript">
$(function() {
$('#container-1').tabs();
$('#container-2').tabs();
}
</script>
.....
<div id="container-1">
<ul>
<li><a href="#fragment-1"><span i...
There are 2 radiobutton and a hyperlink.
if select 'radiobutton1' the hyperlink is enabled.
if select 'radiobutton2' the hyperlink is disabled.
i can use jquery to disable the hyperlink, but can't enable it.
How to enable the hyperlink with jquery?
...
Hi,
I have a method, which will accept a parameter of a JQuery Object and will calculate totals for a section. So if you give it a JQuery Object of a div containing the section it will calculate a total for it
so you can do this:
var $totalcompletion = CalculateSectionCompletion(jQuery("#Section1"));
Now I have multiple divs with the...
This one is weird,
I have a page that consists of a html table in a div called 'rates-viewer'. If you load this page in IE (6 or 7), you will notice that the contents of the table headers is misaligned over to the left.
http://tinyurl.com/666zcv
If you choose a country from the dropdown, it triggers an ajax call to a script. This scri...
I have need of Click Tab Event I am using the code following..
<script type="text/javascript">
$(function() {
$('#container-1').tabs();
$('#start').bind('tabsselect', function(event, ui) {
alert('tab label ' + ui.tab.text());
});
});
</script>
.....
...
If i do jQuery(expr).change( function), then I can get an event function to fire when the user makes a change to the value.
Is it possible to get this to fire if it's changed programatically, ie if I call jQuery(expr).val("moo").
or if some Plain old JavaScript changes it's value?
Thanks for any help.
...
Hi,
I've got a list of links which have a click event attached to them, I need to get the ID from the child A link. So in the example below if I clicked the first list element I'd need google retuned.
I've tried '$this a' but can't quite work out the syntax.
jQuery:
$("ul li").click(function(event){
$("input").val($(this).html()); ...
I have a question similar to the one here: http://stackoverflow.com/questions/341723/event-handlers-inside-a-javascript-loop-need-a-closure#341759 but I'm using jQuery and the solution given seems to fire the event when it's bound rather than on click.
Here's my code:
for(var i in DisplayGlobals.Indicators)
{
var div = d.createElem...
I came across a weird behavior with jQuery. After minifying all my scripts, jQuery plugins do not work. jQuery object and its api are still available, but none of the extensions that were added after jQuery is able to be invoked. I tested and found that these extensions are still present until the dom is created. I created a simple exten...