On Apr 1, 1:39 pm, JMan wrote:
> One thing I have been struggling with is AJAX applications is managing
> the js code that powers them.
>
> For example if you have a page that loads content from an AJAX call to
> the server and that content also has js code associated with it in
> order to functi
I would suggest dropping the add-/remove- class stuff entirely in
favor of simply switching out the background image. Try something like
this:
// Attach a click event to every input in the .nav section.
$('div.nav input').click(function(){
// Extract the specific floor plan from the class
If you want to concatenate strings in order to create selectors, don't
make them jQuery objects first. In other words, just do this:
var row = ".flexigrid .bDiv #socios .trSelected:first";
$(row + " td:first").css("color", "red");
Also, as long as your ID's are unique, which they should
This line is the likely culprit, because the css selector is not
specific to an individual element:
var selected = $("select option:selected").val();
Try this instead, to constrain the selection within the current
context:
var selected = $("option:selected", this).val();
Or, IIRC,
One thing I would suggest is casting the .val() as an integer before
comparing it:
var dulicateCheck = parseInt($("#duplicateInput").val());
Otherwise it's doing a string comparison, which will throw off your
results.
- jason
On Sep 1, 9:25 pm, hubbs <[EMAIL PROTECTED]> wrote:
> For some
$(this).find('input[id*=mycheckname]:first');
http://docs.jquery.com/Traversing/find#expr
- jason
On Sep 1, 5:27 pm, matt knapp <[EMAIL PROTECTED]> wrote:
> I have some table rows:
>
>
> Blah
>
> Blah
>
> Blah
>
>
>
> that I am selecting like
>
> $("tr[class=.tableRow]").each( function(i
I think, at a bare minimum, you'll want to change this:
var title = $(this h3).val();
...to this:
var title = $('h3', this).text();
...and this:
$(this h3).append...
...to this:
$('h3', this).append...
I think that'll solve your immediate problem.
- jason
On Jun 17, 2:37 pm, Dan <[EMA
This looks fantastic. Thanks to everyone on the team for their
continued hard work. You guys rock!
- jason
On Jun 3, 1:46 pm, Rey Bango <[EMAIL PROTECTED]> wrote:
> jQuery v1.2.6 is now official and release notes have been
> posted:http://docs.jquery.com/Release:jQuery_1.2.6
>
> The biggest
I haven't tested this, but I think you'd just select the inputs within
the clone, and reset them before inserting, like so:
var clonedRow = $("tbody.gltb tr#guest_new").clone();
$('input', clonedRow).val('');
- jason
On Jun 2, 11:42 am, jarp <[EMAIL PROTECTED]> wrote:
> new to jquery. here
Here's one way, no "last" class required, though it probably could be
improved upon:
$($('p').get(3)).before($('p:last'));
- jason
On Jun 1, 9:02 am, swortis <[EMAIL PROTECTED]> wrote:
> Hi all-
>
> I suspect this is ridiculously easy.. but I'm lost..
>
> I'm looking for a jquery way of takin
Have you tried using .next() ? Something along these lines (untested):
$('dd.comments input[type="radio"]').toggle(
function(){ $(this).next('dd.feedback').show(); },
function(){ $(this).next('dd.feedback').hide(); }
});
- jason
On May 27, 3:57 pm, macgregor <[EMAIL PROTECTED]> wrote:
I've tried several, but always come back to Twitterific:
http://iconfactory.com/software/twitterrific
- jason
(http://twitter.com/easykill)
of either dynamically adding the plugin, then using it, or
> detecting if jquery is already called before calling it again. Of
> course, that last one would require that all developers do that, which
> may not happen. It would be awesome if jquery itself would know that
> it's a
That makes sense. jQuery is loaded, then extended by loading a plugin,
but then replaced with a fresh, unaltered copy of jQuery, all of which
takes place before document.ready(), where the (by then nonexistent)
plugin is finally called.
I would consider including the base jQuery file via a stub o
If this code is verbatim, then I would say it's because your $.post()
call does not include a "submit" param, which is what sendsuggest.php
is checking for in order to process the submission.
- jason
On May 16, 7:59 pm, riscphree <[EMAIL PROTECTED]> wrote:
> I've got a suggestion form that ins
without any element selected.
> So in your case, one of these two selectors seems to find nothing:
> $('.reqPC') $('.reqPA')
>
> Jörn
>
> On Fri, May 16, 2008 at 5:34 PM, Jason Huck <[EMAIL PROTECTED]> wrote:
>
> > p.s., I was using a slig
p.s., I was using a slightly older version of the plugin, but updating
to the latest made no difference. The rest of the validation (and
there's quite a bit of it) is all working just fine.
- jason
On May 16, 11:09 am, Jason Huck <[EMAIL PROTECTED]> wrote:
> I'm using Jörn
I'm using Jörn's awesome Validate plugin and have accidentally broken
something.
I have two radio buttons in a fieldset like so:
Stuff
Other Stuff
They are inside this form:
Depending on which of these radio buttons is checked, certain other
fields are required. So, in addition to the ma
Yes, .resize():
http://cachefile.net/scripts/jquery/1.2.3/
jquery-1.2.3.min.js">
$(function(){
$(window).resize(function(){
alert('You resized the window!');
Here's an example I put together for someone a while back:
http://devblog.jasonhuck.com/assets/infiniteformrows.html
HTH,
Jason
On May 15, 3:13 pm, Spencer <[EMAIL PROTECTED]> wrote:
> I'm trying to create an order form where the user starts out with a
> single row of form inputs for enterin
Use .is():
$('element').is('h1');
- jason
On May 14, 4:27 pm, 703designs <[EMAIL PROTECTED]> wrote:
> I want to check if a parent element is . How do I do that? The
> best I know of now is to add a class to these and test hasClass() for
> it.
You're pretty close, but you don't need *both* $.post() and .load().
Just pick one or the other. Using .load() is a little bit simpler, but
I believe it uses GET behind the scenes:
$(function(){
$('#yourbutton').click(function(){
$('#submit_result').load('test.php', { inp
Yes, here's one I wrote recently:
http://devblog.jasonhuck.com/2008/04/25/jquery-combo-select-redux/
HTH,
Jason
On May 8, 3:28 pm, Vivek <[EMAIL PROTECTED]> wrote:
> Hi Guys,
>
> i am looking for an functionality in jquery. some thing like this
> one.
>
> Sometimes we see two big text boxes
In this case, the simplest thing is probably to use .find() to
"discover" the new element, i.e.:
$(this)
.after('')
.parent()
.find('input.focusClear')
.focus(function(){
$(this).val('');
});
- jason
On May 1, 8:07 pm, jquertil <[EMAIL PROTECTED]> wrote:
> Hello.
All you should need to do is break the chain, since 'this' will still
refer to the label until you're inside another function, making the
call to .next() superfluous anyway. However, stuffing the id of the
input you want to select into its own variable might be a tiny bit
easier to read.
Try this
Twitter posts (or "tweets") are limited to 140 characters, so they're
not going to replace full-fledged announcements. Rather, most of the
time, they'll just be headlines with a URL which points to...you
guessed it...the plugin repository, the main site, this list, various
blogs, etc.
So, I would
$('ul').children().size();
- jason
On Apr 30, 2:58 am, Ray Mckoy <[EMAIL PROTECTED]> wrote:
> Hi all.
> Can i know the number of li in a ul with jquery?.
>
> Thank you all.
You could do something like this (needs a bit of tweaking):
http://cachefile.net/scripts/jquery/1.2.3/
jquery-1.2.3.min.js">
$(function(){
$('#sample').keyup(function(){
You're pushing the value from each div into a generic array instead of
the "elements" array, and adding a comma after each item as if you are
concatenating a string. Also, you have a dollar sign in front of your
alert().
Try something like this instead:
$('.button').click(function(){
var
Any of these should do the trick:
$('#inp').parent().parent().find('td').size();
$('#inp').parents('tr').find('td').size();
$('#inp').parents('tr').children().size();
$('#inp').parent().siblings().size() + 1;
- jason
On Apr 1, 6:13 am, Emil Zegers <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I hav
You're not doing anything in your code to remove the original click
event. To make it work this way, you'd need to make a single recursive
function using .unbind() to remove the first click event, add the
second, and then on the second click, remove the second click and call
itself again to re-bin
Try this:
$('#elHombre').next('form').children('input select textarea')
[0].focus();
- jason
On Mar 27, 6:32 am, "Dug Falby" <[EMAIL PROTECTED]> wrote:
> Hi guys,
>
> I've got:
>
> $('#elHombre').focus();
>
> Which sets focus to a legend at the top of a form.
>
> I'd like to do:
>
> $('#elHom
Here is one way to do it based on the markup you've shown:
div { display: none; }
#no-1 { display: block; }
http://cachefile.net/scripts/jquery/1.2.3/
jquery-1.2.3.min.js">
Hi all,
I'm trying to finish up a little plugin to create a sortable combo-
select input from a single select input. It works great in Firefox,
Safari, and Opera, but in IE (any version), every time you move an
option, the select inputs decrease in width, until they completely
disappear. It looks
Oh, duh. You mean whatever their last selection was prior to the
change. Sorry!
Can you pop each successful update into a global var, and then restore
from that when they cancel?
- jason
On Mar 24, 6:22 pm, Ashley <[EMAIL PROTECTED]> wrote:
> On Mar 24, 3:08 pm, Jason Huck <[EMA
If your first element has an empty value attribute, you can
do this:
$('select').change(function(){
alert($(this).val());
$(this).val('');
});
- jason
On Mar 24, 2:16 pm, Ashley <[EMAIL PROTECTED]> wrote:
> I have a select which pops a modal (with blockUI) input when a sele
You want to place each subsequent effect within the "callback"
function of the previous effect, i.e.:
$('YOUR_ITEM').EFFECT1(function(){
$(this).EFFECT2(function(){
$(this).EFFECT3(function(){
...and so on...
});
});
});
- jason
On Mar 24, 12:25 pm, Steve
I think you're looking for .add(). Try this:
var childElmts = $('#P30_DESKTOP_ADD, label[for="P30_DESKTOP_ADD"]');
if(prntElmtID != 'P30_DESKTOP') childElmts.add(
$('#P30_LT_OPTIONS').parent('td').children()
);
- jason
On Mar 24, 11:43 am, Dan M <[EMAIL PROTECTED]> wrote:
> Hello al
Either change your selectors to use an ID:
$('#expandable p')...
OR, change your div to use a class:
...
So, right now you have this:
$('div.expandable p')...
...
...
But you need either this:
$('div.expandable p')...
...
...
...or this:
$('#expandable p')...
...
...
- jason
On Mar
I would suggest that you show/hide the unordered lists, rather than
the anchors within them. This is most likely why what you're trying
didn't work: you've hidden the elements, but you've targeted the
elements for the .slideDown(). Also, if you use .slideToggle(),
you get .slideup and .slideDown
Have you tried .append()? This test page works for me in Firefox 3.0b3/
Mac. I haven't tested it in anything else:
http://cachefile.net/scripts/jquery/1.2.3/
jquery-1.2.3.min.js">
var inputcount = 0;
ake a distinction between class="cl1
> cl2" and class="cl1" to handle it differently.
>
> Maybe someone has an idea.
>
> Johannes
>
> On 9 Mrz., 17:01, Jason Huck <[EMAIL PROTECTED]> wrote:
>
> > This _should_ work (untested):
>
> > $(
This _should_ work (untested):
$('table.cl1.cl2').addClass('abc');
- jason
On Mar 9, 11:29 am, Johannes Theile <[EMAIL PROTECTED]> wrote:
> Hi,
> I have a page where I cannot change the XHTML code. This page contains
> two tables. The classes of the tables are as following:
>
> Table 1:
Have you tried using !important?
direction: rtl !important;
...always worth a shot, especially when not all of the CSS is under
your direct control...
- jason
On Mar 8, 6:07 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> Yes, i meant dir for html tags, direction for css respectively.
Funny you should ask. I had the same need recently, and couldn't find
exactly what I was looking for, so I rolled my own. I discuss the
basic left/right combo-select-box part here:
http://devblog.jasonhuck.com/2008/03/08/combo-select-boxes-in-jquery/
As for the auto-complete part, I used the Pen
45 matches
Mail list logo