[jQuery] [autocomplete] Bug Reported with no response.

2010-01-19 Thread Andy M
I submitted a bug, as requested, to the jQuery bugtracker over a year
ago.  The bug was validated and assigned to Joern but has since sat
untouched for over a year.  The defect is at http://dev.jquery.com/ticket/3719.
I tested against the latest version and this bug is still there.
Anybody know if this is/will be addressed or do I just have to keep
patching the source every time there's an update?

Thanks.


[jQuery] Re: setting height of popup multiple times, background image still shows in IE6

2009-09-03 Thread Andy

Bump

On Sep 1, 5:27 pm, Andy andym...@gmail.com wrote:
 I have a hidden popup that I populate with content and it dynamically
 expands to the size of the content.

 I then show the popup.

 When a user clicks on another link, it populates the popup with longer
 or shorter content.

 When the content is SHORTER, it seems to show the background image
 that I'm using expanding to the height of the previous size of the
 popup.

 I've tried setting the height manually with JS, no luck.

 This only happens on IE6.

 Any suggestions would be much appreciated.

 Thanks,
 Andy


[jQuery] changing source of image, on click, first time size is wrong

2009-09-01 Thread Andy


I've got an image in a page that is hidden.

When someone clicks on a link somewhere else in the page, I swap in a
new source for:

attr(src)

Then I show() the container surrounding the image so it displays.

Then I set some other elements near it to the same width.  It's a
popup and I don't want the title and caption to be wider than the
image.

On the FIRST CLICK, the size is set incorrectly.  On the 2nd and every
future click, the size is set correctly.

I've tried replacing the attr(src) value and also replacing the
entire HTML block with new HTML, but the problem happens both times.

This happens on all browers.

Any ideas?

Thanks,
Andy


[jQuery] setting height of popup multiple times, background image still shows in IE6

2009-09-01 Thread Andy

I have a hidden popup that I populate with content and it dynamically
expands to the size of the content.

I then show the popup.

When a user clicks on another link, it populates the popup with longer
or shorter content.

When the content is SHORTER, it seems to show the background image
that I'm using expanding to the height of the previous size of the
popup.

I've tried setting the height manually with JS, no luck.

This only happens on IE6.

Any suggestions would be much appreciated.

Thanks,
Andy


[jQuery] Re: localscroll not working, help? could it be lightbox?

2009-08-24 Thread andy

Are you running WP?  If so some plugins CAN break scrollTo,
serialScroll etc depending on the syntax, etc, but in my experience
Lightbox is not one of them.

On Aug 23, 4:18 pm, Alice kikizi...@gmail.com wrote:
 problem can be seen here:http://unedible.com/alicewhite/

 it's just not scrolling. sometimes when i change the code around a
 bit, the anchor images stop working completely.
 i'm also using lightbox, could that be the issue?


[jQuery] jCarousel - Accordian clash

2009-08-12 Thread andy marshall

Hi there. Hoping this is the right place to be asking this.

I'm developing a website using an accordian and a carousel (http://
sorgalla.com/projects/jcarousel/).
The accordian has 2-4 items in it, one of which is a vertically
carouselled list of comments.

If I've set the accordian to start on an item that isn't the one with
the carousel in it, I'm finding I'm getting the following error
message:

jCarousel: No width/height set for items. This will cause an infinite
loop. Aborting...

I'm assuming this is because the carousel requires you to specify the
height and width of its list items, and whilst you can do this, the
accordian initialising with the carousel hidden has set inline heights
to 0 hence the error being thrown.

Does anyone have any suggestions on how to fix this one?
Please bear in mind, I have been using jquery for only a few weeks and
am still very new to it, and have no significant javascript
experience, so any suggestions will have to be explained in pretty
simple terms!

Thanks.


[jQuery] Re: jCarousel Appears Vertical then Horizontal

2009-07-18 Thread Andy

Hey Guys,

Getting the same issue - anyone know of any other fixes to this
problem ? Really need some help!?

Thx


[jQuery] jquery .noconflict

2009-06-24 Thread Andy

Hi Guys,

I am using .noconflict in my Jquery script on a page with another
library. The problem I am facing is that the other library is still
producing an error even WITH .noconflict being used.

I think its because the other library is being called first - as when
I put the jquery library above the other script - it seems to resolve
the problems.

Does anyone know the reason for this ?

You can try the script for yourself with jquery -
http://www.internetmarketingmonitor.org/word-press-plugins/imm-glossary-wordpress-plugin

When I use this and my jquery script -even with .noconflict - i get
errors ?

Thanks



[jQuery] Re: autocomplete

2009-06-24 Thread Andy Matthews

How about some code, or what it's doing / not doing? We can't help you
unless you help us.


andy 

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of smiling_face
Sent: Wednesday, June 24, 2009 8:22 AM
To: jQuery (English)
Subject: [jQuery] autocomplete


autocomplete border for suggestion list is not showing properly when i am
changing it's width. please help. Thanks in advance.




[jQuery] SOT: Transparent AIR apps with custom chrome (using jQuery)

2009-06-22 Thread Andy Matthews

I just released another blog post in my jQuery and AIR series.

http://andymatthews.net/read/2009/06/21/jQuery-and-AIR:-Transparent-AIR-appl
ications-with-custom-chrome 



[jQuery] Re: The Truth About Manifesting Money

2009-06-19 Thread Andy Matthews
Can someone block this user please?
 
 
andy

  _  

From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Pascale derkertis
Sent: Friday, June 19, 2009 11:53 AM
To: jquery-en@googlegroups.com; t...@googlegroups.com;
viciados_em_liv...@googlegroups.com; django-us...@googlegroups.com;
erzincan-kemaliye-egin-gr...@googlegroups.com; popdevfo...@googlegroups.com;
tvshopp...@googlegroups.com; jimmyt...@googlegroups.com;
superpo...@googlegroups.com; loversin...@googlegroups.com;
amigosyroman...@googlegroups.com; medical-passwo...@googlegroups.com;
karachi-...@googlegroups.com; watt...@googlegroups.com;
vizi...@googlegroups.com; ta...@googlegroups.com;
herseyf...@googlegroups.com; sugestaodeatividadeesco...@googlegroups.com;
filip...@googlegroups.com; atheism-vs-christian...@googlegroups.com;
tamil2frie...@googlegroups.com; sap-erp-consulta...@googlegroups.com;
jquery...@googlegroups.com; twitter-development-t...@googlegroups.com;
id-ubu...@googlegroups.com; pon...@googlegroups.com;
india-stocks-t...@googlegroups.com; sitedes...@googlegroups.com;
django-develop...@googlegroups.com; fire...@googlegroups.com;
l-...@googlegroups.com; miss...@googlegroups.com;
turkcefilm...@googlegroups.com; politicalfo...@googlegroups.com;
eksi_soz...@googlegroups.com; east-nashvi...@googlegroups.com;
iklan-pr...@googlegroups.com; okbclubdot...@googlegroups.com;
mumbai_...@googlegroups.com; tiddlyw...@googlegroups.com;
musical_l...@googlegroups.com; sorevis...@googlegroups.com;
dolcev...@googlegroups.com; trac-us...@googlegroups.com;
cantinhodaleit...@googlegroups.com; lems...@googlegroups.com;
papermod...@googlegroups.com;
internet-marketing-business-fo...@googlegroups.com;
jobs_in...@googlegroups.com; usa-florida_j...@googlegroups.com;
grupo-pa...@googlegroups.com; indonesia-bis...@googlegroups.com;
boys-in-wet-clot...@googlegroups.com; usaerpsu...@googlegroups.com;
richmond-j...@googlegroups.com; ucnokt...@googlegroups.com;
minds-...@googlegroups.com; ilov...@googlegroups.com;
anadoluekspr...@googlegroups.com; uzumgoz...@googlegroups.com;
turmadobafome...@googlegroups.com;
new-virtual-university-pakis...@googlegroups.com;
tech_recruit...@googlegroups.com; oracle_hrms_j...@googlegroups.com;
leituragra...@googlegroups.com; lost-dr...@googlegroups.com;
jesus-salva-mi-fami...@googlegroups.com; m...@googlegroups.com;
indian_t...@googlegroups.com; paylasim_guzel...@googlegroups.com;
hekimcos...@googlegroups.com; crackslati...@googlegroups.com;
internet-business-excelle...@googlegroups.com;
hindisexst...@googlegroups.com; flex_in...@googlegroups.com;
arsl...@arslist.org; vim_...@googlegroups.com; hayalme...@googlegroups.com;
cloj...@googlegroups.com; lista...@googlegroups.com;
lob...@googlegroups.com; miraflori...@googlegroups.com;
lh...@googlegroups.com; weechees-hotl...@googlegroups.com;
mat_...@googlegroups.com; mifo...@googlegroups.com;
boa-id...@googlegroups.com; it-consulting-us-recruit...@googlegroups.com;
staffinggu...@googlegroups.com; alabama-j...@googlegroups.com;
atlanta-j...@googlegroups.com; softskillsnee...@googlegroups.com;
trgbests-home-base-busin...@googlegroups.com; ie01...@googlegroups.com;
idprom...@googlegroups.com; usa-nevada_j...@googlegroups.com;
faf...@googlegroups.com; acesthet...@googlegroups.com;
muththa...@googlegroups.com; hot-bollywood-actr...@googlegroups.com;
todo-llega-en-su-justo-mome...@googlegroups.com;
property-fin...@googlegroups.com; technical-recruit...@googlegroups.com;
hiqj...@googlegroups.com; linksmani...@googlegroups.com;
iklan-bis...@googlegroups.com; usa-missouri_j...@googlegroups.com;
usa-iowa_j...@googlegroups.com; kelan...@googlegroups.com;
hotlist-mored...@googlegroups.com;
sheilaatividadesescola...@googlegroups.com; side-inc...@googlegroups.com;
komunitaswiraus...@googlegroups.com; civil_spott...@googlegroups.com;
making_money_...@googlegroups.com; sevdamc...@googlegroups.com;
anbu...@googlegroups.com; yagmurg...@googlegroups.com;
se...@googlegroups.com; opendebatefo...@googlegroups.com;
all-sexy-...@googlegroups.com; info-lowongan-ke...@googlegroups.com;
qtp_software_testing_j...@googlegroups.com;
us-hot-it-openi...@googlegroups.com; us_jobsnconsulta...@googlegroups.com;
oracle-...@googlegroups.com; psp-sn...@googlegroups.com;
usahawan-mel...@googlegroups.com; prince_h...@googlegroups.com;
ussoftwarejo...@googlegroups.com; tirtilinpost...@googlegroups.com;
recruiting-simplif...@googlegroups.com; linux-admin_j...@googlegroups.com;
rantau...@googlegroups.com; crystaldevelop...@googlegroups.com;
zapa...@googlegroups.com; therealc...@googlegroups.com;
timesj...@googlegroups.com; trabajo-teletrab...@googlegroups.com;
indian-bloggers-commun...@googlegroups.com; promobis...@googlegroups.com;
os_romanti...@googlegroups.com; lathahr_peoplesoft_j...@googlegroups.com;
sapne...@googlegroups.com; beaglebo...@googlegroups.com;
web...@googlegroups.com; flex...@googlegroups.com;
mustafamut...@googlegroups.com; asd...@googlegroups.com;
dauml...@googlegroups.com

[jQuery] Re: The Truth About Manifesting Money

2009-06-19 Thread Andy Matthews
Thanks Karl. I also reported his account. Teamwork.

  _  

From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Karl Swedberg
Sent: Friday, June 19, 2009 3:04 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: The Truth About Manifesting Money




On Jun 19, 2009, at 3:21 PM, Andy Matthews wrote:


Can someone block this user please?


blocked.


--Karl


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



[jQuery] Re: jQuery 1.3.2 in IE5.5

2009-06-18 Thread Andy Matthews

If you haven't already done so, you might increase your fee by a significant
amount for having to spin your wheels supporting IE 5.5. Whatever work needs
to be done is going to take lots of extra time because you'll have to write
everything in plain JS with little support for new functionality.

I wouldn't have taken the gig personally. Life is too short supporting
software that's been outdated for almost 8 years, and wasn't that good to
begin with.


andy 

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of James
Sent: Thursday, June 18, 2009 2:56 PM
To: jQuery (English)
Subject: [jQuery] Re: jQuery 1.3.2 in IE5.5


Are you serious?
I guess you're just going to have to give them the reality of the fact that
that's the way it is. Things aren't going to work as expected with legacy
software. Is IE5.5 the only browser you have to design for, or just one that
you also have to accommodate for?

On Jun 18, 9:45 am, Rodrigo Sebastián Alfonso rodrigo.s.alfo...@gmail.com
wrote:
 Yeah, I thought so, but it's not an option to me to work without Win 
 95 (yes, I also said WTF). Client needs!

 Thanks anyways James! :-)

 On Thu, Jun 18, 2009 at 4:33 PM, James james.gp@gmail.com wrote:

  jQuery is listed on the website as compatible with IE6+, so that's 
  probably it.

  On Jun 18, 7:32 am, Rodrigo rodrigo.s.alfo...@gmail.com wrote:
   Hi everyone!

   I've been doing some research and I've found different opinions 
   about the compatibility of jQuery with IE5.5.

   My problem is that I can't get anything to work (I'm doing my 
   testing in TredoSoft's Multiple IE).

   I don't know if this is because there software is not working as a 
   real IE5.5 would, or if it is that jQuery is not compatible with 
   IE5.5. Or, the third option, I'm screwing up somewhere xD

   I'm trying the simplest task ever, like an alert thrown on the $ 
   (document).ready, but no luck :-(

   I'm using jQuery 1.3.2 (minified).

   I will appreciate any ideas!

   Thanks!

   Rodrigo




[jQuery] Palm Pre and jQuery? Is it possible?

2009-06-16 Thread Andy Matthews

I watched a slidedeck today which talked about developing for WebOS, which
is all based around JavaScript. Does anyone know if it's possible to use
jQuery for WebOS development?


andy


[jQuery] Re: How to simulate a human-triggered event?

2009-06-16 Thread Andy Matthews

Assuming the second input field is triggered by a user instigated event,
then you could just trigger that event.

$('input#change').click(function() {
$('input#source').attr('value', 'This is the value changed by a
button');
$('something').trigger('blur',fn);
});

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Jay
Sent: Tuesday, June 16, 2009 3:46 PM
To: jQuery (English)
Subject: [jQuery] How to simulate a human-triggered event?


Hi, I'm trying to change the value of an input field (target) which depends
on another input (source). It works well when I manually change the source
value. But if I changed the source value with another button, the target
value remains the same. Here's the code...

$(document).ready(function() {
$('input#change').click(function() {
$('input#source').attr('value', 'This is the value changed
by a button');
});

$('input#source').change(function() {
$('input#target').attr('value',
$('input#source').attr('value'));
});
});

pSource: input type=text name=target id=source size=60
value= / input type=button id=change value=change source value
//p
pTarget: input type=text name=target id=target size=60
value=This is the original value, type something in source to change
//p

So how could the target input detect if there's a change within the source
input without manually changing it's value? Thanks




[jQuery] AIR plugin for jQuery?

2009-06-12 Thread Andy Matthews
Does anyone know of a plugin for jQuery that encapsulates some, or all, of
the AIR API?


andy


[jQuery] AIR plugin for jQuery?

2009-06-12 Thread Andy Matthews

Does anyone know of a plugin for jQuery that encapsulates some, or
all, of the AIR API?


andy


[jQuery] Re: AIR plugin for jQuery?

2009-06-12 Thread Andy Matthews

Thanks Jack...that's not quite what I meant.

For example, even though the AIR method for minimizing a window to the
system tray is short:
nativeWindow.minimize();

It would be cool if this functionality was packaged up so that you
could apply the minimize method directly to an object. Here's what I
do now:

// this assigns the minimize functionality to the minimize button
$('#minimize').bind('click', function(event) {
iface.minimize();
});

and here's how it could look:
// this assigns the minimize functionality to the minimize button
$('#minimize').air.minimize();

Obviously that's not a great example, but the code for adding a menu
to an icon running in the task bar is much lengthier. You can see how
this might benefit from an abstraction layer:

setupIconTray: function() {

// shortcut to the nativeApplication object
var app = air.NativeApplication.nativeApplication;
app.addEventListener(air.Event.COMPLETE, iconLoadComplete);

// create new instance of icon loader
var iconLoader = new air.Loader();

//  these lines let me add a menu to the system tray.
//  we're not going to use this for now, but I want to keep it 
around
//  icontray.menu = new air.NativeMenu();
//  var exitCommand = icontray.menu.addItem(new air.NativeMenuItem
(Exit Bullhorn));
//  exitCommand.addEventListener(air.Event.SELECT, winmgr.close);

if(air.NativeApplication.supportsSystemTrayIcon){

iconLoader.contentLoaderInfo.addEventListener(air.Event.COMPLETE,
iconLoadComplete);
iconLoader.load(new air.URLRequest(images/AIRApp_16.png));
app.icon.addEventListener
(window.runtime.flash.events.MouseEvent.CLICK, this.restore);
app.icon.tooltip = Shrinkadoo;
// app.icon.menu = icontray.menu;
}

//  if(air.NativeApplication.supportsMenu) {
//  app.menu.addSubmenu(icontray.menu, Windows);

function iconLoadComplete(event) {
app.icon.bitmaps = new runtime.Array
(event.target.content.bitmapData);
}

}


Anyway...I might start writing one, but would love to get input from
others who would be interested in helping out.




On Jun 12, 11:52 am, Jack Killpatrick j...@ihwy.com wrote:
 This may be of interest, though it's not jQuery encapsulation, it does
 provide an abstraction layer:

 http://www.activerecordjs.org/index.html

 I've been using the ActiveRecord js implementation in AIR for a while
 now and it's proven to be solid so far:

 http://www.activerecordjs.org/record.html

 - Jack



 Andy Matthews wrote:
  Does anyone know of a plugin for jQuery that encapsulates some, or
  all, of the AIR API?

  andy


[jQuery] Re: AIR plugin for jQuery?

2009-06-12 Thread Andy Matthews
Jack...
 
I just blogged about this idea:
http://andymatthews.net/read/2009/06/12/jQuery-and-AIR:-AIR-methods-abstract
ed-into-jQuery-plugin
 
I think that this is a great idea and I'd love to get involved in it, but
I'd want others to be included as well. My jQuery foo is fairly strong, but
I've never written a plugin, and would really want someone to provide a good
code review for best practices. The cool thing is that there wouldn't be
much jQuery in the plugin. It's mostly an abstraction of the AIR APIs into
a tighter, simpler package.
 
I think the best place to start would be some of the lower hanging fruit.
Some of the API methods that are straightforward and don't require a lot of
options. Then we could move into SQLite, File System access, etc.
 
Thoughts?

  _  

From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Jack Killpatrick
Sent: Friday, June 12, 2009 1:07 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: AIR plugin for jQuery?


OK, yeah, that's what I figured you were looking for. I haven't seen
anything like that, but it would be cool if it existed. Doesn't seem like it
would be a ton of work (famous last words). Have you got any thoughts
about how it might work across the sandbox bridges? I use the bridges and
build the non-app sandbox stuff very much like a regular web app and create
and expose certain functions via the bridges to/from the app and non-app
sandbox, since all the direct air API access can only happen in the app
sandbox.

I haven't really thought it out, but wondering if maybe you have. Maybe
you're looking maybe for something that would just be used in the app
sandbox and it'd be up to the end user to create the bridge stuff that they
need?

- Jack


Andy Matthews wrote: 

Thanks Jack...that's not quite what I meant.



For example, even though the AIR method for minimizing a window to the

system tray is short:

nativeWindow.minimize();



It would be cool if this functionality was packaged up so that you

could apply the minimize method directly to an object. Here's what I

do now:



// this assigns the minimize functionality to the minimize button

$('#minimize').bind('click', function(event) {

iface.minimize();

});



and here's how it could look:

// this assigns the minimize functionality to the minimize button

$('#minimize').air.minimize();



Obviously that's not a great example, but the code for adding a menu

to an icon running in the task bar is much lengthier. You can see how

this might benefit from an abstraction layer:



setupIconTray: function() {



// shortcut to the nativeApplication object

var app = air.NativeApplication.nativeApplication;

app.addEventListener(air.Event.COMPLETE, iconLoadComplete);



// create new instance of icon loader

var iconLoader = new air.Loader();



//  these lines let me add a menu to the system tray.

//  we're not going to use this for now, but I want to keep it
around

//  icontray.menu = new air.NativeMenu();

//  var exitCommand = icontray.menu.addItem(new
air.NativeMenuItem

(Exit Bullhorn));

//  exitCommand.addEventListener(air.Event.SELECT,
winmgr.close);



if(air.NativeApplication.supportsSystemTrayIcon){


iconLoader.contentLoaderInfo.addEventListener(air.Event.COMPLETE,

iconLoadComplete);

iconLoader.load(new air.URLRequest(images/AIRApp_16.png));

app.icon.addEventListener

(window.runtime.flash.events.MouseEvent.CLICK, this.restore);

app.icon.tooltip = Shrinkadoo;

// app.icon.menu = icontray.menu;

}



//  if(air.NativeApplication.supportsMenu) {

//  app.menu.addSubmenu(icontray.menu, Windows);



function iconLoadComplete(event) {

app.icon.bitmaps = new runtime.Array

(event.target.content.bitmapData);

}



}





Anyway...I might start writing one, but would love to get input from

others who would be interested in helping out.









On Jun 12, 11:52 am, Jack Killpatrick  mailto:j...@ihwy.com
j...@ihwy.com wrote:

  

This may be of interest, though it's not jQuery encapsulation, it does

provide an abstraction layer:



http://www.activerecordjs.org/index.html



I've been using the ActiveRecord js implementation in AIR for a while

now and it's proven to be solid so far:



http://www.activerecordjs.org/record.html



- Jack







Andy Matthews wrote:



Does anyone know of a plugin for jQuery that encapsulates some, or

all, of the AIR API?

  

andy

  



  




[jQuery] Re: AIR plugin for jQuery?

2009-06-12 Thread Andy Matthews
I suppose you're right...
 
The AIR API is actually pretty well done. It needs better documentation, but
Adobe's done a great job setting it all up. I suppose I'm talking about a
framework then. I already have a series of files for my AIR apps which I
treat as classes. Interface.js deals with interface elements, sqlite.js
deals with SQLite implementation, etc. But those files are specific to my
app.
 
 
andy

  _  

From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Jack Killpatrick
Sent: Friday, June 12, 2009 1:49 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: AIR plugin for jQuery?


From your examples, it looks like you're thinking more about helper methods
than just exposing the API, which makes sense, but then the question is
what helper methods should we create to make this a good framework? (I
think). If that's the case, have you thought about it much? Helper method
meaning something that wraps a chunk of air native code up to support some
reusable functionality beyond the lower level air stuff.

- Jack

Andy Matthews wrote: 

Jack...
 
I just blogged about this idea:
http://andymatthews.net/read/2009/06/12/jQuery-and-AIR:-AIR-methods-abstract
ed-into-jQuery-plugin
 
I think that this is a great idea and I'd love to get involved in it, but
I'd want others to be included as well. My jQuery foo is fairly strong, but
I've never written a plugin, and would really want someone to provide a good
code review for best practices. The cool thing is that there wouldn't be
much jQuery in the plugin. It's mostly an abstraction of the AIR APIs into
a tighter, simpler package.
 
I think the best place to start would be some of the lower hanging fruit.
Some of the API methods that are straightforward and don't require a lot of
options. Then we could move into SQLite, File System access, etc.
 
Thoughts?

  _  

From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Jack Killpatrick
Sent: Friday, June 12, 2009 1:07 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: AIR plugin for jQuery?


OK, yeah, that's what I figured you were looking for. I haven't seen
anything like that, but it would be cool if it existed. Doesn't seem like it
would be a ton of work (famous last words). Have you got any thoughts
about how it might work across the sandbox bridges? I use the bridges and
build the non-app sandbox stuff very much like a regular web app and create
and expose certain functions via the bridges to/from the app and non-app
sandbox, since all the direct air API access can only happen in the app
sandbox.

I haven't really thought it out, but wondering if maybe you have. Maybe
you're looking maybe for something that would just be used in the app
sandbox and it'd be up to the end user to create the bridge stuff that they
need?

- Jack


Andy Matthews wrote: 

Thanks Jack...that's not quite what I meant.



For example, even though the AIR method for minimizing a window to the

system tray is short:

nativeWindow.minimize();



It would be cool if this functionality was packaged up so that you

could apply the minimize method directly to an object. Here's what I

do now:



// this assigns the minimize functionality to the minimize button

$('#minimize').bind('click', function(event) {

iface.minimize();

});



and here's how it could look:

// this assigns the minimize functionality to the minimize button

$('#minimize').air.minimize();



Obviously that's not a great example, but the code for adding a menu

to an icon running in the task bar is much lengthier. You can see how

this might benefit from an abstraction layer:



setupIconTray: function() {



// shortcut to the nativeApplication object

var app = air.NativeApplication.nativeApplication;

app.addEventListener(air.Event.COMPLETE, iconLoadComplete);



// create new instance of icon loader

var iconLoader = new air.Loader();



//  these lines let me add a menu to the system tray.

//  we're not going to use this for now, but I want to keep it
around

//  icontray.menu = new air.NativeMenu();

//  var exitCommand = icontray.menu.addItem(new
air.NativeMenuItem

(Exit Bullhorn));

//  exitCommand.addEventListener(air.Event.SELECT,
winmgr.close);



if(air.NativeApplication.supportsSystemTrayIcon){


iconLoader.contentLoaderInfo.addEventListener(air.Event.COMPLETE,

iconLoadComplete);

iconLoader.load(new air.URLRequest(images/AIRApp_16.png));

app.icon.addEventListener

(window.runtime.flash.events.MouseEvent.CLICK, this.restore);

app.icon.tooltip = Shrinkadoo;

// app.icon.menu = icontray.menu;

}



//  if(air.NativeApplication.supportsMenu) {

//  app.menu.addSubmenu(icontray.menu, Windows);



function iconLoadComplete(event

[jQuery] Re: Question on filter()

2009-06-11 Thread Andy Matthews

Parent is the DOM node which contains the targeted element.

So in your example td would be the parent of input. Label would be a sibling
of input, or you could use the prev('label') method if you wanted to target
the label element. 

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of TimW66
Sent: Thursday, June 11, 2009 12:11 PM
To: jQuery (English)
Subject: [jQuery] Question on filter()


Hi all, I have the following JS code:

$('table.tableView :inp...@readonly]').parent().filter(function() {
return !$('label', this).length;
}).addClass('readonly');

--

And the following HTML code:

table class=tableView
thead
tr
thtest/th
/tr
/thead
tbody
tr
td
label for=fooFoo/label
input id=foo type=text
value=foo readonly=readonly/
/td
/tr
tr
td
input id=bar type=text
value=bar readonly=readonly/
/td
/tr
tr
td
label for=zedFoo
input id=zed type=text
value=zed readonly=readonly/
/label
/td
/tr
/tbody
/table
--

What I expected is the first and third input box to not get the readonly
class.  However, the third input box does get the readonly class.  Isn't
label a parent of input?

I should also mention I'm using jQuery v1.2.6.




[jQuery] Re: Get all unique class names

2009-06-11 Thread Andy Matthews

This should get you started:

var $allID = $('*[id!=]'); 

It returns a jQuery object containing all elements that have an id attribute
that is not empty. Tested with the following HTML:

div id=something
h1 id=elsesomething else/h1
pthis is some text right here/p
/div
img id=another /

It returns an array:

[div#something, h1#else, img#another]


andy

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of David
Sent: Thursday, June 11, 2009 9:02 AM
To: jQuery (English)
Subject: [jQuery] Get all unique class names


I'm interested in getting an array of unique class names of all option tags
under a specific select element.

I'm imagining something like this (which does not do what I want): $ (
'#select_id option.class' );

What's the correct way to do this using jQuery?

Thanks!




[jQuery] Re: Get all unique class names

2009-06-11 Thread Andy Matthews

And as a side note, IDs should already be unique on a page. If they're not,
then you're going to encounter unexpected issues in your code. 


Andy matthews

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Andy Matthews
Sent: Thursday, June 11, 2009 2:19 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Get all unique class names


This should get you started:

var $allID = $('*[id!=]'); 

It returns a jQuery object containing all elements that have an id attribute
that is not empty. Tested with the following HTML:

div id=something
h1 id=elsesomething else/h1
pthis is some text right here/p
/div
img id=another /

It returns an array:

[div#something, h1#else, img#another]


andy

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of David
Sent: Thursday, June 11, 2009 9:02 AM
To: jQuery (English)
Subject: [jQuery] Get all unique class names


I'm interested in getting an array of unique class names of all option tags
under a specific select element.

I'm imagining something like this (which does not do what I want): $ (
'#select_id option.class' );

What's the correct way to do this using jQuery?

Thanks!





[jQuery] Re: SOT: jQuery UI and AIR - write content to the file system

2009-06-08 Thread Andy Matthews
Thanks Marco! I had fun writing it...wore me out!

  _  

From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Web Specialist
Sent: Monday, June 08, 2009 9:24 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: SOT: jQuery UI and AIR - write content to the file
system


Awesome. Good job Andy.

[]s
Marco Antonio


On Mon, Jun 8, 2009 at 10:47 AM, Andy Matthews amatth...@dealerskins.com
wrote:



Just released a new blog post whereby I use jQuery draggable/droppable to
write content to the user's file system. I'd love for some of you to check
it out.

http://andymatthews.net/read/2009/06/07/jQuery-and-AIR:-Writing-content-to-t
http://andymatthews.net/read/2009/06/07/jQuery-and-AIR:-Writing-content-to-
t%0Ahe-file-system-via-drag-and-drop 
he-file-system-via-drag-and-drop

Andy Matthews
Senior Web Developer

www.dealerskins.com

P Please consider the environment before printing this e-mail.

Total customer satisfaction is my number 1 priority! If you are not
completely satisfied with
the service I have provided, please let me know right away so I can correct
the problem,
or notify my manager Aaron West at aw...@dealerskins.com.






[jQuery] Re: can someone translate this syntax ?

2009-06-04 Thread Andy Matthews

That's called ternary syntax:

(expression) ? True : false;

If the expression evaluates to true, then the true portion is run, else the
false portion is run. A real world example:

Var total = (myValue == 15) ? 15 * 3 : myValue / 2;

Not helpful, but that's how it's used.

As for the other portion, Javascript allows you to set multiples values at
once. Because the author is performing an assignment (animCss = blah), it
doesn't return anything so the value of running is set to false. 


andy


-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of runrunforest
Sent: Thursday, June 04, 2009 8:38 AM
To: jQuery (English)
Subject: [jQuery] can someone translate this syntax ?


(function($) {
$.fn.jCarouselLite = function(o) {
o = $.extend({
btnPrev: null,
btnNext: null,
btnGo: null,
mouseWheel: false,
auto: null,

speed: 200,
easing: null,

vertical: false,
circular: true,
visible: 3,
start: 0,
scroll: 1,

beforeStart: null,
afterEnd: null
}, o || {});

return this.each(function() {

var running = false, animCss=o.vertical?top:left,
sizeCss=o.vertical?height:width;
var div = $(this), ul = $(ul, div), tLi = $(li, ul), tl =
tLi.size(), v = o.visible;

});
};

})(jQuery);




I don't understand this part

 var running = false, animCss=o.vertical?top:left,
sizeCss=o.vertical?height:width;
 var div = $(this), ul = $(ul, div), tLi = $(li, ul), tl = tLi.size (),
v = o.visible;

Can you fully translate it for me please.




[jQuery] Re: can someone translate this syntax ?

2009-06-04 Thread Andy Matthews

That syntax looks for any ul tag in the context of the div variable (which
would have to be a jQuery variable. That might look like this:

var div = $('#myDiv');
var ulInDiv = $(ul, div);

 

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of runrunforest
Sent: Thursday, June 04, 2009 10:54 AM
To: jQuery (English)
Subject: [jQuery] Re: can someone translate this syntax ?


thanks man

how about $(ul, div)




[jQuery] Re: Inner HTML on a .bind()

2009-06-04 Thread Andy

Actually I finally got it to work using, the part I was missing was I
had to pass in 'this' witht he search otherwise - I'm guessing here -
it was using the document instead of just the section I wanted it to
search.  This gives me the feature that FaceBook has of making the
imbed videos bigger when clicked on. YAY

Gustavo, I couldn't get the CSS working since the width and height
were part of the tag and not the style= section

$(document).ready(function(){

$(object.YTV).unbind( 'click' );
$(object.YTV).bind('click', function(e){

$(this).attr(height, 312);
$(this).attr(width, 384);

$(embed, this).attr(height, 312);
$(embed, this).attr(width, 384);

$(this).unbind( 'click' );

});

});


[jQuery] Re: can someone translate this syntax ?

2009-06-04 Thread Andy Matthews

The || is or. Whichever is true first is the result.

So this || that would equal this.

But null || that would equal that.


-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of runrunforest
Sent: Thursday, June 04, 2009 11:47 AM
To: jQuery (English)
Subject: [jQuery] Re: can someone translate this syntax ?


ah one more thing

in  o = $.extend({ afterEnd: null }, o || {});

the  o || {}  means ?




[jQuery] Re: Looking for a plugin similiar to this scriptaculous effect...

2009-06-03 Thread Andy Matthews

There's not one that does all of it together, but you could quite easily
write it yourself.

Use the show/hide methods in conjunction with toggle to achieve the effect
in the left nav.

Use the Coda Slider effect to work up the bit on the right:

http://jqueryfordesigners.com/demo/coda-slider.html


Andy matthews 

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of williampdx
Sent: Wednesday, June 03, 2009 10:32 AM
To: jQuery (English)
Subject: [jQuery] Looking for a plugin similiar to this scriptaculous
effect...


Hello everyone.

I am searching for a plugin that could potentially perform a moving
navigation effect similar to that as seen in this site:
http://www.airportbags.com/
This site in particular uses scriptaculous, and I would prefer to use
jquery.  I would love to be able to navigate both horizontally and
vertically and be able to control the speed and easing.
Does anyone have a suggestion?

Thanks.

williampdx




[jQuery] Re: Create Ajax Request and edit html request

2009-06-02 Thread Andy Matthews

If you're loading in a chunk of HTML, then you can treat that chunk as a
jQuery object. For example, if you have the following HTML code that is
being pulled back from an AJAX call, and you only want to use the div tag
you might do something like this.

REMOTE HTML:

p
This is a paragraph of text that we do NOT want to display in the
site
/p
div
img src=jquery.jpg /
spanthis is my title/span
/div


AJAX CALL:
--
$.get('somehtmlpage.html',
// callback function on successful load
function(data){
var $myDiv = $('div',data);
}
);

When your AJAX call returns successfully, you look for a div tag in the
context of the returned piece of HTML. Note that this is untested, but it
should work just fine.


Andy matthews



-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Kevz
Sent: Tuesday, June 02, 2009 12:51 PM
To: jQuery (English)
Subject: [jQuery] Create Ajax Request  and edit html request


[b]Hay guys![/b],

I worked with now in jQuery. Property however at present the following
problem:

[i]I provide a AJAX Request. the side is loaded, the parameters all conveyed
and back receives I a complete HTML side. Now I would like to have only
certain elements however from this side, like DIV, SPAN etc.

How can I make with the AJAX Request return in such a way best, which I can
select these elements thereby? Simply it would be unfortunately not
functioned over the function $ (element), it. even if I indicate the HTML
Request as secondly parameter.[/i]


Excused, for my bad English. ;-)

Translatertool. There is unfortunately too many words, in order to describe
my problem. ^^




[jQuery] Re: does selectors $ cache?

2009-05-27 Thread Andy Matthews

No, it does not cache. Each time you make a page query, a new call is made.
For better performance, always cache commonly used selectors:

$myID = $('#myID'); // $ used for initial var to indicate a jQuery object
var text = $myID.text();
var color = $myID.css('color');

Also, you should always use the raw ID reference where possible as it's far
more performant than tacking on a tag name first:

$myID = $('#myID'); // this performs better than the line below
$myID = $('div#myID'); // avoid this where possible, performance will
degrade



andy


-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of jonathan
Sent: Wednesday, May 27, 2009 12:44 AM
To: jQuery (English)
Subject: [jQuery] does selectors $ cache?


does selectors cache? for example, if I do $('#myid') twice, does it search
through the document twice for myid?




[jQuery] Re: Event behaving

2009-05-27 Thread Andy Matthews

Most likely because the button element doesn't recognize the keypress event.
Not every element have the same events.

Swap out button for input and try it again, it should work just fine. 

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of elischer.flor...@googlemail.com
Sent: Wednesday, May 27, 2009 2:29 AM
To: jQuery (English)
Subject: [jQuery] Event behaving


Hi,

I have a question why is this not working:

$(button).keypress(function(e) {
  e.preventDefault();
  alert(hello);
});

but this here:

$(button).click(function(e) {
  e.preventDefault();
  alert(hello);
});

For my understanding when I hit enter in a form keypress should work?!

thx
TC




[jQuery] Re: find reverse

2009-05-27 Thread Andy Matthews
One thing to remember Peter is that jQuery returns an array. You could do a
more comprehensive search, then reverse the returned value. Something like
this might work:
 
var $myDivs = $('div').reverse;
 
then search through $myDivs for your preferred value.
 
 
andy

  _  

From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Peter Marino
Sent: Wednesday, May 27, 2009 7:20 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] find reverse


Hi jQuery Group, 

is it possible find a node backwards instead of forwards.
i.e.

div id=test0
   div id=findme /
div


now I would like to do (remember find_reverse does not exist)
$(#findme).find_reverse(#test0);

is there any method to do a find_reverse???

regards,
Peter Wraae Marino

-- 
Power Tumbling - http://www.powertumbling.dk
OSG-Help - http://osghelp.com



[jQuery] selecting next()'s until I reach a tag

2009-05-27 Thread Andy

Is there a way for me to add the next several blocks until I get to a
specific tag?

So let's say the code is:

h5title/h5
pdescription text/p
pdescription text/p

h5title2/h5
pdescription text/p
pdescription text/p
pdescription text/p

h5title2/h5
pdescription text/p


Basically, I want to select all the p tags until I get to the h5.
There might be 1 p tag, there might be 10 of them, but I want to
traverse this structure to add all p tags.

Right now, I'm doing this to select 1 of the p tags:

$('h5').each(function(){
var $this = $(this);
$this
.add($this.next());
});


[jQuery] Re: selecting next()'s until I reach a tag

2009-05-27 Thread Andy

Thanks for the suggestion!

That sort of works, but it's also getting the p tags AFTER the next
H5, and I don't want it to.



On May 27, 1:24 pm, Mauricio \(Maujor\) Samy Silva
css.mau...@gmail.com wrote:
 Try:
 $('h5').nextAll('p');

 Maurício
   -Mensagem Original-
   De: Andy
   Para: jQuery (English)
   Enviada em: quarta-feira, 27 de maio de 2009 14:11
   Assunto: [jQuery] selecting next()'s until I reach a tag

   Is there a way for me to add the next several blocks until I get to a
   specific tag?


[jQuery] Re: selecting next()'s until I reach a tag

2009-05-27 Thread Andy

That looks great but I don't know how to implement it into my jQuery
library.

When I include it in the page or in my jQuery file, I get all sorts of
errors.



On May 27, 2:58 pm, Mauricio \(Maujor\) Samy Silva
css.mau...@gmail.com wrote:
 Please have a look 
 at:http://docs.jquery.com/JQuery_1.2_Roadmap#.nextUntil.28.29_.2F_.prevU...
 Maurício

   -Mensagem Original-
   De: Andy
   Para: jQuery (English)
   Enviada em: quarta-feira, 27 de maio de 2009 14:32
   Assunto: [jQuery] Re: selecting next()'s until I reach a tag
   Thanks for the suggestion!
   That sort of works, but it's also getting the p tags AFTER the next
   H5, and I don't want it to.

   On May 27, 1:24 pm, Mauricio \(Maujor\) Samy Silva  
 css.mau...@gmail.com wrote:

    Try:
    $('h5').nextAll('p');
   
    Maurício


[jQuery] Re: Rollover Effects instead of alternate images

2009-05-22 Thread Andy Matthews

I believe your CSS is invalid. I don't think you can apply both a class AND
an ID in the same selector which is what #base-state.active does. Now
#base-state:active might work as that's a pseudo class.

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of ButtersRugby
Sent: Friday, May 22, 2009 1:25 PM
To: jQuery (English)
Subject: [jQuery] Re: Rollover Effects instead of alternate images


I just did this the other day on a web page.
You need to make an image that has both the active, and regular state images
in it.

Then in your css,

#base-state {background-position: 0px 0px;}   // The first 0 is the X
axis position, the second is the Y
#base-state.active {background-position: 0px 30px;} // This is our second
class that we will switch to with our jquery

Javascript --

$(document).ready(function() {
  $(#base-state).click(function() {
  $(this).toggleClass(active);
  }
   )
});

Just a basic run through of how it works.
I don't know how much help that is..
I probably goofed something up there, but it's the gist..




[jQuery] Re: SOT: execute JS before a specific image loads

2009-05-21 Thread Andy Matthews
John...
 
The original intent was to render an img tag to the page which would load in
a subset of my desired data, specifically that which can easily be gotten
via interpretation of the user agent string and other items. That subset
would get added to the src of the image as URL key/value pairs. Then, when
jQuery was available, I'd replace the src of the image tag with additional
information, which can only be gotten via JS (resolution, bandwidth, flash
player, etc).
 
In my testing I was never able to get this working. However, after doing
some googling, I found the lazy load plugin. Doesn't that do pretty much
what I'm looking for? Namely prevent the loading of an image until it's
scrolled into the visible window space?
 
 
andy

  _  

From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of John Crout
Sent: Wednesday, May 20, 2009 6:08 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: SOT: execute JS before a specific image loads


You won't be able to intercept the image before it is loaded but you can
block it from being rendered.  Remember that JavaScript relies on the DOM.
The DOM isn't fully-defined for the page, until all of it has loaded.  But
you can hide it by setting its visibilitiy to hidden, and keep the browser
from allocating real estate for it by setting display to block. (Default
is inline).

Looking at the code you included, I don't believe there is a statistic of
interest that you cannot collect when the page you've served, is requested.
(That is, the only info the browser will have that is new, it the location
of what it renders after receiving what the server sends.)  For example, the
location of everything won't be available to JavaScript until after what it
will render, has been rendered.  

By the way, I'm not pretending I know your business.  What I meant by stat
of interest is that whatever you collect, after delivering the image, that
you cannot collect when the request for the page is made, is something that
can be assumed as consistent, from request to request, even from the same
user.

Correct me if I'm incorrect about this (please).

--John Crout



On Wed, May 20, 2009 at 9:51 AM, Andy Matthews amatth...@dealerskins.com
wrote:



Can I intercept the loading of an image BEFORE it loads?

We're looking at using an img tag for inserting stats on our server. Here's
what I'm considering...

1) Collect certain information server side, write an img to the document
like so (note the URL vars):

img id=statsImg src=stats.cfm?somevar=someval width=1 height=1 /

2) Using JS, intercept the load of this image BEFORE it takes place, and add
things to the URL vars.

This way, if JS is not present, you get the default stuff, but if JS is
present, you get extra stuff.

Anyone?

Andy Matthews
Senior Web Developer

www.dealerskins.com

P Please consider the environment before printing this e-mail.

Total customer satisfaction is my number 1 priority! If you are not
completely satisfied with
the service I have provided, please let me know right away so I can correct
the problem,
or notify my manager Aaron West at aw...@dealerskins.com.





[jQuery] Re: SOT: execute JS before a specific image loads

2009-05-21 Thread Andy Matthews
I did not see your response Michael...bummer. It might have changed our
approach. Regardless we've got the desired functionality in place already.
Thanks for your time.
 
 
andy


  _  

From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Michael Geary
Sent: Thursday, May 21, 2009 12:32 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: SOT: execute JS before a specific image loads


Hmm... This is weird... I posted a reply at 3PM yesterday and it doesn't
look like it made it onto the group. (You didn't see it, did you?) So here
goes again, with some additional notes this time...
 
The problem is really much easier than all this. There's no reason to use a
lazy load plugin, and no reason to even use jQuery.
 
Simply use a noscript tag for the non-JavaScript case, and a script tag
with document.write() for the JavaScript case:
 
noscript
img id=statsImg src=stats.cfm?somevar=someval width=1
height=1 /
/noscript
script type=text/javascript
document.write(
'img id=statsImg src=stats.cfm?somevar=someval',
/* your extra stuff here, e.g.: */ 'anothervar=anotherval',
' width=1 height=1 /'
);
/script
 
Or, you can use jQuery for the dynamic image if you like. But don't try to
modify the IMG from the noscript section - it won't exist. Instead, add
your own IMG element with jQuery instead of document.write.
 
-Mike


  _  

From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Andy Matthews
Sent: Thursday, May 21, 2009 7:08 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: SOT: execute JS before a specific image loads


John...
 
The original intent was to render an img tag to the page which would load in
a subset of my desired data, specifically that which can easily be gotten
via interpretation of the user agent string and other items. That subset
would get added to the src of the image as URL key/value pairs. Then, when
jQuery was available, I'd replace the src of the image tag with additional
information, which can only be gotten via JS (resolution, bandwidth, flash
player, etc).
 
In my testing I was never able to get this working. However, after doing
some googling, I found the lazy load plugin. Doesn't that do pretty much
what I'm looking for? Namely prevent the loading of an image until it's
scrolled into the visible window space?
 
 
andy

  _  

From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of John Crout
Sent: Wednesday, May 20, 2009 6:08 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: SOT: execute JS before a specific image loads


You won't be able to intercept the image before it is loaded but you can
block it from being rendered.  Remember that JavaScript relies on the DOM.
The DOM isn't fully-defined for the page, until all of it has loaded.  But
you can hide it by setting its visibilitiy to hidden, and keep the browser
from allocating real estate for it by setting display to block. (Default
is inline).

Looking at the code you included, I don't believe there is a statistic of
interest that you cannot collect when the page you've served, is requested.
(That is, the only info the browser will have that is new, it the location
of what it renders after receiving what the server sends.)  For example, the
location of everything won't be available to JavaScript until after what it
will render, has been rendered.  

By the way, I'm not pretending I know your business.  What I meant by stat
of interest is that whatever you collect, after delivering the image, that
you cannot collect when the request for the page is made, is something that
can be assumed as consistent, from request to request, even from the same
user.

Correct me if I'm incorrect about this (please).

--John Crout



On Wed, May 20, 2009 at 9:51 AM, Andy Matthews amatth...@dealerskins.com
wrote:



Can I intercept the loading of an image BEFORE it loads?

We're looking at using an img tag for inserting stats on our server. Here's
what I'm considering...

1) Collect certain information server side, write an img to the document
like so (note the URL vars):

img id=statsImg src=stats.cfm?somevar=someval width=1 height=1 /

2) Using JS, intercept the load of this image BEFORE it takes place, and add
things to the URL vars.

This way, if JS is not present, you get the default stuff, but if JS is
present, you get extra stuff.

Anyone?

Andy Matthews
Senior Web Developer

www.dealerskins.com

P Please consider the environment before printing this e-mail.

Total customer satisfaction is my number 1 priority! If you are not
completely satisfied with
the service I have provided, please let me know right away so I can correct
the problem,
or notify my manager Aaron West at aw...@dealerskins.com.





[jQuery] Re: SOT: execute JS before a specific image loads

2009-05-20 Thread Andy Matthews

I could, and that's the way we're approaching this. I'd rather do it all at
once, rather than have two db inserts.

No biggie.

 _ 
 From: jquery-en@googlegroups.com
 [mailto:jquery...@googlegroups.com]  On Behalf Of Josh Nathanson
 Sent: Wednesday, May 20, 2009 12:51 PM
 To:   jquery-en@googlegroups.com
 Subject:  [jQuery] Re: SOT: execute JS before a specific image loads
 
 Andy,
 
 Dunno if you can do thatcurious though, could you just do an ajax call
 that gives you the extra stuff?  It won't fire if they don't have
 javascript present, so it would do pretty much the same thing.
 
 -- Josh
 
 
 
 _
 From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
 Behalf Of Andy Matthews
 Sent: Wednesday, May 20, 2009 8:52 AM
 To: jquery-en@googlegroups.com
 Subject: [jQuery] SOT: execute JS before a specific image loads
 
 
 
 Can I intercept the loading of an image BEFORE it loads?
 
 We're looking at using an img tag for inserting stats on our server.
 Here's what I'm considering...
 
 1) Collect certain information server side, write an img to the document
 like so (note the URL vars):
 
 img id=statsImg src=stats.cfm?somevar=someval width=1 height=1 /
 
 2) Using JS, intercept the load of this image BEFORE it takes place, and
 add things to the URL vars.
 
 This way, if JS is not present, you get the default stuff, but if JS is
 present, you get extra stuff.
 
 Anyone?
 
 Andy Matthews
 Senior Web Developer
   OLE Object: Picture (Metafile)  
 www.dealerskins.com
 
 P Please consider the environment before printing this e-mail.
 
 Total customer satisfaction is my number 1 priority! If you are not
 completely satisfied with
 the service I have provided, please let me know right away so I can
 correct the problem,
 or notify my manager Aaron West at aw...@dealerskins.com.
 
attachment: winmail.dat

[jQuery] Re: help using parent()

2009-05-19 Thread Andy Matthews

You might try just 

var y = x.parent('div');

Would there ever be another div that could be a parent of one of these TD
tags?

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of elubin
Sent: Tuesday, May 19, 2009 12:47 PM
To: jQuery (English)
Subject: [jQuery] help using parent()


I am trying to find the div parent of a td tag.  In the following code,
I do not understand why the alert shows 0 instead of 1??

script type=text/javascript
$(function(){
 var x = $('#row_3');
 var y = x.parent('div[id^=idSection_]');
 alert( y.length );
});
/script


 div id=idSection_A style=display: block;
tabletrtd id=row_1eric 1/td/tr/table  /div  div
id=idSection_B style=display: block;
tabletrtd id=row_2eric 2/td/tr/table  /div  div
id=idSection_C style=display: block;
tabletrtd id=row_3eric 3/td/tr/table  /div




[jQuery] Re: tablesorter with multiple tables problem

2009-05-16 Thread andy

Sounds like a css issue. Have you set both tables to 'clear: both;' or
'display: block;'?

On May 15, 9:57 am, mlotfi mlotfi2...@gmail.com wrote:
 Hi,

 I am trying to use the plugin tablesorter that has a pager, for one
 table in a page it works fine, but when I put two tables, the pager
 links [next, previous,]  for the first table is moved under the
 second table.

 Please your help is appreciated.

 !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN
   http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
 html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en-us
 head
         titlejQuery plugin: Tablesorter 2.0 - Pager plugin/title
         link rel=stylesheet href=css/jq.css type=text/css
 media=print, projection, screen /
         link rel=stylesheet href=../themes/blue/style.css type=text/
 css media=print, projection, screen /
         script type=text/javascript src=../jquery-latest.js/script
         script type=text/javascript src=../jquery.tablesorter.js/
 script
         script type=text/javascript src=../addons/pager/
 jquery.tablesorter.pager.js/script
         script type=text/javascript src=js/chili/chili-1.8b.js/script
         script type=text/javascript src=js/docs.js/script
         script type=text/javascript
         $(function() {
                 $(table)
                         .tablesorter({widthFixed: true, widgets: ['zebra']})
                         .tablesorterPager({container: $(#pager)});
         });
         /script
 /head
 body
 div id=main

 h1First Table/h1
 table cellspacing=1 class=tablesorter
         thead
                 tr
                         thCurrent Reviewer/th
                         thArrival Date/th
                         thProposal #/th
                         thRouting #/th
                         thDeadline Date/th
                         thDays/th
                         thOSP administrator/th
                         thPI/th
                         thLead Unit/th
                         thPgogram Ann Number/th
                         thSponsor Name/th

                 /tr
         /thead

         tbody
                 tr
                         tdjimewhite/td
                         td5/8/09 08:14/td
                         td5638/td
                         td1/td
                         td05/15/09/td
                         td0/td
                         tdDeNutte, Kara L/td
                         tdNorwak, Michael/td
                         tdKavli Inst for Astr/td
                         tdNNH09ZDA001N/td
                         tdNAZA-wHASHINGTON/td
                 /tr

  more ..trtd./td/tr

         /tbody
 /table
 div id=pager class=pager
         form
                 img src=../addons/pager/icons/first.png class=first/
                 img src=../addons/pager/icons/prev.png class=prev/
                 input type=text class=pagedisplay/
                 img src=../addons/pager/icons/next.png class=next/
                 img src=../addons/pager/icons/last.png class=last/
                 select class=pagesize
                         option selected=selected  value=1010/option
                         option value=2020/option
                         option value=3030/option
                         option  value=4040/option
                 /select
         /form
 /div

 h1Second table/h1
 table cellspacing=1 class=tablesorter
         thead
                 tr
                         thCurrent Reviewer/th
                         thArrival Date/th
                         thProposal #/th
                         thRouting #/th
                         thDeadline Date/th
                         thDays/th
                         thOSP administrator/th
                         thPI/th
                         thLead Unit/th
                         thPgogram Ann Number/th
                         thSponsor Name/th

                 /tr
         /thead

         tbody
                 tr
                         tdJohn/td
                         td5/8/09 08:14/td
                         td5638/td
                         td1/td
                         td05/15/09/td
                         td0/td
                         tdDeNutte, Kara L/td
                         tdNorwak, Michael/td
                         tdKavli Inst for Astr/td
                         tdNNH09ZDA001N/td
                         tdNAZA-wHASHINGTON/td
                 /tr

  more ...trtd./td/tr

         /tbody
 /table
 div id=pager class=pager
         form
                 img src=../addons/pager/icons/first.png class=first/
                 img src=../addons/pager/icons/prev.png class=prev/
                 input type=text class=pagedisplay/
                 img src=../addons/pager/icons/next.png class=next/
                 img src=../addons/pager/icons/last.png class=last/
                 select class=pagesize
                         option selected=selected  

[jQuery] Re: help positioning color picker

2009-05-16 Thread andy

Either use absolute positioning for the color picker to take it out of
the normal flow of the document and set it's left margin and top
values to place it in the desired position and/or ensure that the
font div css clear value is set to 'none'.

On May 15, 4:52 pm, skunkwerk skunkw...@gmail.com wrote:
 Hi,
    i'm using this jquery color picker:http://www.eyecon.ro/colorpicker/
 on my page here:www.akbars.net/eurisko/basic.html
 but i can't seem to position it in the toolbar with the rest of the
 buttons - its always on a new line...

 any suggestions?

 thanks
 imran


[jQuery] Re: Better way to trim whitespace from input?

2009-05-13 Thread Andy Matthews

Well, you could try using a text transform CSS attribute on the text field.
Then you wouldn't have to perform a toUpperCase using JavaScript. But other
than that, looks about as lean as you can get it.


andy 

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of jckos
Sent: Wednesday, May 13, 2009 11:53 AM
To: jQuery (English)
Subject: [jQuery] Better way to trim whitespace from input?


Hi,

I need to transform all characters entered in an input field to uppercase
and trim trailing whitespace.  This script works, but I'm wondering if
there's a better way to do it.

 script
 $(document).ready(function(){
$(input).keyup(function (e) {
$(#couponCode).val($(this).val().toUpperCase());
  });
   $(button).click(function () {
var couponCode = $(#couponCode).val();
couponCode = jQuery.trim(couponCode);
 });
   });
/script


Any suggestions?

Thanks in advance.




[jQuery] Re: Better way to trim whitespace from input?

2009-05-13 Thread Andy Matthews

If you've got control over the back end, you could do the upper case
transform on the server side...but like I said. I think you've got it as
stripped down as you can get it. 

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of jckos
Sent: Wednesday, May 13, 2009 12:36 PM
To: jQuery (English)
Subject: [jQuery] Re: Better way to trim whitespace from input?


Thanks.  I can't use CSS because it doesn't actually submit the value as
uppercase, which is what I need.



On May 13, 1:03 pm, Andy Matthews li...@commadelimited.com wrote:
 Well, you could try using a text transform CSS attribute on the text
field.
 Then you wouldn't have to perform a toUpperCase using JavaScript. But 
 other than that, looks about as lean as you can get it.

 andy

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

 Behalf Of jckos
 Sent: Wednesday, May 13, 2009 11:53 AM
 To: jQuery (English)
 Subject: [jQuery] Better way to trim whitespace from input?

 Hi,

 I need to transform all characters entered in an input field to 
 uppercase and trim trailing whitespace.  This script works, but I'm 
 wondering if there's a better way to do it.

      script
          $(document).ready(function(){
                 $(input).keyup(function (e) {
                 $(#couponCode).val($(this).val().toUpperCase());
               });
            $(button).click(function () {
                         var couponCode = $(#couponCode).val();
                         couponCode = jQuery.trim(couponCode);
              });
            });
         /script

 Any suggestions?

 Thanks in advance.




[jQuery] Re: Cross Port Jquery Library Call

2009-05-13 Thread Andy Matthews

Can you put the jQuery file inside the secure server's domain, then
reference it from there for both sites?

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Shadraq
Sent: Wednesday, May 13, 2009 1:03 PM
To: jQuery (English)
Subject: [jQuery] Cross Port Jquery Library Call


I have created a payment system using Jquery. The problem I run into is when
I move from http to https. I get the following error:

Error: [Exception... Access to restricted URI denied  code: 1012
nsresult: 0x805303f4 (NS_ERROR_DOM_BAD_URI)  location: https://
www.stirthewater.com/scripts/js/jquery-1.3.1.min.js Line: 19] Source File:
https://www.mysite/scripts/js/jquery-1.3.1.min.js
Line: 19

I spent roughly 3 hours on Google trying to find a solution to this library
cross-port call. It's possible I didn't see the right article.
However, if someone could toss me a lifeline and help me out, it would make
my day.

Thanks,
Shadraq




[jQuery] Re: Nested sortable unordered list - parent li moves along with nested list

2009-05-13 Thread andy

Has anyone used the jQuery UI Sortable plugin with nested lists?


[jQuery] Re: SuckerFish menus covered by main content? please advise

2009-05-13 Thread andy

This is a css issue. After looking at the source code of your site, I
noticed that the navigation is setup in table cells. The main nav
should be setup in lists, with the subnav in a nested list within the
main nav. See suckerfish drop down tutorial on 
http://www.alistapart.com/articles/dropdowns.
After following this tutorial, when you rollover a main nav item, the
sub nav items will appear as you desire.


[jQuery] Re: PLease help.. sliding menu?

2009-05-13 Thread andy

jFlow is great - http://www.gimiti.com/kltan/wordpress/?p=32


[jQuery] Re: tablesorter messing with other tables

2009-05-13 Thread andy

I assume your tablesorter is picking up the desired table by an id or
class attribute. Does the nested table have the same attribute? If so
change the name of the nested table attribute and give it another try.
If you would like the nested table to sort independently, give it a
unique attribute identifier and it's own instance of tablesorter.


[jQuery] Re: Superfish with multicolumn sub navigation

2009-05-13 Thread andy

Have you taken a look at 
http://users.tpg.com.au/j_birch/plugins/superfish/#getting-started
or tried only using lists with more complex CSS rather than div's?


[jQuery] Re: jQuery too slow on IE!!!

2009-05-12 Thread Andy Matthews

That's quite a loaded statement. jQuery is actually optimized for IE as it's
still the largest share of the browser market. So jQuery is not inherently
slower on IE than on other browsers. Now, having said that, it's possible
that YOUR code could be slower on IE than on Firefox, but as you didn't post
an example link we can't test it, or examine your code.

Care to do that?


Andy matthews

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Chandan
Sent: Tuesday, May 12, 2009 7:43 AM
To: jQuery (English)
Cc: prabhub@gmail.com
Subject: [jQuery] jQuery too slow on IE!!!


Hi,

I recently started using jQuery, thinking that it is FASTER than usual
javascript, but i found it is too slow when used with IE. I am using IE 6/7.


I also googled to find lots of posting already happened saying it is too
slow.

Can anyone suugest me what needs to be done!

CC to my friend as well, he is gr8 fan of jQuery.

Thanks.
Chandan




[jQuery] Re: Disable input button, using wrong HTML code?

2009-05-06 Thread Andy Matthews

Right. The disabled attribute takes an actual string, not a boolean. You can
set even set it to true if you prefer:

$(#button).attr(disabled,true);
 

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Jonathan Vanherpe (T  T NV)
Sent: Wednesday, May 06, 2009 9:35 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Disable input button, using wrong HTML code?


stephen wrote:
 I created a test page here: 
 http://clients.stephenkorecky.com/stephen_korecky/js_test.html
 
 But basically the problem is that $(#button).attr(disabled,true);
 should disable a input button, and it does, HOWEVER it outputs 
 disabled= when it should output disabled=disabled anyone know how 
 to fix this?
 

$(#button).attr(disabled,disabled);
--
Jonathan Vanherpe - Tallieu  Tallieu NV - jonat...@tnt.be




[jQuery] Re: Calling an element tag and the value inside one of it's attributes

2009-05-04 Thread Andy H

For some reason this post disappeared.  Can anyone answer this?

Thanks!



On May 1, 10:01 am, Andy adharb...@gmail.com wrote:
 This is an odd questions.  I have a huge form with a lot of data.
 There is a table that data in it I need to display on a print screen
 (of course this data isn't being displayed in the regular table).  So,
 I put the display text in a span tag.

 So, this is how each item will look:

 span printData=Item 1 detail to displayItem 1/span
 span printData=item 2 detail to displayItem 2/span

 I need a way to grab all spans on the page that have the attributte of
 printData and grab that text inside that attribute and print it out.

 Any thoughts?


[jQuery] Re: Calling an element tag and the value inside one of it's attributes

2009-05-04 Thread Andy H

Here is an actual example.  Would anyone know why this isn't working?
What I find weird is if I do a single line (alert($(span).attr
(printElement));) it works fine.  But if I try to use the each()
function following it, nothing happens.


Any help would be great.

Thanks!






HTML:

span printElement=this is for the first itemThis is the first span
1/spanbr /
span printElement=so is this oneThis is the first span 2/
spanbr /
spanThis is the first span 3/spanbr /
span printElement=Another item in hereThis is the first span 4/
spanbr /
spanThis is the first span 5/spanbr /
span printElement=asdf asdf  af aweThis is the first span 6/
spanbr /
span printElement=hello!This is the first span 7/spanbr /
span printElement=WorldThis is the first span 8/spanbr /
spanThis is the first span 9/spanbr /br /


Output:br /
div id=output/div




Javascript:

$(document).ready(function() {

//alert($(span).attr(printElement));

$(span).each(function() {
$(this).attr(printElement).each(function() {

});
});

}

On May 4, 1:33 pm, Andy H adharb...@gmail.com wrote:
 For some reason this post disappeared.  Can anyone answer this?

 Thanks!

 On May 1, 10:01 am, Andy adharb...@gmail.com wrote:



  This is an odd questions.  I have a huge form with a lot of data.
  There is a table that data in it I need to display on a print screen
  (of course this data isn't being displayed in the regular table).  So,
  I put the display text in a span tag.

  So, this is how each item will look:

  span printData=Item 1 detail to displayItem 1/span
  span printData=item 2 detail to displayItem 2/span

  I need a way to grab all spans on the page that have the attributte of
  printData and grab that text inside that attribute and print it out.

  Any thoughts?- Hide quoted text -

 - Show quoted text -


[jQuery] Calling an element tag and the value inside one of it's attributes

2009-05-01 Thread Andy

This is an odd questions.  I have a huge form with a lot of data.
There is a table that data in it I need to display on a print screen
(of course this data isn't being displayed in the regular table).  So,
I put the display text in a span tag.

So, this is how each item will look:

span printData=Item 1 detail to displayItem 1/span
span printData=item 2 detail to displayItem 2/span


I need a way to grab all spans on the page that have the attributte of
printData and grab that text inside that attribute and print it out.


Any thoughts?



[jQuery] Grabbing text inside an alt tag

2009-04-29 Thread Andy

Is there a way to grab the text from inside a alt tag?  I have a site
that will have tons of span tags and I need to go through all of them
searching for the alt= attribute then grab it.


I'm using some non-jQuery javascript, so I'm sure there is an easier
way to format this than what I currently have.  Any thoughts on this
would be great.


- html example:

spantext here/span
span alt=Joetext here/span
span alt=Jimtext here/span
spantext here/span



- Javascript.

// grab all spans on page.
var elem = window.opener.document.getElementsByTagName(span);

// make sure spans have alt attribute
for (var i = 0; i  elem.length; i++) {
   if (!!$(elem[i]).attr(printElement)) {

    Where do I go from here?
   . would like to do a document.write(span element
alt value);

   }

}







Any thoughts on this would be great.


[jQuery] Re: How to get file name

2009-04-28 Thread Andy Matthews

You could also do this:

$('img').attr('src').split('/').slice(-1);

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of David .Wu
Sent: Tuesday, April 28, 2009 3:36 AM
To: jQuery (English)
Subject: [jQuery] How to get file name


img src=images/xxx.gif

$('img').attr('src') - This will get images/xxx.gif How to get xxx.gif by
jQuery?




[jQuery] Re: Can you help me understand .end() ?

2009-04-22 Thread Andy Matthews

Essentially the end method returns the result of the very first selector.


Andy matthews

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of MorningZ
Sent: Wednesday, April 22, 2009 1:06 PM
To: jQuery (English)
Subject: [jQuery] Re: Can you help me understand .end() ?


Say you have the html of

div
spanOne/span
spanTwo/span
spanThree/span
/div

and say:
var $obj = $(div);

your jQuery object, $obj, will be just the div tag

Now if you say

var $obj = $(div).find(span);

that would first be an object representing the div and the .find()
makes it be an object of the 3 span tags

If the statement was (and granted this doesn't make sense, but just an
example)

var $obj = $(div).find(span).end();

that would be just the div tag again  although walking through the
selector, $obj would have been the div, then would have represented the
found span tags, called .end() backs off the .find() and goes back
to the div

thinking of the chained command like a deck of cards helps :-)




On Apr 22, 12:41 pm, JKippes jessandthec...@gmail.com wrote:
 Please referencehttp://docs.jquery.com/How_jQuery_Works, the 
 Chainability segment.

 I'm confused on the given description of .end():

 You can take this even further, by adding or removing elements from 
 the selection, modifying those elements and then reverting to the old 
 selection, for example:
 $(a)
    .filter(.clickme)
      .click(function(){
        alert(You are now leaving the site.);
      })
    .end()

 a href=http://google.com/; class=clickmeI give a message when you 
 leave/a

 Methods that modify the jQuery selection and can be undone with end(), 
 are the following:

 add(),
 children(),
 eq(),
 filter(),
 find(),
 next(),
 not(),
 parent(),
 parents(),
 siblings() and
 slice().

 What does reverting and undone mean here?  When I run the code, the 
 link click event runs the alert, I hit Ok, and it passes me to Google.  
 So the words reverting and undone confuse me, as I would take this to 
 mean the modified click event would be undone and never executed.   
 So what does .end() really do?  A friend thinks it could be a chain 
 terminator, though he never uses it.  Is it just a cleanup thing part 
 of good practice and not technically needed?

 Thanks for educating a real jQuery beginner.




[jQuery] Re: jQuery countdown with simple percentage bar display?

2009-04-22 Thread Andy Matthews

Thanks Eric. That looks like just what I need, the timer version.


andy 

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Eric Garside
Sent: Wednesday, April 22, 2009 3:56 PM
To: jQuery (English)
Subject: [jQuery] Re: jQuery countdown with simple percentage bar display?


I've got a clock plugin which can do countdown timers, called epiClock.
http://code.google.com/p/epiclock

With a pretty simple rendering function (covered in the docs here:
http://eric.garside.name/docs.html?p=epiclock ), you should be able to hook
it into a progress bar, or merely display a countdown timer.



On Apr 22, 4:19 pm, Richard D. Worth rdwo...@gmail.com wrote:
 You may consider using jQuery UI Progressbar as a base:

 http://jqueryui.com/demos/progressbar/

 You could handle the change event and inspect the value, to see which 
 class to add for changing the color:

 http://docs.jquery.com/UI/Progressbar#event-change

 - Richard

 On Wed, Apr 22, 2009 at 2:35 PM, Andy Matthews
amatth...@dealerskins.comwrote:



  I'm wondering if there exists a jQuery plugin which would display a 
  percentage bar counting down from a specified time. As the remaining 
  time gets lower and lower, the bar would change from green, to 
  yellow, to red, etc.

  I'm trying to provide a visual display of the time remaining in a 
  user's session on our website control panel.

  Andy Matthews
  Senior Web Developer

 www.dealerskins.com

  P Please consider the environment before printing this e-mail.

  Total customer satisfaction is my number 1 priority! If you are not 
  completely satisfied with the service I have provided, please let me 
  know right away so I can correct the problem, or notify my manager 
  Aaron West at aw...@dealerskins.com.




[jQuery] jQuery and Flickr? Is there a best of breed plugin?

2009-04-20 Thread Andy Matthews

I'm looking for a simple plugin which would pull in a specified Flickr
feed and display it using jQuery. Does something like this already
exist? Google shows about 5 or 6 but none of them appear to work.


andy matthews


[jQuery] Re: jQuery AIR stripped

2009-04-17 Thread Andy Matthews

Interesting concept. I doubt that the jQuery team itself would approach that
project as it would require forked code, but it might be a fun project for
an individual.


andy 

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Spot
Sent: Friday, April 17, 2009 9:05 AM
To: jQuery (English)
Subject: [jQuery] jQuery AIR stripped


Someone might have already asked this, but I could not find anything.

Has there been any thought given to providing a dist of jQuery which has all
cross-browser functionality and checks stripped, specifically for AIR? While
those checks are limited and as streamlined as possible, would it not allow
the most speed to be squeezed out of jQ in AIR?




[jQuery] Re: Newbie Question - Show/Hide on a:link

2009-04-17 Thread Andy Matthews

Try using toggle instead:

${a.welcomenav).toggle(function(){
$(#welcome).show();
return false;
},function(){
$(#welcome).hide();
return false;
}); 

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of KetanMV
Sent: Friday, April 17, 2009 11:36 AM
To: jQuery (English)
Subject: [jQuery] Newbie Question - Show/Hide on a:link


Hi guys -- very basic question here I think. I've got some documentation and
a book in front of me, but I can't get this to work!
I want to click the Welcome nav item to show the div named welcome
on the page. If I use just the hide line of code, the page loads up with
the DIV hidden properly. But, once I add the click/show code -- nothing
happens, including the hide onLoad. Thoughts? Thanks so much!

$(document).ready(function() {
$(#welcome).hide();
${a.welcomenav).click(function() {
$(#welcome).show();
return false;
});
});

ul id=sliding-navigation
li class=sliding-elementa href=#
class=welcomenavWelcome/a/li
/ul




[jQuery] Re: binding after .get()

2009-04-17 Thread Andy Matthews
If you're using a current version of jQuery, then the liveQuery method is
for you.
 
http://docs.jquery.com/Events/live#typefn
 

  _  

From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Karl Swedberg
Sent: Friday, April 17, 2009 1:51 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: binding after .get()




On Apr 16, 2009, at 11:27 AM, hphoeksma wrote:



Hi Donny,

thanks for your reply. This will lead to lots of extra code I guess...
Would there be another way?


See the FAQ for more information:

http://docs.jquery.com/Frequently_Asked_Questions#Why_do_my_events_stop_work
ing_after_an_AJAX_request.3F


--Karl


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



[jQuery] Re: unsubscribe please

2009-04-17 Thread Andy Matthews
Have you tried using the Google Groups interface?

  _  

From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Johnny Lombardo
Sent: Friday, April 17, 2009 2:01 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] unsubscribe please


I have been trying to unsubscribe but there is always a bounce-back.  



  _  

  http://us.i1.yimg.com/us.yimg.com/i/ca/iotg_search.jpg
http://ca.toolbar.yahoo.com/ Yahoo! Canada Toolbar : Search from anywhere
on the web and bookmark your favourite sites. Download it now! 



[jQuery] Re: how to select elements inside jQuery objects

2009-04-16 Thread Andy Matthews

It's called context. Using your example, if you wanted to select all items
with a class of .mol_row INSIDE the jQuery object mol_elements, you'd do
this:

$(.mol_row, mol_elements)

That selector says look for .mol_row in the context of mol_elements.


Andy matthews

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of hybris77
Sent: Thursday, April 16, 2009 3:48 AM
To: jQuery (English)
Subject: [jQuery] how to select elements inside jQuery objects


i've tried to do the following on a grand scale the last few days, please
help


my suggestion to select a classname inside a object containing the xhtml

$(  mol_elements .mol_row ).append( td+ molname +/td);


I was then suggested the following, but that selects BOTH class and element,
right?

$( .mol_row, mol_elements ).append( td+ molname +/td);

how to select the classname inside the object then?

/pär




[jQuery] Re: $(button).Bind(click, function) Vs button onClick=function/

2009-04-16 Thread Andy Matthews

Try disabling the button, then reenabling it with jQuery? 

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of reach4thelasers
Sent: Thursday, April 16, 2009 8:39 AM
To: jQuery (English)
Subject: [jQuery] $(button).Bind(click, function) Vs button
onClick=function/


I know that the recommended usage in all the books/blogs/web sites is
the bind() method in the$(document).ready(function() {}

 However I am finding that very often my users are taking action by clicking
etc before the page has completely loading. This usually results in a full
form postback instead of AJAX, or worse nothing happens at all.

I understand that the bind method within the .ready function works best if
the handler requires an element further down the page that may not have been
loaded yet.  But if I do not rely on anything further down the page, is
there any good reason not to use the onClick=
attribute, to wire-up my event handlers immediately rather than waiting for
the full page to be loaded?




[jQuery] Re: jQuery Cycle with Transparent GIFs...Works in FF, Safari...but not in IE

2009-04-16 Thread Andy Matthews

Well your first problem is using GIF files for those photographs in the
first place. Photographs should ALWAYS be JPG files, or PNG if you need
transparency. You can really notice the pixelation on the back end of the
Ferrari, and the sides of the yellow and orange station wagon.

But as for your issue, I see no problem with your slideshow in IE7. Which
portion should we be looking at?


Andy matthews

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Matt M.
Sent: Thursday, April 16, 2009 2:07 PM
To: jQuery (English)
Subject: [jQuery] jQuery Cycle with Transparent GIFs...Works in FF,
Safari...but not in IE


Hello,

I was wondering if anyone knew of a solution to be able to use transparent
.GIFs with the malsup Cycle plugin. The implementation works in Firefox,
Safari, but the images show up with a white background in IE 7. Here's the
link to a live version...

http://www.speedwaremotorsports.com/new-home

Thanks for any help!

--Matt




[jQuery] Re: Shorten the JQuery code

2009-04-16 Thread Andy Matthews
I'd be careful with code like that. It is terse, and very elegant, but not
all that readable from a coding for the next guy mentality.
 

  _  

From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Joseph Le Brech
Sent: Thursday, April 16, 2009 4:12 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Shorten the JQuery code


I'm impressed by the [] brackets, does that eval() the 'hide' and 'show'
strings?

 Date: Thu, 16 Apr 2009 14:08:09 -0700
 Subject: [jQuery] Re: Shorten the JQuery code
 From: michaell...@gmail.com
 To: jquery-en@googlegroups.com
 
 
 $('#no-defs')[$('.def').length==0?'show':'hide']();
 
 On Apr 16, 1:54 pm, MorningZ morni...@gmail.com wrote:
  There isn't much you can do with that since you can't conditionally
  code in .show or .hide unless you made a plugin to pass in a true/
  false parameter and decide in the plugin, for instance
 
  $(#no_defs).conditionalShow($('.def').length == 0);
 
  On Apr 16, 4:27 pm, Dragon-Fly999 dragon-fly...@hotmail.com wrote:
 
   Could someone tell me how to shorten the following code? Thanks.
 
 if ($('.def').length == 0) {
   $('#no-defs').show();
 }
 else {
   $('#no-defs').hide();
 }


  _  

Surfing the web just got more rewarding. Download the New Internet Explorer
8 http://extras.uk.msn.com/internet-explorer-8/?ocid=T010MSN07A0716U  


[jQuery] Re: how to streamline my code with Event Delegation?

2009-04-16 Thread Andy Matthews

It would be more ideal to have some better way to identify each link. For
example, assuming a similar structure:

div id=linkContainer
a href=link 01/a
a href=link 02/a
/div

You might have this code:

// all anchor tags inside the linkContainer
$('#linkContainer a').click(function(e){
// prenvet the default link behaviour
e.preventDefault();
// get the text of the link, split on space, return the number
portion
var target = 'v' + $(this).text().split(' ')[1];
// run the ajax call
$.get(myPage.asp,{
myVar: target
},
function(data) {
$('#contentarea').html = data;
mySlideEffect();
}
);
});

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of redsun
Sent: Thursday, April 16, 2009 2:29 PM
To: jQuery (English)
Subject: [jQuery] how to streamline my code with Event Delegation?


i'm sure the jQuery i'm using below is very ineffiecient. the only syntax
that changes are the numbers in the names of my IDs and my variables - and
even they're matching. everything else is constant.
i'm told that event delegation is the answer, but cant rewrite the code
appropriately (i tried, but just made a mess of things - rookie).

so could someone kindly show me how to streamline the the below with event
delgation.
thanks.

jQuery:

$('#link01').click(function(){
$.get(myPage.asp, { myVar: v01 },
function(data) {
document.getElementById('contentarea').innerHTML = data;
mySlideEffect(); });
});


$('#link02').click(function(){
$.get(myPage.asp, { myVar: v02 },
function(data) {
document.getElementById('contentarea').innerHTML = data;
mySlideEffect(); });
});


 etc. ...


$('#link99').click(function(){
$.get(myPage.asp, { myVar: v99 },
function(data) {
document.getElementById('contentarea').innerHTML = data;
mySlideEffect(); });
});


HTML:

A HREF=# id=link01page1/A
A HREF=# id=link02page2/A
... etc ...
A HREF=# id=link99page3/A


div id=contentarea
Loaded content slides in with this DIV.
/div




[jQuery] Re: Shorten the JQuery code

2009-04-16 Thread Andy Matthews

Yep. I like it, and it's really nice...giving you more options. 

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of mkmanning
Sent: Thursday, April 16, 2009 4:20 PM
To: jQuery (English)
Subject: [jQuery] Re: Shorten the JQuery code


Guess it depends on who the next guy is :)

On Apr 16, 2:16 pm, Andy Matthews li...@commadelimited.com wrote:
 I'd be careful with code like that. It is terse, and very elegant, but 
 not all that readable from a coding for the next guy mentality.

   _

 From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] 
 On Behalf Of Joseph Le Brech
 Sent: Thursday, April 16, 2009 4:12 PM
 To: jquery-en@googlegroups.com
 Subject: [jQuery] Re: Shorten the JQuery code

 I'm impressed by the [] brackets, does that eval() the 'hide' and 'show'
 strings?



  Date: Thu, 16 Apr 2009 14:08:09 -0700
  Subject: [jQuery] Re: Shorten the JQuery code
  From: michaell...@gmail.com
  To: jquery-en@googlegroups.com

  $('#no-defs')[$('.def').length==0?'show':'hide']();

  On Apr 16, 1:54 pm, MorningZ morni...@gmail.com wrote:
   There isn't much you can do with that since you can't 
   conditionally code in .show or .hide unless you made a plugin 
   to pass in a true/ false parameter and decide in the plugin, for 
   instance

   $(#no_defs).conditionalShow($('.def').length == 0);

   On Apr 16, 4:27 pm, Dragon-Fly999 dragon-fly...@hotmail.com wrote:

Could someone tell me how to shorten the following code? Thanks.

          if ($('.def').length == 0) {
            $('#no-defs').show();
          }
          else {
            $('#no-defs').hide();
          }

   _

 Surfing the web just got more rewarding. Download the New Internet 
 Explorer
 8 http://extras.uk.msn.com/internet-explorer-8/?ocid=T010MSN07A0716U  




[jQuery] Re: Should $(document).ready() be external? And should it be placed at the bottom of the page?

2009-04-14 Thread Andy Matthews

You can externalize the document.ready call if you choose, I do it all the
time.

As for putting it at the bottom of the page, I'd say no. Putting it in an
external JS file, with the ready call makes it so that code is not run until
the entire DOM is ready anyway.


andy 

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of kgosser
Sent: Tuesday, April 14, 2009 10:28 AM
To: jQuery (English)
Subject: [jQuery] Should $(document).ready() be external? And should it be
placed at the bottom of the page?


Hey all,

Two quick questions for you. I couldn't find the answers while searching...
This would be a great thing to add to the jQuery FAQ, by the way.


(1) Is it advisable to place a page's $(document).ready() stuff in an
external .js file?

I've been doing a lot of reading and research on optimizing my front end
code, and YSlow seems to make a big deal of placing code externally if
possible for caching reasons. I understand the usefulness of placing the
code in an external document for that reason, however, the problem is that
there are a lot of functions for button and link clicks, shows/hides, etc.,
that are unique to that page and used differently on other pages.

Thus, putting it externally means it would most likely have to be in an
independent file just for that page... which means an added HTTP request
which is really the speed killer.

So anyways, looking for thoughts on this one.


(2) Is it advisable to place the $(document).ready() at the bottom of the
page right before the closing BODY tag?

Also when doing my research, I've seen that YSlow makes a big deal of this
as well. I'm sure many of you on here have discussed it or thought about it
yourself.

My question though is does it make sense to put the ready() code at the
bottom? Does it help? Is it useful? Will it break?


Thanks in advance for any feedback. Take care everyone.




[jQuery] Re: Converting JSON to html output

2009-04-14 Thread Andy Matthews

ColdFusion JSON represent!
 

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Nando
Sent: Tuesday, April 14, 2009 9:51 AM
To: jQuery (English)
Subject: [jQuery] Re: Converting JSON to html output


Sure. Here's the JSON string being returned by the server. The only thing
that will need some fiddling is that the year is being returned as a float.
Not sure how to get that displayed as just an integer in JS.

{COLUMNS:
[REFERENCEID,AUTHOR,DETAIL,REFYEAR,REFTYPE],DATA:[[1,Chen
 Chen,Chinese Herbs and Recipes, Second Revision,2009.0,1], [16,Dana
Cat,,,1],[5,Simon Becker,Chinese Medicine Today, 2008.0,1],[14,tom
cat,,2009.0,1],[4,Becker, Simon,Chinese Medicine
Today,2009.0,2],[3,Dana,Dana's Secret Pasta Recipe, 2008.0,5],[15,bob
cat,,2007.0,5]]}

On Apr 14, 4:32 pm, MorningZ morni...@gmail.com wrote:
 Can you give an example of the JSON to help?

 On Apr 14, 9:24 am, Nando d.na...@gmail.com wrote:

  Hi,

  I'm a jQuery and Javascript noob, and can't seem to get this to work.
  The JSON output looks right to me via console.log(result), but the 
  select box isn't being populated. The select box needs to be 
  populated onfocus, because the interface is set up to allow the user 
  to add new options to the select via a popup without a page refresh.

  $(function() {

    $.getJSON('index.cfm?view=listReferenceJSON',
      function(result,status) {
        console.log(result)
        var str = ''
        for(var i=0; i  result.ROWCOUNT; i++) {
          str+= 'option value='+result.DATA.REFERENCEID[i]
  +''+result.DATA.AUTHOR[i]+' ('+result.DATA.REFYEAR[i]+')option'
        }
          $(refSelectBox).bind('focus', function(event, ui) {
            $(#refSelectBox).html(str)
          }
      });

  });

  select id=refSelectBox/select

  Thanks in advance for any help.

  Nando




[jQuery] Re: Should $(document).ready() be external? And should it be placed at the bottom of the page?

2009-04-14 Thread Andy Matthews

That's something that each developer has to evaluate on their own. I'd think
it depends on the size of the file, and how it's being served.

Better for SEO to have an external file, as content is now closer to the
top.
Better for the user to cache said file.

Maybe set your own personal threshold for size...if the file is over 5k,
externalize it?


andy

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of kgosser
Sent: Tuesday, April 14, 2009 10:52 AM
To: jQuery (English)
Subject: [jQuery] Re: Should $(document).ready() be external? And should it
be placed at the bottom of the page?


So do you think placing it in an external file poses caching benefits that
outweigh the extra HTTP request? The number of HTTP requests seems to be the
biggest killer with speed

On Apr 14, 10:34 am, Andy Matthews li...@commadelimited.com wrote:
 You can externalize the document.ready call if you choose, I do it all 
 the time.

 As for putting it at the bottom of the page, I'd say no. Putting it in 
 an external JS file, with the ready call makes it so that code is not 
 run until the entire DOM is ready anyway.

 andy

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

 Behalf Of kgosser
 Sent: Tuesday, April 14, 2009 10:28 AM
 To: jQuery (English)
 Subject: [jQuery] Should $(document).ready() be external? And should 
 it be placed at the bottom of the page?

 Hey all,

 Two quick questions for you. I couldn't find the answers while
searching...
 This would be a great thing to add to the jQuery FAQ, by the way.

 (1) Is it advisable to place a page's $(document).ready() stuff in an 
 external .js file?

 I've been doing a lot of reading and research on optimizing my front 
 end code, and YSlow seems to make a big deal of placing code 
 externally if possible for caching reasons. I understand the 
 usefulness of placing the code in an external document for that 
 reason, however, the problem is that there are a lot of functions for 
 button and link clicks, shows/hides, etc., that are unique to that page
and used differently on other pages.

 Thus, putting it externally means it would most likely have to be in 
 an independent file just for that page... which means an added HTTP 
 request which is really the speed killer.

 So anyways, looking for thoughts on this one.

 (2) Is it advisable to place the $(document).ready() at the bottom of 
 the page right before the closing BODY tag?

 Also when doing my research, I've seen that YSlow makes a big deal of 
 this as well. I'm sure many of you on here have discussed it or 
 thought about it yourself.

 My question though is does it make sense to put the ready() code at 
 the bottom? Does it help? Is it useful? Will it break?

 Thanks in advance for any feedback. Take care everyone.




[jQuery] Re: truncate problem - why does it show full-size and then shrink after page load?

2009-04-13 Thread Andy

Any thoughts on this?

On Apr 9, 12:03 pm, Andy andym...@gmail.com wrote:
 I'm using the Truncate plugin (http://www.reindel.com/truncate/) and
 when the page loads, all the DIVs display full size and then after the
 page load, they all shrink and show the more link.

 I look at the example on the Truncate site and it doesn't behave this
 way

 Any ideas?


[jQuery] Re: capture user's selection on a html page

2009-04-13 Thread Andy Matthews

Look into the functionality on the New York Times story pages:
http://www.nytimes.com/2009/04/14/world/asia/14thai.html?_r=1hp

Highlight any block of text inside the story, and you'll get a litle popup
question mark icon which links to a search of that string in the NYT
database.

Pretty handy actually. 

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of ihomest...@gmail.com
Sent: Monday, April 13, 2009 11:36 AM
To: jQuery (English)
Subject: [jQuery] capture user's selection on a html page


Hi,

There is an onselect event for javascript which allows you to capture user
selected text in text input or textarea box. Is there a way to capture
user's selection anywhere on the html page?

I know several javascript applications which allow users to select elements
on a html page and allow you to copy paste your selected html data into
other places. Would appreciate if anyone points me to some references on how
this is implemented, especially how in Jquery.

Thanks.




[jQuery] truncate problem - why does it show full-size and then shrink after page load?

2009-04-09 Thread Andy

I'm using the Truncate plugin (http://www.reindel.com/truncate/) and
when the page loads, all the DIVs display full size and then after the
page load, they all shrink and show the more link.

I look at the example on the Truncate site and it doesn't behave this
way

Any ideas?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
jQuery (English) group.
To post to this group, send email to jquery-en@googlegroups.com
To unsubscribe from this group, send email to 
jquery-en+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/jquery-en?hl=en
-~--~~~~--~~--~--~---



[jQuery] Re: How can I freeze the title row in a table?

2009-04-08 Thread Andy Matthews

Use Excel?

:) 

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Matt Wilson
Sent: Wednesday, April 08, 2009 9:53 AM
To: jQuery (English)
Subject: [jQuery] How can I freeze the title row in a table?


I have a table with lots of rows, and when I scroll down, I can't see the
row with the column titles.

How can I freeze that row in place so I can still see it as I scroll down?




[jQuery] Creating a personal blog site. Upon clicking on an entry list item, it will open the correct text in the content area

2009-04-07 Thread Andy

I am creating code using Jquery that will take the text from a header
tag in my content and populate a listitem box in the sidebar pane.
Also, when clicking on the list item, it will unhide the content in
the content pane and display it to the user.  My issue right now is
that I am not able to unhide the text upon clicking the listitem.  Can
anyone please help?

Here is my Jquery code,

// I hide all the content in the content pane
$(.entry).hide();

// I populate the list items into the side pane named by the entry's
header
$(#entries).append(li + $(.entry h2).text() + /li);

// If I click on the list Item, I want the corresponding content with
the list items name matching the content's header to show

$(#entries li).click(
function(){
var link = $(this).text();

$(.entry h2).filter(
function(){
$(this).text() == link;
})
.toggle();

}
)



my html code

 div id='left_sidebar'
div id='entries'
h2 style=text-align:leftEntries/h2

/div
/div
div id='content'
div id='content_wrapper'
div class=entry
h2 id=1April 6, 2009/h2
img src=surfin.jpg style=width:50% alt='' /
p
text text text
/p
/div
/div
/div


[jQuery] Re: jQuery within Javascript?

2009-04-07 Thread Andy Matthews

You can use jQuery's each method:

$(*[id^='bgChangerAnchor').each(function () {
// do some stuff here for each item returned by the match
})'

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Edward Ludlow
Sent: Tuesday, April 07, 2009 3:58 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: jQuery within Javascript?


MorningZ wrote:
  jQuery *is* JavaScript, keep that in mind

That's why I was confused why my loop won't workis there a reason it
doesn't?

  $(document).ready(function(){
  $(*[id^='bgChangerAnchor').click(function () {
   var id = this.id.replace('bgChangerAnchor', '');
   $(#mainContainer).css(background,url(backgrounds/
  bg_ + id + .jpg));
  });
  });


Thanks, will try that.  Is there no way I can incorporate a simple for loop
so some other stuff can be performed too?

Thanks for the reply.

Ed




[jQuery] Re: Nested sortable unordered list - parent li moves along with nested list

2009-04-05 Thread andy

One more thing I forgot to add. I am not trying to add the ability to
move list items from one list to another, just reorder the items
within their own list.


[jQuery] Nested sortable unordered list - parent li moves along with nested list

2009-04-04 Thread andy

Within an admin I created there is a nested sortable unordered list
with the jQuery UI Sortable plugin to allow the user to reorder list
items in the second (ul id=sortlist4) and third (ul
id=sortlistb23) level nested lists. The first level list (ul
id=sortablelist) cannot be sorted. Here is an example:


ul id=sortablelist
li
img src=source here id=expand4 alt=alt info /
ba href=link herePage Title/a/bnbsp;nbsp;-nbsp;nbsp;
First 150 characters of page content...

ul id=sortlist4
li id=listItem_23
img src=source here alt=move class=handle /
img src=source here id=expandb23 alt=alt info /
ba href=link herePage 
Title/a/bnbsp;nbsp;-nbsp;nbsp;
First 150 characters of page content...

ul id=sortlistb23
li id=listItemb_69
img src=source here alt=move 
class=handle /
ba href=link herePage 
Title/a/bnbsp;nbsp;-
nbsp;nbsp; First 150 characters of page content...
/li
li id=listItemb_70
img src=source here alt=move 
class=handle /
ba href=link herePage 
Title/a/bnbsp;nbsp;-
nbsp;nbsp; First 150 characters of page content...
/li
/ul!--sortlistb23--
script type=text/javascript
//sortable list
$(document).ready(function() {
$(#sortlist4).sortable('disable'); 
$(#sortlistb23).sortable
({
handle : '.handle',
update : function () {
var order = 
$('#sortlistb23').sortable('serialize'); $
(#info).load(process-sortable2.php?+order); $
(#sortlist4).sortable('enable');
}
});
});
//show/hide details
$(document).ready(function($) {
$(img#expandb23).click(function(){

$(ul#sortlistb23).toggle(slow); return false;
});
});
/script
/li!--listItem_23--
/ul!--sortlist4--

script type=text/javascript
//sortable list
$(document).ready(function() {
$(#sortlist4).sortable({
handle : '.handle',
update : function () {
var order = 
$('#sortlist4').sortable('serialize'); $(#info).load
(process-sortable.php?+order);
}
});
});
//show/hide details
$(document).ready(function($) {
$(img#expand4).click(function(){
$(ul#sortlist4).toggle(slow); return false;
});
});
/script

/li
/ul!--sortablelist--


When trying to reorder items in the third level (ul id=sortlistb23)
nested list, the list item of the second level list (li
id=listItem_23) which houses the third level list also moves. To
stop this from happening, when the handle of a third level list item
is clicked I disabled the parents sortable ability. Then once the
order of the third level list is updated, the parents sortable ability
is reinstated. Is there a better way to do this? I tried using
connectWith to tie the third level list and the list of it's parent,
but no luck.

The jQuery functions appear within the code to pickup the id numbers
(appear after the 'sortlist' and 'sortlistb' ids of the lists /
'listItem' and 'listItemb' of the list items) that are generated by a
php foreach statement, which creates the hierarchy I needed.

Any suggestions are appreciated. I am using jQuery 1.3.1 and jQuery UI
1.7.1.

Thanks in advance for your time and help!


[jQuery] Re: Cool Flash-like Menu Effect

2009-03-31 Thread Andy Matthews

The Lava Lamp plugin is the one you want:

http://www.gmarwaha.com/blog/2007/08/23/lavalamp-for-jquery-lovers/ 

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of DesignerNotCoder
Sent: Tuesday, March 31, 2009 8:36 AM
To: jQuery (English)
Subject: [jQuery] Cool Flash-like Menu Effect


http://www.alexbuga.com/v8/

Notice the menu to the upper right and how it slides as it follows the mouse
across the icons. I have been searching for an open source for this, but I'm
not sure how to define it. Any ideas? Thx




[jQuery] Re: A general Javascript question: duplicate IDs in a document?

2009-03-31 Thread Andy Matthews

It's against the W3c spec for the DOM. The whole point of an ID is that it's
unique on the page. Duplicate IDs lead to potential errors.

If you need to have more than one of a thing on a page, then use a class. 

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of riotbrrd
Sent: Tuesday, March 31, 2009 11:24 AM
To: jQuery (English)
Subject: [jQuery] A general Javascript question: duplicate IDs in a
document?


I realize this is not jQuery specific, but I figured you guys might have
some good advice...

I often find myself wanting to assign the same ID to multiple elements in a
document -- typically when there are several versions of an element which
display at different times. Is there a good reason NOT to do this? If so,
what's a better practice?

thanks,
Kim




[jQuery] Re: A general Javascript question: duplicate IDs in a document?

2009-03-31 Thread Andy Matthews

One problem with that approach is that you're polluting the DOM with invalid
markup.  Rel is not a valid attribute of the div tag.


andy

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Eric Garside
Sent: Tuesday, March 31, 2009 1:57 PM
To: jQuery (English)
Subject: [jQuery] Re: A general Javascript question: duplicate IDs in a
document?


A best practice I've adopted is to utilize classes and ref/rel attributes on
dom elements for situations like you're describing.

div class=event-phase rel=1/div
div class=event-phase rel=2/div
div class=event-phase rel=3/div
div class=event-phase rel=4/div
div class=event-phase rel=5/div

Instead of

div id=event-phase-1/div
div id=event-phase-2/div
div id=event-phase-3/div
div id=event-phase-4/div
div id=event-phase-5/div

On Mar 31, 12:31 pm, brian bally.z...@gmail.com wrote:
 An ID should be unique. That's why it's callled an ID (IDentifier).
 Repeating an ID in a page will cause problems for any DOM work.

 For your purposes, you might do something like:

 div class=Foo id=foo_1/div
 div class=Bar id=bar_1/div
 div class=Foo id=foo_2/div
 div class=Bar id=bar_2/div

 On Tue, Mar 31, 2009 at 12:24 PM, riotbrrd k...@riotbrrd.com wrote:

  I realize this is not jQuery specific, but I figured you guys might 
  have some good advice...

  I often find myself wanting to assign the same ID to multiple 
  elements in a document -- typically when there are several versions 
  of an element which display at different times. Is there a good 
  reason NOT to do this? If so, what's a better practice?

  thanks,
  Kim




[jQuery] Re: OT: AIR sync?

2009-03-27 Thread Andy Matthews

It sounds like you've already made up your mind about using HTML/JS (my
personal choice), but have you considered Flex in conjunction with LiveCycle
Data Services? LCDS makes syncing and managing conflicts SUPER simple.


andy

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Jack Killpatrick
Sent: Friday, March 27, 2009 1:06 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] OT: AIR sync?


Sorry for the slightly off topic post, but I know there are some AIR devs on
this list and someone might have a tip for me.

I'm planning an Adobe AIR app that will be written with HTML/jQuery and
needs to do offline sync (using SQLite db on AIR side, mysql on server side
and json web services). IE: an online user must be able to sync their SQLite
db from the server, disconnect, modify records, then reconnect and sync back
to the server, with any conflicts (due to someone else changing the same
record since they last got it) raised so that we can notify the user and
offer a conflict resolution dialog.

I've googled around a bunch, but am not finding much (about best practices,
or opensource code to help me along, or 3rd party products to help). We have
experience doing sync in other projects, just not in AIR, so are doing some
fishing.

If anyone has some links, advice, etc, thanks in advance!

- Jack




[jQuery] Re: OT: AIR sync?

2009-03-27 Thread Andy Matthews

It's possible I suppose. The problem is that the cost for LCDS (to get the
data syncing) might be prohibitive for your project. You could also work
with BlazeDS which has much of the same functionality of LCDS (a little
brother of sorts).

I've not personally done any data snycing so I'm not speaking from
experience. How I might approach it though is to store a set of SQL scripts
in the AIR app to get the timestamps from the local SQLite db. Stash the
last synced timestamp on the file system (or in a table in the db
locally). Then compare when needed with the remote database. The syncing is
going to be the hard part though. Possibly you could add a column in both
dbs which contained a last changed data. Then, you could also query
against the last changed between the AIR app and the remote db.


andy

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Jack Killpatrick
Sent: Friday, March 27, 2009 2:38 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: OT: AIR sync?


We've looked at LCDS, but aren't too keen on using Flex for the UI. 
Maybe there's some minimal way we could use it just for the sync aspect (ie
as more of an internal thing)? That would be fine.

- Jack

Andy Matthews wrote:
 It sounds like you've already made up your mind about using HTML/JS 
 (my personal choice), but have you considered Flex in conjunction with 
 LiveCycle Data Services? LCDS makes syncing and managing conflicts SUPER
simple.


 andy

 -Original Message-
 From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] 
 On Behalf Of Jack Killpatrick
 Sent: Friday, March 27, 2009 1:06 PM
 To: jquery-en@googlegroups.com
 Subject: [jQuery] OT: AIR sync?


 Sorry for the slightly off topic post, but I know there are some AIR 
 devs on this list and someone might have a tip for me.

 I'm planning an Adobe AIR app that will be written with HTML/jQuery 
 and needs to do offline sync (using SQLite db on AIR side, mysql on 
 server side and json web services). IE: an online user must be able to 
 sync their SQLite db from the server, disconnect, modify records, then 
 reconnect and sync back to the server, with any conflicts (due to 
 someone else changing the same record since they last got it) raised 
 so that we can notify the user and offer a conflict resolution dialog.

 I've googled around a bunch, but am not finding much (about best 
 practices, or opensource code to help me along, or 3rd party products 
 to help). We have experience doing sync in other projects, just not in 
 AIR, so are doing some fishing.

 If anyone has some links, advice, etc, thanks in advance!

 - Jack



   





[jQuery] Re: OT: AIR sync?

2009-03-27 Thread Andy Matthews
I don't know the current version, but my company was willing to put the
initial release into production for using in a broadcasting application AIR
app that I wrote in jQuery/HTML, sort of a one way instant messenger. It
seemed very stable at the time, and that was almost a year ago.
 
It's a pretty cool thing, but don't let their marketing chatter about push
kid you. It's polling plain and simple. That's okay, but not really what
they advertise it as.
 
One thing I'll warn you of. If you end up using BlazeDS I discovered a bug
where transparent HTML AIR apps would not function if you used BlazeDS. Turn
transparency off and it worked just fine.
 
 
andy

  _  

From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Jack Killpatrick
Sent: Friday, March 27, 2009 3:13 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: OT: AIR sync?


Thanks, Andy. I haven't been able to find pricing for LCDS, which makes it
hard to consider (without a ballpark, at least). Looks like it's an
enterprise-sale kind of thing, but if you know otherwise, do tell ;-)

The client-server sync, conflict resolution and offline data cache *does*
sound about right for what we'd need, based on this:

http://www.adobe.com/products/livecycle/dataservices/features.html

There's mention in there of ajax date services, too, but nothing
specifically about how it might tie into the sync stuff.

Thanks for the design thoughts... that's roughly what we're thinking, too
(check timestamps, do something). It's unclear to me at this point what the
high-performance data sync engine in LCDS would supply.

Taking a look at BlazeDS. I see that an Ajax client library can be used to
talk to the BlazeDS server. Know how stable BlazeDS is?

- Jack



Andy Matthews wrote: 

It's possible I suppose. The problem is that the cost for LCDS (to get the

data syncing) might be prohibitive for your project. You could also work

with BlazeDS which has much of the same functionality of LCDS (a little

brother of sorts).



I've not personally done any data snycing so I'm not speaking from

experience. How I might approach it though is to store a set of SQL scripts

in the AIR app to get the timestamps from the local SQLite db. Stash the

last synced timestamp on the file system (or in a table in the db

locally). Then compare when needed with the remote database. The syncing is

going to be the hard part though. Possibly you could add a column in both

dbs which contained a last changed data. Then, you could also query

against the last changed between the AIR app and the remote db.





andy



-Original Message-

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

Behalf Of Jack Killpatrick

Sent: Friday, March 27, 2009 2:38 PM

To: jquery-en@googlegroups.com

Subject: [jQuery] Re: OT: AIR sync?





We've looked at LCDS, but aren't too keen on using Flex for the UI. 

Maybe there's some minimal way we could use it just for the sync aspect (ie

as more of an internal thing)? That would be fine.



- Jack



Andy Matthews wrote:

  

It sounds like you've already made up your mind about using HTML/JS 

(my personal choice), but have you considered Flex in conjunction with 

LiveCycle Data Services? LCDS makes syncing and managing conflicts SUPER



simple.

  

andy



-Original Message-

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

On Behalf Of Jack Killpatrick

Sent: Friday, March 27, 2009 1:06 PM

To: jquery-en@googlegroups.com

Subject: [jQuery] OT: AIR sync?





Sorry for the slightly off topic post, but I know there are some AIR 

devs on this list and someone might have a tip for me.



I'm planning an Adobe AIR app that will be written with HTML/jQuery 

and needs to do offline sync (using SQLite db on AIR side, mysql on 

server side and json web services). IE: an online user must be able to 

sync their SQLite db from the server, disconnect, modify records, then 

reconnect and sync back to the server, with any conflicts (due to 

someone else changing the same record since they last got it) raised 

so that we can notify the user and offer a conflict resolution dialog.



I've googled around a bunch, but am not finding much (about best 

practices, or opensource code to help me along, or 3rd party products 

to help). We have experience doing sync in other projects, just not in 

AIR, so are doing some fishing.



If anyone has some links, advice, etc, thanks in advance!



- Jack







  











  




[jQuery] Re: OT: AIR sync?

2009-03-27 Thread Andy Matthews
Mostly. Using Blaze allows you to communicate via remoting, which is a
binary protocol. It's faster and lighterweight.
 
However, the data sync is where LCDS really gets it's muscle.
 
 
andy

  _  

From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Jack Killpatrick
Sent: Friday, March 27, 2009 4:24 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: OT: AIR sync?


Thanks for the info. I took a look a BlazeDS and it looks like it's just a
messaging system for Flex-to-Java/services messaging (or js-to-flex-to-java
via js bridge), not anything specific for db manipulation or sync. Did I
read it right?

- Jack

Andy Matthews wrote: 

I don't know the current version, but my company was willing to put the
initial release into production for using in a broadcasting application AIR
app that I wrote in jQuery/HTML, sort of a one way instant messenger. It
seemed very stable at the time, and that was almost a year ago.
 
It's a pretty cool thing, but don't let their marketing chatter about push
kid you. It's polling plain and simple. That's okay, but not really what
they advertise it as.
 
One thing I'll warn you of. If you end up using BlazeDS I discovered a bug
where transparent HTML AIR apps would not function if you used BlazeDS. Turn
transparency off and it worked just fine.
 
 
andy

  _  

From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Jack Killpatrick
Sent: Friday, March 27, 2009 3:13 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: OT: AIR sync?


Thanks, Andy. I haven't been able to find pricing for LCDS, which makes it
hard to consider (without a ballpark, at least). Looks like it's an
enterprise-sale kind of thing, but if you know otherwise, do tell ;-)

The client-server sync, conflict resolution and offline data cache *does*
sound about right for what we'd need, based on this:

http://www.adobe.com/products/livecycle/dataservices/features.html

There's mention in there of ajax date services, too, but nothing
specifically about how it might tie into the sync stuff.

Thanks for the design thoughts... that's roughly what we're thinking, too
(check timestamps, do something). It's unclear to me at this point what the
high-performance data sync engine in LCDS would supply.

Taking a look at BlazeDS. I see that an Ajax client library can be used to
talk to the BlazeDS server. Know how stable BlazeDS is?

- Jack



Andy Matthews wrote: 

It's possible I suppose. The problem is that the cost for LCDS (to get the

data syncing) might be prohibitive for your project. You could also work

with BlazeDS which has much of the same functionality of LCDS (a little

brother of sorts).



I've not personally done any data snycing so I'm not speaking from

experience. How I might approach it though is to store a set of SQL scripts

in the AIR app to get the timestamps from the local SQLite db. Stash the

last synced timestamp on the file system (or in a table in the db

locally). Then compare when needed with the remote database. The syncing is

going to be the hard part though. Possibly you could add a column in both

dbs which contained a last changed data. Then, you could also query

against the last changed between the AIR app and the remote db.





andy



-Original Message-

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

Behalf Of Jack Killpatrick

Sent: Friday, March 27, 2009 2:38 PM

To: jquery-en@googlegroups.com

Subject: [jQuery] Re: OT: AIR sync?





We've looked at LCDS, but aren't too keen on using Flex for the UI. 

Maybe there's some minimal way we could use it just for the sync aspect (ie

as more of an internal thing)? That would be fine.



- Jack



Andy Matthews wrote:

  

It sounds like you've already made up your mind about using HTML/JS 

(my personal choice), but have you considered Flex in conjunction with 

LiveCycle Data Services? LCDS makes syncing and managing conflicts SUPER



simple.

  

andy



-Original Message-

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

On Behalf Of Jack Killpatrick

Sent: Friday, March 27, 2009 1:06 PM

To: jquery-en@googlegroups.com

Subject: [jQuery] OT: AIR sync?





Sorry for the slightly off topic post, but I know there are some AIR 

devs on this list and someone might have a tip for me.



I'm planning an Adobe AIR app that will be written with HTML/jQuery 

and needs to do offline sync (using SQLite db on AIR side, mysql on 

server side and json web services). IE: an online user must be able to 

sync their SQLite db from the server, disconnect, modify records, then 

reconnect and sync back to the server, with any conflicts (due to 

someone else changing the same record since they last got it) raised 

so that we can notify the user and offer a conflict resolution dialog.



I've googled around a bunch, but am not finding much (about best 

practices, or opensource code to help me along

[jQuery] Re: Pointless but fun jQuery experiment

2009-03-26 Thread Andy Matthews

That's stinkin' awesome! Very cool. I'm not even ask how you did it (I'll
just view source).

:) 

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Kelvin Luck
Sent: Wednesday, March 25, 2009 8:22 PM
To: jquery-en
Subject: [jQuery] Pointless but fun jQuery experiment


Inspired by google's chrome experiments I recently put together a pointless
but fun experiment with the help of jQuery and I thought that people on the
list might like to check it out:

http://www.kelvinluck.com/assets/jquery/boingPic/index.html

As I said, completely pointless but makes a nice change from serious
progressive enhancement!

Hope you like it,

Kelvin :)




[jQuery] Re: one check box to select entire group

2009-03-26 Thread Andy H

Here's the html for you.


table
tr
th/th
thTitle/th
thinput type=checkbox name=chk_cat1 id=chk_cat1 //
th
thinput type=checkbox name=chk_cat2 id=chk_cat2 //
th
/tr
tr
tdinput type=checkbox name=chk_row1 id=chk_row1 //
td
tdDescription 1/td
tdinput type=checkbox name=chk_cat1_row1
id=chk_cat1_row1 //td
tdinput type=checkbox name=chk_cat2_row1
id=chk_cat2_row1 //td
/tr
tr
tdinput type=checkbox name=chk_row2 id=chk_row2 //
td
tdDescription 2/td
tdinput type=checkbox name=chk_cat1_row2
id=chk_cat1_row2 //td
tdinput type=checkbox name=chk_cat2_row2
id=chk_cat2_row2 //td
/tr
/table




I think what I'm going to do is change the attributes for the
checkboxes, so it will make it easier to find the header related
checkboxes and row related items.  So, I'll be formatting the check
boxes like this:

input type=checkbox name=chk_cat1_row1 id=chk_cat1_row1
headerid=chk_cat1 rowid=row1 /

Now I don't have to parse any id's out and jQuery seems to work with
this.



Thanks!







On Mar 25, 5:41 pm, MorningZ morni...@gmail.com wrote:
 How about just showing the HTML instead of hard to follow
 explainations

 It's still not clear what the header column is  is it text? is
 there a checkbox?  what has the id cat1?

 On Mar 25, 5:22 pm, Andy H adharb...@gmail.com wrote:



  That is close, the item section will be different for each check box.
  The table will have three columns that will be populated with check
  boxes only.  The header section in the table will have a global select
  for each column.   So  if there is a row that has the following

  chk_categoryID_itemID   each row will share the same
  itemID and each column will share the same category id.

  header1 = cat1... header2 = cat2.
  row1 = item1 row2 = item2

  so we have two rows with two columns.  We'll have four checkboxes that
  will look like this.

  ckb_cat1_item1        ckb_cat2_item1
  ckb_cat1_item2        ckb_cat2_item2

  So, if I select the header for category 1, I need to be able to select
  ckb_cat1_item1  ckb_cat1_item2.

  Hopefully that makes more sense.

  Thanks!

  On Mar 25, 11:37 am, MorningZ morni...@gmail.com wrote:

   Your description of your HTML isn't very clear, but none the less this
   could work:

   $(selector for header checkboxes).click(function() {
         var chk = this;
         $(input[id^=' + chk.id + _item']).each(function()
   { this.checked = chk.checked; });

   })

   On Mar 25, 12:12 pm, Andy adharb...@gmail.com wrote:

Hey guys,

I have a table where the header has check boxes so if you click on
that, it will select all of the other checkboxes in that row.   The
issue I have, it's not a select all checkboxes, but ones that have a
specific naming convention.   Example.  If my header is named
ckb_category1 I need to be able to find all checkboxes that are in
that column that have naming like ckb_category1_item1.  Then each row
following would have a different item id, but keep the category1 the
same.   Is there a pattern I can use that would work for this?

Thanks!- Hide quoted text -

   - Show quoted text -- Hide quoted text -

 - Show quoted text -


[jQuery] one check box to select entire group

2009-03-25 Thread Andy

Hey guys,

I have a table where the header has check boxes so if you click on
that, it will select all of the other checkboxes in that row.   The
issue I have, it's not a select all checkboxes, but ones that have a
specific naming convention.   Example.  If my header is named
ckb_category1 I need to be able to find all checkboxes that are in
that column that have naming like ckb_category1_item1.  Then each row
following would have a different item id, but keep the category1 the
same.   Is there a pattern I can use that would work for this?

Thanks!



[jQuery] jQuery SWFObject callback function anyone?

2009-03-25 Thread Andy Matthews

Does anyone know if the jQuery SWFObject plugin offers a callback
function? I've got some alternate content inside the container which
will contain my Flash movie. Problem is that the page takes so long to
load that the HTML is visible for about 2 seconds before SWFobject
kicks in.

I'd like to hide the container with jQuery until after the plugin
runs, then return the container to visibility.

Anyone have an idea?


[jQuery] Re: one check box to select entire group

2009-03-25 Thread Andy H

That is close, the item section will be different for each check box.
The table will have three columns that will be populated with check
boxes only.  The header section in the table will have a global select
for each column.   So  if there is a row that has the following


chk_categoryID_itemID   each row will share the same
itemID and each column will share the same category id.


header1 = cat1... header2 = cat2.
row1 = item1 row2 = item2


so we have two rows with two columns.  We'll have four checkboxes that
will look like this.

ckb_cat1_item1ckb_cat2_item1
ckb_cat1_item2ckb_cat2_item2


So, if I select the header for category 1, I need to be able to select
ckb_cat1_item1  ckb_cat1_item2.



Hopefully that makes more sense.


Thanks!







On Mar 25, 11:37 am, MorningZ morni...@gmail.com wrote:
 Your description of your HTML isn't very clear, but none the less this
 could work:

 $(selector for header checkboxes).click(function() {
       var chk = this;
       $(input[id^=' + chk.id + _item']).each(function()
 { this.checked = chk.checked; });

 })

 On Mar 25, 12:12 pm, Andy adharb...@gmail.com wrote:



  Hey guys,

  I have a table where the header has check boxes so if you click on
  that, it will select all of the other checkboxes in that row.   The
  issue I have, it's not a select all checkboxes, but ones that have a
  specific naming convention.   Example.  If my header is named
  ckb_category1 I need to be able to find all checkboxes that are in
  that column that have naming like ckb_category1_item1.  Then each row
  following would have a different item id, but keep the category1 the
  same.   Is there a pattern I can use that would work for this?

  Thanks!- Hide quoted text -

 - Show quoted text -


[jQuery] Re: Validation plugin: combine functions with strings on remote error

2009-03-24 Thread Andy Matthews
Woohoo! That was easy enough. Thanks a ton for this amazing plugin. I'm sad
that this is the first time I've used it.

  _  

From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Jörn Zaefferer
Sent: Monday, March 23, 2009 5:34 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Validation plugin: combine functions with strings on
remote error


Passing a function as a message happens all the time when using
$.format(... {0}) as messages. The function is expected to return the
formated message, so you can just return the string value you want to
display at the end of your function.

Jörn


On Mon, Mar 23, 2009 at 10:39 PM, Andy Matthews amatth...@dealerskins.com
wrote:



I'm using the validation plugin to validate a field remotely. The validation
portion works great, but I've got a question about the error message if the
validation fails.

I discovered that you can pass a function rather than a plain string as seen
below in the remote key. The problem is that when I do this, I lose the
ability to display a string of my choosing. Does anyone know how to
accomplish both?

messages: {
   pagealias: {
   required: 'Page alias is required',
   remote: function(){
   // highlight the field
   $field.pulse();
   // display message
   'This page alias is already in use'
   }
   }
}


Andy Matthews
Senior Web Developer

www.dealerskins.com

P Please consider the environment before printing this e-mail.

Total customer satisfaction is my number 1 priority! If you are not
completely satisfied with
the service I have provided, please let me know right away so I can correct
the problem,
or notify my manager Aaron West at aw...@dealerskins.com.






[jQuery] Re: Validation plugin: combine functions with strings on remote error

2009-03-24 Thread Andy Matthews
Okay...
 
Another question. I'm having an odd issue with the message area of the
plugin, specifically with remote methods. When the remove method fires, as
in my original post. The problem is that I want to do some additional error
display when the error fires. Problem is that the message key appears to be
getting triggered whether there's an error fired or not.
 
For example, I'm checking to see if a key exists in the database. If it
does, the message should be displayed, AND  the fom field containing the key
should have it's background color changed. The problem is that the
background color changes whether the msg is displayed or not. Is this a bug,
or intended behaviour? 
 
Here's my code to this point.
 
messages: {
pagealias: {
required: 'Page alias is required',
remote: function(){
// also highlight the field containing the error
$field.pulse({
backgroundColors: ['#fff','#ea7f1e']
}).bind('focus', function(){
$(this).recover();
});
return 'This page alias is already in use';
}
}
}
 
 
andy

  _  

From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Jörn Zaefferer
Sent: Monday, March 23, 2009 5:34 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Validation plugin: combine functions with strings on
remote error


Passing a function as a message happens all the time when using
$.format(... {0}) as messages. The function is expected to return the
formated message, so you can just return the string value you want to
display at the end of your function.

Jörn


On Mon, Mar 23, 2009 at 10:39 PM, Andy Matthews amatth...@dealerskins.com
wrote:



I'm using the validation plugin to validate a field remotely. The validation
portion works great, but I've got a question about the error message if the
validation fails.

I discovered that you can pass a function rather than a plain string as seen
below in the remote key. The problem is that when I do this, I lose the
ability to display a string of my choosing. Does anyone know how to
accomplish both?

messages: {
   pagealias: {
   required: 'Page alias is required',
   remote: function(){
   // highlight the field
   $field.pulse();
   // display message
   'This page alias is already in use'
   }
   }
}


Andy Matthews
Senior Web Developer

www.dealerskins.com

P Please consider the environment before printing this e-mail.

Total customer satisfaction is my number 1 priority! If you are not
completely satisfied with
the service I have provided, please let me know right away so I can correct
the problem,
or notify my manager Aaron West at aw...@dealerskins.com.






[jQuery] Re: Validation plugin: combine functions with strings on remote error

2009-03-24 Thread Andy Matthews

Man, you thought of everything. Thank you. 

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Jörn Zaefferer
Sent: Tuesday, March 24, 2009 10:42 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Validation plugin: combine functions with strings on
remote error


You shouldn't then use the message-callback for this functionality.
Take a look at the highlight-option instead.

Jörn

On Tue, Mar 24, 2009 at 3:35 PM, Andy Matthews li...@commadelimited.com
wrote:
 Okay...

 Another question. I'm having an odd issue with the message area of the 
 plugin, specifically with remote methods. When the remove method 
 fires, as in my original post. The problem is that I want to do some 
 additional error display when the error fires. Problem is that the 
 message key appears to be getting triggered whether there's an error fired
or not.

 For example, I'm checking to see if a key exists in the database. If 
 it does, the message should be displayed, AND  the fom field 
 containing the key should have it's background color changed. The 
 problem is that the background color changes whether the msg is 
 displayed or not. Is this a bug, or intended behaviour?

 Here's my code to this point.

 messages: {
     pagealias: {
     required: 'Page alias is required',
     remote: function(){
     // also highlight the field containing the error
     $field.pulse({
     backgroundColors: ['#fff','#ea7f1e']
     }).bind('focus', function(){
     $(this).recover();
     });
     return 'This page alias is already in use';
     }
     }
 }


 andy
 
 From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] 
 On Behalf Of Jörn Zaefferer
 Sent: Monday, March 23, 2009 5:34 PM
 To: jquery-en@googlegroups.com
 Subject: [jQuery] Re: Validation plugin: combine functions with 
 strings on remote error

 Passing a function as a message happens all the time when using 
 $.format(... {0}) as messages. The function is expected to return 
 the formated message, so you can just return the string value you want 
 to display at the end of your function.

 Jörn

 On Mon, Mar 23, 2009 at 10:39 PM, Andy Matthews 
 amatth...@dealerskins.com
 wrote:

 I'm using the validation plugin to validate a field remotely. The 
 validation portion works great, but I've got a question about the 
 error message if the validation fails.

 I discovered that you can pass a function rather than a plain string 
 as seen below in the remote key. The problem is that when I do this, 
 I lose the ability to display a string of my choosing. Does anyone 
 know how to accomplish both?

 messages: {
        pagealias: {
                required: 'Page alias is required',
                remote: function(){
                        // highlight the field
                        $field.pulse();
                        // display message
                        'This page alias is already in use'
                }
        }
 }


 Andy Matthews
 Senior Web Developer

 www.dealerskins.com

 P Please consider the environment before printing this e-mail.

 Total customer satisfaction is my number 1 priority! If you are not 
 completely satisfied with the service I have provided, please let me 
 know right away so I can correct the problem, or notify my manager 
 Aaron West at aw...@dealerskins.com.







[jQuery] Re: Jörn's Tooltip plugin

2009-03-17 Thread Andy Matthews

Noone?

On Mar 16, 8:46 pm, Andy Matthews andyandja...@gmail.com wrote:
 Anyone know if Jörn Zaefferer's Tooltip plugin can be triggered from
 another event or if it's only when hovering over an element?

 For example, I could trigger the tooltip on element a FROM element b
 (or via trigger()).

 I'd like to use it as sort of a poor man's modal window message.


[jQuery] Jörn's Tooltip plugin

2009-03-16 Thread Andy Matthews

Anyone know if Jörn Zaefferer's Tooltip plugin can be triggered from
another event or if it's only when hovering over an element?

For example, I could trigger the tooltip on element a FROM element b
(or via trigger()).

I'd like to use it as sort of a poor man's modal window message.


[jQuery] Re: How to turn a bulleted list into a pseudo select box

2009-03-10 Thread Andy Matthews

No one has input on this? I know I've seen it done somewhere, I just
can't remember where.

On Mar 10, 11:30 am, Andy Matthews amatth...@dealerskins.com
wrote:
 I have a bulleted list that I'd like to convert into a pseudo select box.
 The result would be appear to be a select box, but would merely expand the
 list container and display the list within.

 Does anyone have something like this?

 Andy Matthews
 Senior Web Developer

 www.dealerskins.com

 P Please consider the environment before printing this e-mail.

 Total customer satisfaction is my number 1 priority! If you are not
 completely satisfied with
 the service I have provided, please let me know right away so I can correct
 the problem,
 or notify my manager Aaron West at aw...@dealerskins.com.

  winmail.dat
 97KViewDownload


  1   2   3   4   5   6   7   8   9   >