[jQuery] Not working for me in IE7, but works in IE8

2010-01-01 Thread cybervigilante
I just tried a simple alternate colored table rows in jQuery 1.3.2.
It works fine in the good browsers, works in IE8, but doesn't in IE7.
I thought jQuery worked in IE7. I'm using the IE multitester suite.
(It doesn't work in IE6 either, but I stopped thinking about IE6
except in the "dead" sense ;')

Here's the site - it's a table of religious days on the front page.
http://celestialchurchqueens.org

Here's the code - very basic. The alt class gives a light green color
in IE8. I thought maybe my testing suite is off so I'd like to know if
anyone else sees a lack of color bands in IE7.

jQuery(document).ready(function() {
  jQuery('tr:odd').addClass('alt');
});

This is a Joomla site, and since Joomla has an ancient version of
MooTools embedded, I'm using jQuery instead of $ in compatibility mode.


[jQuery] jquery sortable question

2010-01-01 Thread laredotorn...@zipmail.com
Hi,

I'm using the sortable plugin with JQuery 1.3.  After a list item has
been moved to a new place, how do you get the new list item position
-- i.e. it's now the 1st, 2nd, 3rd ... item in the list as opposed to
its position on the screen?

Here's how I'm declaring my sortable list ...

$("#sortable").sortable({
revert: true,
handle : '.adminPrinterHeader',
update : function (event, ui) {
/* What goes here? */
}
}); //

Thanks, - Dave


[jQuery] Cross-Domain Scripting Question

2010-01-01 Thread Vik
I'm using the IntenseDebate comments system. Like Google Adsense, you
add a couple of lines of javascript to your page, and that calls their
server, and inserts all kinds of controls and forms and links on your
page.

I'd like to provide a similar capability to sites which might like it
-- not comments, but something else where forms and data I provide
appear on their page via a few lines of Javascript that I provide.

Where can I read up on how to do this?

Thanks very much in advance to all for any info.



[jQuery] When accordion expands goes out of the DIV

2010-01-01 Thread Jose H.
I am using teh accordion but this is the problem I have:
When some of the tabs are expanded the accordion goes OUT of the DIV I use
to hold it.

How can I make the DIV to automatically grow when the accordion expands ?

Thanks.


Re: [jQuery] Re: Element Exact Width

2010-01-01 Thread Leonardo Balter
Vidas,

I got stuck on what you did in the 'obj.html(obj.children().html());' Isn't
it a redundancy or I'm missing something?



2010/1/1 Šime Vidas 

>
> Better yet, make a function that you can reuse:
>
> function contentWidth(obj) {
>var width = obj.wrapInner("").children().width();
>obj.html(obj.children().html());
>return width;
> }
>
> Now you can use the function like this...
>
> var width = contentWidth($("#myp"));
>



-- 
At,
Leo Balter
http://leobalter.net
Blog técnico: http://blog.leobalter.net


Re: [jQuery] The use of !important

2010-01-01 Thread Olaf Gleba

Am 01.01.2010 um 20:43 schrieb cybervigilante:

> I'm learning jQuery and using it with Joomla, which has huge style
> sheets. Things that worked in my simple HTML training page didn't in
> Joomla, due to CSS conflicts. I realized that although its use is
> discouraged in a style sheet, !important makes things a lot easier if
> I use it in my small jQuery CSS classes. [...]

Right. !important does the trick whenever we struggle with thirdparty CSS.
Nonetheless it shows what bad (inheritance) and unstructured CSS is out there. 
Even in popular CMS Systems like Joomla a.s.o. 

Well-organized CSS does not require to overwrite (and breaking) the inheritance 
chain. 

bye
Olaf

-- 
creatics : Inh. Olaf Gleba
o...@creatics.de : http://creatics.de
PGP-Key http://creatics.de/keys/






Re: [jQuery] Re: jQuery does not stripe visible table rows correctly

2010-01-01 Thread Paul Kim
Thank you all for your helpful suggestions.

On Fri, Jan 1, 2010 at 2:37 PM, Karl Swedberg  wrote:

>
> On Jan 1, 2010, at 3:53 PM, Michael Geary wrote:
>
> I wouldn't use either version.
>
> Instead, I would change your CSS from:
>
> tr.rowodd { background-color: #FFF; }
> tr.roweven { background-color: #F2F2F2; }
>
> to:
>
> tr { background-color: #FFF; }
> tr.roweven { background-color: #F2F2F2; }
>
>
> and then use just one line of jQuery code:
>
> $('#foobar tr:visible:odd').addClass('roweven');
>
> Now you're doing only half the work and letting the CSS cacading rules take
> care of the rest.
>
>
> And if you need to support IE6, you might have trouble applying a
> background-color to a  (I seem to recall having that problem in the
> past). If you do, you could do this instead:
>
> tr td { background-color: #FFF; }
> tr.roweven td { background-color: #F2F2F2; }
>
>
> --Karl
>
> 
> Karl Swedberg
> www.englishrules.com
> www.learningjquery.com
>
>


[jQuery] Re: clone of div

2010-01-01 Thread Šime Vidas
Well, the clone will have the same ID (interestingly)... but only the
first (original) DIV will be selected if you use the id selector...

I suggest changing the ID of the clone right after you create it...

$("#div1").clone(true).attr("id", "div2").insertAfter("#div1");


[jQuery] Re: Help on Independent DIV's that toggle!!

2010-01-01 Thread Šime Vidas
"#" actually is valid (sorry about that)...

So. let' sum up...

We want keyboard accessibility, so we have to use either a A, or a
BUTTON / INPUT type=button...

If we choose the A element, we have to set the href attribute (I'd
rather set it to "'#", than to deal with fragment identifiers... we
won't use them anyway), and we have to return false from the
handler...

If we choose a BUTTON element, we have to deal with browser
inconsistencies regarding the visual appearance...


Re: [jQuery] Re: jQuery does not stripe visible table rows correctly

2010-01-01 Thread Karl Swedberg


On Jan 1, 2010, at 3:53 PM, Michael Geary wrote:


I wouldn't use either version.

Instead, I would change your CSS from:

tr.rowodd { background-color: #FFF; }
tr.roweven { background-color: #F2F2F2; }

to:

tr { background-color: #FFF; }
tr.roweven { background-color: #F2F2F2; }

and then use just one line of jQuery code:

$('#foobar tr:visible:odd').addClass('roweven');

Now you're doing only half the work and letting the CSS cacading  
rules take care of the rest.


And if you need to support IE6, you might have trouble applying a  
background-color to a  (I seem to recall having that problem in  
the past). If you do, you could do this instead:


tr td { background-color: #FFF; }
tr.roweven td { background-color: #F2F2F2; }


--Karl


Karl Swedberg
www.englishrules.com
www.learningjquery.com



[jQuery] The use of !important

2010-01-01 Thread cybervigilante
I'm learning jQuery and using it with Joomla, which has huge style
sheets. Things that worked in my simple HTML training page didn't in
Joomla, due to CSS conflicts. I realized that although its use is
discouraged in a style sheet, !important makes things a lot easier if
I use it in my small jQuery CSS classes. After all, they're being
created and destroyed on the fly, so you're not littering your static
CSS with !important or with truly conflicting CSS, and the jQuery
rules only get activated when they're called. And sometimes, changing
the static CSS to not conflict is very involved, or even means
changing a simple jQuery to something more complicated. So I threw the
standards out the window. For dynamic CSS classes, !important comes in
whenever I have an involved CSS conflict I don't bother trying to
redesign a deep-buried rule in a huge style sheet.


[jQuery] Fade out an initial image to reveal home page

2010-01-01 Thread Trev
Hello, I am completely new to jQuery, and I don't even know how to
approach or implement what I am trying to do.

Before the home page of a site i've developed appears, I want the logo
of the company to appear on the screen, then fade out to reveal the
web page with full functionality. I also could do this be fading out
the logo to reveal a static image of the home page which then could
redirect to actual home page. Please help, and help provided is
greatly appreciated! Thanks!

Trevor


[jQuery] Re: jQuery does not stripe visible table rows correctly

2010-01-01 Thread Šime Vidas
Nice :)


Re: [jQuery] Re: jQuery does not stripe visible table rows correctly

2010-01-01 Thread Michael Geary
I wouldn't use either version.

Instead, I would change your CSS from:

tr.rowodd { background-color: #FFF; }
tr.roweven { background-color: #F2F2F2; }

to:

tr { background-color: #FFF; }
tr.roweven { background-color: #F2F2F2; }

and then use just one line of jQuery code:

$('#foobar tr:visible:odd').addClass('roweven');

Now you're doing only half the work and letting the CSS cacading rules take
care of the rest.

-Mike

On Fri, Jan 1, 2010 at 10:38 AM, Paul Kim  wrote:

> Thanks for your reply. Your solution works. I had a feeling that :even and
> :odd filters are zero-based, but found that to be "odd" in this situation.
> So now that I have 2 ways to stripe visible table rows using jQuery, which
> solution do you prefer?
>
> $('#foobar tbody tr:visible:even').addClass('rowodd');
> $('#foobar tbody tr:visible:odd').addClass('roweven');
>
> or
>
> $('#foobar tbody tr:visible').each(function(i) {
> if ((i+1) % 2 === 0) {
> $(this).addClass('roweven');
> }
> else {
> $(this).addClass('rowodd');
> }
> });
>
> I guess both solutions work so it really doesn't matter, but which method
> would you choose? The first solution contains less code but the second
> solution seems more intuitive.
>
>
>
> 2010/1/1 Šime Vidas 
>
> Also, you really don't need two counters (i and j)
>>
>>var rows = $('#foobar tbody tr:visible');
>> for (var i = 0; i < rows.length; i++){
>>if ((i + 1) % 2 == 0) {
>> rows.eq(i).addClass('roweven');
>>}
>> else {
>> rows.eq(i).addClass('rowodd');
>>}
>>}
>>
>> However, don't use the for loop, you have jQuery's each method...
>>
>>$('#foobar tbody tr:visible').each(function(i) {
>>if ((i+1) % 2 === 0) {
>>$(this).addClass('roweven');
>>}
>>else {
>>$(this).addClass('rowodd');
>>}
>>});
>>
>
>


Re: [jQuery] Re: Help on Independent DIV's that toggle!!

2010-01-01 Thread Karl Swedberg

Šime,

Sorry, but I agree with Scott for the most part.

On Jan 1, 2010, at 10:55 AM, Šime Vidas wrote:

So, you are:

1. going against the standard (misusing the A)


Easily solved by adding a hash identifier:

 More Details
 
   Additional content
   More additional content
   Still more additional content
 

Now it's a perfectly acceptable use.


2. setting an invalid URI to the href attribute


I'm having a hard time finding that in the spec. Can you provide a  
link? (that's a genuine request.)
Anyway, you're inflating the number of "problems" here. Numbers 1 and  
2 should be a single item.



3. doing 2 additional steps (setting href and returning false in
handler)


too "lazy"? ;-) see your comment below.


4. taking the risk that you will at one occasion forget to return
false in the handler which would mess up the Back button for the user


Or call event.preventDefault()
It's a risk I'm willing to take.


just because you are to "lazy" (no offense) to put this in your CSS
code:

.slick-toggle { color:blue; text-decoration:underline; }
.slick-toggle:hover { cursor:pointer; }

But, chances are that you will have to style the slick-toggle class
anyway (because blue underlined text with everything else inherited
doesn't "bring it" anyway in most cases).


You've also overlooked an important reason for using an href="#foo"> (or a button) rather than a  or some other element:  
Keyboard accessibility. I suppose you could play around with tabindex  
attributes, but that gets thorny pretty quickly. Besides, at least  
according to the html 4.01 spec, only a limited set of elements  
support the tabindex attribute:


"The following elements support the tabindex attribute: A, AREA,  
BUTTON, INPUT, OBJECT, SELECT, and TEXTAREA."

http://www.w3.org/TR/html401/interact/forms.html#adef-tabindex

(Seems some browsers actually support a broader set of elements, but I  
haven't investigated this much.)


So, with  elements you're left with no valid way to navigate to  
them and invoke them with a keyboard. That's a pretty serious  
limitation -- one that I think far outweighs the concerns that you've  
raised about .



--Karl


Karl Swedberg
www.englishrules.com
www.learningjquery.com



[jQuery] Re: clone of div

2010-01-01 Thread CreativeMind
thanx
will it give me different div id's?

so that i may find any child element on it's parent's div id.
like
$('#parent').child(0) to get 1st div child
and
$("#parent1").child(0) will give me cloned div's first child.

how can i differentiate between these divs?


thanx


On Jan 2, 12:43 am, Šime Vidas  wrote:
> $("#parentdiv").clone(true).insertAfter("#parentdiv");


[jQuery] Re: clone of div

2010-01-01 Thread Šime Vidas

$("#parentdiv").clone(true).insertAfter("#parentdiv");


[jQuery] clone of div

2010-01-01 Thread CreativeMind
i have a parent div with 10 divs and other controls as childrens.. now
i've a button which is used to create another parentdiv with all
childrens. how can i insert the similar code on each click like




..


-the button click should insert the same thing


$("#btn").click(function(){

???.insertAfter($("parentdiv"));

});

how can i do that?
thanx


[jQuery] Re: Element Exact Width

2010-01-01 Thread Šime Vidas

Better yet, make a function that you can reuse:

function contentWidth(obj) {
var width = obj.wrapInner("").children().width();
obj.html(obj.children().html());
return width;
}

Now you can use the function like this...

var width = contentWidth($("#myp"));


[jQuery] Re: Element Exact Width

2010-01-01 Thread Šime Vidas
1 error in the code above, this is right:

var width = $("p").wrapInner("").children().width();
$("p").html($("p").children().html());


[jQuery] Re: Element Exact Width

2010-01-01 Thread Šime Vidas

var width = $("p").wrapInner("").children().width();
$("#myp").html($("p").children().html());


Re: [jQuery] Re: jQuery does not stripe visible table rows correctly

2010-01-01 Thread Paul Kim
Thank you. Have a great New Year.

2010/1/1 Šime Vidas 

> Well, definitely the shorter version :)
> You can put a comment above to remind you that :even and :odd are
> tricky
>
> // Remember, :even and :odd are zero-based, so it's reversed
> $('#foobar tbody tr:visible:even').addClass('rowodd');
> $('#foobar tbody tr:visible:odd').addClass('roweven');
>


[jQuery] Re: jQuery does not stripe visible table rows correctly

2010-01-01 Thread Šime Vidas
Well, definitely the shorter version :)
You can put a comment above to remind you that :even and :odd are
tricky

// Remember, :even and :odd are zero-based, so it's reversed
$('#foobar tbody tr:visible:even').addClass('rowodd');
$('#foobar tbody tr:visible:odd').addClass('roweven');


[jQuery] Re: trying to do Math.min on 3 tds by excluding if one = 0

2010-01-01 Thread Šime Vidas
This shoud do the job...

$("tr." + i).each(function() {
var ithis = $(this).find("td:lt(3)").map(function() {
if ($(this).html() === "0") {
return null;
} else {
return this;
}
}).min();
$(this).find("td.r1").empty().append(roundVal(ithis));
});

so, you select the first 3 cells, and then do the map function, which
is similar to each... for every selected cell, if its content is "0",
then "deselect" it... so after the map function, you only have those
cells that doesn't contain "0", on them you run min()


Re: [jQuery] Re: jQuery does not stripe visible table rows correctly

2010-01-01 Thread Paul Kim
Thanks for your reply. Your solution works. I had a feeling that :even and
:odd filters are zero-based, but found that to be "odd" in this situation.
So now that I have 2 ways to stripe visible table rows using jQuery, which
solution do you prefer?

$('#foobar tbody tr:visible:even').addClass('rowodd');
$('#foobar tbody tr:visible:odd').addClass('roweven');

or

$('#foobar tbody tr:visible').each(function(i) {
if ((i+1) % 2 === 0) {
$(this).addClass('roweven');
}
else {
$(this).addClass('rowodd');
}
});

I guess both solutions work so it really doesn't matter, but which method
would you choose? The first solution contains less code but the second
solution seems more intuitive.



2010/1/1 Šime Vidas 

> Also, you really don't need two counters (i and j)
>
>var rows = $('#foobar tbody tr:visible');
> for (var i = 0; i < rows.length; i++){
>if ((i + 1) % 2 == 0) {
> rows.eq(i).addClass('roweven');
>}
> else {
> rows.eq(i).addClass('rowodd');
>}
>}
>
> However, don't use the for loop, you have jQuery's each method...
>
>$('#foobar tbody tr:visible').each(function(i) {
>if ((i+1) % 2 === 0) {
>$(this).addClass('roweven');
>}
>else {
>$(this).addClass('rowodd');
>}
>});
>


[jQuery] problem with validation plugin using the remote option

2010-01-01 Thread rmirabelle
I'm having a problem with the validation plugin.  Any time I try to
use the remote option, I get the same javascript error, regardless of
my configuration settings.  The error is this:

Error: this.settings.messages[element.name] is undefined
Source File: http://localhost/toldya6/liquid/scripts/js/jquery/validate.js
Line: 16

Here's the code:

$().ready(function() {
$('#frm_user').validate({
errorContainer: "#invalid",
rules: {
password: "required",
confirm_password: { equalTo: "#password" },
email: {
remote: 'check-email.php'
}
}
});
});

my check-email.php file does only this:



my form looks like this:

 

  

  
  
Your Email *

  
  


  


  

  

the error also appears if I remove the inline class="{required:true,
email:true}" from the email field.

Help!


[jQuery] Re: jQuery does not stripe visible table rows correctly

2010-01-01 Thread Šime Vidas
Also, you really don't need two counters (i and j)

var rows = $('#foobar tbody tr:visible');
for (var i = 0; i < rows.length; i++){
if ((i + 1) % 2 == 0) {
rows.eq(i).addClass('roweven');
}
else {
rows.eq(i).addClass('rowodd');
}
}

However, don't use the for loop, you have jQuery's each method...

$('#foobar tbody tr:visible').each(function(i) {
if ((i+1) % 2 === 0) {
$(this).addClass('roweven');
}
else {
$(this).addClass('rowodd');
}
});


[jQuery] Re: jQuery does not stripe visible table rows correctly

2010-01-01 Thread Šime Vidas

> The problem is that jQuery assigns a class of 'roweven' to odd
> numbered  elements and a class of 'rowodd' to even numbered 
> elements across all browsers. I've tested this on jQuery 1.3.2 and
> jQuery 1.3.1.

The :even and :odd filters are zero-based, so if you select (in your
example) 10 rows, the 1. row has index 0 and will be matched by
the :even filter, the 2. row has index 1 and will be matched by :odd,
and so on




> 
> $(document).ready(function() {
>         var j = 0;
>         var rows = $('#foobar tbody tr:visible');
>         for (i = 0; i < rows.length; i++){
>                 j++;
>                 if (j % 2 == 0) {
>                         rows[i].className = 'roweven';
>                 }
>                 else {
>                         rows[i].className = 'rowodd';
>                 }
>         }});
>
> 

I changed these 2 lines...
rows[i].className = 'roweven';
rows[i].className = 'rowodd';

to this:
rows.eq(i).addClass('roweven');
rows.eq(i).addClass('rowodd');

and now it works in IE8



[jQuery] Re: superfish: disable arrows in first list

2010-01-01 Thread Thies
Thanx, but if the solution would be so easy, I won't have problems.

On 30 Dez. 2009, 19:15, Charlie  wrote:
> simple solution is use css to hide them, or use jquery to remove them
> Thies wrote:Hi, is it possible to "disable" the arrows at superfish only at 
> the first list, so that the arrow will only be shown in the sublists? Thanx a 
> lot Frank, Germany


[jQuery] Re: Help on Independent DIV's that toggle!!

2010-01-01 Thread Šime Vidas
The A element is to be used to link to an web-resource, an you are not
doing that. "#" (as in href="#") is not a URI for a web-resource, I'm
not even sure that it is a valid URI at all.
So to be clear, you are misusing the A element.

OK, now, you have to set the href attribute to "#" and make the click
handler return false (to prevent the default behavior). If you used a
SPAN, these two steps would not be necessary.

BTW, forgetting to return false in the handler would add another
element to the window.history object, so hitting the Back button would
not load the previous page (you would have to click it twice).

So, you are:

1. going against the standard (misusing the A)
2. setting an invalid URI to the href attribute
3. doing 2 additional steps (setting href and returning false in
handler)
4. taking the risk that you will at one occasion forget to return
false in the handler which would mess up the Back button for the user

just because you are to "lazy" (no offense) to put this in your CSS
code:

.slick-toggle { color:blue; text-decoration:underline; }
.slick-toggle:hover { cursor:pointer; }

But, chances are that you will have to style the slick-toggle class
anyway (because blue underlined text with everything else inherited
doesn't "bring it" anyway in most cases).



[jQuery] Re: jquery.js and jquery-1.2.6.pack.js conflict

2010-01-01 Thread MorningZ
"I did tried to remove one library but if i remove
jquery-1.2.6.pack.js then image gallery doesnot work and if i remove
jquery.js menus stop working"

Well, maybe instead of pointing fingers to jQuery as the issue, how
about looking into fixing either of your code, the image gallery would
be the smarter choice since fixing that will allow you to move to the
newest version of the jQuery framework...

this is an excellent article diagnosing the three biggest issues going
from 1.2.6 to 1.3.x

http://www.learningjquery.com/2009/03/3-quick-steps-for-a-painless-upgrade-to-jquery-13

that's where I would start  :-)

On Jan 1, 5:51 am, "Mr.Aaqib"  wrote:
> Thnx for your reply. I did tried to remove one library but if i remove
> jquery-1.2.6.pack.js then image gallery doesnot work and if i remove
> jquery.js menus stop working. Now i tried prototype image gallery and
> same problem. when i include prorotype .js gallery menus stop working
> and if include jquery.js file for menus image gallery does not work.
>
> Any Idea??
>
> On Dec 31 2009, 10:07 pm, brian  wrote:
>
> > You should only load one of those files. The version included with
> > jCarousel is there as a convenience. It's not necessary to use it if
> > you already are loading jQuery. It's likely the unpacked version is
> > newer, anyway.
>
> > On Thu, Dec 31, 2009 at 7:21 AM, Mr.Aaqib  wrote:
> > > Hi,
>
> > > Recently i created menu and image gallery. I used jquery.js for menus
> > > and for image gallery i used jquery-1.2.6.pack.js as provided by
> > > carousels galleries. Now both of them does not work at same time. If i
> > > include both file image gallery script generates error message and if
> > > i remove the menus jquery.php file menus does not work but image
> > > gallery works as expected.
>
> > > I dont know whether its version conflict or something else. Any help
> > > will be highly appreciated.
>
> > > Regards
> > > Aaqib Iqbal


[jQuery] Re: jquery.js and jquery-1.2.6.pack.js conflict

2010-01-01 Thread MorningZ
also, while debugging/diagnosing:  use the *full* versions of the
files, do not use packed or minified, as they complicated matters a lot


[jQuery] jQuery does not stripe visible table rows correctly

2010-01-01 Thread kimbaudi
Hi, this is my first post on the jQuery Google group.  I have been
using the Prototype Javascript library and am now trying to learn to
use the jQuery Javascript library.  For my first attempt at using
jQuery, I have been trying to stripe visible table rows and found that
jQuery does this incorrectly or poorly.

Here is the css and html:


tbody { background-color: #F6F6F6; }
tr.rowodd { background-color: #FFF; }
tr.roweven { background-color: #F2F2F2; }
.remove { display:none; }




intmonth_fulltxtmonth_shrttxtmonth_fullnummonth_shrtnum


intmonth_fulltxtmonth_shrttxtmonth_fullnummonth_shrtnum


1JanuaryJan011
2FebruaryFeb022
3MarchMar033
4AprilApr044
5MayMay055
6JuneJun044
7JulyJul077
8AugustAug088
9SeptemberSep099
10OctoberOct1010
11NovemberNov
12DecemberDec1212



And here is the first Javascript utilizing jQuery:


$(document).ready(function(){
$('#foobar tbody tr:visible:even').addClass('roweven');
$('#foobar tbody tr:visible:odd').addClass('rowodd');
});


The problem is that jQuery assigns a class of 'roweven' to odd
numbered  elements and a class of 'rowodd' to even numbered 
elements across all browsers. I've tested this on jQuery 1.3.2 and
jQuery 1.3.1.

So I tried to do this a different way and here is the second
Javascript utilizing jQuery:


$(document).ready(function() {
var j = 0;
var rows = $('#foobar tbody tr:visible');
for (i = 0; i < rows.length; i++){
j++;
if (j % 2 == 0) {
rows[i].className = 'roweven';
}
else {
rows[i].className = 'rowodd';
}
}
});


Although this works in FF, Chrome, Opera and Safari, the problem is
that it does not work in IE8 (and most likely other IE versions) when
I use jQuery 1.3.2. It does work in all browsers including IE8 if I
use jQuery 1.3.1. The problem in IE8 is that jQuery 1.3.2 does not
hide the  element even though it has a css rule of
{display:none;}. It does, however, hide 
element.

I have been able to stripe visible table rows without any problems
using native Javascript and the Prototype Javascript library, but not
w/ the jQuery Javascript library.


[jQuery] Re: jquery.js and jquery-1.2.6.pack.js conflict

2010-01-01 Thread Ashwanth Kumar
Well, did u use jQuery when used with Prototype, as prototype has its
own $() implementation!!

 - Ashwanth Kumar

On Jan 1, 3:51 pm, "Mr.Aaqib"  wrote:
> Thnx for your reply. I did tried to remove one library but if i remove
> jquery-1.2.6.pack.js then image gallery doesnot work and if i remove
> jquery.js menus stop working. Now i tried prototype image gallery and
> same problem. when i include prorotype .js gallery menus stop working
> and if include jquery.js file for menus image gallery does not work.
>
> Any Idea??
>
> On Dec 31 2009, 10:07 pm, brian  wrote:
>
>
>
> > You should only load one of those files. The version included with
> > jCarousel is there as a convenience. It's not necessary to use it if
> > you already are loading jQuery. It's likely the unpacked version is
> > newer, anyway.
>
> > On Thu, Dec 31, 2009 at 7:21 AM, Mr.Aaqib  wrote:
> > > Hi,
>
> > > Recently i created menu and image gallery. I used jquery.js for menus
> > > and for image gallery i used jquery-1.2.6.pack.js as provided by
> > > carousels galleries. Now both of them does not work at same time. If i
> > > include both file image gallery script generates error message and if
> > > i remove the menus jquery.php file menus does not work but image
> > > gallery works as expected.
>
> > > I dont know whether its version conflict or something else. Any help
> > > will be highly appreciated.
>
> > > Regards
> > > Aaqib Iqbal


[jQuery] Re: Help on Independent DIV's that toggle!!

2010-01-01 Thread Scott Sauyet
On Dec 31 2009, 5:10 pm, Šime Vidas  wrote:
> Scott, you used A elements as JS triggers which is not proper... the A
> element is for linking to other web-resources. If you need an element
> for onclick JS execution, just use a button or a SPAN element

Well, I was modifying existing code, which had  elements.  There's
only so many changes you can make at a time.

But still, I don't think I agree with you about the unsuitability of
using them so.  First of all, they do link to additional resources,
albeit ones that are on the same page (and of course we use them that
way to in non-JS markup.)  And secondly, while I believe in keeping
initial markup quite clean, I don't feel any compunction about using
whatever generated DOM elements make my job easier.  Sure I could use
a  to do the same job, but then I'd need to style it like a
default link, add hover behavior to it for the mouse pointer.  I don't
see the advantage.

Is there any compelling reason you can explain to avoid them here?

  -- Scott


[jQuery] Re: Dialog bug

2010-01-01 Thread Yuriy Pobezhymov
Thank you much. It's work!
Happy New Year!!!


Re: [jQuery] Dialog bug

2010-01-01 Thread Richard D. Worth
This is because the iframe is picking up the mouse events and not the page
that the dialog is in. To prevent this, place a div over the entire iframe
during the dialog drag. You can create and position this element in the
dialog's dragStart and remove it in the dragStop:

http://docs.jquery.com/UI/Dialog#event-dragStart

http://docs.jquery.com/UI/Dialog#event-dragStop

- Richard

On Fri, Jan 1, 2010 at 6:20 AM, Yuriy Pobezhymov <
yuradoc.commerc...@gmail.com> wrote:

> Hello.
> I have iframe (100% width and height) and jQueryUI dialog on the page.
> I don't know why, but when I move or resize dialog, it's work not
> correctly.
> You could see example here: http://lst.zt.ua/example
> If I make width:50%, than dialog works very good on blank part of
> page, but don't work correctly on iframe part.
>


[jQuery] Dialog bug

2010-01-01 Thread Yuriy Pobezhymov
Hello.
I have iframe (100% width and height) and jQueryUI dialog on the page.
I don't know why, but when I move or resize dialog, it's work not
correctly.
You could see example here: http://lst.zt.ua/example
If I make width:50%, than dialog works very good on blank part of
page, but don't work correctly on iframe part.


[jQuery] Re: jquery.js and jquery-1.2.6.pack.js conflict

2010-01-01 Thread Mr.Aaqib
Thnx for your reply. I did tried to remove one library but if i remove
jquery-1.2.6.pack.js then image gallery doesnot work and if i remove
jquery.js menus stop working. Now i tried prototype image gallery and
same problem. when i include prorotype .js gallery menus stop working
and if include jquery.js file for menus image gallery does not work.

Any Idea??

On Dec 31 2009, 10:07 pm, brian  wrote:
> You should only load one of those files. The version included with
> jCarousel is there as a convenience. It's not necessary to use it if
> you already are loading jQuery. It's likely the unpacked version is
> newer, anyway.
>
> On Thu, Dec 31, 2009 at 7:21 AM, Mr.Aaqib  wrote:
> > Hi,
>
> > Recently i created menu and image gallery. I used jquery.js for menus
> > and for image gallery i used jquery-1.2.6.pack.js as provided by
> > carousels galleries. Now both of them does not work at same time. If i
> > include both file image gallery script generates error message and if
> > i remove the menus jquery.php file menus does not work but image
> > gallery works as expected.
>
> > I dont know whether its version conflict or something else. Any help
> > will be highly appreciated.
>
> > Regards
> > Aaqib Iqbal


[jQuery] Re: trying to do Math.min on 3 tds by excluding if one = 0

2010-01-01 Thread hollow
Hi min() is part of jquery calculation plugin.

if i use
var xmin = Math.min(x1, x2, x3)
example var xmin = Math.min(5, 0, 3)
the result will be 0 and i don't want that result. i would like to
have 3 as the best result.

example: compare prices that are in a database, but you haven't a
price for the 3rd store, you can't compare 0 to a real price from the
2 other stores. so the best price is among the 2 remaining stores.
that's why i want to exclude 0 from the calculation.

regards

On Dec 31 2009, 11:21 pm, Šime Vidas  wrote:
> I'm not sure what youre trying to do here...
> but the jQuery object does not contain the min() method as a property.
>
> To use the Math.min method, you give the values as arguments...
>
> var xmin = Math.min(x1, x2, x3);