[jQuery] missing background-image

2009-09-13 Thread macsig

Hello guys,
I have a series of divs (all with the same CSS class) and I'm trying
to add dynamically a background image to each one (each div needs a
different image) so here my code

$('.panel').css({'background-image' : 'url(../images/sub/'+ $
(this).attr(id) +'.png)'});

but unfortunately my divs don't have any background; however if I
hardcode a image, for instance

$('.panel').css({'background-image' : 'url(../images/sub/bg1.png)'});

every div has the (same) background.

Finally if I print out the image path for each div

 $('.panel').each(function(){
alert('url(../images/sub/'+ $(this).attr(id) +'.png)'});
});

the path looks fine.


Am I missing something???

THANKS

Sig


[jQuery] Re: missing background-image

2009-09-13 Thread Scott Haneda


Look at the network panel in firebugs or activity monitor in Safari.  
See what URL is being requested for the images. You can then see where  
there error in your path is.


--
Scott
Iphone says hello.

On Sep 12, 2009, at 11:10 PM, macsig sigbac...@gmail.com wrote:



Hello guys,
I have a series of divs (all with the same CSS class) and I'm trying
to add dynamically a background image to each one (each div needs a
different image) so here my code

$('.panel').css({'background-image' : 'url(../images/sub/'+ $
(this).attr(id) +'.png)'});

but unfortunately my divs don't have any background; however if I
hardcode a image, for instance

$('.panel').css({'background-image' : 'url(../images/sub/bg1.png)'});

every div has the (same) background.

Finally if I print out the image path for each div

$('.panel').each(function(){
alert('url(../images/sub/'+ $(this).attr(id) +'.png)'});
});

the path looks fine.


Am I missing something???

THANKS

Sig


[jQuery] Re: missing background-image

2009-09-13 Thread Macsig

http://localhost:3000/images/sub/undefined.png

but I don't understand why.

Thanks

On Sep 12, 11:19 pm, Scott Haneda talkli...@newgeo.com wrote:
 Look at the network panel in firebugs or activity monitor in Safari.  
 See what URL is being requested for the images. You can then see where  
 there error in your path is.

 --
 Scott
 Iphone says hello.

 On Sep 12, 2009, at 11:10 PM, macsig sigbac...@gmail.com wrote:





  Hello guys,
  I have a series of divs (all with the same CSS class) and I'm trying
  to add dynamically a background image to each one (each div needs a
  different image) so here my code

  $('.panel').css({'background-image' : 'url(../images/sub/'+ $
  (this).attr(id) +'.png)'});

  but unfortunately my divs don't have any background; however if I
  hardcode a image, for instance

  $('.panel').css({'background-image' : 'url(../images/sub/bg1.png)'});

  every div has the (same) background.

  Finally if I print out the image path for each div

  $('.panel').each(function(){
  alert('url(../images/sub/'+ $(this).attr(id) +'.png)'});
  });

  the path looks fine.

  Am I missing something???

  THANKS

  Sig


[jQuery] Re: ui Datepicker - only show days I want

2009-09-13 Thread ryan.j

if you only want to display a small selection of pre-defined dates
it'd probably be easier to just write your own little pseudo-
datepicker than modify the jquery UI one.

unless i'm misunderstanding what you want, essentially you want to
append array.length elements to a container you .toggle at the
appropriate time, and have a live click event bound to those elements
which populates the appropriate field.

On Sep 13, 1:19 am, Info i...@vglservices.com wrote:
 does anyone know the syntax to only show days I want int he
 datepicker, for example I want to show a calendar but only show the
 following dates, 09/11/09, 09/25/09, 10/01/09 ??


[jQuery] Re: Jquery Modal Dialog

2009-09-13 Thread NM


Hi,

Thanks, but I have already tried this way and the issue that I am
facing in this is that the whole dialog in which that div is contained
is not being able to be dragged and the only portion that i making it
draggable is dragged...

Footer div is dialog1.

Please let me know if I am doing something wrong and how can i make
the whole dialog draggable or from footer just like currently it is
from title...


I am putting sample HTML of what I am using it...

!doctype html
html lang=en
head
titlejQuery UI Dialog - Basic modal/title
link type=text/css href=../../themes/base/ui.all.css
rel=stylesheet /
script type=text/javascript src=../../jquery-1.3.2.js/script
script type=text/javascript src=../../ui/ui.core.js/script
script type=text/javascript src=../../ui/ui.draggable.js/
script
script type=text/javascript src=../../ui/ui.dialog.js/script
script type=text/javascript src=../../external/bgiframe/
jquery.bgiframe.js/script
link type=text/css href=../demos.css rel=stylesheet /
style
#draggable, #draggable2 { width: 100px; height: 100px; padding:
0.5em; float: left; margin: 0 10px 10px 0; }
#draggable p { cursor: move; }


/style
script type=text/javascript
$(function() {
$(#dialog).dialog({
bgiframe: true,
modal: true,
height:'auto'
});
$(#dialog1).draggable(handle:'div');
});
/script
/head
body


div class=demo

div id=dialog title=title

p
sdfsdfdsf
sdfdsf
sdfsdfsdf
dsfsdfsd
sdfsdfsd
dsfsdfds
fdsfsdffgdfgfdgdfgdf
dsfsdf
sdfsdffsdf
sdfsdfsdf
dsfsd
dfg
dfgdf
gdf
gdf
gfd
g
dfg
df
gdfnnkkk/p
div id=dialog1 class=ui-widget-content
p class=ui-widget-headerI can be dragged only by this handle/p
/div
/div

!-- Sample page content to illustrate the layering of the dialog --
div class=hiddenInViewSource style=padding:20px;
pSed vel diam id libero a href=http://example.com;rutrum
convallis/a. Donec aliquet leo vel magna. Phasellus rhoncus faucibus
ante. Etiam bibendum, enim faucibus aliquet rhoncus, arcu felis
ultricies neque, sit amet auctor elit eros a lectus./p
form
input value=text input /br /
input type=checkbox /checkboxbr /
input type=radio /radiobr /
select
optionselect/option
/selectbr /br /
textareatextarea/textareabr /
/form
/div!-- End sample page content --

/div!-- End demo --

div class=demo-description

pA modal dialog prevents the user from interacting with the rest of
the page until it is closed.  To add a semi-transparent layer that
dims out the page content behind the dialog, set the background color
and opacity of the codeoverlay/code option./p

/div!-- End demo-description --

/body
/html

On Sep 12, 9:12 pm, samma89 samma89frien...@gmail.com wrote:
 yeah..there is a way..add a div to footer or anywhere you want to use
 as the handle.after that write this in the draggable code  handle:
 'div's id or class'.thats it.


[jQuery] [Superfish] Dynamic width

2009-09-13 Thread Mnkras

Hey guys im using the superfish jquery works great!

im having some trouble getting the widths to be dynamic per column

it is a horizontal menu bar

i got the parents to be dynamic and the children to be separate from
the parent but i havent figured out how to make it so that each column
is only as long as the longest word in the column (per column like in
column 1 it says News and Events, and column 2 says Donate i dont want
there to be a ton of space after donate because news and events is
longer)

thanks!

Mnkras


[jQuery] Bizarre error being thrown in my jquery plugin... Seems to be related to regexes...?

2009-09-13 Thread fitzgen

Sorry about the last post, I meant to hit shift and hit return instead
and the form was submitted. Sorry about that. Embarrassing... :-/

Anyways,

Here is my plugin that the error is getting thrown in:
http://github.com/fitzgen/tempest/blob/c403787548e58d5ad60fe0d5230b36c62bd21dc4/jquery.tempest.js

And here is the error I receive:

[Exception... '[object Object]' when calling method:
[nsIDOMEventListener::handleEvent]  nsresult: 0x8057001c
(NS_ERROR_XPC_JS_THREW_JS_OBJECT)  location: unknown  data: no]

Line 0

And, as I mess with the VAR_TAG, BLOCK_TAG, and END_BLOCK_TAG regexes,
it comes and goes, but seems to be unrelated to the validity of the
regular expressions in question. Obviously the message itself is not
very informative, and at this point I am plain stuck.

Thanks a lot for your time.

_Nick_


[jQuery] [autocompleter] how to change the separator from , to +

2009-09-13 Thread James

hey, let me first thank for the great job you've done.
could you please tell me how can I change the word separator from , to
+?
thanks in advance.


[jQuery] Auto Selecting Navigation

2009-09-13 Thread fx

Hello all, and thanks for making this available.

I am trying to add a class to my menu for the page it is currently on.
I followed this example: 
http://docs.jquery.com/Tutorials:Auto-Selecting_Navigation

But I am not able to make it work at all.

Here is my HTML:

ul id=mainNav
lia href=/productspanProduct/span/a/li
lia href=/blogspanNews amp; Events/span/a/li
lia href=/supportspanSupport/span/a/li
lia href=/locatorspanDealer Locator/span/a/li
lia href=/about-2xlspanAbout/span/a/li
/ul

To make the nav element highlighted, the list item must have a class
of 'hover' like this 'li class=hover...'


And here is my jQuery:

var path = location.pathname.substring(1);
if ( path )
$('#mainNav a...@href$=' + path + ']').parent().attr('class',
'hover');

For the page /support for example, alert(path) would say 'support'.

The script is not applying any CSS to the list elements. I tried
different combinations, tried to add a class to the a element by
removing parent(), but nothing is triggering.

Please help.

Thanks,

Francois


[jQuery] Re: $(this).css({color : red})

2009-09-13 Thread fx

http://pastebin.com/m58a02ab3
Works fine on FF 3.5.3 on Windows as well


[jQuery] Looking for jQuery expert

2009-09-13 Thread imsam67


Hi,

I'm looking for a jQuery expert to help me with my project. My website is
developed in C#/ASP.NET so familiarity w/ ASP.NET would be a huge plus as
you'd be also helping me with the integration of the solution.

Looks like jQuery Tools has most of the functionality I'm looking for i.e.
Scrollable and Playlist for Flowplayer. In short, I'm looking for a media
viewer that would display images and videos. The images/videos would be
listed in a scrollable fashion right underneath the viewer.

Please contact me if you can help me with this. Please don't forget to
mention your rates and samples of your that would demostrate your expertise.
Please contact me via my website at www.iQuestLLC.com

Thanks,

Sam
-- 
View this message in context: 
http://www.nabble.com/Looking-for-jQuery-expert-tp25418177s27240p25418177.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] (validate), submitHandler and custom function

2009-09-13 Thread bgumbiker

Hello,
I am looking for a way to call successfully custom function from
submitHandler to do proper ajax post.

Here is my custom function:

jQuery.fn.submitWithAjax = function() {
  this.submit(function() {
$.post(this.action, $(this).serialize(), null, script);
return false;
  })
  return this;
};

Before using validate plugin I had following which worked fine:

$(document).ready(function() {
   $(#my_form).submitWithAjax();
  }

Now I have added the validation part and have no idea how to call my
custom submitWithAjax function??

$(document).ready(function() {

$(#my_form).validate({

/*Validations - works perfectly!! */

 },

 submitHandler: function(form) {

 /* $(#my_form).submitWithAjax(); - this works but
introduces recursion */

 /* how to call custom subitWithAjax() ? */

 }

});
})


Thanks!






[jQuery] Bizarre error being thrown in my jquery plugin... Seems to be related to regexes...

2009-09-13 Thread fitzgen

// Here is the error:

[Exception... '[object Object]' when calling method:
[nsIDOMEventListener::handleEvent]  nsresult: 0x8057001c
(NS_ERROR_XPC_JS_THREW_JS_OBJECT)  location: unknown  data: no]

Line 0

// end



[jQuery] Handling result from the autocomplete plugin

2009-09-13 Thread Althalos

Hello
I'm using the following autocomplete plugin: 
http://docs.jquery.com/Plugins/Autocomplete

It's getting its data from an array, here are the first couple of
values:
data[0] = Magnesium (s) | R: 11, 15 | S: 7/8, 43;
data[1] = Saltsyra 4M (aq) | R: 36/38 | S: 2. 28;
data[2] = Natriumnitrat | NaNO3 | R: 8, 22;

I have four different input elements:
- Name, which triggers the autocomplete
- three other ones

When the user enters something in name and the choses one of the
autosuggested lines, I don't want it to put that entire name into the
input window. I to ONLY put the name into it, the name is always the
first part of the string, the part before the first |.

Then I want to put the information between the first | and the second
| into the second input box, the information between the second and
third | into the third box, and the information left in the string I
want to put into a fourth input element.

How can this easiest be achieved?


[jQuery] Re: (validate), submitHandler and custom function

2009-09-13 Thread Jörn Zaefferer

Try this:

submitHandler: function(form) {
  $.post(form.action, $(this).serialize(), null, script);
}

Jörn

On Sun, Sep 13, 2009 at 12:42 AM, bgumbiker bogumil.bial...@gmail.com wrote:

 Hello,
 I am looking for a way to call successfully custom function from
 submitHandler to do proper ajax post.

 Here is my custom function:

 jQuery.fn.submitWithAjax = function() {
  this.submit(function() {
    $.post(this.action, $(this).serialize(), null, script);
    return false;
  })
  return this;
 };

 Before using validate plugin I had following which worked fine:

 $(document).ready(function() {
   $(#my_form).submitWithAjax();
  }

 Now I have added the validation part and have no idea how to call my
 custom submitWithAjax function??

 $(document).ready(function() {

    $(#my_form).validate({

                /*Validations - works perfectly!! */

             },

             submitHandler: function(form) {

             /* $(#my_form).submitWithAjax(); - this works but
 introduces recursion */

             /* how to call custom subitWithAjax() ? */

             }

        });
 })


 Thanks!







[jQuery] jquery authendicated post request..

2009-09-13 Thread Eren Yagdiran

$.post('http://'+$('#tUsername').attr(value)+':'+$('#tPassword').attr
(value)+'@'+'twitter.com/statuses/update.xml',{status:$
('#tMessage').attr(value)});

why this code when activated doesn't make a post request to the
twitter ?


[jQuery] open link from left column in right column

2009-09-13 Thread finnertyManuel

Hello,
I have been searching Google with something like the title to this
post for awhile and can't seem to find what I am sure is obvious
somewhere...

I have seen, such as on the Apple iTunes support page, here...
http://www.apple.com/es/support/itunes/

Where on the left, there is a list of links (actually, it looks like a
jExpand column, where the title opens/expands to reveal a set of links
below). The links open their content in the column to the right. I
say column in quotes because I don't know if this is a table or CSS,
but anyway...

can anyone point me to a solution?

thanks,
finn


[jQuery] Re: Auto Selecting Navigation

2009-09-13 Thread Charlie





several things might help:

1) the use of "@" is deprecated within selectors. Tutorial was likely
written prior to jQuery 1.3

try:
$(function(){
 var path = location.pathname.substring(1);
 if ( path )
 $('#sidebar_content a[href$="' + path + '"]').addClass(
'selected'); // used addClass instead of example in case other styling
class already exists
});

2) you weren't showing the $(function() or
$(document).ready(function(). Be sure your jQuery is wrapped in one of
these functions

fx wrote:

  Hello all, and thanks for making this available.

I am trying to add a class to my menu for the page it is currently on.
I followed this example: http://docs.jquery.com/Tutorials:Auto-Selecting_Navigation

But I am not able to make it work at all.

Here is my HTML:

ul id="mainNav"
lia href=""spanProduct/span/a/li
lia href=""spanNews amp; Events/span/a/li
lia href=""spanSupport/span/a/li
lia href=""spanDealer Locator/span/a/li
lia href=""spanAbout/span/a/li
/ul

To make the nav element highlighted, the list item must have a class
of 'hover' like this 'li class="hover"...'


And here is my jQuery:

var path = location.pathname.substring(1);
if ( path )
$('#mainNav a...@href$="' + path + '"]').parent().attr('class',
'hover');

For the page /support for example, alert(path) would say 'support'.

The script is not applying any CSS to the list elements. I tried
different combinations, tried to add a class to the a element by
removing parent(), but nothing is triggering.

Please help.

Thanks,

Francois

  






[jQuery] Remove subscrition

2009-09-13 Thread Info - Easyeos
Please remove subscription of i...@easyeos.it 



[jQuery] Re: [autocompleter] how to change the separator from , to +

2009-09-13 Thread alexbodn . groups

multipleSeparator='+'

On Sun, Sep 13, 2009 at 14:22, James spidman...@gmail.com wrote:


hey, let me first thank for the great job you've done.
could you please tell me how can I change the word separator from , to
+?
thanks in advance.





--
alex



smime.p7s
Description: S/MIME Cryptographic Signature


[jQuery] Re: $(this).css({color : red})

2009-09-13 Thread Matthew Rolph

i have win so yea and i figured out, for some reason,
double quotes:
selectors(i.e. $(p))
single quotes:
handlers or attributes(i.e. .toggleClass('red'))

the new and improved
On Sat, Sep 12, 2009 at 8:59 PM, Charlie Griefer
charlie.grie...@gmail.com wrote:

 All 3 of the samples I pasted above (the pastebin links) work in FF3.5 (on OS 
 X)


 On Sat, Sep 12, 2009 at 5:07 PM, Matthew Rolph marine.ro...@gmail.com wrote:

 it's still not working right so i'm getting safari and seeing if that works 
 out


 On Sat, Sep 12, 2009 at 1:10 PM, jhm jmay...@gmail.com wrote:


 The code on that page doesn't match the code in your file. Yours is
 missing the curly brackets:

        $(p.blue).css(color : red);

 should be

        $(p.blue).css({color : red});

 Any syntax error like that will stop the script dead.


 On Sep 12, 9:58 am, Matthew Rolph marine.ro...@gmail.com wrote:
  http://testingspot.hostcell.net/sandbox/tests/css.jquery.test.html
  it somehow doesn't work at all not even the css
  does it matter where the style and scripts are in the of the document
 
  On 9/12/09, Mike Alsup mal...@gmail.com wrote:
 
 
 
   see that code in the subj.? i'm using FF 3.5, and no matter what i
   do, .css won't work!! any help?
 
   Maybe this isn't what you think it is.  Can you post some code or a
   link?





 --
 I have failed as much as I have succeeded. But I love my life. I love my 
 wife. And I wish you my kind of success.


[jQuery] Re: $(this).css({color : red})

2009-09-13 Thread Matthew Rolph
CSS Testhttp://testingspot.hostcell.net/sandbox/tests/css.jquery.test.html

On Sun, Sep 13, 2009 at 10:01 AM, Matthew Rolph marine.ro...@gmail.comwrote:

 i have win so yea and i figured out, for some reason,
 double quotes:
 selectors(i.e. $(p))
 single quotes:
 handlers or attributes(i.e. .toggleClass('red'))

 the new and improved
 On Sat, Sep 12, 2009 at 8:59 PM, Charlie Griefer
 charlie.grie...@gmail.com wrote:
 
  All 3 of the samples I pasted above (the pastebin links) work in FF3.5
 (on OS X)
 
 
  On Sat, Sep 12, 2009 at 5:07 PM, Matthew Rolph marine.ro...@gmail.com
 wrote:
 
  it's still not working right so i'm getting safari and seeing if that
 works out
 
 
  On Sat, Sep 12, 2009 at 1:10 PM, jhm jmay...@gmail.com wrote:
 
 
  The code on that page doesn't match the code in your file. Yours is
  missing the curly brackets:
 
 $(p.blue).css(color : red);
 
  should be
 
 $(p.blue).css({color : red});
 
  Any syntax error like that will stop the script dead.
 
 
  On Sep 12, 9:58 am, Matthew Rolph marine.ro...@gmail.com wrote:
   http://testingspot.hostcell.net/sandbox/tests/css.jquery.test.html
   it somehow doesn't work at all not even the css
   does it matter where the style and scripts are in the of the document
  
   On 9/12/09, Mike Alsup mal...@gmail.com wrote:
  
  
  
see that code in the subj.? i'm using FF 3.5, and no matter what i
do, .css won't work!! any help?
  
Maybe this isn't what you think it is.  Can you post some code or
 a
link?
 
 
 
 
 
  --
  I have failed as much as I have succeeded. But I love my life. I love my
 wife. And I wish you my kind of success.



[jQuery] Re: missing background-image

2009-09-13 Thread Andi23

I think that $(this) may not work in that context.

See if this works:
$('.panel').each(function(){
$(this).css(/*set CSS here*/);
});


[jQuery] Why no entire text is replaced when I pick a date on the datepicker?

2009-09-13 Thread wei

I have a datapicker on the date field with a format of -mm-dd.
After selecting a date on the datepicker, only a portion of the
default value is replaced. Can someone tell me what is missing and how
to resolve this problem?

Thanks very much in advance.


[jQuery] Re: Auto Selecting Navigation

2009-09-13 Thread fx

You did it! Thank you.


[jQuery] answer group

2009-09-13 Thread moiramethot45250

Find answer for any question here http://radiowiki.teknusi.org/cheap-flight-256


[jQuery] answer group

2009-09-13 Thread moiramethot45250

Find answer for any question here http://radiowiki.teknusi.org/cheap-flight-256


[jQuery] Google Maps, JQuery and KML file need Help

2009-09-13 Thread pennfoli0

Hi,

I'm new to Google Map API and also with JQuery Javascript framework. I
really
need help in building this project that uses Google Map, JQuery and a
KML
file.

To give you an Idea of what I'm planning to build.
This is an image preview of my interface (http://pennfolio.com/
GoogleMap/ui-preview.jpg).

I am currently stuck with this code,
http://pennfolio.com/GoogleMap/index.html. (I can't figure out how to
pull data from the kml file, like I would like to get the image and
put it in a div.)

I want to load the kml file to the Google map and replacing all the
random marker with the image specified in the KML file.

I created a div with an ID of sidebar, it's main purpose would be
the container of all the thumbnails that are linked in the map, (I
don't
know how to get the images from the KML file and putting the inside
the #sidebar )

If possible I would like to retain the jquery ui, Since I like the
feature that when a user click a marker or the thumbnail in the map or
in the sidebar A Tab pops up with the
description. Description also would be loaded from the kml file.

I think my main problem is getting the values from the KML file and
would output in html.


-- The Files,
http://pennfolio.com/GoogleMap/GoogleMap-files.zip

I'm also open to other approach and suggestion.

Thanks You


[jQuery] Unknown pseudo-class or pseudo-element 'odd'.

2009-09-13 Thread shapper

Hello,

I am using JQuery 1.3.2 and the following code line:
$(table.Engine tbody tr:odd).addClass(Alternate);

I get the following error on firebug:
Unknown pseudo-class or pseudo-element 'odd'.

What am I doing wrong?

Thanks,
Miguel


[jQuery] this.each is not a function

2009-09-13 Thread shapper

Hello,

I am using JQuery 1.3.2 and I get the error this.each is not a
function when I try to use the following plugin:

jQuery.fn.defuscate = function(settings) {
settings = jQuery.extend({
link: true
}, settings);
var regex = /\b([A-Z0-9._%-]+)\([^)]+\)((?:[A-Z0-9-]+\.)+[A-Z]
{2,6})\b/gi;
return this.each(function() {
if ($(this).is('a...@href]')) {
// If it's an a element, defuscate the href attribute
$(this).attr('href', $(this).attr('href').replace(regex,
'$...@$2'));
// Make sure that the element's contents is not made into
a link
var is_link = true;
//alert($(this).attr('href'));
}
// Defuscate the element's contents
$(this).html($(this).html().replace(regex, (settings.link  !
is_link ? 'a href=mailto:$...@$2;$...@$2/a' : '$...@$2')));
});
}

Could someone, please, tell me what is wrong?

Thanks,
Migueç


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

2009-09-13 Thread Olivier Percebois-Garve


return $(this).each(function() {


shapper wrote:

Hello,

I am using JQuery 1.3.2 and I get the error this.each is not a
function when I try to use the following plugin:

jQuery.fn.defuscate = function(settings) {
settings = jQuery.extend({
link: true
}, settings);
var regex = /\b([A-Z0-9._%-]+)\([^)]+\)((?:[A-Z0-9-]+\.)+[A-Z]
{2,6})\b/gi;
return this.each(function() {
if ($(this).is('a...@href]')) {
// If it's an a element, defuscate the href attribute
$(this).attr('href', $(this).attr('href').replace(regex,
'$...@$2'));
// Make sure that the element's contents is not made into
a link
var is_link = true;
//alert($(this).attr('href'));
}
// Defuscate the element's contents
$(this).html($(this).html().replace(regex, (settings.link  !
is_link ? 'a href=mailto:$...@$2;$...@$2/a' : '$...@$2')));
});
}

Could someone, please, tell me what is wrong?

Thanks,
Migueç

  




[jQuery] Superfish: Leave sub ul menu visible when a tag class is set as active

2009-09-13 Thread LoicDuros

Hello,

I'm using superfish for a drop down hover menu. It works perfect
except I would like the sub menus to remain visible when one of the
a tag from the menu has class=active.

Here is a quick overview of the menu html:
ul class=primary-links
  li
 a href=mainitem parent 1/a
 ul
lia href=page2item child/a/li
 /ul
  /li
/ul

If the current page is main -- class='active' is automatically added
to the A tag (with Drupal). If you are currently in page2, the
class='active' is added to the A tag of the sub-menu.

Now, how can I get the sub menu to be always displayed -- regardless
of superfish, either when item parent 1 A tag is set as class='active'
of the item child A tag is set as class='active'.

If you can direct me toward what I'd need to achieve this, it would be
great!

Thanks so much for your help!


[jQuery] Twitter for support?

2009-09-13 Thread Mike Alsup

Over the past few months I've been fielding an increasing number of
support requests via Twitter (for Cycle, BlockUI, and Form plugins).
In some ways it's a nice way to respond to simple questions but
obviously it's not well-suited for more in-depth questions and
responses.  I generally direct people to this Google Group for
anything non-trivial but I'm wondering what others think about
leveraging Twitter for simple QA.  Thoughts?

Mike

http://twitter.com/malsup


[jQuery] Browser Stop call's ajax.Error

2009-09-13 Thread nirazue...@gmail.com

Hi, I've noticed that when I click the Stop button on the browser, or
navigate to another page, jQuery.ajax calls the error event.

You can see the problem live at: http://www.pingmyport.com/

Code:

   this.getJson = function(timeout) {
  if(this.XMLHttpRequest) this.XMLHttpRequest.abort();
  this.XMLHttpRequest = $.ajax({
 complete: function(){$(#kitLoader).hide();},
 data: {
Address: him.Address,
portNum: him.portNum,
portType: him.portType
 },
 dataType: json,
 error: him.serviceUnavailable,
 success: him.processJson,
 timeout: timeout,
 type: POST,
 url: http://www.pingmyport.com/checkPort.php;
  });
   };


[jQuery] Re: $(this).css({color : red})

2009-09-13 Thread Matthew Rolph
New Link: CSShttp://testingspot.hostcell.net/sandbox/tests/jquery/css.html

 On Sun, Sep 13, 2009 at 10:01 AM, Matthew Rolph marine.ro...@gmail.comwrote:

 i have win so yea and i figured out, for some reason,
 double quotes:
 selectors(i.e. $(p))
 single quotes:
 handlers or attributes(i.e. .toggleClass('red'))

 the new and improved
 On Sat, Sep 12, 2009 at 8:59 PM, Charlie Griefer
 charlie.grie...@gmail.com wrote:
 
  All 3 of the samples I pasted above (the pastebin links) work in FF3.5
 (on OS X)
 
 
  On Sat, Sep 12, 2009 at 5:07 PM, Matthew Rolph marine.ro...@gmail.com
 wrote:
 
  it's still not working right so i'm getting safari and seeing if that
 works out
 
 
  On Sat, Sep 12, 2009 at 1:10 PM, jhm jmay...@gmail.com wrote:
 
 
  The code on that page doesn't match the code in your file. Yours is
  missing the curly brackets:
 
 $(p.blue).css(color : red);
 
  should be
 
 $(p.blue).css({color : red});
 
  Any syntax error like that will stop the script dead.
 
 
  On Sep 12, 9:58 am, Matthew Rolph marine.ro...@gmail.com wrote:
   http://testingspot.hostcell.net/sandbox/tests/css.jquery.test.html
   it somehow doesn't work at all not even the css
   does it matter where the style and scripts are in the of the
 document
  
   On 9/12/09, Mike Alsup mal...@gmail.com wrote:
  
  
  
see that code in the subj.? i'm using FF 3.5, and no matter what
 i
do, .css won't work!! any help?
  
Maybe this isn't what you think it is.  Can you post some code
 or a
link?
 
 
 
 
 
  --
  I have failed as much as I have succeeded. But I love my life. I love my
 wife. And I wish you my kind of success.





[jQuery] Re: jQuery called twice, if I delete one, all jQuery scripts stop working

2009-09-13 Thread Alex Weber

did you get it to work?

On Sep 12, 1:33 pm, Adrian Chen ac...@mac.com wrote:
 On Sep 12, 10:09 am, Alex Weber alexwebe...@gmail.com wrote:

  That's totally weird!

  I would start over, delete all the include files and add it once
  before any other external js script.  Test it and gradually add the
  others one by one afterwards... This is really a weird problem, its
  the best I can think of because this hasn't happened to me!!

  Also, re-download jQuery and check for any conflicts the other files
  might have.  Try calling jQuery.noConflict() at any point after jQuery
  and the other libraries have been loaded!

  Alex

 After some testing, found out the culprit; one of the js files that
 were in the list. I got no clue what could be triggering it, this is
 the code inside the js file that is giving the issue:

 var j = jQuery.noConflict();

 j(document).ready(function()
 {
         j('a#content-link').click(function()
         {
                 j('#content-div').toggle(400);
                 return false;
         });

 });

 That's from this 
 scripthttp://www.studioyucca.com/2008/10/03/hideshow-content-with-jquery/


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

2009-09-13 Thread shapper


On Sep 13, 7:28 pm, Mike McNally emmecin...@gmail.com wrote:
 Have you used a debugging tool to figure out what this is?  Also,
 your function isn't returning this, possibly an unrelated problem
 but it probably should be fixed.

What should I do?

Sorry, I am not familiar with JQuery. I am just starting.
This was a plugin I downloaded from JQuery Plugins site that keeps
giving me errors.

I am using Firebug and a Validator both in Firefox

Thanks,
Miguel


[jQuery] Re: Twitter for support?

2009-09-13 Thread John Resig
That sounds about right - hopefully we'll be able to direct them to a forum,
eventually (which would be much easier to use, I'd expect, for someone who's
using twitter).

--John


On Sun, Sep 13, 2009 at 2:53 PM, Mike Alsup mal...@gmail.com wrote:


 Over the past few months I've been fielding an increasing number of
 support requests via Twitter (for Cycle, BlockUI, and Form plugins).
 In some ways it's a nice way to respond to simple questions but
 obviously it's not well-suited for more in-depth questions and
 responses.  I generally direct people to this Google Group for
 anything non-trivial but I'm wondering what others think about
 leveraging Twitter for simple QA.  Thoughts?

 Mike

 http://twitter.com/malsup



[jQuery] Re: Twitter for support?

2009-09-13 Thread MorningZ

Hah, and John posted that right before he gave a closing state of
jQuery address... looking forward to the day of getting to a more
traditional forum engine

As for original posted question, I've been thinking of implementing
something Twitter related on my car website, as after a month ago
moving my front page news to a Twitter API based one, I've been
absolutely surprised by how many followers the site's Twitter
account has accrued.. I'm hoping at some point to leverage that to
help my members better  :-)


On Sep 13, 4:28 pm, John Resig jere...@gmail.com wrote:
 That sounds about right - hopefully we'll be able to direct them to a forum,
 eventually (which would be much easier to use, I'd expect, for someone who's
 using twitter).

 --John

 On Sun, Sep 13, 2009 at 2:53 PM, Mike Alsup mal...@gmail.com wrote:

  Over the past few months I've been fielding an increasing number of
  support requests via Twitter (for Cycle, BlockUI, and Form plugins).
  In some ways it's a nice way to respond to simple questions but
  obviously it's not well-suited for more in-depth questions and
  responses.  I generally direct people to this Google Group for
  anything non-trivial but I'm wondering what others think about
  leveraging Twitter for simple QA.  Thoughts?

  Mike

 http://twitter.com/malsup


[jQuery] Re: Does anyone see any problem with this code that might cause IE not to work with it?

2009-09-13 Thread MorningZ

i don't know about the rest of the code, but are you aware you are
redefining and reattaching the plugin code getCheckboxVals on *each
and every .live() call*  ?



On Sep 13, 4:08 pm, Rick Faircloth r...@whitestonemedia.com wrote:
 There are more pieces to the code puzzle than this section, but for some
 reason , once I click

 the #addButton referenced at the start of the code, IE will go all the way
 down through the

 code, firing the alerts properly, until it gets to the $.ajax section.
 After it gets to that point

 in the code, nothing happens.

 Now I know there could be other code involved that could be a problem, but I
 just wanted

 to focus on this section for now and not ask too much of any reviewer.

 FF processes everything correctly; all alerts, ajax function, including
 inserting data into the database.

 But IE just hits a wall at $.ajax.

 I've been over the code, modified the code, done everything I can think of
 to get this to work,

 but can't figure out what could be the problem.

 Any ideas, anyone?  Anything at all?

 Thanks for taking the time to look over this.

 Rick

 $(document).ready(function() {

      $('#addButton').live('click', function() {

           // --- [ to get multiple carStorage checkbox values ] --- //

           alert('addButton clicked');

           jQuery.fn.getCheckboxVals = function() {

                alert('running getCheckboxVals');

                var checkboxVals = [];

                var i = 0;

                this.each(function(i) {

                checkboxVals[i] = $(this).val();

           });

           var checkboxVals = checkboxVals.join(', ');

           return checkboxVals;

           }

           values  =  {  dsn:                   'mydsn',

                         streetNumber:          $('#streetNumber').val(),

                         streetName:            $('#streetName').val(),

                         city:                  $('#city').val(),

                         state:                 $('#state').val(),

                         zipCode:               $('#zipCode').val(),

                         propertyType:          $('#propertyType,
 option:selected').val(),

                         county:                $('#county').val(),

                         subdivision:           $('#subdivision').val(),

                         totalRooms:            $('#totalRooms').val(),

                         bedrooms:              $('#bedrooms').val(),

                         fullBaths:             $('#fullBaths').val(),

                         halfBaths:             $('#halfBaths').val(),

                         rent:                  $('#rent').val(),

                         yearBuilt:             $('#yearBuilt').val(),

                         securityDeposit:       $('#securityDeposit').val(),

                         leaseTerm:             $('#leaseTerm').val(),

                         availabilityDate:      $('#availabilityDate').val(),

                         petsAllowed:
 $('#petsAllowed:checked').val(),

                         petDeposit:            $('#petDeposit').val(),

                         livingRoom:
 $('#livingRoom:checked').val(),

                         diningRoom:
 $('#diningRoom:checked').val(),

                         familyRoom:
 $('#familyRoom:checked').val(),

                         fireplace:
 $('#fireplace:checked').val(),

                         appliances:            $('#appliances').val(),

                         waterIncluded:
 $('#waterIncluded:checked').val(),

                         fence:                 $('#fence:checked').val(),

                         fenceDescription:
 $('input:checkbox[name=fenceDescription]:checked').getCheckboxVals(),

                         carStorage:
 $('input:checkbox[name=carStorage]:checked').getCheckboxVals(),

                         utilities:             $('#utilities,
 option:selected').val(),

                         alarmSystem:
 $('#alarmSystem:checked').val(),

                         washerDryerIncluded:
 $('#washerDryerIncluded:checked').val(),

                         washerDryerHookups:
 $('#washerDryerHookups:checked').val(),

                         storage:               $('#storage:checked').val(),

                         other:                 $('#other').val(),

                         available:
 $('#available:checked').val(),

                         //softDelete:
 $('#softDelete:checked').val(),

                         remarks:               $('#remarks').val()

 }

                         alert(  $('#remarks').val() );

                         $.ajax   ({            cache:      false,

                                                type:       'post',

                                                url:
 'rentalProperties.cfc?method=mAddRentalPropertyreturnFormat=json',

                                                dataType:   'json',

                                               

[jQuery] Re: jquery validate and datepicker.

2009-09-13 Thread Williamk

Was it something I said? Or didn't say?
:/

On Sep 8, 8:28 am, Williamk bkopl...@gmail.com wrote:
 Oh, I put the demo page for the remember the milk with the datepicker
 on a site, so you can see what I am talking about.
 No porn or viagra or Nigerian cons or anything else dubious.
 If you are interested:http://avianflew.com/milk/

 On Sep 7, 9:48 pm, Williamk bkopl...@gmail.com wrote:



  For some reason, and this is baffling me, if I use both the validation
  plugin and the datepicker plugin, some voodoo is occurring.
  I have to select the date twice for it to validate.
  For example, here are the steps I took:
  I try to submit the form without dates in the fields.
  The form is not sent and the date fields are flagged.
  If you open it once and select a date, the calendar closes, but it
  still shows as invalid.
  If you repeat this action, selecting the same exact field and opening
  the calendar and selecting the date again, then it shows as valid.
  I'm not sure how to shoehorn this into validating on the first click
  on the calendar.
  And to be honest, I'm terrified I'm going to get flamed  over this.
  I generally consider myself pretty resourceful, but this is making me
  a little bit loco.


[jQuery] Re: Does anyone see any problem with this code that might cause IE not to work with it?

2009-09-13 Thread Rick Faircloth

I just wrote that piece of code to see if it would work like
I was hoping it would to get and create a comma-delimited list of
the same-named checkbox values.  I'll move it out when I clean up the code.

No ideas about the rest of the code being a problem for IE?

I think I'm just going to have to break down the jquery and coldfusion to
a very simple version with only one or two values to see if somehow it's
the values or processing of them that's giving IE fits.

Thanks for looking.

Rick

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of MorningZ
Sent: Sunday, September 13, 2009 5:16 PM
To: jQuery (English)
Subject: [jQuery] Re: Does anyone see any problem with this code that might
cause IE not to work with it?


i don't know about the rest of the code, but are you aware you are
redefining and reattaching the plugin code getCheckboxVals on *each
and every .live() call*  ?



On Sep 13, 4:08 pm, Rick Faircloth r...@whitestonemedia.com wrote:
 There are more pieces to the code puzzle than this section, but for some
 reason , once I click

 the #addButton referenced at the start of the code, IE will go all the way
 down through the

 code, firing the alerts properly, until it gets to the $.ajax section.
 After it gets to that point

 in the code, nothing happens.

 Now I know there could be other code involved that could be a problem, but
I
 just wanted

 to focus on this section for now and not ask too much of any reviewer.

 FF processes everything correctly; all alerts, ajax function, including
 inserting data into the database.

 But IE just hits a wall at $.ajax.

 I've been over the code, modified the code, done everything I can think of
 to get this to work,

 but can't figure out what could be the problem.

 Any ideas, anyone?  Anything at all?

 Thanks for taking the time to look over this.

 Rick

 $(document).ready(function() {

      $('#addButton').live('click', function() {

           // --- [ to get multiple carStorage checkbox values ] --- //

           alert('addButton clicked');

           jQuery.fn.getCheckboxVals = function() {

                alert('running getCheckboxVals');

                var checkboxVals = [];

                var i = 0;

                this.each(function(i) {

                checkboxVals[i] = $(this).val();

           });

           var checkboxVals = checkboxVals.join(', ');

           return checkboxVals;

           }

           values  =  {  dsn:                   'mydsn',

                         streetNumber:          $('#streetNumber').val(),

                         streetName:            $('#streetName').val(),

                         city:                  $('#city').val(),

                         state:                 $('#state').val(),

                         zipCode:               $('#zipCode').val(),

                         propertyType:          $('#propertyType,
 option:selected').val(),

                         county:                $('#county').val(),

                         subdivision:           $('#subdivision').val(),

                         totalRooms:            $('#totalRooms').val(),

                         bedrooms:              $('#bedrooms').val(),

                         fullBaths:             $('#fullBaths').val(),

                         halfBaths:             $('#halfBaths').val(),

                         rent:                  $('#rent').val(),

                         yearBuilt:             $('#yearBuilt').val(),

                         securityDeposit:      
$('#securityDeposit').val(),

                         leaseTerm:             $('#leaseTerm').val(),

                         availabilityDate:    
 $('#availabilityDate').val(),

                         petsAllowed:
 $('#petsAllowed:checked').val(),

                         petDeposit:            $('#petDeposit').val(),

                         livingRoom:
 $('#livingRoom:checked').val(),

                         diningRoom:
 $('#diningRoom:checked').val(),

                         familyRoom:
 $('#familyRoom:checked').val(),

                         fireplace:
 $('#fireplace:checked').val(),

                         appliances:            $('#appliances').val(),

                         waterIncluded:
 $('#waterIncluded:checked').val(),

                         fence:                 $('#fence:checked').val(),

                         fenceDescription:
 $('input:checkbox[name=fenceDescription]:checked').getCheckboxVals(),

                         carStorage:
 $('input:checkbox[name=carStorage]:checked').getCheckboxVals(),

                         utilities:             $('#utilities,
 option:selected').val(),

                         alarmSystem:
 $('#alarmSystem:checked').val(),

                         washerDryerIncluded:
 $('#washerDryerIncluded:checked').val(),

                         washerDryerHookups:
 $('#washerDryerHookups:checked').val(),

         

[jQuery] Re: Twitter for support?

2009-09-13 Thread Jack Killpatrick


My feeling is that without threaded discussions doing support via 
Twitter feels a but clunky. I usually end up taking the conversation 
into direct messages, which then feels like a workaround and doesn't 
really contribute to the community, since the solutions end up being in 
DM's (not searchable). Without moving them to DM's, they become noise 
for other followers.


I've been thinking about Facebook Lite (now that they're soaking up 
FriendFeed) for it.


I still prefer the google group, myself (for supporting our plugins and 
seeing a feed of solutions for other plugins I like to follow).


- Jack

Mike Alsup wrote:

Over the past few months I've been fielding an increasing number of
support requests via Twitter (for Cycle, BlockUI, and Form plugins).
In some ways it's a nice way to respond to simple questions but
obviously it's not well-suited for more in-depth questions and
responses.  I generally direct people to this Google Group for
anything non-trivial but I'm wondering what others think about
leveraging Twitter for simple QA.  Thoughts?

Mike

http://twitter.com/malsup

  





[jQuery] JQuery cycle plugin bug(?) in firefox

2009-09-13 Thread sidders

Hi All,

I've discovered some odd Firefox behaviour when using the JQuery cycle
plugin.  I'm simply trying to cycle through a few images.

When you first visit the page, firefox fails to render the images
correctly with the first overflowing it's container and the rest
appearing as squashed thumbnails.  When you refresh the page (but not
shift+refresh) it all works fine.  See http://www.thecathedraldeli.com/beta.html
for an example.

Has anyone come across this before?  Any help would be much
appreciated.

Sidders

Cycle PLugin v2.72
JQuery v1.3.2
FF v3.5.3


[jQuery] Grid as Subgrid: '+' symbols not showing up

2009-09-13 Thread uncertainGenius

Hello...
I have a nice little grid going, and I'd like to add in a 'grid as
subgrid' to view details of each record.
I have a function which looks something like this (see below) - now
the column where the plus symbol should show up is there, but with
nothing in it - and clicking on the empty column does nothing.
Inspecting the element with Firebug shows 'td style= role=grid/'
So...any idea what I'm doing wrong here?

Using version 3.5.2, with a custom style.

function show_grid(fid,start,end){
// Clear the grid of any information
jQuery(#events).GridUnload();

// Create a new jqgrid with new column names and modals.
var mygrid = jQuery(#events).jqGrid({
url:'genie.pl?
REPORT=flume_lossesPAGE=HTTPResponse_events.htmpoperation=get_grouped_eventsfid='
+ fid + 'start=' + start + 'end=' + end,
datatype: 'json',
mtype: 'GET',
height: 180,
autowidth: false,
colNames: column_names,
colModel: column_modal,
pager: jQuery('#pager'),
rowNum:2,
rowList:[2,30,50,100],
sortname: 'event_count',
gridview: true,
viewsortcols: true,
sortorder: desc,
viewrecords: true,
imgpath: '/common/css/jquery-ui-mes-theme/images/',
caption: 'Events detail',
multiselect: false,
subGrid:true,
subGridRowExpanded: function(subgrid_id, row_id) {},
subGridRowColapsed: function(subgrid_id, row_id) {}
});

  return;
}


[jQuery] Re: JQuery cycle plugin bug(?) in firefox

2009-09-13 Thread Mike Alsup

 When you first visit the page, firefox fails to render the images
 correctly with the first overflowing it's container and the rest
 appearing as squashed thumbnails.  When you refresh the page (but not
 shift+refresh) it all works fine.  
 Seehttp://www.thecathedraldeli.com/beta.html
 for an example.

Your best bet is always to include width/height attributes on the
images.


[jQuery] Re: Autocomplete -- Autofill Comma Seperator Issues

2009-09-13 Thread Mil

Wow, how did I miss that option.  Thanks Patrick.

On Sep 7, 9:18 am, Patrick Wolf patrick.wolf...@gmail.com wrote:
 Hi,

 have you tried to set the option selectFirst to false?

 Regards
 Patrick

 On Sep 3, 8:15 am,Milformboardem...@wdoenterprises.com wrote:



  Does anyone have any ideas for this issue?

  On Sep 1, 4:49 am,Milformboardem...@wdoenterprises.com wrote:

   Hi,

   I am trying to use 
   thisautocompletehttp://docs.jquery.com/Plugins/Autocomplete
   but I'm having some issues with it.  I'm trying to create a simple tag
  autocompletefeature.

   This is what I want to type (Example 1)
   TextArea: Cake, Ca, Caldren, Calimari,

   This is what I get (Example 2)
   TextArea: Cake, Cake, Caldren, Calimari,

   In Javascript, my var data = [Cake, Caldren, Calimari];

   As you can see, I cannot type Ca because the information will
  autofillto Cake every time I type acomma.  The only way I can
   avoid this is to do something very un-user friendly.  That is to type
   Ca then press space and then type mycomma.  That's the only way I
   can do it to make Example 1 work.

   This is my code:
   jQuery(#TagBox).autocomplete(data, {
                   multiple: true,
                   highlight: false,
                   multipleSeparator: , 
               });

   What am I doing wrong?


[jQuery] shadowbox / ajax IE8.0.6 issue

2009-09-13 Thread Duncan
Hi All,

We have an issue in our site that only occurs in IE 8.0.6, 8.0.7 / FF /
Chrome / Safari are all fine.

To replicate visit
http://www.sportsmembership.com.au/narrenorthcc/players-participants/adult-players-fees-280-00/and
click add to cart on one of the 1/2/3 month badges.

We take some attributes, hit an ajax call to add the item to the cart, and
update the cart badge in the black bar. For some reason IE 8.0.6 just doesnt
like it and we cant put our finger on it.

Feedback from a user: 'When making the selection the window kept freezing
and would not allow us to go any further. We had to control, alt, delete to
get out of the screen.'

Any help greatly appreciated.

-- 
Duncan I Loxton
duncan.lox...@gmail.com


[jQuery] Re: Autocomplete -- Autofill Comma Seperator Issues

2009-09-13 Thread alexbodn . groups

try to remove the highlight flag, so you'll have a better idea on what's going 
on.

On Mon, Sep 14, 2009 at 03:13, Mil formboardem...@wdoenterprises.com wrote:


Wow, how did I miss that option.  Thanks Patrick.

On Sep 7, 9:18 am, Patrick Wolf patrick.wolf...@gmail.com wrote:

Hi,

have you tried to set the option selectFirst to false?

Regards
Patrick

On Sep 3, 8:15 am,Milformboardem...@wdoenterprises.com wrote:



 Does anyone have any ideas for this issue?

 On Sep 1, 4:49 am,Milformboardem...@wdoenterprises.com wrote:

  Hi,

  I am trying to use 
thisautocompletehttp://docs.jquery.com/Plugins/Autocomplete
  but I'm having some issues with it.  I'm trying to create a simple tag
 autocompletefeature.

  This is what I want to type (Example 1)
  TextArea: Cake, Ca, Caldren, Calimari,

  This is what I get (Example 2)
  TextArea: Cake, Cake, Caldren, Calimari,

  In Javascript, my var data = [Cake, Caldren, Calimari];

  As you can see, I cannot type Ca because the information will
 autofillto Cake every time I type acomma.  The only way I can
  avoid this is to do something very un-user friendly.  That is to type
  Ca then press space and then type mycomma.  That's the only way I
  can do it to make Example 1 work.

  This is my code:
  jQuery(#TagBox).autocomplete(data, {
                  multiple: true,
                  highlight: false,
                  multipleSeparator: , 
              });

  What am I doing wrong?




--
alex



smime.p7s
Description: S/MIME Cryptographic Signature


[jQuery] Re: missing background-image

2009-09-13 Thread Macsig

You are the man!!!
it works just fine

Thanks and have a good 1

On Sep 13, 9:24 am, Andi23 dowhatyouw...@gmail.com wrote:
 I think that $(this) may not work in that context.

 See if this works:
 $('.panel').each(function(){
     $(this).css(/*set CSS here*/);



 });


[jQuery] Re: event coordination problem

2009-09-13 Thread Mr Speaker

I pasted your code into a new HTML doc and it ran as expected: if you
put the focus in the textbox (#id1) then click the button (#id2) both
events get fired (blur event fires first, click event fires second).

Is there anything else in your page? Are you getting any JS errors?

On Sep 13, 4:27 am, jhm jmay...@gmail.com wrote:
 Not sure how this helps, and in fact I'm pretty much already doing
 that. The problem is that if the focus is in the field, when the
 button is clicked I get the blur event only and not the click event on
 the button.

 If you try the code in the OP, you'll see this happening. Remember to
 click into the text box before clicking on the button.

 I need the click event for sure. I could live without the blur event
 in this situation, but I'd also like to understand the dynamics of
 what is happening for the future.

 Jim

 On Sep 12, 10:39 am, Rick Faircloth r...@whitestonemedia.com
 wrote:

  How about setting the field to invalid to start with and
  force the user to blur the field for a validation routine
  to declare it valid.

  Rick

  -Original Message-
  From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On

  Behalf Of jhm
  Sent: Saturday, September 12, 2009 1:04 PM
  To: jQuery (English)
  Subject: [jQuery] event coordination problem

  Hi-

  In a form, I'm trying to validate a field when they move off it. But
  this causes a problem when the field has the focus and they click a
  button to process the form. In this case, only the field's blur event
  (or change event) gets fired and nothing for the button click event.

  Seems like a reasonable thing to want to do, so I figure I'm missing
  something in they way I've coded this. Any suggestions?

   Here's the very simple code that exhibits the behavior:

  head
      script type=text/javascript src=./js/jquery.js/script
      script type=text/javascript

          $(document).ready( function() {
                  $('#id1').blur( function() {
                          alert('blur in id1');
                  });

                  $('#id2').click( function() {
                          alert('click in id2');
                  });
          });
          /script
  /head

  body
  /body
          input type=text value=Sample Text name=id1 id=id1 /
          input type=button name=Finish value=Finish id=id2 /
  /html




[jQuery] Re: Selects populating other selects from JSON data

2009-09-13 Thread Steffan A. Cline

on 9/12/09 8:02 AM, Alex Weber at alexwebe...@gmail.com wrote:

 
 Hey, two suggestions:
 
 First off, if you're using JSON data to populate it then I assume the
 data will come from an external source and you are only generating it
 in your script for testing purposes.
Actually, I wrote this for a friend that insists the data set is small and
wants to just embed it in the page.

 In that case, perfect.  If not,
 and the data is actually hard-coded, then you shouldn't really be
 doing it like this!
I would agree but I have no choice here.
 
 Finally, what I would do and its really just matter of preference,
 instead of doing this:
 
 $(select[name='model']).empty();
 $.each(model, function (){
 $(select[name='model']).append('option value=' + this + '' +
 this +
 '/option') });
 }
Agreed I missed this.
 I would do the following:
 
 var options = '';
 $.each(model, function (){
 html += 'option value=' + this + '' + this + '/option');
 });
 $(select[name='model']).html(options);
 
 It should increase the performance because you cache all the data in a
 variable and insert it into the select in one step, instead of
 appending it during each iteration.
 Using html() will overwrite the previous contents too, so no need to
 use empty() either.
 

Well this is what I currently have. I think I am doing too many .each()
though. Isn't there a get or find that I can do to eliminate iterating
thru all sets to find the selected manufacturer then add the models?

Here is what I currently have.

$(document).ready(function () {
var items = {Aquatech : [Canon 5D Mark II,Nikon D3,Nikon
D3x,Canon 1D,Canon 1Ds,Canon 1Ds Mark II,Canon 1Ds Mark III,Canon
1D Mark III,Canon 30D,Canon EOS 5D,Canon 20D,Nikon D200,Nikon
D700,Canon 40D,Canon 50D,Nikon D300],
Canon : [Canon HF20,Canon SD800,Canon
A570,Canon G10,Canon G11],
Ikelite : [Olympus FE-360,Canon 20D,Canon
Rebel 350 / XT,Nikon D300,Canon Rebel 400 / XTi,Canon 30D,Canon
5D,Nikon D200,Nikon D40,Nikon D40x,Nikon D60,Olympus
SP-510,Olympus E-500,Canon G9,Nikon P5000,Nikon P5100,Nikon
D80,Nikon D90,Nikon P6000,Nikon D700,Canon 40D,Canon 50D,Canon
G10,Canon 5D Mark II,Canon Rebel 500 / T1i,Canon Rebel 450 / XSi],
Sony : [Sony W300]
};

$.each( items, function(brand){
$(select[name='manufacturer']).append('option value=' +
brand + '' + brand + '/option');
});
$(select[name='model']).attr('disabled','disabled');
$(select[name='manufacturer']).change( function(){
var man = this.value;
if( !this.selectedIndex )
$(select[name='model']).empty().attr('disabled','disabled');
$.each( items, function(brand, model){if(brand==man) {
var options=
'option value=Select a brand/option';
$.each(model,
function (){ options += 'option value=' + this + '' + this +
'/option'});
   
$(select[name='model']).removeAttr('disabled').html(options);
}
});
});
});


Any suggestions to simplify this would be appreciated.


 Cheers,
 
 Alex
 
 On Sep 12, 12:48 am, Steffan A. Cline stef...@hldns.com wrote:
 on 9/11/09 8:02 PM, Steffan Cline at stef...@hldns.com wrote:
 
 
 
 
 
 on 9/11/09 5:15 PM, Steffan Cline at stef...@hldns.com wrote:
 
 Perhaps I am not Googling correctly to find the data I am after.
 
 I want to have a select that upon making a choice will add elements to a
 second select. I've seen code to do this using ajax calls but what if I
 embed the data into the page in a JSON format? I am looking for a good
 example of this. Anyone seen one?
 
 Ok, getting closer:
 
 $(document).ready(function () {
     var items = {    Aquatech     : [Canon 5D Mark II,Nikon D3,Nikon
 D3x,Canon 1D,Canon 1Ds,Canon 1Ds Mark II,Canon 1Ds Mark III,Canon
 1D Mark III,Canon 30D,Canon EOS 5D,Canon 20D,Nikon D200,Nikon
 D700,Canon 40D,Canon 50D,Nikon D300],
                     Canon     : [Canon HF20,Canon SD800,Canon
 A570,Canon G10,Canon G11],
                     Ikelite     : [Olympus FE-360,Canon 20D,Canon
 Rebel 350 / XT,Nikon D300,Canon Rebel 400 / XTi,Canon 30D,Canon
 5D,Nikon D200,Nikon D40,Nikon D40x,Nikon D60,Olympus
 SP-510,Olympus E-500,Canon G9,Nikon P5000,Nikon P5100,Nikon
 D80,Nikon D90,Nikon P6000,Nikon D700,Canon 40D,Canon 50D,Canon
 G10,Canon 5D Mark II,Canon Rebel 500 / T1i,Canon Rebel 450 / XSi],
                     Sony         : [Sony W300]
                 };
 
     $.each( items, function(brand){
             $(select[name='manufacturer']).append('option value=' +
 brand + '' + brand + '/option');
             });
     $(select[name='manufacturer']).change( function(){
         $
 
         });
 });
 
 So, that is 

[jQuery] Re: event coordination problem

2009-09-13 Thread Rick Faircloth

 if you put the focus in the textbox (#id1) then click the button (#id2)
both
 events get fired

Jim...

Preventing this occurrence is what I was talking about.  What I do is keep
the
submit button disabled until all required fields have been validated on
blur.
That way you can't have a field that hasn't been validated and have the
submit
button fire, too.  The user has to blur out of the field to achieve
validation
and enabling of the submit button.

Am I misunderstanding?

Rick

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Mr Speaker
Sent: Sunday, September 13, 2009 10:07 PM
To: jQuery (English)
Subject: [jQuery] Re: event coordination problem


I pasted your code into a new HTML doc and it ran as expected: if you
put the focus in the textbox (#id1) then click the button (#id2) both
events get fired (blur event fires first, click event fires second).

Is there anything else in your page? Are you getting any JS errors?

On Sep 13, 4:27 am, jhm jmay...@gmail.com wrote:
 Not sure how this helps, and in fact I'm pretty much already doing
 that. The problem is that if the focus is in the field, when the
 button is clicked I get the blur event only and not the click event on
 the button.

 If you try the code in the OP, you'll see this happening. Remember to
 click into the text box before clicking on the button.

 I need the click event for sure. I could live without the blur event
 in this situation, but I'd also like to understand the dynamics of
 what is happening for the future.

 Jim

 On Sep 12, 10:39 am, Rick Faircloth r...@whitestonemedia.com
 wrote:

  How about setting the field to invalid to start with and
  force the user to blur the field for a validation routine
  to declare it valid.

  Rick

  -Original Message-
  From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On

  Behalf Of jhm
  Sent: Saturday, September 12, 2009 1:04 PM
  To: jQuery (English)
  Subject: [jQuery] event coordination problem

  Hi-

  In a form, I'm trying to validate a field when they move off it. But
  this causes a problem when the field has the focus and they click a
  button to process the form. In this case, only the field's blur event
  (or change event) gets fired and nothing for the button click event.

  Seems like a reasonable thing to want to do, so I figure I'm missing
  something in they way I've coded this. Any suggestions?

   Here's the very simple code that exhibits the behavior:

  head
      script type=text/javascript src=./js/jquery.js/script
      script type=text/javascript

          $(document).ready( function() {
                  $('#id1').blur( function() {
                          alert('blur in id1');
                  });

                  $('#id2').click( function() {
                          alert('click in id2');
                  });
          });
          /script
  /head

  body
  /body
          input type=text value=Sample Text name=id1 id=id1 /
          input type=button name=Finish value=Finish id=id2 /
  /html






[jQuery] Jquery gradient and tabs

2009-09-13 Thread Anush Shetty

When I try using jquery gradient plugin with tabs, I see that the tabs
get disabled.

Does anybody here know the reason behind it ?

-- 
Anush


[jQuery] Help with getting variable

2009-09-13 Thread Dave Maharaj :: WidePixels.com

Hoping for some simple help here.

I have this structure in my forms 

name=data[User][username]

But depending on the form it the ['User'] section will change throught the
site. How can I pull the User as a variable?

The script has something like this:

$.post('/ajax_validate/users/', {
field: fieldName,
value: fieldValue
},

Where I want to add the variable like

$.post('/ajax_validate/'+myVarHere, {
field: fieldName,
value: fieldValue
},
 
Thanks,

Dave 



[jQuery] Get help with wildCard selector

2009-09-13 Thread Conrad Cheng
Dear all,
I have certain div with below format
div id=abc-01
/div
div id=abc-02
/div
div id=abc-03
/div

I want to get the no of div who contain abc-* and i have used the wildcard ,
but i seems not work for me...

I have tired
$('#div[id^=abc-]').size()

Can anyone give some hints to me with many thanks!


[jQuery] Re: Get help with wildCard selector

2009-09-13 Thread Steven Yang
i think what you want is
$('div[id^=abc-]').size()

$('#div[...') means id=div and something else but you dont have anything
with id = div

On Mon, Sep 14, 2009 at 11:30 AM, Conrad Cheng yfch...@gmail.com wrote:

 Dear all,
 I have certain div with below format
 div id=abc-01
 /div
 div id=abc-02
 /div
 div id=abc-03
 /div

 I want to get the no of div who contain abc-* and i have used the wildcard
 , but i seems not work for me...

 I have tired
 $('#div[id^=abc-]').size()

 Can anyone give some hints to me with many thanks!




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

2009-09-13 Thread Ricardo

How are you using it?

On Sep 13, 3:24 pm, shapper mdmo...@gmail.com wrote:
 Hello,

 I am using JQuery 1.3.2 and I get the error this.each is not a
 function when I try to use the following plugin:

 jQuery.fn.defuscate = function(settings) {
     settings = jQuery.extend({
         link: true
     }, settings);
     var regex = /\b([A-Z0-9._%-]+)\([^)]+\)((?:[A-Z0-9-]+\.)+[A-Z]
 {2,6})\b/gi;
     return this.each(function() {
         if ($(this).is('a...@href]')) {
             // If it's an a element, defuscate the href attribute
             $(this).attr('href', $(this).attr('href').replace(regex,
 '$...@$2'));
             // Make sure that the element's contents is not made into
 a link
             var is_link = true;
             //alert($(this).attr('href'));
         }
         // Defuscate the element's contents
         $(this).html($(this).html().replace(regex, (settings.link  !
 is_link ? 'a href=mailto:$...@$2;$...@$2/a' : '$...@$2')));
     });

 }

 Could someone, please, tell me what is wrong?

 Thanks,
 Migueç


[jQuery] Re: Get help with wildCard selector

2009-09-13 Thread Conrad Cheng
That's great, Thanks Steven.

On Mon, Sep 14, 2009 at 11:33 AM, Steven Yang kenshin...@gmail.com wrote:

 i think what you want is
 $('div[id^=abc-]').size()

 $('#div[...') means id=div and something else but you dont have anything
 with id = div

 On Mon, Sep 14, 2009 at 11:30 AM, Conrad Cheng yfch...@gmail.com wrote:

 Dear all,
 I have certain div with below format
 div id=abc-01
 /div
 div id=abc-02
 /div
 div id=abc-03
 /div

 I want to get the no of div who contain abc-* and i have used the wildcard
 , but i seems not work for me...

 I have tired
 $('#div[id^=abc-]').size()

 Can anyone give some hints to me with many thanks!





[jQuery] validation plugin

2009-09-13 Thread runrunforest

Hi,

I want to stop class error added to input element, how to do that
please ?