[jQuery] Re: slideUp very slow depending on number of fields above

2010-01-12 Thread Eric Cope
Update: My Firefox memory must have been overloaded - I restarted Firefox
and the times are down to 100ms, as expected. Could jquery be adding things
to the DOM slowing down parsing?
Eric

On Wed, Jan 13, 2010 at 12:29 AM, Eric Cope  wrote:

> Hello all,
> I am using the slideUp animation to hide a div.  Above the div, are 25
> other divs that may or may not be visible. The speed of the slideUp
> animation depends on how many of those divs are visible. if 25 divs
> are visible, the animation takes 1200ms. If 20 divs are visible, the
> animation takes 700ms. If 15 divs are visible, it takes 600ms. If 10
> divs are visible, it takes 470-500 ms. if 5 divs are visible it takes
> ~350ms (as an fyi the slideDown takes 350ms regardless of divs
> visible).
>
> About half the time is spend in css() and half in hidden(). I don't
> see why it should take upto 600ms to compare two values in hidden().
> If I take out slideUp and place in hide() it takes longer!
> If I take out slideUp and place in
>document.getElementById("endorsementFeeAdjust").style.display =
> 'none';
> The css() time goes to 0, but hidden is still taking the same amount
> of time.
>
> If I take out the fadeOut and fadeIn, then the hidden drops to 0 as
> well. Why does hidden take so long?
>
> $("#addEndorseFeeBtn").click(function() {
>if($("#endorsementFeeAdjust").is(":hidden")){
>$("#endorsementFeeAdjust").slideDown("slow",function
> () {
>
>  $("#addEndorseFeeBtn").fadeOut("fast").text("Remove Endorsement
> Fee Adjustment").fadeIn("fast");
>});
>}
>else {
>$("#endorsementFeeAdjust").slideUp('slow', function
> () {
>
>  $("#addEndorseFeeBtn").fadeOut('slow').text("Add Endorsement Fee
> Adjustment").fadeIn("fast");
>
>  //$("#endorsementFeeAdjustmentDescription").val("");
>
>  //$("#endorsementFeeAdjustmentAmount").val("");
>document.getElementById
> ("endorsementFeeAdjustmentDescription").value = '';
>
>  document.getElementById("endorsementFeeAdjustmentAmount").value
> = '';
>});
>}
>});
>
> Thank you,
> Eric




-- 
Eric Cope
http://cope-et-al.com


[jQuery] tabs in one line, on small resolution

2010-01-12 Thread NMarcu
Hello all. I'm using jquery tabs, and I have 6 tabs. On a big
resolution, everithing is OK, but on 800x600, the last tab, go to
second line. How can I set tabs, to remain in one line, not depending
by resolution, or of the number of tabs?


[jQuery] Re: Superfish 1.4.8 accessibility enhancement

2010-01-12 Thread Jason Denizac
You can of course use my (minor) modification under an MIT license.

Since Superfish 1.4.8 is offered under both MIT and GPL, you are free
to create your own fork. This plugin still gets tons of use, I think
it would be good for the community to have a more current release. You
should start a google code project for it.

-Jason

On Jan 10, 2:12 pm, decola  wrote:
> Im really wondering where the developer of this project ... anyway i
> made some enhancements to superfish by myself. Am i allowed to copy
> and paste your code into my work.
>
> Because if the developer of superfish does not answer i will maybe
> make an own project like "superfish menu enhanced" or so.
>
> so far decola
>
> On 7 Jan., 20:55, Jason Denizac  wrote:
>
>
>
> > Superfish is a jQuery plugin for progressive enhancement of suckerfish-
> > style HTML/CSS drop-down menus. It can be found 
> > athttp://users.tpg.com.au/j_birch/plugins/superfish/
>
> > The original Superfish plugin used jQuery's hide() method, which sets
> > an inline css attribute of display: none on the hidden menus. This has
> > the unintended effect of making screen readers skip over the submenus.
> > Since screen readers cannot easily trigger the hover event, this
> > effectively blocks them from accessing any of the sub menu items.
>
> > This modification changes the css technique used to hide the menus
> > visually while leaving them available for screen readers.
>
> > You can grab the updated code herehttp://jsbin.com/useku
>
> > (Apologies if this is the wrong place for this posting - the author of
> > the original Superfish plugin mentioned this list as the place for
> > support for the plugin. Thanks!)
>
> > Jason Denizac


[jQuery] slideUp very slow depending on number of fields above

2010-01-12 Thread Eric Cope
Hello all,
I am using the slideUp animation to hide a div.  Above the div, are 25
other divs that may or may not be visible. The speed of the slideUp
animation depends on how many of those divs are visible. if 25 divs
are visible, the animation takes 1200ms. If 20 divs are visible, the
animation takes 700ms. If 15 divs are visible, it takes 600ms. If 10
divs are visible, it takes 470-500 ms. if 5 divs are visible it takes
~350ms (as an fyi the slideDown takes 350ms regardless of divs
visible).

About half the time is spend in css() and half in hidden(). I don't
see why it should take upto 600ms to compare two values in hidden().
If I take out slideUp and place in hide() it takes longer!
If I take out slideUp and place in
document.getElementById("endorsementFeeAdjust").style.display =
'none';
The css() time goes to 0, but hidden is still taking the same amount
of time.

If I take out the fadeOut and fadeIn, then the hidden drops to 0 as
well. Why does hidden take so long?

$("#addEndorseFeeBtn").click(function() {
if($("#endorsementFeeAdjust").is(":hidden")){
$("#endorsementFeeAdjust").slideDown("slow",function () 
{

$("#addEndorseFeeBtn").fadeOut("fast").text("Remove Endorsement
Fee Adjustment").fadeIn("fast");
});
}
else {
$("#endorsementFeeAdjust").slideUp('slow', function () {

$("#addEndorseFeeBtn").fadeOut('slow').text("Add Endorsement Fee
Adjustment").fadeIn("fast");

//$("#endorsementFeeAdjustmentDescription").val("");
//$("#endorsementFeeAdjustmentAmount").val("");
document.getElementById
("endorsementFeeAdjustmentDescription").value = '';

document.getElementById("endorsementFeeAdjustmentAmount").value
= '';
});
}
});

Thank you,
Eric


Re: [jQuery] iHwy creditcard2 validation extension fails on some Discover cards

2010-01-12 Thread Jack Killpatrick

Hi,

We've made the change to the plugin and are hoping to deploy it tonight. 
After it's deployed I'll post an ANNOUNCE here. Thanks for bringing this 
to my attention. We also added LaserCard support and updated some other 
card prefixes.


- Jack

dnfdrmn wrote:

Hi all,

We're working with Paypal sandbox generated Discover cards, and
they're not passing the iHwy credit card validation extension for
jQuery. This seems to be a PayPal issue, as PayPal is generating
invalid IIN ranges.

But in our research, we noticed that the iHwy extension isn't properly
validating *newer* Discover IIN range updates (two PDFs are available
online, from

An update that takes into account the new ranges -- 6011,
622126-622925, 644-649, 65 -- would be much appreciated.

regards,
dnfdrmn

  





[jQuery] keep executing the script after a few seconds

2010-01-12 Thread runrunforest
Say i want the alert message "hello" appear every 90 seconds, how can
i do it ?


[jQuery] Re: Make BlockUI synchronous

2010-01-12 Thread Dave Methvin
When the button is clicked, set a variable to the current time and
return false from the handler to cancel the submit. When your ajax
completes, do a settimeout for the difference between the variable you
set and the min length of time  you want to show the blockui. When the
settimeout fires it can do the $("#myform").submit() to submit the
form.

On Jan 12, 11:48 am, Vince  wrote:
> Hello all,
>
> I have this  and a submit button.
>
> I then try the following inside my document ready:
>
> $("#btnSubmit").click(function() {
>
>             $.blockUI({
>                 theme: true,
>                 title: 'My title',
>                 message: 'My message...',
>                 timeout: 8000
>             });
>
>             return true;
>
> });
>
> Unfortunately the form is being submitted and completely disregards
> the timout attribut I've set.
> So I'm assuming there isn't a way to make blockUI synchronous and
> really wait the timeout time and then, submit the form.
>
> The reason I'm asking is because I'm having the exact same scenario as
> this post:http://osdir.com/ml/jQuery/2009-02/msg02094.html
>
> I'm using both IE and FF
>
> In a nutshell, between the blockUI and the return true I make an ajax
> call. The time it takes varies a lot...it can be really quick like it
> can take 15 seconds...
>
> When the call is quick, the users barely has the time to view the
> blockUI and read what's inside...the form gets submitted but they are
> like..."What happened? What was written there? I didn't have enough
> time to read"...
>
> So to avoid, this, I always want a minimum of time for the blockUI to
> appear even if the ajax call is quick.
>
> As for what happens if the ajax call is lets say...15 seconds...well
> that's another story!
> I'd first like to know if this is even possible...to NOT make my form
> submit until it has reached the timeout attribute I've set inside the
> blockUI parameters.
>
> Thanks in advance
> Sincerely
>
> Vince


[jQuery] Easy Transition to JQUERY - i hope this is right place to post this question

2010-01-12 Thread Mole
I am not a programmer but a designer and after a lot of trial and
error using examples I got this code working. I have been studying
JQUERY for a week and want to use it in place of my original AJAX, but
I am confused as to the best methods to use to get the same capability
and most efficient response.

Is there an easy way to transition my existing AJAX script into what
is obviously the more efficient JQUERY methods. I essentially have a
set of category buttons (images in a class) called from a MySQL
database (9 load at start - lev is 1) on selection of a button I call
the database to get the next level of buttons and replace the cat
buttons. I know I need to use the  $.getJSON("scripts/getcat.php",
calling my php script which extracts the data from the database and
returns the JSON formatted data.
but cant quite get the placement of var and callback.

MUST BE MUCH EASIER WITH JQUERY Thanks in advance for any for any
guidance.

// selectlist.js
var xmlhttplist;
showList(0,1);
function showList(cat,lev)
{
xmlhttplist=GetXmlHttpObjectList();
if (xmlhttplist==null)
{
alert ("Browser does not support HTTP Request");
return;
}
var url="scripts/getlist.php";
url=url+"?cat="+cat;
url=url+"&lev="+lev;
url=url+"&sid="+Math.random();
xmlhttplist.onreadystatechange=stateChangedList;
xmlhttplist.open("GET",url,true);
xmlhttplist.send(null);
}
function stateChangedList()
{
if (xmlhttplist.readyState==4)
{

var xmlDoc=xmlhttplist.responseXML;

// Load list
var mainData = "";
var x=xmlDoc.getElementsByTagName("Category");
var lastLev = xmlDoc.getElementsByTagName("Category")
[x.length-1].getElementsByTagName("NextLevel")[0].childNodes
[0].nodeValue;
var currLev = lastLev + 1;

for (i=0;i";
break;
}
}
if (lastLev < 3)
{
mainData +=
""+

xmlDoc.getElementsByTagName("Category")[i].getElementsByTagName
("Name")[0].childNodes[0].nodeValue+
"";
}
else if (lastLev == 3)
{
mainData +=
""+

xmlDoc.getElementsByTagName("Category")[i].getElementsByTagName
("Name")[0].childNodes[0].nodeValue+
"";
}
else
{
mainData +=
""+

xmlDoc.getElementsByTagName("Category")[i].getElementsByTagName
("Name")[0].childNodes[0].nodeValue+
""+

xmlDoc.getElementsByTagName("Category")[i].getElementsByTagName
("NextCategory")[0].childNodes[0].nodeValue+
"";
}
}
// Load main
document.getElementById("main").innerHTML=mainData;

// Load banners
for (i=0;i<7;i++)
{
var pos = "b"+(i+1);
document.getElementById(pos).innerHTML=
"";
}
}
}
function GetXmlHttpObjectList()
{
if (window.XMLHttpRequest)
{
// code for IE7+, Firefox, Chrome, Opera, Safari
return new XMLHttpRequest();
}
if (window.ActiveXObject)
{
// code for IE6, IE5
return new ActiveXObject("Microsoft.XMLHTTP");
}
return null;
}


[jQuery] Superfish: 2nd dropdown positioning

2010-01-12 Thread mcpilot
I have Superfish installed on a website and have a 3-tier dropdown. li/
li/li. The 3rd tier is not positioned correctly, it's behind the
second  tier. (http://208.84.152.20/~loveland1)

Lookiung for the CSS line to tweak to move that out.

Pat


[jQuery] image cycle, fade on click

2010-01-12 Thread Simon
Hi I'm trying with no luck to "fade on click" the image cycle, can
anyone offer any assistance to a novice.
Fading is ok but I'm not sure where to add the onClick.

Thanks

Simon


[jQuery] simple plugin script

2010-01-12 Thread Dean
In my plugin, I'd like to provide a constructor (or sorts) that
returns an extended jQuery object with some additional functionality.

I've reduced this problem down to a very simple test case.

I don't get an error until I attempt to run a method of the new,
extended object. The error is "foo.rename is not a function". This
apparently means that I was not successful in extending $(this) in the
plugin's constructor, but I'm not sure why. Does anyone know why?




  Test
  http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/
jquery.js" type="text/javascript">
  
(function($)
{
  /* Extend the jQuery prototype so any selected element(s) can
implement create_content. */
  $.fn.extend
  ({
/* Initialize this extended object. */
create_content: function(settings)
{
  /* Initialize all matched elements. */
  return this.each(function(i, el)
  {
/* Extend $(this) with additional properties and methods. */
$.extend(false, $(this),
  {
s: settings,
/* Show this content. */
activate: function()
{
  return this.show();
},
/* Hide this content. */
deactivate: function()
{
  return this.hide();
},
/* Change the content. */
rename: function()
{
  return this.html(settings["text"]);
}
  }
);
  });
}, // end create_content
  }); // end $.fn.extend
})(jQuery);

$(document).ready(function()
{
  var foo = $("#foo").create_content({ text: "New text for
foo." }); // Error: foo.rename is not a function.
  var bar = $("#bar").create_content({ text: "New text for bar." });

  foo.rename();
  bar.rename();
});



  Foo
  Bar




[jQuery] Add option to autocomplete plugin to set method

2010-01-12 Thread Devether
Hello,

Would it be possible to add the choice of method in options ?

eg:
$("#username").autocomplete(url, {max: 50, type: 'POST'});


Devether


[jQuery] Actually deleting instead of .remove

2010-01-12 Thread sophos707
Hi everyone,
I'm running a script that processes text messages people send in, and
then it displays them on a screen.  It will loop the text messages
when there are too many to show on one screen.

To accomplish this I add DIVs with a new ID for each new message.  The
new messages push the old ones off the screen eventually.  But when
this is the case the memory in the browser just keeps increasing to a
frightening load!

I tried using $("#MyDivId").remove() to get rid of the DIVs no longer
on the screen.  Memory keeps increasing.  Found out in this forum
that .remove() just hides an element in the DOM and makes in
inaccessible rather than actually deleting it.

How can we actually delete elements?
Thanks!
- Jeff


[jQuery] background mouseover fade effect

2010-01-12 Thread 1.am.W1z4rd
I need to add a mouseover effect to the navigation for a site that I'm
building.  I need the backgroundColor to fade from none, to black, and
then on mouseout, I need it to fade back to none.  This would be easy
if I were using two colors, but since I'm using 'none' as one of the
color's, I don't know what to do.  I have tried:

[code]
$('.nav_link').hover(function() {
$(this).animate({backgroundColor: '#00'});
}, function() {
$(this).animate({backgroundColor: 'none'});
});
[/code]

but that doesn't seem to work.

Any help / plugin links would be greatly appreciated.

Thanks, bye.


RE: [jQuery] Re: Function help

2010-01-12 Thread Dave Maharaj :: WidePixels.com

But I think I started off wrong using the click functions the form should be
bind submit no?

I am here now but nothing

addTest('#add_test'); //this is the form ID and on the html page


Below is in the external js sheet


function addTest(selector)
{
var $form = $(selector);

$form.submit( function() {



var form_url = $form.attr('action');
alert(form_url);

return false;
  });


}

But no alert. Any ideas?

Thanks

Dave

-Original Message-
From: MorningZ [mailto:morni...@gmail.com] 
Sent: January-12-10 3:53 PM
To: jQuery (English)
Subject: [jQuery] Re: Function help

$('#new').live('click', function() {
 addRecord($(this).closest("form").attr("id"));
});

function addRecord(form_id) {
.. stuff ...
});
No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 9.0.725 / Virus Database: 270.14.130/2607 - Release Date: 01/12/10
04:05:00



Re: [jQuery] What software distributes jQuery?

2010-01-12 Thread Massimo Lombardo
On Tue, Jan 12, 2010 at 20:54, justintr  wrote:
> Are there any products that currently distribute jQuery?

Just to name the first ones that popped up in my mind:
- Aptana Inc. Aptana Studio, through plugin [1]
- ActiveState Komodo (both IDE and Edit flavors), through plugin [2]
- MacroMates TextMate, through bundle [3, 4]
- MacRabbit Espresso, through sugar [5, 6]
- NetBeans (not completely sure about this)

[1] http://www.aptana.org/
[2] http://www.activestate.com/komodo_edit/
[3] http://macromates.com/
[4] http://github.com/kswedberg/jquery-tmbundle
[5] http://macrabbit.com/espresso/
[6] http://fileability.net/coffee/sugar/jQuery
-- 
Massimo Lombardo
Linux user #437712


[jQuery] Re: show/hide

2010-01-12 Thread tabu
Wow, thanks for your work on this.
Sorry but it's a little confusing as to what is happening in the
preview, I have uploaded the pages I've done before just so you can
visualize what I'm going for.
1.
http://www.democraticunionfordesign.com/test/index_refresh.html

2.
http://www.democraticunionfordesign.com/test/index_simple.html

Number 1 is really how I'd like it the content to slide in and out but
as you'll see the process div leaves a latent image for some reason
and also it shifts the menu down too, I figure the shifting menu is a
div positioning problem.

What I'm actually after is simply a single click on and off when each
div is called.
Really appreciate what you've done, I'll try and work through it a
little more see if I can make more sense of it.

Thanks again.


On Jan 12, 7:42 pm, bill  wrote:
> the jquery:
>
> 
> $(function() {
>         $('.sectionTitle').click(function() {
>                 $('.sectionBody').hide("slow");
>                 $(this).next("div").show("slow");
>         });
>
> });
>
> the clickable parts:
>
> it is unclear what you want the visitors to click on to
> hide/show your sections, so i created an 

element and > gave it a class of .sectionBody for the task. you can > certainly use whatever you like. > > the content: > > i wrapped the content following the