Firebug points out the following:
1-) There is a missing (
$(#test).click(function) {
should be:
$(#test).click(function () {
2-) and say more:
$detais is not defined.
Fix these issues
Regards
Maurício
-Mensagem Original-
De: T.J. Simmons
Para: jQuery (English)
Enviada
This isn't a jQuery issue.
This is a CSS issue.
Add the following:
table.blog {float:left;}
#footer {clear:both;}
Regards
Maurício
-Mensagem Original-
De: luciano991
Para: jQuery (English)
Enviada em: quinta-feira, 10 de dezembro de 2009 16:20
Assunto: [jQuery] Superfish -
Try this:
( $('.location div:visible').length == 0 ) ? $('.location').hide() : '';
Maurício
De: wandrian
Para: jQuery (English)
Enviada em: segunda-feira, 7 de dezembro de 2009 23:21
Assunto: [jQuery] Filtering on hidden contents
I am trying to figure out if all the child divs of
Hi Jared
The script is quite simply.
Study it.
jQuery:
(document).ready(function(){
$('#thumbs div').click(function() {
$(this).find('img').css('opacity', 1);
$(this).siblings().find('img').css('opacity', 0.5);
});
});
HTML:
div id=thumbs
diva href=#img src=1.jpg alt= //a/div
diva
Yes there is.
Query the event.target and do an if conditional like so:
$(tr).click(function(e) {
// normalize e.target
if (!e) var e = window.event;
var tg = (window.event) ? e.srcElement : e.target;
if ( tg.nodeName != INPUT ) {
alert($(this).attr(id));
} else {
//do
Thank you Scott
Maurício
-Mensagem Original-
De: Scott Sauyet
Para: jQuery (English)
Enviada em: quarta-feira, 2 de dezembro de 2009 20:28
Assunto: [jQuery] Re: Ignoring click events in cells
On Dec 2, 5:20 pm, Mauricio \(Maujor\) Samy Silva
css.mau...@gmail.com wrote
Try this:
$('a.filter').click(function(){
$(this).parent().siblings('li').removeClass('active');
$(this).parent('li').addClass('active');
});
Maurício
-Mensagem Original-
De: Charlie
Para: jquery-en@googlegroups.com
Enviada em: domingo, 29 de novembro de 2009 03:56
jQuery 1.3 version introduces an event method called live() that resolves this
issue.
Sice that version you don't need the *livequery plugin* never more.
See: http://docs.jquery.com/Events/live
Regards
Maurício
-Mensagem Original-
De: Sala
Para: jQuery (English)
Enviada em:
I've provided a possible solution. It is hosted at:
http://jsbin.com/avowa/
http://jsbin.com/avowa/edit
Maurício
-Mensagem Original-
De: Anush Shetty
Para: jquery-en@googlegroups.com
Enviada em: terça-feira, 25 de agosto de 2009 08:39
Assunto: [jQuery] Converting rows into
Sintax for the selector is:
$('img[style=overflow: auto; width: 356px; height: 100px;]')
Maurício
-Mensagem Original-
De: John
Para: jQuery (English)
Enviada em: terça-feira, 25 de agosto de 2009 14:36
Assunto: [jQuery] jQuery selector for style attribute
Hi,
I want
When you remove a floated element from the flow of a document its position is
occupied by the next float and this
causes the ruin! To preserve the space leaving by a removed div how about use:
css('visibility', 'hidden'); istead of show()
Maurício
-Mensagem Original-
De: simusch
jQuery is JavaScript!
Use the regular JavaScript sintax
Maurício
-Mensagem Original-
De: shaf
Para: jQuery (English)
Enviada em: sábado, 15 de agosto de 2009 17:36
Assunto: [jQuery] Timeout
Hi Guys
How do I set a timeout in jquery ? E.g. if a page is inactive for 20
var fAlt = $('.foo').attr('alt');
should be:
var fAlt = $('.foo a img').attr('alt');
or better
var fAlt = $(this).attr('alt');
Maurício
-Mensagem Original-
De: Benn
Para: jQuery (English)
Enviada em: sexta-feira, 14 de agosto de 2009 18:37
Assunto: [jQuery] Re: Change the
There is nothing wrong with your code.
Have a look at this testcase:
http://jsbin.com/igubi
http://jsbin.com/igubi/edit
Maurício
-Mensagem Original-
De: littlerobothead
Para: jQuery (English)
Enviada em: quinta-feira, 13 de agosto de 2009 16:46
Assunto: [jQuery] Radio
$('td').click(function() {
context = $(this).parents('table')[0];
var cells = $('td.a', context);
})
Maurício
-Mensagem Original-
De: Brad
Para: jQuery (English)
Enviada em: segunda-feira, 13 de julho de 2009 16:39
Assunto: [jQuery] table cells selector question
I
$( 'h3 a, a', $(this) ).css('text-decoration', 'underline');
Maurício
-Mensagem Original-
De: Jacques Choquette - WhistlerGraphicDesign.com
Para: jQuery (English)
Enviada em: sexta-feira, 10 de julho de 2009 10:33
Assunto: [jQuery] Is there a more efficent way to write
Here it is returning 3 in IE and FireFox as expected.
Maurício
-Mensagem Original-
De: Chris
Para: jQuery (English)
Enviada em: sexta-feira, 10 de julho de 2009 12:34
Assunto: [jQuery] Simple selector problem
$(document).ready(function {
alert($(div).length);
...selecting the next .slide after the one with .current in it?
$('.current').next('.slide')
--
how can i get the div index of the .current class?
var divIndex = $('#slideshow div').index( $('.current') );
Maurício
I run a local test with your code here and it works fine!
Maurício
-Mensagem Original-
De: Shane Riley
Para: jQuery (English)
Enviada em: quinta-feira, 2 de julho de 2009 13:12
Assunto: [jQuery] Selector :eq(x) issuing warning in FF
When calling this jQuery:
I have the same slideToggle effect in two slightly differents scenarios.
Scenario #1 - There is a CSS rule setting with:700px for the whole scenario.
Scenario #2 - There isn't a CSS rule for the width, so it defaults to 100%
width.
Issue: In scenario #2 all works fine. But, in scenario #1 the
[1] http://jqueryfordesigners.com/animation-jump-quick-tip/
Regards
Maurício
-Mensagem Original-
De: Alexandre Magno
Para: jQuery (English)
Enviada em: sexta-feira, 26 de junho de 2009 14:43
Assunto: [jQuery] Re: slideToggle jump issue
Hello Maujor,
First of all, I'm
Add the following to your script:
if ( $(this).is(':checked') ) {
$('#CheckAll').html('Uncheck All');
} else {
$('#CheckAll').html('Check All');
}
Maurício
-Mensagem Original-
De: evanbu...@gmail.com
Para: jQuery (English)
Enviada em: quinta-feira,
The following block of code isn't working:
newo.find('.remove').click(function () {
newo.remove();
alert('hel');
});
It should be:
$('.remove').click(function () {
$(this).parents('tr').remove();
});
Addicionaly check the sintaxe for:
.item :last
should be:
.item:last (without a blank space
$('tr td:first-child').attr('align', 'value_here');
Maurício
-Mensagem Original-
De: roxstyle
Para: jQuery (English)
Enviada em: quarta-feira, 24 de junho de 2009 14:17
Assunto: [jQuery] show/hide positioned to its trigger
i am trying to learn how to position a show/hide
Live example at: http://jsbin.com/ahiyo/
Edit at: http://jsbin.com/ahiyo/edit
Maurício
-Mensagem Original-
De: efet
Para: jQuery (English)
Enviada em: quarta-feira, 24 de junho de 2009 18:03
Assunto: [jQuery] multiply 2 input fields on change
Hi,
I have three input
I've hosted a live example for the effect at: http://jsbin.com/irera/
Edit it at: http://jsbin.com/irera/edit
Maurício
-Mensagem Original-
De: webguy262
Para: jquery-en@googlegroups.com
Enviada em: terça-feira, 23 de junho de 2009 09:37
Assunto: [jQuery] slide a div open
How about?
$('.buggybox').next('p').remove();
Maurício
-Mensagem Original-
De: Bruce MacKay
Para: jquery-en@googlegroups.com
Enviada em: sábado, 20 de junho de 2009 08:20
Assunto: [jQuery] Removing an emptied paragraph from the DOM
Hello folks,
I have an application
Please:
1-) Wrap Show within a span element.
2-) Get rid of the style atributte for the ul. ul's are block level elements by
default.
div class=showhide
spanShow/span
ul class=clients
li/li
...
3-) And here goes the code;
$(.showhide).click(function() {
Try:
$(this).parent().next().toggle();
Maurício
-Mensagem Original-
De: FrenchiINLA
Para: jQuery (English)
Enviada em: quarta-feira, 17 de junho de 2009 18:16
Assunto: [jQuery] First Parent Siblings
I have several following html code:
h3a class=classa/a/h3div
I am not sure on what are you trying to do, but
alert($(#ulList .liEven:first).attr(class)); /* Returns Success*/
Maurício
-Mensagem Original-
De: Dave
Para: jQuery (English)
Enviada em: terça-feira, 16 de junho de 2009 09:57
Assunto: [jQuery] Get first element when there
According jQuery documentation [1][2]
:eq returns Array Element and eq() returns one jQuery object.
What does means Array Element? It is a single element?
By the other hand eq() = Reduce the set of matched elements to a single
element.
So, both returns a single element and it seems to me that
can match a set of elements then select, for
example, the third one
$('.myclass,#myid').eq(2)
I didn't use the traversing method but i think that is one of possible usage
Pierre
2009/6/10 Maujor css.mau...@gmail.com
According jQuery documentation [1][2]
:eq returns Array
$(document).ready(function(){
var string = $.trim( $('label').text() )
var lastIndex = string.length - 1
if ( string.charAt(lastIndex) == F ) {
alert('BINGO!')
} else {
alert('FAIL!')
}
});
Maurício
-Mensagem Original-
De: ldexterldesign
Para: jQuery
Why not use a class instead of an id in order to target all buttons?
Or alternatively something like:
$('img[alt=button]').hover(
function () {
$(this).fadeTo('fast', .10);
},
function () {
$(this).fadeTo('fast', 1.0);
}
);
Maurício
-Mensagem
1-) The dirty way:
$('ul li a').removeAttr('href')
2-) A standard way:
image = [];
$('ul li a img').each(function(i) {
image[i] = $(this).clone();
$(this).parents('li').html(image[i]);
})
Maurício
On Tue, Jun 9, 2009 at 2:13 PM, alex alex_bille...@hotmail.com wrote:
Hi folks
$('#mynav li.current').prev().css('blackground', 'black');
Maurício
-Mensagem Original-
De: Alex
Para: jQuery (English)
Enviada em: segunda-feira, 8 de junho de 2009 20:04
Assunto: [jQuery] Selecting previous element
How do I apply a class to the previous element that's
Set in options:
dateFormat: mm dd yy
Maurício
-Mensagem Original-
De: Bluesapphire
Para: jQuery (English)
Enviada em: sexta-feira, 5 de junho de 2009 12:04
Assunto: [jQuery] JQuery DatePicker Plugin
Hi!
Iam using JQuery DatePicker Plugin , created by Kelvin Luck
There isn't in HTML Specs a true value for checked attribute.
Try:
$(input:checkbox).attr(checked, checked);
Maurício
-Mensagem Original-
De: matt
Para: jQuery (English)
Enviada em: quinta-feira, 4 de junho de 2009 18:12
Assunto: [jQuery] Selectors only matching first element
seem to work either. The div
example from the page should work as it was copied directly, but it
doesn't. This is bizarre.
If it helps, I have the tablesorter, validate and maybe even UI
plugins set up here as well.. could one of them be interfering?
On Jun 4, 6:26 pm, Mauricio \(Maujor
-Mensagem Original-
De: Dave Maharaj :: WidePixels.com
Para: jquery-en@googlegroups.com
Enviada em: quinta-feira, 4 de junho de 2009 21:43
Assunto: [jQuery] Selector not question
I am trying to disable all links except for the one clicked.
$('a[class^=edit_]:not(.' + e + ')').fadeTo('slow' , 0.25 , function() {
...
}
Maurício
-Mensagem Original-
De: Dave Maharaj :: WidePixels.com
Para: jquery-en@googlegroups.com
Enviada em: quinta-feira, 4 de junho de 2009 21:43
Assunto: [jQuery] Selector not question
I am
On Wed, Jun 3, 2009 at 11:20 AM, BigAB adamlbarr...@gmail.com wrote:
have you tried
var myText = $('#knowndiv').parents('tr').find('td:first').text();
alert(myText);
The TR is really the parent of the TDs, not the table.
For information only.
I've used parents() not parent().
parents()
Use
$('ul#sidebarmenu1 ul li:last-child a').css('background-image', 'none');
:last = Matches ONLY the last selected element.
last-child = Matches ALL elements that are the last child of their parent.
Maurício
-Mensagem Original-
De: josb...@gmail.com
Para: jQuery (English)
Reset the opacity to IE when fading in the element like so:
-Mensagem Original-
De: Luch Univision
Para: jQuery (English)
Enviada em: terça-feira, 2 de junho de 2009 14:46
Assunto: [jQuery] fadeIn() on elements with alpha filter not working properly
in IE
I am running
Sorry for the previous post.Hit send early :-(
Reset the opacity to IE when fading in the element like so:
$('elementToFade').css('filter','alpha(opacity=80)').fadeIn();
Maurício
-Mensagem Original-
De: Luch Univision
Para: jQuery (English)
Enviada em: terça-feira, 2
Yes, it appear to be a 1.3.2 jQuery version bug.
Take a look at test cases:
Version 1.3.1 working: http://jsbin.com/usidi/edit
Version 1.3.2 doesn't working: http://jsbin.com/upapu/edit
Maurício
-Mensagem Original-
De: Jakub Suder
Para: jQuery (English)
Enviada em:
It does. It returns b and d as expected!
Try:
$('p ~ p').css('color', 'red')
and b and d will be red
Maurício
-Mensagem Original-
De: Jakub Suder
Para: jQuery (English)
Hi,
I...
html
headscript src=http://code.jquery.com/jquery-latest.js;/
script/head
body
: tilde (~) selector
On 29 Maj, 16:10, Mauricio \(Maujor\) Samy Silva
css.mau...@gmail.com wrote:
It does. It returns b and d as expected!
Try:
$('p ~ p').css('color', 'red')
and b and d will be red
I've just noticed that it works in Safari (4 beta), but not in Firefox
(3
And the complement to $('foo').is() is !$('foo').is()
Maurício
-Mensagem Original-
De: Richard D. Worth
.is() and .not() are not complementary. See:
http://docs.jquery.com/Traversing/is#expr
is( expr )Returns: Boolean
Checks the current selection against an
Try:
...
var selector = $('#selectList');
selector.change(function() {
var directory = $('option[selected]').text(); // if you want get the option text
or
var directory = $('option[selected]').attr('id'); // if you want get the option
id
...
-Mensagem Original-
De: Y vd Bogert
Try:
$('h5').nextAll('p');
Maurício
-Mensagem Original-
De: Andy
Para: jQuery (English)
Enviada em: quarta-feira, 27 de maio de 2009 14:11
Assunto: [jQuery] selecting next()'s until I reach a tag
Is there a way for me to add the next several blocks until I get to a
Thanks for the suggestion!
That sort of works, but it's also getting the p tags AFTER the next
H5, and I don't want it to.
On May 27, 1:24 pm, Mauricio \(Maujor\) Samy Silva
css.mau...@gmail.com wrote:
Try:
$('h5').nextAll('p');
Maurício
Or... you could use a shorter selector
var checked = $(':checkbox:checked').length;
-Mensagem Original-
De: Macsig
Para: jQuery (English)
Thanks for your help.
I appreciate it
On May 26, 2:44 pm, James james.gp@gmail.com wrote:
var checked =
Would you please provide a sample for your HTML markup?
Maurício
-Mensagem Original-
De: Dave Maharaj :: WidePixels.com
Not working in IE at all. Works in FF but noting in IE 5.5 to 7
$('#resume_education dl:first').addClass('first_entry');
-Mensagem Original-
De: Connor con...@letsbeglobal.com
...
item
content:encoded![CDATA[p
Some text
/p
]]/content:encoded
/item
How would I go about targeting the p tag or the content inside?
---
Try:
Awesome, Mauricio had the right solution. I had figured that e was
working on the link, but now that I think about it, that makes no
sense. So that works, now I have to figure out how to inject the
incoming html, because apparently that's not working, just not sure
yet if it's my javascript or
De: Arak Tai'Roth nielsen.dus...@gmail.com
Okay, so correction, I got it, it was a dumb mistake, makes me thing I
should go back to high school to learn how to spell.
Anyways, while I'm here, is there anyway I can force the callback
function beforeSend to run for a certain amount of seconds
-Mensagem Original-
De: Arak Tai'Roth nielsen.dus...@gmail.com
... Here is my code:
$(document).ready(function(){
$('#events_box a.ajax_replace').click(function(e){
e.preventDefault();
$('.news_border').slideUp('slow');
$.ajax({
method: 'get',
url: e.attr('href'),
data: { 'do' :
Hi!
I'm trying to setup an ajax call which throws an error on timeout.
...
timeout: 1,
error: function(d,msg) {
alert(Could not load stuff);
},
...
This works, but the error is never thrown. If I change the URL to
something that's broken, I do get the error message, but on
A timeout is not considered an error.
No. It's an error.
Do the following:
timeout: 1,
error: function(d,msg) {
if (msg==timeout) {
alert(Ops! Could not load stuff - A timedout error occur);
} else {
alert(Could not load stuff - Another errorType occur);
},
I got 10 links on a site, all with the class collapsible.
jQuery:
$(document).ready(function(){
$('.collapsible').click(function() {
var indexLink = $('.collapsible').index(this);
var nClicked = indexLink + 1;
alert(nClicked);
});
});
HTML
a href=# class=collapsible1/a
a href=#
Thanks Ken
Now I get it!
Maurício
-Mensagem Original-
De: ken jqu...@kenman.net
Para: jQuery (English) jquery-en@googlegroups.com
Enviada em: quarta-feira, 8 de abril de 2009 18:10
Assunto: [jQuery] Re: Delay for $get.Script() callback function
Might be a little late, but... you
I have had setup the following:
$.ajaxSetup({
dataType: 'xml',
error: function(xhr) {
$('#error_msg').html('pError ' + xhr.status + ' - ' + xhr.statusText +
'/p')
})
Now I want make one call to a HTML document.
So I state:
$.get('uzudo',
function(data) {
var $el = xx.is('h2'); //if it indeed matches a h2, returns true?
var el = $('#continer *:first').is('h2');
alert(el); // returns true if first child is H2, false otherwise.
Maurício
Is there a missed closing braket and a double quotes after bgChangerAnchor?
$(*[id^='bgChangerAnchor').click(function () {
De: Nic Hubbard nnhubb...@gmail.com
I am confused why the following is returning undefined:
alert($(this + input[type='submit']).attr('id'));
Try the following:
Get rid of the blank space before input.
from: ... input[type='submit'] ...
to: ... input[type='submit'] ...
Regards,
$(#world tr).click(function() {
// do stuffs
});
Is there a way to prevent the above event from triggering when the
hello button is clicked?
$(#world tr).click(function() {
$('input[name=hello]').attr('disabled',
I want to get the last a in the _sub_ list. Here is what I've tried
with no success. Ideas?
$('.list li li:last a').addClass('last-li');
$('.list li ul li:last a').addClass('last-li');
$('.list li:has(ul) li:last a').addClass('last-li');
-
$('.wrapper').height = '1000px';
and that will not work, because we don't have $('.wrapper') in working
what should I do, to accomplish the desirable result?
$('.wrapper').css('height', '1000px');
Maurício
Is there any major problems you're aware of with this kind of dom
pollution that have a negative impact on ease or performance?
My thoughts:
Firstly: Validate!
But I think that negative impact on whatever isn't the point.
Suppose:
Option 1 - font size=7bHeading level 1/font/b
Option 2 -
Right, but the problems with that approach is inefficiency. It's more
efficient to grab the entire set of elements via $('.event-phase') and
comparing their rel attribute than it is to throw a loop around $
('.event-phase-' + i);
I think it depends upon the context.
If the loop is needed for
You're right. A quick look in the bug tracker turns up this ticket:
http://dev.jquery.com/ticket/1768
Karl Rudd
Tks Karl,
So, there are two questions I made to myself and I am unable to answer:
1-) Does $.getScript() is a
1-) For remote calls, even script exists, in case server is down the issue
arises.
2-) It will be great some advise from a member of jQuery team.
Maurício.
-
De: Karl Rudd karl.r...@gmail.com
Here's my thoughts:
1) It is
The documentation for $.getScript() function explicit says:
*If you load functions via getScript, make sure to call them after a delay.*
[1]
It is suppose that callback functions are always called after a request.
So, it is suppose too that this requeriment is valid for $.get(), $.post,
I have the following AJAX request.
$(document).ready(function() {
var iconLoading = $(' mini.gif ');
var pluginLoaded = $('Plugin ready');
var requestScript = function() {
$(iconLoading).insertAfter('#my_button');
However you could set a flag in the success/callback function. After
the getScript() call you could use a setTimeout to test for that flag
after a certain time. If the flag isn't set then the load didn't work
or took too long.
Karl Rudd
I am experimenting $.getScript() jQuery function.
There are tons of JSON public API's but I need find a public JavaScript
script.
I seached Google sure, but scripts found have their own request codes.
I need see that function in action and I want developer my own jQuery
request.
Does anyone can
Scenario:
My form have 3 controls filled with placeholders named *, * and Comente.
If user give focus to controls the placeholders vanishes and background
color changes.
Suppose user make a mistake in filling a control and submit the form.
AJAX return an error message and preserve the data
Hi Davi,
It is not allowed to have more than one div#tabs
ID's values must be unique in a document.
Regards,
Maurício
-Mensagem Original-
De: David omertacod...@gmail.com
Para: jQuery (English) jquery-en@googlegroups.com
Enviada em: domingo, 22 de março de 2009 09:55
Assunto:
I'm trying to display data from a json request into a table.
Table heading disapear when the request finishes and I can't figure out
how to fix it.
Test case is hosted at: http://tinyurl.com/couflx
TIA
Maurício
I'm trying to display data from a json request into a table.
Table heading disapear when the request finishes and I can't figure out
how to fix it.
Test case is hosted at: http://tinyurl.com/couflx
TIA
Maurício
--
View this message in context:
Hi Joseph,
Thanks, but this didn't solve.
Any ideas?
Maurício
-Mensagem Original-
De: Joseph Le Brech
Para: jquery-en@googlegroups.com
Enviada em: sábado, 21 de março de 2009 13:23
Assunto: [jQuery] Re: getJSON() response into a table
$.getJSON(url, function(json){
[SOLVED]
Maurício
-Mensagem Original-
De: Maujor css.mau...@gmail.com
Para: jquery-en@googlegroups.com
Enviada em: sábado, 21 de março de 2009 13:09
Assunto: [jQuery] getJSON() response into a table
I'm trying to display data from a json request into a table.
Table heading
Hi Josh and all
Many thanks for the useful tips. I appreciate it a lot.
As for Maruicio's question...Looks like you solved it. The link works
fine in FF.
Yes! I've solved it with a different aproach. I'll try yours ASAP.
-
3)
...if it's only broken for some IE 7 users and not for others.
And I am one of the others users, since the site looks perfectly fine on my
Brazilian-Portuguese version of IE7.
Maurício
-Mensagem Original-
De: Karl Swedberg
Para: jquery-en@googlegroups.com
Enviada em:
Try:
var contentDivHeight = parseInt($('#contentDiv').css('height'));
var calculatedHeight = contentDivHeight - 64 + px;
alert(contentDivHeight)
alert(calculatedHeight)
-Mensagem Original-
De: Jeremy Coulson jeremycoul...@gmail.com
Para: jQuery (English) jquery-en@googlegroups.com
It seems that you are trying to insert the content of an existent iframe (name
= iFrameName) into another empty iframe (id = myiFrame-content).
Is it? If so, do the following:
var content = $('iframe[name = iFrameName]').attr('src');
$('#myiFrame-content').attr('src', content);
Excuse me
How about use the widely ways to achieve this?
1-) Via CSS
Assign an ID to the body element for each page, like:
body id=home, body id=about, body id=contact
and an ID for each menu item like:
div id=menu
ul
li id=ho a href=default.aspxhome/a/li
li id=ab a href=about.aspxabout/a/li
What are the purpouses of nested forms?
Nested forms aren't allowed in HTML markup.
Maurício
-Mensagem Original-
De: Gordon grj.mc...@googlemail.com
Para: jQuery (English) jquery-en@googlegroups.com
Enviada em: sexta-feira, 27 de fevereiro de 2009 06:34
Assunto: [jQuery] Re: Form
Hi Pedro,
It is hard to figure out what you are trying to select without a look on the
HTML markup.
What does you mean with half of the elements i get with? It depends upon
the markup!
In nth-child(n) is n constant or inside a loop?
How about a sample of your markup and information about
Try this:
script type=text/javascript
$(document).ready(function(){
var ok = '';
$('button').click(function() {
$('#my_form input[type = checkbox]').each(function() {
if ( $(this).attr('checked') ) {ok = true}
})
ok ? alert('there is at least one checked') : alert('none checked');
});
});
Hi Alex,
1-) Doesn't work because * E F:first-child * pseudo-class selector matches the
F element that is the first child of the E element ONLY if there isn't another
element BEFORE the E element within the parent E. See specs at:
http://www.w3.org/TR/CSS2/selector.html#first-child
2-) If
Ops! my faul! sorry.
Previous post errata.
Read: ...BEFORE the F element ...
instead of: ...BEFORE the E element...
-Mensagem Original-
De: Mauricio (Maujor) Samy Silva
Para: jquery-en@googlegroups.com
Enviada em: quarta-feira, 25 de fevereiro de 2009 09:24
Assunto: Re
to explicitly be the first child.
I didnt even know that this syntax is CSS thing i thought it is jQuery's
syntax.
Thanks for pointing out to that website!
Question is:first :eq(n) also a CSS syntax?
Thanks again!
On Wed, Feb 25, 2009 at 11:29 PM, Mauricio (Maujor
You must re-bind the click event to the classes every time you change it.
Use the newest live () method added in 1.3 version of jQuery library [1].
$(document).ready(function() {
$('.large').live(click, function(){
...
and
$(document).ready(function() {
$('.small').live(click, function(){
Hi RadicalBender,
How about use the $('tr td:empty') selector to target the empties rows?
Not solve?
So,
need some more information to try figure out a solution.
Are there tbody, tfoot and thead in your table?
Where is located the tr#NoSongs?
Would you please show a simplified sample of the
background-color CSS property is well supported by IE and FF (Chrome not
tested)
So, double check your HTMl and CSS sintax.
Here an example working:
CSS:
#a { background-color:#A0; }
HTML
form
Select your favorite fruit:
select id=fruits
optionApple/option
option id=aOrange/option
TD is a TR children so use the CSS descendant selector tr td.
$(#tableid tbody tr td.someclass:contains('mytext'))).dosomething();
PS: mytext is a string and should be quoted.
Maurício
-Mensagem Original-
De: SteelRing steelr...@gmail.com
Para: jQuery (English)
There is nothing wrong with your jQuery code.
Double check the link to jQuery library and the HTML markup.
Try this example tested here:
style type=text/css media=all
.midget {background:red}
/style
script
src=http://ajax.googleapis.com/ajax/libs/jquery/1.3.1/jquery.min.js;/script
script
Liam,
Quoting the documentation:
It's important to note that jQuery.browser is still in jQuery - and will be
for the foreseeable future (too many plugins and pieces of code depend on
it).
Read the full section at:
http://docs.jquery.com/Release:jQuery_1.3#No_More_Browser_Sniffing
Maurício
1 - 100 of 183 matches
Mail list logo