Re: [jQuery] jqGrid

2010-08-04 Thread Ricardo Fontão Verhaeg
Hi Denis what is your intent for doing this? you want to add custom data to the post or change the data? this will call a function just before sending the data to the server. with the POST array formed (or what will become it after submitting) Ricardo Verhaeg Bacharelado Ciências da Computação

Re: [jQuery] Re: IE7 Bug with Cache

2009-11-11 Thread Ricardo Fontão Verhaeg
Sorry for the delay.. yes.. i'm now doing something like it... also i'm forcing the php script with no-cache headers and the ajax request with cache:false parameter for now is working... =D thanks Ricardo Verhaeg Bacharelado Ciências da Computação - USP - São Carlos (2005) Virgos Tec

[jQuery] IE7 Bug with Cache

2009-10-30 Thread Ricardo Fontão Verhaeg
data from the server and no POSTing it... if someone knows how to workaround this in IE7. (Yeah.. since the alpha version of IE8 it was corrected)... Ricardo Verhaeg Bacharelado Ciências da Computação - USP - São Carlos (2005) Virgos Tecnologia da Informação - Desenvolvimento

[jQuery] Re: Social media plugin

2009-10-22 Thread Ricardo
Thanks man! On 22 out, 08:33, Jon Banner wrote: > yes. > > http://github.com/kswedberg/jquery-socialize > > 2009/10/22 Ricardo > > > > > I've visited this site(http://www.intomobile.com/2009/10/09/hands-on- > > the-nokia-n900-at-ctia-fall-2009.html<h

[jQuery] Social media plugin

2009-10-21 Thread Ricardo
I've visited this site(http://www.intomobile.com/2009/10/09/hands-on- the-nokia-n900-at-ctia-fall-2009.html) and there is an interesting feature to spread the link in social sites like facebook, twitter and others (just point your mouse to the article image). I've found that the effect is provided

[jQuery] Re: Help using cylce(plugin)

2009-09-30 Thread Ricardo
e div. > > Either that, or wrap the dinamica div in > > On Sep 30, 5:20 pm, Ricardo wrote: > > > Nothing! :) Just stay there, they are just replacement images. > > > On 30 set, 14:11, amuhlou wrote: > > > > what should the images below the cycle div be

[jQuery] Re: Help using cylce(plugin)

2009-09-30 Thread Ricardo
Nothing! :) Just stay there, they are just replacement images. On 30 set, 14:11, amuhlou wrote: > what should the images below the cycle div be doing? > > On Sep 30, 4:52 pm, Ricardo wrote: > > > Here is a link:http://www.softcore.com.br/loxxi/servicos.php?idCategoria=11

[jQuery] Re: Help using cylce(plugin)

2009-09-30 Thread Ricardo
page? > > On Sep 30, 2:31 pm, Ricardo wrote: > > > Hello amuhlou! I don't want to cylce the second div. I want this div > > to appear bellow the fist div. Now, the first div hides the second. > > When the images in the first div fade I can see the image of the > &

[jQuery] Re: Help using cylce(plugin)

2009-09-30 Thread Ricardo
ldren of the div it's > initialized on.  If your goal is to cycle the 2nd div as well, you > will need to use some wrapping divs. > > http://malsup.com/jquery/cycle/int2.html > > The examples at the bottom of that page show how you can cycle through > divs. >

[jQuery] Help using cylce(plugin)

2009-09-30 Thread Ricardo
Hello! I have this html markup: --some images here And this javascript code: $('.dinamica').cycle({fx : 'fade', timeout : '4000'}); The images in the "dinamica" div turns ok. But the second div stays bellow the dinamica div. I tried to change the display of both divs to "bloc

[jQuery] Re: Way to "convert" DOM event to jQuery event?

2009-09-23 Thread Ricardo Tomasi
rser for that: $.fn.mdata = function(){ return window["eval"]("(" + this[0].className.match(/{.*}/) + ")"); }; $('a').mdata() == Object foo:'bar' etc.. It will work as long as you use valid JSON. cheers, Ricardo On Sep 22, 8:41 pm, WalterGR wro

[jQuery] Re: Way to "convert" DOM event to jQuery event?

2009-09-22 Thread Ricardo
This doesn't make any sense. If you're already using jQuery why keep your handler in the HTML? I'll try to help anyway. ... function showTextNearThisLink(e, sheez){ e = jQuery.event.fix(window.event || e); // e is your new jQueryized event }; -- ricardo On Sep 22, 5:

[jQuery] Re: [Attrib "external" not working...]

2009-09-22 Thread Ricardo
I don't. That's the reason :) What you should do is indicate when a link leads to a external site, via an icon or formatting, like Wikipedia articles. In XHTML 1.0 Transitional target is still valid. -- ricardo On Sep 22, 11:47 am, Liam Potter wrote: > I have no idea, I think it

[jQuery] [tablesorter.pager] Does it work with dynamic tables?

2009-09-22 Thread Ricardo
Hi, I have two tables in my page. One, static, works perfectly with tablesorter and its pager plugin. The other is filled through Ajax calls. I'm using the trigger ("update") method, as described in the tablesorter docs, but the pager just does not work. Does anyone know what it can possibly be

[jQuery] Re: Convert AJAX XML response to HTML

2009-09-20 Thread Ricardo
First, make proper use of XML: Success Number of Slots Then it's easy: $.get('myserver.xyz', function(data){ var $xml = $(data); var status = $xml.find('status').text(); if ('Success' == status){ $('#myelement').html( $xml.find('response').html() ); }

[jQuery] Re: "Object doesn't support this property or method" in IE

2009-09-15 Thread Ricardo
Hmm. No idea why it doesn't work in IE, but here are some general observations: You don't need the "jQuery(function(){" part around the function. setTimeout(updateStatus, 2); // use the function object $(document).ready(updateStatus); //same here, pass the object, don't call the function. thi

[jQuery] Re: Very disappointed with jquery and iframe communication

2009-09-15 Thread Ricardo
You can also access the frame's contents via $('#frame_id').contents ().find('xx'), I think. On Sep 15, 9:42 am, Paolo Chiodi wrote: > Of course it doesn't work. > You are searching for node elements with id=login that are child of > your iframes. You need to use the dom of the page loaded insid

[jQuery] Re: IE 8 chokes on HTML5 elements inserted with jQuery

2009-09-15 Thread Ricardo
7;).append( $('Guest') ) .append( $('').append( $('This is the comment') ) ); cheers Ricardo On Sep 15, 9:29 am, Nick Fitzsimons wrote: > 2009/9/15 Perceptes : > > > > > I've encountered a problem with the combination of jQuery, IE, and > > H

[jQuery] Re: this.each is not a function

2009-09-13 Thread Ricardo
How are you using it? On Sep 13, 3:24 pm, shapper wrote: > Hello, > > I am using JQuery 1.3.2 and I get the error "this.each is not a > function" when I try to use the following plugin: > > jQuery.fn.defuscate = function(settings) { >     settings = jQuery.extend({ >         link: true >     },

[jQuery] Re: is there an opposite of 'closet' selector

2009-09-11 Thread Ricardo
Quite complicated. You should be using some identifier to do this and not rely on the HTML tree, and tables are meant for tabular data. This might work anyway, if there are no after .timer: $('.timer').parents('table').find('a:last') or $('table:has(.timer)').prev('table').find('a') On Sep 1

[jQuery] Re: How can I get current Index?

2009-09-08 Thread Ricardo
See the eq() and index() methods: http://docs.jquery.com/Selectors/eq#index http://docs.jquery.com/Core/index#subject $('#xxx tr').each(function(){ var items = $(this).children(), title = items.eq(1).text(); items.each(function(){ $(this).find('a').attr('href', title + '_' +

[jQuery] Re: Has anyone now how to simplify the following expression by avoiding using attr("id")

2009-09-04 Thread Ricardo
$(obj).siblings('p:last') should give the same results. Remember that you can access the id via obj.id directly. Here are two possible rewrites: http://snipt.org/mHj On Sep 4, 7:22 am, varlo wrote: > Has anyone now how to simplify the following expression by avoiding > using attr("id") > > alert

[jQuery] Re: Is this "quirk" of jQuery still true?

2009-09-03 Thread Ricardo
Nope. The DOM (Document Object Model) has a tree structure, just like HTML, with elements owning children. And as HTML is a "static" document (you can't mess with it any other way except via DOM), you can't traverse it, you can only traverse the DOM that represents it :) On Sep 3, 10:15 am, "Rick

[jQuery] Re: Is this "quirk" of jQuery still true?

2009-09-02 Thread Ricardo
The change in value won't appear in the HTML (in firebug for example), but the value *will* change and be submitted with the form. That's standard DOM scripting behaviour. There is no reason to change the attribute in the HTML unless you want to print it somewhere. On Sep 2, 5:55 pm, "Rick Faircl

[jQuery] Re: inconsistency in closest()

2009-09-01 Thread Ricardo
An example/test case would be helpful. Does parents() also not find the ancestor? On Sep 1, 7:24 pm, Jeremy Ross wrote: > I've noticed inconsistent behavior with closest().  In my use case, it > finds the expected ancestor initially.  However, after a bit of DOM > manipulation, it fails to find

[jQuery] Re: jQuery select where attribute ID less than

2009-09-01 Thread Ricardo
Just for the record, ignoring performance and the invalid IDs, this could be done with filter(): $('span.class').filter(function(){ return this.id < y; }); cheers, - ricardo On Aug 31, 6:57 pm, aquaone wrote: > indeed. there's gotta be a better solution than this. &

[jQuery] Re: Port Prototype Code to jQuery?

2009-09-01 Thread Ricardo
This should work, at least the logic is transposed: $('.fieldpair').each(function(){ var self = $(this); if (self.find('input:checked').length){ total += +self.find('input:text').val(); } }); On Sep 1, 10:08 am, Jermaine wrote: > Hi All, > > I want to refactor (port) the followi

[jQuery] Re: Image inside script

2009-08-27 Thread Ricardo
$("."+errId).empty() .css({ display: inline, color: 'red' }) .text(" Invalid Character. Numerals only.") .prepend(''); What CMS are you using? The page is probably in the root of your website, so you'll need the full path to the the image. On Aug 27, 3:02 am, Fabio wrote: > Hi Paolo ,

[jQuery] Re: Issues with readying function - shorthand works, longhand doesn't

2009-08-18 Thread Ricardo
does this work? jQuery().ready(function(){ alert("Hey!"); }); On Aug 18, 8:16 pm, Anna wrote: > Hi there :) > > At work, I'm trying to implement some jQuery on the intranet, which > runs on a Java framework (Liferay). I'm having some issues, and I've > narrowed it down to being the differen

[jQuery] Re: .replaceWith Issue

2009-08-18 Thread Ricardo
IE doesn't handle custom elements well, make them all s or s and it should be fine. Or if you need to keep it that way, try putting this before all scripts: if( $.browser.msie ){ $.each('Name,Role,Interests,Words'.split(','), function(){ document.createElement(this); }); }; creating an

[jQuery] Re: Help with using the 'not' selector

2009-08-17 Thread Ricardo
return false; in your 's click handler should avoid that, as it prevents the event from bubbling to the body. You can also check visibility: $().click(function(){ var opt = $(#'fm_options'); if( this != opt[0] && opt.is(':visible') ) opt.fadeOut('fast'); }); On Aug 17, 6:27 am, MiK

[jQuery] Re: .each() loop with custom function

2009-08-17 Thread Ricardo
A suggested rewrite (missing parts): http://snipt.org/edit/lnx On Aug 17, 12:28 pm, Ricardo wrote: > It should be $(current_galleryXML).find("image[id="+(i+1)+"]"), you > want to concatenate i+1 with the string. > > Plugins are supposed to "return this.ea

[jQuery] Re: .each() loop with custom function

2009-08-17 Thread Ricardo
It should be $(current_galleryXML).find("image[id="+(i+1)+"]"), you want to concatenate i+1 with the string. Plugins are supposed to "return this.each()" so you keep chaining possible $.fn.createThumb = function(){ return this.each(function(){ //do somethin with every element } };

[jQuery] Re: How to Clean Up Asynch Code

2009-08-16 Thread Ricardo
Yes you should. cheers, ricardo On Aug 15, 10:46 pm, finneycanhelp wrote: > // what's a clean way to populate a list asynchronously and then > compare the number of items in the list to a count? > > $(function() { >         populateList(); // this is an asynch call usin

[jQuery] Re: Merging two jQuery collections

2009-08-14 Thread Ricardo
.add() returns the merged collections, but it doesn't change 'foo'. you have to reassign it: foo = foo.add(foobars); On Aug 14, 2:36 pm, Hector Virgen wrote: > Hello, > I have two jQuery collections that I'd like to merge into one: > > var foo = $('#foo'); > var foobars = foo.nextAll('.bar'); >

[jQuery] Re: Code inside click() event not firing.

2009-08-14 Thread Ricardo
wow On Aug 13, 10:56 pm, "Meroe" wrote: > What if you change > >     $("a").click(function () > > To >     $("#a").click(function () > > -Original Message- > From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On > > Behalf Of Patrick > Sent: Thursday, August 13, 2009 2:

[jQuery] Re: HTML5 video tag available?

2009-08-11 Thread Ricardo
1. try giving it an ID 2. try doing what Liam said, *before* you create the element. That's a hack that 'forces' the browser to acknowledge the existence of the tag 3. it helps if you make sure your page is in standards mode On Aug 11, 7:01 am, quiKe wrote: > Hi again. > > But i insert the video

[jQuery] Re: refactoring help/ suggestions?

2009-08-11 Thread Ricardo
if (par.is(":hidden")) par.fadeIn("slow"); else par.fadeOut("sloe"); can be replaced with par.toggle('slow'); :] On Aug 10, 8:33 pm, Jules wrote: > Assuming your html format as follows: > >     Para a >     Paragraph a >     >     Para b >     Paragraph b >     >     Para c >    

[jQuery] Re: Sloppy Documentation of Ajax Methods

2009-08-10 Thread Ricardo
I see your point, it's completely inconsistent. It's a wiki, anyone can fix that. How about this? jQuery.ajax() Start an HTTP request with custom parameters .load() Load HTML from an URL and insert into the selected element(s) jQuery.get() Load data using an HTTP GET request jQuery.getJSON() Load

[jQuery] Re: Attribute selection not working in MSIE; eg $("input[name=name]").val()

2009-08-10 Thread Ricardo
You should avoid using reserved words in your attributes, and also avoid names/ids that are also available as properties of forms. IE overwrites DOM methods/properties when you set the attribute: http://www.jibbering.com/faq/faq_notes/form_access.html#faComMis http://meyerweb.com/eric/thoughts/20

[jQuery] Re: Get success respose in ajaxSuccess?

2009-08-08 Thread Ricardo
Try this: $().ajaxSuccess(function(event,request,settings){ console.log( request.responseText ); }); On Aug 9, 1:19 am, cohq82 wrote: > I am using $.ajax in jQuery and I have some thing running in $ > ().ajaxSuccess(function(event, request, settings) {}); > > However I don't know how to get

[jQuery] Re: jQuery.ajax custom parameter to success callback function

2009-08-04 Thread Ricardo
There is no point in validating via AJAX unless something related to sessions needs to be checked. You should validate twice, once client- side in javascript and again on the server. The jQuery Validation plugin should cover your needs for this: http://docs.jquery.com/Plugins/Validation On Aug 4

[jQuery] Re: IE click event handling problem

2009-08-04 Thread Ricardo
return false; }); cheers, ricardo On Aug 4, 3:16 pm, ak732 wrote: > So, although it's an ugly hack, I'm working around the issue by > setting the background of the overlay element to #fefefe and giving > the element an opacity of 0.01.  Which works. > > On Aug 4, 2:12 pm,

[jQuery] Re: Is it possible to hide the destination URL of a link?

2009-07-31 Thread Ricardo
You can't "fake" URLs. If you could, you could make a link that reads http://www.google.com link pointing to your personal page (or worse). Is it a problem that it's obvious it's a delete request? Isn't that what the user wants? You should use a form for that, where you can have the ID for deleti

[jQuery] Re: Simple calculation

2009-07-30 Thread Ricardo
Adding a '+' sign makes it a number (or NaN): $('#b19').val(+b18 + (+b16*12) + +b15); You should add either + or parseInt in your variable declarations at the beginning of your script. On Jul 30, 4:40 pm, kalyan Chatterjee wrote: > Hi so in this case how to write this? > > $('#b19').val(b18 +

[jQuery] Re: jquery blocks javascript?

2009-07-30 Thread Ricardo
HTML added dynamically to the page does not "inherit" event handlers. Look into event delegation with live() or the livequery plugin: http://docs.jquery.com/Events/live On Jul 30, 1:46 pm, solow wrote: > so, now i post the url and the problem, and people still dont know the > problem? i really w

[jQuery] Re: small problem

2009-07-29 Thread Ricardo
Nothing like crowd-sourced tests! :) Looks good in all browsers. I see it yellow out a little during the fade in Firefox 3, it's because of sub-pixel rendering (anti- aliasing), color shifts happen occasionaly. Is that what you're seeing? -- ricardo > http://www.crtaci.info/ >

[jQuery] Re: Unresponsive Javascript Error

2009-07-29 Thread Ricardo
selector; } Avoiding string concatenation ("#Que.." + i + "_Panel") also gives you a speed up. As a bonus of selecting by the IDs you avoid the dozens of parent() calls later on. These two changes should already significantly improve your script's run time. cheers

[jQuery] Re: Odd problems with jQuery and XHTML in Firefox.

2009-07-29 Thread Ricardo
The answer is there already. jQuery uses innerHTML (in the jQuery.clean method) when you pass a string to append/prepend/etc. But it is skipped if the argument is a HTMLElement, fragment or jQ object. This should work in "real" XHTML too: $('body').append( $('').text('hello') ); On Jul 29, 1:56 

[jQuery] Re: Using replaceWith on a instead of a causes text to be deleted

2009-07-28 Thread Ricardo
I think you're confused because jQuery accepts self-closing syntax for element creation, this will probably work: xx.replaceWith( $('') ); On Jul 28, 12:30 pm, "thorasm...@gmail.com" wrote: > Not sure whether this is a bug, but is is certainly unexpected > behaviour. > > When i try to use repla

[jQuery] Re: How to deterine number of words in a string?

2009-07-27 Thread Ricardo
first sight, despite being probably slower. -- ricardo On Jul 27, 8:23 pm, RobG wrote: > On Jul 28, 5:09 am, Liam Byrne wrote: > > > A letter count is FAR easier - just get the string's length. > > The length of the string will give you a *character* count. I would > n

[jQuery] Re: Combining jQuery Objects

2009-07-23 Thread Ricardo
Guess what? var e1 = $("#firstObject"); var e2 = $("#secondObject"); e1.add( e2 ) is exactly what you're looking for :) http://docs.jquery.com/Traversing/add#expr On Jul 23, 1:17 am, NeilM wrote: > Does anyone know if it is possible to join two jQuery objects to make > a new object.  For exam

[jQuery] Re: Binding of object

2009-07-21 Thread Ricardo
Having click handlers added repeteadly is a sign of bad structure in your code. You should refactor your code to avoid that in the first place, that should'nt be happening. That said, there is a way to check for event handlers: var $login = $('#login'); if ( jQuery.data( $login[0], "events").cli

[jQuery] Re: Caching jQuery objects

2009-07-21 Thread Ricardo
idget = $('#my-widget'); // save some data related to the widget $widget.data('options', {bla: 'bla'}); }); As always, showing the code you're talking about helps a lot in getting good advice/answers. cheers, -- ricardo On Jul 21, 7:51 am, north wrote: > H

[jQuery] Re: Selector help

2009-07-19 Thread Ricardo
this is an object name, you want to pass the object itself and not a string, as others have already said: $(this).find('+ h1') or $('+ h1', this) or $(this).next('h1') http://docs.jquery.com/Selectors On Jul 19, 4:46 am, Dhruva Sagar wrote: > Hi, > > Perhaps your missing a space? $('this h1'),

[jQuery] Re: Get the HTML of the current node plus its Inner HTML

2009-07-16 Thread Ricardo
the native outerHTML property only exists in IE. On Jul 16, 6:50 pm, FrenchiInLA wrote: > each time that you need javascript function you can use [0] or 'this' in your > case you can get it by >   if(this.nodeName.toLowerCase() == "table") >   { > >     contentHtml += this.outerHTML();} > > or i

[jQuery] Re: children() passable variables there

2009-07-15 Thread Ricardo
Try to keep your styling separate from behaviours. CSS: tbody td { text-align: center } tbody td.first { border-left: 3px solid #EEE; text-align:left } tbody td.last { border-right: 3px solid #EEE; text-align:right } JS: $('#table tbody td') .filter(':first').addClass('first').end() .filte

[jQuery] Re: jQuery syntax question

2009-07-13 Thread Ricardo
nique (only one #text element), so you can simplify your selector to $( $('#text p')[2] ).after(data) or $('#text p').eq(2).after(data); cheers, -- ricardo On Jul 13, 6:26 pm, Matthew wrote: > nevermind my last reply, eq() works great, I just forgot to change my > code..

[jQuery] Re: IE doesn't seem to see classes created by other JQuery Script

2009-07-13 Thread Ricardo
What is the other script that adds the class, does it involve ajax/get/ load? On Jul 13, 10:49 am, zorba wrote: > Hi, > > I'll do my best to explain the following. > I simply want to do this: > >     $("myDiv p").find(".highlight:contains(someText)").doSomeStuff... > > where the class ".highligh

[jQuery] Re: document.ready - how to make sure all js is loaded?

2009-07-13 Thread Ricardo
7;#cometchatbase'). }); instead of $(document).ready(function(){... cheers -- ricardo On Jul 13, 4:12 am, Veeru wrote: > I have an example for the scenario > I am using cometchat in my application. > Its a third party script, that provides a chat interface to the > website. It a

[jQuery] Re: Is there an "append if" type function in jquery

2009-07-11 Thread Ricardo
That's a lot of work for something that jQuery already does: http://snipt.org/kpgi On Jul 10, 5:45 pm, "B.I." wrote: > I had a code that looks like this for now: > >     var rowObj = $.create('tr', {'id': "pod" + currPOCount, 'valign': > 'top'}) >     .append($.create('td') >         .append($.c

[jQuery] Re: Access by item in the array

2009-07-10 Thread Ricardo
;s easier to help or offer advice knowing the whole context, objectives and all, than looking at separate pieces. cheers -- ricardo On Jul 9, 6:51 pm, expresso wrote: > It's too bad we didn't kick your ass in soccer the past couple weeks > ago.  Now I wish we really had! > >

[jQuery] Re: DIV Fade In/Out Not Working! URGENT AND ANNOYING

2009-07-10 Thread Ricardo
Everything seems fine here, #me fades in and out perfectly. In IE you have this #nojs blocking the whole screen (guess you're missing a $ ('#nojs').hide() in your script) but taking it away the fade on #me works right. cheers -- ricardo ps: love urgent and annoying messages On

[jQuery] Re: Access by item in the array

2009-07-09 Thread Ricardo
your sleep time and hire someone with more experience to > > do this for you :] > > can I ask you if that was a derogatory statement?  Seems like it to > me. > > On Jul 9, 3:34 pm, Ricardo wrote: > > > "expresso" (we don't know your name), if you'

[jQuery] Re: jQuery on IE

2009-07-09 Thread Ricardo
I was wondering how noone had noticed it. I know that application/ javascript, which should be the current standard, does not work in IE. application/x-javascript probably doesn't as well. On a side note, you're wasting function calls, as you're already using native element creation set the .id a

[jQuery] Re: Access by item in the array

2009-07-09 Thread Ricardo
"expresso" (we don't know your name), if you're still in need of help, why not post an overview of what you need? You've posted several pieces of your puzzle but no one can guess the overall structure you're trying to code. Like "I need a carousel that expands when blablabla and loads blablabla fr

[jQuery] Re: Cannot disable div

2009-07-08 Thread Ricardo
I'd love to see what the author thinks of your comments ;) >From what I can see, you'd be much better off writing your own carousel from scratch, and learning the basics as you go with it. On Jul 8, 1:05 pm, expresso wrote: > Now you tell me how the f* I'm supposed to understand how to > manipu

[jQuery] Re: getJSON callback? does not work with querystring param

2009-07-06 Thread Ricardo
When you use callback=? jQuery will create a random name for the anonymous function you pass in. For example: $.getJSON("CarouselHandler.ashx?jsoncallback=?",function(data) { }); The actual requested URL will be CarouselHandler.ashx? jsoncallback=abc12345, and the global variable 'abc12345' wil

[jQuery] Re: Mootools tooltip used inside of jquery??

2009-07-06 Thread Ricardo
Stick to a single framework.. avoid confusion and save your users' bandwidth. You should either convert your jQ code to mootools or use a jQuery tooltip plugin. And the whole thing you posted is unreadable, please use a sharing site like jsbin.com or snipt.org :) On Jul 6, 5:10 am, Lleoun wrote

[jQuery] Re: Remove an

2009-07-06 Thread Ricardo
$(this).nextAll('.jcarousel-item-placeholder').remove(); http://docs.jquery.com/Selectors On Jul 6, 1:05 am, expresso wrote: > I want to remove the following and any after that which have the > class jcarousel-item-placeholder in them > > > > I'm not sure how to go about this.

[jQuery] Re: 2 different ways of doing the same thing?

2009-07-04 Thread Ricardo
Just like $('div span') == $('div').find('span') and $('div > span') == $('div').children('span') and so on. Options == good :) On Jul 2, 1:11 pm, expresso wrote: > Would this not be 2 different ways to do the same thing? > > $('input:not(:checkbox)); > > vs. > > $('input').not(:checkbox);

[jQuery] Re: Jquery bind with parameters? Replace inline onclick for server side generated lists, onclick(x, y, z)

2009-07-02 Thread Ricardo
ibute, that will give you standards mode in all browsers and perfectly valid attributes: ${record.name} $('td.trigger').click(function(){ alert( $(this).attr('data-recordID') ); }); See http://ejohn.org/blog/html-5-data-attributes/ for more info. cheers -- ricardo On Jul

[jQuery] Re: Changed attributes on . Now I get no event

2009-07-02 Thread Ricardo
Do a check when you reach the end and then add new items, that way you preload the images and the next/prev buttons stay enabled. See the "circular carousel" example: http://sorgalla.com/projects/jcarousel/examples/special_circular.html On Jul 2, 5:23 pm, expresso wrote: > for the JCarousel (ht

[jQuery] Re: Replace div with another div

2009-07-02 Thread Ricardo
Are you sure you need to do that? The button is disabled when you get to the first/last item, if you add new items following the documented ways it is completely unnecessary: http://sorgalla.com/projects/jcarousel/#Dynamic-Content-Loading -- ricardo On Jul 2, 11:45 am, expresso wrote: >

[jQuery] Re: "Swapping" attributes with attr

2009-07-02 Thread Ricardo
attr() accepts a function as the second argument: $(trigger).find('input').val(img_id).attr('name', function(){ return this.id }); On Jul 2, 11:45 am, Sceneshift wrote: > Hi, I am trying to swap two attributes around, I am trying to achieve > something like this: > > $(trigger).find('input').at

[jQuery] Re: simple JSON parse problem!!!

2009-07-02 Thread Ricardo
ot;This file was already uploaded"]} ); > > On Jul 1, 9:25 pm, Ricardo wrote: > > > No. JSONP provides a way to pass the JSON response directly to a > > callback function without the need for eval(), independent of what > > you're doing with it. It was conce

[jQuery] Re: Eval issue ?

2009-07-01 Thread Ricardo
If you put the loop inside a function, you'll have access to the 'i' variable because of scoping: // *** just for demonstration, this is bizarre *** for (var i=0; i < TAGS.length; i++) { (function(i){ TAGS[i].click( function(event) { alert(B[i]); }); })(i); };

[jQuery] Re: just trying to get more efficient with jQuery coding

2009-07-01 Thread Ricardo
Couldn't make complete sense of your last chain, but it could be reduced to something like this: $(".entry h4").click(function() { $(this) .siblings('h4.active') .removeClass('active') .end() .toggleClass('active') .next() .toggle('slow') .toggleClass('activ

[jQuery] Re: simple JSON parse problem!!!

2009-07-01 Thread Ricardo
on what's running server-side etc. Maybe if you could mention which plugin you're using or provide a test page this could be solved easily. cheers -- ricardo On Jul 1, 4:12 pm, Rick Faircloth wrote: > So...am I to understand that jsonp provides a method by which an image can > b

[jQuery] Re: simple JSON parse problem!!!

2009-07-01 Thread Ricardo
that is called jsonp. You need to define a function named uploadPicture that will get called when the response arrives. jQuery handles that for you if you use the proper method (assuming the callback name can be set in the request): $.getJSON('uploadpicture.php?callback=?, {some:'data'}, function

[jQuery] Re: ul.nav a VS. .nav li > a

2009-06-30 Thread Ricardo
versions under "Source" on the left): http://jquery.nodnod.net/cases/474 cheers ricardo On Jun 30, 6:04 pm, "Cesar Sanz" wrote: > ".nav li a"  is very different to ".nav li > a" > > in the second statement (".nav li > a") only the anc

[jQuery] Re: $.data question

2009-06-29 Thread Ricardo
Well, data is saved onto an indexed cache. You can't have an empty string as a key, you need a name for it. If you don't provide a name you'll get back the internal ID of the selected element. // from jQuery source, data.js ln 27 return name ? jQuery.cache[ id ][ name ] : id; Any reason yo

[jQuery] Re: live event doesn't work after append()

2009-06-29 Thread Ricardo
Should work, see this example: http://jquery.nodnod.net/cases/444 Is your page in quirks mode? Can you give us an online sample of it? On Jun 29, 7:08 am, Anton wrote: > I found the bug ticket with similar problem:http://dev.jquery.com/ticket/4762, > but it was closed as invalid. The problem st

[jQuery] Re: $.data question

2009-06-29 Thread Ricardo
You shouldn't use $.data directly, it's for the internals. You should be using data() on elements, like $('#someelement').data('name', 'Roger'); see here: http://docs.jquery.com/Core/data and here: http://docs.jquery.com/Internals On Jun 29, 4:41 am, Steven Yang wrote: > Hi > Sorry if its alre

[jQuery] Re: jQuery.remove() = bug or feauture?

2009-06-28 Thread Ricardo
On Jun 28, 5:19 am, Laszlo Bagi wrote: > Hi! > > I've started to deal with jQuery for few months ago and I bumped into > some freaks but this was the first time (yesterday) when I blunder > into a problem which queries the availability of the whole jQuery > framework. > > I've got several problem

[jQuery] Re: Help with some jquery basics

2009-06-28 Thread Ricardo
You're trying to set the 'opid' property of opid[0] when it doesn't exist. You should either create an object in that position first: opid[i] = {}; opid[i]['opid'] = $(this).attr("id").substr(9); Or just save it directly to the index (like a simple array): opid[i] = $(this).attr("id").substr(9);

[jQuery] Re: Internet Explorer Issue with Hover State

2009-06-28 Thread Ricardo
A screencast is probably not the best tool to get advice on HTML, just give out a link :) Are you using .mouseover and .mouseout directly or the hover() function? hover is just a wrapper for 'mouseenter' and 'mouseleave' events, which filter mouseover/out from happening on child elements. $('.it

[jQuery] Re: Passing a jquery object as a function parameter

2009-06-28 Thread Ricardo
I'd advise you to use the second one, since it allows you to pass either selector strings, jQuery objects or DOM elements, a lot more flexible. On Jun 28, 1:47 am, ferdjuan wrote: > I had a script that was acting unexpectedly because of a function > parameter. I was trying to pass a jquery objec

[jQuery] Re: extract data from this JSON encode using jQuery

2009-06-27 Thread Ricardo
For adding a handful of options in a select performance is almost irrelevant, it's more than fast enough. You can improve code readability and performance (a bit) using the Option constructor: $.post('/path/to/json.php', {params: 'xxx'}, function(data){ var $select = $('#mySelectBox'); $.

[jQuery] Re: PDF + Jquery + thickbox is not suppoting to Mozilla

2009-06-27 Thread Ricardo
Simply not trying to put the PDF in an iframe? That's an UI nightmare. On Jun 26, 2:05 am, bharathbhooshan ambati wrote: > Is there any other options? > > > > On Wed, Jun 24, 2009 at 1:15 AM, Chippo wrote: > > > Hi > > > this will do what your after I think > >http://www.adobe.com/products/flas

[jQuery] Re: Object as Function argument

2009-06-26 Thread Ricardo
What RobG said. Standard way to do that: function test(options){ var defaults = { test: '' }; options = jQuery.extend(defaults, options); alert(options.test); }; test({test: 'It works!'}); You can also simply skip the defaults var and use jQuery.extend ({ test: '' }, options); http:/

[jQuery] Re: Selecting children of "this" ?

2009-06-24 Thread Ricardo
The $ aliasing should probably be included in the "How jQuery works" at the site, I see how you missed that. $('li', this) is translated to $(this).find('li') internally: // core.js line 69 // HANDLE: $(expr, $(...)) return (context || rootjQuery).find( selector ); So you're just wasting on

[jQuery] Re: Using slideDown in a slideUp callback

2009-06-24 Thread Ricardo
One should not prevent the other. It's probably some conflict, do you have any other scripts besides jQuery in your page? On Jun 23, 3:52 pm, Matthew wrote: > Hi all, >    I am trying to slideUp a container Div and using the slideUp's > callback parameter call slideDown on a different element th

[jQuery] Re: Array to JSON?

2009-06-23 Thread Ricardo
Sending JSON to the server adds a layer of complexity to both sides. If it has no benefits (I don't see any), then yes, you're better off keeping it simple and using a query string and $_POST instead. jQuery handles object to query string conversion automatically: $.post('cheese.php', { cat: 1, m

[jQuery] Re: Array to JSON?

2009-06-23 Thread Ricardo
I know, I meant it won't handle actual arrays like [1,2,3]. Wasn't needed at the time, probably not too difficult to implement. On Jun 22, 9:24 pm, Josh Powell wrote: > That's okay, javascript doesn't have associative arrays, only arrays > with object properties. >

[jQuery] Re: jQuery in an eBay auction template? Is it possible?

2009-06-23 Thread Ricardo
The error message says it all: for security reasons, your listing *cannot* contain javascript. On Jun 22, 1:01 pm, eepeterson wrote: > Ok, let me start by saying I'm not a great programmer. I can do well > with HTML & CSS but don't know a ton about js & jQuery. > > Anyway, I'd like to include so

[jQuery] Re: Array to JSON?

2009-06-22 Thread Ricardo
before someone complains: that function won't handle arrays (only objects) On Jun 22, 6:39 pm, Ricardo wrote: > Usually you'll send out parameters in query strings, only receive data > in JSON, which is what jQuery is equipped to do. If you don't want the > weight o

[jQuery] Re: Array to JSON?

2009-06-22 Thread Ricardo
Usually you'll send out parameters in query strings, only receive data in JSON, which is what jQuery is equipped to do. If you don't want the weight of a plugin you could use something like this: function toJSON(obj){ var json = '({'; $.each(obj, function(k,v){ var q = typeof v == 'string' ?

[jQuery] Re: problems in IE (6, 7, and 8)

2009-06-21 Thread Ricardo
ns", "del", "map", "button" start-tag > [/error] > > What can I use if not "noscript" tag? I'm using it to hide my email > address from plain view. > > Thanks, > > Paul > > Ricardo wrote: > > Hi Paul, > > >

[jQuery] Re: problems in IE (6, 7, and 8)

2009-06-20 Thread Ricardo
Hi Paul, Please avoid creating many threads on the same (or related) issues. This is the third on this subject that I can remember! For those who haven't seen it, last one is at http://groups.google.com/group/jquery-en/browse_thread/thread/30d3e93a0f339d7b?hl=en It looks like your pages are trig

  1   2   3   4   5   6   7   >