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

2009-12-05 Thread Vlad GURDIGA
Maybe something like this would work? $(function() { $("#thumbs div").click(function() { $(this).toggleClass("selected"); if ($("#thumbs").data("user already selected their first favorite")) { if ($(this).hasClass("selected")) { $(this).fadeTo("slow", 1); } else {

[jQuery] data() for an element in another frame

2009-12-05 Thread gurdiga
I'm sorry to cross-post, but it has been two months without any answer from jquery-dev group, so, Hello, It looks like the data() method is not working "as expected" when used with elements from another frame (or iframe). Let's say we have an iframe. If we say inside it something like: $("body"

[jQuery] $.inArray optimisation

2009-08-23 Thread gurdiga
Hello, The $.inArray function is defined in http://jqueryjs.googlecode.com/svn/trunk/jquery/src/core.js as: inArray: function( elem, array ) { for ( var i = 0, length = array.length; i < length; i++ ) { if ( array[ i ] === elem ) {