[jQuery] Re: which autocomplete plugin ...?

2007-07-23 Thread Dylan Verheul


Use Jörn's:
http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/

On 7/23/07, mit <[EMAIL PROTECTED]> wrote:


I'm looking for a stable autocomplete plugin. Of the various
autocomplete
plugins available, which are most commonly used/most stable?




[jQuery] Re: Loading Javascript Dynamically (in other words, as needed)

2007-07-23 Thread Stephan Beal

On Jul 23, 4:06 am, Dave Methvin <[EMAIL PROTECTED]> wrote:
> All of those results make sense.
>
> > "print( (new String('foo') === new String('foo')))"
> > false
>
> Those are two different objects, even though they have the same value;
> object1 !== object2 by definition of the === operator.

Agreed.

> In real code, I have never seen a good reason to use 'new String()'
> rather than a primitive string. There are are several situations where
> 'new String()' will break code that seems like it should work
> perfectly well--for example, in an eval() or switch statement.

Agreed as well, but new String() does turn up unexpectedly from time
to time. Try this code with jQuery 1.1.3.1:

alert( $(mySelector).css( 'background-color', null ) )

That misbehaves and acts like a getter, and returns the color using
(new String()). (i had to spend some time debuggering that problem in
an application.)

>  "print('foo' === 'foo')"
> true
>
> Two primitives with the same type and value are === as well as ==

i probably would expect it for string constants, but i would not
expect it to be true for computed strings:

[EMAIL PROTECTED]:~$ SpiderApe -e "a=function(){return 'abc'[0];};
print(a() === 'a')"
true

> > "print(typeof someUndefined == 'fuzzyDuck')"
> > false
>
> typeof someUndefined is 'undefined', and 'undefined' != 'fuzzyDuck'

This makes sense, of course, but seems to contradict the standard (as
Rob described it above).

> > "print(typeof someUndefined == 'undefined')"
> > true
>
> typeof someUndefined is 'undefined' (string) so the two are equal.

This is a case where i would not expected === to work because typeof
computes a value and 'undefined' is a constant string literal that the
JS compiler can intern/pool (whereas the 'undefined' returned from
typeof is a native C string somewhere in the engine).

> > "print(typeof someUndefined == undefined)"
> > false
>
> The string 'undefined' is never equal to the intrinsic undefined
> value.

i find it unfortunate that typeof returns a string 'undefined' for the
undefined case, similarly to how the sqlite3 C library has a function
called sqlite3_error() which returns the last error string from the
library and evaluates to the string "not an error" when there is no
error (instead of using a null string, as would have been more
sensible).

Of course, no matter how unfortunate i find it, it's written in stone
in the ECMA standard, so bitching won't do much about it.

:)



[jQuery] Re: What am I missing from this plugin?

2007-07-23 Thread Klaus Hartl


Stephan Beal wrote:

On Jul 22, 11:57 pm, Klaus Hartl <[EMAIL PROTECTED]> wrote:

IMHO it is bad practice to store that element in the self, i.e. jQuery,
object.

...

A simple var should be sufficient.

jQuery.fn.myPlugin = function(targetField) {
 var textfield = jQuery(targetField);
 ...

};


Assuming we need to hold on to the target long-term (e.g., in inner
functions or even classes), would this be a more acceptable approach
to using self to sort the jQuery object:

jQuery.fn.myPlugin = function(targetField) {
var self = this;
self.target = targetField;
...
var textfield = jQuery(self.target);
  ...
};

?

The difference is that this one is holding the selector string, and
not the jQuery object (unless, of course, the user passes a jQ as
targetField).


But that doesn't make any difference. It would still overwrite a 
property named "target" of the jQuery object.


You have to know jQuery very well to not accidently use a name that 
isn't already in use. And who knows if jQuery 1.1.4 does not introduce a 
target property on the jQuery object? Jörn described that very well a 
while ago in another thread - I think that was related to one of your 
plugins ;-)


Again, a var should be sufficient using closures. Or if you need to 
store things in another object, create a new one but do not use the 
jQuery object.



--Klaus


[jQuery] Re: DNN and jQuery Conflict

2007-07-23 Thread Armand Datema


No problem let me know if you have solved it.

Armand

On 7/21/07, James <[EMAIL PROTECTED]> wrote:


Thank you, Armand, for your swift response. I will look into these
recommendations and see what I can't make work.

On Jul 21, 4:43 am, "Armand Datema" <[EMAIL PROTECTED]> wrote:
> Mm i never had issues with dnn and js
>
> I just add my script in the default.aspx page myself that works most of the 
time
>
> also the page header tags option is not very usuable, you cannot add
> to many scripts more than a few lines and it gets saved truncated so
> you have missng code and none closed tags
>
> I do the call for the scripts ( plugins and jquery ) in the main
> default.aspx ( make sure to do it as
>
> http://www.mydnnportal.com/js/jquery.js   ( dont use /js/jquery.js )
> - if youa re deep in a friendly url like
>
> http://www.mydnnportal.com/tabid/87/myproperty/myvalue/default.aspx
>
> it cannot find the js file because there is 
nohttp://www.mydnnportal.com/tabid/87/myproperty/myvalue/js
>
> as for the direct calls to actually call plugin with the desired
> parameters the can be inserted in he top of your skin ascx files
>
> <% ascx
> 
> script here
> 
>
> I also use the snapsis dnn css module with template possibility's
> together with dnn. So if I use that he has a specal option that allow
> you to put all scripts ins special tags and than the skinobject itself
> takes care of the register.clientsidescript for you to make sure it
> gets injected in the head
>
> I have been using it in over 100 portals so far an never an issue
>
> ps: for the pure jquery people, im answering this mail with tems of
> jquery asp.net and dotnetnuke
>
> Armand
> aka Nokiko on dnn forum
>
> On 7/21/07, James <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > Alex,
>
> > In this case, the only plugin I'm attempting to include is the Jorn
> > Zaefferer's Tooltip plugin; of course, in addition to the actual
> > jQuery (1.1.3.1) script itself.
>
> > On Jul 21, 5:03 am, "Alexandre Plennevaux" <[EMAIL PROTECTED]>
> > wrote:
> > > Hi James,
>
> > > Did you check that it is not a namespace issue? Also, which plugins do you
> > > intend to use? Not all jquery plugins were created equals in quality...
>
> > > Alex
>
> --
> Armand Datema
> CTO SchwingSoft





--
Armand Datema
CTO SchwingSoft


[jQuery] Re: What am I missing from this plugin?

2007-07-23 Thread Stephan Beal

On Jul 23, 9:26 am, Klaus Hartl <[EMAIL PROTECTED]> wrote:
> But that doesn't make any difference. It would still overwrite a
> property named "target" of the jQuery object.

Ah, i now see what you mean. Yes, that would of course be a danger.

> You have to know jQuery very well to not accidently use a name that
> isn't already in use. And who knows if jQuery 1.1.4 does not introduce a
> target property on the jQuery object? Jörn described that very well a
> while ago in another thread - I think that was related to one of your
> plugins ;-)

Very possibly - i liberally use custom fields to store internal data.
i'll have to go revisit that approach.

> Again, a var should be sufficient using closures. Or if you need to
> store things in another object, create a new one but do not use the
> jQuery object.

Thanks for the clarification.

Something to consider for jQuery:

In my embedded JS code i often create top-level classes for my
applications, e.g.:

function MyApp() { ... }

Then i want client code to be able to safely store their own data in
there without colliding with mine, so i do:

MyApp.client = {};

And that becomes the "public" place to store any client-specific data,
and my app promises not to touch that field. For example, i have an
ncurses JS wrapper and a small framework built on top of it for
providing basic ncurses app functionality. In that framework i specify
that MyApp.client is the place where client-side code can store their
data, and in my apps i use MyApp.client.windows to store my client-
specific ncurses windows. Here's a screenshot demonstrating what i
mean:

http://spiderape.sourceforge.net/screenshots/ape-20050910.png

(somewhere in there is an object called ApeWS.windows.client - near
the bottom/left)

i think jQuery could benefit from the same idea, with the intention
being that plugin authors have a "safe haven" where they can attach
data to jQuery objects.

:)



[jQuery] Country drop down behaves strangely

2007-07-23 Thread [EMAIL PROTECTED]

Hi

Im using the following code for a country / city dropdown. when a user
selects a country, the dropdown for city populates with the
appropriate list i.e: UK > London, Manchester, Liverpool etc... An
issue that Im seeing in Firefox but not in IE is that when I attempt
to jump to a set of countries by hitting a key on the keyboard i.e:
such as F to jump to France, Finland etc... the dropdown doesnt jump
down as far as these countries. Ive searched google for answers but
there doesnt seem to be anyone with the same issue.

Any ideas?

Chris



[jQuery] Re: unblockUI: problem with Internet Explorer

2007-07-23 Thread [EMAIL PROTECTED]

Hi Mike,

sorry but that isn't working either. Rather than a problem in
attaching an event to an element either before of after it's been
added to the DOM it looks like I'm having dificulties accessing some
of jQuery's functions, since I'm always able to trigger an event to
show me an alert(), but not so with native jQuery functions like
$.ajaxStop() or $.unblockUI(). For example, this will work:

$.blockUI(message);
cancel.click(function(){ alert("foo"); });

but this won't:


$.blockUI(message);
cancel.click($.unblockUI);

It's frustrating, because I'm running out of ideas and I don't even
know if this is a known issue with IE and BlockUI.

Thanks, and all ideas welcome.

Abel.

On Jul 20, 3:47 pm, "Mike Alsup" <[EMAIL PROTECTED]> wrote:
> abel,
>
> Your event handler needs to be added *after* the elements have been
> added to the DOM and since blockUI manipulates the DOM, you need to
> add your click handler after you block.  So try something along these
> lines:
>
> $.blockUI(message);
> cancel.click($.unblockUI);
>
> Mike
>
> On 7/20/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hi everyone.
> > I'm using blockUI for a project and can't get it to work properly
> > under IE 6 and 7 (yeah, I know what you guys thinking, me too).
> > The problem comes when I try to use the function $.unblockUI() when
> > certain events trigger, ie:
>
> > var cancel =
> >   $("")
> >   .bind("click", function(){ $.unblockUI(); });
>
> > var message =
> >   $("")
> >   .append("")
> >   .append(cancel);
>
> > // This is where I add functionality.
> > $(".myAnchor")
> >   .bind(
> > "click",
> > $.blockUI(message);
>
> > Everything goes swimingly and the modal form appear whenever I click
> > on "MyAnchor", but when I click on "Cancel" I can't get it to unblock
> > (it works on Firefox though, of course). I think I've tried
> > everything, like defining the cancel button through more rustic means
> > like so (ready to remember the early 2000's?):
>
> > var cancel =
> >   $(" > >")
>
> > but this won't work either (in IE 6 and 7). Oh! I also tried switching
> > from jQuery 1.3 to 1.1 since that's the version they use in the
> > official page for the plugin and it works under Internet Explorer, but
> > that didn't work either.
> > I was wondering if this is a known issue with IE and there's a way to
> > solve it.
>
> > Thanks and sorry for the long post.



[jQuery] Re: Country drop down behaves strangely

2007-07-23 Thread Klaus Hartl


[EMAIL PROTECTED] wrote:

Hi

Im using the following code for a country / city dropdown. when a user
selects a country, the dropdown for city populates with the
appropriate list i.e: UK > London, Manchester, Liverpool etc... An
issue that Im seeing in Firefox but not in IE is that when I attempt
to jump to a set of countries by hitting a key on the keyboard i.e:
such as F to jump to France, Finland etc... the dropdown doesnt jump
down as far as these countries. Ive searched google for answers but
there doesnt seem to be anyone with the same issue.

Any ideas?

Chris


I ran into the same issue recently at Plazes. What caused the issue was 
a declared width for the select. I ended up using min- and max-width 
instead of width, which didn't cause that strange behavior:


select {
width: 150px;
max-width: 150px;
min-width: 150px;
}
:root select { /* hide from IE */
width: auto;
}


--Klaus


[jQuery] Re: IE 7/6 frozen with massive use of jquery & plugins

2007-07-23 Thread oscar esp

Thanks Oliver.
I will try.

On 21 jul, 14:52, Olivier Percebois-Garve <[EMAIL PROTECTED]> wrote:
> I m no specialist of such issue but you could first check if its memory
> related.
> Just browse your website and see if the memory is continuously
> rising.(In the task-manager)
>
>
>
> oscar esp wrote:
> > I have intermittent error, basically IE is frozen. I can not reproduce
> > seems that I doesn't follow a pattern.
>
> > I have developed an application with asp and I use a lot of jquery in
> > order to do Ajax call to load scripts and pages.
>
> > The structure of the application is:
>
> > I have a main page with two divs:
>
> > a) Menu div.
>
> > b) Content div.
>
> > When  I load the main page I load all the java files that I will need
> > using ajax.
> > I use a lot of plugins superfish, validation, form, IFrame, block...etc.
>
> > When user chose a menu option:
>
> > -  Block the page with waiting message.
> > -  Clean content div (using empty method).
> > -  Call using ajax to the option page (ex: newCustomer).
> > o  In the success: I assign the data of the result of the ajax
> > call to the content div.
> > o  If the loaded page has some dynamics divs then I use again
> > an ajax call to load that dynamic links.
>
> > I don't know why the system froze.
>
> > Maybe is because I load all the javascript in the main window and it
> > is too much?
> > Maybe javascript has any "expiration"?
> > Maybe is because I jquery can not control all the events (remember
> > that I only load jquery one time) and I use a lot of forms with
> > validations (plugin validation) and ajax calls?
> > Could be related with the cpu? My pc is quite powerful , and It seems
> > (seems...) that happens more often with I less powerful pcs...
>
> > I am I little bit desperate because I don't' know who begin to
> > investigate the problem.
>
> > Any help?- Ocultar texto de la cita -
>
> - Mostrar texto de la cita -



[jQuery] Re: What are most commonly-used menu plugins?

2007-07-23 Thread Stephan Beal

On Jul 23, 1:41 am, Rhapidophyllum <[EMAIL PROTECTED]> wrote:
> I'm simply looking for a stable menu plugin.  Of the various menu
> plugins available, which are most commonly used/most stable?

There are unfortunately no real metrics for this, so i'm GUESSING here
based on how many posts i see on this list. In no particular order:

- blockUI
- tabs
- autocompleter
- Interface (mostly drag/drop)
- forms

i think those are the top 5 (again, not in order), based on my
impression (not a mathematical fact!) of the number of posts people
make here. That is admittedly a questionable metric because some
plugins are inherently so small/easy-to-use that people don't need to
ask questions about them very often.



[jQuery] Re: Country drop down behaves strangely

2007-07-23 Thread [EMAIL PROTECTED]

Wow I wouldnt have even thought to set that property.

Works a charm!

Thanks :)

Chris

On Jul 23, 9:19 am, Klaus Hartl <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > Hi
>
> > Im using the following code for a country / city dropdown. when a user
> > selects a country, the dropdown for city populates with the
> > appropriate list i.e: UK > London, Manchester, Liverpool etc... An
> > issue that Im seeing in Firefox but not in IE is that when I attempt
> > to jump to a set of countries by hitting a key on the keyboard i.e:
> > such as F to jump to France, Finland etc... the dropdown doesnt jump
> > down as far as these countries. Ive searched google for answers but
> > there doesnt seem to be anyone with the same issue.
>
> > Any ideas?
>
> > Chris
>
> I ran into the same issue recently at Plazes. What caused the issue was
> a declared width for the select. I ended up using min- and max-width
> instead of width, which didn't cause that strange behavior:
>
> select {
>  width: 150px;
>  max-width: 150px;
>  min-width: 150px;}
>
> :root select { /* hide from IE */
>  width: auto;
>
> }
>
> --Klaus



[jQuery] differences between $.ajax and $.get (plz help!!!)

2007-07-23 Thread GianCarlo Mingati

Hi list,
i'm experimenting with jquery and xml.
I really can't understand the difference between $.ajax and $.get

If you bought the book 'learning jquery', for xml parsing they always
use, or suggest to use (in the examples, but i may wrong) the $.get
method to retrieve the contents of an xml file.

Why/*??*/ if i use $.get('http://www.corriere.it/rss/ultimora.xml',
function etcetera...) and try to access the 'item' text nothing
happens?

$(document).ready(function(){
$('#news-feed').each(function(){
$('this').empty();
$.get('ultimora.xml',function(data){
$('/rss//item').each(function(){
var titolo = $('title', this).text();
alert(titolo) NOTHING 
HAPPENS!!
})
})


})

});


And WHY/*??!!*{}AAARGH*/ if i instead use such syntax it works?
$(document).ready(function(){
$(function() {
$.ajax({
type: "GET",
url: "http://www.corriere.it/rss/ultimora.xml";,
dataType: "xml",
success: function(xmlData)
{
xmlDataSet = xmlData;
browseXML();
},
error: function(){
alert('Errore nel caricamento del file XML');
}
});
});
function browseXML(){
entryLength=$("item",xmlDataSet).length;
alert(entryLength) // this returns 20, it works!!!
}

});

Wich syntax do we have to use?
Can you please clarify me one time for all the differences between
those two methods?
It seems to me that the $.get method works for pretty simple XML file
but if your file have other nodes BEFORE item node, it fails.
Obviously i'm missimg something (i'm a total newbie) but WHAT?
Again, setting up r/c helicopters is easier ;-)
Cheers
GC



[jQuery] Object variables get lost when doing $.ajax

2007-07-23 Thread [EMAIL PROTECTED]

I've written a javascript class in which there is a function which
makes a ajax request.

But the callback function of this $.ajax don't know the objects
variables. Why is that.

It looks something like this:

function FileView(fbId, rootFolder, showFolders, type) {

this.tmpVar = 'somuch';

FileView.prototype.choseFolder = function(folderId, type,
showFolders)
{
alert(this.tmpVar); // displays somuch

$.ajax({type: "POST",
url: "file.php",
data: "actions",
success: function(msg) {
alert(this.tmpVar); // displays undefined
}
});
}
}

What am I doing wrong. It could be something with my class - it's the
first time I'm doing oop in javascript.



[jQuery] Re: Loading Javascript Dynamically (in other words, as needed)

2007-07-23 Thread Christof Donat

Hi,

> I was wondering if jQuery can be used to load javascript dynamically,
> on an as-needed basis. Here is the problem I have:
>
> I want to load a page with as little javascript as possible.

jspax.org

You don't even need to have jQuery loaded before. I do user jQuery as a jsPax 
Package. In the last fiew months I have recieved two reports that peolpe had 
problems with jsPax and IE. I do trust both of them because they definatelly 
are no idiots, but I have not been able to reproduce that problem up to now.

> When 
> someone clicks on an item that requires some javascript functionality,
> I want it to load a javascript function from an external file and then
> execute it.

Yes, with jsPax:

$using('jQuery',function() {
  $(function() {
$('.clickableElements').bind(click,function() {
  var self = this;
  $using('my.wonderful.package', function() {
 my.wonderful.package.handleClickOn(self);
  });
});
  });
});

What a cascade of functions :-)

> While there is some simple javascript I've found that can do this kind
> of thing by appending the script to the DOM, it can't do things in
> order.

Those scripts do not work in some safari versions. If you whant your script to 
work there as well, you need to load it via XMLHttpRequest and execue it with 
exec().

Also adding a script tag loads the script assynchonously and does not give you 
information on when it has finished.

jsPax uses XMLHttpRequest whenever it is available and calls your callback on 
success. Otherwies it adds two script tags. One with the script set as src 
and the second one with a script text inside that calls a special callback 
function. This callback function indirectly is a call your callback that you 
have given to the $using() function - just changing the context. The browser 
can not execute the second script before it has executed the first one.

> I don't like the idea of doing a time-out loop, so I was
> wondering if jQuery has something built in for this kind of thing.

if you do have jQuery loaded, then it is fairly easy to mimic the behaviour of 
jsPax:

$(function() {
  var clickScriptAvilable = false;
  $('.clickableElements').bind(click,function() {
var self = this;
if( clickScriptAvilable )
  my.wonderful.package.handleClickOn(self);
else $.getScript('my.my/wonderful/package.js', funciton() {
  clickScriptAvilable = true;
  my.wonderful.package.handleClickOn(self);
});
  });
});

IIRC getScript() always uses XMLHttpRequest without a fallback to inserting 
script tags. That is usually OK, because you usually don't take browsers into 
account that don't even have a XMLHttpRequest when you use jQuery. Actually 
in my daily work I don't take these into account as well, but I whanted jsPax 
to be able to even handle those.

Christof


[jQuery] Re: Loading Javascript Dynamically (in other words, as needed)

2007-07-23 Thread Rob Desbois

Guys, responses below.
--rob

On 7/23/07, Stephan Beal <[EMAIL PROTECTED]> wrote:



On Jul 23, 4:06 am, Dave Methvin <[EMAIL PROTECTED]> wrote:
> All of those results make sense.
>
> > "print( (new String('foo') === new String('foo')))"
> > false
>
> Those are two different objects, even though they have the same value;
> object1 !== object2 by definition of the === operator.

Agreed.


What is this definition of the === operator you are referring to? I'm
unaware of it having ever been defined as a reference comparison, and having
read the relevant part of the ECMA Script specification yesterday I'm
certain it isn't.


Two primitives with the same type and value are === as well as ==

i probably would expect it for string constants, but i would not
expect it to be true for computed strings:

[EMAIL PROTECTED]:~$ SpiderApe -e "a=function(){return 'abc'[0];};
print(a() === 'a')"
true


That proves it isn't a by-reference comparison.



> > "print(typeof someUndefined == 'fuzzyDuck')"
> > false
>
> typeof someUndefined is 'undefined', and 'undefined' != 'fuzzyDuck'

This makes sense, of course, but seems to contradict the standard (as
Rob described it above).


No, it was my Sunday evening brain. I was thinking of 'someUndefined' as
being the LHS of the expression, but of course it isn't, it's 'typeof
someUndefined'. It will return true as long as y is the string 'undefined'.
According to the spec, === and == only differ in the algorithm's flow when
the type of the left and right expressions differ, so it is likely that my
(not uncommon) belief that === is faster than == is incorrect.

It is however the case that === is a safer comparison for a lot of
situations. Allowing type conversions to take place means that you may get
unexpected results, I have come across a situation where this happened
before and so use the strict (in)equality operators now to avoid problems in
future. If I want type conversion I make it explicit.


[jQuery] Re: Loading Javascript Dynamically (in other words, as needed)

2007-07-23 Thread Stephan Beal

On Jul 23, 11:27 am, "Rob Desbois" <[EMAIL PROTECTED]> wrote:
> What is this definition of the === operator you are referring to? I'm
> unaware of it having ever been defined as a reference comparison, and having
> read the relevant part of the ECMA Script specification yesterday I'm
> certain it isn't.

The "reference equality" was something i (mis?)remembered from prior
reading (some years ago). As it turns out, i was thinking of PHP, not
JS:

http://us.php.net/operators.comparison

But in fact PHP's op=== is also not "reference equality", but is
essentially: (LHS == RHS) && (typeof LHS == typeof RHS).

> > [EMAIL PROTECTED]:~$ SpiderApe -e "a=function(){return 'abc'[0];};
> > print(a() === 'a')"
> > true
>
> That proves it isn't a by-reference comparison.

Right.

> It is however the case that === is a safer comparison for a lot of
> situations. Allowing type conversions to take place means that you may get
> unexpected results, I have come across a situation where this happened
> before and so use the strict (in)equality operators now to avoid problems in
> future. If I want type conversion I make it explicit.

It's nice to finally get clarification on exactly what === is good
for. Thanks for clearing that up for me.

:)



[jQuery] Re: What are most commonly-used menu plugins?

2007-07-23 Thread Stephan Beal

On Jul 23, 10:37 am, Stephan Beal <[EMAIL PROTECTED]> wrote:
> On Jul 23, 1:41 am, Rhapidophyllum <[EMAIL PROTECTED]> wrote:
>
> > I'm simply looking for a stable menu plugin.  Of the various menu
> > plugins available, which are most commonly used/most stable?
>
> There are unfortunately no real metrics for this, so i'm GUESSING here
> based on how many posts i see on this list. In no particular order:

Sorry, i mis-read your post and didn't see that you are looking
specifically at MENU plugins. Please disregard my answer.

Sorry about that.



[jQuery] Re: What are most commonly-used menu plugins?

2007-07-23 Thread Tane Piper


Personally, I like jdMenu:  http://jdsharp.us/jQuery/plugins/jdMenu/

On 7/23/07, Stephan Beal <[EMAIL PROTECTED]> wrote:


On Jul 23, 1:41 am, Rhapidophyllum <[EMAIL PROTECTED]> wrote:
> I'm simply looking for a stable menu plugin.  Of the various menu
> plugins available, which are most commonly used/most stable?

There are unfortunately no real metrics for this, so i'm GUESSING here
based on how many posts i see on this list. In no particular order:

- blockUI
- tabs
- autocompleter
- Interface (mostly drag/drop)
- forms

i think those are the top 5 (again, not in order), based on my
impression (not a mathematical fact!) of the number of posts people
make here. That is admittedly a questionable metric because some
plugins are inherently so small/easy-to-use that people don't need to
ask questions about them very often.





--
Tane Piper
http://digitalspaghetti.tooum.net

This email is: [ ] blogable [ x ] ask first [ ] private


[jQuery] Re: What am I missing from this plugin?

2007-07-23 Thread barophobia

On 7/18/07, Dan G. Switzer, II <[EMAIL PROTECTED]> wrote:
> Also, I think I'd change the plug-in a bit. IMO, I would make more sense to
> use like:
>
> $("#button").generate_password("#passwordField", iLength);
>
> That way you can attach the behavior to any element. Also, by using a
> selector for the field to update, you could update multiple fields with the
> same value (in those cases where you had both a password and confirm
> password fields.)

So are you saying that #button will have already been created by the
user in their HTML and that #passwordField is where the generated text
should be placed? And beyond that #passwordField could be something
like .place_generated so that when #button is clicked it sticks the
generated text into all boxes that have a class of .place_generated?

This sounds like a fine idea except that I wanted it to be
unobtrusive. If someone doesn't have JS enabled I don't want to have a
lame-duck button sitting there.

Can it still be unobtrusive but use your suggestion at the same time?



Thanks,
Chris.


[jQuery] Re: jquery + splitter plugin problems

2007-07-23 Thread new_developer

Thanks alot for that, it is now working!

On Jul 22, 12:10 pm, Dave Methvin <[EMAIL PROTECTED]> wrote:
> Whoops, I see you're doing a three-pane now. Get the sample code and
> css from the demo page and run it in your ajax handler.



[jQuery] [SOLVED!] Re: Problem with getting Attributes to innerHTML

2007-07-23 Thread captainh2ok


I was confusing sorry. here is teh solution i found:

$("#ctMain .mailLink").each(function(){
$(this).html($(this).attr("title")+"@"+$(this).attr("rel"));
});

greetz, captain.


captainh2ok wrote:
> 
> Hello to all,
> 
> i have the following code:
> 
> $("#ctMain
> .mailLink").html($(this).attr("title")+"@"+$(this).attr("rel"));
> 
> 
> This code-snippet should do the following:
> 
> fetch each link with the classname "mailLink", gets his attributes "title"
> and "rel" and puts the values in the link as text (between the  -Tags. 
> But this fails. i just get "undefined".
> 
> Has anyone an idea of getting the attribute-values of each link?
> 
> Thanks!!
> 
> captain
> 

-- 
View this message in context: 
http://www.nabble.com/Problem-with-getting-Attributes-to-innerHTML-tf4128321s15494.html#a11740314
Sent from the JQuery mailing list archive at Nabble.com.



[jQuery] Problem with getting Attributes to innerHTML

2007-07-23 Thread captainh2ok


Hello to all,

i have the following code:

$("#ctMain .mailLink").html($(this).attr("title")+"@"+$(this).attr("rel"));


This code-snippet should do the following:

fetch each link with the classname "mailLink", gets his attributes "title"
and "rel" and puts the values in the link as text (between the  -Tags. 
But this fails. i just get "undefined".

Has anyone an idea of getting the attribute-values of each link?

Thanks!!

captain
-- 
View this message in context: 
http://www.nabble.com/Problem-with-getting-Attributes-to-innerHTML-tf4128321s15494.html#a11739981
Sent from the JQuery mailing list archive at Nabble.com.



[jQuery] Re: A jQuery success story

2007-07-23 Thread Mike Fern

Great story Mike,

At the first time I saw jquery, I immediately said, "Wow! This is
state of the art". I'm also sure  there are more people with success
stories using jquery.

Regards,
-Another- Mike


[jQuery] Drag and drop menu

2007-07-23 Thread cola

I am a newbie for jquery. I am now making my personal web by jquery
and I found that jquery is so powerful and lovely.

Now, I want to make a draggable menu which can let user drag and drop
item into the menu, just like what facebook does. It should be tidied
up automatically. I want to ask, is there any plugin for jquery to let
me do this easily?

Thanks a lot for any help~~



[jQuery] Re: differences between $.ajax and $.get (plz help!!!)

2007-07-23 Thread Mike Alsup


The problem with your "get" code is this line:

$('/rss//item').each(function(){

If you don't use a context argument, jQuery searches the current
document for the requested elements.   You need to tell it that you
want to find those elements in the XML DOM:

$('/rss//item', data).each(function(){

Mike


On 7/23/07, GianCarlo Mingati <[EMAIL PROTECTED]> wrote:


Hi list,
i'm experimenting with jquery and xml.
I really can't understand the difference between $.ajax and $.get

If you bought the book 'learning jquery', for xml parsing they always
use, or suggest to use (in the examples, but i may wrong) the $.get
method to retrieve the contents of an xml file.

Why/*??*/ if i use $.get('http://www.corriere.it/rss/ultimora.xml',
function etcetera...) and try to access the 'item' text nothing
happens?

$(document).ready(function(){
$('#news-feed').each(function(){
$('this').empty();
$.get('ultimora.xml',function(data){
$('/rss//item').each(function(){
var titolo = $('title', this).text();
alert(titolo) NOTHING 
HAPPENS!!
})
})


})

});


And WHY/*??!!*{}AAARGH*/ if i instead use such syntax it works?
$(document).ready(function(){
$(function() {
$.ajax({
type: "GET",
url: "http://www.corriere.it/rss/ultimora.xml";,
dataType: "xml",
success: function(xmlData)
{
xmlDataSet = xmlData;
browseXML();
},
error: function(){
alert('Errore nel caricamento del file XML');
}
});
});
function browseXML(){
entryLength=$("item",xmlDataSet).length;
alert(entryLength) // this returns 20, it works!!!
}

});

Wich syntax do we have to use?
Can you please clarify me one time for all the differences between
those two methods?
It seems to me that the $.get method works for pretty simple XML file
but if your file have other nodes BEFORE item node, it fails.
Obviously i'm missimg something (i'm a total newbie) but WHAT?
Again, setting up r/c helicopters is easier ;-)
Cheers
GC




[jQuery] Re: differences between $.ajax and $.get (plz help!!!)

2007-07-23 Thread GianCarlo Mingati

d'oh ;-)
Thanks Mike
GC

On Jul 23, 1:53 pm, "Mike Alsup" <[EMAIL PROTECTED]> wrote:
> The problem with your "get" code is this line:
>
> $('/rss//item').each(function(){
>
> If you don't use a context argument, jQuery searches the current
> document for the requested elements.   You need to tell it that you
> want to find those elements in the XML DOM:
>
> $('/rss//item', data).each(function(){
>
> Mike
>
> On 7/23/07, GianCarlo Mingati <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hi list,
> > i'm experimenting with jquery and xml.
> > I really can't understand the difference between $.ajax and $.get
>
> > If you bought the book 'learning jquery', for xml parsing they always
> > use, or suggest to use (in the examples, but i may wrong) the $.get
> > method to retrieve the contents of an xml file.
>
> > Why/*??*/ if i use $.get('http://www.corriere.it/rss/ultimora.xml',
> > function etcetera...) and try to access the 'item' text nothing
> > happens?
>
> > $(document).ready(function(){
> > $('#news-feed').each(function(){
> > $('this').empty();
> > $.get('ultimora.xml',function(data){
> > $('/rss//item').each(function(){
> > var titolo = $('title', 
> > this).text();
> > alert(titolo) NOTHING 
> > HAPPENS!!
> > })
> > })
>
> > })
>
> > });
>
> > And WHY/*??!!*{}AAARGH*/ if i instead use such syntax it works?
> > $(document).ready(function(){
> > $(function() {
> > $.ajax({
> > type: "GET",
> > url: "http://www.corriere.it/rss/ultimora.xml";,
> > dataType: "xml",
> > success: function(xmlData)
> > {
> > xmlDataSet = xmlData;
> > browseXML();
> > },
> > error: function(){
> > alert('Errore nel caricamento del file XML');
> > }
> > });
> > });
> > function browseXML(){
> > entryLength=$("item",xmlDataSet).length;
> > alert(entryLength) // this returns 20, it works!!!
> > }
>
> > });
>
> > Wich syntax do we have to use?
> > Can you please clarify me one time for all the differences between
> > those two methods?
> > It seems to me that the $.get method works for pretty simple XML file
> > but if your file have other nodes BEFORE item node, it fails.
> > Obviously i'm missimg something (i'm a total newbie) but WHAT?
> > Again, setting up r/c helicopters is easier ;-)
> > Cheers
> > GC



[jQuery] Building up DOM tree using .append()

2007-07-23 Thread Tane Piper


Hey folks,

I'm optimizing one of my plugins, and I'm looking to move from
creating HTML within a var and using .html() to add it to the element,
to creating the elements on the fly.

I've tried the below, with no luck because .append() does not accept a
callback, but hopefully someone will understand what I'm trying to do:

jQuery(controlbox).append('^');
jQuery(controlbox).append('' +
settings.header + '');
jQuery(controlbox).append('', function(){
if (settings.textsizer == true) {
if (curtextsize) { 
jQuery('body').removeClass().addClass(curtextsize); }
jQuery(this).append('', function(){
for (var i=0, len 
= settings.textsizeclasses.length; i < len; i++) {
jQuery(this).append('' + settings.textsizeclasses[i].toUpperCase() + '');
}
});
}
});

Basically, the code gets as far as  in Firebug
- so what i want to happen next is within this DIV, the  is appended, and then each LI element is added.

ANY help is much appreciated.

--
Tane Piper
http://digitalspaghetti.tooum.net

This email is: [ ] blogable [ x ] ask first [ ] private


[jQuery] Re: clueTip updates and new theme

2007-07-23 Thread Klaus Hartl


Web Specialist wrote:

Karl,
 
I'll want to suggest a little change in your clueTip plugin. Using this 
code:
 
id="http://localhost/local/cluetip/demo/ajax4.htm"; title="Testing new 
clueTip Plugin">

Test

 
will display the hint for that link. This occurs because IE "reads" 
title argument and displays that hint(native function).
 
Using this code resolve it:
 
id="http://localhost/local/cluetip/demo/ajax4.htm"; 
title_clueTip="Testing new clueTip Plugin">

Test

 
and changing in jquery.cluetip.js:
 
// set up default options

var defaults = {
  ...
  titleAttribute: 'title_clueTip',
 
 
Cheers


Instead of using an invalid attribute, the plugin should just remove the 
title attribute if it exists - because that's what it does, enhancing 
existing functionality...



--Klaus


[jQuery] Re: clueTip updates and new theme

2007-07-23 Thread Web Specialist

Karl,

I'll want to suggest a little change in your clueTip plugin. Using this
code:

http://localhost/local/cluetip/demo/ajax4.htm";
title="Testing new clueTip Plugin">
Test


will display the hint for that link. This occurs because IE "reads" title
argument and displays that hint(native function).

Using this code resolve it:

http://localhost/local/cluetip/demo/ajax4.htm";
title_clueTip="Testing new clueTip Plugin">
Test


and changing in jquery.cluetip.js:

   // set up default options
   var defaults = {
 ...
 titleAttribute: 'title_clueTip',


Cheers

2007/7/20, Web Specialist <[EMAIL PROTECTED]>:


Karl,

Wonderful!

Cheers


2007/7/16, Karl Swedberg <[EMAIL PROTECTED]>:
>
>  Hi again,
>
>
> Just wanted to let you know that I did a bunch of  work on the clueTip
> plugin this weekend and made some progress in a few areas.
>
>
> A couple people requested that the clueTips look more like Cody
> Lindley's jTips. Your wish is my command:
> http://test.learningjquery.com/clue/demo/alt-demo.html
>
>
> Here is a run-down of what I've modified:
>
>
> - waitImage feature/option is now implemented
> - added "arrows" option that sets background-position-y to line up an
> arrow background image with the hovered element.
> - the clueTip heading () now comes before ,
> not first child of it. Makes it much easier to apply sane CSS.
> - fixed a positioning glitch when using the truncate option
> - added alternate theme based on Cody Lindley's jTip and demo files to
> show it (alt-demo...)
> - changed $(document).width() to the more appropriate $(window).width()
> for positioning clueTip x coordinate
> -  now gets class="clue-left" if positioned to the
> left of the hovered element; gets class="clue-right" if positioned to the
> right. Useful for styling the clueTip differently based on where it displays
>
>
>
> I haven't committed any of this to SVN yet because I'm hoping to work
> out the IE6 drop shadow/CSS issues first. But everything is up on my test
> server, so if you want to poke around, feel free:
> http://test.learningjquery.com/clue/
>
>
>
> --Karl
> _
> Karl Swedberg
> www.englishrules.com
> www.learningjquery.com
>
>
>
>
>
>




[jQuery] Re: clueTip updates and new theme

2007-07-23 Thread Web Specialist

Wow! Thanks for the fast response. Please look this image:

How to remove the hint(native IE) message? Is it possible(using title
argument for clueTip plugin)?

Cheers

2007/7/23, Klaus Hartl <[EMAIL PROTECTED]>:



Web Specialist wrote:
> Karl,
>
> I'll want to suggest a little change in your clueTip plugin. Using this
> code:
>
>  id="http://localhost/local/cluetip/demo/ajax4.htm"; title="Testing new
> clueTip Plugin">
> Test
> 
>
> will display the hint for that link. This occurs because IE "reads"
> title argument and displays that hint(native function).
>
> Using this code resolve it:
>
>  id="http://localhost/local/cluetip/demo/ajax4.htm";
> title_clueTip="Testing new clueTip Plugin">
> Test
> 
>
> and changing in jquery.cluetip.js:
>
> // set up default options
> var defaults = {
>   ...
>   titleAttribute: 'title_clueTip',
>
>
> Cheers

Instead of using an invalid attribute, the plugin should just remove the
title attribute if it exists - because that's what it does, enhancing
existing functionality...


--Klaus

<>

[jQuery] Re: clueTip updates and new theme

2007-07-23 Thread Karl Swedberg
yes, I agree with Klaus on this one, and actually thought I had built  
in that feature.


I declare the variable so it can be used in the clueTip:
  var tipTitle =  $this.attr(defaults.titleAttribute) // default  
titleAttribute is "title", of course


then on show, I remove the attribute from the original element:

if (tipTitle) {
  $this.removeAttr('title');
}

and replace it on hide :
if (tipTitle) {
  $this.attr('title', tipTitle);
}


Not sure why it's not working for you, but I'll investigate.

--Karl
_
Karl Swedberg
www.englishrules.com
www.learningjquery.com



On Jul 23, 2007, at 8:42 AM, Web Specialist wrote:


Wow! Thanks for the fast response. Please look this image:

How to remove the hint(native IE) message? Is it possible(using  
title argument for clueTip plugin)?


Cheers

2007/7/23, Klaus Hartl <[EMAIL PROTECTED]>:

Web Specialist wrote:
> Karl,
>
> I'll want to suggest a little change in your clueTip plugin.  
Using this

> code:
>
> > id="http://localhost/local/cluetip/demo/ajax4.htm"; title="Testing  
new

> clueTip Plugin">
> Test
> 
>
> will display the hint for that link. This occurs because IE "reads"
> title argument and displays that hint(native function).
>
> Using this code resolve it:
>
>  id="http://localhost/local/cluetip/demo/ajax4.htm";
> title_clueTip="Testing new clueTip Plugin">
> Test
> 
>
> and changing in jquery.cluetip.js:
>
> // set up default options
> var defaults = {
>   ...
>   titleAttribute: 'title_clueTip',
>
>
> Cheers

Instead of using an invalid attribute, the plugin should just  
remove the

title attribute if it exists - because that's what it does, enhancing
existing functionality...


--Klaus






[jQuery] Re: clueTip updates and new theme

2007-07-23 Thread Klaus Hartl


Web Specialist wrote:

Wow! Thanks for the fast response. Please look this image:
 
How to remove the hint(native IE) message? Is it possible(using title 
argument for clueTip plugin)?
 
Cheers


Hm, after looking through the code it turns out, that the plugin already 
does what I was talking about (I should have known Karl better).


Although the title is changed when activating a tooltip and restored 
after closing, so maybe you get to see the normal tooltip while the 
content gets loaded in the background.



--Klaus


[jQuery] Re: clueTip updates and new theme

2007-07-23 Thread Klaus Hartl


Karl Swedberg wrote:
yes, I agree with Klaus on this one, and actually thought I had built in 
that feature.


I declare the variable so it can be used in the clueTip:
  var tipTitle =  $this.attr(defaults.titleAttribute) // default 
titleAttribute is "title", of course


then on show, I remove the attribute from the original element:

if (tipTitle) {
  $this.removeAttr('title'); 
}


and replace it on hide :
if (tipTitle) {
  $this.attr('title', tipTitle);
}


Not sure why it's not working for you, but I'll investigate.


Karl, maybe that's because the title is removed no sooner than the 
content for the tip is loaded? Just guessing...



While I was browsing through the code I saw that you're using ids in the 
cluetip div creation: "cluetip-inner" etc. As this is used several 
times, that should be classes IMHO. Unless I'm totally off here and 
you're reusing the same div for all tooltips.



--Klaus


[jQuery] Re: clueTip updates and new theme

2007-07-23 Thread Karl Swedberg


On Jul 23, 2007, at 8:58 AM, Klaus Hartl wrote:

Hm, after looking through the code it turns out, that the plugin  
already does what I was talking about (I should have known Karl  
better).


:-)

Although the title is changed when activating a tooltip and  
restored after closing, so maybe you get to see the normal tooltip  
while the content gets loaded in the background.



Yeah, I'll have to revisit that part of the code and try to remove  
the title attribute a little sooner if possible.
Working on this plugin has been a really fun experience. It's  
strange, but often just shuffling the order of things in the code  
fixes bugs (especially when it relates to positioning or element  
dimensions).


Cheers,

--Karl
_
Karl Swedberg
www.englishrules.com
www.learningjquery.com




[jQuery] Re: PNGFix comments need updating

2007-07-23 Thread Kush mann

I've updated the plugin
Cheers,
--Kush

Glen Lipka wrote, On 7/23/2007 8:16 AM:
> The source code found here for the jQuery pngFix
> http://khurshid.com/jquery/iepnghack/jquery.iepnghack.1.4.js
> has the following example in the comments:
>
>  * @example
>  *
>  * $('[EMAIL PROTECTED], #panel').iepnghack();
>
> This should be updated.  the function is called pngFix now I guess.
>
> Glen
>


[jQuery] Re: clueTip updates and new theme

2007-07-23 Thread Karl Swedberg



On Jul 23, 2007, at 9:05 AM, Klaus Hartl wrote:



Karl, maybe that's because the title is removed no sooner than the  
content for the tip is loaded? Just guessing...


absolutely. I think you're spot on with that. Will work on this as  
soon as I have some time to breathe.


While I was browsing through the code I saw that you're using ids  
in the cluetip div creation: "cluetip-inner" etc. As this is used  
several times, that should be classes IMHO. Unless I'm totally off  
here and you're reusing the same div for all tooltips.


Like you said before, Klaus, you should have known me better. :-D

I took the approach of creating only one cluetip and then replacing  
its contents when it's shown. look at around line 133:


  if (!$cluetip) {
 //one instance of the cluetip elements (container, outer  
wrapper, inner wrapper, title, etc.) are built in here

  }

Cheers,

--Karl
_
Karl Swedberg
www.englishrules.com
www.learningjquery.com




[jQuery] Re: differences between $.ajax and $.get (plz help!!!)

2007-07-23 Thread Dan G. Switzer, II

GianCarlo,

>i'm experimenting with jquery and xml.
>I really can't understand the difference between $.ajax and $.get
>
>If you bought the book 'learning jquery', for xml parsing they always
>use, or suggest to use (in the examples, but i may wrong) the $.get
>method to retrieve the contents of an xml file.
>
>Why/*??*/ if i use $.get('http://www.corriere.it/rss/ultimora.xml',
>function etcetera...) and try to access the 'item' text nothing
>happens?
>
>$(document).ready(function(){
>   $('#news-feed').each(function(){
>   $('this').empty();
>   $.get('ultimora.xml',function(data){
>   $('/rss//item').each(function(){
>   var titolo = $('title',
this).text();
>   alert(titolo) NOTHING
>HAPPENS!!
>   })
>   })
>
>
>   })
>
>});

The selectors you're using in the 2 examples are drastically different. The
fact that you're getting no alert means one of two things:

1) You're getting a JS error
2) Your selector isn't returning any results.

What happens if you change your selector from:

$('/rss//item')

To

$('/rss//item', data)

???

If that doesn't work, try:

$('item', data)

The above selector matches what you're doing in your second sample code.

-Dan



[jQuery] Re: Object variables get lost when doing $.ajax

2007-07-23 Thread Dan G. Switzer, II

Jakob,

>I've written a javascript class in which there is a function which
>makes a ajax request.
>
>But the callback function of this $.ajax don't know the objects
>variables. Why is that.
>
>It looks something like this:
>
>function FileView(fbId, rootFolder, showFolders, type) {
>
>   this.tmpVar = 'somuch';
>
>   FileView.prototype.choseFolder = function(folderId, type,
>showFolders)
>   {
>   alert(this.tmpVar); // displays somuch
>
>   $.ajax({type: "POST",
>   url: "file.php",
>   data: "actions",
>   success: function(msg) {
>   alert(this.tmpVar); // displays undefined
>   }
>   });
>   }
>}
>
>What am I doing wrong. It could be something with my class - it's the
>first time I'm doing oop in javascript.

The reference to "this" changes when inside the callback. You'll need to
store "this.tmpVar" into a private variable:

this.tmpVar = 'somuch';
var privateTmpVar = this.tmpVar;

Now you should be able alert the variable privateTmpVar in your success
callback.

-Dan



[jQuery] Re: Click to Call a Function: The Movie

2007-07-23 Thread Scott Sauyet


Mitchell Waite wrote:

This looks better on a big screen but do I have this right?

http://www.whatbird.com/wwwroot/images/addClass.gif


The description of the Javascript is pretty good.  Dan had some good 
suggestions of how it might be done better, but your exposition of 
what's happening inside the script tag is great.


However, your description of the CSS is problematic.

The following has structure, and that structure can be analyzed, but for 
many purposes it needs to be treated as a whole:


tr.foo td

This is a selector, and your notes that point to the "foo" to say that 
"class 'foo' styles the TR" is not really correct.  The whole line 
points to some elements that need to be styled, namely those TD elements 
that are inside TR elements with the class "foo".  Nothing in this rule 
will style the TR as a whole.  A separate rule, say


tr.foo {
background-image: /images/boat.png
font-weight: bold;
}

could be used to style the actual TR elements.

There's one other problem.  The note that says "and it makes each cell 
(TD) = yellow" is correct, but it's pointing to the wrong place.  You 
are pointing to the "td" in the selector; you should be pointing to the 
declaration "background-color: yellow;".  The selector chooses which 
elements you want to style.  It's the declarations that hold the actual 
styles to use.


Finally, in an exposition like this, it would probably help to indent 
the declarations inside their block.


The above sounds fairly critical, and I don't want to leave the 
impression that I think it's awful.  I think this is a great expository 
technique.  But if it's aimed at beginners, there should be no mistakes!


Cheers,

  -- Scott



[jQuery] Re: What are most commonly-used menu plugins?

2007-07-23 Thread [EMAIL PROTECTED]

+1 on jdMenu.  We've also used it with no troubles.  Very simple to
get up and running.
Mark



[jQuery] Re: Click to Call a Function: The Movie

2007-07-23 Thread Glen Lipka

Some styles dont work on the TR.
Like font.
That's why I always use the TD, just to avoid that misstep.

Glen

On 7/23/07, Scott Sauyet <[EMAIL PROTECTED]> wrote:



Mitchell Waite wrote:
> This looks better on a big screen but do I have this right?
>
> http://www.whatbird.com/wwwroot/images/addClass.gif

The description of the Javascript is pretty good.  Dan had some good
suggestions of how it might be done better, but your exposition of
what's happening inside the script tag is great.

However, your description of the CSS is problematic.

The following has structure, and that structure can be analyzed, but for
many purposes it needs to be treated as a whole:

 tr.foo td

This is a selector, and your notes that point to the "foo" to say that
"class 'foo' styles the TR" is not really correct.  The whole line
points to some elements that need to be styled, namely those TD elements
that are inside TR elements with the class "foo".  Nothing in this rule
will style the TR as a whole.  A separate rule, say

 tr.foo {
 background-image: /images/boat.png
 font-weight: bold;
 }

could be used to style the actual TR elements.

There's one other problem.  The note that says "and it makes each cell
(TD) = yellow" is correct, but it's pointing to the wrong place.  You
are pointing to the "td" in the selector; you should be pointing to the
declaration "background-color: yellow;".  The selector chooses which
elements you want to style.  It's the declarations that hold the actual
styles to use.

Finally, in an exposition like this, it would probably help to indent
the declarations inside their block.

The above sounds fairly critical, and I don't want to leave the
impression that I think it's awful.  I think this is a great expository
technique.  But if it's aimed at beginners, there should be no mistakes!

Cheers,

   -- Scott




[jQuery] Re: New Site and Drag/Drop Problem

2007-07-23 Thread Dan G. Switzer, II

Glen,


First off, I wish people would list the exact plug-in and version they're
having problems with. There are some many plug-in now with similar
functionality, that I think it's important to specify which you're using. 

I had assumed this was an Interface Drag-n-Drop question and was surprised
to see it was the Easy Drag-n-Drop. 


Now for the issue at hand.

The only issue I observed was that when you mouse down on the image, the
image "jumps." I suspect this is a CSS issue basically.

However, I'd start by debugging the code in the $(this).mousedown() handler.
I suspect the Easy Drag-n-Drop code isn't correctly calculating the
lastElemTop and lastElemLeft positions.

It actually looks like there's a code hack in there to try to provide a
guess as to where to position the element:

// IE doesn't return a valid value for 'top' and 'left' if they aren't
explicit set
// so we use a quick work around and set a specific position to start with
if(isNaN(lastElemTop )) lastElemTop  = lastMouseY - this.offsetHeight/2;
if(isNaN(lastElemLeft)) lastElemLeft = lastMouseX - this.offsetWidth/2;

I really wish the dimensions plug-in would get integrated into jQuery.
Calculating the true x/y position of an element is not as simple ass getting
the CSS position. If they just integrated dimensions into the core API, it
would help developers to resolve a lot of these issues.

Every plug-in that relies on position an element on the screen should be
using the dimensions plug-in (or at least implementing similar code.)

-Dan

>Calmont Preschool Nursery Website
>http://www.carlmontparents.org 
>
>Admittedly, a low traffic site. :)
>
>It has a problem though.  The drag and drop is all jacked in IE.
>Anyone have the fix?
>
>Does the draggable script for jQuery UI work?
>
>Glen




[jQuery] Re: Click to Call a Function: The Movie

2007-07-23 Thread Scott Sauyet


Glen Lipka wrote:

Some styles dont work on the TR.
Like font.
That's why I always use the TD, just to avoid that misstep.


I wasn't critiquing the CSS, just the exposition of it.

You are right, though, about some horrible CSS table implementations.

  -- Scott



[jQuery] Re: Loading Javascript Dynamically (in other words, as needed)

2007-07-23 Thread traunic

If you are using files local to your server and are interested in XHR
+eval I posted a partial port of JSAN to jQuery at the end of this
thread 
http://groups.google.com/group/jquery-en/browse_frm/thread/258363a3aaf2a916/

The key there is the load is 'async: false' which means that the
execution waits until the external script is loaded before continuing.

Just another option...

On Jul 20, 12:57 pm, Chrisss <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I was wondering if jQuery can be used to load javascript dynamically,
> on an as-needed basis. Here is the problem I have:
>
> I want to load a page with as little javascript as possible. When
> someone clicks on an item that requires some javascript functionality,
> I want it to load a javascript function from an external file and then
> execute it.
>
> While there is some simple javascript I've found that can do this kind
> of thing by appending the script to the DOM, it can't do things in
> order. For instance, I want to load the function, and then execute it.
> To do so, the javascript has to have some way to check if the funciton
> exists. I don't like the idea of doing a time-out loop, so I was
> wondering if jQuery has something built in for this kind of thing.
>
> Thank you!
> Chris



[jQuery] Re: What am I missing from this plugin?

2007-07-23 Thread Dan G. Switzer, II

Chris,

>> Also, I think I'd change the plug-in a bit. IMO, I would make more sense
>to
>> use like:
>>
>> $("#button").generate_password("#passwordField", iLength);
>>
>> That way you can attach the behavior to any element. Also, by using a
>> selector for the field to update, you could update multiple fields with
>the
>> same value (in those cases where you had both a password and confirm
>> password fields.)
>
>So are you saying that #button will have already been created by the
>user in their HTML and that #passwordField is where the generated text
>should be placed? And beyond that #passwordField could be something
>like .place_generated so that when #button is clicked it sticks the
>generated text into all boxes that have a class of .place_generated?

Yes, the "#button" element would already exist and you'd be attaching the
behavior to that element.

The "#passwordField" would be any valid jQuery selector. You'd just use this
string do something like:

$(arguments[0]).val("new generated password");

This would allow the user the ability to populate multiple fields or a
single field--depending on their selector.

>This sounds like a fine idea except that I wanted it to be
>unobtrusive. If someone doesn't have JS enabled I don't want to have a
>lame-duck button sitting there.
>
>Can it still be unobtrusive but use your suggestion at the same time?

Making it be unobtrusive would be up the developer. The easy way to do this
would be for the user to "hide" the button via CSS and show it after attach
your plug-in. 

The developer could also make their button be able to automatically generate
a password by submitting back to the server and generate a password for user
via server-side processing and reserve the page with the new password.

The problem with generating the button automatically is that there's no way
to control the position of the development--which is important for UI.

-Dan



[jQuery] Re: [ANN] Dimensions 1.0 final is finally here!

2007-07-23 Thread Brandon Aaron

Docs have been updated to specify that a method works with a hidden element
or not.

--
Brandon Aaron

On 7/22/07, Fred Janon <[EMAIL PROTECTED]> wrote:


Brandon,

Thanks for the very prompt answer. Would you mind documenting these points
in the docs? THat woudl be great!

Thanks

Fred

On 7/23/07, Brandon Aaron <[EMAIL PROTECTED]> wrote:
>
> All of the width and height methods work on hidden elements but the
> offset, position and offsetParent methods do not. All the methods handle
> positioned elements fine with the exception of fixed position. Fixed
> position has been very difficult to get implemented but it is a very high
> priority. I haven't done much testing with tables ... but to my knowledge it
> all works just fine. If you come across an issue, feel free to email the
> list and/or submit a bug report on the Dimensions project page.
>
> Thanks!
>
> --
> Brandon Aaron
>
> On 7/22/07, Fred Janon <[EMAIL PROTECTED]> wrote:
> >
> > Looks good, Brandon.
> >
> > Does it work on: hidden element (display: "none"), positionned
> > elements (absolute or relative) or on table cells and rows?
> >
> > Thanks
> >
> > Fred
> >
> >
> >  On 7/23/07, Brandon Aaron <[EMAIL PROTECTED] > wrote:
> > >
> > > The 1.0 release of Dimensions is finally here. It has been a long
> > > time in the making. Thanks to everyone who helped me test it!
> > >
> > > You can get the details and see an example using the new position
> > > method over at my blog:
> > > http://blog.brandonaaron.net/2007/07/22/dimensions-10/
> > >
> > > You can download dimensions from the project page:
> > > http://jquery.com/plugins/project/dimensions
> > > Or via SVN: http://jqueryjs.googlecode.com/svn/trunk/plugins/dimensions/
> > >
> > >
> > > If you find any bugs or have any feature requests ... be sure to
> > > report them at the dimensions project page.
> > >
> > > Oh... and you can check out the documentation over here:
> > > http://brandonaaron.net/docs/dimensions/
> > >
> > > Thanks!
> > >
> > > --
> > > Brandon Aaron
> > >
> >
> >
>



[jQuery] Re: Autocomplete.js not runs on PHP Version 5.0.2

2007-07-23 Thread Giovanni Battista Lenoci

Stephan Beal ha scritto:
> Unfortunately, the author of autocomplete fails to document which PHP
> version it needs.
>   
I'm not a guru of jquery, and I don't know the autocomplete plugin, but 
I'm sure that a js file work on the client and not on the server.

If the php part of the script use a php5 feature you can modify the 
script to make it work on php4.
> The "solution", i'm afraid, is to upgrade. For more information, see:
>
> http://gophp5.org/
>
> In short: any PHP version under 5.2 won't be supported much longer by
> many leading PHP applications/frameworks.
>   
This is not the truth, this site suggest to make the transition to php5 
as soon as possible cause php4 development is reaching the end, only 
security bug will be ported to the 4.4 family.

Bye :)


[jQuery] Re: clueTip updates and new theme

2007-07-23 Thread Web Specialist

Karl,

This is my directories structure:

clueTip
/css
/images
   /loader.gif
/js
  / jquery.js and so on
  / jquery.cluetip.js
  / alt-demo.js

Using this code:

- html:

http://localhost/local/cluetip/ajax4.cfm";>
Testing clueTip plugin


- jquery.cluetip.js:
...
attribute: 'rel',
...
waitImage: 'wait.gif'


- alt-demo.js:
...
 $('.cluetip_Help').cluetip({attribute: 'rel', hoverClass: 'highlight',
arrows: true, dropShadow: false, waitImage: '../images/loader.gif'});


don't display loader.gif image. Using several path(/images, ../../images,
and so on) occurs the same: the IE cross image.

Your code is very simple:

   $('')
 .attr({'id': 'cluetip-waitimage'})
 .css({position: 'absolute', zIndex: '1001'})
   .appendTo('body')

What's wrong?

Cheers.

2007/7/23, Karl Swedberg <[EMAIL PROTECTED]>:




 On Jul 23, 2007, at 9:05 AM, Klaus Hartl wrote:



Karl, maybe that's because the title is removed no sooner than the content
for the tip is loaded? Just guessing...



absolutely. I think you're spot on with that. Will work on this as soon as
I have some time to breathe.

 While I was browsing through the code I saw that you're using ids in the
cluetip div creation: "cluetip-inner" etc. As this is used several times,
that should be classes IMHO. Unless I'm totally off here and you're reusing
the same div for all tooltips.


Like you said before, Klaus, you should have known me better. :-D


I took the approach of creating only one cluetip and then replacing its
contents when it's shown. look at around line 133:


  if (!$cluetip) {
 //one instance of the cluetip elements (container, outer wrapper,
inner wrapper, title, etc.) are built in here
  }


Cheers,


--Karl
_
Karl Swedberg
www.englishrules.com
www.learningjquery.com







[jQuery] Re: 'Type mismatch' trying to append to XML node

2007-07-23 Thread Andy Martone

I'm having a similar problem in IE.  However, my code looks like this
(using your syntax for creating the XML document):

var hiNode = $("hi", xml);
hiNode.text("foo");

When I run this in Firefox, the hi node in the XML document gets a
text node with a value of "foo" appended to it.  However, I get a type
mismatch error in IE.

I can use the .text() function to retrieve text nodes from XML
documents - can I also use it to set text nodes?

Any help is appreciated!

On Jul 3, 9:09 am, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> Hi... First post, so be gentle...
>
> I am trying to append a new entry into anXMLdocument.  This works
> fine in FF but fails with a 'Type mismatch' error (line 170) in IE.
>
> By using the .toXML() plugin, the output is ' class="group">xxx userdefined="">xxx'
>
> I have tried in 1.1.3 & 1.1.2, both give the same error in IE.
>
> function loadXML(text) {
> var xmlDoc = "";
> // code for IE
> if (window.ActiveXObject) {
> xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
> xmlDoc.async="false";
> xmlDoc.loadXML(text);
> }
> // code for Mozilla, Firefox, Opera, etc.
> else if (document.implementation &&
>document.implementation.createDocument) {
> var parser=new DOMParser();
> var xmlDoc=parser.parseFromString(text,"text/xml");
> }
> else {
>   alert('Your browser cannot handle this script');
> }
> return xmlDoc;
>
> }
>
> $(document).ready(function(){
> var fred="";
> console.log(fred);
> // Push throughXMLprocessor
>xml= loadXML(fred);
>
> var b = $("hi:first",xml);
> var node = $("xxx");
> node.appendTo(b);
>
> });



[jQuery] Re: 'Type mismatch' trying to append to XML node

2007-07-23 Thread John Resig


Yeah, it does seem like there's something tricky at play here, I've
created a ticket to track this:
http://dev.jquery.com/ticket/1419

I'll see if I can get a fix for this in for 1.1.4.

--John

On 7/23/07, Andy Martone <[EMAIL PROTECTED]> wrote:


I'm having a similar problem in IE.  However, my code looks like this
(using your syntax for creating the XML document):

var hiNode = $("hi", xml);
hiNode.text("foo");

When I run this in Firefox, the hi node in the XML document gets a
text node with a value of "foo" appended to it.  However, I get a type
mismatch error in IE.

I can use the .text() function to retrieve text nodes from XML
documents - can I also use it to set text nodes?

Any help is appreciated!

On Jul 3, 9:09 am, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> Hi... First post, so be gentle...
>
> I am trying to append a new entry into anXMLdocument.  This works
> fine in FF but fails with a 'Type mismatch' error (line 170) in IE.
>
> By using the .toXML() plugin, the output is ' class="group">xxx userdefined="">xxx'
>
> I have tried in 1.1.3 & 1.1.2, both give the same error in IE.
>
> function loadXML(text) {
> var xmlDoc = "";
> // code for IE
> if (window.ActiveXObject) {
> xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
> xmlDoc.async="false";
> xmlDoc.loadXML(text);
> }
> // code for Mozilla, Firefox, Opera, etc.
> else if (document.implementation &&
>document.implementation.createDocument) {
> var parser=new DOMParser();
> var xmlDoc=parser.parseFromString(text,"text/xml");
> }
> else {
>   alert('Your browser cannot handle this script');
> }
> return xmlDoc;
>
> }
>
> $(document).ready(function(){
> var fred="";
> console.log(fred);
> // Push throughXMLprocessor
>xml= loadXML(fred);
>
> var b = $("hi:first",xml);
> var node = $("xxx");
> node.appendTo(b);
>
> });




[jQuery] Possible to retrieve image data via AJAX for display?

2007-07-23 Thread [rob desbois]

Hi all,

I have a feeling the answer is a flat 'no', but want to check: is it
possible for an AJAX request to retrieve binary image data (e.g. raw
GIF) and display that on the page?

Thanks,
--rob



[jQuery] IE code profiler

2007-07-23 Thread Gordon

Does anyone know of an IE equivilent to Firebug that I can use to
profile code run times in a similar manner?  I have been working hard
over the last few weeks optimizing some jQuery driven code, and after
doing all the obvious stuff (cacheing selectors, reducing loops, etc)
I have been trying more tricky optimization tricks, such as cacheing
the DOM attributes of elements I manipulate a lot so I don't have to
use .attr and .css getters for conditional statements.

I have been using the Firebug code profiler to test how my code's
performance is improving, and unscientific throw-a-lot-of-elements-at-
it-and-see-how-it-affects-performance tests in Opera and Safari.
While most of the things I've tried have had a positive impact (albeit
a rather small one in a few cases), IE seems to be gaining much less
performance than the other browsers.

I'd like to be able to profile the code I'm working on in IE the same
way I can in FireBug,  but have so far failed to find a decent free
open source profiler.  If anyone has a pointer to something I can use
I'd appreciate it.  Alternativly if you have any tips regarding things
known to be slow specifically in Explorer that don't have a
significant negitive impact in the other browsers I'd also find that
helpful as I can look for them in my code.



[jQuery] Re: Possible to retrieve image data via AJAX for display?

2007-07-23 Thread Jeffrey Kretz

I'm not sure of your setup, but I've done such a thing this way:

$('img').attr('src','image.ashx?I=432').appendTo(document.body);

The image.ashx page is a server-side component that pulls binary data out of
an assembly, and returns it to the client, something like this:

Response.ContentType = "image/gif";
image.Save(Response.OutputStream);
Response.End();

Does this help?
JK

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of [rob desbois]
Sent: Monday, July 23, 2007 9:26 AM
To: jQuery (English)
Subject: [jQuery] Possible to retrieve image data via AJAX for display?


Hi all,

I have a feeling the answer is a flat 'no', but want to check: is it
possible for an AJAX request to retrieve binary image data (e.g. raw
GIF) and display that on the page?

Thanks,
--rob




[jQuery] Re: Possible to retrieve image data via AJAX for display?

2007-07-23 Thread Dan G. Switzer, II

Rob,

>I have a feeling the answer is a flat 'no', but want to check: is it
>possible for an AJAX request to retrieve binary image data (e.g. raw
>GIF) and display that on the page?

Can you describe the *exact* effect your trying to achieve?

Why do you think you need to load binary image data via AJAX?

I'm asking just to make sure you're not barking up the wrong tree...

-Dan



[jQuery] Re: IE code profiler

2007-07-23 Thread Glen Lipka

This has SOME profiling capabilities.
http://www.ieinspector.com/

Also there is Firebug Lite.  Not sure how much it does.
http://www.getfirebug.com/lite.html

Glen

On 7/23/07, Gordon <[EMAIL PROTECTED]> wrote:



Does anyone know of an IE equivilent to Firebug that I can use to
profile code run times in a similar manner?  I have been working hard
over the last few weeks optimizing some jQuery driven code, and after
doing all the obvious stuff (cacheing selectors, reducing loops, etc)
I have been trying more tricky optimization tricks, such as cacheing
the DOM attributes of elements I manipulate a lot so I don't have to
use .attr and .css getters for conditional statements.

I have been using the Firebug code profiler to test how my code's
performance is improving, and unscientific throw-a-lot-of-elements-at-
it-and-see-how-it-affects-performance tests in Opera and Safari.
While most of the things I've tried have had a positive impact (albeit
a rather small one in a few cases), IE seems to be gaining much less
performance than the other browsers.

I'd like to be able to profile the code I'm working on in IE the same
way I can in FireBug,  but have so far failed to find a decent free
open source profiler.  If anyone has a pointer to something I can use
I'd appreciate it.  Alternativly if you have any tips regarding things
known to be slow specifically in Explorer that don't have a
significant negitive impact in the other browsers I'd also find that
helpful as I can look for them in my code.




[jQuery] Re: [ANN] Dimensions 1.0 final is finally here!

2007-07-23 Thread Fred Janon
Cool! Thanks, Brandon! Great customer service :)

On 7/23/07, Brandon Aaron <[EMAIL PROTECTED]> wrote:
>
> Docs have been updated to specify that a method works with a hidden
> element or not.
>
> --
> Brandon Aaron
>
> On 7/22/07, Fred Janon < [EMAIL PROTECTED]> wrote:
> >
> > Brandon,
> >
> > Thanks for the very prompt answer. Would you mind documenting these
> > points in the docs? THat woudl be great!
> >
> > Thanks
> >
> > Fred
> >
> > On 7/23/07, Brandon Aaron <[EMAIL PROTECTED] > wrote:
> > >
> > > All of the width and height methods work on hidden elements but the
> > > offset, position and offsetParent methods do not. All the methods handle
> > > positioned elements fine with the exception of fixed position. Fixed
> > > position has been very difficult to get implemented but it is a very high
> > > priority. I haven't done much testing with tables ... but to my knowledge 
> > > it
> > > all works just fine. If you come across an issue, feel free to email the
> > > list and/or submit a bug report on the Dimensions project page.
> > >
> > > Thanks!
> > >
> > > --
> > > Brandon Aaron
> > >
> > > On 7/22/07, Fred Janon <[EMAIL PROTECTED]> wrote:
> > > >
> > > > Looks good, Brandon.
> > > >
> > > > Does it work on: hidden element (display: "none"), positionned
> > > > elements (absolute or relative) or on table cells and rows?
> > > >
> > > > Thanks
> > > >
> > > > Fred
> > > >
> > > >
> > > >  On 7/23/07, Brandon Aaron <[EMAIL PROTECTED] > wrote:
> > > > >
> > > > > The 1.0 release of Dimensions is finally here. It has been a long
> > > > > time in the making. Thanks to everyone who helped me test it!
> > > > >
> > > > > You can get the details and see an example using the new position
> > > > > method over at my blog:
> > > > > http://blog.brandonaaron.net/2007/07/22/dimensions-10/
> > > > >
> > > > > You can download dimensions from the project page:
> > > > > http://jquery.com/plugins/project/dimensions
> > > > > Or via SVN: 
> > > > > http://jqueryjs.googlecode.com/svn/trunk/plugins/dimensions/
> > > > >
> > > > >
> > > > > If you find any bugs or have any feature requests ... be sure to
> > > > > report them at the dimensions project page.
> > > > >
> > > > > Oh... and you can check out the documentation over here:
> > > > > http://brandonaaron.net/docs/dimensions/
> > > > >
> > > > > Thanks!
> > > > >
> > > > > --
> > > > > Brandon Aaron
> > > > >
> > > >
> > > >
> > >
> >
>


[jQuery] not sure why prepend with effects not working for me

2007-07-23 Thread skatta

i simply want to do this ...

$("#mydiv").prepend("Hello There").show("slow");

it shows up, but without the 'show' effect



[jQuery] Re: 'Type mismatch' trying to append to XML node

2007-07-23 Thread Mike Alsup


var b = $("hi:first", xml);
var node = $("xxx");
node.appendTo(b);

Looking at the code above I would assume the problem is that we are
creating "node" using the current document and then trying to append
that node to an element in a different document.  This, of course,
won't work.

Mike




On 7/23/07, John Resig <[EMAIL PROTECTED]> wrote:


Yeah, it does seem like there's something tricky at play here, I've
created a ticket to track this:
http://dev.jquery.com/ticket/1419

I'll see if I can get a fix for this in for 1.1.4.

--John

On 7/23/07, Andy Martone <[EMAIL PROTECTED]> wrote:
>
> I'm having a similar problem in IE.  However, my code looks like this
> (using your syntax for creating the XML document):
>
> var hiNode = $("hi", xml);
> hiNode.text("foo");
>
> When I run this in Firefox, the hi node in the XML document gets a
> text node with a value of "foo" appended to it.  However, I get a type
> mismatch error in IE.
>
> I can use the .text() function to retrieve text nodes from XML
> documents - can I also use it to set text nodes?
>
> Any help is appreciated!
>
> On Jul 3, 9:09 am, "[EMAIL PROTECTED]"
> <[EMAIL PROTECTED]> wrote:
> > Hi... First post, so be gentle...
> >
> > I am trying to append a new entry into anXMLdocument.  This works
> > fine in FF but fails with a 'Type mismatch' error (line 170) in IE.
> >
> > By using the .toXML() plugin, the output is ' > class="group">xxx > userdefined="">xxx'
> >
> > I have tried in 1.1.3 & 1.1.2, both give the same error in IE.
> >
> > function loadXML(text) {
> > var xmlDoc = "";
> > // code for IE
> > if (window.ActiveXObject) {
> > xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
> > xmlDoc.async="false";
> > xmlDoc.loadXML(text);
> > }
> > // code for Mozilla, Firefox, Opera, etc.
> > else if (document.implementation &&
> >document.implementation.createDocument) {
> > var parser=new DOMParser();
> > var xmlDoc=parser.parseFromString(text,"text/xml");
> > }
> > else {
> >   alert('Your browser cannot handle this script');
> > }
> > return xmlDoc;
> >
> > }
> >
> > $(document).ready(function(){
> > var fred="";
> > console.log(fred);
> > // Push throughXMLprocessor
> >xml= loadXML(fred);
> >
> > var b = $("hi:first",xml);
> > var node = $("xxx");
> > node.appendTo(b);
> >
> > });
>
>



[jQuery] Re: not sure why prepend with effects not working for me

2007-07-23 Thread Mike Alsup


Is #myDiv hidden, or is it already visible when "show" is called?  Can
you show us more of the code?

Mike

On 7/23/07, skatta <[EMAIL PROTECTED]> wrote:


i simply want to do this ...

$("#mydiv").prepend("Hello There").show("slow");

it shows up, but without the 'show' effect




[jQuery] Re: 'Type mismatch' trying to append to XML node

2007-07-23 Thread John Resig


Yeah, and in fact, this will break in Firefox 3, since you can no
longer use foreign elements in a document, it has to adopt them first.
So it's good that we'd be fixing this now :-)

--John

On 7/23/07, Mike Alsup <[EMAIL PROTECTED]> wrote:


var b = $("hi:first", xml);
var node = $("xxx");
node.appendTo(b);

Looking at the code above I would assume the problem is that we are
creating "node" using the current document and then trying to append
that node to an element in a different document.  This, of course,
won't work.

Mike




On 7/23/07, John Resig <[EMAIL PROTECTED]> wrote:
>
> Yeah, it does seem like there's something tricky at play here, I've
> created a ticket to track this:
> http://dev.jquery.com/ticket/1419
>
> I'll see if I can get a fix for this in for 1.1.4.
>
> --John
>
> On 7/23/07, Andy Martone <[EMAIL PROTECTED]> wrote:
> >
> > I'm having a similar problem in IE.  However, my code looks like this
> > (using your syntax for creating the XML document):
> >
> > var hiNode = $("hi", xml);
> > hiNode.text("foo");
> >
> > When I run this in Firefox, the hi node in the XML document gets a
> > text node with a value of "foo" appended to it.  However, I get a type
> > mismatch error in IE.
> >
> > I can use the .text() function to retrieve text nodes from XML
> > documents - can I also use it to set text nodes?
> >
> > Any help is appreciated!
> >
> > On Jul 3, 9:09 am, "[EMAIL PROTECTED]"
> > <[EMAIL PROTECTED]> wrote:
> > > Hi... First post, so be gentle...
> > >
> > > I am trying to append a new entry into anXMLdocument.  This works
> > > fine in FF but fails with a 'Type mismatch' error (line 170) in IE.
> > >
> > > By using the .toXML() plugin, the output is ' > > class="group">xxx > > userdefined="">xxx'
> > >
> > > I have tried in 1.1.3 & 1.1.2, both give the same error in IE.
> > >
> > > function loadXML(text) {
> > > var xmlDoc = "";
> > > // code for IE
> > > if (window.ActiveXObject) {
> > > xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
> > > xmlDoc.async="false";
> > > xmlDoc.loadXML(text);
> > > }
> > > // code for Mozilla, Firefox, Opera, etc.
> > > else if (document.implementation &&
> > >document.implementation.createDocument) {
> > > var parser=new DOMParser();
> > > var xmlDoc=parser.parseFromString(text,"text/xml");
> > > }
> > > else {
> > >   alert('Your browser cannot handle this script');
> > > }
> > > return xmlDoc;
> > >
> > > }
> > >
> > > $(document).ready(function(){
> > > var fred="";
> > > console.log(fred);
> > > // Push throughXMLprocessor
> > >xml= loadXML(fred);
> > >
> > > var b = $("hi:first",xml);
> > > var node = $("xxx");
> > > node.appendTo(b);
> > >
> > > });
> >
> >
>



[jQuery] Re: not sure why prepend with effects not working for me

2007-07-23 Thread Scott Sauyet


skatta wrote:

i simply want to do this ...

$("#mydiv").prepend("Hello There").show("slow");

it shows up, but without the 'show' effect


Your "show" is applied to #mydiv, which is presumably already visible, 
and so it has no effect.  You might try something like (untested):


  $("Hello There").prependTo("#mydiv").hide().show("slow");

This way, the chainable connection is on the element you then want to 
operate on.


Cheers,

  -- Scott




[jQuery] Re: not sure why prepend with effects not working for me

2007-07-23 Thread skatta

scott, i think that was it ... i also had some issues with my order of
effect events. only problem is now ... liek prepend is great, if i
want to remove the content i can't ... remove() seems to give it a
display:none attribute ... i want to dump it from the DOM 100%

On Jul 23, 1:03 pm, Scott Sauyet <[EMAIL PROTECTED]> wrote:
> skatta wrote:
> > i simply want to do this ...
>
> > $("#mydiv").prepend("Hello There").show("slow");
>
> > it shows up, but without the 'show' effect
>
> Your "show" is applied to #mydiv, which is presumably already visible,
> and so it has no effect.  You might try something like (untested):
>
>$("Hello There").prependTo("#mydiv").hide().show("slow");
>
> This way, the chainable connection is on the element you then want to
> operate on.
>
> Cheers,
>
>-- Scott



[jQuery] Re: not sure why prepend with effects not working for me

2007-07-23 Thread skatta

er ... scratch display:none ... it doesn't remove it from the jquery
object.

On Jul 23, 1:03 pm, Scott Sauyet <[EMAIL PROTECTED]> wrote:
> skatta wrote:
> > i simply want to do this ...
>
> > $("#mydiv").prepend("Hello There").show("slow");
>
> > it shows up, but without the 'show' effect
>
> Your "show" is applied to #mydiv, which is presumably already visible,
> and so it has no effect.  You might try something like (untested):
>
>$("Hello There").prependTo("#mydiv").hide().show("slow");
>
> This way, the chainable connection is on the element you then want to
> operate on.
>
> Cheers,
>
>-- Scott



[jQuery] Re: ANNOUNCE: tablesorter 2.0 beta released!

2007-07-23 Thread benjam

I would like to request a feature...

It would be nice if one could optionally set the sorter to ignore all
HTML tags in the table cells.

For instance, have a setting in the config, something like:
ignoreTags: true,

Where if it were set, the sorter would strip out all the HTML tags
before sorting.

I request this, because I have situations where I would like to sort
on row IDs, where the row IDs are links to the specific row's data,
but there is no sort type for that situation.
If I set it to integer, it fails, if I set it to genericLink, it
fails, if I leave it to figure it out on its own, it fails.

I have created a custom type for my situation, but would rather have
it strip out tags all the time, because the tags are not visible, it
makes the sort rather confusing and appear 'broken'.

It would also make the sort discover script a little better, where in
my situation, instead of sorting as text, it would sort as integer
(because once the tags are gone, all that is left is integers).

Anywho...   great script.  And I await the final release.



[jQuery] Re: not sure why prepend with effects not working for me

2007-07-23 Thread Scott Sauyet


skatta wrote:

scott, i think that was it ... i also had some issues with my order of
effect events. only problem is now ... liek prepend is great, if i
want to remove the content i can't ... remove() seems to give it a
display:none attribute ... i want to dump it from the DOM 100%


"remove" removes items from the DOM but not the current JQuery object. 
As long as you don't hold on to that object and try to reuse it, you 
should be all set.


Good luck,

  -- Scott



[jQuery] Re: New Site and Drag/Drop Problem

2007-07-23 Thread Glen Lipka

I did have the interface plugin.  I tried switching, hoping that I would get
a better result.
The bad behavior was the jumping and it happens with ALL of the drag and
drop implementations I could find.
The easydrop one was smaller, so I left it in.

I hope the dimensions plugin gets included too.  I think it is a possibility
from what I have heard.
What does the 1.2 roadmap say about it?

Sorry I wasnt more specific.  Sometimes I flake.

Glen


On 7/23/07, Dan G. Switzer, II <[EMAIL PROTECTED]> wrote:



Glen,


First off, I wish people would list the exact plug-in and version they're
having problems with. There are some many plug-in now with similar
functionality, that I think it's important to specify which you're using.

I had assumed this was an Interface Drag-n-Drop question and was surprised
to see it was the Easy Drag-n-Drop.


Now for the issue at hand.

The only issue I observed was that when you mouse down on the image, the
image "jumps." I suspect this is a CSS issue basically.

However, I'd start by debugging the code in the $(this).mousedown()
handler.
I suspect the Easy Drag-n-Drop code isn't correctly calculating the
lastElemTop and lastElemLeft positions.

It actually looks like there's a code hack in there to try to provide a
guess as to where to position the element:

// IE doesn't return a valid value for 'top' and 'left' if they aren't
explicit set
// so we use a quick work around and set a specific position to start with
if(isNaN(lastElemTop )) lastElemTop  = lastMouseY - this.offsetHeight/2;
if(isNaN(lastElemLeft)) lastElemLeft = lastMouseX - this.offsetWidth/2;

I really wish the dimensions plug-in would get integrated into jQuery.
Calculating the true x/y position of an element is not as simple ass
getting
the CSS position. If they just integrated dimensions into the core API, it
would help developers to resolve a lot of these issues.

Every plug-in that relies on position an element on the screen should be
using the dimensions plug-in (or at least implementing similar code.)

-Dan

>Calmont Preschool Nursery Website
>http://www.carlmontparents.org 
>
>Admittedly, a low traffic site. :)
>
>It has a problem though.  The drag and drop is all jacked in IE.
>Anyone have the fix?
>
>Does the draggable script for jQuery UI work?
>
>Glen





[jQuery] jQuery Inteface Sortable functionality not working in overflow:auto

2007-07-23 Thread Iasthaai


Hi everyone,

As my subject message says, I'm having trouble with the Sortable
functionality of the Interface plugin when I am trying to use it within a
div and that div is using style="oveflow:auto".

I've also tried putting a div within this div to contain all of my elements,
but that doesn't solve my issue either. I simply want to sort these
elements, and when i drag an element to the bottom of the div, when it
begins to overflow, the scroll bar should scroll down using Autoscroll. Has
anyone else had and solved this issue? It seems to be a common
functionality. Thanks!
-- 
View this message in context: 
http://www.nabble.com/jQuery-Inteface-Sortable-functionality-not-working-in-overflow%3Aauto-tf4131327s15494.html#a11749140
Sent from the JQuery mailing list archive at Nabble.com.



[jQuery] Re: What are most commonly-used menu plugins?

2007-07-23 Thread Rhapidophyllum


Thanks very much for your experiences!


Personally, I like jdMenu:  http://jdsharp.us/jQuery/plugins/jdMenu/
---
+1 on jdMenu.  We've also used it with no troubles.  Very simple to
get up and running.






[jQuery] Re: jQuery Inteface Sortable functionality not working in overflow:auto

2007-07-23 Thread marshall

I had the same issue and created a demo to illustrate the issue a while back. I 
assume that this bug in the functionality will be addressed in the upcoming 
jQuery UI library. 

http://salingermultimedia.com/jQuery/interface/

Thanks,
Marshall


Hi everyone,

As my subject message says, I'm having trouble with the Sortable
functionality of the Interface plugin when I am trying to use it within a
div and that div is using style="oveflow:auto".

I've also tried putting a div within this div to contain all of my elements,
but that doesn't solve my issue either. I simply want to sort these
elements, and when i drag an element to the bottom of the div, when it
begins to overflow, the scroll bar should scroll down using Autoscroll. Has
anyone else had and solved this issue? It seems to be a common
functionality. Thanks!
-- 
View this message in context: 
http://www.nabble.com/jQuery-Inteface-Sortable-functionality-not-working-in-over
flow%3Aauto-tf4131327s15494.html#a11749140
Sent from the JQuery mailing list archive at Nabble.com.


[jQuery] JQuery plugins won't work in IE on this page only

2007-07-23 Thread textdriven

If you look at the following page you'll see that the photonews letter
works fine in IE (loads newsletters in Thickbox) and also work for all
the other pages that use it...

http://kadampa.org/en/centers/kmc-france/

Except for this page on which neither the accordion or thickbox work
in IE.

http://kadampa.org/en/centers/kmc-brazil/

Any ideas why?



[jQuery] Re: not sure why prepend with effects not working for me

2007-07-23 Thread skatta

actually ... empty seem sto do what i want.

plus, the app i've built basically uses no page refreshes at all (or
very little) ... all content is ajax'd in and out. it's a pay service
so i can demand things like JS + modern browsers required. it's
allowed me to beat up my sql server less, so i'm pretty happy.

my point is i'm trying to keep ram consumption at bay ... so i want it
removed completely



On Jul 23, 2:31 pm, Scott Sauyet <[EMAIL PROTECTED]> wrote:
> skatta wrote:
> > scott, i think that was it ... i also had some issues with my order of
> > effect events. only problem is now ... liek prepend is great, if i
> > want to remove the content i can't ... remove() seems to give it a
> > display:none attribute ... i want to dump it from the DOM 100%
>
> "remove" removes items from the DOM but not the current JQuery object.
> As long as you don't hold on to that object and try to reuse it, you
> should be all set.
>
> Good luck,
>
>-- Scott



[jQuery] Re: New Site and Drag/Drop Problem

2007-07-23 Thread Dan G. Switzer, II

>I did have the interface plugin.  I tried switching, hoping that I would
>get a better result.

What happens if make those draggable element have absolute positions? I
would imagine that would resolve the issue if you don't want to play around
with the code.

>The bad behavior was the jumping and it happens with ALL of the drag and
>drop implementations I could find.
>The easydrop one was smaller, so I left it in.
>
>I hope the dimensions plugin gets included too.  I think it is a
>possibility from what I have heard.
>What does the 1.2 roadmap say about it?
>
>Sorry I wasnt more specific.  Sometimes I flake.

It wasn't really geared towards you--just a trend I've noticed on the list.
I guess it's to be expected when you have some many variations of the same
type of plug-ins. It gets really bad when people talk about the Autocomplete
plug-in (since there's so many different versions of that plug-in.)

-Dan



[jQuery] Re: Autocomplete.js not runs on PHP Version 5.0.2

2007-07-23 Thread Larry Garfield

On Monday 23 July 2007, Giovanni Battista Lenoci wrote:
> Stephan Beal ha scritto:
> > Unfortunately, the author of autocomplete fails to document which PHP
> > version it needs.
>
> I'm not a guru of jquery, and I don't know the autocomplete plugin, but
> I'm sure that a js file work on the client and not on the server.
>
> If the php part of the script use a php5 feature you can modify the
> script to make it work on php4.
>
> > The "solution", i'm afraid, is to upgrade. For more information, see:
> >
> > http://gophp5.org/
> >
> > In short: any PHP version under 5.2 won't be supported much longer by
> > many leading PHP applications/frameworks.
>
> This is not the truth, this site suggest to make the transition to php5
> as soon as possible cause php4 development is reaching the end, only
> security bug will be ported to the 4.4 family.
>
> Bye :)

That is not the truth. :-)  The GoPHP5 effort is to push for dropping PHP 4 
support and focusing on PHP 5.2.  Participating projects are expected to not 
support any version of PHP below 5.2 as of their next release after February.

The PHP development team did not actually start discussing dropping support 
for PHP 4 until *after* GoPHP5 launched.  (Actually the day after.)  Whether 
or not there is a causal relationship there I'm not certain, but I doubt it 
was entirely coincidental.

At this point, if you're doing anything new then PHP 4 does not exist, and PHP 
5.1 and earlier only exists if you're stuck on a dedicated RHEL box and the 
sysadmin refuses to upgrade you.  For everything else, it's 5.2.

Disclaimer: I co-founded the GoPHP5 project. :-)

That said, I know it's possible to do Ajax auto-complete stuff in PHP 4, 
because Drupal's been doing it for over a year.  (The PHP 5.0.x series was 
notably buggy, and generally not recommended by anyone anymore.)

-- 
Larry Garfield  AIM: LOLG42
[EMAIL PROTECTED]   ICQ: 6817012

"If nature has made any one thing less susceptible than all others of 
exclusive property, it is the action of the thinking power called an idea, 
which an individual may exclusively possess as long as he keeps it to 
himself; but the moment it is divulged, it forces itself into the possession 
of every one, and the receiver cannot dispossess himself of it."  -- Thomas 
Jefferson


[jQuery] [Announce] jQuery Reference Guide available for pre-order

2007-07-23 Thread Karl Swedberg

Hi everyone,

Thought I'd let you know that book 2, jQuery Reference Guide: A  
Comprehensive Exploration of the Popular JavaScript Library, is now  
available for pre-order from the publisher's web site. It won't show  
up on amazon.com until a week or two after the publication date, so  
if you want a copy super-fast, go to this URL:

http://www.packtpub.com/jquery-reference-guide-Open-Source/book

Here's a snippet of the marketing pitch from packtpub.com:

This book offers an organized menu of every jQuery method,  
function, and selector. Each method and function is introduced with  
a summary of its syntax and a list of its parameters and return  
value, followed by a discussion, with examples where applicable, to  
assist in getting the most out of jQuery and avoiding the pitfalls  
commonly associated with JavaScript and other client-side languages.


If you're already familiar with JavaScript programming, this book  
will help you dive right into advanced jQuery concepts. You'll be  
able to experiment on your own, trusting the pages of this book to  
provide information on the intricacies of the library, where and  
when you need it. If you're still hungry for more, the book shows  
you how to cook up your own extensions with jQuery's elegant plug- 
in architecture.


This book is a companion to Learning jQuery: Better Interaction  
Design and Web Development with Simple JavaScript Techniques.
Learning jQuery begins with a tutorial to jQuery, followed by an  
examination of common, real-world client-side problems, and  
solutions for each of them, making it an invaluable resource for  
answers to all your jQuery questions.


jQuery Reference Guide digs deeper into the library, taking you  
through the syntax specifications and following up with a detailed  
discussion. You'll discover the untapped possibilities that jQuery  
makes available, and hone your skills as you return to this guide  
time and again.


This book is for web developers who want a broad, organized view of  
all the jQuery library has to offer or a quick reference on their  
desks to refer to for particular details.


The reader needs the basics of HTML and CSS, and should be  
comfortable with the syntax of JavaScript, but no knowledge of  
jQuery is assumed. This is not an introductory title and if you are  
looking to get started with jQuery (or JavaScript libraries in  
general) then you are looking for Learning jQuery.



Cheers,

--Karl
_
Karl Swedberg
www.englishrules.com
www.learningjquery.com





[jQuery] Re: [Announce] jQuery Reference Guide available for pre-order

2007-07-23 Thread Rey Bango


Ordered mine!

Karl Swedberg wrote:
Hi everyone, 

Thought I'd let you know that book 2, /jQuery Reference Guide: A 
Comprehensive Exploration of the Popular JavaScript Library/, is now 
available for pre-order from the publisher's web site. It won't show up 
on amazon.com until a week or two after the publication date, so if you 
want a copy super-fast, go to this URL:

http://www.packtpub.com/jquery-reference-guide-Open-Source/book

Here's a snippet of the marketing pitch from packtpub.com:

This book offers an organized menu of every jQuery method, function, 
and selector. Each method and function is introduced with a summary of 
its syntax and a list of its parameters and return value, followed by 
a discussion, with examples where applicable, to assist in getting the 
most out of jQuery and avoiding the pitfalls commonly associated with 
JavaScript and other client-side languages.


If you're already familiar with JavaScript programming, this book will 
help you dive right into advanced jQuery concepts. You'll be able to 
experiment on your own, trusting the pages of this book to provide 
information on the intricacies of the library, where and when you need 
it. If you're still hungry for more, the book shows you how to cook up 
your own extensions with jQuery's elegant plug-in architecture.


This book is a companion to Learning jQuery: Better Interaction Design 
and Web Development with Simple JavaScript Techniques.
Learning jQuery begins with a tutorial to jQuery, followed by an 
examination of common, real-world client-side problems, and solutions 
for each of them, making it an invaluable resource for answers to all 
your jQuery questions.


jQuery Reference Guide digs deeper into the library, taking you 
through the syntax specifications and following up with a detailed 
discussion. You'll discover the untapped possibilities that jQuery 
makes available, and hone your skills as you return to this guide time 
and again.


This book is for web developers who want a broad, organized view of 
all the jQuery library has to offer or a quick reference on their 
desks to refer to for particular details.


The reader needs the basics of HTML and CSS, and should be comfortable 
with the syntax of JavaScript, but no knowledge of jQuery is assumed. 
This is not an introductory title and if you are looking to get 
started with jQuery (or JavaScript libraries in general) then you are 
looking for Learning jQuery.



Cheers,

--Karl
_
Karl Swedberg
www.englishrules.com
www.learningjquery.com





--
BrightLight Development, LLC.
954-775- (o)
954-600-2726 (c)
[EMAIL PROTECTED]
http://www.iambright.com


[jQuery] Re: [Announce] jQuery Reference Guide available for pre-order

2007-07-23 Thread John Farrar


Just finished reading first book... will have review online shortly! 
EXCELLENT WORKS!


(One complaint, where are the ColdFusion examples? You should have that 
also. Not put off that you do PHP, but you are not going to hit a market 
segment like you want if you don't spread out just a bit.)


John Farrar


[jQuery] Re: [Announce] jQuery Reference Guide available for pre-order

2007-07-23 Thread Karl Swedberg

On Jul 23, 2007, at 4:21 PM, John Farrar wrote:


Just finished reading first book... will have review online  
shortly! EXCELLENT WORKS!


So glad you like it, John!


(One complaint, where are the ColdFusion examples? You should have  
that also. Not put off that you do PHP, but you are not going to  
hit a market segment like you want if you don't spread out just a  
bit.)


For that, you'll have to buy Rey Bango's upcoming book: jQuery and  
ColdFusion, a Marriage Made in Heaven.

 :-p



--Karl
_
Karl Swedberg
www.englishrules.com
www.learningjquery.com







[jQuery] Re: [Announce] jQuery Reference Guide available for pre-order

2007-07-23 Thread Ganeshji Marwaha

This is the best news i have heard all month... Congrats authors...

-GTG

On 7/23/07, Karl Swedberg <[EMAIL PROTECTED]> wrote:


Hi everyone,
Thought I'd let you know that book 2, *jQuery Reference Guide: A
Comprehensive Exploration of the Popular JavaScript Library*, is now
available for pre-order from the publisher's web site. It won't show up on
amazon.com until a week or two after the publication date, so if you want
a copy super-fast, go to this URL:
http://www.packtpub.com/jquery-reference-guide-Open-Source/book

Here's a snippet of the marketing pitch from packtpub.com:

This book offers an organized menu of every jQuery method, function, and
selector. Each method and function is introduced with a summary of its
syntax and a list of its parameters and return value, followed by a
discussion, with examples where applicable, to assist in getting the most
out of jQuery and avoiding the pitfalls commonly associated with JavaScript
and other client-side languages.

If you're already familiar with JavaScript programming, this book will
help you dive right into advanced jQuery concepts. You'll be able to
experiment on your own, trusting the pages of this book to provide
information on the intricacies of the library, where and when you need it.
If you're still hungry for more, the book shows you how to cook up your own
extensions with jQuery's elegant plug-in architecture.

This book is a companion to Learning jQuery: Better Interaction Design and
Web Development with Simple JavaScript Techniques.
Learning jQuery begins with a tutorial to jQuery, followed by an
examination of common, real-world client-side problems, and solutions for
each of them, making it an invaluable resource for answers to all your
jQuery questions.

jQuery Reference Guide digs deeper into the library, taking you through
the syntax specifications and following up with a detailed discussion.
You'll discover the untapped possibilities that jQuery makes available, and
hone your skills as you return to this guide time and again.


This book is for web developers who want a broad, organized view of all
the jQuery library has to offer or a quick reference on their desks to refer
to for particular details.

The reader needs the basics of HTML and CSS, and should be comfortable
with the syntax of JavaScript, but no knowledge of jQuery is assumed. This
is not an introductory title and if you are looking to get started with
jQuery (or JavaScript libraries in general) then you are looking for
Learning jQuery.



Cheers,
--Karl
_
Karl Swedberg
www.englishrules.com
www.learningjquery.com






[jQuery] Re: ANNOUNCE: tablesorter 2.0 beta released!

2007-07-23 Thread benjam

Could you also set the debugging output in the console to show what
type is being used to do the sorting?

e.g.- Sorting as 'currency' on 1 columns and dir 1 time: 2ms

or

Sorting as 'currency, date' on 2 columns and dir 0 time: 12ms

Thanks.



[jQuery] Re: [Announce] jQuery Reference Guide available for pre-order

2007-07-23 Thread Karl Swedberg

On Jul 23, 2007, at 4:34 PM, Karl Swedberg wrote:




(One complaint, where are the ColdFusion examples? You should have  
that also. Not put off that you do PHP, but you are not going to  
hit a market segment like you want if you don't spread out just a  
bit.)


For that, you'll have to buy Rey Bango's upcoming book: jQuery and  
ColdFusion, a Marriage Made in Heaven.

 :-p




Hi John,

I realized after I sent this that it might have come across too  
flippant. Sorry about that. The serious answer is that given the  
constraints we had to work with, we weren't able to venture into  
other server-side languages. Also, we had to strike a balance between  
giving enough server-side code to have the (ajax) examples be useful  
and not giving so much as to distract from the main focus of the  
book. We chose PHP for two reasons, (1) it's a very popular server- 
side language and (2) it's the sever-side language we ourselves are  
most familiar with.


We also wrote 2 1/2 times more than we had originally contracted for,  
so, if anything, we were trying to keep word count down.


That said, if the publisher ever wants us to write a second edition,  
this might be the sort of thing we could add. Maybe an additional  
ajax chapter showing how to achieve one task with jQuery + PHP,  
jQuery + ColdFusion, jQuery + Python, etc. Other books have done that  
sort of thing in later editions, so it's not out of the question, I  
suppose.


Again, I'm really happy to hear that you like the book.

Cheers,
Karl




[jQuery] Sortables (interface plugin)

2007-07-23 Thread rayfidelity

Hello,

I have a nested list and i'd like to lock the sortable option to the
each level (so that it wouldn't be possible to drag the selected
element to the another level).

I was looking at the documentation on the interface plugin site
(http://interface.eyecon.ro/docs/sort) but i didn't find such an
option...

Does anywan know if this is possible?

I'm also wondering how to submit the resorted list?



[jQuery] Can jQuery get attributes of the actual style sheet?

2007-07-23 Thread Matt Penner
IE does not support the CSS class :active but FireFox does.  I use this to
change the background color on a div to give feedback similar to a button
click.

For IE users I attach the mousedown and mouseup events to a function that
simply does the same thing.  However, if I ever change the color in my CSS
class I have to remember to change the jQuery function to match.

Can I have jQuery find this background color attribute in the css class in
the style sheet?  If so, I could just change it once in the CSS style sheet
and jQuery would use the latest value.

I haven't seen any examples on obtaining values from a style sheet so I
thought I'd ask if it was even possible.

Thanks,
Matt Penner


[jQuery] Re: IE code profiler

2007-07-23 Thread Remy Sharp

I came across the same problem profiling a project I was working on in
IE.  IE6 is particularly bad since the scripting engine seems to be
the slowest (sadly at over 50% of the market - it's the most important
browser).

The best thing I could come up with was a timing profiler - which in
the end did identify some serious bottlenecks in IE (lots of pngfixes
turned out to be one problem of mine).

It wrote a module that could time normal start/stops, events,
functions and anonymous functions without having to change much code.
Here's the link and few examples on the page:

http://remysharp.com/2007/04/20/performance-profiling-javascript/

Some of my colleagues are trying out MS Visual Studio for the
scripting tools - but I'm not particularly hopeful.

Hope that helps (a bit!).

Remy.

On Jul 23, 5:28 pm, Gordon <[EMAIL PROTECTED]> wrote:
> Does anyone know of an IE equivilent to Firebug that I can use to
> profile code run times in a similar manner?  I have been working hard
> over the last few weeks optimizing some jQuery driven code, and after
> doing all the obvious stuff (cacheing selectors, reducing loops, etc)
> I have been trying more tricky optimization tricks, such as cacheing
> the DOM attributes of elements I manipulate a lot so I don't have to
> use .attr and .css getters for conditional statements.
>
> I have been using the Firebug code profiler to test how my code's
> performance is improving, and unscientific throw-a-lot-of-elements-at-
> it-and-see-how-it-affects-performance tests in Opera and Safari.
> While most of the things I've tried have had a positive impact (albeit
> a rather small one in a few cases), IE seems to be gaining much less
> performance than the other browsers.
>
> I'd like to be able to profile the code I'm working on in IE the same
> way I can in FireBug,  but have so far failed to find a decent free
> open source profiler.  If anyone has a pointer to something I can use
> I'd appreciate it.  Alternativly if you have any tips regarding things
> known to be slow specifically in Explorer that don't have a
> significant negitive impact in the other browsers I'd also find that
> helpful as I can look for them in my code.



[jQuery] Re: Can jQuery get attributes of the actual style sheet?

2007-07-23 Thread Andy Matthews
Actually IE does support that class, but only on A tags.
 
Just to be fair.

  _  

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Matt Penner
Sent: Monday, July 23, 2007 4:28 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Can jQuery get attributes of the actual style sheet?


IE does not support the CSS class :active but FireFox does.  I use this to
change the background color on a div to give feedback similar to a button
click.

For IE users I attach the mousedown and mouseup events to a function that
simply does the same thing.  However, if I ever change the color in my CSS
class I have to remember to change the jQuery function to match. 

Can I have jQuery find this background color attribute in the css class in
the style sheet?  If so, I could just change it once in the CSS style sheet
and jQuery would use the latest value.

I haven't seen any examples on obtaining values from a style sheet so I
thought I'd ask if it was even possible. 

Thanks,
Matt Penner



[jQuery] Re: [Announce] jQuery Reference Guide available for pre-order

2007-07-23 Thread Web Specialist

Karl, I'm with John Farrar: ColdFusion guys is, maybe, the most active group
from this list. ;-) I'll wait Rey Bango CF+jQuery(maybe talking about
ajaxCFC???).

Thanks Karl for your time with jQuery.

Cheers

2007/7/23, Karl Swedberg <[EMAIL PROTECTED]>:


On Jul 23, 2007, at 4:34 PM, Karl Swedberg wrote:



(One complaint, where are the ColdFusion examples? You should have that
also. Not put off that you do PHP, but you are not going to hit a market
segment like you want if you don't spread out just a bit.)


For that, you'll have to buy Rey Bango's upcoming book: *jQuery and
ColdFusion, a Marriage Made in Heaven*.
 :-p



Hi John,

I realized after I sent this that it might have come across too flippant.
Sorry about that. The serious answer is that given the constraints we had to
work with, we weren't able to venture into other server-side languages.
Also, we had to strike a balance between giving enough server-side code to
have the (ajax) examples be useful and not giving so much as to distract
from the main focus of the book. We chose PHP for two reasons, (1) it's a
very popular server-side language and (2) it's the sever-side language we
ourselves are most familiar with.

We also wrote 2 1/2 times more than we had originally contracted for, so,
if anything, we were trying to keep word count down.

That said, if the publisher ever wants us to write a second edition, this
might be the sort of thing we could add. Maybe an additional ajax chapter
showing how to achieve one task with jQuery + PHP, jQuery + ColdFusion,
jQuery + Python, etc. Other books have done that sort of thing in later
editions, so it's not out of the question, I suppose.

Again, I'm really happy to hear that you like the book.

Cheers,
Karl





[jQuery] Opening external links in a new window

2007-07-23 Thread cfdvlpr

Is there an easy way to do this that does not require you to hand code
each external link?  Can you write a Jquery function that does this
for any link that has the string "http" in it?



[jQuery] Re: Can jQuery get attributes of the actual style sheet?

2007-07-23 Thread Glen Lipka

What happens when you put alert($("a:active").css("background-color"))  ?

Glen

On 7/23/07, Andy Matthews <[EMAIL PROTECTED]> wrote:


 Actually IE does support that class, but only on A tags.

Just to be fair.

 --
*From:* jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] *On
Behalf Of *Matt Penner
*Sent:* Monday, July 23, 2007 4:28 PM
*To:* jquery-en@googlegroups.com
*Subject:* [jQuery] Can jQuery get attributes of the actual style sheet?

IE does not support the CSS class :active but FireFox does.  I use this to
change the background color on a div to give feedback similar to a button
click.

For IE users I attach the mousedown and mouseup events to a function that
simply does the same thing.  However, if I ever change the color in my CSS
class I have to remember to change the jQuery function to match.

Can I have jQuery find this background color attribute in the css class in
the style sheet?  If so, I could just change it once in the CSS style sheet
and jQuery would use the latest value.

I haven't seen any examples on obtaining values from a style sheet so I
thought I'd ask if it was even possible.

Thanks,
Matt Penner



[jQuery] form attributes undefined?

2007-07-23 Thread jarrod


In $(document).ready() I have...

$("input").keyup(function(event){

var activeForm = $(event.target).parents('form');

$('div#debug').text( $(activeForm).attr('action'));
});

I'm trying to read attributes of the "activeForm". I keep getting
"undefined". I've tried to get the form's action, name, and id attributes.

When I output the form itself...

$('div#debug').text( $(activeForm).attr('action'));

I get "object Object".

Any insight appreciated.

Thanks.
-- 
View this message in context: 
http://www.nabble.com/form-attributes-undefined--tf4132949s15494.html#a11754367
Sent from the JQuery mailing list archive at Nabble.com.



[jQuery] Re: [Announce] jQuery Reference Guide available for pre-order

2007-07-23 Thread Karl Swedberg
I know there are a lot of you ColdFusion guys on the list, and I  
think that's really cool. You definitely add a lot to this list. Some  
day I hope to be able to play around with it myself. By the way, that  
comment about Rey writing a book was just a joke. Just poking at Rey  
a bit, all in good fun. I probably should have clarified that with  
more than an emoticon.



--Karl
_
Karl Swedberg
www.englishrules.com
www.learningjquery.com



On Jul 23, 2007, at 6:30 PM, Web Specialist wrote:

Karl, I'm with John Farrar: ColdFusion guys is, maybe, the most  
active group from this list. ;-) I'll wait Rey Bango CF+jQuery 
(maybe talking about ajaxCFC???).


Thanks Karl for your time with jQuery.

Cheers

2007/7/23, Karl Swedberg <[EMAIL PROTECTED]>:
On Jul 23, 2007, at 4:34 PM, Karl Swedberg wrote:




(One complaint, where are the ColdFusion examples? You should  
have that also. Not put off that you do PHP, but you are not  
going to hit a market segment like you want if you don't spread  
out just a bit.)


For that, you'll have to buy Rey Bango's upcoming book: jQuery and  
ColdFusion, a Marriage Made in Heaven.

 :-p




Hi John,

I realized after I sent this that it might have come across too  
flippant. Sorry about that. The serious answer is that given the  
constraints we had to work with, we weren't able to venture into  
other server-side languages. Also, we had to strike a balance  
between giving enough server-side code to have the (ajax) examples  
be useful and not giving so much as to distract from the main focus  
of the book. We chose PHP for two reasons, (1) it's a very popular  
server-side language and (2) it's the sever-side language we  
ourselves are most familiar with.


We also wrote 2 1/2 times more than we had originally contracted  
for, so, if anything, we were trying to keep word count down.


That said, if the publisher ever wants us to write a second  
edition, this might be the sort of thing we could add. Maybe an  
additional ajax chapter showing how to achieve one task with jQuery  
+ PHP, jQuery + ColdFusion, jQuery + Python, etc. Other books have  
done that sort of thing in later editions, so it's not out of the  
question, I suppose.


Again, I'm really happy to hear that you like the book.

Cheers,
Karl







[jQuery] Re: form attributes undefined?

2007-07-23 Thread jarrod




jarrod wrote:
> 
> 
> When I output the form itself...
> 
> $('div#debug').text( $(activeForm).attr('action'));
> 
> 

I meant

$('div#debug').text( $(activeForm));
-- 
View this message in context: 
http://www.nabble.com/form-attributes-undefined--tf4132949s15494.html#a11754522
Sent from the JQuery mailing list archive at Nabble.com.



[jQuery] Re: form attributes undefined?

2007-07-23 Thread Mike Alsup


The event callback takes place within the scope of the element, so you
can do this:

$("input").keyup(function(event) {
   // in here 'this' is the input element
   var activeForm = this.form;
});

Mike

On 7/23/07, jarrod <[EMAIL PROTECTED]> wrote:



In $(document).ready() I have...

$("input").keyup(function(event){

var activeForm = $(event.target).parents('form');

$('div#debug').text( $(activeForm).attr('action'));
});

I'm trying to read attributes of the "activeForm". I keep getting
"undefined". I've tried to get the form's action, name, and id attributes.

When I output the form itself...

$('div#debug').text( $(activeForm).attr('action'));

I get "object Object".

Any insight appreciated.

Thanks.
--
View this message in context: 
http://www.nabble.com/form-attributes-undefined--tf4132949s15494.html#a11754367
Sent from the JQuery mailing list archive at Nabble.com.




[jQuery] Re: Opening external links in a new window

2007-07-23 Thread Karl Swedberg


On Jul 23, 2007, at 6:45 PM, cfdvlpr wrote:


Is there an easy way to do this that does not require you to hand code
each external link?  Can you write a Jquery function that does this
for any link that has the string "http" in it?



Sure, if you want to do it for any link that has an href attribute  
beginning with "http," you could do something like this:


$('[EMAIL PROTECTED]').click(function() {
window.open($(this).attr('href'));
return false;
})


--Karl
_
Karl Swedberg
www.englishrules.com
www.learningjquery.com






[jQuery] Enable / disable submit button not working

2007-07-23 Thread jarrod


I can't figure out why this simple isn't working. I've tried a number of
variations. I've tried examining the vars with debugging output.

I have a bunch of forms on the page, each one having just one text input and
a submit button. When the user types in any of the forms I want to make sure
the text field is not empty (i.e., they haven't just cleared the field) and
enable the submit button accordingly.

However, the state of the submit button does not change. I've verified that
the script is getting called. I also tried $("input") instead of $("form").

Is there some error here that I'm missing.

I've tried using either line 3 (now commented) and line 4, below.

$(document).ready(function(){
$("form").keyup(function(event){
//var activeForm = $(event.target).parents('form');
var activeForm = this.form;
if ($(event.target).fieldValue()[0].length > 0)
{
$('[EMAIL PROTECTED]', activeForm).attr("disabled",
false).removeClass('formfielddisabled');
} else {
$('[EMAIL PROTECTED]', activeForm).attr("disabled",
true).addClass('formfielddisabled');
}
});
});
-- 
View this message in context: 
http://www.nabble.com/Enable---disable-submit-button-not-working-tf4133072s15494.html#a11754742
Sent from the JQuery mailing list archive at Nabble.com.



[jQuery] Re: Opening external links in a new window

2007-07-23 Thread Matt Stith

Or even easier,
$("[EMAIL PROTECTED]'http']").attr('target','_blank');

On 7/23/07, Karl Swedberg <[EMAIL PROTECTED]> wrote:



On Jul 23, 2007, at 6:45 PM, cfdvlpr wrote:



Is there an easy way to do this that does not require you to hand code
each external link?  Can you write a Jquery function that does this
for any link that has the string "http" in it?





Sure, if you want to do it for any link that has an href attribute
beginning with "http," you could do something like this:

$('[EMAIL PROTECTED]').click(function() {
window.open($(this).attr('href'));
return false;
})



--Karl
_
Karl Swedberg
www.englishrules.com
www.learningjquery.com










[jQuery] Re: Enable / disable submit button not working

2007-07-23 Thread Benjamin Sterling

jarrod,
I personally have never formated my code like $(event.target).fieldValue()[0],
but what happens when you do $(event.target).val().length?

Also, I believe you can get away  $('[EMAIL PROTECTED]',
activeForm).disabled = true; because I believe $('[EMAIL PROTECTED]',
activeForm).attr("disabled",false) does not work properly in IE6, I could be
wrong on that tho.

On 7/23/07, jarrod <[EMAIL PROTECTED]> wrote:




I can't figure out why this simple isn't working. I've tried a number of
variations. I've tried examining the vars with debugging output.

I have a bunch of forms on the page, each one having just one text input
and
a submit button. When the user types in any of the forms I want to make
sure
the text field is not empty (i.e., they haven't just cleared the field)
and
enable the submit button accordingly.

However, the state of the submit button does not change. I've verified
that
the script is getting called. I also tried $("input") instead of
$("form").

Is there some error here that I'm missing.

I've tried using either line 3 (now commented) and line 4, below.

$(document).ready(function(){
$("form").keyup(function(event){
//var activeForm = $(event.target).parents('form');
var activeForm = this.form;
if ($(event.target).fieldValue()[0].length > 0)
{
$('[EMAIL PROTECTED]', activeForm).attr("disabled",
false).removeClass('formfielddisabled');
} else {
$('[EMAIL PROTECTED]', activeForm).attr("disabled",
true).addClass('formfielddisabled');
}
});
});
--
View this message in context:
http://www.nabble.com/Enable---disable-submit-button-not-working-tf4133072s15494.html#a11754742
Sent from the JQuery mailing list archive at Nabble.com.





--
Benjamin Sterling
http://www.KenzoMedia.com
http://www.KenzoHosting.com


[jQuery] Re: Enable / disable submit button not working

2007-07-23 Thread jarrod



bmsterling wrote:
> 
> jarrod,
> I personally have never formated my code like
> $(event.target).fieldValue()[0],
> but what happens when you do $(event.target).val().length?
> 
> Also, I believe you can get away  $('[EMAIL PROTECTED]',
> activeForm).disabled = true; because I believe $('[EMAIL PROTECTED]',
> activeForm).attr("disabled",false) does not work properly in IE6, I could
> be
> wrong on that tho.
> 
At other times I've tried $(event.target).val() and found it doesn't work
reliably. I installed a plug in that provides the fieldValue() method...
http://www.malsup.com/jquery/form/
I've verified that fieldValue() is working exactly as expected.

I've narrowed in down a little in the last few minutes. It appears that this
selector is NOT returning the submit button of the active form. It seems to
be returning null maybe. (How can I find out?)

$('[EMAIL PROTECTED]', activeForm)  // doesn't give access to the submit
button

As a result this line, which should work fine, does nothing:

$('[EMAIL PROTECTED]', activeForm).attr("disabled",
true).addClass('formfielddisabled');

This makes me wonder if var activeForm = this.form; is doing anything.
-- 
View this message in context: 
http://www.nabble.com/Enable---disable-submit-button-not-working-tf4133072s15494.html#a11755007
Sent from the JQuery mailing list archive at Nabble.com.



[jQuery] Re: Enable / disable submit button not working

2007-07-23 Thread Mike Alsup


jarrod,

Now that I know what you're trying to do I would suggest something like this:

$('form').submit(function() {
   var val = $('[EMAIL PROTECTED]', this).val();
   if (val == null)
   alert('Please enter a value');
   return val != null;
});

Mike

On 7/23/07, jarrod <[EMAIL PROTECTED]> wrote:




bmsterling wrote:
>
> jarrod,
> I personally have never formated my code like
> $(event.target).fieldValue()[0],
> but what happens when you do $(event.target).val().length?
>
> Also, I believe you can get away  $('[EMAIL PROTECTED]',
> activeForm).disabled = true; because I believe $('[EMAIL PROTECTED]',
> activeForm).attr("disabled",false) does not work properly in IE6, I could
> be
> wrong on that tho.
>
At other times I've tried $(event.target).val() and found it doesn't work
reliably. I installed a plug in that provides the fieldValue() method...
http://www.malsup.com/jquery/form/
I've verified that fieldValue() is working exactly as expected.

I've narrowed in down a little in the last few minutes. It appears that this
selector is NOT returning the submit button of the active form. It seems to
be returning null maybe. (How can I find out?)

$('[EMAIL PROTECTED]', activeForm)  // doesn't give access to the submit
button

As a result this line, which should work fine, does nothing:

$('[EMAIL PROTECTED]', activeForm).attr("disabled",
true).addClass('formfielddisabled');

This makes me wonder if var activeForm = this.form; is doing anything.
--
View this message in context: 
http://www.nabble.com/Enable---disable-submit-button-not-working-tf4133072s15494.html#a11755007
Sent from the JQuery mailing list archive at Nabble.com.




[jQuery] Re: Enable / disable submit button solution

2007-07-23 Thread jarrod




malsup wrote:
> 
> 
> jarrod,
> 
> Now that I know what you're trying to do I would suggest something like
> this:
> 
> $('form').submit(function() {
> var val = $('[EMAIL PROTECTED]', this).val();
> if (val == null)
> alert('Please enter a value');
> return val != null;
> });
> 
> 

I ran the page through the W3C validator and found that it had a few
problems, including a table tag like this: "http://www.nabble.com/Enable---disable-submit-button-not-working-tf4133072s15494.html#a11755195
Sent from the JQuery mailing list archive at Nabble.com.



[jQuery] Toggling an objects visiblty without show and hide

2007-07-23 Thread Mitchell Waite

I like jQuery effects show and hide but they actually remove the object from 
the screen. So an  under an image will move up.

Can someone show me the best way to change (toggle) an objects "visibility" 
property between "hidden" and "visible" so any HTML under it will not move.

Mitch 




[jQuery] Re: Enable / disable submit button solution

2007-07-23 Thread Mike Alsup



Regarding the solution above, that's a different style of validation that
works great in some situations, but for this app I really want to pursue the
concept of not enabling the submit button until the form is valid.


Yes, I didn't mean to imply you should change "how" you're validating
the form.  I should have written it like this:

$('form').submit(function() {
   var val = $('[EMAIL PROTECTED]', this).val();

   // insert validation handling here!

   return val != null;
});

Cheers!

Mike


  1   2   >