Livequery and other event delegation techniques are cool, but, in a
matter of simplicity
pschwei1 , why don't you try the jQuery toggle event? I think it will
definitely work for this case.
http://docs.jquery.com/Events/toggle#fnfn2fn3.2Cfn4.2C...
On Dec 22, 2:34 pm, Dave Methvin
Right - .each() is still being called internally. You'd need to bind
the event to a parent element.
On Dec 22, 7:24 pm, Kean shenan...@gmail.com wrote:
dbzz, IMO, your code still add a listener to each of the .headline
var txt = $('.article-text');
var $hl = $('.headline');
Cam Spiers,
thank you very much,
i adapted your really helpfull example and solved it like this:
function clickOnTableRow() {
var row = jQuery(this);
var songUrl =
row.children(td.hidden_url_field_for_track_list).text
();
// do other
try this, it accounts for checking all the required fields to see if
they are blank and disable
jQuery(function(){
// all the required text fields
var $required = $('input.required:text');
// function checks for blank input
var isBlank = function(str) {
var checkAllRequired = function () {
var allFilled = true;
$required.each(function() {
if (isBlank(this.value))
allFilled = false;
});
return allFilled;
}
can
I would like to put a negative margin on the hover of the LI's in a
superfish jQuery menu on a vertical menu. When I do this, in IE on
the hover, the elements go below the rest of the menu. It's fine in
Firefox.
Here's my starting code:
/*** adding sf-vertical in addition to sf-menu creates a
$('input:text.required').each(function() {
var val = (this.value.length);
if (val == 0)
{ $('#submit').attr('disabled', 'disabled'); }
});
I think this is equivalent to:
if ( $(':text.required[value=]').length )
Hi,
this code return function list:
var o = {}
for (v in $) {
o[v] = $[v];
var Typeof = typeof $[v];
$('divspan'+Typeof+' /spanspan '+v+'
/span/div').appendTo('body');
}
How to return option list for each class above?
thanks
Dirceu Barquette
If the ads are fixed in size, define an iframe of that size and have
that iframe reference a small html file that includes the ad site
javascript. That way the page can continue to load while the ad
scripts are running.
sorry,
I think this is better code for the eg:
var Typeof = {};
for (v in $) {
Typeof[v] = typeof $[v];
$('divspan'+Typeof[v]+' /spanspan '+v+'
/span/div').appendTo('body');
}
But, how to list parameters [and,or] options for each function?
thanks again!!
Dirceu Barquette
2008/12/23
Thanks, Kean and Dave, for your code suggestions and feedback.
And, Dave...yes, I would have preferred, actually, to use Jorn's
validation plug-in, but could not figure out a way to cause
it to validate on blur. Jorn has set up the default validation
to occur after a form is submitted, but I
I'm looking into ways to manipulate Javascript objects using jQuery,
and I was wondering if there's anything I can do with the selectors
when passing an object to jQuery.
For example,
$({
obj1: {
name: a,
prop: x
},
obj2: {
name: b,
prop: y
},
obj3: {
name: c,
prop: z
}
}).filter('[name=a]');
or simply $('#slide-images li:gt(0)').hide();
Later on you can get the last one with $('#slide-images li:last') (or
last-child), or cache the collection.
On Dec 22, 8:25 pm, Dave Methvin dave.meth...@gmail.com wrote:
Untested, but I think this does it:
function init(){
LastPic =
I found out I can do:
var data = {};
data.x = {
a: [],
b: [],
c: [],
d: [],
e: []
}
data.x.a.push({
name: foo,
num: 0
});
data.x.a.push({
name: foo2,
num: 0
});
$(data.x.a).filter('[num=0]')
or
How can this:
// all the required text fields
var $required = $('input.required:text');
be expanded to include 'input.required:select' ?
I tried all the variations I could think of, including:
$('input.required:text', 'input.required:select')
but that, and every other
From http://docs.jquery.com/Selectors (Forms section):
:input
Matches all input, textarea, select and button elements.
To select all Form elements with a required class:
$(':input.required')
Karl Rudd
On Tue, Dec 23, 2008 at 2:39 PM, Rick Faircloth
r...@whitestonemedia.com wrote:
How can
D'oh! I can't believe it was that simple!
And I read everything I could find, including the docs on selectors.
(Should have read it twice, I guess...)
Anyway, question, Karl, et al...
How can I validate a select input?
I've tried setting the default select value to
which I thought would be
I have a script that dynamically detects the size (using outerwidth
and outerheight) of a div tag that I use as my modal window. It
works on all pages of my site except this page:
http://www.lacopts.org/dbase/register.php
where it erroneously displays the container height, eventhough it is
For the life of me I cannot get this to work:
Jquery 1.2.6
and ui 1.6r2 and tried with 1.5.3 stable
$('input.tdate').datepicker({onSelect:function(dateText){alert
(dateText);} });
Keeps throwing when calendar date is clicked:
inst is undefined
_get()()jquery-u3.min.js (line 198)
Not quite sure what you're asking. Why would you try to set the
select's value? The select gets it's value from the selected child
option.
My advice would be to use the Jorn's plugin (
http://docs.jquery.com/Plugins/Validation ). From what I can see it
seems to do validation on blur by default.
I tried to hide the div id=divarea using the toggle() function below.
javascript code
script type=text/javascript
$(document).ready(function() {
$(#dropdown).click(function() {
$(#divarea).toggle();
});
});
/script
html code
p
select id=dropdown
The select gets it's value from the selected child option.
Perhaps that's why I can't get validation to work!
My advice would be to use the Jorn's plugin
Believe me, I've tried.
I worked with it every way I could think of to disable
the default onSubmit event and cause validation only
Have a look at the validate method (
http://docs.jquery.com/Plugins/Validation/validate )
According to the documentation to suppress validation on submission
all you need to do is:
$('form').validate({
onsubmit: false
});
Note: I've never used the plugin before, so this is all untested.
OK, so if I try using that to set my banner, I come up with something
like this:
var img = {
'/ops/content/services': 'banner2.jpg',
'/ops/content/services': 'banner3.jpg',
}[location.pathname] || 'banner1.jpg';
$(td#header).css(background,url(/ops/sites/all/themes/
Yeah, I've read that a dozen times...
Here's what I've got that I can't make work:
script type=text/javascript
$(document).ready(function() {
$('#add-rental-property-form').validate({
errorPlacement: function(error, element) {
Steve, now I'm really confused. Does it work like a charm, or do you keep
getting an error? (Or both?) :-)
BTW, you can write $(td#header) as just $(#header) and it may actually
be faster because it will use a direct document.getElementById() lookup.
Also, just a suggestion, if you get in the
I have a script that dynamically detects the size (using outerwidth
and outerheight) of a div tag that I use as my modal window. It
works on all pages of my site except this page:
http://www.lacopts.org/dbase/register.php
where it erroneously displays the container height, eventhough it is
Is there a way to extract the text of all the items included in a
dropdown menu, into an array?
Thanks in advance to all for any info.
Please, can someone inform me if it is possible to have individual
html links for each date in datepicker.
On Dec 22, 7:42 pm, sabastian sabastiangron...@yahoo.com wrote:
For instance if someone chooses 5/5/09 in datepicker I would like them
to be linked to one html page. In contrast, if
101 - 129 of 129 matches
Mail list logo