On Apr 1, 1:39 pm, JMan jbeck...@gmail.com 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
This line is the likely culprit, because the css selector is not
specific to an individual select 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,
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 be,
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
$(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:
table
tr class=tableRowtd/tdtd/tdtddivBlah
divinput=checkbox id=mycheckname_4343/div/div/td
tr
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
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
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 is
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 taking the
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
I've tried several, but always come back to Twitterific:
http://iconfactory.com/software/twitterrific
- jason
(http://twitter.com/easykill)
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 already been declared and not override itself if it was.
On May 18, 7:42 pm, Jason Huck [EMAIL PROTECTED
I'm using Jörn's awesome Validate plugin and have accidentally broken
something.
I have two radio buttons in a fieldset like so:
fieldset id=meta26group
input id=meta26_3 class=required digits type=radio value=3
name=meta26/
label for=meta26_3Stuff/labelbr/
input id=meta26_5 class=required
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's awesome Validate
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 slightly older version of the plugin, but updating
to the latest made no difference. The rest
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 inserts
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 entering
Yes, .resize():
html
head
script
type=text/javascript
src=http://cachefile.net/scripts/jquery/1.2.3/
jquery-1.2.3.min.js
/script
script type=text/javascript
$(function(){
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:
script type=text/javascript
$(function(){
$('#yourbutton').click(function(){
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 with
In this case, the simplest thing is probably to use .find() to
discover the new element, i.e.:
$(this)
.after('input type=text name=symptom value=Enter Symptom
class=focusClear /')
.parent()
.find('input.focusClear')
.focus(function(){
$(this).val('');
});
- jason
$('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.
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
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
You could do something like this (needs a bit of tweaking):
html
head
script
type=text/javascript
src=http://cachefile.net/scripts/jquery/1.2.3/
jquery-1.2.3.min.js
/script
script
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 have
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
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:
Here is one way to do it based on the markup you've shown:
html
head
style type=text/css
div { display: none; }
#no-1 { display: block; }
/style
script
type=text/javascript
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 all,
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
If your first option 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
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 [EMAIL PROTECTED
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
Either change your selectors to use an ID:
$('#expandable p')...
OR, change your div to use a class:
div class=expandable...
So, right now you have this:
$('div.expandable p')...
...
div id=expandable...
But you need either this:
$('div.expandable p')...
...
div class=expandable...
...or
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: table
I do the same for Table 2:
$('table.cl1').addClass('xyz');
xyz is also added to Table 1.
So I'm looking for something to make 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
Have you tried .append()? This test page works for me in Firefox 3.0b3/
Mac. I haven't tested it in anything else:
html
head
script
type=text/javascript
src=http://cachefile.net/scripts/jquery/1.2.3/
jquery-1.2.3.min.js
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 a elements, but you've targeted the
ul elements for the .slideDown(). Also, if you use .slideToggle(),
you get .slideup and
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
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.
43 matches
Mail list logo