[jQuery] Re: something wrong with $.each()

2008-12-16 Thread Serge

Thank you very much Michael, 'doc' is response of $.get() function to
HTML file and I thought it should be DOM :)
Converted this to
var doc = 'test';
doc = $('').append(doc);
and all works great.
Thank you again :)


[jQuery] Re: something wrong with $.each()

2008-12-16 Thread Michael Geary

Your doc variable is a string, not a DOM element or a jQuery object.

Do you actually want to modify a string? You'd use a regular expression for
that, not jQuery.

Or did you mean for doc to be a DOM fragment instead of a string?

-Mike

> From: Serge
> 
> Sorry, cannot find solution, why this code don't modified 
> variable 'doc'
> 
>   var doc = 'test';
>   $('span', doc).each(function() {
>   $(this).text('new value');
>   })
> 
> thank you.



[jQuery] something wrong with $.each()

2008-12-16 Thread Serge

Sorry, cannot find solution, why this code don't modified variable
'doc'


var doc = 'test';
$('span', doc).each(function() {
$(this).text('new value');
})

thank you.


[jQuery] Re: relative positioning spans inside cluetip

2008-12-16 Thread Tim

oops.  i need to put leftL xxxpt.  forgot the pt.  it always helps to
post.  seems that as soon as i do, i find the answer myself.


[jQuery] Re: my test passes the first time, but fails the second time

2008-12-16 Thread Dave Methvin

I think this code does what you want. Instead of trying to if/then all
the cases, you can let jQuery's chaining take care of a lot of it.

$(document).ready(function() {
var $phrases = $("#phrases").find("li");
function rephrase(dir) {
  var pos = $phrases.index($phrases.filter(".current_phrase"));
  pos = Math.min($phrases.length-1, Math.max(0, pos + dir));
  $phrases.removeClass("prev_phrase current_phrase next_phrase");
  $phrases.eq(pos-1).addClass("prev_phrase");
  $phrases.eq(pos  ).addClass("current_phrase");
  $phrases.eq(pos+1).addClass("next_phrase");
}
$("#phraseNext").click(function(){ rephrase(+1) });
$("#phrasePrev").click(function(){ rephrase(-1) });
});

The other way to do it would be via a plugin, which is what you did
originally. However, I would make the phrase list the target of the
plugin and initialize it in the ready handler. Then have the plugin
respond to "moveNext" and "movePrev" events that the buttons would
fire.


[jQuery] relative positioning spans inside cluetip

2008-12-16 Thread Tim

i'm using inline styles to position some s inside the cluetip.
using an ajax loaded cluetip.  they are ignoring the positioning css.
however, when i open the page directly in my browser, everything is
properly positioned.  fyi, i put some color to the text using css just
to see if inline styles were ok in cluetip.  the color works fine.
here's some of the code:




Time (hrs)



4pm
5pm
6pm
7pm
8pm
9pm
10pm






[jQuery] Re: Advance Cycle synchronize image thumnail pager

2008-12-16 Thread Chian

How can I use  'prevNextClick'  callback to be able to set the
'pageAnchorBuilder'  to enable highlight in the next batch item.
I cant see the possibility to pass the 'pageAnchorBuilder' to the
first item next batch.


Plan A:  I group this to be able to control the batch item. But I'm
having a problem on creating an pagerAnchorBuilder that will
highlights the first item in the next batch.





Image Thumnail 1
Image Thumnail 2
Image Thumnail 3
Image Thumnail 4
Image Thumnail 5



Image Thumnail 6 
Image Thumnail 7
Image Thumnail 8
Image Thumnail 9
Image Thumnail 10






Plan B: I'm trying to create a list that will display the entire list
but I'm can't able to display the top five in a list and I cant
formulate logic using cycle.





Image Thumnail 1
Image Thumnail 2
Image Thumnail 3
Image Thumnail 4
Image Thumnail 5

Image Thumnail 6 
Image Thumnail 7
Image Thumnail 8
Image Thumnail 9
Image Thumnail 10




Which plan has a great possibility to achieve the goal?

Thanks,
Chian




On Dec 16, 8:10 pm, Mike Alsup  wrote:
> > I was trying to create an advance thumbnail pager with synchronize
> > transition with content slide show.
>
> > Objectives:
>
> > a.    When the next ( >) is pressed, it should highlight the next
> > (first) item in the next batch in the pager and show the content slide
> > show.
> > b.    When the previous (<) is pressed, it should highlight the
> > previous (last) item of the previous batch and the content slide show.
> > c.    When an item is clicked, it should highlight that item and show
> > the content slide show
> > d.    If the pager is in the last batch, it should disabled the next
> > button.
> > e.    If the pager is in the first batch, it should disabled the
> > previous button.
> > f.     Implement a Next/Previous control per item – also controls the
> > thumbnail pager.
>
> > Do you think is it possible in cycle plugin?
>
> > The cycle plugin is really cool. I hope it is possible.
>
> > Thanks in advance :)
>
> Cycle gives you all the callback options you need to achieve this.
> But it's up to you to add the specialized logic.  The 'prevNextClick'
> callback can be used to trap the prev/next clicks and the 'pagerClick'
> callback can be used to trap pager clicks.
>
> $('#slideshow').cycle({
>     prev: '#prev',
>     next: '#next',
>     // other options ...
>
>     prevNextClick: function(isNext, zeroBasedSlideIndex,
> slideElement)) {
>     },
>     pagerClick: function(zeroBasedSlideIndex, slideElement) {
>     }
>
> });


[jQuery] Superfish: post the license, please

2008-12-16 Thread Brian

Joel Birch,

Would you please state the license(s) for Superfish on the jQuery page
(the page with the stars indicating the voters' rating of the plug-
in)? This would put it in an easily accessible location and it would
be present for every new release.

thanks,
Brian


[jQuery] Re: libraries

2008-12-16 Thread Ricardo Tomasi

Ah now I see what you mean.

You can download the extensions for Dreamweaver or IntelliSense at
http://xtnd.us/dreamweaver/jquery
http://www.mustafaozcan.net/en/post/2008/06/15/JQuery-1-2-6-Intellisense-for-Visual-Studio-2008.aspx

But I think it's more productive to rewrite it from scratch in your
own format. The Intellisense code is embedded in the comments of the
script itself, you'd have to create a parser for that.

On Dec 16, 8:09 pm, "Dirceu Barquette" 
wrote:
> OK. CSV isn't required...
> All the IDE has {css,tagHtml}attrs or jQuery{attr,methods} auto-complete
> cappable . If I have these lists, auto-completing is easy... isn't it?
> Thanks
> Dirceu Barquette
>
> 2008/12/16 Ricardo Tomasi 
>
>
>
> > Hmm.. what do you mean? all of these are plain text, I guess you meant
> > something other than 'file format' (and csv has nothing to do with CSS
> > by the way, more than the rest is unrelated!) :]
>
> > On Dec 16, 5:22 pm, "Dirceu Barquette" 
> > wrote:
> > > Hi,
>
> > > I'd like to know, please:
> > > There is  {HTML,CSS,jQuery}library in [xml,csv,json]file format?
> > > The goal is an IDE...
>
> > > Thanks.
>
> > > Dirceu Barquette


[jQuery] Re: jQuery.data() identifier not working

2008-12-16 Thread Ricardo Tomasi

Yes, I understood that. That's why I said you can keep an unique ID
somewhere else, because the one created by data() can't be used:

//create an unique ID
var generateID = function(){
   var uid = 0;
   return function(){ return uid++ };
}

//save it somewhere
$('img').data('id',id)
or
$('img').attr('id','img'+id) //or in a custom attribute

Or instead, just make sure you are keeping at least one data pair per
element, like an empty placeholder.

And doh, now I realize that the code snippet is from jQuery itself :/

cheers,
- ricardo

On Dec 16, 7:35 pm, ricardoe  wrote:
> Hi Ricardo
>
> Yeah, its a DOM element to be more specific I'm working with a lot of
> IMG elements.
> I need to identify them uniquely, (because sometimes the image is
> repeated, but I need to manage them as different objects), so when I
> read the documentation for jQuery.data() I (maybe mis-)understand that
> it will create a Unique id for an element, and its sort of true BUT
> don't you dare to use removeData() for that element because if you
> remove all the data attached with jQuery(elem).data('key','value') you
> will get rid of the unique-id for the element too. Does that make
> sense?
>
> On 16 dic, 10:33, Ricardo Tomasi  wrote:
>
> > You can keep your own unique identifier anywhere you want, for data()
> > the identifier is the element itself. If you care to explain a bit
> > more of what you're trying to achieve someone might come up with an
> > useful suggestion. What did 'elem' refer to in your original script
> > for example? A DOM element?
>
> > - ricardo
>
> > On Dec 16, 6:46 am, ricardoe  wrote:
>
> > > Well, solved issue:
>
> > > Don't trust jQuery.data(element) if you're pretending to use gQuery
> > > (element).data('only-data-element','something')
> > > When you use gQuery(element).removeData('only-data-element') the
> > > jQuery.cache for that element will be deleted.
> > > This leads that when you do again jQuery.data(element) you WONT have
> > > the expected ID, it will create a new one.
>
> > > Why?! I dunno. But I'll not file a ticket cause "most of people
> > > doesn't use it that way".. lame.
>
> > > On Dec 16, 1:39 am, ricardoe  wrote:
>
> > > > Hi,
>
> > > > Does anyone knows why this:
>
> > > >     var id = elem[ expando ];
> > > >     // Compute a unique ID for the element
> > > >     if ( !id ) {
> > > >         id = elem[expando] = ++uuid;
> > > >     }
>
> > > > Could be being broken? I mean, on a test page I made the elem[expando]
> > > > property is not being "saved".
> > > > I'll explain, the first time I do jQuery.data(element) I get a number
> > > > lets say: 10.
> > > > Then if I do again the same (with the exactly same element) I get: 14.
>
> > > > I'm using this to identify elements so its not working as expected,
> > > > anyone have theories about this?


[jQuery] jqModal + validate + blockui plugins

2008-12-16 Thread Bhavin

Hi,

I am trying to implement validate plugin in jqModal. I tried validate
() method in onshow, onload method but it is not working. Can anyone
confirm whether it is supporting?

I tried blockui plugin to show "Please wait..." message on jqmodal
when form is submitted but its not working properly...Is this the
correct approach to show the message ?

Thanks,
Bhavin



[jQuery] Re: serialScroll and jCarousel lite

2008-12-16 Thread IsRaz88

Does anyone have any idea?

-IsRaz88

On Dec 15, 5:51 pm, IsRaz88  wrote:
> Hey, I was wondering if anyone knows how I could implement
> serialScroll with jCarousel lite to get a constant scrolling function
> instead of scroll then pause.
>
> Any help is appreciated. Thanks.
>
> -IsRaz88


[jQuery] Re: What am I doing wrong here -- htmlTo?

2008-12-16 Thread Kean

Ken, I wanted to play by your rules BUT agreed with Brian on using CSS
instead of 

On Dec 16, 5:18 pm, brian  wrote:
> On Tue, Dec 16, 2008 at 5:50 PM, ken  wrote:
> > I am trying to do the following:
>
> > 1) create an IMG
> > 2) assign an SRC to the IMG
> > 3) wrap the IMG in 's
> > 4) insert the resultant HTML into #foo
>
> > I have been hammering at this for awhile now, and am having problems; I've
> > tried using wrap and some of the other content-manipulation methods, but I
> > still can't get the implementation down to something short and sweet
> > (referencing jQuery only once). This is the best I've got so far:
>
> >     var html = jQuery( '' )
> >         .find( 'img' ).attr( 'src', 'image.gif' ).end();
>
> >     jQuery( '#foo' ).html( html );
>
> Do you want to replace the contens of #foo or just insert the img?
>
> $('')
>         .attr('src', 'loading.gif')
>         .appendTo('#foo');
>
> Forget the BRs and use CSS.


[jQuery] Re: What am I doing wrong here -- htmlTo?

2008-12-16 Thread brian

On Tue, Dec 16, 2008 at 5:50 PM, ken  wrote:
> I am trying to do the following:
>
> 1) create an IMG
> 2) assign an SRC to the IMG
> 3) wrap the IMG in 's
> 4) insert the resultant HTML into #foo
>
> I have been hammering at this for awhile now, and am having problems; I've
> tried using wrap and some of the other content-manipulation methods, but I
> still can't get the implementation down to something short and sweet
> (referencing jQuery only once). This is the best I've got so far:
>
> var html = jQuery( '' )
> .find( 'img' ).attr( 'src', 'image.gif' ).end();
>
> jQuery( '#foo' ).html( html );
>

Do you want to replace the contens of #foo or just insert the img?

$('')
.attr('src', 'loading.gif')
.appendTo('#foo');

Forget the BRs and use CSS.


[jQuery] Re: What am I doing wrong here -- htmlTo?

2008-12-16 Thread Kean

var foo = $("#foo");
foo.html('').find('img').attr("src","asdf.gif");

Tested and working.

find( 'img' ) works for me.

On Dec 16, 3:12 pm, ken  wrote:
> Scratch my "working" example -- the .find( 'img' ) evidently can't find the
> image
>
> On Tue, Dec 16, 2008 at 4:50 PM, ken  wrote:
> > I am trying to do the following:
>
> > 1) create an IMG
> > 2) assign an SRC to the IMG
> > 3) wrap the IMG in 's
> > 4) insert the resultant HTML into #foo
>
> > I have been hammering at this for awhile now, and am having problems; I've
> > tried using wrap and some of the other content-manipulation methods, but I
> > still can't get the implementation down to something short and sweet
> > (referencing jQuery only once). This is the best I've got so far:
>
> >     var html = jQuery( '' )
> >         .find( 'img' ).attr( 'src', 'image.gif' ).end();
>
> >     jQuery( '#foo' ).html( html );
>
> > I realize that I could use the literal expression in place of the "html"
> > variable, but that's no better IMO.
>
> > What I originally started out doing, was something like this:
>
> >     jQuery( '' ).attr( 'src', 'image.gif' ).wrap( ''
> > ).replaceAll( '#foo' );
>
> > But, replaceAll removes the node (I only want to change its contents).
>
> > What I've noticed, is that the jQuery API provides alternative forms of 3
> > methods (that I don't see used very often): append, prepend, and replace.
> > These 3 support both of the followng forms, and I believe they are 100%
> > interchangeable:
>
> >     jQuery( selector ).method( html );
> >     jQuery( html ).methodTo( selector );
>
> > However, .html(), which is arguably more popular, only has the 1st form,
> > but not the second. Is there an alternative form for html() that I'm
> > missing, or is this a hole in the API that apparently isn't wanted?
>
> > Thanks in advance!


[jQuery] Re: [OT] Client side web application with jQuery

2008-12-16 Thread brian

On Tue, Dec 16, 2008 at 5:59 PM, Leandro Ardissone  wrote:
>
> Hi,
>
> I'm need to implement a website (intranet) that runs everything on the
> client side communicating to the server via RESTful requests. I'm
> using jQuery but my big issue at the moment is how to manage the
> login.
>
> I'm not sure which is the best method to login the user securely from
> javascript. We're using REST for the site requests and HTTP Auth for
> the authentication at the moment, but I don't want to use that ugly
> browser login.
>
> I want to manage everything from the client side using javascript. But
> since javascript is viewable by the users I think that probably could
> be dangerous.
>
> What are your suggestions? Is there a jQuery plugin for http-Auth? Or
> maybe I should use other method?
>

What do you mean, "dangerous"? You're not considering doing the
authentication with JS, are you?

Just send the username & password to a script on the server, as you
normally would. If you're stuck with using Basic Authentication but
want a custom login page, google for something like, "htpasswd +php
+custom". The one's that generate a 401 header are not what you're
looking for, as tat's what forces the client to show its login prompt.

You'll also need to wade through all the htpasswd generator scripts.
But, I know it's possible to do what you want. Essentially, you need
to open the htpasswd file and compare the hashed password with the
contents.

Once you have a regular login working, you can upgrade it to use an ajax submit.

But, be warned: stuff like this shouldn't be done without really
understanding what's going on.


[jQuery] Re: Cluetip speed question

2008-12-16 Thread David Morton
On Tue, Dec 16, 2008 at 6:26 PM, Michael Geary  wrote:

>
> alert( 'Selector: ' + (t2-t1) + ', cluetip(): ' + (t3-t2) );
>

That came out to: 177, 3387 for 1708 tips, so cluetip certainly has a huge
chunk of it.


>  Maybe you could use this code as a start for a custom tooltip plugin?
>

I'm not sure if my javascript magic is up to it - that's why I rely on
JQuery after all. :)



-- 
David Morton
morto...@gmail.com  - bulk address
morto...@dgrmm.net - direct to my server


[jQuery] Re: How to create a div by click + drag

2008-12-16 Thread Kean

Hi Nejo31,

I am too lazy to code, so I will mainly pseudo code.

var initx;
var inity;
var resize = function(e){
created.height(e.pageY - initY);
created.width(e.pageY - initY);
  };

$("calendar container id").mousedown(function(e){
  $("body").append('');
  initx = e.pageX;
  inity = e.pageY;
  var created = $("#created");

  created.css({
position: 'absolute',
top:initY,
left: initX
  });

  $("#created").bind("mousemove", resize);
});

$("calendar container id").mouseup(function(e){
  $("#created").unbind("mousemove", resize);
});

Many work has to be done to get it right, but here's the basic idea.

On Dec 16, 3:01 pm, Nejo31  wrote:
> Hi,
>
> i have a question on what function to use to create a funciton to
> create a div by clicking somewhere on the parrent div and dragging
> down to determine the div size.
>
> To give you a better idea of what i mean here is a link of the DHTML
> week planner demo.
>
> http://www.dhtmlgoodies.com/scripts/dhtmlgoodies-week-planner/dhtmlgo...
>
> You will see that you can create a new event in the planner by
> clicking anywhere and dragging your mouse down. I am working on a
> simmilar project and any on this subject help would be greatly
> appreciated.
>
> Thanks.
>
> N.


[jQuery] Re: Slide Toggle - Bug in Firefox?

2008-12-16 Thread Kean

An example page will be helpful. You might want to see if you have set
wmode="transparent" in your flash first.

On Dec 16, 12:08 pm, "theoga...@googlemail.com"
 wrote:
> Hello all,
>
> This is my first post here but I have been trying to solve this
> problem for a while now and I hope I can do it here.I also I posted to
> the right mailing list
>
> 1) JQuery Effect: Slide Toggle
>
> 2) Script URL:http://docs.jquery.com/Effects/slideToggle
>
> 3) Problem:
>
> I am trying to hide an swf (Flash object) in a div. When a hyperlink
> is pressed the div will slide down and show the swf. However, when
> sliding down, the div slides but the Flash Object just appears
> straight away whilst the div is sliding down! The same for the sliding
> up. It disappears quickly and while the div is still sliding up! This
> ONLY happens in Firefox! In IE it works fine!
>
> How can I remedy this?! Please help
>
> Thanks all


[jQuery] Re: New topic

2008-12-16 Thread brian

On Tue, Dec 16, 2008 at 2:33 PM, GoJakie  wrote:
>
> Dear Friends,
>
> I had posted a new topic half an hour ago which is not showing up???
> any ideas?
>

The one about sorting PHP tables? It's there. I've noticed that gMail
doesn't include one's own posts to the list in the INBOX. You won't
see it until someone replies.

If you ever want to reply to your own post (ie. because you solved
your own issue) before it shows up for yourself, go to your "sent
Mail" display an respond to it there. It'll be sent to the list as a
reply.


[jQuery] Re: Cluetip speed question

2008-12-16 Thread Michael Geary
The $('.HelpTipAnchor') is certainly time-consuming, but after that's done,
the cluetip plugin still has to loop over all those elements and set up a
lot of stuff. My guess is that the latter is where most of the time is
going.
 
It's easy enough to find out which: simply split apart the selector and the
.cluetip call:
 
var t1 = +new Date;
var $anchors = $('.HelpTipAnchor');
var t2 = +new Date;
$anchors.cluetip(...);
var t3 = +new Date;
alert( 'Selector: ' + (t2-t1) + ', cluetip(): ' + (t3-t2) );
 
Of course, knowing this result doesn't solve the problem, and with 400-500
items it's going to be slow regardless.
 
The real solution for this is event delegation. This would completely
eliminate the overhead of setting up so many elements.
 
Unfortunately, cluetip does not support event delegation. But Karl wrote
some quick and dirty tooltip code that does support event delegation and
would be very fast:
 
http://osdir.com/answers/javascript/2618-jquery-optimizing-easiest-tooltip.h
tml#2
 
Maybe you could use this code as a start for a custom tooltip plugin?
 
-Mike



  _  

From: David Morton

I am trying to use Cluetip to make a help text for what can be a large list
- and I'm hearing reports that a list of 100 items with 4-5 columns each is
causeing IE7 to slow down or appear to freeze for a while, and commenting
out the cluetip invocation clears it up.   I'm assuming it's jsut due to
poor javascript speed as it loops over all the DOM to activate all the
required DOM elements.

Right now, I'm invoking them all with one command that uses a class to pick
them up:

$('.HelpTipAnchor').cluetip({local:true, cluezIndex: 105, showTitle:
false,cluetipClass: 'maia', arrows: true, localPrefix: "#cluetip_",
attribute: "id"});

Is it the $('.class') part that's slow, as I suspect?  Is there anything I
can do to speed it up?

-- 
David Morton
morto...@gmail.com  - bulk address
morto...@dgrmm.net - direct to my server




[jQuery] Re: Cluetip speed question

2008-12-16 Thread Kean

You most probably guess right on the CSS selector speed.

Here's a link to read on CSS selector optimization.
http://www.thegrubbsian.com/2008/10/optimize-jquery-selector-performance.html

On Dec 16, 2:17 pm, "David Morton"  wrote:
> I am trying to use Cluetip to make a help text for what can be a large list
> - and I'm hearing reports that a list of 100 items with 4-5 columns each is
> causeing IE7 to slow down or appear to freeze for a while, and commenting
> out the cluetip invocation clears it up.   I'm assuming it's jsut due to
> poor javascript speed as it loops over all the DOM to activate all the
> required DOM elements.
>
> Right now, I'm invoking them all with one command that uses a class to pick
> them up:
>
> $('.HelpTipAnchor').cluetip({local:true, cluezIndex: 105, showTitle:
> false,cluetipClass: 'maia', arrows: true, localPrefix: "#cluetip_",
> attribute: "id"});
>
> Is it the $('.class') part that's slow, as I suspect?  Is there anything I
> can do to speed it up?
>
> --
> David Morton
> morto...@gmail.com  - bulk address
> morto...@dgrmm.net - direct to my server


[jQuery] Re: Google Analytics breaks jQuery.

2008-12-16 Thread Kean

$("a").click(function(){
  do something

  // return false, this is jQuery's way of preventing default or
bubbling
  return false;
});

Hope this helps

On Dec 16, 11:51 am, simshaun  wrote:
> I have a page where I am using jQuery's load function to inject HTML
> into a div container.
>
> Right underneath the opening body tag, I've written a script that
> binds an onClick event to all  tags.
> The event fires e.preventDefault(), reads the href attribute, and
> loads that href into a div container.
>
> At the bottom of the page, I've placed Google Analytics tracking code.
>
> Instead of loading the link's href into the div container, FireFox
> actually tries to load the link as if I never used e.preventDefault().
>
> IE seems to work OK though, (or handles it inappropriately and seems
> to work fine.)
>
> The pages that are supposed to be loaded into the DIV container have
> Google Analytics code as well.
> Once I removed the Analytics code from those pages, everything works
> fine.
>
> Why does having Google Analytics on pages loaded via the load function
> cause everything to break?


[jQuery] Google Analytics breaks jQuery.

2008-12-16 Thread simshaun

I have a page where I am using jQuery's load function to inject HTML
into a div container.

Right underneath the opening body tag, I've written a script that
binds an onClick event to all  tags.
The event fires e.preventDefault(), reads the href attribute, and
loads that href into a div container.

At the bottom of the page, I've placed Google Analytics tracking code.

Instead of loading the link's href into the div container, FireFox
actually tries to load the link as if I never used e.preventDefault().

IE seems to work OK though, (or handles it inappropriately and seems
to work fine.)

The pages that are supposed to be loaded into the DIV container have
Google Analytics code as well.
Once I removed the Analytics code from those pages, everything works
fine.

Why does having Google Analytics on pages loaded via the load function
cause everything to break?


[jQuery] New topic

2008-12-16 Thread GoJakie

Dear Friends,

I had posted a new topic half an hour ago which is not showing up???
any ideas?

thanx


[jQuery] Cluetip speed question

2008-12-16 Thread David Morton
I am trying to use Cluetip to make a help text for what can be a large list
- and I'm hearing reports that a list of 100 items with 4-5 columns each is
causeing IE7 to slow down or appear to freeze for a while, and commenting
out the cluetip invocation clears it up.   I'm assuming it's jsut due to
poor javascript speed as it loops over all the DOM to activate all the
required DOM elements.

Right now, I'm invoking them all with one command that uses a class to pick
them up:

$('.HelpTipAnchor').cluetip({local:true, cluezIndex: 105, showTitle:
false,cluetipClass: 'maia', arrows: true, localPrefix: "#cluetip_",
attribute: "id"});

Is it the $('.class') part that's slow, as I suspect?  Is there anything I
can do to speed it up?

-- 
David Morton
morto...@gmail.com  - bulk address
morto...@dgrmm.net - direct to my server


[jQuery] Slide Toggle - Bug in Firefox?

2008-12-16 Thread theoga...@googlemail.com

Hello all,

This is my first post here but I have been trying to solve this
problem for a while now and I hope I can do it here.I also I posted to
the right mailing list

1) JQuery Effect: Slide Toggle

2) Script URL: http://docs.jquery.com/Effects/slideToggle

3) Problem:

I am trying to hide an swf (Flash object) in a div. When a hyperlink
is pressed the div will slide down and show the swf. However, when
sliding down, the div slides but the Flash Object just appears
straight away whilst the div is sliding down! The same for the sliding
up. It disappears quickly and while the div is still sliding up! This
ONLY happens in Firefox! In IE it works fine!

How can I remedy this?! Please help

Thanks all


[jQuery] How to create a div by click + drag

2008-12-16 Thread Nejo31

Hi,

i have a question on what function to use to create a funciton to
create a div by clicking somewhere on the parrent div and dragging
down to determine the div size.

To give you a better idea of what i mean here is a link of the DHTML
week planner demo.

http://www.dhtmlgoodies.com/scripts/dhtmlgoodies-week-planner/dhtmlgoodies-week-planner.html

You will see that you can create a new event in the planner by
clicking anywhere and dragging your mouse down. I am working on a
simmilar project and any on this subject help would be greatly
appreciated.

Thanks.

N.


[jQuery] Sorting php tables

2008-12-16 Thread GoJakie

Dear friends,

I am not really sure whether this is the right place to post my topic.

I have a php page which I found somewhere on the Internet which uses
TableSort revisited v3.8 by frequency-decoder.com tablesort.js to sort
table data.

I have got hold of another php page which runs fine but it does not
have headers. I am wondering how to put headers and how to sort the
table. Can somebody help me or tell me where can I get help from.

Here is the code:

http://in.finance.yahoo.com/d/quotes.csv?s=".implode("+",
$arr)."&f="."sl1c1p2ohgpvjk";

echo "";
$handle = fopen($url, "r");
while (($data = fgetcsv($handle, 1000, ",")) !== FALSE)
{
echo "";
foreach($data as $d)
echo "$d";
echo "";
}
fclose($handle);
echo "";

?>

Thank you


[jQuery] Re: Access Elements Rendered in a Thickbox

2008-12-16 Thread simshaun

I can't directly answer your question, but the reason that adding the
event listener to the hidden button on document ready does not work is
this (or at least this is what the library I was working with did):

When the Thickbox loads, it does not "directly" reference the
container it's loading.  It takes the HTML from the container and
basically cut/pastes it (document -> thickbox).
When you close the Thickbox it cut/pastes in the other direction
(thickbox -> document).

By doing so, its eliminating any events you're adding to the elements
initially.

I can't remember if you can even access the elements using the
standard $('element'). syntax once they are inside Thickbox.
If not, you could use the livequery plugin (http://docs.jquery.com/
Plugins/livequery).


[jQuery] Re: What am I doing wrong here -- htmlTo?

2008-12-16 Thread ken
Scratch my "working" example -- the .find( 'img' ) evidently can't find the
image

On Tue, Dec 16, 2008 at 4:50 PM, ken  wrote:

> I am trying to do the following:
>
> 1) create an IMG
> 2) assign an SRC to the IMG
> 3) wrap the IMG in 's
> 4) insert the resultant HTML into #foo
>
> I have been hammering at this for awhile now, and am having problems; I've
> tried using wrap and some of the other content-manipulation methods, but I
> still can't get the implementation down to something short and sweet
> (referencing jQuery only once). This is the best I've got so far:
>
> var html = jQuery( '' )
> .find( 'img' ).attr( 'src', 'image.gif' ).end();
>
> jQuery( '#foo' ).html( html );
>
> I realize that I could use the literal expression in place of the "html"
> variable, but that's no better IMO.
>
> What I originally started out doing, was something like this:
>
> jQuery( '' ).attr( 'src', 'image.gif' ).wrap( ''
> ).replaceAll( '#foo' );
>
> But, replaceAll removes the node (I only want to change its contents).
>
> What I've noticed, is that the jQuery API provides alternative forms of 3
> methods (that I don't see used very often): append, prepend, and replace.
> These 3 support both of the followng forms, and I believe they are 100%
> interchangeable:
>
> jQuery( selector ).method( html );
> jQuery( html ).methodTo( selector );
>
> However, .html(), which is arguably more popular, only has the 1st form,
> but not the second. Is there an alternative form for html() that I'm
> missing, or is this a hole in the API that apparently isn't wanted?
>
> Thanks in advance!
>


[jQuery] [OT] Client side web application with jQuery

2008-12-16 Thread Leandro Ardissone

Hi,

I'm need to implement a website (intranet) that runs everything on the
client side communicating to the server via RESTful requests. I'm
using jQuery but my big issue at the moment is how to manage the
login.

I'm not sure which is the best method to login the user securely from
javascript. We're using REST for the site requests and HTTP Auth for
the authentication at the moment, but I don't want to use that ugly
browser login.

I want to manage everything from the client side using javascript. But
since javascript is viewable by the users I think that probably could
be dangerous.

What are your suggestions? Is there a jQuery plugin for http-Auth? Or
maybe I should use other method?


Thanks,
Leandro


[jQuery] Re: Creating an OS Web Interface in jQuery (Part I)

2008-12-16 Thread Rick Faircloth

D'oh!  :o)

> -Original Message-
> From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On 
> Behalf Of Michael Geary
> Sent: Tuesday, December 16, 2008 5:39 PM
> To: jquery-en@googlegroups.com
> Subject: [jQuery] Re: Creating an OS Web Interface in jQuery (Part I)
> 
> 
> Never mind, you beat me to it!
> 
> > From: Michael Geary
> >
> > Excellent point, Rick.
> >
> > But I think there may be a little typo that changed the
> > meaning to something other than what you intended? :-)
> 
> > > From: Rick Faircloth
> > >
> > > No faster way to kill someone's enthusiasm than to simply tear
> > > something down without any encouragement.
> > >
> > > It's like I tell my kids... you can't applaud the effort if not the
> > > performance.  And, if asked, give encouraging criticism.




[jQuery] What am I doing wrong here -- htmlTo?

2008-12-16 Thread ken
I am trying to do the following:

1) create an IMG
2) assign an SRC to the IMG
3) wrap the IMG in 's
4) insert the resultant HTML into #foo

I have been hammering at this for awhile now, and am having problems; I've
tried using wrap and some of the other content-manipulation methods, but I
still can't get the implementation down to something short and sweet
(referencing jQuery only once). This is the best I've got so far:

var html = jQuery( '' )
.find( 'img' ).attr( 'src', 'image.gif' ).end();

jQuery( '#foo' ).html( html );

I realize that I could use the literal expression in place of the "html"
variable, but that's no better IMO.

What I originally started out doing, was something like this:

jQuery( '' ).attr( 'src', 'image.gif' ).wrap( ''
).replaceAll( '#foo' );

But, replaceAll removes the node (I only want to change its contents).

What I've noticed, is that the jQuery API provides alternative forms of 3
methods (that I don't see used very often): append, prepend, and replace.
These 3 support both of the followng forms, and I believe they are 100%
interchangeable:

jQuery( selector ).method( html );
jQuery( html ).methodTo( selector );

However, .html(), which is arguably more popular, only has the 1st form, but
not the second. Is there an alternative form for html() that I'm missing, or
is this a hole in the API that apparently isn't wanted?

Thanks in advance!


[jQuery] Re: Creating an OS Web Interface in jQuery (Part I)

2008-12-16 Thread Michael Geary

Never mind, you beat me to it! 

> From: Michael Geary
> 
> Excellent point, Rick.
> 
> But I think there may be a little typo that changed the 
> meaning to something other than what you intended? :-)

> > From: Rick Faircloth
> > 
> > No faster way to kill someone's enthusiasm than to simply tear 
> > something down without any encouragement.
> > 
> > It's like I tell my kids... you can't applaud the effort if not the 
> > performance.  And, if asked, give encouraging criticism.



[jQuery] Re: Creating an OS Web Interface in jQuery (Part I)

2008-12-16 Thread donb

Maybe it's Obvious. Sorta. (OS).

On Dec 16, 2:53 pm, "Rick Faircloth"  wrote:
> Just take it on face value... did you even look at it?
> It's obviously an operating system interface.  And, yes,
> this is Part 1 of a series, he stated.  You don't have to
> know everything right away to appreciate what's already been done!
>
> Rick
>
>
>
> > -Original Message-
> > From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On 
> > Behalf Of donb
> > Sent: Tuesday, December 16, 2008 2:22 PM
> > To: jQuery (English)
> > Subject: [jQuery] Re: Creating an OS Web Interface in jQuery (Part I)
>
> > I may seem a bit dense, but what's the objective here?  And is 'OS'
> > Operating System, Open Source, something else?  Maybe Part 2 clears
> > all this up, but some intro/background would help a lot.
>
> > On Dec 16, 7:57 am, AdrianMG  wrote:
> > > Finally here you have the First Part of this series of tutorials to
> > > recreate an OS Web Interface with our lovely jQuery javascript
> > > library.
>
> > > Here you have the link guys, I hope you can use it for your personal
> > > projects:
>
> > >http://yensdesign.com/2008/12/creating-an-os-web-interface-in-jquery-...- 
> > >Hide quoted text -
>
> - Show quoted text -


[jQuery] Re: Creating an OS Web Interface in jQuery (Part I)

2008-12-16 Thread Michael Geary

Excellent point, Rick.

But I think there may be a little typo that changed the meaning to something
other than what you intended? :-)

-Mike

> From: Rick Faircloth
> 
> No faster way to kill someone's enthusiasm than to simply 
> tear something down without any encouragement.
> 
> It's like I tell my kids... you can't applaud the effort if 
> not the performance.  And, if asked, give encouraging criticism.



[jQuery] Re: Creating an OS Web Interface in jQuery (Part I)

2008-12-16 Thread Rick Faircloth

Or, rather...you *can* applaud the effort if not always the performance.


> -Original Message-
> From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On 
> Behalf Of Rick Faircloth
> Sent: Tuesday, December 16, 2008 4:58 PM
> To: jquery-en@googlegroups.com
> Subject: [jQuery] Re: Creating an OS Web Interface in jQuery (Part I)
> 
> 
> Hi, Ricardo...
> 
> I haven't complained about anyone's criticism of the "tutorial" aspect
> of what has been presented...it's the "what-good-is-this" mentality
> concerning what Adrian had created that I thought was in poor taste.
> 
> My mention of tutorials was to remind everyone that this was obviously
> the first steps for someone working on a project.
> 
> No faster way to kill someone's enthusiasm than to simply tear something
> down without any encouragement.
> 
> It's like I tell my kids... you can't applaud the effort if not the
> performance.  And, if asked, give encouraging criticism.
> 
> Rick
> 
> > -Original Message-
> > From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On 
> > Behalf Of Ricardo Tomasi
> > Sent: Tuesday, December 16, 2008 3:29 PM
> > To: jQuery (English)
> > Subject: [jQuery] Re: Creating an OS Web Interface in jQuery (Part I)
> >
> >
> > I have to agree with Alexandre. It's a nice demonstration of skill,
> > but pasting hundreds of lines of code in boxes is not exactly
> > 'teaching'. I bet most beginners would get lost pretty quickly with
> > the code and end up just copy/pasting it. And for intermediate/
> > advanced JS programmers this isn't very useful, as it is just a
> > background with some drag & drop funcionality.
> >
> > Before you say that "it's just the start" I'll have to point out that,
> > despite it's simplicity, there are already many flaws:
> > - the text below the icons is selectable (and gets selected on double
> > click)
> > - same goes for 'start' and the clock
> > - cursor for dragging is a 'text selection' cursor
> > - with just a little fiddling with the icons you'll get unrequested
> > copies of them sitting around from failed drag&drop operations
> > - you can drag icons off screen and lose them forever
> > - icons can overlap and have an arbitrary z-index which you can't
> > control or reorganize
> >
> > This is just *so* far from something functional and useful that the
> > "tutorial" title can be considered misleading.
> >
> > However it's a very nice demonstration of how jQuery makes it very
> > easy to mock up something that looks and reacts (at first look) pretty
> > much like an OS GUI.
> >
> > Sorry if I'm being harsh, but everyone is entitled to an opinion :]
> >
> > - ricardo
> >
> > On Dec 16, 6:05 pm, "Alexandre Plennevaux" 
> > wrote:
> > > Rick, I read the tutorial in its entirety before commenting. This
> > > document lacks structure and not only that, I could have pointed the
> > > many english mistakes, because obviously this was written quite fast,
> > > and i'm sure with a little more care and some more mindset framing, it
> > > should be perfect. I don't know what you consider a tutorial, but as
> > > for me, a tutorial means something meant to teach. In this document,
> > > adam shows obvious skills, but does not teach, hence i'd call this a
> > > demo.
> > > I meant to be constructive because he shows a lot of enthusiasm and
> > > that's his strength. But telling him this "tutorial" is perfect won't
> > > help him improve, nor the jquery community as a whole.
> > >
> > > hope this helps clarify my comments.
> > >
> > > Best,
> > >
> > > Alexandre
> > >
> > > On Tue, Dec 16, 2008 at 8:53 PM, Rick Faircloth
> > >
> > >  wrote:
> > >
> > > > Just take it on face value... did you even look at it?
> > > > It's obviously an operating system interface.  And, yes,
> > > > this is Part 1 of a series, he stated.  You don't have to
> > > > know everything right away to appreciate what's already been done!
> > >
> > > > Rick
> > >
> > > >> -Original Message-
> > > >> From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] 
> > > >> On Behalf Of donb
> > > >> Sent: Tuesday, December 16, 2008 2:22 PM
> > > >> To: jQuery (English)
> > > >> Subject: [jQuery] Re: Creating an OS Web Interface in jQuery (Part I)
> > >
> > > >> I may seem a bit dense, but what's the objective here?  And is 'OS'
> > > >> Operating System, Open Source, something else?  Maybe Part 2 clears
> > > >> all this up, but some intro/background would help a lot.
> > >
> > > >> On Dec 16, 7:57 am, AdrianMG  wrote:
> > > >> > Finally here you have the First Part of this series of tutorials to
> > > >> > recreate an OS Web Interface with our lovely jQuery javascript
> > > >> > library.
> > >
> > > >> > Here you have the link guys, I hope you can use it for your personal
> > > >> > projects:
> > >
> > > >> >http://yensdesign.com/2008/12/creating-an-os-web-interface-in-jquery-...




[jQuery] Re: Licensing Question

2008-12-16 Thread Mika Tuupola



On Dec 16, 2008, at 6:44 PM, Eric Hobo Garside wrote:


I've got a quick question for all the licensing gurus who happen to be
on or about the list. I'm developing a plugin for jQuery for a
company, and want to release it as open source with a non-competition
stipulation. Is it possible to release the code under something like a
Creative Commons license where it's free for non corporate use, but
requires companies who seek to use the product in a commercial sense



If you want people to use your code just use a non-restrictive non- 
viral license (such as MIT).


IMO.

--
Mika Tuupola
http://www.appelsiini.net/



[jQuery] error when using ui.mouse.js

2008-12-16 Thread Sean

Hi There,

I'm getting a weird error when I try to use this script ui.mouse.js in
my page. The drag and drop functionality seems to be working fine it's
just generating an error. Can someone tell me what i'm missing to
initialize this?

!-- error from firebug

$.ui[module] has no properties

add("droppable", "activeClass", Object)
ui.mouse.js (line 10)
(no name)(function())
ui.droppable.ext (line 10)
[Break on this error]
var proto = $.ui[module].prototype;


!- html code

1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:




.block
{
border: 2px solid #0090DF;
background-color: #68BFEF;
width: 170px;
height: 100px;
margin: 5px;
overflow: hidden;
padding: 0 0 0 0;
z-index: ;
cursor: move;
}
.imageItem
{
border: 2px solid #0090DF;
background-color: yellow;
}
.mouseOverClass
{
background-color: Yellow;
}
.drop
{
background-color: #e9b96e;
border: 3px double #c17d11;
width: 300px;
height: 800px;
margin: 10px;
overflow: auto;
position: absolute;
top: 70px;
right: 10%;
padding: 0 0 0 0;
}
.droppable-active
{
opacity: 1.0;
}
.droppable-hover
{
outline: 2px dotted black;
}
li
{
list-style: none;
}













   DollHouse_pg1.jpg


1





   DollHouse_pg2.jpg


2









   
   
   Slideshow file list
   
   
   
Save Changes
   
   

Preview Slideshow
   
   
   









 Save
Changes







[jQuery] Re: libraries

2008-12-16 Thread Dirceu Barquette
OK. CSV isn't required...
All the IDE has {css,tagHtml}attrs or jQuery{attr,methods} auto-complete
cappable . If I have these lists, auto-completing is easy... isn't it?
Thanks
Dirceu Barquette

2008/12/16 Ricardo Tomasi 

>
> Hmm.. what do you mean? all of these are plain text, I guess you meant
> something other than 'file format' (and csv has nothing to do with CSS
> by the way, more than the rest is unrelated!) :]
>
> On Dec 16, 5:22 pm, "Dirceu Barquette" 
> wrote:
> > Hi,
> >
> > I'd like to know, please:
> > There is  {HTML,CSS,jQuery}library in [xml,csv,json]file format?
> > The goal is an IDE...
> >
> > Thanks.
> >
> > Dirceu Barquette
>


[jQuery] Re: Creating an OS Web Interface in jQuery (Part I)

2008-12-16 Thread Rick Faircloth

Hi, Ricardo...

I haven't complained about anyone's criticism of the "tutorial" aspect
of what has been presented...it's the "what-good-is-this" mentality
concerning what Adrian had created that I thought was in poor taste.

My mention of tutorials was to remind everyone that this was obviously
the first steps for someone working on a project.

No faster way to kill someone's enthusiasm than to simply tear something
down without any encouragement.

It's like I tell my kids... you can't applaud the effort if not the
performance.  And, if asked, give encouraging criticism.

Rick

> -Original Message-
> From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On 
> Behalf Of Ricardo Tomasi
> Sent: Tuesday, December 16, 2008 3:29 PM
> To: jQuery (English)
> Subject: [jQuery] Re: Creating an OS Web Interface in jQuery (Part I)
> 
> 
> I have to agree with Alexandre. It's a nice demonstration of skill,
> but pasting hundreds of lines of code in boxes is not exactly
> 'teaching'. I bet most beginners would get lost pretty quickly with
> the code and end up just copy/pasting it. And for intermediate/
> advanced JS programmers this isn't very useful, as it is just a
> background with some drag & drop funcionality.
> 
> Before you say that "it's just the start" I'll have to point out that,
> despite it's simplicity, there are already many flaws:
> - the text below the icons is selectable (and gets selected on double
> click)
> - same goes for 'start' and the clock
> - cursor for dragging is a 'text selection' cursor
> - with just a little fiddling with the icons you'll get unrequested
> copies of them sitting around from failed drag&drop operations
> - you can drag icons off screen and lose them forever
> - icons can overlap and have an arbitrary z-index which you can't
> control or reorganize
> 
> This is just *so* far from something functional and useful that the
> "tutorial" title can be considered misleading.
> 
> However it's a very nice demonstration of how jQuery makes it very
> easy to mock up something that looks and reacts (at first look) pretty
> much like an OS GUI.
> 
> Sorry if I'm being harsh, but everyone is entitled to an opinion :]
> 
> - ricardo
> 
> On Dec 16, 6:05 pm, "Alexandre Plennevaux" 
> wrote:
> > Rick, I read the tutorial in its entirety before commenting. This
> > document lacks structure and not only that, I could have pointed the
> > many english mistakes, because obviously this was written quite fast,
> > and i'm sure with a little more care and some more mindset framing, it
> > should be perfect. I don't know what you consider a tutorial, but as
> > for me, a tutorial means something meant to teach. In this document,
> > adam shows obvious skills, but does not teach, hence i'd call this a
> > demo.
> > I meant to be constructive because he shows a lot of enthusiasm and
> > that's his strength. But telling him this "tutorial" is perfect won't
> > help him improve, nor the jquery community as a whole.
> >
> > hope this helps clarify my comments.
> >
> > Best,
> >
> > Alexandre
> >
> > On Tue, Dec 16, 2008 at 8:53 PM, Rick Faircloth
> >
> >  wrote:
> >
> > > Just take it on face value... did you even look at it?
> > > It's obviously an operating system interface.  And, yes,
> > > this is Part 1 of a series, he stated.  You don't have to
> > > know everything right away to appreciate what's already been done!
> >
> > > Rick
> >
> > >> -Original Message-
> > >> From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On 
> > >> Behalf Of donb
> > >> Sent: Tuesday, December 16, 2008 2:22 PM
> > >> To: jQuery (English)
> > >> Subject: [jQuery] Re: Creating an OS Web Interface in jQuery (Part I)
> >
> > >> I may seem a bit dense, but what's the objective here?  And is 'OS'
> > >> Operating System, Open Source, something else?  Maybe Part 2 clears
> > >> all this up, but some intro/background would help a lot.
> >
> > >> On Dec 16, 7:57 am, AdrianMG  wrote:
> > >> > Finally here you have the First Part of this series of tutorials to
> > >> > recreate an OS Web Interface with our lovely jQuery javascript
> > >> > library.
> >
> > >> > Here you have the link guys, I hope you can use it for your personal
> > >> > projects:
> >
> > >> >http://yensdesign.com/2008/12/creating-an-os-web-interface-in-jquery-...



[jQuery] Re: Smart image resizing "Idea"

2008-12-16 Thread MorningZ

Change

$(this).click(function(){
  window.location = $(this).attr("src");
});


To

$(this).click(function(){
  window.open("show", $(this).attr("src"));
});


I've got code very very very similar to this
http://www.team-integra.net/forum/display_topic_threads.asp?ForumID=16&TopicID=228059

Although i did that code years ago before jQuery (so there's none of
it in there)...


I will make one big suggestion:

Contain your image selector to a parent control

so you have

$(selector).each(  )

do something like

$(selector, $("SomeParentObject")).each(  )

so the code doesn't run on every single image on the page, it would be
a total waste of your user's browser resources to run that code on
layout images and stuff not relevant to be resized






On Dec 16, 3:56 pm, Yousef  wrote:
> Dear Eric,
> Dear Eric,
> Thanks for helping me. I did not how to use the code in the link :).
> Any way I got a more simple code and I am happy with it "check the end
> of the message".
>
> Dear donb,
> the problem with CSS scaling is because it will scale all image "small
> image and large one".
> thanks for help :) .
>
> I found very nice code here:http://pastebin.fr/3025but it has a
> problem. the fix of the problem is herehttp://pastebin.fr/3028
>
> It is good, but it will expand the image "after clicking" in the same
> page. I prefer to open it in pop up window. How do I modify the code
> to make the image open in pop up window?
>
> Thanks
>
> On Dec 16, 10:32 pm, "Eric \"Hobo\" Garside" 
> wrote:
>
> > I believe the latter.
>
> > On Dec 16, 2:06 pm, donb  wrote:
>
> > > Are you aware of the CSS height:auto (and width:auto) properties?  Set
> > > the width to whatever value you want and the height will maintain the
> > > relation between the width and height automatically (maintains aspect
> > > ratio).  Or are you talking about dynamically stretching the image,
> > > not knowing the desired width ahead of time?
>
> > > On Dec 16, 8:43 am, Yousef  wrote:
>
> > > > Smart image resizing "Idea"
>
> > > > Dears,
> > > > I am new to JQuery.I have an idea I want to share with you and i hope
> > > > one of the programmer write the code for it.
>
> > > > the idea is to resize an image to a custom width and keeping the
> > > > relation between the width and height ,for example:
>
> > > > * if the width less than 600px ---> do nothing   "no need to change"
>
> > > > *if the width =1000 and height=500 > reside to: width=500 and
> > > > height=250 "the height is still 50% of the width"
> > > > *when the resided image is clicked, pop up a windows with the original
> > > > size
> > > > *above the image, write "click here to enlarge"
>
> > > > I hope you got the idea, and I hope one if you write the code for it
> > > > or please help me how could I do it.


[jQuery] Re: jQuery.data() identifier not working

2008-12-16 Thread ricardoe

Hi Ricardo

Yeah, its a DOM element to be more specific I'm working with a lot of
IMG elements.
I need to identify them uniquely, (because sometimes the image is
repeated, but I need to manage them as different objects), so when I
read the documentation for jQuery.data() I (maybe mis-)understand that
it will create a Unique id for an element, and its sort of true BUT
don't you dare to use removeData() for that element because if you
remove all the data attached with jQuery(elem).data('key','value') you
will get rid of the unique-id for the element too. Does that make
sense?

On 16 dic, 10:33, Ricardo Tomasi  wrote:
> You can keep your own unique identifier anywhere you want, for data()
> the identifier is the element itself. If you care to explain a bit
> more of what you're trying to achieve someone might come up with an
> useful suggestion. What did 'elem' refer to in your original script
> for example? A DOM element?
>
> - ricardo
>
> On Dec 16, 6:46 am, ricardoe  wrote:
>
> > Well, solved issue:
>
> > Don't trust jQuery.data(element) if you're pretending to use gQuery
> > (element).data('only-data-element','something')
> > When you use gQuery(element).removeData('only-data-element') the
> > jQuery.cache for that element will be deleted.
> > This leads that when you do again jQuery.data(element) you WONT have
> > the expected ID, it will create a new one.
>
> > Why?! I dunno. But I'll not file a ticket cause "most of people
> > doesn't use it that way".. lame.
>
> > On Dec 16, 1:39 am, ricardoe  wrote:
>
> > > Hi,
>
> > > Does anyone knows why this:
>
> > >     var id = elem[ expando ];
> > >     // Compute a unique ID for the element
> > >     if ( !id ) {
> > >         id = elem[expando] = ++uuid;
> > >     }
>
> > > Could be being broken? I mean, on a test page I made the elem[expando]
> > > property is not being "saved".
> > > I'll explain, the first time I do jQuery.data(element) I get a number
> > > lets say: 10.
> > > Then if I do again the same (with the exactly same element) I get: 14.
>
> > > I'm using this to identify elements so its not working as expected,
> > > anyone have theories about this?


[jQuery] Re: event fires exponentially

2008-12-16 Thread Jan Limpens

Yes I do. It's just a bunch of check boxes to filter and order a
result. It is not updating the form, too. Nothing disastrous about
this.

Keep cool,
Jan

On Tue, Dec 16, 2008 at 5:42 PM, MorningZ  wrote:
>
> This original code you posted
>
>
> $(document).ready(function(){
>$form = $('#filter-form');
>$form.ajaxForm({
>//dataType: 'json',
>success: function(){
>alert("peng");
>},
>target: "#layout-child-output"
>});
>$('input', $form).change(function(){
>$form.submit();
>});
> })
>
>
>
>
> has *disaster* written all over it..so every single time a
> form item changes you want to submit the whole entire form?   that's
> just inefficient design asking for all kinds of problems like race
> conditions and the like



-- 
Jan


[jQuery] Re: Smart image resizing "Idea"

2008-12-16 Thread Yousef

Dear Eric,
Dear Eric,
Thanks for helping me. I did not how to use the code in the link :).
Any way I got a more simple code and I am happy with it "check the end
of the message".

Dear donb,
the problem with CSS scaling is because it will scale all image "small
image and large one".
thanks for help :) .


I found very nice code here: http://pastebin.fr/3025 but it has a
problem. the fix of the problem is here http://pastebin.fr/3028

It is good, but it will expand the image "after clicking" in the same
page. I prefer to open it in pop up window. How do I modify the code
to make the image open in pop up window?


Thanks



On Dec 16, 10:32 pm, "Eric \"Hobo\" Garside" 
wrote:
> I believe the latter.
>
> On Dec 16, 2:06 pm, donb  wrote:
>
> > Are you aware of the CSS height:auto (and width:auto) properties?  Set
> > the width to whatever value you want and the height will maintain the
> > relation between the width and height automatically (maintains aspect
> > ratio).  Or are you talking about dynamically stretching the image,
> > not knowing the desired width ahead of time?
>
> > On Dec 16, 8:43 am, Yousef  wrote:
>
> > > Smart image resizing "Idea"
>
> > > Dears,
> > > I am new to JQuery.I have an idea I want to share with you and i hope
> > > one of the programmer write the code for it.
>
> > > the idea is to resize an image to a custom width and keeping the
> > > relation between the width and height ,for example:
>
> > > * if the width less than 600px ---> do nothing   "no need to change"
>
> > > *if the width =1000 and height=500 > reside to: width=500 and
> > > height=250 "the height is still 50% of the width"
> > > *when the resided image is clicked, pop up a windows with the original
> > > size
> > > *above the image, write "click here to enlarge"
>
> > > I hope you got the idea, and I hope one if you write the code for it
> > > or please help me how could I do it.


[jQuery] Re: History Plug-In

2008-12-16 Thread russellneufeld

Hi Olivier,

  Thanks for the response.  So it looks like I include the
jquery.history_remote.js file, call this in my $(document).ready()
function:

$.ajaxHistory.initialize();

but then what do I do next?  I get a callback every time I update the
table in my page with new content, so I tried adding this line in the
callback:

$.ajaxHistory.update("update" + (update_count++));

I also tried this:

window.location.hash = "update" + (update_count++);

Neither seemed to work in that when I navigate away and then use the
back button, I don't see the final version of the page when I come
back using the back button.  Is there something else I need to do?

Thanks a lot for the help.

  Russ


[jQuery] Re: Access Elements Rendered in a Thickbox

2008-12-16 Thread Rob Wilkerson



On Dec 16, 3:33 pm, Ricardo Tomasi  wrote:
> Your thickbox script most certainly provides a callback function where
> you could add those handlers, which one are you using?

Hey Ricardo -

I'm using http://jquery.com/demo/thickbox/.

I'll dig a little deeper. I was hoping someone already knew the answer
and could spare me hours. :-)

Thanks.


[jQuery] Re: Access Elements Rendered in a Thickbox

2008-12-16 Thread Ricardo Tomasi

Your thickbox script most certainly provides a callback function where
you could add those handlers, which one are you using?

On Dec 16, 5:25 pm, Rob Wilkerson  wrote:
> Hey all -
>
> I'm looking for/wondering whether there is a way to access an element
> loaded in a thickbox.  I have a page that launches thickbox to load a
> form.  I need to be able to set a click() event listener on the submit
> button of that form so that I can submit the form via ajax.
> Unfortunately, I can't come up with a clever way of doing that.  Any
> ideas?
>
> I tried (just for the sake of eliminating the obvious) applying the
> event listener on document ready, but no luck, of course, since I
> assume that the form's submit button doesn't exist until the thickbox
> is loaded.  Is there any way to make this happen?
>
> Thanks.


[jQuery] Re: libraries

2008-12-16 Thread Ricardo Tomasi

Hmm.. what do you mean? all of these are plain text, I guess you meant
something other than 'file format' (and csv has nothing to do with CSS
by the way, more than the rest is unrelated!) :]

On Dec 16, 5:22 pm, "Dirceu Barquette" 
wrote:
> Hi,
>
> I'd like to know, please:
> There is  {HTML,CSS,jQuery}library in [xml,csv,json]file format?
> The goal is an IDE...
>
> Thanks.
>
> Dirceu Barquette


[jQuery] Re: Creating an OS Web Interface in jQuery (Part I)

2008-12-16 Thread Ricardo Tomasi

I have to agree with Alexandre. It's a nice demonstration of skill,
but pasting hundreds of lines of code in boxes is not exactly
'teaching'. I bet most beginners would get lost pretty quickly with
the code and end up just copy/pasting it. And for intermediate/
advanced JS programmers this isn't very useful, as it is just a
background with some drag & drop funcionality.

Before you say that "it's just the start" I'll have to point out that,
despite it's simplicity, there are already many flaws:
- the text below the icons is selectable (and gets selected on double
click)
- same goes for 'start' and the clock
- cursor for dragging is a 'text selection' cursor
- with just a little fiddling with the icons you'll get unrequested
copies of them sitting around from failed drag&drop operations
- you can drag icons off screen and lose them forever
- icons can overlap and have an arbitrary z-index which you can't
control or reorganize

This is just *so* far from something functional and useful that the
"tutorial" title can be considered misleading.

However it's a very nice demonstration of how jQuery makes it very
easy to mock up something that looks and reacts (at first look) pretty
much like an OS GUI.

Sorry if I'm being harsh, but everyone is entitled to an opinion :]

- ricardo

On Dec 16, 6:05 pm, "Alexandre Plennevaux" 
wrote:
> Rick, I read the tutorial in its entirety before commenting. This
> document lacks structure and not only that, I could have pointed the
> many english mistakes, because obviously this was written quite fast,
> and i'm sure with a little more care and some more mindset framing, it
> should be perfect. I don't know what you consider a tutorial, but as
> for me, a tutorial means something meant to teach. In this document,
> adam shows obvious skills, but does not teach, hence i'd call this a
> demo.
> I meant to be constructive because he shows a lot of enthusiasm and
> that's his strength. But telling him this "tutorial" is perfect won't
> help him improve, nor the jquery community as a whole.
>
> hope this helps clarify my comments.
>
> Best,
>
> Alexandre
>
> On Tue, Dec 16, 2008 at 8:53 PM, Rick Faircloth
>
>  wrote:
>
> > Just take it on face value... did you even look at it?
> > It's obviously an operating system interface.  And, yes,
> > this is Part 1 of a series, he stated.  You don't have to
> > know everything right away to appreciate what's already been done!
>
> > Rick
>
> >> -Original Message-
> >> From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On 
> >> Behalf Of donb
> >> Sent: Tuesday, December 16, 2008 2:22 PM
> >> To: jQuery (English)
> >> Subject: [jQuery] Re: Creating an OS Web Interface in jQuery (Part I)
>
> >> I may seem a bit dense, but what's the objective here?  And is 'OS'
> >> Operating System, Open Source, something else?  Maybe Part 2 clears
> >> all this up, but some intro/background would help a lot.
>
> >> On Dec 16, 7:57 am, AdrianMG  wrote:
> >> > Finally here you have the First Part of this series of tutorials to
> >> > recreate an OS Web Interface with our lovely jQuery javascript
> >> > library.
>
> >> > Here you have the link guys, I hope you can use it for your personal
> >> > projects:
>
> >> >http://yensdesign.com/2008/12/creating-an-os-web-interface-in-jquery-...


[jQuery] Re: Creating an OS Web Interface in jQuery (Part I)

2008-12-16 Thread Alexandre Plennevaux

Rick, I read the tutorial in its entirety before commenting. This
document lacks structure and not only that, I could have pointed the
many english mistakes, because obviously this was written quite fast,
and i'm sure with a little more care and some more mindset framing, it
should be perfect. I don't know what you consider a tutorial, but as
for me, a tutorial means something meant to teach. In this document,
adam shows obvious skills, but does not teach, hence i'd call this a
demo.
I meant to be constructive because he shows a lot of enthusiasm and
that's his strength. But telling him this "tutorial" is perfect won't
help him improve, nor the jquery community as a whole.

hope this helps clarify my comments.

Best,

Alexandre


On Tue, Dec 16, 2008 at 8:53 PM, Rick Faircloth
 wrote:
>
> Just take it on face value... did you even look at it?
> It's obviously an operating system interface.  And, yes,
> this is Part 1 of a series, he stated.  You don't have to
> know everything right away to appreciate what's already been done!
>
> Rick
>
>> -Original Message-
>> From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On 
>> Behalf Of donb
>> Sent: Tuesday, December 16, 2008 2:22 PM
>> To: jQuery (English)
>> Subject: [jQuery] Re: Creating an OS Web Interface in jQuery (Part I)
>>
>>
>> I may seem a bit dense, but what's the objective here?  And is 'OS'
>> Operating System, Open Source, something else?  Maybe Part 2 clears
>> all this up, but some intro/background would help a lot.
>>
>> On Dec 16, 7:57 am, AdrianMG  wrote:
>> > Finally here you have the First Part of this series of tutorials to
>> > recreate an OS Web Interface with our lovely jQuery javascript
>> > library.
>> >
>> > Here you have the link guys, I hope you can use it for your personal
>> > projects:
>> >
>> > http://yensdesign.com/2008/12/creating-an-os-web-interface-in-jquery-...
>
>


[jQuery] Re: ClueTip Custom Close Button

2008-12-16 Thread braveknave

Perfect! Thanks a million.


[jQuery] Re: Creating an OS Web Interface in jQuery (Part I)

2008-12-16 Thread Rick Faircloth

Just take it on face value... did you even look at it?
It's obviously an operating system interface.  And, yes,
this is Part 1 of a series, he stated.  You don't have to
know everything right away to appreciate what's already been done!

Rick

> -Original Message-
> From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On 
> Behalf Of donb
> Sent: Tuesday, December 16, 2008 2:22 PM
> To: jQuery (English)
> Subject: [jQuery] Re: Creating an OS Web Interface in jQuery (Part I)
> 
> 
> I may seem a bit dense, but what's the objective here?  And is 'OS'
> Operating System, Open Source, something else?  Maybe Part 2 clears
> all this up, but some intro/background would help a lot.
> 
> On Dec 16, 7:57 am, AdrianMG  wrote:
> > Finally here you have the First Part of this series of tutorials to
> > recreate an OS Web Interface with our lovely jQuery javascript
> > library.
> >
> > Here you have the link guys, I hope you can use it for your personal
> > projects:
> >
> > http://yensdesign.com/2008/12/creating-an-os-web-interface-in-jquery-...



[jQuery] Re: Why won't this work?

2008-12-16 Thread Rick Faircloth
Ok, Charlie.

 

I think everything's worked out, even the validation onblur.

 

You can check out the working demo here:

 

http://wsm-dev.com/wsm-dev/ajax_login_3/index.cfm

 

Rick

 

 

 

From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf 
Of Charlie Griefer
Sent: Tuesday, December 16, 2008 11:37 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Why won't this work?

 

rick:

 

have you tried putting the:

 

$(document).ready(function(){

  $('#emailError').hide();

});

 

on the index.cfm page?  i believe i just read something that indicated that the 
ajax page load will
be part of the document that it is loading within.

 

On Mon, Dec 15, 2008 at 9:07 PM, Charlie Griefer  
wrote:

until you learn it, sure.  no different than any other tool.

 

On Mon, Dec 15, 2008 at 9:05 PM, Rick Faircloth  
wrote:

Thanks for the insight, Charlie.

 

It seems there are many considerations when

putting Ajax to work.it's going to cause me pain

everywhere I deploy it.

 

 

From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf 
Of Charlie Griefer
Sent: Monday, December 15, 2008 11:01 PM


To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Why won't this work?

 

but if you go here:

http://www.wsm-dev.com/wsm-dev/ajaxlogin2/ajaxLogin.cfm?height=100

&width=250&modal=true

 

...it works.

 

there's something about the fact that you're calling the page inside of the 
thickbox plugin that
makes it different.  i haven't used the plugin, and i'm still fairly new to 
jQuery, so unfortunately
i'm not sure what specifically the issue is, or what the resolution is.  but 
i'd guess that when the
thickbox loads the page, the $(document).ready() doesn't fire in the same way 
that it fires on a
normal page load (or... at all, it would seem).

On Mon, Dec 15, 2008 at 7:24 PM, Rick Faircloth  
wrote:

The code on the server has been update now, Charlie.

Not working on there, either.

 

http://www.wsm-dev.com/wsm-dev/ajaxlogin2/index.cfm

 

But a successful login now takes me to the site_manager.cfm page

thanks to some changes in the code by Matt Williams!

 

You can see the current code here:

 

http://paste.pocoo.org/show/95547/

 

Rick

 

From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf 
Of Rick Faircloth
Sent: Monday, December 15, 2008 9:58 PM


To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Why won't this work?

 

Yes, that's copied and pasted from the IDE, however.

 

I don't think that would be a problem.the second pair of quotes

were put in when I pasted the code into the email.

I had double quotes for the second set and was trying

to be consistent.  I usually use those quotes.

 

I've got the entire login function up at

http://www.wsm-dev.com/wsm-dev/ajaxlogin2/index.cfm

but that version doesn't include the error message bit

that I'm working on.  Someone's reviewing the code

and if I change the online version, it might throw them off.

 

Once I hear from them, I'll add that to it.

 

Can't solve a problem with the online version right now, either.

On successful login, the user should be taken to site_manager.cfm.

But the success text is showing up where the login failure text shows.

 

You can see all the code that's currently working online at

http://paste.pocoo.org/show/95530/

 

I thought I'd try this site out for collaboration and see if that

works better than email zip files all over the place.  If you look

at the site above, you can click on "Paste Details" near the top

and see some response options.  If you click on "reply to this paste"

you can edit the code and it'll put your version in the line that you

can see if you click on "show paste tree."

 

Rick

 

 

 

From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf 
Of Charlie Griefer
Sent: Monday, December 15, 2008 9:48 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Why won't this work?

 

is that the actual code that you copied/pasted from your IDE?  i'm noticing 
'smart quotes' here:

 

$('#emailError').show();  

 

could that be hosing you?

 

is this on a server somewhere we can see it in all its glory in a browser?

 

On Mon, Dec 15, 2008 at 6:43 PM, Rick Faircloth  
wrote:

Well.bummer.  Works for me, too, when it's

on *your* server, Charlie.  You've just got the magic touch.

 

Will this entire block run for you

with all the other code on there?

(Have I coded this properly?)

 



 

   $(document).ready(function(){

  $('#emailError').hide();

   });

 

 

   function validateEmail() {

  

  $("input.email").blur(function() {

 

 if (this.val.length == 0)

   $('#emailError').show();   

  });

   });

 

[jQuery] Re: Creating an OS Web Interface in jQuery (Part I)

2008-12-16 Thread Alexandre Plennevaux

i meant AdrianMG, not Liam !

On Tue, Dec 16, 2008 at 8:43 PM, Alexandre Plennevaux
 wrote:
> yup i must say i am also doubtful on the actual "tutorial". I'm trying
> to be constructive so please don't take offense of my personal remark:
>
> This is more of a demo, it's not really explaining how to do it. For
> instance, a tutorial should explain the rationale of a web OS
> interface. AFAIK that's not such a popular choice for web apps. Not
> that it shouldn't be, but some argumentation on its potential
> (usability?) for end users would be good.
> Then deconstruct this "OS interface" into, indeed, drag 'n drop, start
> menu, desktop icons, and present the list of forthcoming tutorials.
>
> All this should wipe away any of the doubts i had while reading it.
>
> thanks liam for the effort, keep on improving it, but don't be afraid
> to describe/analyse a problem before jumping on its solution.
>
>
> best,
>
> alexandre
>
> On Tue, Dec 16, 2008 at 8:22 PM, donb  wrote:
>>
>> I may seem a bit dense, but what's the objective here?  And is 'OS'
>> Operating System, Open Source, something else?  Maybe Part 2 clears
>> all this up, but some intro/background would help a lot.
>>
>> On Dec 16, 7:57 am, AdrianMG  wrote:
>>> Finally here you have the First Part of this series of tutorials to
>>> recreate an OS Web Interface with our lovely jQuery javascript
>>> library.
>>>
>>> Here you have the link guys, I hope you can use it for your personal
>>> projects:
>>>
>>> http://yensdesign.com/2008/12/creating-an-os-web-interface-in-jquery-...
>


[jQuery] Re: Is this syntax correct?

2008-12-16 Thread Rick Faircloth

Thanks, guys!  That took care of it!

Rick

> -Original Message-
> From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On 
> Behalf Of MorningZ
> Sent: Tuesday, December 16, 2008 2:31 PM
> To: jQuery (English)
> Subject: [jQuery] Re: Is this syntax correct?
> 
> 
> And to build on Mike's reply
> 
> understand that "this" is a DOM element in that context, *not* a
> jQuery object
> 
> so
> 
> this.val   is not valid
> 
> but
> 
> $(this).val()is valid
> 
> 
> 
> 
> 
> 
> 
> 
> On Dec 16, 1:53 pm, Mike Alsup  wrote:
> > > When I write it like this $('input#emailaddress')
> > > I get a "this.val undefined" error...
> >
> > That's because 'val' is not a property on a that element.  You want
> > 'value'.



[jQuery] Re: Creating an OS Web Interface in jQuery (Part I)

2008-12-16 Thread Alexandre Plennevaux

yup i must say i am also doubtful on the actual "tutorial". I'm trying
to be constructive so please don't take offense of my personal remark:

This is more of a demo, it's not really explaining how to do it. For
instance, a tutorial should explain the rationale of a web OS
interface. AFAIK that's not such a popular choice for web apps. Not
that it shouldn't be, but some argumentation on its potential
(usability?) for end users would be good.
Then deconstruct this "OS interface" into, indeed, drag 'n drop, start
menu, desktop icons, and present the list of forthcoming tutorials.

All this should wipe away any of the doubts i had while reading it.

thanks liam for the effort, keep on improving it, but don't be afraid
to describe/analyse a problem before jumping on its solution.


best,

alexandre

On Tue, Dec 16, 2008 at 8:22 PM, donb  wrote:
>
> I may seem a bit dense, but what's the objective here?  And is 'OS'
> Operating System, Open Source, something else?  Maybe Part 2 clears
> all this up, but some intro/background would help a lot.
>
> On Dec 16, 7:57 am, AdrianMG  wrote:
>> Finally here you have the First Part of this series of tutorials to
>> recreate an OS Web Interface with our lovely jQuery javascript
>> library.
>>
>> Here you have the link guys, I hope you can use it for your personal
>> projects:
>>
>> http://yensdesign.com/2008/12/creating-an-os-web-interface-in-jquery-...


[jQuery] Re: event fires exponentially

2008-12-16 Thread MorningZ

This original code you posted


$(document).ready(function(){
$form = $('#filter-form');
$form.ajaxForm({
//dataType: 'json',
success: function(){
alert("peng");
},
target: "#layout-child-output"
});
$('input', $form).change(function(){
$form.submit();
});
})




has *disaster* written all over it..so every single time a
form item changes you want to submit the whole entire form?   that's
just inefficient design asking for all kinds of problems like race
conditions and the like


[jQuery] Re: Smart image resizing "Idea"

2008-12-16 Thread Eric "Hobo" Garside

I believe the latter.

On Dec 16, 2:06 pm, donb  wrote:
> Are you aware of the CSS height:auto (and width:auto) properties?  Set
> the width to whatever value you want and the height will maintain the
> relation between the width and height automatically (maintains aspect
> ratio).  Or are you talking about dynamically stretching the image,
> not knowing the desired width ahead of time?
>
> On Dec 16, 8:43 am, Yousef  wrote:
>
> > Smart image resizing "Idea"
>
> > Dears,
> > I am new to JQuery.I have an idea I want to share with you and i hope
> > one of the programmer write the code for it.
>
> > the idea is to resize an image to a custom width and keeping the
> > relation between the width and height ,for example:
>
> > * if the width less than 600px ---> do nothing   "no need to change"
>
> > *if the width =1000 and height=500 > reside to: width=500 and
> > height=250 "the height is still 50% of the width"
> > *when the resided image is clicked, pop up a windows with the original
> > size
> > *above the image, write "click here to enlarge"
>
> > I hope you got the idea, and I hope one if you write the code for it
> > or please help me how could I do it.


[jQuery] Re: event fires exponentially

2008-12-16 Thread Cam Spiers
I think that ajaxForm already adds a submit handler to the form you are
adding it to...
So i think this is doubling up.

   $('input', $form).change(function(){
   $form.submit();
   });

On Wed, Dec 17, 2008 at 6:33 AM, Jan Limpens  wrote:

>
> And this does work:
>
> $(document).ready(function(){
>$form = $('#filter-form');
> $('input', $form).change(function(){
>$form.ajaxSubmit({
>dataType: 'json',
>success: function(){},
>target: "#layout-child-output"
>});
>});
> })
>
> strange, though
>
> On Tue, Dec 16, 2008 at 3:27 PM, Jan Limpens 
> wrote:
> > Must be some bug in ajaxForm, I guess.
> >
> > if I change
> >   $('input', $form).change(function(){
> >   $form.submit();
> >   });
> >
> > to
> >   $('input', $form).change(function(){
> >   alert('peng');
> >   });
> >
> > it fires once only, otherwise I get the exponential behavior. My guess
> > is, that ajaxForm.submit() somehow touches the inputs and triggers the
> > change event recursively. But that is just my impression...
> >
> > On Tue, Dec 16, 2008 at 3:12 PM, Jan Limpens 
> wrote:
> >> No, unfortunately... but I may be able to put something up...
> >>
> >> On Tue, Dec 16, 2008 at 3:05 PM, Eric Hobo Garside 
> wrote:
> >>>
> >>> Do you have a live environment where this is hosted, or at least the
> >>> code for the page to test it locally? Looks like it should be working
> >>> fine, at face value.
> >>>
> >>> On Dec 16, 11:55 am, "Jan Limpens"  wrote:
>  Hi guys,
> 
>  I have this piece of innocent looking code:
> 
>  
>  $(document).ready(function(){
>  $form = $('#filter-form');
>  $form.ajaxForm({
>  //dataType: 'json',
>  success: function(){
>  alert("peng");
>  },
>  target: "#layout-child-output"
>  });
>  $('input', $form).change(function(){
>  $form.submit();
>  });})
> 
>  
> 
>  If I check one checkbox, I get one submit, for 2 2, however for 3 4,
>  for 4 16, and so on until the server crashes.
> 
>  Any idea what is wrong here?
>  --
>  Jan
> >>
> >>
> >>
> >> --
> >> Jan
> >>
> >
> >
> >
> > --
> > Jan
> >
>
>
>
> --
> Jan
>


[jQuery] Re: Is this syntax correct?

2008-12-16 Thread MorningZ

And to build on Mike's reply

understand that "this" is a DOM element in that context, *not* a
jQuery object

so

this.val   is not valid

but

$(this).val()is valid








On Dec 16, 1:53 pm, Mike Alsup  wrote:
> > When I write it like this $('input#emailaddress')
> > I get a "this.val undefined" error...
>
> That's because 'val' is not a property on a that element.  You want
> 'value'.


[jQuery] Re: Trying to assign onClick to a link

2008-12-16 Thread Cam Spiers
 $('a#link').click(function(event) {
 event.preventDefault();
 $('div#bugDiv').slideToggle('slow');
});

You can do this as well.

On Wed, Dec 17, 2008 at 3:26 AM, Matt  wrote:

>
> Worked perfectly. Thanks Michael and Mike!!
>
> On Dec 16, 6:43 am, Michael Price  wrote:
> > Matt wrote:
> > > Hi everyone,
> >
> > > I'm very new to jQuery and am trying to have a div toggle between
> > > hidden and shown using the slideToggle function. This is my code that
> > > I have in the head of my html:
> >
> > > $(document).ready(function(){
> > >$('a#link').click(
> > >$('div#bugDiv').slideToggle('slow')
> > >);
> >
> > > });
> >
> > > The link that I want to associate the onClick to has an id of "link"
> > > and the div has an id of "bugDiv".
> >
> > > Right now, the way it works, the bugdiv slides to hidden on load, as
> > > though it's just executing the code as opposed to associating it as
> > > the onclick action..
> >
> > > Any help would be appreciated! Thanks in advance,
> > > Matt
> >
> > Hi Matt
> > I think the click handler will need wrapping in a function as well:
> >
> > $('a#link').click(function() {
> > $('div#bugDiv').slideToggle('slow');
> > return false;
> >
> > });
> >
> > I've also added return false as Mike suggested which will stop the
> > link's default action from being followed.
> >
> > Regards,
> > Michael Price
>


[jQuery] Access Elements Rendered in a Thickbox

2008-12-16 Thread Rob Wilkerson

Hey all -

I'm looking for/wondering whether there is a way to access an element
loaded in a thickbox.  I have a page that launches thickbox to load a
form.  I need to be able to set a click() event listener on the submit
button of that form so that I can submit the form via ajax.
Unfortunately, I can't come up with a clever way of doing that.  Any
ideas?

I tried (just for the sake of eliminating the obvious) applying the
event listener on document ready, but no luck, of course, since I
assume that the form's submit button doesn't exist until the thickbox
is loaded.  Is there any way to make this happen?

Thanks.


[jQuery] Re: Creating an OS Web Interface in jQuery (Part I)

2008-12-16 Thread donb

I may seem a bit dense, but what's the objective here?  And is 'OS'
Operating System, Open Source, something else?  Maybe Part 2 clears
all this up, but some intro/background would help a lot.

On Dec 16, 7:57 am, AdrianMG  wrote:
> Finally here you have the First Part of this series of tutorials to
> recreate an OS Web Interface with our lovely jQuery javascript
> library.
>
> Here you have the link guys, I hope you can use it for your personal
> projects:
>
> http://yensdesign.com/2008/12/creating-an-os-web-interface-in-jquery-...


[jQuery] libraries

2008-12-16 Thread Dirceu Barquette
Hi,

I'd like to know, please:
There is  {HTML,CSS,jQuery}library in [xml,csv,json]file format?
The goal is an IDE...

Thanks.

Dirceu Barquette


[jQuery] Re: Smart image resizing "Idea"

2008-12-16 Thread donb

Are you aware of the CSS height:auto (and width:auto) properties?  Set
the width to whatever value you want and the height will maintain the
relation between the width and height automatically (maintains aspect
ratio).  Or are you talking about dynamically stretching the image,
not knowing the desired width ahead of time?

On Dec 16, 8:43 am, Yousef  wrote:
> Smart image resizing "Idea"
>
> Dears,
> I am new to JQuery.I have an idea I want to share with you and i hope
> one of the programmer write the code for it.
>
> the idea is to resize an image to a custom width and keeping the
> relation between the width and height ,for example:
>
> * if the width less than 600px ---> do nothing   "no need to change"
>
> *if the width =1000 and height=500 > reside to: width=500 and
> height=250 "the height is still 50% of the width"
> *when the resided image is clicked, pop up a windows with the original
> size
> *above the image, write "click here to enlarge"
>
> I hope you got the idea, and I hope one if you write the code for it
> or please help me how could I do it.


[jQuery] Re: Using the not() filter

2008-12-16 Thread Ricardo Tomasi

Right, so that explains all. Nobody paid any attention to the "nested
in certain DIVs" part, including me:

$('input').filter(function(){
return !$(this).parent().is('#addNewAdress,#addNewContactDetail');
}).click(function(){
console.log(this.id);
});

read on about the filter function at http://docs.jquery.com/Traversing,
and make sure you post the full code next time :)

cheers,
- ricardo

On Dec 16, 4:18 pm, WhoButSB  wrote:
> Thanks Ricardo after lunch I will give that a try. No the Id is not
> the input itself it a actually the parent div and there are a
> collection of inputs in the div. I would post my HTML but there is so
> much php looping and conditions that it would just Mqke this thread
> more confusing.
>
> On Dec 16, 1:04 pm, Ricardo Tomasi  wrote:
>
> > by the way: Is #addNewAdress the input itself? Maybe what you're
> > looking for is #addNewAdress :input. Again, seeing the relevant HTML
> > would help.
>
> > On Dec 16, 1:26 pm, WhoButSB  wrote:
>
> > > I gave this a try:
> > > $("input:not(#addNewAddress:input, #addNewContactDetail:input)").focus
> > > ();
>
> > > And the function would still run :-/ .  Maybe I should use the input
> > > selector then add a class to the ones i don't want to grab and use the
> > > hasClass method to return a false for the ones not supposed to
> > > activate.
>
> > > But I have to believe there is an easier way.
>
> > > On Dec 15, 7:39 pm, Kean  wrote:
>
> > > > This probably will work too.
>
> > > > $("input:not(#addNewAddress, #addNewContactDetail)").click();
>
> > > > On Dec 15, 3:01 pm, "Rik Lomas"  wrote:
>
> > > > > Try:
>
> > > > > $("input").not('#addNewAddress, #addNewContactDetail').click();
>
> > > > > Rik
>
> > > > > 2008/12/15 WhoButSB :
>
> > > > > > Hello All!
> > > > > > I'm trying to figure out the correct way to use the not() method.  I
> > > > > > know there is also a :not() filter in selectors class but I couldn't
> > > > > > get that one to work either.
>
> > > > > > My goal is to add a click function to all the input fields on a 
> > > > > > page.
> > > > > > But not select the input buttons that are nested in certain divs.
>
> > > > > > Here is what I have tried so far:
>
> > > > > > $("input").not($('#addNewAddress:input',
> > > > > > '#addNewContactDetail:input')).click(function(){
> > > > > >                        console.log($(this).attr('id'));
> > > > > > });
>
> > > > > > AND
>
> > > > > > $("input").not('#addNewAddress input', '#addNewContactDetail
> > > > > > input').click(function(){
> > > > > >                        console.log($(this).attr('id'));
> > > > > > });
>
> > > > > > Neither have worked so far.  Should I be using the :not() command in
> > > > > > the selector?
>
> > > > > > Thanks for the help!
>
> > > > > --
> > > > > Rik Lomashttp://rikrikrik.com


[jQuery] Re: Is this syntax correct?

2008-12-16 Thread Mike Alsup

> When I write it like this $('input#emailaddress')
> I get a "this.val undefined" error...

That's because 'val' is not a property on a that element.  You want
'value'.


[jQuery] Re: $(document).ready on an ajax return?

2008-12-16 Thread davidgregan

okay, I've figured this out. the problem I was having was a
combination of 1) ie's $(element).change() event doesn't fire until
after the element looses focus (i use click() instead) and 2)
refreshing ie doesn't always refresh the page, there's some funky
caching going on so the changes I had made weren't showing up.

On Dec 16, 10:14 am, davidgregan  wrote:
> I'd like to add that I can't even access the new DOM elements in IE in
> the $.get() callback function,  but I can in firefox. it's like IE
> doesn't insert the new HTML into the dom until after the callback is
> executed. that sucks! ;P
>
> On Dec 16, 9:42 am, davidgregan  wrote:
>
> > sorry, I may have oversimplified my example above, replace alert
> > ("content Loaded"); with this:
>
> > $("#childInput").change(function()
> > {
> > alert("input changed!");
>
> > });
>
> > so I want to add an event to a DOM element in the loaded page so the
> > DOM has to be ready before I can execute the code. The method you
> > suggest will work fine for alerts, but it doesn't seem to work for
> > adding events like above, at least not in IE.
>
> > Thanks.
>
> > On Dec 16, 9:33 am, rernens  wrote:
>
> > > There is no need to run $(document).ready when loading a page with
> > > ajax using
> > > jQuery. The scripts contained in the loaded content are automatically
> > > evaluated after the load has been successfull. You should insert at
> > > the end of the document you are loading
> > > 
> > > alert("content loaded")
> > > 
>
> > > It will work flawlessly in both browsers.
>
> > > On 16 déc, 17:13, davidgregan  wrote:
>
> > > > I'm using a $.get call to get the contents for a dialog box and I'm
> > > > trying to run the $(document).ready on the ajax return like so:
>
> > > > parentPage.html:
> > > > $.get('desiredContent.html',function(data){
> > > > $("#dialogBoxDiv").html(data);
> > > > $("#dialogBoxDiv").dialog('open');
>
> > > > }
>
> > > > desiredContent.html:
> > > > $(document).ready(function() {
> > > > alert("content loaded!");
>
> > > > });
>
> > > > this works fine for firefox, but ie won't run the $(document).ready()
> > > > function on the desiredContent page. Is there a way to do this that
> > > > will work in both firefox and ie?
>
> > > > Thanks!


[jQuery] Re: Is this syntax correct?

2008-12-16 Thread Rick Faircloth

Thanks for the reply, MorningZ...

When I write it like this $('input#emailaddress')
I get a "this.val undefined" error...

How should it be?


> -Original Message-
> From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On 
> Behalf Of MorningZ
> Sent: Tuesday, December 16, 2008 1:32 PM
> To: jQuery (English)
> Subject: [jQuery] Re: Is this syntax correct?
> 
> 
> It looks like there is a space between "input" and "#emailaddress"
> 
> and that makes no sense as that will say:
> 
> "give me the control with id "#emailaddress" that is a descendant of
> "input""
> 
> and  controls do not have descendants
> 
> 
> 
> 
> 
> On Dec 16, 1:27 pm, "Rick Faircloth"  wrote:
> > I get no errors, but no response, either.
> > I tried just using $('#emailaddress').blur... without the "input",
> > but then I got a val undefined error.
> >
> > 
> >
> >      $(document).ready(function() {
> >
> >           $('input #emailaddress').blur(function() {
> >
> >                if (this.val.length == 0)
> >                $('#emailerror').show();
> >           });
> >      });
> >
> > 
> >
> > Thanks,
> >
> > Rick



[jQuery] Re: Suckerfish z-index issues in IE

2008-12-16 Thread Karl Swedberg

Hi there,

give #valuechain position: relative and z-index: 2

if that doesn't solve the problem, give #col-2 z-index: 1

--Karl


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




On Dec 16, 2008, at 2:31 AM, Timid wrote:



Hi,

i'm struggling with IE6 and IE7 z-index issues on the suckerfish
flyout menu. The flyout menus fall behind all content even if I make
sure the menu is the last html item in the page.

You can see the problem here

http://point-online.org/tests-resources-books/sftest/submenu3.html




[jQuery] Re: [TUTORIAL] Creating an OS Web Interface in jQuery (Part I)

2008-12-16 Thread Rick Faircloth

> what does this offer?

You are so encouraging, Liam!

Two things you should make note of in Adrian's remarks:

1)  "First Part" of this "series" of tutorials
2)  OS Web "Interface"

i.e., it's the "first steps" in a potentially useful "interface"
and as an "OS Web Interface" it's purpose is to provide pretty graphics,
click and drag, and mouse clicks.

What else do you want from an "OS Web Interface" in its beginning stages
or when it's complete, for that matter...

Sheesh...

Rick

> -Original Message-
> From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On 
> Behalf Of Liam Potter
> Sent: Tuesday, December 16, 2008 12:32 PM
> To: jquery-en@googlegroups.com
> Subject: [jQuery] Re: [TUTORIAL] Creating an OS Web Interface in jQuery (Part 
> I)
> 
> 
> good for a beginner to start learning from, but what does this offer?,
> really it is some pretty graphics and a click and drag script and some
> mouse clicks ?
> 
> Rick Faircloth wrote:
> > Great idea, Adrian!  Good work!
> >
> > Rick
> >
> >
> >> -Original Message-
> >> From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On 
> >> Behalf Of AdrianMG
> >> Sent: Tuesday, December 16, 2008 7:57 AM
> >> To: jQuery (English)
> >> Subject: [jQuery] [TUTORIAL] Creating an OS Web Interface in jQuery (Part 
> >> I)
> >>
> >>
> >> Finally here you have the First Part of this series of tutorials to
> >> recreate an OS Web Interface with our lovely jQuery javascript
> >> library.
> >>
> >> Here you have the link guys, I hope you can use it for your personal
> >> projects:
> >>
> >> http://yensdesign.com/2008/12/creating-an-os-web-interface-in-jquery-part-i/
> >>
> >
> >




[jQuery] Re: Is this syntax correct?

2008-12-16 Thread MorningZ

It looks like there is a space between "input" and "#emailaddress"

and that makes no sense as that will say:

"give me the control with id "#emailaddress" that is a descendant of
"input""

and  controls do not have descendants





On Dec 16, 1:27 pm, "Rick Faircloth"  wrote:
> I get no errors, but no response, either.
> I tried just using $('#emailaddress').blur... without the "input",
> but then I got a val undefined error.
>
> 
>
>      $(document).ready(function() {
>
>           $('input #emailaddress').blur(function() {
>
>                if (this.val.length == 0)
>                $('#emailerror').show();
>           });    
>      });
>
> 
>
> Thanks,
>
> Rick


[jQuery] Re: Why won't this work?

2008-12-16 Thread Rick Faircloth
I got the #emailError message to hide, but now

I'm trying to figure out how to get it to display

"onblur" of the input.

 

I sent another message to the list for that concern.

 

Thanks,

 

Rick

 

From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf 
Of Charlie Griefer
Sent: Tuesday, December 16, 2008 11:37 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Why won't this work?

 

rick:

 

have you tried putting the:

 

$(document).ready(function(){

  $('#emailError').hide();

});

 

on the index.cfm page?  i believe i just read something that indicated that the 
ajax page load will
be part of the document that it is loading within.

 

On Mon, Dec 15, 2008 at 9:07 PM, Charlie Griefer  
wrote:

until you learn it, sure.  no different than any other tool.

 

On Mon, Dec 15, 2008 at 9:05 PM, Rick Faircloth  
wrote:

Thanks for the insight, Charlie.

 

It seems there are many considerations when

putting Ajax to work.it's going to cause me pain

everywhere I deploy it.

 

 

From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf 
Of Charlie Griefer
Sent: Monday, December 15, 2008 11:01 PM


To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Why won't this work?

 

but if you go here:

http://www.wsm-dev.com/wsm-dev/ajaxlogin2/ajaxLogin.cfm?height=100

&width=250&modal=true

 

...it works.

 

there's something about the fact that you're calling the page inside of the 
thickbox plugin that
makes it different.  i haven't used the plugin, and i'm still fairly new to 
jQuery, so unfortunately
i'm not sure what specifically the issue is, or what the resolution is.  but 
i'd guess that when the
thickbox loads the page, the $(document).ready() doesn't fire in the same way 
that it fires on a
normal page load (or... at all, it would seem).

On Mon, Dec 15, 2008 at 7:24 PM, Rick Faircloth  
wrote:

The code on the server has been update now, Charlie.

Not working on there, either.

 

http://www.wsm-dev.com/wsm-dev/ajaxlogin2/index.cfm

 

But a successful login now takes me to the site_manager.cfm page

thanks to some changes in the code by Matt Williams!

 

You can see the current code here:

 

http://paste.pocoo.org/show/95547/

 

Rick

 

From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf 
Of Rick Faircloth
Sent: Monday, December 15, 2008 9:58 PM


To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Why won't this work?

 

Yes, that's copied and pasted from the IDE, however.

 

I don't think that would be a problem.the second pair of quotes

were put in when I pasted the code into the email.

I had double quotes for the second set and was trying

to be consistent.  I usually use those quotes.

 

I've got the entire login function up at

http://www.wsm-dev.com/wsm-dev/ajaxlogin2/index.cfm

but that version doesn't include the error message bit

that I'm working on.  Someone's reviewing the code

and if I change the online version, it might throw them off.

 

Once I hear from them, I'll add that to it.

 

Can't solve a problem with the online version right now, either.

On successful login, the user should be taken to site_manager.cfm.

But the success text is showing up where the login failure text shows.

 

You can see all the code that's currently working online at

http://paste.pocoo.org/show/95530/

 

I thought I'd try this site out for collaboration and see if that

works better than email zip files all over the place.  If you look

at the site above, you can click on "Paste Details" near the top

and see some response options.  If you click on "reply to this paste"

you can edit the code and it'll put your version in the line that you

can see if you click on "show paste tree."

 

Rick

 

 

 

From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf 
Of Charlie Griefer
Sent: Monday, December 15, 2008 9:48 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Why won't this work?

 

is that the actual code that you copied/pasted from your IDE?  i'm noticing 
'smart quotes' here:

 

$('#emailError').show();  

 

could that be hosing you?

 

is this on a server somewhere we can see it in all its glory in a browser?

 

On Mon, Dec 15, 2008 at 6:43 PM, Rick Faircloth  
wrote:

Well.bummer.  Works for me, too, when it's

on *your* server, Charlie.  You've just got the magic touch.

 

Will this entire block run for you

with all the other code on there?

(Have I coded this properly?)

 



 

   $(document).ready(function(){

  $('#emailError').hide();

   });

 

 

   function validateEmail() {

  

  $("input.email").blur(function() {

 

 if (this.val.length == 0)

   $('#emailError').show();   

  });

   });

 

[jQuery] Is this syntax correct?

2008-12-16 Thread Rick Faircloth

I get no errors, but no response, either.
I tried just using $('#emailaddress').blur... without the "input",
but then I got a val undefined error.



 $(document).ready(function() {

  $('input #emailaddress').blur(function() {

   if (this.val.length == 0)
   $('#emailerror').show(); 
  });
 });



Thanks,

Rick



[jQuery] Re: More About jQuery's Web Browser Compatibility

2008-12-16 Thread Eric Martin

I know that Safari for Windows is supported. I believe IE for MAC
falls under the 5.x line, which is not supported. Unsure about Camino.

On Dec 16, 9:59 am, tallvanilla  wrote:
> Hey All,
>
> The jQuery website states clearly that jQuery is compatible with the
> following web browsers:
>
> IE 6.0+, FF 2+, Safari 2.0+, Opera 9.0+
>
> Unfortunately, that's the only info I could find in the docs about
> browser compatibility.
>
> I know jQuery is compatible with Camino as well (which is basically
> Firefox), but the Firefox and Camino version numbers are not in synch.
> Does anyone know with certainty what minimum version of Camino is
> jQuery-compatible?
>
> What about barely-used browsers like IE for Mac and Safari for
> Windows? I would guess that IE for Mac is NOT compatible with jQuery
> and that Safari for Windows IS compatible with jQuery. Anyone care to
> weigh in?
>
> Thanks in advance!
>
> JR


[jQuery] Re: Using the not() filter

2008-12-16 Thread WhoButSB

Thanks Ricardo after lunch I will give that a try. No the Id is not
the input itself it a actually the parent div and there are a
collection of inputs in the div. I would post my HTML but there is so
much php looping and conditions that it would just Mqke this thread
more confusing.

On Dec 16, 1:04 pm, Ricardo Tomasi  wrote:
> by the way: Is #addNewAdress the input itself? Maybe what you're
> looking for is #addNewAdress :input. Again, seeing the relevant HTML
> would help.
>
> On Dec 16, 1:26 pm, WhoButSB  wrote:
>
> > I gave this a try:
> > $("input:not(#addNewAddress:input, #addNewContactDetail:input)").focus
> > ();
>
> > And the function would still run :-/ .  Maybe I should use the input
> > selector then add a class to the ones i don't want to grab and use the
> > hasClass method to return a false for the ones not supposed to
> > activate.
>
> > But I have to believe there is an easier way.
>
> > On Dec 15, 7:39 pm, Kean  wrote:
>
> > > This probably will work too.
>
> > > $("input:not(#addNewAddress, #addNewContactDetail)").click();
>
> > > On Dec 15, 3:01 pm, "Rik Lomas"  wrote:
>
> > > > Try:
>
> > > > $("input").not('#addNewAddress, #addNewContactDetail').click();
>
> > > > Rik
>
> > > > 2008/12/15 WhoButSB :
>
> > > > > Hello All!
> > > > > I'm trying to figure out the correct way to use the not() method.  I
> > > > > know there is also a :not() filter in selectors class but I couldn't
> > > > > get that one to work either.
>
> > > > > My goal is to add a click function to all the input fields on a page.
> > > > > But not select the input buttons that are nested in certain divs.
>
> > > > > Here is what I have tried so far:
>
> > > > > $("input").not($('#addNewAddress:input',
> > > > > '#addNewContactDetail:input')).click(function(){
> > > > >                        console.log($(this).attr('id'));
> > > > > });
>
> > > > > AND
>
> > > > > $("input").not('#addNewAddress input', '#addNewContactDetail
> > > > > input').click(function(){
> > > > >                        console.log($(this).attr('id'));
> > > > > });
>
> > > > > Neither have worked so far.  Should I be using the :not() command in
> > > > > the selector?
>
> > > > > Thanks for the help!
>
> > > > --
> > > > Rik Lomashttp://rikrikrik.com


[jQuery] Re: One click spreadsheet from table

2008-12-16 Thread tlphipps

You'll definitely have to use something server-side to accomplish
this.  But if I follow what you're after, you don't actually have to
write the data into a file.  You could pass the data to the PHP script
via a GET or POST request, then have PHP send the correct headers for
a file download (including the filename).  Instead of writing the data
into an actual file on the server, you would just have PHP build a
huge string containing all of your data (comma-separated fields, \n
separated rows).

>From the user perspective, they would click a link, then be presented
with the familiar open/save dialog by their browser.

On Dec 16, 11:57 am, GasGiant  wrote:
> Thinking out loud I want to create a one-click solution that turns
> any table into a CSV file and opens the CSV file with whatever app is
> the default for .csv files. I know that I can turn any result set into
> a CSV file with PHP, but that involves writing a file to disk and then
> prompting the user to go open the files with whatever spreadsheet
> program. Plus, I'd have to implement it one result set at a time.
>
> On the other hand jQuery could order and filter the results on the
> client side (already doing this), and I could scrape the DOM and get
> the table using jQuery, but I still don't want to try getting the
> useless, er, rather, users to jump through the (albeit simple) hoops
> of saving and opening the file. Any ideas for that end? The goal is
> one click and, bang, Excel (or whatever) opens with your data set.


[jQuery] Re: Using the not() filter

2008-12-16 Thread Ricardo Tomasi

by the way: Is #addNewAdress the input itself? Maybe what you're
looking for is #addNewAdress :input. Again, seeing the relevant HTML
would help.

On Dec 16, 1:26 pm, WhoButSB  wrote:
> I gave this a try:
> $("input:not(#addNewAddress:input, #addNewContactDetail:input)").focus
> ();
>
> And the function would still run :-/ .  Maybe I should use the input
> selector then add a class to the ones i don't want to grab and use the
> hasClass method to return a false for the ones not supposed to
> activate.
>
> But I have to believe there is an easier way.
>
> On Dec 15, 7:39 pm, Kean  wrote:
>
> > This probably will work too.
>
> > $("input:not(#addNewAddress, #addNewContactDetail)").click();
>
> > On Dec 15, 3:01 pm, "Rik Lomas"  wrote:
>
> > > Try:
>
> > > $("input").not('#addNewAddress, #addNewContactDetail').click();
>
> > > Rik
>
> > > 2008/12/15 WhoButSB :
>
> > > > Hello All!
> > > > I'm trying to figure out the correct way to use the not() method.  I
> > > > know there is also a :not() filter in selectors class but I couldn't
> > > > get that one to work either.
>
> > > > My goal is to add a click function to all the input fields on a page.
> > > > But not select the input buttons that are nested in certain divs.
>
> > > > Here is what I have tried so far:
>
> > > > $("input").not($('#addNewAddress:input',
> > > > '#addNewContactDetail:input')).click(function(){
> > > >                        console.log($(this).attr('id'));
> > > > });
>
> > > > AND
>
> > > > $("input").not('#addNewAddress input', '#addNewContactDetail
> > > > input').click(function(){
> > > >                        console.log($(this).attr('id'));
> > > > });
>
> > > > Neither have worked so far.  Should I be using the :not() command in
> > > > the selector?
>
> > > > Thanks for the help!
>
> > > --
> > > Rik Lomashttp://rikrikrik.com


[jQuery] Re: Smart image resizing "Idea"

2008-12-16 Thread Eric "Hobo" Garside

The scaling plugin is located here:
http://snipplr.com/view/10532/jquery-scaling-plugin/

It allows you to call the "scale" method on any object, providing it a
target to scale to. More is explained in the snipplr comments, but
feel free to ask.

On Dec 16, 12:40 pm, "Eric \"Hobo\" Garside" 
wrote:
> Yousef,
>
> I've actually been working on a plugin that has this kind of
> functionality. I'll throw up a modified version of the scaling library
> on snipplr with some documentation for it.
>
> On Dec 16, 8:43 am, Yousef  wrote:
>
> > Smart image resizing "Idea"
>
> > Dears,
> > I am new to JQuery.I have an idea I want to share with you and i hope
> > one of the programmer write the code for it.
>
> > the idea is to resize an image to a custom width and keeping the
> > relation between the width and height ,for example:
>
> > * if the width less than 600px ---> do nothing   "no need to change"
>
> > *if the width =1000 and height=500 > reside to: width=500 and
> > height=250 "the height is still 50% of the width"
> > *when the resided image is clicked, pop up a windows with the original
> > size
> > *above the image, write "click here to enlarge"
>
> > I hope you got the idea, and I hope one if you write the code for it
> > or please help me how could I do it.


[jQuery] Re: Using the not() filter

2008-12-16 Thread Ricardo Tomasi

Try this:

var unwanted = $('#addNewAdress,#addNewContactDetail');
$('input').not(unwanted).click(function(){
   console.log(this.id);
});

This is exactly the same as your first posted code, I just tested and
it works. What does your HTML look like?


On Dec 16, 1:26 pm, WhoButSB  wrote:
> I gave this a try:
> $("input:not(#addNewAddress:input, #addNewContactDetail:input)").focus
> ();
>
> And the function would still run :-/ .  Maybe I should use the input
> selector then add a class to the ones i don't want to grab and use the
> hasClass method to return a false for the ones not supposed to
> activate.
>
> But I have to believe there is an easier way.
>
> On Dec 15, 7:39 pm, Kean  wrote:
>
> > This probably will work too.
>
> > $("input:not(#addNewAddress, #addNewContactDetail)").click();
>
> > On Dec 15, 3:01 pm, "Rik Lomas"  wrote:
>
> > > Try:
>
> > > $("input").not('#addNewAddress, #addNewContactDetail').click();
>
> > > Rik
>
> > > 2008/12/15 WhoButSB :
>
> > > > Hello All!
> > > > I'm trying to figure out the correct way to use the not() method.  I
> > > > know there is also a :not() filter in selectors class but I couldn't
> > > > get that one to work either.
>
> > > > My goal is to add a click function to all the input fields on a page.
> > > > But not select the input buttons that are nested in certain divs.
>
> > > > Here is what I have tried so far:
>
> > > > $("input").not($('#addNewAddress:input',
> > > > '#addNewContactDetail:input')).click(function(){
> > > >                        console.log($(this).attr('id'));
> > > > });
>
> > > > AND
>
> > > > $("input").not('#addNewAddress input', '#addNewContactDetail
> > > > input').click(function(){
> > > >                        console.log($(this).attr('id'));
> > > > });
>
> > > > Neither have worked so far.  Should I be using the :not() command in
> > > > the selector?
>
> > > > Thanks for the help!
>
> > > --
> > > Rik Lomashttp://rikrikrik.com


[jQuery] More About jQuery's Web Browser Compatibility

2008-12-16 Thread tallvanilla


Hey All,

The jQuery website states clearly that jQuery is compatible with the
following web browsers:

IE 6.0+, FF 2+, Safari 2.0+, Opera 9.0+

Unfortunately, that's the only info I could find in the docs about
browser compatibility.

I know jQuery is compatible with Camino as well (which is basically
Firefox), but the Firefox and Camino version numbers are not in synch.
Does anyone know with certainty what minimum version of Camino is
jQuery-compatible?

What about barely-used browsers like IE for Mac and Safari for
Windows? I would guess that IE for Mac is NOT compatible with jQuery
and that Safari for Windows IS compatible with jQuery. Anyone care to
weigh in?

Thanks in advance!

JR


[jQuery] One click spreadsheet from table

2008-12-16 Thread GasGiant

Thinking out loud I want to create a one-click solution that turns
any table into a CSV file and opens the CSV file with whatever app is
the default for .csv files. I know that I can turn any result set into
a CSV file with PHP, but that involves writing a file to disk and then
prompting the user to go open the files with whatever spreadsheet
program. Plus, I'd have to implement it one result set at a time.

On the other hand jQuery could order and filter the results on the
client side (already doing this), and I could scrape the DOM and get
the table using jQuery, but I still don't want to try getting the
useless, er, rather, users to jump through the (albeit simple) hoops
of saving and opening the file. Any ideas for that end? The goal is
one click and, bang, Excel (or whatever) opens with your data set.


[jQuery] Re: using cycle for website navigation, choppy in firefox

2008-12-16 Thread Mike Alsup

> I am creating a website for my company.  I am using the cycle plugin to
> navigate horizontally between pages.  The plugin is awesome.  However the
> site is starting to get pretty full and I've just added something that has
> made the cycle navigation choppy, just in firefox.  The site is not public
> so I don't have a URL.  But I just added a div to the page to allow for some
> internal scrolling which seemed to be the cause of the choppiness.
> Here is the CSS for the div that I just added that made the site choppy.
>  This div goes inside of the div that gets cycled.
> .scrolling {
>     overflow-y: auto !important;
>     position: absolute;
>     width: 100%;
>     height: auto;
>     top: 270px;
>     bottom: 0;
>
> }
>
> Is there something obvious in here that might be causing the problem?  Or do
> I need to show more code?
> Thank you very much.
> Mike


That's not enough code to give me any ideas.  Can you create a small
demo page that shows the problem and post a link?


[jQuery] Re: SimpleModal v1.2 released

2008-12-16 Thread Eric Martin

I just released 1.2.2 which fixed all of the IE6 related positioning
bugs.

Thanks to Deepak Mehta, Bill Beckelman, James Taylor and others for
your help finding these issues.



On Dec 4, 11:34 am, Eric Martin  wrote:
> A new version ofSimpleModalhas been released. It contains a few
> improvements and fixes for browser related issues.
>
> There are some new options and a few that have been deprecated, so
> make sure to check out the project homepage for a list changes and
> upgrade details.
>
> Homepage:http://www.ericmmartin.com/projects/simplemodal/
>
> Demos:http://www.ericmmartin.com/simplemodal/
>
> Plugin Page:http://plugins.jquery.com/project/SimpleModal
>
> I've also updated the contact form demo to include a subject and cc
> field, as well as utf-8 support. For those of you who use the SMCF
> WordPress plugin, I'll be updating that shortly.
>
> Thanks to everyone who has usedSimpleModaland provided valuable
> feedback!
>
> -Eric


[jQuery] Re: Smart image resizing "Idea"

2008-12-16 Thread Eric "Hobo" Garside

Yousef,

I've actually been working on a plugin that has this kind of
functionality. I'll throw up a modified version of the scaling library
on snipplr with some documentation for it.

On Dec 16, 8:43 am, Yousef  wrote:
> Smart image resizing "Idea"
>
> Dears,
> I am new to JQuery.I have an idea I want to share with you and i hope
> one of the programmer write the code for it.
>
> the idea is to resize an image to a custom width and keeping the
> relation between the width and height ,for example:
>
> * if the width less than 600px ---> do nothing   "no need to change"
>
> *if the width =1000 and height=500 > reside to: width=500 and
> height=250 "the height is still 50% of the width"
> *when the resided image is clicked, pop up a windows with the original
> size
> *above the image, write "click here to enlarge"
>
> I hope you got the idea, and I hope one if you write the code for it
> or please help me how could I do it.


[jQuery] Re: Licensing Question

2008-12-16 Thread Eric "Hobo" Garside

Much thanks. My concerns over licensing have always been pretty moot.
I usually just throw a GPL on there and call it a day. This
commercially supported open source is new to me. :)

On Dec 16, 12:34 pm, "Michael Geary"  wrote:
> You can license your plugin in any way you want. You don't have to use the
> same licenses as jQuery itself.
>
> For jQuery, just ignore the GPL license and use the MIT license instead.
> Read the license - it really doesn't restrict you at all. It essentially
> just says "Keep the copyright and license notice in the code, and don't sue
> anyone if the code doesn't work." That's really all there is to it.
>
> http://www.opensource.org/licenses/mit-license.php
>
> -Mike
>
> > From: Eric "Hobo" Garside
>
> > I've got a quick question for all the licensing gurus who
> > happen to be on or about the list. I'm developing a plugin
> > for jQuery for a company, and want to release it as open
> > source with a non-competition stipulation. Is it possible to
> > release the code under something like a Creative Commons
> > license where it's free for non corporate use, but requires
> > companies who seek to use the product in a commercial sense
> > to seek a license? I ask only given the dual licensing of
> > jQuery under both the MIT and GPL licenses which, as far as I
> > know, normally deny that kind of licensing?


[jQuery] using cycle for website navigation, choppy in firefox

2008-12-16 Thread Mike Dodge
I am creating a website for my company.  I am using the cycle plugin to
navigate horizontally between pages.  The plugin is awesome.  However the
site is starting to get pretty full and I've just added something that has
made the cycle navigation choppy, just in firefox.  The site is not public
so I don't have a URL.  But I just added a div to the page to allow for some
internal scrolling which seemed to be the cause of the choppiness.
Here is the CSS for the div that I just added that made the site choppy.
 This div goes inside of the div that gets cycled.
.scrolling {
overflow-y: auto !important;
position: absolute;
width: 100%;
height: auto;
top: 270px;
bottom: 0;
}

Is there something obvious in here that might be causing the problem?  Or do
I need to show more code?
Thank you very much.
Mike


[jQuery] Is there a way to call scroll from outside jQuery.?

2008-12-16 Thread Jigga

Thank for this great plugin.

I have one problem. I have created two carousels fetching images with
Ajax, on the same page.

First carousel displays and scrolls only one image each scroll.
The second carousel displays and scrolls 4 images each scroll. This
carousel is supposed to be a thumbnail list previewing the images to
come in the first carousel.

What I would like is, when I click on say image 4 in the second
carousel, I would like the first carousel to scroll to that index. I
have managed to make the links out of these images, but I would want
something like, onclick=scrollto(4)

and then function scrollto(i){

  carousel.scroll(i); // So I want this to be my first carousel.
}

Is there a way to do this? How do I acquire the created carousel
object within the scrollto function?

I've spent so much time on this and I'm so hoping that someone can
help me.


[jQuery] superfish - font colors

2008-12-16 Thread rick

Is there a way to have one color font for the main nav. link and a
different color font for the links in the drop downs?

(This is my first time working with Superfish.)

A demo/draft page with my progress is at...

http://www.gofullsail.com/1-base-l2b.html

I would prefer that the drop down text could be white, for which I
would have a black background (which I see how to apply).

Thank you.


[jQuery] Smart image resizing "Idea"

2008-12-16 Thread Yousef

Smart image resizing "Idea"

Dears,
I am new to JQuery.I have an idea I want to share with you and i hope
one of the programmer write the code for it.

the idea is to resize an image to a custom width and keeping the
relation between the width and height ,for example:

* if the width less than 600px ---> do nothing   "no need to change"

*if the width =1000 and height=500 > reside to: width=500 and
height=250 "the height is still 50% of the width"
*when the resided image is clicked, pop up a windows with the original
size
*above the image, write "click here to enlarge"

I hope you got the idea, and I hope one if you write the code for it
or please help me how could I do it.


[jQuery] Re: Licensing Question

2008-12-16 Thread Michael Geary

You can license your plugin in any way you want. You don't have to use the
same licenses as jQuery itself.

For jQuery, just ignore the GPL license and use the MIT license instead.
Read the license - it really doesn't restrict you at all. It essentially
just says "Keep the copyright and license notice in the code, and don't sue
anyone if the code doesn't work." That's really all there is to it.

http://www.opensource.org/licenses/mit-license.php

-Mike

> From: Eric "Hobo" Garside
> 
> I've got a quick question for all the licensing gurus who 
> happen to be on or about the list. I'm developing a plugin 
> for jQuery for a company, and want to release it as open 
> source with a non-competition stipulation. Is it possible to 
> release the code under something like a Creative Commons 
> license where it's free for non corporate use, but requires 
> companies who seek to use the product in a commercial sense 
> to seek a license? I ask only given the dual licensing of 
> jQuery under both the MIT and GPL licenses which, as far as I 
> know, normally deny that kind of licensing?



[jQuery] Re: event fires exponentially

2008-12-16 Thread Jan Limpens

And this does work:

$(document).ready(function(){
$form = $('#filter-form');
$('input', $form).change(function(){
$form.ajaxSubmit({
dataType: 'json',
success: function(){},
target: "#layout-child-output"
});
});
})

strange, though

On Tue, Dec 16, 2008 at 3:27 PM, Jan Limpens  wrote:
> Must be some bug in ajaxForm, I guess.
>
> if I change
>   $('input', $form).change(function(){
>   $form.submit();
>   });
>
> to
>   $('input', $form).change(function(){
>   alert('peng');
>   });
>
> it fires once only, otherwise I get the exponential behavior. My guess
> is, that ajaxForm.submit() somehow touches the inputs and triggers the
> change event recursively. But that is just my impression...
>
> On Tue, Dec 16, 2008 at 3:12 PM, Jan Limpens  wrote:
>> No, unfortunately... but I may be able to put something up...
>>
>> On Tue, Dec 16, 2008 at 3:05 PM, Eric Hobo Garside  wrote:
>>>
>>> Do you have a live environment where this is hosted, or at least the
>>> code for the page to test it locally? Looks like it should be working
>>> fine, at face value.
>>>
>>> On Dec 16, 11:55 am, "Jan Limpens"  wrote:
 Hi guys,

 I have this piece of innocent looking code:

 
 $(document).ready(function(){
 $form = $('#filter-form');
 $form.ajaxForm({
 //dataType: 'json',
 success: function(){
 alert("peng");
 },
 target: "#layout-child-output"
 });
 $('input', $form).change(function(){
 $form.submit();
 });})

 

 If I check one checkbox, I get one submit, for 2 2, however for 3 4,
 for 4 16, and so on until the server crashes.

 Any idea what is wrong here?
 --
 Jan
>>
>>
>>
>> --
>> Jan
>>
>
>
>
> --
> Jan
>



-- 
Jan


[jQuery] Re: [TUTORIAL] Creating an OS Web Interface in jQuery (Part I)

2008-12-16 Thread Liam Potter


good for a beginner to start learning from, but what does this offer?, 
really it is some pretty graphics and a click and drag script and some 
mouse clicks ?


Rick Faircloth wrote:

Great idea, Adrian!  Good work!

Rick

  

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf 
Of AdrianMG
Sent: Tuesday, December 16, 2008 7:57 AM
To: jQuery (English)
Subject: [jQuery] [TUTORIAL] Creating an OS Web Interface in jQuery (Part I)


Finally here you have the First Part of this series of tutorials to
recreate an OS Web Interface with our lovely jQuery javascript
library.

Here you have the link guys, I hope you can use it for your personal
projects:

http://yensdesign.com/2008/12/creating-an-os-web-interface-in-jquery-part-i/



  




[jQuery] Re: mod'ing pseudo-classes...possible?

2008-12-16 Thread D A

Thanks, Dave. I'll give it a shot!

Worse case, I used the same image, but two different spans and swap them out.

-Darrel

On Sat, Dec 13, 2008 at 1:42 PM, Dave Methvin  wrote:
>
>> $(".detailsPaneToggle").children("a").css('background-position','0px -35px');
>> $(".detailsPaneToggle").children("a:hover").css('background-position','0px
>> -80px');
>
> I think you can do this without script, except for IE6.
>
> 
> .detailsPaneToggle > a {
>  background-position: 0px -35px;
> }
> .detailsPaneToggle > a:hover,  .detailsPaneToggle > a.hover {
>  background-position: 0px -80px
> }
> 
>
> If you add this script for IE6 it should work there too.
>
> $(".detailsPaneToggle > a").hover(
>  function(){ $(this).addClass("hover") },
>  function(){ $(this).removeClass("hover") }
> });
>


[jQuery] Re: event fires exponentially

2008-12-16 Thread Jan Limpens

Must be some bug in ajaxForm, I guess.

if I change
   $('input', $form).change(function(){
   $form.submit();
   });

to
   $('input', $form).change(function(){
   alert('peng');
   });

it fires once only, otherwise I get the exponential behavior. My guess
is, that ajaxForm.submit() somehow touches the inputs and triggers the
change event recursively. But that is just my impression...

On Tue, Dec 16, 2008 at 3:12 PM, Jan Limpens  wrote:
> No, unfortunately... but I may be able to put something up...
>
> On Tue, Dec 16, 2008 at 3:05 PM, Eric Hobo Garside  wrote:
>>
>> Do you have a live environment where this is hosted, or at least the
>> code for the page to test it locally? Looks like it should be working
>> fine, at face value.
>>
>> On Dec 16, 11:55 am, "Jan Limpens"  wrote:
>>> Hi guys,
>>>
>>> I have this piece of innocent looking code:
>>>
>>> 
>>> $(document).ready(function(){
>>> $form = $('#filter-form');
>>> $form.ajaxForm({
>>> //dataType: 'json',
>>> success: function(){
>>> alert("peng");
>>> },
>>> target: "#layout-child-output"
>>> });
>>> $('input', $form).change(function(){
>>> $form.submit();
>>> });})
>>>
>>> 
>>>
>>> If I check one checkbox, I get one submit, for 2 2, however for 3 4,
>>> for 4 16, and so on until the server crashes.
>>>
>>> Any idea what is wrong here?
>>> --
>>> Jan
>
>
>
> --
> Jan
>



-- 
Jan


[jQuery] Star Ratings - update value from callback

2008-12-16 Thread robgallen

Using the most excellent Star Ratings from fyneworks.com (v2.5) - I'd
like to be able to set the current value of a ratings object from an
external function.

We use a callback to post the rating value to an ajax handler, which
then returns the new average rating for that item. E.g. 4 users have
rated an item, average is 4/10. 5th user rates it 9/10, new average is
therefore 5/10.

Here's what I'm coding:
$('div.userRating input').rating({ half: true, callback:
ratingCall });

function ratingCall(value, link) {
var _productId = this.name.substring(5);// e.g. 'rate-4526' = '4526'
// post rating (value), userid, productid to handler, returns json
$.post('/handlers/PostRating.ashx', { **my data, blah** }, function
(data) {
var _dataObj = eval('('+ data +')');
var _msg = data.FeedbackMessage;
$('#ratingMsg-' + _productId).html(_msg).show();
var _newAvg = data.NewAverage;
// update this ratings instance with new average - How?
});
}

I'm setting the initial value when I write out the input elements -
e.g.  - but I'm just not sure where to start with trying to update the
stars ui from the callback function.

Anyone got any ideas? I'm hoping Diego A will catch a glimpse of
this :)


[jQuery] Re: jQuery.uploader released: Flash based jQuery uploader

2008-12-16 Thread rernens



> Hmm, i'll have to investigate that, but i am rather busy atm.
>
I can live without the post of additional parms, I changed my backend
code to handle query string instead of form-data. Anyway if there is
something I can do to help, let me know.

> What flash version are you using? Did you try to upgrade it to the
> latest version?

I tried both 9 and the latest 10. Same behavior. What's strange is
that it worked for a while than stopped working.

> I absolute did NOT want the plugin to be dependent on jQuery.ui, so if
> you can rewrite it so it doesn't use any other jQuery stuff i would be
> happy to give you the credits for it and include the fix in the code.
>

What do you mean by "it doesn't use any other jQuery stuff" ? I am not
looking for any credits. I simply used the $.widget function of core
ui to ensure each instance of the plugin has its own settings and
events handling space. Feel free to do what you want with it.

> > I am still stuck with the swf movie not triggering the events after
> > fileUploadStarted. Not being familiar with  swf development, I don't
> > know if you have additional debugging facilities to identify what
> > would cause the swf movie not to trigger the events.
>
> Working on that also.

I definitely need to figure out why the swf movie no longer triggers
events after fileUploadStarted. Any idea on where to look for ?


[jQuery] Re: $(document).ready on an ajax return?

2008-12-16 Thread davidgregan

I'd like to add that I can't even access the new DOM elements in IE in
the $.get() callback function,  but I can in firefox. it's like IE
doesn't insert the new HTML into the dom until after the callback is
executed. that sucks! ;P

On Dec 16, 9:42 am, davidgregan  wrote:
> sorry, I may have oversimplified my example above, replace alert
> ("content Loaded"); with this:
>
> $("#childInput").change(function()
> {
> alert("input changed!");
>
> });
>
> so I want to add an event to a DOM element in the loaded page so the
> DOM has to be ready before I can execute the code. The method you
> suggest will work fine for alerts, but it doesn't seem to work for
> adding events like above, at least not in IE.
>
> Thanks.
>
> On Dec 16, 9:33 am, rernens  wrote:
>
> > There is no need to run $(document).ready when loading a page with
> > ajax using
> > jQuery. The scripts contained in the loaded content are automatically
> > evaluated after the load has been successfull. You should insert at
> > the end of the document you are loading
> > 
> > alert("content loaded")
> > 
>
> > It will work flawlessly in both browsers.
>
> > On 16 déc, 17:13, davidgregan  wrote:
>
> > > I'm using a $.get call to get the contents for a dialog box and I'm
> > > trying to run the $(document).ready on the ajax return like so:
>
> > > parentPage.html:
> > > $.get('desiredContent.html',function(data){
> > > $("#dialogBoxDiv").html(data);
> > > $("#dialogBoxDiv").dialog('open');
>
> > > }
>
> > > desiredContent.html:
> > > $(document).ready(function() {
> > > alert("content loaded!");
>
> > > });
>
> > > this works fine for firefox, but ie won't run the $(document).ready()
> > > function on the desiredContent page. Is there a way to do this that
> > > will work in both firefox and ie?
>
> > > Thanks!


  1   2   >