Re: [jQuery] Re: Traversing Help

2009-12-10 Thread Mauricio (Maujor) Samy Silva
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

Re: [jQuery] Superfish - content out of position

2009-12-10 Thread Mauricio (Maujor) Samy Silva
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 -

Re: [jQuery] Filtering on hidden contents

2009-12-08 Thread Mauricio (Maujor) Samy Silva
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

Re: [jQuery] Change opacity for all divs except one

2009-12-05 Thread Mauricio (Maujor) Samy Silva
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

Re: [jQuery] Ignoring click events in cells

2009-12-02 Thread Mauricio (Maujor) Samy Silva
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

Re: [jQuery] Re: Ignoring click events in cells

2009-12-02 Thread Mauricio (Maujor) Samy Silva
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

Re: [jQuery] Selector Help

2009-11-29 Thread Mauricio (Maujor) Samy Silva
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

Re: [jQuery] Re: slideToggle stops working after refreshing content with Ajax

2009-11-29 Thread Mauricio (Maujor) Samy Silva
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:

[jQuery] Re: Converting rows into columns

2009-08-25 Thread Mauricio (Maujor) Samy Silva
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

[jQuery] Re: jQuery selector for style attribute

2009-08-25 Thread Mauricio (Maujor) Samy Silva
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

[jQuery] Re: hide divs with float:left and show them again

2009-08-20 Thread Mauricio (Maujor) Samy Silva
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] Re: Timeout

2009-08-15 Thread Mauricio (Maujor) Samy Silva
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

[jQuery] Re: Change the contents of a div after it has been created

2009-08-14 Thread Mauricio (Maujor) Samy Silva
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

[jQuery] Re: Radio button checked status

2009-08-13 Thread Mauricio (Maujor) Samy Silva
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

[jQuery] Re: table cells selector question

2009-07-13 Thread Mauricio (Maujor) Samy Silva
$('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

[jQuery] Re: Is there a more efficent way to write this script?

2009-07-10 Thread Mauricio (Maujor) Samy Silva
$( '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

[jQuery] Re: Simple selector problem

2009-07-10 Thread Mauricio (Maujor) Samy Silva
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);

[jQuery] Re: next index in Jquery

2009-07-03 Thread Mauricio (Maujor) Samy Silva
...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

[jQuery] Re: Selector :eq(x) issuing warning in FF

2009-07-02 Thread Mauricio (Maujor) Samy Silva
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:

[jQuery] Re: slideToggle jump issue

2009-06-26 Thread Mauricio (Maujor) Samy Silva
Hi Alexandre Thanks for your kindness reply Sorry but this isn't the well know padding - margin jump issue [1]. Have a closest look at the sources of my live examples and you will see, as I pointed out on my OP, that the issue comes from the widht. PS: The examples don't use paddings or margins

[jQuery] Re: Toggle Text

2009-06-25 Thread Mauricio (Maujor) Samy Silva
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,

[jQuery] Re: jquery adding and removing row

2009-06-25 Thread Mauricio (Maujor) Samy Silva
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

[jQuery] Re: show/hide positioned to its trigger

2009-06-24 Thread Mauricio (Maujor) Samy Silva
$('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

[jQuery] Re: multiply 2 input fields on change

2009-06-24 Thread Mauricio (Maujor) Samy Silva
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

[jQuery] Re: slide a div open and closed

2009-06-23 Thread Mauricio (Maujor) Samy Silva
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

[jQuery] Re: Removing an emptied paragraph from the DOM

2009-06-20 Thread Mauricio (Maujor) Samy Silva
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

[jQuery] Re: jQuery text toggle effect

2009-06-19 Thread Mauricio (Maujor) Samy Silva
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() {

[jQuery] Re: First Parent Siblings

2009-06-17 Thread Mauricio (Maujor) Samy Silva
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

[jQuery] Re: Get first element when there are multiple classes

2009-06-16 Thread Mauricio (Maujor) Samy Silva
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

[jQuery] Re: :eq versus eq()

2009-06-10 Thread Mauricio (Maujor) Samy Silva
Good point Pierre! Well noted. TKS. Any others possible differences? Maurício -Mensagem Original- De: Pierre Bellan Para: jquery-en@googlegroups.com Enviada em: quarta-feira, 10 de junho de 2009 13:25 Assunto: [jQuery] Re: :eq versus eq() With the traversing method, you

[jQuery] Re: Find text (nodes) within an element?

2009-06-10 Thread Mauricio (Maujor) Samy Silva
$(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

[jQuery] Re: same effect on multiple objects with same id

2009-06-09 Thread Mauricio (Maujor) Samy Silva
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

[jQuery] Re: Remove links but not images

2009-06-09 Thread Mauricio (Maujor) Samy Silva
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

[jQuery] Re: Selecting previous element

2009-06-08 Thread Mauricio (Maujor) Samy Silva
$('#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

[jQuery] Re: JQuery DatePicker Plugin

2009-06-05 Thread Mauricio (Maujor) Samy Silva
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

[jQuery] Re: Selectors only matching first element

2009-06-04 Thread Mauricio (Maujor) Samy Silva
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

[jQuery] Re: Selectors only matching first element

2009-06-04 Thread Mauricio (Maujor) Samy Silva
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

[jQuery] Re: Selector not question

2009-06-04 Thread Mauricio (Maujor) Samy Silva
-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.

[jQuery] Re: Selector not question

2009-06-04 Thread Mauricio (Maujor) Samy Silva
$('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

[jQuery] Re: text of first sibling of a parent...How do I get it

2009-06-03 Thread Mauricio (Maujor) Samy Silva
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()

[jQuery] Re: LI:last of submenu's

2009-06-02 Thread Mauricio (Maujor) Samy Silva
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)

[jQuery] Re: fadeIn() on elements with alpha filter not working properly in IE

2009-06-02 Thread Mauricio (Maujor) Samy Silva
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

[jQuery] Re: fadeIn() on elements with alpha filter not working properly in IE

2009-06-02 Thread Mauricio (Maujor) Samy Silva
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

[jQuery] Re: tilde (~) selector

2009-06-02 Thread Mauricio (Maujor) Samy Silva
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:

[jQuery] Re: tilde (~) selector

2009-05-29 Thread Mauricio (Maujor) Samy Silva
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

[jQuery] Re: tilde (~) selector

2009-05-29 Thread Mauricio (Maujor) Samy Silva
: 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

[jQuery] Re: not Filter

2009-05-28 Thread Mauricio (Maujor) Samy Silva
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

[jQuery] Re: $(#selectInput).val()

2009-05-28 Thread Mauricio (Maujor) Samy Silva
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

[jQuery] Re: selecting next()'s until I reach a tag

2009-05-27 Thread Mauricio (Maujor) Samy Silva
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

[jQuery] Re: selecting next()'s until I reach a tag

2009-05-27 Thread Mauricio (Maujor) Samy Silva
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

[jQuery] Re: number of checked boxes

2009-05-26 Thread Mauricio (Maujor) Samy Silva
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 =

[jQuery] Re: Apply or remove style - Not workingin IE versions

2009-05-24 Thread Mauricio (Maujor) Samy Silva
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');

[jQuery] Re: AJAX issue

2009-05-09 Thread Mauricio (Maujor) Samy Silva
-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:

[jQuery] Re: AJAX Problem

2009-05-08 Thread Mauricio (Maujor) Samy Silva
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

[jQuery] Re: AJAX Problem

2009-05-08 Thread Mauricio (Maujor) Samy Silva
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

[jQuery] Re: AJAX Problem

2009-05-07 Thread Mauricio (Maujor) Samy Silva
-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' :

[jQuery] Re: Ajax timeout doesn't call error function?

2009-04-20 Thread Mauricio (Maujor) Samy Silva
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

[jQuery] Re: Ajax timeout doesn't call error function?

2009-04-20 Thread Mauricio (Maujor) Samy Silva
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); },

[jQuery] Re: How to get the number of the selected element?

2009-04-08 Thread Mauricio (Maujor) Samy Silva
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=#

[jQuery] Re: Delay for $get.Script() callback function

2009-04-08 Thread Mauricio (Maujor) Samy Silva
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

[jQuery] Re: first child

2009-04-07 Thread Mauricio (Maujor) Samy Silva
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

[jQuery] Re: jQuery within Javascript?

2009-04-07 Thread Mauricio (Maujor) Samy Silva
Is there a missed closing braket and a double quotes after bgChangerAnchor? $(*[id^='bgChangerAnchor').click(function () {

[jQuery] Re: Combining Selectors

2009-04-05 Thread Mauricio (Maujor) Samy Silva
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,

[jQuery] Re: Excluding some children in a selector

2009-04-02 Thread Mauricio (Maujor) Samy Silva
$(#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',

[jQuery] Re: Select Last li

2009-04-02 Thread Mauricio (Maujor) Samy Silva
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'); -

[jQuery] Re: DOM manipulation

2009-04-01 Thread Mauricio (Maujor) Samy Silva
$('.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

[jQuery] Re: A general Javascript question: duplicate IDs in a document?

2009-03-31 Thread Mauricio (Maujor) Samy Silva
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 -

[jQuery] Re: A general Javascript question: duplicate IDs in a document?

2009-03-31 Thread Mauricio (Maujor) Samy Silva
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

[jQuery] Re: aborting a $.getScript() request

2009-03-26 Thread Mauricio (Maujor) Samy Silva
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

[jQuery] Re: aborting a $.getScript() request

2009-03-26 Thread Mauricio (Maujor) Samy Silva
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

[jQuery] Re: aborting a $.getScript() request

2009-03-25 Thread Mauricio (Maujor) Samy Silva
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

[jQuery] Re: tabs into tabs

2009-03-22 Thread Mauricio (Maujor) Samy Silva
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:

[jQuery] getJSON() response into a table

2009-03-21 Thread Mauricio (Maujor) Samy Silva
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

[jQuery] Re: getJSON() response into a table

2009-03-21 Thread Mauricio (Maujor) Samy Silva
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){

[jQuery] Re: getJSON() response into a table

2009-03-21 Thread Mauricio (Maujor) Samy Silva
[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

[jQuery] Re: getJSON() response into a table

2009-03-21 Thread Mauricio (Maujor) Samy Silva
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)

[jQuery] Re: jquery website broken?

2009-03-18 Thread Mauricio (Maujor) Samy Silva
...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:

[jQuery] Re: How do I subtract 64 pixels from the value of a div's height?

2009-03-18 Thread Mauricio (Maujor) Samy Silva
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

[jQuery] Re: How do I translate this in jQuery?

2009-03-03 Thread Mauricio (Maujor) Samy Silva
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

[jQuery] Re: Change CSS depending on page you're on

2009-03-01 Thread Mauricio (Maujor) Samy Silva
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

[jQuery] Re: Form inside Form value

2009-02-27 Thread Mauricio (Maujor) Samy Silva
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

[jQuery] Re: :not selector

2009-02-27 Thread Mauricio (Maujor) Samy Silva
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

[jQuery] Re: Multiselect listbox

2009-02-25 Thread Mauricio (Maujor) Samy Silva
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'); }); });

[jQuery] Re: tbody:first-child thead

2009-02-25 Thread Mauricio (Maujor) Samy Silva
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

[jQuery] Re: tbody:first-child thead

2009-02-25 Thread Mauricio (Maujor) Samy Silva
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

[jQuery] Re: tbody:first-child thead

2009-02-25 Thread Mauricio (Maujor) Samy Silva
) Samy Silva css.mau...@gmail.com wrote: 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

[jQuery] Re: Issue with addClass and removeClass

2009-02-25 Thread Mauricio (Maujor) Samy Silva
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(){

[jQuery] Re: ~ selector is not selecting siblings

2009-02-25 Thread Mauricio (Maujor) Samy Silva
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

[jQuery] Re: How to color a selected option in a select that will work on FF.

2009-02-22 Thread Mauricio (Maujor) Samy Silva
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

[jQuery] Re: using :has with selector

2009-02-10 Thread Mauricio (Maujor) Samy Silva
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)

[jQuery] Re: Using selectors successfully...?

2009-02-07 Thread Mauricio (Maujor) Samy Silva
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

[jQuery] Re: $.browser and jQuery 1.3

2009-02-05 Thread Mauricio (Maujor) Samy Silva
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

[jQuery] Re: dynamically building the for attribute

2009-02-05 Thread Mauricio (Maujor) Samy Silva
$('#my-form label').each(function() { var checkboxId = $(this).prev(':checkbox').attr('id') $(this).attr('for', checkboxId) Maurício -Mensagem Original- De: paulinstl paulsha...@gmail.com Para: jQuery (English) jquery-en@googlegroups.com Enviada em: quinta-feira, 5 de

[jQuery] Re: dynamically building the for attribute

2009-02-05 Thread Mauricio (Maujor) Samy Silva
('input:checkbox').attr('id'); $(this).attr('for', checkboxId) }); On Feb 5, 8:52 am, Mauricio \(Maujor\) Samy Silva css.mau...@gmail.com wrote: $('#my-form label').each(function() { var checkboxId = $(this).prev(':checkbox').attr('id') $(this).attr('for', checkboxId) Maurício -Mensagem

[jQuery] Re: Select element based on a value of its child element

2009-02-04 Thread Mauricio (Maujor) Samy Silva
$('div:has(input[value=2])') Maurício -Mensagem Original- De: Adrian Lynch adely...@googlemail.com Para: jQuery (English) jquery-en@googlegroups.com Enviada em: quarta-feira, 4 de fevereiro de 2009 09:22 Assunto: [jQuery] Select element based on a value of its child element Hello

[jQuery] Re: how to get action attribute from form

2009-02-03 Thread Mauricio (Maujor) Samy Silva
Both ways works fine! Please: 1- check the link to jquery library in the document , 2- don't forget to wrapper the script within ready() method, 3- double check the script and markup sintax. Maurício -Mensagem Original- De: bob xoxeo...@gmail.com Para: jQuery (English)

[jQuery] Re: How do I get the index of the currently clicked textbox?

2009-02-02 Thread Mauricio (Maujor) Samy Silva
Try: $('input[type=text]').each(function(i) { $(this).click(function() { alert(i); }); }); Maurício -Mensagem Original- De: bittermonkey brakes...@gmail.com Para: jQuery (English) jquery-en@googlegroups.com Enviada em: segunda-feira, 2 de fevereiro de 2009 17:47 Assunto:

[jQuery] Re: How do I get the index of the currently clicked textbox?

2009-02-02 Thread Mauricio (Maujor) Samy Silva
. Mauricio it worked like a charm. Thank you so much. If you don't mind, can you briefly explain why function(i) seems to know the element's index? On Feb 2, 3:08 pm, Mauricio \(Maujor\) Samy Silva css.mau...@gmail.com wrote: Try: $('input[type=text]').each(function(i) { $(this).click(function

[jQuery] Re: DOM manipoulation after ajax load

2009-02-02 Thread Mauricio (Maujor) Samy Silva
Hi HK It doesn't works because elements loaded via AJAX isn't available when the page is just loaded. Before version 1.3.1 to bind events to elements loaded via AJAX you must use the LIVEQUERY plugin. Version (1.3) 1.3.1 added the live() and die() methods that should solve your problem.

[jQuery] Re: Triggering a link with no click event

2009-01-31 Thread Mauricio (Maujor) Samy Silva
Try: function linkClick() { var target = $('body').find('#test').attr('href'); window.location = target; } Maurício -Mensagem Original- De: Andy789 e...@abcstudio.com.au Para: jQuery (English) jquery-en@googlegroups.com Enviada em: sábado, 31 de janeiro de 2009 05:15 Assunto:

  1   2   >