[jQuery] jQuery Flash Stacking Order

2009-10-15 Thread MauiMan2

I am working on a project now where I am cleaning up the code on a
certain page. I am upgrading to using the jQuery Flash plugin as part
of it. The only problem is that, once I made that upgrade, a small PNG
image that needs to be placed over the Flash now goes behind the SWF
object in the stacking order, whereas before it appropriately sat on
top of the Flash. I can give the URL if somebody asks for it but the
project is mildly proprietary at the moment and I think I have
probably described the problem well enough for an answer. As usual,
thanks in advance for any help.


[jQuery] Re: [autocomplete] Callback for selected match

2009-10-15 Thread Evgeny Bobovik

use the onchange event for select
   Gk___




2009/10/14 eka ekagauranga...@gmail.com:

 Hi

 Is there anyway to pass a callback to the options to be called when an
 option is selected?

 Regards

 Eka



[jQuery] Join element sets?

2009-10-15 Thread Dennis Madsen

I have two element sets: $(.contentBox) and $(.referencesImage).
How can I join the elements in this sets? I would like to join the
sets, since I'm adding the exact same hover function on both element
sets.

$(.contentBox).hover(function(event){
..do something
},function(event){
..do something
});

$(.referencesImage).hover(function(event){
..do something
},function(event){
..do something
});


[jQuery] fadeIn and Out not working on IE but working on firefox

2009-10-15 Thread Mr J

hi,
i run into a probelm when i want to use the fadein and out function
for a new dynamic added inputs.
you can add inputs dynamically and i want to do that with fadeIn and
Out. it is working great in firefox but not in IE. i think the problem
is the new added rows are not in the DOM when the page is loaded and
that is why the effect is not working i tried few solutions but i did
not manage to solve the problem.

here is the test page i'm working on it.
http://www.voorbeeldvan.uwapothekeronline.nl/pages/New_Herhaalrecepten.asp?articleid=113816

any help will be appreciated.


[jQuery] Re: Join element sets?

2009-10-15 Thread Dennis Madsen

I would like to do something like:

$(.contentBox).$(.referencesImage).hover(function(event){
..do something
},function(event){
..do something
});

Where the hover-function is both for both element sets.


On 15 Okt., 10:48, Dennis Madsen den...@demaweb.dk wrote:
 I have two element sets: $(.contentBox) and $(.referencesImage).
 How can I join the elements in this sets? I would like to join the
 sets, since I'm adding the exact same hover function on both element
 sets.

         $(.contentBox).hover(function(event){
                 ..do something
         },function(event){
                 ..do something
         });

         $(.referencesImage).hover(function(event){
                 ..do something
         },function(event){
                 ..do something
         });


[jQuery] Re: Join element sets?

2009-10-15 Thread Evgeny Bobovik

try to do so
$(.contentBox, .referencesImage).hover(function(event){
   ..do something
   },function(event){
   ..do something
   });
   Gk___




2009/10/15 Dennis Madsen den...@demaweb.dk:

 I would like to do something like:

        $(.contentBox).$(.referencesImage).hover(function(event){
                ..do something
        },function(event){
                ..do something
        });

 Where the hover-function is both for both element sets.


 On 15 Okt., 10:48, Dennis Madsen den...@demaweb.dk wrote:
 I have two element sets: $(.contentBox) and $(.referencesImage).
 How can I join the elements in this sets? I would like to join the
 sets, since I'm adding the exact same hover function on both element
 sets.

         $(.contentBox).hover(function(event){
                 ..do something
         },function(event){
                 ..do something
         });

         $(.referencesImage).hover(function(event){
                 ..do something
         },function(event){
                 ..do something
         });


[jQuery] Re: Join element sets?

2009-10-15 Thread Richard D. Worth
Here are two options:
$('.contentBox, .referencesImage').hover(fn, fn);

$('.contentBox').add('.referencesImage').hover(fn, fn);

- Richard

On Thu, Oct 15, 2009 at 5:06 AM, Dennis Madsen den...@demaweb.dk wrote:


 I would like to do something like:

$(.contentBox).$(.referencesImage).hover(function(event){
 ..do something
},function(event){
..do something
});

 Where the hover-function is both for both element sets.


 On 15 Okt., 10:48, Dennis Madsen den...@demaweb.dk wrote:
  I have two element sets: $(.contentBox) and $(.referencesImage).
  How can I join the elements in this sets? I would like to join the
  sets, since I'm adding the exact same hover function on both element
  sets.
 
  $(.contentBox).hover(function(event){
  ..do something
  },function(event){
  ..do something
  });
 
  $(.referencesImage).hover(function(event){
  ..do something
  },function(event){
  ..do something
  });



[jQuery] Re: Join element sets?

2009-10-15 Thread jack kitley
Hi

$(.contentBox,.referencesImage).hover

u tried that?

2009/10/15 Dennis Madsen den...@demaweb.dk


 I would like to do something like:

$(.contentBox).$(.referencesImage).hover(function(event){
 ..do something
},function(event){
..do something
});

 Where the hover-function is both for both element sets.


 On 15 Okt., 10:48, Dennis Madsen den...@demaweb.dk wrote:
  I have two element sets: $(.contentBox) and $(.referencesImage).
  How can I join the elements in this sets? I would like to join the
  sets, since I'm adding the exact same hover function on both element
  sets.
 
  $(.contentBox).hover(function(event){
  ..do something
  },function(event){
  ..do something
  });
 
  $(.referencesImage).hover(function(event){
  ..do something
  },function(event){
  ..do something
  });



[jQuery] Re: Join element sets?

2009-10-15 Thread Dennis Madsen

Thanks!

On 15 Okt., 11:16, jack kitley jackkit...@googlemail.com wrote:
 Hi

 $(.contentBox,.referencesImage).hover

 u tried that?

 2009/10/15 Dennis Madsen den...@demaweb.dk





  I would like to do something like:

         $(.contentBox).$(.referencesImage).hover(function(event){
                  ..do something
         },function(event){
                 ..do something
         });

  Where the hover-function is both for both element sets.

  On 15 Okt., 10:48, Dennis Madsen den...@demaweb.dk wrote:
   I have two element sets: $(.contentBox) and $(.referencesImage).
   How can I join the elements in this sets? I would like to join the
   sets, since I'm adding the exact same hover function on both element
   sets.

           $(.contentBox).hover(function(event){
                   ..do something
           },function(event){
                   ..do something
           });

           $(.referencesImage).hover(function(event){
                   ..do something
           },function(event){
                   ..do something
           });


[jQuery] Re: fadeIn and Out not working on IE but working on firefox

2009-10-15 Thread Jonathan Vanherpe (T T NV)


Mr J wrote:


hi,
i run into a probelm when i want to use the fadein and out function
for a new dynamic added inputs.
you can add inputs dynamically and i want to do that with fadeIn and
Out. it is working great in firefox but not in IE. i think the problem
is the new added rows are not in the DOM when the page is loaded and
that is why the effect is not working i tried few solutions but i did
not manage to solve the problem.

here is the test page i'm working on it.
http://www.voorbeeldvan.uwapothekeronline.nl/pages/New_Herhaalrecepten.asp?articleid=113816

any help will be appreciated.



have you tried styling your input fields (border: 1px solid #000)? It 
might have to do with the fact that the page is showing native widgets 
instead of styled ones.


Jonathan

--
Jonathan Vanherpe - Tallieu  Tallieu NV - jonat...@tnt.be


[jQuery] Re: fadeIn and Out not working on IE but working on firefox

2009-10-15 Thread Mr J

hi,
thanks for the quick answer, i did try it but it did not work, i think
is something to do with the DOM because the inputs are not in the DOM
when the page is loaded but i do not see how to solve it.

thanks for the help

On 15 okt, 11:21, Jonathan Vanherpe (T  T NV) jonat...@tnt.be
wrote:
 Mr J wrote:

  hi,
  i run into a probelm when i want to use the fadein and out function
  for a new dynamic added inputs.
  you can add inputs dynamically and i want to do that with fadeIn and
  Out. it is working great in firefox but not in IE. i think the problem
  is the new added rows are not in the DOM when the page is loaded and
  that is why the effect is not working i tried few solutions but i did
  not manage to solve the problem.

  here is the test page i'm working on it.
 http://www.voorbeeldvan.uwapothekeronline.nl/pages/New_Herhaalrecepte...

  any help will be appreciated.

 have you tried styling your input fields (border: 1px solid #000)? It
 might have to do with the fact that the page is showing native widgets
 instead of styled ones.

 Jonathan

 --
 Jonathan Vanherpe - Tallieu  Tallieu NV - jonat...@tnt.be- Tekst uit 
 oorspronkelijk bericht niet weergeven -

 - Tekst uit oorspronkelijk bericht weergeven -


[jQuery] Re: Superfish:'null is Null or not an object

2009-10-15 Thread Simael

Hi,

 If this tab will be clicked I receive the JS error,
 that 'null' is Null or not an object.

I got it. I replaced

$(document).ready(function()
{
$('ul.sf-menu').superfish( {
 animation: {height:'show'},
 delay: 1200
 } );
} );


with

jQuery(function(){
jQuery('ul.sf-menu').superfish({
 animation: {height:'show'},
 delay: 1200
 } );
});

and all runs pretty well.

Regards
Elke


[jQuery] password strength meter

2009-10-15 Thread factoringcompare.com

Hi,

I’m using jQuery: form wizard plugin (http://home.aland.net/sundman/)
with a password strength meter plugin  by
http://www.rvdevsign.net/ressources/javascript/jpassword-plugin-jquery.html.

The form wizard breakes up a long form into smaller chuncks. Last page
the user can create an account.

Both plugins work fine except the password strength which apears in a
tooltip when the password text box has focus. The tool tip appears at
the top left of the screen rather than next to the text box. If I
refresh the page with the segement of the form displaying the password
text box, then give focus to the text box the tooltip appears and the
positioning is fine.

Can you point me in the right direction to fix the issue.

Code for the password strength meter:


(function($){
$.fn.jpassword = function(settings){
var jElements   = this;
var settings= $.extend({}, 
$.fn.jpassword.defaults, settings);
var template= 'div 
class=jpassworddivp class=jpassword-
meternbsp;/pp class=jpassword-infonbsp;/p/div/div';

return jElements.each(function(){
// Manage all inputs type password
if($(jElements).is(input)){ jPassword( $(jElements) 
); }
});

// Construct password meter
function jPassword(jInput){
// Create tooltip
var unikId  = jpassword_ + 
parseInt(Math.random()*1000);
var jTooltip= $(template).attr(id, 
unikId);
if(settings.flat == false){
// Define position of the tooltip
var pos = jInput.offset();
var win = getWindow();
var dir = right;
var top = pos.top;
var left= (pos.left + 
jInput.width());
jTooltip.appendTo(document.body);
if((left + jTooltip.width())  (win.left + 
win.width)){ left -=
(jTooltip.width() + jInput.width()); dir = left; }
if((top + jTooltip.height())  (win.top + 
win.height)){ top -=
(jTooltip.height() - (jInput.height()*1.5)); dir += bottom; }else
{ dir += top; }
jTooltip.css({ left: left + px, top: top + 
px, display:
none });
jTooltip.addClass(jpassword- + dir);
}else{
// Insert after the input
jTooltip.insertAfter(jInput);
jTooltip.css({ position: relative, display: 
block });
jTooltip.addClass(jpassword-flat);
}
// Event handler
jInput.bind(keyup, function(e){ verifPsw(jInput, 
jTooltip); });
jInput.bind(focus, function(e){
verifPsw(jInput, jTooltip);
// Show tooltip
if(settings.flat == false){ tooltip(jTooltip, 
show); }
// Function called when the tooltip is shown
if($.isFunction(settings.onShow)){ 
settings.onShow(jInput,
jTooltip); }
});
jInput.bind(blur, function(e){
// Hide tooltip
if(settings.flat == false){ tooltip(jTooltip, 
hide); }
// Function called when the tooltip is hided
if($.isFunction(settings.onHide)){ 
settings.onHide(jInput,
jTooltip); }
});
// Generate a new password
var jGenerate   = $(# + settings.generate);
if(jGenerate){ jGenerate.bind(click, function(e){ 
jInput.val
(newPsw()); verifPsw(jInput, jTooltip); return false; }); }
// Function called when process is completed
if($.isFunction(settings.onComplete)){ 
settings.onComplete(jInput,
jTooltip); }
}

// Verified password and update the tolerance meter
function verifPsw(jInput, jTooltip){
var val = jInput.val();
var meter   = 
jTooltip.find(.jpassword-meter);
var info= 
jTooltip.find(.jpassword-info);
var psw = securPsw(val);

// Advises for write a strong password
 

[jQuery] validation on multiple text inputs on button click

2009-10-15 Thread jackkit...@gmail.com

Hi All


Was wondering if anyone could help me on this problem i am having.

I have a form which contains a foreach loop and this loop outputs as
many generated input fields as there is data in the database.

My jQuery validation on submit is only seeming to validate the first
input box of however many input boxes.
I would like validation to check all the inputs and if requirments are
met for the inputs then return true or else return false if it doesnt
meet the requirments of the custom validation method.

This is the input box inside the foreach, the foreach can output many
of these filling in different data using the variables.

input type='text' class='inputval' name='donation'  id='.$d
['ee.club_event_entries_id']['value'].' size='4'/

My validation right now is checking the class inputval but it only
seems to check the first input.

Here is my validation:

jQuery.validator.addMethod(inputval, function(value, element) 
{
staticval = $('#prevalue'+element.id).val();
currentVal = element.value;
if(Number(currentVal)  Number(staticval)){

if($(element).parents('.container').find('table.subtotal-table').is
(':hidden')){

$(element).parents('.container').find('.minimize').click();
}
return false;
} else {
return true;
}
}, 'font color=black size=1pxMin Amt or higher required./
font');
$(#checkoutform).validate();

And i am also checking for validation on a button.click in jquery.
This validation is not checked on form submit but rather on a jquery
button click.

Here is the button with check:

$('.pay').click(function() {
if(!$('#checkoutform').validate().form()){
return false;
}

Any advice on this problem will be greatly appreciated. i have tried
looping through in the validation using a .each so that it checks all
inputs but even this fails.

Thanks




[jQuery] IE: call function defined in ajax loaded page

2009-10-15 Thread Michael Anckaert

Hello everyone,

In one of my projects I use simplemodal to show an ajax loaded dialog.
The HTML page loaded by the ajax call defines a javascript function
setup_dialog() that I use to initialize some functions specific to
that page. In the simplemodal callback onShow I call setup_dialog().

This setup works perfectly in Firefox, in IE on the other hand (you
already know where this is going :)) the function setup_dialog() is
undefined.

I tried replacing setup_dialog() with the jquery $(document).ready()
function but to no avail.

Am I trying to do the impossible in IE?

Kind regards,
Michael


[jQuery] Re: jQuery speed seems slow

2009-10-15 Thread k3liutZu

On Oct 15, 8:42 am, JenniferWalters jenniferwalt...@email.com wrote:
 I do agree on smaller DOM trees, a user really is not able to tell the
 difference and jQuery is so much easier to code.

What Michael and James are trying to tell you is that the jQuery
selector for ID (eg. $('#myID')) actually uses document.getElementById
('myID')
That's one of the first things it checks for.

Even on a huge page, this should not make a notable difference.
Well, unless you have all sorts of different selectors, mainly ones
that are not ID-related AND you are doing it in a non-optimised way,
such as multiple calls to the same element insead of referecing it:

Slow:
$('#myID').hide();
$('#myID').find('a').click(function(){ $('myID').show(); });

Fast:
var $myID = $('#myID');
$myID.hide();
$myID.find('a').click(function(){ $myID.show(); });

Notice that in the Fast example you are only doing 1 call to the DOM,
while in the Slow example you have 3 calls to the same object, thus
mkaing you code up to 3 times slower (for the non-optimised code, the
find('a') will perform the same).

The beauty here is that you can use all sorts of CSS selectors
(including element relationships) which the default DOM does not have
access to.


[jQuery] migration to jquery 1.3.x

2009-10-15 Thread arena

Hi

i was using extensions such as

jquery.dimensions
ui.mouse
ui.slider

what append to these extensions.

thanks for your help.


[jQuery] [Newbie question]: What knowledge is required for Jquery

2009-10-15 Thread nitesh

Hi,

Im a completely new to Jquery. Can I start it instantly or I need to
first attain certain level of expertise in Html/CSS/JS
Below is my current expirience with above 3:

. HTML/CSS: Basic knowledge
. Javascript/DOM: No knowledge at all

Hence, let me know the roadmap to learn Jquery efficiently ASAP.

10x
Nitesh


[jQuery] HoverIntent JQuery not working

2009-10-15 Thread mlemieux86

Hey, I just created a nav bar and it looks and works as wanted when I
am just previewing it in a browser, but as soon as I upload it to my
godaddy hosting account the hover Intent no longer works and it is
just a normal CSS drop down menu.

Anyone know how to fix that I have been trying new things for days
now...



[jQuery] Template plugin. Fill your template string with JSON data

2009-10-15 Thread iggant

Hi,
I have new JQuery plugin that I want to share. This plugin fill any
special formated string with existing json data, so you can
automatically do this. It's very easy to use, and amazing simple.
Please, have a look 
http://iggant.blogspot.com/2009/09/jquery-template-plugin-fill-template.html.
It's look like FlyDOM existing pluging but much more useful. It
supports nested array in JSON and you can create what you want.
Feel free to contact.
Regards


[jQuery] function not defined problem in firefox

2009-10-15 Thread saltarella

Hello,
I get this message from firefox when the javascript function
loadContent is called:
An error exists inside your ontoggle function:
ReferenceError: loadContent is not defined
Aborting execution of function.

I have an animated menu (#left) that expands and collapse (the text in
#tavira) and loads with a fed in-out animation some content in a DIV
(#right).

Here the javascript code

Code:
script type=text/javascript
animatedcollapse.ontoggle=function($, divobj, state){ //fires each
time a DIV is expanded/contracted
if (divobj.id==tavira  state==block) {
   $('#load').remove();
   $('#right').fadeOut(300,loadContent);
   $('#left').append('span id=loadLOADING.../span');
   $('#load').fadeIn(300);
   var toLoad = divobj.id+'.html #right_in';
   function loadContent() {
 $('#right').load(toLoad,'',showNewContent());
   }
   function showNewContent() {
 $('#right').fadeIn('normal',hideLoader());
   }
   function hideLoader() {
 $('#load').fadeOut('normal');
   }


}
}

animatedcollapse.init();

/script




Here also the html code

Code:
div id=left
div id=left_in
div style=width:408px; a href=javascript:animatedcollapse.toggle
('tavira')img src=picts/tavira.jpg alt=tavira width=222
height=26 border=0 //a/div
div id=tavira style=width:408px;  height:150px; background: #fff;
text-align:justify; padding-left:10px; padding-right:10px;   padding-
top:5px; padding-bottom:5px;
Some text here... /div
/div
/div

div id=right
div id=right_in
div style=padding-top:170px; padding-bottom:170pximg src=picts/
projekte/tavira/POR-A4.jpg width=561 height=401 //div
div style=padding-top:72px; padding-bottom:72pximg src=picts/
projekte/tavira/POR-A1.jpg width=427 height=596 //div
/div
/div


Since it works just fine in safari I guess is a small code error, but
to be honest I´m not very familiar with javascript so I hope someone
can help me.

Thanks


[jQuery] (validate) preclude, deny, disallow or prohibit URLs from submitting

2009-10-15 Thread gdekadt

Hi all sorry - I can't figure this out and I'm a little thick.

I'm using the great validation plug-in from bassistance and would like
to use it to stop a form submitting contents of a *required* comment
field when a URL is present in there. [Getting spam links submitted to
a contact from]

I've previously managed to hack the plugin to allow spaces and a
leading + for phone numbers but this is beyond me as I'm not trying
to extend but rather invert the function. ?

I've been trying for two hours and can neither find anything out there
- or hack anything that works.



[jQuery] Re: jQuery speed seems slow

2009-10-15 Thread Nick Fitzsimons

2009/10/14 James james.gp@gmail.com:

 Unless your DOM tree is huge and you're trying to select something
 massive in one go, the performance difference between a simple jQuery
 ID selector (e.g. $(#myID)) vs. a native getElementById selector
 should be very negligible, because jQuery uses that same native
 selector.


Negligible is a bit strong; an examination of the jQuery selector
code shows that, although it is well optimised for the simple ID
selector, it will nonetheless do the following for $(#foo):

1. do a logical OR detecting the presence of a selector,
2. test for the presence of a nodeType property on the selector,
3. branch over an if clause (see step 9) when that test fails,
4. compare the type of the selector with string and enter an if clause,
5. execute a match using a regular expression,
6. test that the match array is not null and that it has a value at a
specific position in the match array and that no context argument was
passed,
7. test the same position in the array and branch to an else clause,
8. finally execute getElementById, then recursively call itself
causing it to repeat steps 1 and 2, where it will enter the if clause,
9. set a few properties on itself,
10. return itself from the recursive call,
11. return the value received from the recursive call to your code.

Clearly that's quite a bit of overhead; if all you actually need is a
reference to the DOM element itself, using getElementById directly is
always going to be faster.

Even if you want the DOM element to be wrapped in the jQuery object,
it is much more efficient to replace

var foo = $(#foo);

with

var foo = $(document.getElementById(foo));

as that will get to step 2 above, drop into the if clause (step 9) and
return, avoiding a RegExp match, assorted bits of logic and property
testing, and a recursive function call.

Regards,

Nick.
-- 
Nick Fitzsimons
http://www.nickfitz.co.uk/


[jQuery] Urgent problem in wordpress

2009-10-15 Thread Rupak

Hi all
I am new to wordpress.I am using  $.ajax

$.ajax({
   type: POST,
   url: some.php,
   data: name=Johnlocation=Boston,
   success: function(msg){
 alert( Data Saved:  + msg );
   }
 });

But it will convert   into #038.

can any one tell me how to fixed this.


[jQuery] Re: Urgent problem in wordpress

2009-10-15 Thread Richard D. Worth
data: { name: 'John', location: 'Boston' }
- Richard

On Thu, Oct 15, 2009 at 7:27 AM, Rupak rupakn...@gmail.com wrote:


 Hi all
 I am new to wordpress.I am using  $.ajax

 $.ajax({
   type: POST,
   url: some.php,
   data: name=Johnlocation=Boston,
   success: function(msg){
 alert( Data Saved:  + msg );
   }
  });

 But it will convert   into #038.

 can any one tell me how to fixed this.


[jQuery] (validate) equalTo with complex names

2009-10-15 Thread ade

HI

Wondered if someone could help.
I need to run a equalTo validation check on some inputs that use
complex ids, they have fullstops in. I am trying to add the rules
(using quotes also as specified) as per the documentation but it still
doesnt seem to work. Code is here:

$(document).ready(function(){

$(#registrationDetails).validate({
  rules: {
emailAddress.email: required email,
emailAddress.emailRepeated: {
  equalTo: #emailAddress.email
}
  }
});
});


any help here would be great

thanks in advance

ade



[jQuery] Superfish - Drop Down not displaying

2009-10-15 Thread Superfish Query

Hello,

I am using the Superfish Module and have been able to successfully
install and use it. The problem I am having is that the sub menus are
being drawn behind the banner / header area and therefore you are not
able to see them or click on them.

Please let me know whether to change the index.php or .css file to see
the drop down menus properly. Following are details you might need:

Joomla Version: 1.5.12
Template:Fashion Look (http://joomla15.siteground.com/?
template=siteground-j15-93)
Website: www.e-sols.com/webtest

Please help

Regards


[jQuery] Re: migration to jquery 1.3.x

2009-10-15 Thread Richard D. Worth
On Thu, Oct 15, 2009 at 6:37 AM, arena andre.ren...@gmail.com wrote:


 Hi

 i was using extensions such as

 jquery.dimensions


Built-in to jQuery 1.3.x


 ui.mouse
 ui.slider


See jQuery UI

home: http://jqueryui.com/
download builder: http://jqueryui.com/download

ui.mouse is built-in to ui.core now.

ui.slider is still ui.slider, but was refactored. See the upgrade guide:

http://jqueryui.com/docs/Upgrade_Guide#Slider

If you have any further questions about ui.mouse or ui.slider, there's a
dedicate jQuery UI mailing list:

http://groups.google.com/group/jquery-ui

- Richard


[jQuery] Re: Superfish - Drop Down not displaying

2009-10-15 Thread rupak mandal
Increase the hight of #pillmenu to  87px  or as per your
requirement. In template.css


Thanks
Rupak

On Thu, Oct 15, 2009 at 5:47 PM, Superfish Query somirasoo...@gmail.comwrote:


 Hello,

 I am using the Superfish Module and have been able to successfully
 install and use it. The problem I am having is that the sub menus are
 being drawn behind the banner / header area and therefore you are not
 able to see them or click on them.

 Please let me know whether to change the index.php or .css file to see
 the drop down menus properly. Following are details you might need:

 Joomla Version: 1.5.12
 Template:Fashion Look (http://joomla15.siteground.com/?
 template=siteground-j15-93)
 Website: www.e-sols.com/webtest

 Please help

 Regards



[jQuery] Re: (validate) equalTo with complex names

2009-10-15 Thread Jaggi

oOps thinks that wrong:

$(input[name='emailAddress.emailRepeated']).rules(add, {
equalTo: #emailAddress.email
});

i think you get the idea though.

On Oct 15, 2:07 pm, Jaggi jaggi_2...@hotmail.com wrote:
 I had this problem recently but the only way i managed to get around
 it was to do it via the custom caller. So for you you'd do:

         $(input[name='emailAddress.email']).rules(add, {
                 equalTo: #emailAddress.email
         });

 On Oct 15, 12:36 pm, ade ade.godd...@gmail.com wrote:

  HI

  Wondered if someone could help.
  I need to run a equalTo validation check on some inputs that use
  complex ids, they have fullstops in. I am trying to add the rules
  (using quotes also as specified) as per the documentation but it still
  doesnt seem to work. Code is here:

  $(document).ready(function(){

  $(#registrationDetails).validate({
    rules: {
  emailAddress.email: required email,
  emailAddress.emailRepeated: {
    equalTo: #emailAddress.email

  }
    }
  });
  });

  any help here would be great

  thanks in advance

  ade


[jQuery] Re: (validate) equalTo with complex names

2009-10-15 Thread Jaggi

I had this problem recently but the only way i managed to get around
it was to do it via the custom caller. So for you you'd do:

$(input[name='emailAddress.email']).rules(add, {
equalTo: #emailAddress.email
});

On Oct 15, 12:36 pm, ade ade.godd...@gmail.com wrote:
 HI

 Wondered if someone could help.
 I need to run a equalTo validation check on some inputs that use
 complex ids, they have fullstops in. I am trying to add the rules
 (using quotes also as specified) as per the documentation but it still
 doesnt seem to work. Code is here:

 $(document).ready(function(){

 $(#registrationDetails).validate({
   rules: {
 emailAddress.email: required email,
 emailAddress.emailRepeated: {
   equalTo: #emailAddress.email

 }
   }
 });
 });

 any help here would be great

 thanks in advance

 ade


[jQuery] Re: : What knowledge is required for Jquery

2009-10-15 Thread MorningZ

You are the only person who can determine what you are capable of...

i'd suggest walking through a site like this (even though it's older
jQuery, it's still valid):

http://15daysofjquery.com/

look on the right in the Archive section and start at Day 1

On Oct 15, 5:56 am, nitesh singh.nite...@gmail.com wrote:
 Hi,

 Im a completely new to Jquery. Can I start it instantly or I need to
 first attain certain level of expertise in Html/CSS/JS
 Below is my current expirience with above 3:

 . HTML/CSS: Basic knowledge
 . Javascript/DOM: No knowledge at all

 Hence, let me know the roadmap to learn Jquery efficiently ASAP.

 10x
 Nitesh


[jQuery] Re: (validate) equalTo with complex names

2009-10-15 Thread Ade Goddard
Thanks Jaggi

Yeah that put me on the right path the below works:

 $(document).ready(function(){
 $(#registrationDetails).validate({
   rules: {
  emailAddress.email: required email,
  emailAddress.emailRepeated: {
equalTo: input[name='emailAddress.email']
  }
   }
});
});

thx again

Ade

On Thu, Oct 15, 2009 at 2:09 PM, Jaggi jaggi_2...@hotmail.com wrote:


 oOps thinks that wrong:

$(input[name='emailAddress.emailRepeated']).rules(add, {
equalTo: #emailAddress.email
});

 i think you get the idea though.

 On Oct 15, 2:07 pm, Jaggi jaggi_2...@hotmail.com wrote:
  I had this problem recently but the only way i managed to get around
  it was to do it via the custom caller. So for you you'd do:
 
  $(input[name='emailAddress.email']).rules(add, {
  equalTo: #emailAddress.email
  });
 
  On Oct 15, 12:36 pm, ade ade.godd...@gmail.com wrote:
 
   HI
 
   Wondered if someone could help.
   I need to run a equalTo validation check on some inputs that use
   complex ids, they have fullstops in. I am trying to add the rules
   (using quotes also as specified) as per the documentation but it still
   doesnt seem to work. Code is here:
 
   $(document).ready(function(){
 
   $(#registrationDetails).validate({
 rules: {
   emailAddress.email: required email,
   emailAddress.emailRepeated: {
 equalTo: #emailAddress.email
 
   }
 }
   });
   });
 
   any help here would be great
 
   thanks in advance
 
   ade



[jQuery] Re: (validate) equalTo with complex names

2009-10-15 Thread elubin

this initial example probably didn't work because of the period.
there is a documented way to use periods in jquery... in the FAQ
section How do I select an element that has weird characters in its
ID? 

http://docs.jquery.com/Frequently_Asked_Questions

eric



On Oct 15, 7:36 am, ade ade.godd...@gmail.com wrote:
 HI

 Wondered if someone could help.
 I need to run a equalTo validation check on some inputs that use
 complex ids, they have fullstops in. I am trying to add the rules
 (using quotes also as specified) as per the documentation but it still
 doesnt seem to work. Code is here:

 $(document).ready(function(){

 $(#registrationDetails).validate({
   rules: {
 emailAddress.email: required email,
 emailAddress.emailRepeated: {
   equalTo: #emailAddress.email

 }
   }
 });
 });

 any help here would be great

 thanks in advance

 ade


[jQuery] Re: (validate) equalTo with complex names

2009-10-15 Thread Ade Goddard
Yeah i was aware of that but thought that the quoting within the rules
method would overide it:) Glad its fixed now

thx

On Thu, Oct 15, 2009 at 2:33 PM, elubin elu...@yahoo.com wrote:


 this initial example probably didn't work because of the period.
 there is a documented way to use periods in jquery... in the FAQ
 section How do I select an element that has weird characters in its
 ID? 

 http://docs.jquery.com/Frequently_Asked_Questions

 eric



 On Oct 15, 7:36 am, ade ade.godd...@gmail.com wrote:
  HI
 
  Wondered if someone could help.
  I need to run a equalTo validation check on some inputs that use
  complex ids, they have fullstops in. I am trying to add the rules
  (using quotes also as specified) as per the documentation but it still
  doesnt seem to work. Code is here:
 
  $(document).ready(function(){
 
  $(#registrationDetails).validate({
rules: {
  emailAddress.email: required email,
  emailAddress.emailRepeated: {
equalTo: #emailAddress.email
 
  }
}
  });
  });
 
  any help here would be great
 
  thanks in advance
 
  ade



[jQuery] Re: Download Avira 2010 an key 2014

2009-10-15 Thread brian

I noticed that this supposedly was sent from John Resig's acct. The
same message was sent to the CakePHP group, spoofing my acct. It also
appeared in my Sent folder, which is disconcerting to say the least.

John, I've contacted gmail but, if you learn anything about this, I'd
appreciate a word as I'm unsure whether I should just delete the
acct.. Feel free to contact me off-list.

On Thu, Oct 15, 2009 at 4:46 AM, Avira jere...@gmail.com wrote:
 Download Avira 2010 an key 2014

 http://bit.ly/2dWFN5

 http://bit.ly/2dWFN5

 Download Avira 2010 an key 2014


[jQuery] Re: HoverIntent JQuery not working

2009-10-15 Thread Charlie





double check your js file paths are valid and files are being loaded

posting a link always helps also

mlemieux86 wrote:

  Hey, I just created a nav bar and it looks and works as wanted when I
am just previewing it in a browser, but as soon as I upload it to my
godaddy hosting account the hover Intent no longer works and it is
just a normal CSS drop down menu.

Anyone know how to fix that I have been trying new things for days
now...


  






[jQuery] Re: Superfish - Drop Down not displaying

2009-10-15 Thread Charlie





take out overflow: hidden from #pillmenu line
122 of template.css

this causes anything that expands within the menu to be hidden

rupak mandal wrote:
Increase the hight of "#pillmenu"
to 87px or as per your requirement. In "template.css "
  
  
  
  
  Thanks
  Rupak
  
  On Thu, Oct 15, 2009 at 5:47 PM, Superfish
Query somirasoo...@gmail.com
wrote:
  
Hello,

I am using the Superfish Module and have been able to successfully
install and use it. The problem I am having is that the sub menus are
being drawn behind the banner / header area and therefore you are not
able to see them or click on them.

Please let me know whether to change the index.php or .css file to see
the drop down menus properly. Following are details you might need:

Joomla Version: 1.5.12
Template:  Fashion Look (http://joomla15.siteground.com/?
template=siteground-j15-93)
Website:   www.e-sols.com/webtest

Please help

Regards
  
  
  
  






[jQuery] Re: jQuery Flash Stacking Order

2009-10-15 Thread Karl Swedberg


On Oct 15, 2009, at 2:05 AM, MauiMan2 wrote:



I am working on a project now where I am cleaning up the code on a
certain page. I am upgrading to using the jQuery Flash plugin as part
of it. The only problem is that, once I made that upgrade, a small PNG
image that needs to be placed over the Flash now goes behind the SWF
object in the stacking order, whereas before it appropriately sat on
top of the Flash. I can give the URL if somebody asks for it but the
project is mildly proprietary at the moment and I think I have
probably described the problem well enough for an answer. As usual,
thanks in advance for any help.



One thing that often helps in these cases is to set wmode=transparent  
in the object's params



--Karl


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



[jQuery] Re: jQuery Flash Stacking Order

2009-10-15 Thread MauiMan2

 One thing that often helps in these cases is to set wmode=transparent
 in the object's params

 --Karl

Thanks. I think I have done that. You can see the page I am working on
here:

http://www.cmzmedia.com/enableit/template.html

and the page where it does work (but with the old-style Flash
embedding code) here:

http://www.ethernetextender.com/ethernet-extension-products/template.php#


[jQuery] Autocomplete and enter key event

2009-10-15 Thread Benjamin


Hi,

I have some problem with autocomplete plugin.

When selecting option into autocomplete drop down list, focus stays on
input field. So when Enter key is hit to select option, event is
catched by the input field. In my case that's a problem because I
submit form on enter key event and a selection into autocomplete
options list submits immediatly the form :)

Because of the focus staying on input field while navigating into
autocomplete drop down list, stopPropagation() can't help me.

Any idea ? I'm stuck with that stuff.


Thanks (and sorry for my bad ass english :p)

Cya,

Benjamin.



[jQuery] Case sensitive XML tags

2009-10-15 Thread Dalibor Nasevic

Is it possible to create case sensitive XML tags?

jQuery('xml/').append(jQuery('Login/').attr({userName: 'u',
passWord: 'p'})).html()

should produce:

Login passWord=p userName=u/Login

but not:

login password=p username=u/login

Cheers,
Dalibor Nasevic
http://dalibornasevic.com/


[jQuery] Jquery site navigtion

2009-10-15 Thread Jim Byrnes

What is the best way to find plugins on the jQuery site?

Yesterday I saw a plugin mentioned and wanted to learn more about it. I 
went to the jQuery site and entered its name in the search box thinking 
I would be taken to the download page for it, but instead got what 
looked like portions of discussions threads about it.

Maybe it has something to do with the fact that when I clicked on 
plugins-browse by name I ended up at a blank page.

Regards,  Jim


[jQuery] Re: superfish

2009-10-15 Thread robocoder

My understanding is that error occurs if ga,js didn't load.

On Oct 1, 4:42 am, glimbeek gvanlimb...@gmail.com wrote:
 Thanks for the reply. I do have other code on my page but if I remove
 it all nothing changes, if I remove the tracking code the error
 disappears... I'll google some more :/


[jQuery] Re: jQuery UI widgets leaks memory for dynamic content manipulation

2009-10-15 Thread Ericos

Thanks Karl. I have already posted this on the jQuery UI discussion
group. Hope someone will look at it. Btw, don't you also experience
such issues with memory leaks?

regards,

Ericos

On Oct 13, 9:33 pm, Karl Swedberg k...@englishrules.com wrote:
 Would you mind posting this question to the jquery-ui google group if  
 you haven't done so already? That group is dedicated to questions such  
 as yours that are specifically related to jQuery 
 UI.http://groups.google.com/group/jquery-ui/

 Thanks!

 --Karl

 
 Karl Swedbergwww.englishrules.comwww.learningjquery.com

 On Oct 13, 2009, at 5:36 AM, Ericos wrote:





  jQuery UI widgets leaks memory for dynamic content manipulation

  jQuery UI widgets are causing memory leaks in browsers during dynamic
  content manipulation. This would be a problem if the goal is develop
  applications that want to behave like Gmail or Facebook where content
  is updated in-page.

  I have tested this using both Datepicker and Tabs widget and the
  results are the same - leakage. After hours of simulation, I am able
  to reproduce this memory leak effect in the exact sequence required.
  To reproduce the leakage effect, here's an example:

  html
  head
   script language=javascript type=text/javascript src=http:/
  localhost/js/jquery-1.3.2.min.js/script
   script language=javascript type=text/javascript src=http:/
  localhost/js/jquery-ui-1.7.2.custom.min.js/script
     script type=text/javascript

     var $j = jQuery.noConflict();
     $j(document).ready(function($){

       $('#button').click(function(){

         $('#dates').html('input id=date type=text value=/');
         $('#date').datepicker();

       });

     });

     /script

  /head
  body
   input id=button type=button value=Click me!/
   div id=content
     div id=dates/div
   /div
  /body
  /html

  Once the page is setup, clicking the Click me! button the first time
  will not cause the memory leak, but clicking it a second time will
  cause the memory leak. In sIEve, clicking on the Go button after the
  Click me! button is clicked the second time will produce the memory
  leak.

  The leakage here is very subtle. When a content is first dynamically
  loaded (via a click of a button for example) with a form element
  initialized with a DatePicker? widget, no leakage will occur yet. But
  when the content is dynamically loaded again a second time, replacing
  the old one, a form element will be initialized with a new DatePicker?
  widget, but the previous form element and DatePicker? widget will not
  be removed properly; thus causing a leakage.

  I hope the jQuery development team can look into this issue seriously
  as this would prevent jQuery from being adopted in large scale
  applications that use AJAX to manage dynamic content.


[jQuery] Re: superfish

2009-10-15 Thread robocoder

helper.php isn't part of the superfish distro. You should take this up
with the joomla mod developer.

On Sep 30, 10:09 am, sanni46 susanne.goed...@ozlo.de wrote:
 Hallo,
 I would like to have two verticalsuperfish-menu-modules in one
 template on the left hand side..
 I tried it, the first menu withsuperfish-menu works.
 But when I prepare the second menu, deactivate, and go to Extensions
 - modules - new -superfish, choose the parameter of the menu and
 save, I loose my website and only the menu is shown in the left corner
 and:

 Fatal error: Cannot redeclare hasvalue() (previously declared in /www/
 htdocs/w00baa07/joomla/modules/mod_superfishmenu/helper.php:214) in /
 www/htdocs/w00baa07/joomla/modules/mod_superfishmenu/helper.php on
 line 214

 What does it mean?

 Is it possible to have two or moresuperfish-Menu-modules in one
 template?

 buy


[jQuery] Re: [superfish] How to focus on clicked menu item after menu item is clicked with jQuery ?

2009-10-15 Thread robocoder

Do you mean  something like the (customized) superfish menu on
http://piwik.org/demo/ ?

On Sep 29, 3:34 am, Tharindu Madushanka tharindu...@gmail.com wrote:
 Hi,

 I am new to jQuery and usingsuperfishpopup menu widget to create a
 menubar. I have only four menus and 3 of them are not drop downs. So I
 want to focus on the clicked menu item. How could I use jquery or some
 other technique to do this. Kindly help me to solve this.

 Thank you,
 Tharindu Madushanka
 tharindufit.wordpress.com


[jQuery] Re: Finding previous next input siblings encapsulated in other li ?

2009-10-15 Thread Julien

Hi again,

My question was probably too long as I got no answer...

When a change occurs is one of the following text fields, does someone
know how to scan through all the text inputs located after it?

fieldset name=myfields
ul

  liinput type=text name=txt_one /
  input type=checkbox name=chk_one //li

  liinput type=text name=txt_two /
  input type=checkbox name=chk_two //li

  liinput type=text name=txt_three /
  input type=checkbox name=chk_three //li

/ul

...assuming that there are more fields and I need some jQuery
automation.

Thanks for your help.


[jQuery] Re: jQuery Flash Stacking Order

2009-10-15 Thread MauiMan2

Actually, I think I have it working now. Thanks, everyone.


[jQuery] Re: Switch image source during toggle

2009-10-15 Thread Gremlyn1

Hoping for some help still... I see the jQueryUI site has drop downs
that do what I want, there has to be a plugin or an easy way to do
this somewhere! I don't mind if i have to implement a new, full toggle
script to do it either.

On Oct 7, 8:53 am, Gremlyn1 greml...@gmail.com wrote:
 Bump?

 On Oct 5, 3:19 pm, Gremlyn1 greml...@gmail.com wrote:

  Sure, as I said I have the following function in place:
  $j(document).ready(function() {
      $j('#answerbox').hide();

      $j('a.faq').click(function() {
          var faq_id = $j(this).attr('id');
          $j('#faq' + faq_id).slideToggle(fast);
          return false;
      });

  });

  I would like to include a switch between these two images:
  './images/toggle-plus-trans.gif';
  './images/toggle-minus-trans.gif';

  The HTML looks like this:
      h3 class=faqa href=# id=86 class=faq name=86
  style=text-decoration: none;
      img src=../images/toggle-plus-trans.gif alt=Expand Answer
  title=Expand Answer /
      /aThis is my FAQ Question/h3

      div id=faq86 class=answerbox style=display:none;This is my
  FAQ Question/div

  On Oct 2, 11:50 am, James james.gp@gmail.com wrote:

   Could you post your relevant HTML also with some kind of sampleimage
   src and what you would like it to look like after it's been toggled?

   On Oct 2, 6:26 am, Gremlyn1 greml...@gmail.com wrote:

I have some divs I am toggling and there is a little + signimageI
want tochangeto a - signimagewhen the toggle event occurs, but
can't quite figure it out. Here is the toggle code I have (taken from
a helpful post on here):

$j(document).ready(function() {
    $j('#answerbox').hide();

    $j('a.faq').click(function() {
        var faq_id = $j(this).attr('id');
        $j('#faq' + faq_id).slideToggle(fast);
        return false;
    });

});

Theimageis not contained within the a tag, so I guess I need a
separate function to callback.


[jQuery] Re: Switch image source during toggle

2009-10-15 Thread Nikola

You could toggle classes making sure each class is styled with the
appropriate image, use the css() method to change the background /
background-image property or, if your working with an img element, you
can use the attr() method to change the images src.

On Oct 2, 12:26 pm, Gremlyn1 greml...@gmail.com wrote:
 I have some divs I am toggling and there is a little + sign image I
 want to change to a - sign image when the toggle event occurs, but
 can't quite figure it out. Here is the toggle code I have (taken from
 a helpful post on here):

 $j(document).ready(function() {
     $j('#answerbox').hide();

     $j('a.faq').click(function() {
         var faq_id = $j(this).attr('id');
         $j('#faq' + faq_id).slideToggle(fast);
         return false;
     });

 });

 The image is not contained within the a tag, so I guess I need a
 separate function to callback.


[jQuery] Jquery for show / hide item in list

2009-10-15 Thread dEwA nich
Dear friends,

I'm looking for jquery scripts to show/hide element in unordered list like
http://bbc.co.uk with +, - button. I've got some script from here :
http://paste.pocoo.org/show/86584/ and
http://www.killersites.com/forums/topic/780/jquery-add-remove-list-item/.
But I little confused to use them. They just can be used if I have one
unordered list. If I have two or more unordered list, the script won't work.

Can somebody help me??

thanks before..


[jQuery] Re: Finding previous next input siblings encapsulated in other li ?

2009-10-15 Thread Karl Swedberg


Provided that all the text inputs located after it are within the same  
ul, this should do it:


$('input:text').change(function() {
  $(this).parent().nextAll().find('input:text').doSomething();
});

If you need to check in multiple uls or fieldsets, we'll need to  
tweak the DOM traversal to match the others as well.


--Karl


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




On Oct 15, 2009, at 12:07 PM, Julien wrote:



Hi again,

My question was probably too long as I got no answer...

When a change occurs is one of the following text fields, does someone
know how to scan through all the text inputs located after it?

fieldset name=myfields
ul

 liinput type=text name=txt_one /
 input type=checkbox name=chk_one //li

 liinput type=text name=txt_two /
 input type=checkbox name=chk_two //li

 liinput type=text name=txt_three /
 input type=checkbox name=chk_three //li

/ul

...assuming that there are more fields and I need some jQuery
automation.

Thanks for your help.




[jQuery] Re: 1.3.2, live(event), and trigger(event, [value1, value2])

2009-10-15 Thread Val

... Anybody?  At all?

On Oct 12, 5:04 pm, Val tonightslasts...@gmail.com wrote:
 Hello all,

 I cannot for the life of me figure out the syntax given in the subject
 line.

 Through all of the following, I am referring to the examples tab of
 the following page:http://docs.jquery.com/Events/trigger

 I've got a 'live' event, waiting for a custom trigger.

 I pull the trigger, fire the event, and all goes well.

 However, using the following trigger syntax, data pass-through does
 not perform at all as expected:

 myJQueryObject.trigger('myEvent', [value1, value2]);

 My event gets triggered, however all passed values are totally
 ignored, so far as I can tell.  It seems to me that myliveevent's
 arguments are always firstly the event, and then myliveevent's
 selector (which is an attribute selector).  The desired passed
 information does not seem to dwell in the event object, either.

 As far as I can tell after about an hour of tear-jerking tests, this
 is undocumented behavior.  Furthermore, the only syntax I can coerce
 to properly function is to do the following:

 myJQueryObject.trigger('myEvent', {
   type : 'myEvent',
   var1 : value1,
   var2 : value2

 });

 This however makes the values attributes of the 'event' object.
 Workable, but I must ask the age-old linux question: Why does the
 documentation lie to us?  I'd much prefer that either the original
 array-based syntax work as advertised, or someone alter that examples
 tab to clarify what is supposed to happen there.

 Thanks in advance, wonderful people.


[jQuery] Adding a close link button button at the end of Autocomplete dropdown

2009-10-15 Thread Thomas

Hi,

I am using Jquery autocomplete dropdown, could you please help to add
a close link button at the end of the dropdown like the google
suggest ?

I am new to jquery,

Thanks in advance
Thomas


[jQuery] jQuery UI Tabs - Select Tab?

2009-10-15 Thread Collectonian

We are using the jQuery UI's tabs functions to do a tab on a web
application. The tabs are loading fine and work perfectly when
clicking them. In some instances, though, we want to default the page
to have a specific tab selected on load. How do we do this? We tried
looking through the docs, but nothing we tried worked. In our main JS
file, we load the tabs with:

$(document).ready(function(){
$(#tabs).tabs();
});

Then in the page itself, when we want it to switch to a specific tab,
we have:

script type=text/javascript
$('#tabs').tabs({ 'option', 'selected', 1 });
/script

We also tried:

$('.selector').tabs('option', 'selected', 1);

and

var $tabs = $('#tabs').tabs({
add: function(event, ui) {
$tabs.tabs('select', '#securityTab');
}
});

Summer S. Wilson
Collectonian on Yahoo! Messenger
An Eclectic World  (http://eclectic-world.com)
LiveJournal (http://collectonian.livejournal.com)


[jQuery] Re: : What knowledge is required for Jquery

2009-10-15 Thread Astropos

Hey Nitesh,
I'm learning myself too, here's what I'd say:
Do you currently lay out pages with div's?
Got div id=foo... ?
or even better
div id=foo class=bar ... ?

then you're set -  Jquery operates on your CSS definitions.
#foo refers to a div called foo
.bar refers to a css class called bar

So this says: select the div (#) named myDiv and apply the css
properties to it
$(#myDiv).css(border,3px solid red);


hope this helps

nut



Include the jquery files in u head...

script type=text/javascript src=/JQuery/jquery-1.3.2.min.js/
script

Then add your jquery code
Start with an empty jquery (I call it container) block:

script type=text/javascript
$(document).ready(function(){

 YOUR CODE GOES HERE 

});

/script








On Oct 15, 10:56 am, nitesh singh.nite...@gmail.com wrote:
 Hi,

 Im a completely new to Jquery. Can I start it instantly or I need to
 first attain certain level of expertise in Html/CSS/JS
 Below is my current expirience with above 3:

 . HTML/CSS: Basic knowledge
 . Javascript/DOM: No knowledge at all

 Hence, let me know the roadmap to learn Jquery efficiently ASAP.

 10x
 Nitesh


[jQuery] Re: Jquery for show / hide item in list

2009-10-15 Thread Charlie





there was some very interesting code on this list a few months ago that
should help you out

couldn't get the thread from google group search but can see whole
thread here

http://www.mail-archive.com/jquery-en@googlegroups.com/msg77035.html

look toward end of thread for mkmanning solution, short and sweet



dEwA nich wrote:
Dear friends,
  
I'm looking for jquery scripts to show/hide element in unordered list
like http://bbc.co.uk
with +, - button. I've got some script from here : http://paste.pocoo.org/show/86584/
and http://www.killersites.com/forums/topic/780/jquery-add-remove-list-item/.
But I little confused to use them. They just can be used if I have one
unordered list. If I have two or more unordered list, the script won't
work.
  
Can somebody help me??
  
thanks before..






[jQuery] Re: jQuery UI Tabs - Select Tab?

2009-10-15 Thread MorningZ


$(#tabs).tabs(select, idx);

where idx is the numeric index of the tab to select


On Oct 15, 11:53 am, Collectonian collecton...@eclectic-world.com
wrote:
 We are using the jQuery UI's tabs functions to do a tab on a web
 application. The tabs are loading fine and work perfectly when
 clicking them. In some instances, though, we want to default the page
 to have a specific tab selected on load. How do we do this? We tried
 looking through the docs, but nothing we tried worked. In our main JS
 file, we load the tabs with:

 $(document).ready(function(){
         $(#tabs).tabs();

 });

 Then in the page itself, when we want it to switch to a specific tab,
 we have:

 script type=text/javascript
         $('#tabs').tabs({ 'option', 'selected', 1 });
 /script

 We also tried:

 $('.selector').tabs('option', 'selected', 1);

 and

 var $tabs = $('#tabs').tabs({
     add: function(event, ui) {
         $tabs.tabs('select', '#securityTab');
     }

 });

 Summer S. Wilson
 Collectonian on Yahoo! Messenger
 An Eclectic World  (http://eclectic-world.com)
 LiveJournal (http://collectonian.livejournal.com)


[jQuery] Superfish, Main Menu Submenus

2009-10-15 Thread hbsnam

Hi all

Would like to know how to make the main menu button unlinked, i.e. not
linking to any article etc in Joomla, instead visitors have to
navigate to the submenu and select a section / page there.

Is this controlled under superfish or Joomla (if Joomla, where do I
look?)

See www.africantravelsolutions.info, see the Your Destination menu,
which shows the country name and then the submenus. I do not want the
country name to link to anything, rather that visitors use the
submenus.

Thanks

Hans


[jQuery] Validation plugin: textarea to allow only digits, but allowing linebreaks?

2009-10-15 Thread Renie

I'm using the Jquery Validation Plugin on my site, and I have a
textfield that validates to only allow numbers. However, that also
doesn't allow linebreaks - which I need to have! Is there a way around
this?

Here's the working code:


html
head
script src=http://code.jquery.com/jquery-latest.js;/script
script type=text/javascript src=http://dev.jquery.com/view/trunk/
plugins/validate/jquery.validate.js/script
script
$(document).ready(function() { // Doc Ready Functions

$(#quicksend_form).validate({
rules: {
recepients: {
  required: true,
  digits: true,
  minlength: 10
}
}
});

}); // Doc Ready Functions
/script

/head

body

form action=# method=post enctype=multipart/form-data
name=quicksend_form id=quicksend_form
textarea name=recepients id=recepients rows=20/textarea
input type=submit name=button id=button value=Submit /
/form

/body
/html


[jQuery] A quick note about CFJS

2009-10-15 Thread Chris Jordan
I just wanted to let everyone know that CFJS 1.1.11 is now available. There
was a small bug in two of the list functions (ListContains and
ListContainsNoCase). You can read about the changes
herehttp://cjordan.us/index.cfm/2009/10/15/CFJS---Bug-Fix-Release.
You can download the latest version of CFJS here http://cfjs.riaforge.org.

Thanks,
Chris


[jQuery] Re: Validation plugin: textarea to allow only digits, but allowing linebreaks?

2009-10-15 Thread Leonardo K
You can create your own validate method:
http://docs.jquery.com/Plugins/Validation/Validator/addMethod#namemethodmessage

jQuery.validator.addMethod(digitsAndLineBreak, function(value, element) {
return /^[\d|\n]+$/.test(value);
}, Please enter only digits);

then:

$(#quicksend_form).validate({
rules: {
recepients: {
required: true,
digitsAndLineBreak: true,
minlength: 10
}
}
});

On Thu, Oct 15, 2009 at 15:57, Renie renie.ra...@gmail.com wrote:


 I'm using the Jquery Validation Plugin on my site, and I have a
 textfield that validates to only allow numbers. However, that also
 doesn't allow linebreaks - which I need to have! Is there a way around
 this?

 Here's the working code:


 html
 head
 script src=http://code.jquery.com/jquery-latest.js;/script
 script type=text/javascript src=http://dev.jquery.com/view/trunk/
 plugins/validate/jquery.validate.jshttp://dev.jquery.com/view/trunk/%0Aplugins/validate/jquery.validate.js
 /script
 script
 $(document).ready(function() { // Doc Ready Functions

 $(#quicksend_form).validate({
rules: {
recepients: {
  required: true,
  digits: true,
  minlength: 10
}
}
 });

 }); // Doc Ready Functions
 /script

 /head

 body

 form action=# method=post enctype=multipart/form-data
 name=quicksend_form id=quicksend_form
 textarea name=recepients id=recepients rows=20/textarea
 input type=submit name=button id=button value=Submit /
 /form

 /body
 /html



[jQuery] Re: Listmenu - tips for making it faster in IE

2009-10-15 Thread Anoop kumar V
Hi Jack,

Are you still planning on implementing this feature of putting a message /
progress bar for IE (and firefox to keep it consistent)? Or have you come up
with any better ways of handling this.

Thanks,
Anoop


On Mon, Aug 17, 2009 at 11:41 PM, Anoop kumar V anoopkum...@gmail.comwrote:

 Hi Jack,

 Yes, if you could do something along those lines, it would be most helpful.
 Would putting a progress bar like gmail be a better option or should it be
 just a loading gifeither would work for me for now.

 Thanks,
 Anoop



 On Fri, Aug 14, 2009 at 2:08 PM, Jack Killpatrick j...@ihwy.com wrote:


 Hi Anoop.

 I spent considerable time tuning the code for performance, but yes, IE
 does lag behind, especially when approaching 1000 items or more. I found
 Safari and Chrome to both be quite fast and Firefox nearly as fast as those.
 The IE issue stems from the code that moves the items from the original UL
 or LI into the separate lists used for each submenu.

 I messed around a little with implementing a built-in Loading... message,
 but found IE's behavior so annoying (it likes to appear hung when it's not
 and workarounds only delayed the load time) that I decided not to include
 that in the plugin. I'm on vacation right now, but early next week could
 take a look at a workaround you might be able to use to show a message and
 then hide it after IE is done chugging way. Let me know and I'll put some
 thought into it.

 Thanks,
 Jack


 Anoop kumar V wrote:

 I am using listmenu and it works fantastically well... except only on
 firefox.

 On IE 7 it is quite slow, the lag is very noticeable - the menu appears
 after about 6-7 seconds and the counts come much later after about 8-10
 seconds. Since this is an intranet app, I need to ensure that IE 7 works
 very well. I have about 2000 elements and they are not at all balanced
 across the alphabets...

 Are there any tips that I could follow such that the menu displays
 quicker in IE? Or at the very least is there a way I can show a Loading...
  text or an animated gif while the menu loads..

 But thank you for this wonderful plugin it is really well made, I only
 wish IE would catch up soon ;-)

 Thanks,
 Anoop







[jQuery] Superfish

2009-10-15 Thread Kerie

How do you change the height between the 2 rows when using superfish
nav-bar example?  Is there a CSS property that will change the height?


[jQuery] Re: loading message shows up after page has loaded

2009-10-15 Thread sdtacoma

Hi Karl,

I believe/hope I did everything that you asked. Problem still
exists...

http://meded.ucsd.edu/testQuery.cfm

I do appreciate your help!

Josh




On Oct 14, 11:04 am, Karl Swedberg k...@englishrules.com wrote:
  Wow, easy there Karl. I was just showing you working examples of the
  issue I was experiencing.

 easy there? I was just trying to help. You showed examples that didn't  
 include my suggestions, after we had already established that your  
 first attempts were not going to work.

  Your
  code does not actually wait for the data to finish loading. It merely
  unblocks the UI after a period of time. This is not what I want. I
  want the UI to become unblocked after the page is done loading, not
  after a certain period of time passes.

 Exactly. That's why I wrote this...

  Note that I added a setTimeout inside the $(window).load() function
  to
  simulate a heavy page.

 It was a demonstration, since I didn't have your queries at my  
 disposal. Feel free to remove the setTimeout. The $
 (window).bind('load', fn) part should be telling the script to wait  
 until everything is fully loaded before it executes the code inside it  
 (  $('#uiblocker').fadeOut();  )

  Again, the issue I am having is that the UI is not blocked when
  running queries on the page, one when static content is loading.

 I'm not sure what's going on with your queries. I did notice some odd  
 stuff, though, when I looked at what was actually coming to the  
 browser inhttp://meded.ucsd.edu/testKarl2.cfm:

 1. You have this :

 link rel=stylesheet type=text/css 
 href=http://meded.ucsd.edu/meded/meded.css
  before

 before this :

 !DOCTYPE html

 Can you try putting that styesheet reference inside head ?

 2. I doubt this will make a difference, but try putting this line:
 script type=text/javascriptdocument.documentElement.className =  
 'js';/script
 directly after the title and before you load any styles or other  
 scripts

 3. you have a style tag inside the body. Again, might not make a  
 difference, but worth moving to the head

 Hope that helps.

 --Karl

 On Oct 14, 2009, at 12:00 PM, sdtacoma wrote:



  Wow, easy there Karl. I was just showing you working examples of the
  issue I was experiencing.

  I have applied the code that you sent me and it does work, kinda. Your
  code does not actually wait for the data to finish loading. It merely
  unblocks the UI after a period of time. This is not what I want. I
  want the UI to become unblocked after the page is done loading, not
  after a certain period of time passes.

 http://meded.ucsd.edu/testKarl.cfm (your code as-is)
 http://meded.ucsd.edu/testKarl2.cfm(your code with a query. Does not
  block the UI while the query is being run)
 http://meded.ucsd.edu/testKarl3.cfm(your code with images)

  Again, the issue I am having is that the UI is not blocked when
  running queries on the page, one when static content is loading.

  On Oct 13, 12:14 pm, Karl Swedberg k...@englishrules.com wrote:
  You're not using the script and styles I demonstrated in my demo  
  page.
  You're using the blockui plugin instead. As I explained before,  
  you're
  not going to get it to work if you have your script inside a document
  ready block because the DOM itself is the slow part (when running the
  SQL query). When the DOM is simple/small, as it is with your big  
  image
  example, then it's fine.

  If you're willing to try my suggestion, I'm happy to continue helping
  you. Otherwise, good luck.

  --Karl

  On Oct 13, 2009, at 1:59 PM, sdtacoma wrote:

  Hello,

  Your example page does work as it should. Now replace the Lorum
  Ipsum content with content from a SQL Query and it won't work the
  same way. (at least that is the issue I am having)

  -http://meded.ucsd.edu/testQuery.cfm
  (does not work as expected, doesn't show the loading message while  
  the
  query is running)

  -http://meded.ucsd.edu/testStatic.cfm
  (does work as expected, shows the loading message while the images  
  are
  loading)

  Josh

  On Oct 12, 5:30 pm, Karl Swedberg k...@englishrules.com wrote:
  You've lost me there. If you're trying to block the page based on
  some
  user interaction, then the blockui plugin should work just fine. I
  thought the problem you were having, though, was with  the page not
  being blocked immediately when the user first visits the page. You
  asked about document ready and whether it could fire sooner. I
  offered
  a solution that didn't rely on document ready so that the ui  
  would be
  blocked immediately until everything was loaded.

  I put a test page up so you can see that it does, in fact, solve  
  the
  problem that you originally 
  presented:http://test.learningjquery.com/blockui.html

  Note that I added a setTimeout inside the $(window).load() function
  to
  simulate a heavy page.

  --Karl

  
  Karl Swedbergwww.englishrules.comwww.learningjquery.com

  On Oct 12, 2009, at 4:59 PM, sdtacoma wrote:

  Thanks for 

[jQuery] Re: Locking submit button interferes with validation plugin

2009-10-15 Thread Opally

thanks for the reply James!

I'm looking at the jquery Validation plugin, and I don't see how the
function you offered integrates with it. Can you offer more detail?
Perhaps I need to modify validator to make these changes in the submit
button?

I'm hoping the author of Validation will see this question and give me
some guidance where to insert functions to disable the submit button
after it passes validation checks.

This can't be such a rare need? (we are having slowness with our site
right now, so that makes this important.)



On Oct 13, 10:43 pm, James james.gp@gmail.com wrote:
 Maybe something like this:

     $(#myForm).bind(submit, function() {
         $(this).validate(validation_options);
         var valid = $(this).valid();
         if (valid) {
             //lockform, show loading animation, dosubmit
         }
         // you don't really need an 'else' here.
         // the errors should display if it's not valid.
     });

 On Oct 13, 5:35 am, Opally opally@gmail.com wrote:

  This is a question about the jqueryValidationplugin.

  I need tolockthesubmitbutton on some forms to prevent multiple
  submissions, but I don't want to permanentlylockit, in case there's
  avalidationproblem that the user needs to resolve. I did come up
  with a way to temporarilylockit and change the text to Saving,
  Please Wait... for a few seconds, then revert it to an unlocked
 submitbutton.

  The problem I'm having is that this conflicts somehow with the jquery
 validationplugin. Some fields that have error messages if the user
  attempts tosubmitthe form with missing data. If I use the temporary
  lockingsubmitbutton (which uses an animation to create a duration)
  then these error messages do not display.

  Is it possible to test for avalidationvalue in a separate function
  before running thislockfunction? If valid,lock, if not valid, don't
 lock, because it isn't possible tosubmitan invalid form anyway.

  I tried wrapping the lockingsubmitfunction in a setTimeout, but that
  didn't have any effect at all in delaying it.


[jQuery] Re: Problems with load() in IIS?

2009-10-15 Thread Scogle

Thanks, I'll look into that.  I had a feeling that it was a setup
issue, but I wasn't really sure yet.  I'm just trying to load() an
html file, which is why this issue seems so strange.

On Oct 12, 7:45 pm, James james.gp@gmail.com wrote:
 Sorry, I meant VERB, not VERY:

 GET (and maybe POST) VERB

 On Oct 12, 3:42 pm, James james.gp@gmail.com wrote:

  It sounds like a server setup issue. What is the file type/extension
  of the file that you're trying to load()? You have to set up the
  server so that the GET (and maybe POST) VERY is allowed for that file
  type.

  On Oct 12, 12:53 pm, Scogle scotto...@gmail.com wrote:

   I'm working on a project that uses the load() function to grab data
   from external files, but I keep getting a 405 Method Not Allowed
   error and the data won't load.  I'm wondering if this is a problem
   with the server or if it's a sloppy mistake on my part.  Any help
   would be greatly appreciated.

   Thanks,
   Scott


[jQuery] Re: Problems with load() in IIS?

2009-10-15 Thread James

I think that by default in IIS, .html filetypes will not accept POSTs.
load() in jQuery is GET by default but if you put something in the
data parameter, it will a be converted to a POST. Do you think that's
what's happening?
Unless your .html file has be configured to do server-side processing,
I don't think it's necessary to POST data to a .html file.

On Oct 15, 10:55 am, Scogle scotto...@gmail.com wrote:
 Thanks, I'll look into that.  I had a feeling that it was a setup
 issue, but I wasn't really sure yet.  I'm just trying to load() an
 html file, which is why this issue seems so strange.

 On Oct 12, 7:45 pm, James james.gp@gmail.com wrote:

  Sorry, I meant VERB, not VERY:

  GET (and maybe POST) VERB

  On Oct 12, 3:42 pm, James james.gp@gmail.com wrote:

   It sounds like a server setup issue. What is the file type/extension
   of the file that you're trying to load()? You have to set up the
   server so that the GET (and maybe POST) VERY is allowed for that file
   type.

   On Oct 12, 12:53 pm, Scogle scotto...@gmail.com wrote:

I'm working on a project that uses the load() function to grab data
from external files, but I keep getting a 405 Method Not Allowed
error and the data won't load.  I'm wondering if this is a problem
with the server or if it's a sloppy mistake on my part.  Any help
would be greatly appreciated.

Thanks,
Scott




[jQuery] Re: Jquery site navigtion

2009-10-15 Thread Richard D. Worth
On Thu, Oct 15, 2009 at 10:50 AM, Jim Byrnes jf_byr...@comcast.net wrote:


 What is the best way to find plugins on the jQuery site?

 Yesterday I saw a plugin mentioned and wanted to learn more about it. I
 went to the jQuery site and entered its name in the search box thinking
 I would be taken to the download page for it, but instead got what
 looked like portions of discussions threads about it.


I'm assuming you're on http://plugins.jquery.com/ and using the search box
in the upper-right called 'Search Plugins'. That searches all content on
plugins.jquery.com, showing plugins and issues. If you look at the top of
the left sidebar you'll see an advanced search with an option to only search
for plugins. Give that a try?


 Maybe it has something to do with the fact that when I clicked on
 plugins-browse by name I ended up at a blank page.


That looks like a bug, but I think a separate issue. Please create a ticket
here

http://dev.jquery.com/newticket (note: requires registration)

and set the component to 'site' so it doesn't get missed here. Thanks.

- Richard


[jQuery] Show images with delay...

2009-10-15 Thread -e-train

All -

How would i get the following effect.

load the page and and image appears, then after 1 second, another
image appears next to the previous one, then after one second, another
image apears next to the previous one, etc...

so each second a new image is placed in the line of images, eventually
filling the screen with a bunch of images...

I assume it is a for loop and something.
or do i have to do it in php.

in php this is the equivalent:
for ($i = 0; $i  5; $i++) {
 print 'img src=image.png /';
 ob_flush();
 flush();
 sleep(1);
}



but this isn't really a good way to do this.

any ideas?

cheers,
-e-train



[jQuery] Re: Locking submit button interferes with validation plugin

2009-10-15 Thread James

You can just disable the submit button with jQuery easily.

$(#myForm).bind(submit, function() {
$(this).validate(validation_options);
var valid = $(this).valid();
if (valid) {
// disable submit button
$(#submitBtn).attr('disabled','disabled');
// put loading animation code here
// submit is done automatically, no action needed
return true;
}
});

On Oct 15, 10:48 am, Opally opally@gmail.com wrote:
 thanks for the reply James!

 I'm looking at the jquery Validation plugin, and I don't see how the
 function you offered integrates with it. Can you offer more detail?
 Perhaps I need to modify validator to make these changes in the submit
 button?

 I'm hoping the author of Validation will see this question and give me
 some guidance where to insert functions to disable the submit button
 after it passes validation checks.

 This can't be such a rare need? (we are having slowness with our site
 right now, so that makes this important.)

 On Oct 13, 10:43 pm, James james.gp@gmail.com wrote:

  Maybe something like this:

      $(#myForm).bind(submit, function() {
          $(this).validate(validation_options);
          var valid = $(this).valid();
          if (valid) {
              //lockform, show loading animation, dosubmit
          }
          // you don't really need an 'else' here.
          // the errors should display if it's not valid.
      });

  On Oct 13, 5:35 am, Opally opally@gmail.com wrote:

   This is a question about the jqueryValidationplugin.

   I need tolockthesubmitbutton on some forms to prevent multiple
   submissions, but I don't want to permanentlylockit, in case there's
   avalidationproblem that the user needs to resolve. I did come up
   with a way to temporarilylockit and change the text to Saving,
   Please Wait... for a few seconds, then revert it to an unlocked
  submitbutton.

   The problem I'm having is that this conflicts somehow with the jquery
  validationplugin. Some fields that have error messages if the user
   attempts tosubmitthe form with missing data. If I use the temporary
   lockingsubmitbutton (which uses an animation to create a duration)
   then these error messages do not display.

   Is it possible to test for avalidationvalue in a separate function
   before running thislockfunction? If valid,lock, if not valid, don't
  lock, because it isn't possible tosubmitan invalid form anyway.

   I tried wrapping the lockingsubmitfunction in a setTimeout, but that
   didn't have any effect at all in delaying it.




[jQuery] Re: Show images with delay...

2009-10-15 Thread James

You use setInterval in Javascript to execute a callback function every
so milliseconds:

window.setInterval(doSomething, 1000); // 1000ms = 1sec

function doSomething() {
  // code to change images
}

On Oct 15, 11:25 am, -e-train etrai...@gmail.com wrote:
 All -

 How would i get the following effect.

 load the page and and image appears, then after 1 second, another
 image appears next to the previous one, then after one second, another
 image apears next to the previous one, etc...

 so each second a new image is placed in the line of images, eventually
 filling the screen with a bunch of images...

 I assume it is a for loop and something.
 or do i have to do it in php.

 in php this is the equivalent:
 for ($i = 0; $i  5; $i++) {
  print 'img src=image.png /';
  ob_flush();
  flush();
  sleep(1);

 }

 but this isn't really a good way to do this.

 any ideas?

 cheers,
 -e-train


[jQuery] Re: Superfish, Main Menu Submenus

2009-10-15 Thread Charlie





menus only manipulate what joomla sends to the page...best sorted out
on a joomla forum

hbsnam wrote:

  Hi all

Would like to know how to make the main menu button unlinked, i.e. not
linking to any article etc in Joomla, instead visitors have to
navigate to the submenu and select a section / page there.

Is this controlled under superfish or Joomla (if Joomla, where do I
look?)

See www.africantravelsolutions.info, see the Your Destination menu,
which shows the country name and then the submenus. I do not want the
country name to link to anything, rather that visitors use the
submenus.

Thanks

Hans

  






[jQuery] Re: Jquery site navigtion

2009-10-15 Thread Jim Byrnes


Richard D. Worth wrote:



I'm assuming you're on http://plugins.jquery.com/ and using the search box
in the upper-right called 'Search Plugins'. That searches all content on
plugins.jquery.com, showing plugins and issues. If you look at the top of
the left sidebar you'll see an advanced search with an option to only search
for plugins. Give that a try?


Actually I tried that but I misread the results as looking like those 
from the other search box, that was my bad.  Thanks for the pointer.



Maybe it has something to do with the fact that when I clicked on
plugins-browse by name I ended up at a blank page.



That looks like a bug, but I think a separate issue. Please create a ticket
here


The all plugins link at the top of the page gives me the same results. 
I wonder why no one else has seen this.  I hesitate waste everyones time 
by creating a ticket if the problem is on my end.  If someone else could 
confirm the problem I would be happy to create a ticket.


Regards,  Jim


http://dev.jquery.com/newticket (note: requires registration)

and set the component to 'site' so it doesn't get missed here. Thanks.

- Richard





[jQuery] Re: Jquery site navigtion

2009-10-15 Thread Richard D. Worth
On Thu, Oct 15, 2009 at 6:38 PM, Jim Byrnes jf_byr...@comcast.net wrote:


  Maybe it has something to do with the fact that when I clicked on
 plugins-browse by name I ended up at a blank page.


 That looks like a bug, but I think a separate issue. Please create a
 ticket
 here


 The all plugins link at the top of the page gives me the same results. I
 wonder why no one else has seen this.  I hesitate waste everyones time by
 creating a ticket if the problem is on my end.  If someone else could
 confirm the problem I would be happy to create a ticket.


Sorry I wasn't clear. I saw the blank page as well. Thanks for creating a
ticket.

- Richard


[jQuery] jquery preload images

2009-10-15 Thread kknaru

ok, so i have this slideshow.html containing just a bunch of
pictures, and the index.html.

index.html

a href=click/a
ul/ul

slideshow.html

liimg src=1.jpg alt= //li
liimg src=2.jpg alt= //li
liimg src=3.jpg alt= //li

and i have my script like this;

$(document).ready(function(){
$('a').click(function(){
$('ul').append('li id=preloaderimg
src=preLoader.gif //li');
   $('ul').load('slideshow.html',function(){
   $('#preloader').remove();
   });
});
});

so i want on click to append the preloader.gif and to call the load
method and after the images form the slideshow.html are loaded to
remove the animation. Using my script it won;t do the thing, the page
is loaded but the animation is dropped before the image is completely
loaded :( thanks


[jQuery] Best way to construct DOM objects

2009-10-15 Thread Frederic Laruelle

Hi,

JQuery (is new to me and) seems very good at querying the document
object and modifying it.

I am looking to create document fragments, assemble them, then insert
them into the document object.
eg, creating tables with variable contents and amounts of columns...

Is this a use case that JQuery is simply not designed for?
in other words, does JQuery require you to add all elements to the
document without prior nesting?

On a related note, how does JQuery allow you to nest append
statements?
Since chaining returns the parent element (matched by $), the
following statement obviously doesn't work as intended:
$(#result).append(table/).append(tr/).append(td)
Can this be rewritten to work?
(i have tried parenthesis grouping, however that was unsuccessful)

Tks!

Fred~


[jQuery] $(document).ready firing before Google Maps scripts are fully loaded

2009-10-15 Thread George V. Reilly

About 1 time in 10, I get an error during my $(document).ready
callback because Google Maps' loader hasn't pulled in all of its
JavaScript dependencies yet.

Using Web Developer  View Source  View Generated Source, here's what
the head of my document looks like when I get such an error.

 head
script src=http://maps.google.com/maps?
file=apiamp;v=3amp;sensor=falseamp;key=MY_API_KEY type=text/
javascript/script
+   script src=http://maps.gstatic.com/intl/en_us/mapfiles/176c/
maps2.api/main.js type=text/javascript/script
script src=scripts/jquery.js type=text/javascript/script
script src=scripts/jquery.jmap.js type=text/javascript/
script
script src=scripts/initialize.js type=text/javascript/
script
 /head

The line starting with + was injected by Google Maps with
document.write. The call to $(document).ready is in initialize.js

  jQuery(document).ready(function($){
jQuery('#map1').jmap('init', {'mapCenter':[37.5, -95.7],
'mapZoom': 4}); // CONUS
  });

#map1 references an empty div to hold the map. I got jquery.jmap.js
from git://github.com/digitalspaghetti/jmaps.

The error is G_NORMAL_MAP is not defined at line 104 of
jquery.jmap.js, but I think jquery.jmap.js is an innocent victim here.

And here's what the head looks like when everything's loaded before my
$(document).ready callback fires:

 head
script src=http://maps.google.com/maps?
file=apiamp;v=3amp;sensor=falseamp;key=MY_API_KEY type=text/
javascript/script
+   script src=http://maps.gstatic.com/intl/en_us/mapfiles/176c/
maps2.api/main.js type=text/javascript/script
+   style type=text/css@media print{.gmnoprint{display:none}}
@media screen{.gmnoscreen{display:none}}/style
+   script src=http://maps.gstatic.com/intl/en_us/mapfiles/176c/
maps2.api/mod_jslinker.js charset=UTF-8 type=text/javascript/
script
script src=scripts/jquery.js type=text/javascript/script
script src=scripts/jquery.jmap.js type=text/javascript/
script
script src=scripts/initialize.js type=text/javascript/
script

+   script src=http://maps.gstatic.com/cat_js/intl/en_us/mapfiles/
176c/maps2.api/%7Bmod_drag,mod_ctrapi%7D.js charset=UTF-8
type=text/javascript/script
+   script src=http://maps.gstatic.com/intl/en_us/mapfiles/176c/
maps2.api/mod_apiiw.js charset=UTF-8 type=text/javascript/
script
+   script src=http://maps.gstatic.com/intl/en_us/mapfiles/176c/
maps2.api/mod_exdom.js charset=UTF-8 type=text/javascript/
script
 /head

The Net tab in Firebug shows that the extra GMaps scripts have not
been loaded in the failure case.

Any suggestions? Does script injection with document.write play well
with $(document).ready?

This is driving me nuts. Any help appreciated.

/George V. Reilly
Seattle, WA




[jQuery] jeditable - setting a different url

2009-10-15 Thread pixeline

Hi!

I'm trying to use the jeditable plugin to update a lot of different
strings coming from various part of the database.

I would like to set it like this:

$(span.editInPlace).editable($(this).attr('rel'), {
indicator : 'Un instant, sauvegarde en cours...',
tooltip   : 'Cliquez sur le nom pour le modifier.'
});


But Firebug throws me an error :

Erreur : uncaught exception: [Exception... Component returned failure
code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIXMLHttpRequest.open]
nsresult: 0x80070057 (NS_ERROR_ILLEGAL_VALUE)  location: JS
frame :: http://youplaboum.dev/_js/jquery-1.3.2.min.js :: anonymous ::
line 19  data: no]


If i hardcode the url instead of using the rel attribute, it works.
But i would really like to have just one javascript call for all my
editable zones, and be able to specify the url via an attribute.

Is that possible at all ?

Thank you,

Alexandre


[jQuery] Re: Best way to construct DOM objects

2009-10-15 Thread Karl Swedberg

Hi Fred, I'll answer your second question:

On Oct 15, 2009, at 9:03 PM, Frederic Laruelle wrote:


On a related note, how does JQuery allow you to nest append
statements?
Since chaining returns the parent element (matched by $), the
following statement obviously doesn't work as intended:
$(#result).append(table/).append(tr/).append(td)
Can this be rewritten to work?
(i have tried parenthesis grouping, however that was unsuccessful)



It might be easier to do it like this:

$('#result').append('tabletrtd/td/tr/table');

But if you really wanted to keep the append chain, you'd have to add a  
traversal method in between:


$('#result').append('table/').find('table').append('tr/ 
').find('tr').append('td/')

( you could use .children() instead of .find() )

That seems like quite a bit of work, though.


--Karl


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





[jQuery] Re: $(document).ready firing before Google Maps scripts are fully loaded

2009-10-15 Thread Dave Methvin

So all those extra scripts are injected into the head with
document.write? If so they should have definitely been there before
any script below them executed. Have you found the place where Google
Maps is actually doing the document writes for the other scripts? I am
wondering whether it might be adding at least some of the scripts
asynchronously by injecting script tags to the head.


[jQuery] Re: A quick note about CFJS

2009-10-15 Thread Jack Killpatrick

Great, thanks for the announcement. BTW. $.DollarFormat is a fav ;-)

- Jack

Chris Jordan wrote:
I just wanted to let everyone know that CFJS 1.1.11 is now available. 
There was a small bug in two of the list functions (ListContains and 
ListContainsNoCase). You can read about the changes here 
http://cjordan.us/index.cfm/2009/10/15/CFJS---Bug-Fix-Release. 
You can download the latest version of CFJS here 
http://cfjs.riaforge.org.


Thanks,
Chris




[jQuery] Re: Best way to construct DOM objects

2009-10-15 Thread Dave Methvin

There are a lot of ways to accomplish this. Karl's post demonstrated
one way to create larger fragments directly with jQuery. In addition
to .append() you can look at using the .wrap() methods.

Mike Geary may come by and give you a pointer to his DOM creation
methods, which I used on several projects:
http://mg.to/2006/02/27/easy-dom-creation-for-jquery-and-prototype

Lately I have been putting template fragments in the original html
file (with display:none of course) then cloning/modifying them and
putting them back into the document.


[jQuery] Re: $(document).ready firing before Google Maps scripts are fully loaded

2009-10-15 Thread George V. Reilly

On Oct 15, 6:49 pm, Dave Methvin dave.meth...@gmail.com wrote:
 So all those extra scripts are injected into the head with
 document.write? If so they should have definitely been there before
 any script below them executed. Have you found the place where Google
 Maps is actually doing the document writes for the other scripts? I am
 wondering whether it might be adding at least some of the scripts
 asynchronously by injecting script tags to the head.

The first injected script (main.js) is definitely injected with
document.write. I haven't looked to see how the other one's are
injected, but given that they appear at the end of head after the
explicit script blocks, it suggests that there might be some
appendChild games going on.

/George


[jQuery] Re: Jquery for show / hide item in list

2009-10-15 Thread dEwA nich
I've tried that script, but why the jquery doesn't work?? I'm newbie in
jquery. I write like these :
script type=text/javascript
$(document).ready(function(){
   $('.main ul').each(function(){
var $this = $(this), lis = $this.find('li:gt(9)').hide();
if(lis.length0){
$this.append($('li').text('More').click(function(){
lis.toggle();
$(this).text($(this).text() === 'More' ? 'Less' :
'More');
}));
}
});
});

/script

body
ul id=narrow-search
 li class=main
  Category
  ul
liCategory Name/li
liCategory Name/li
liCategory Name/li
liCategory Name/li
liCategory Name/li
liCategory Name/li
liCategory Name/li
liCategory Name/li
liCategory Name/li
liCategory Name/li
  /ul
  ul style=display:none;
liCategory Name/li
liCategory Name/li
liCategory Name/li
liCategory Name/li
liCategory Name/li
liCategory Name/li
liCategory Name/li
liCategory Name/li
  /ul
  a href=#more/a
  /li
  li class=main
  Brand
  /ul
ul style=display:none;
liBrand Name/li
  liBrand Name/li
  liBrand Name/li
  liBrand Name/li
  liBrand Name/li
  liBrand Name/li
  liBrand Name/li
  liBrand Name/li
  liBrand Name/li
  liBrand Name/li
  liBrand Name/li
  liBrand Name/li
  liBrand Name/li
  liBrand Name/li
  liBrand Name/li
  liBrand Name/li
  liBrand Name/li
  liBrand Name/li
  liBrand Name/li
  liBrand Name/li
  liBrand Name/li
  liBrand Name/li
  liBrand Name/li
  liBrand Name/li
/ul
a href=#more/a
  /li
  li class=mainetc.../li
/ul

/body
...

Can you help me,Charlie??? thanks before..

On Thu, Oct 15, 2009 at 10:48 AM, Charlie charlie...@gmail.com wrote:

  there was some very interesting code on this list a few months ago that
 should help you out

 couldn't get the thread from google group search but can see whole thread
 here

 http://www.mail-archive.com/jquery-en@googlegroups.com/msg77035.html

 look toward end of thread for mkmanning solution, short and sweet




 dEwA nich wrote:

 Dear friends,

 I'm looking for jquery scripts to show/hide element in unordered list like
 http://bbc.co.uk with +, - button. I've got some script from here :
 http://paste.pocoo.org/show/86584/ and
 http://www.killersites.com/forums/topic/780/jquery-add-remove-list-item/.
 But I little confused to use them. They just can be used if I have one
 unordered list. If I have two or more unordered list, the script won't work.

 Can somebody help me??

 thanks before..





[jQuery] Script for tabs?

2009-10-15 Thread lukas

Can anybody direct me to a lightweight jquery script controlling tabs?
I just want the activated tab to appear differently than the rest of
the tabs. Thank you!


[jQuery] Validating Australian ABN numbers

2009-10-15 Thread Sam

ABN - Australian Business Numbers

I knew they had to be numeric and 11 digits. Then i found this:
http://www.ato.gov.au/businesses/content.asp?doc=/content/13187.htmpc=001/003/021/002/001mnu=610mfp=001/003st=cy=1

Which explains quite nicely how to validate a number. So I thought I
would share this:

function abnValidate(value, element){
if (value.length != 11 || isNaN(parseInt(value)))
return false;

var weighting =
[10,1,3,5,7,9,11,13,15,17,19];
var tally = (parseInt(value[0]) - 1) * weighting[0];
for (var i = 1; i  value.length; i++){
tally += (parseInt(value[i]) * weighting[i]);
}

return (tally % 89) == 0;
}

jQuery.validator.addMethod(
'abnValidate',
abnValidate, 'This ABN is not valid'
);


[jQuery] HELP!!! css content filters

2009-10-15 Thread huntspointer2009

- Can someone please help me solve the following issue?
- How can I select and apply a 'background-color' to the following
li/li tags using JQuery?

ul class=item_list
li/li
li/li
li/li!-- I want to select this one --
li/li!-- I want to select this one --
li/li
li/li
li/li!-- I want to select this one --
li/li!-- I want to select this one --
li/li
li/li
li/li!-- I want to select this one --
li/li!-- I want to select this one --
li/li
li/li
li/li!-- I want to select this one --
li/li!-- I want to select this one --
li/li
li/li
/ul


I've tried the following code, but it does NOT work:
var test_css = {'background':'#000'};
$(ul li:nth-child(3n)).css(test_css);


(Thank you, in advance)