[jQuery] How to make a methode in jQuery

2007-04-23 Thread wyo

Sorry my question might be rather basic stuff but none of the
tutorials, sample code or API description helps me solving my
question.

I've a function cropImage which I'd like to use as a methode. What's
the correct syntax for

  function cropImage () {
...
$(this).css ({width:w, height:h});
  }

  function resizeImage() {
$('img.picture:visible').cropImage());
  }

  $(window).bind('resize', resizeImage).trigger('resize');

Source is at http://www.orpatec.ch/index.php=gallery.php

O. Wyss



[jQuery] DOM traversal: changing XHTML attributes w/ jquery???

2007-04-23 Thread ldexterldesign

hey all,

wondering if anyone could help with this...

i have two jquery functions that act independently on two separate
columns of text in my webpage.

$(document).ready(function() {
   $("#articles .view_more").toggle(function() {
  $("#articles .bullet_text").addClass("bullet_text_go"); }
   , function() {
  $("#articles .bullet_text").removeClass("bullet_text_go"); }
   ); }
);

$(document).ready(function() {
   $("#comments .view_more").toggle(function() {
  $
("#comments .bullet_text").addClass("bullet_text_go").slideDown('slow'); }
   , function() {
  $
("#comments .bullet_text").removeClass("bullet_text_go").slideUp('slow'); }
   ); }
);

as you will see both buttons, when clicked, add a new class with a
greater height (height:100%), displaying the remainder of the columns
content.

now my problem is i would like to amend the functionality slightly and
i'm at a loss as how to do it.

1) i would like the slideUp/Down fluidity, but without the removeClass
function hiding all my comments on the second click

2) i would also like to amend the function so when the button is
clicked, in it's lowered state - revealing ALL content, to have the
value of the button changed to something like 'retract comments list',
rather than 'preview more comments' the whole time. i've read some
stuff on traversal methods here: 
http://docs.jquery.com/Tutorials:How_to_Get_Anything_You_Want
but nothing on changing XHTML attributes.

hope that makes sense. thanking anyone brave enough to help in
advance!
lewis



[jQuery] Re: Why does my ajax call fail ? (when it is called the second time) ??

2007-04-23 Thread Olaf Gleba



Am 24.04.2007 um 07:49 schrieb naveman:


that is my code, my comments show my problem. i tried not onle
jquery.html() but also any other possibilty to update the innerHTML.
so i am really wierd about that, since it has no error.


Since the call is excecuted correctly the first time, it may has  
something do with the rebinding of your behaviours. Whats your  
bindBehaviour() func. looks like? Is it defined as a expression or  
declaration? If is defined as an expression, is it defined before(!)  
using it as a callback?


bye
Olaf


[jQuery] Why does my ajax call fail ? (when it is called the second time) ??

2007-04-23 Thread naveman

Hi Guys,
i have following problem: i have a div (#lineups) that is updated but
fails for an second update, fired by the same event.
  jQuery('div.playerContainer').Droppable({
accept: 'player',
tolerance: 'intersect',
onDrop: function(drag){
 jQuery.ajax({
   type: 'POST',
   dataType: 'html',
   url : '".url_for('coaching/setposition')."',
   data: 'position='+this.parentNode.id+'&player='+drag.id
+'&formation='+".$formation['id'].",
   success: function(data){
 jQuery('div#lineups').html(data); // <=== this fails for the
second update
 alert('test');  // < this alert comes everytime... that
means that even the success function is executed
   },
   complete: function(response,
 bindBehaviours(); // <=== since i have new elements after
ajax call, i rebind my behaviours
   }
 })
},
  })"

that is my code, my comments show my problem. i tried not onle
jquery.html() but also any other possibilty to update the innerHTML.
so i am really wierd about that, since it has no error.

thx for comments and help
naveman



[jQuery] Why is "getScript" not working?

2007-04-23 Thread [EMAIL PROTECTED]

Hi,

For some reason, my call to "getScript" isn't working.  I'm calling

$.getScript("draw_modules_script.php", function(){
alert("Script loaded and executed.");
});

The alert statement is never called.  I have verified the file name is
correct and even tried specifying the full path (using http://).  The
script is probably causing a JS error, but how do I get what that
error is?  (No JS errors appear in Firefox).

Thanks, - Dave



[jQuery] Re: Google AJAX Feed API

2007-04-23 Thread Karl Swedberg

Very cool, Mike! Excellent job.

I started playing around with the Google Feed API this weekend. Lots  
of fun.



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



On Apr 23, 2007, at 9:02 PM, Mike Alsup wrote:



I decided to make this a more polished plugin.  You can find the new
version here:

http://malsup.com/jquery/gfeed/

Mike



Excellent Mike.  I've started using it in my application as a feed
reader, was very easy to implement with a backend for defining feeds,
I just loop them out and include the JS :)

Tane




[jQuery] Re: Autocomplete plugin

2007-04-23 Thread James Trix

Sorry Dan I think I keep jumping between the different implementations of
the Autocomplete mod at the end of the day its a great addon to Jquery
thanks for your time to kill the bugs

James

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





You're using Joern's mod. I know not all the bugs are worked out yet. I'll
try and take a look at it tomorrow morning.

-Dan






[jQuery] Re: parent/parents - children/?

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

Ariel,

>parent() - returns one level up
>parents() - returns multiple levels up
>
>children() - returns one level down
>? - returns multiple levels down
>
>Q: is this a missing feature or is there a reason to not have a function in
>place of the '?'

This would be the equivalent:

var oContext = $("#parent");

$("#child", oContect);

-- or --

oContext.find("#child");

Either one be the equivalent of searching a node and finding the matching
children tags.

-Dan



[jQuery] Re: what's the best way to catch malformed xml in an ajax call?

2007-04-23 Thread Ⓙⓐⓚⓔ

now I have this for the browsers I use, I wonder what IE would whine about!

   var surveyComplete = function(xrh, status){
   var xml = xrh.responseXML
   if (status!="success")
   form.html("" + status.toUpperCase() + " requesting:" + url +"")
   .append("" + xrh.responseText + "")
   else if (!xml) //safari webkit
   form.text(xrh.responseText).wrap("")
   .prepend(" broken xml:" + url
+" ")
   else if (xml.hasChildNodes && !xml.hasChildNodes()) // opera
   form.text(xrh.responseText).wrap("")
   .prepend(" broken xml:" + url
+" ")
   else if (xml.firstChild.nodeName == "parsererror") //firefox
   form.text(xrh.responseText).wrap("")
   .prepend(" broken xml:" + url
+" "+ $.xml(xml))
   else
   surveyProcess(xml)
   }
   $.ajax({url:url,datatype:'xml',complete:surveyComplete})



On 4/23/07, Ⓙⓐⓚⓔ <[EMAIL PROTECTED]> wrote:


success isn't successful, it just gets back the xml if successful or in
the case of firefox, it seems to get a special parsererror (formatted as
xml)!

I've removed all callbacks except complete, I have to do a lot of browser
specific code to determine if the xml is malformed or the file is missing.

the final case is the actual success.

this is what I have so far:
...


On 4/22/07, Klaus Hartl <[EMAIL PROTECTED]> wrote:
>
>
> Ⓙⓐⓚⓔ schrieb:
> > I use the error callback, but it doesn't get called back when the xml
> is
> > malformed.
> >
> > Do I need to use the complete callback??
>
> Yes, I think so. Or the success callback. The reason is, that the
> response has been successfully delivered, just with ill-formed XML.
>
> You may need a try/catch, but I don't know how browsers handle
> ill-formed XML, e.g. if you can catch that error...
>
>
> -- Klaus
>
>


--
Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ





--
Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ


[jQuery] Re: Alternative way of reacting to clicked link?

2007-04-23 Thread Ⓙⓐⓚⓔ

Have you thought of starting with a blank page and filling it with ajax,
then only showing the items based on the #name??? then you would only have
to bind 1/26 of them at a time.

On 4/23/07, Alessandro Portale <[EMAIL PROTECTED]> wrote:



Hi,

thanks for the suggestions.

> While not unobtrusive, you'd be better off generated that content
w/embedded
> onclick events.
> This seriously goes against the jQuery philosophy, but DOM parsing is
just
> sluggish when you have thousands of elements.

I could live with not being 100% philosophy compliant with JQuery in
order to have the pages working on all browsers. However, I cannot
modify the HTML data (besides a few inclusions in the headers) and
thus am forced to be unobtrusive. That's the perfect job for JQuery :)

> With all that said, I can't ever imagine why I'd need a page w/12,000
links
> on it. It sure seems like you'd be better served by generated links
> on-demand.

Those monster pages are generated references for an Application
Library (for example http://doc.trolltech.com/4.3-snapshot/functions.html
and http://doc.trolltech.com/4.3-snapshot/qwidget.html). Splitting up
at least the first page and fixing the HTML will be done soon. But for
now, I need to handle those pages.

Alessandro





--
Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ


[jQuery] Re: parent/parents - children/?

2007-04-23 Thread Karl Rudd


There's not explicit function for that but you could just us '*'. For example:

   var something = $('#something');
   var children = something.children();
   var childrenAndGrandchildren = something.find('*');

I'd hazard a guess that the reason there is no
"childrenAndGrandchildren()" function is that it's not something that
get's used a lot. Usually you're explicilty selecting children (or
grandchildren) based on tags or classes.

Karl Rudd

On 4/24/07, Ariel Jakobovits <[EMAIL PROTECTED]> wrote:


I know this is for Dev, but I have not been approved for that list yet...

parent() - returns one level up
parents() - returns multiple levels up

children() - returns one level down
? - returns multiple levels down

Q: is this a missing feature or is there a reason to not have a function in 
place of the '?'



[jQuery] parent/parents - children/?

2007-04-23 Thread Ariel Jakobovits

I know this is for Dev, but I have not been approved for that list yet...

parent() - returns one level up
parents() - returns multiple levels up

children() - returns one level down
? - returns multiple levels down

Q: is this a missing feature or is there a reason to not have a function in 
place of the '?'


[jQuery] Re: Google AJAX Feed API

2007-04-23 Thread Mike Alsup


I decided to make this a more polished plugin.  You can find the new
version here:

http://malsup.com/jquery/gfeed/

Mike



Excellent Mike.  I've started using it in my application as a feed
reader, was very easy to implement with a backend for defining feeds,
I just loop them out and include the JS :)

Tane


[jQuery] Re: Autocomplete plugin

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

James,

>The only other part that I would love to see with the code is to some how
>in the drop down list of Autocomplete results  would be to highlight the
>top record. I will have a play today and see if I can get that working I
>saw there are ways to apply a style sheet but dont think I would be able to
>highlight just the first record with out hacking at the code.

If you turn on autofill, it'll pre-fill in the box w/the first option. Not
exactly what you asked for, but it does the same thing.

-Dan



[jQuery] Re: Autocomplete plugin

2007-04-23 Thread James Trix
Thanks Dan its aways the simple things that get me stuck, I did not even
think to check the Autocomplete code untill I had hit my head on the wall a
few times and then it was so simple. The SQL is quite fast but not as fast
as the array but I will see if I can do any thing with the database to speed
it up.

The only other part that I would love to see with the code is to some how in
the drop down list of Autocomplete results  would be to highlight the top
record. I will have a play today and see if I can get that working I saw
there are ways to apply a style sheet but dont think I would be able to
highlight just the first record with out hacking at the code.

James

On 4/23/07, Dan G. Switzer, II <[EMAIL PROTECTED]> wrote:
>
>
> James,
>
>
> >Aways the simple things changed
> >
> >Response.Write trim(objRS.Fields ("LOC")) & chr(13)
> >
> >to
> >
> >Response.Write objRS.Fields("LOC") & vbcrlf
> >
> >And it worked fine :-)
>
> I was just getting ready to respond. The Autocomplete code is searching
> for
> \n (chr(13) chr(10)) as the row delimiter--which is why chr(13) (\r)
> wasn't
> working.
>
> -Dan
>
>
> >
>

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



[jQuery] Re: DOM manipulation white space issues

2007-04-23 Thread Ariel Jakobovits

figured it out: I had ' ' between empty div's that get filled after the 
page loads and those were the culprits.

I don't remember why I put those there, but I thought it was because the 
browsers don't like empty div's. Anyone know anything about this?

- Original Message 
From: Ariel Jakobovits <[EMAIL PROTECTED]>
To: jquery-en@googlegroups.com
Sent: Monday, April 23, 2007 3:54:49 PM
Subject: [jQuery] DOM manipulation white space issues


I am experiencing spacing issues with my divs that is apparently fixed when I 
delete white space between DIV's using firebug.

is there a CSS way around this?

do we need a trim functionality added to append() and such?


[jQuery] Re: DOM manipulation white space issues

2007-04-23 Thread Josh Nathanson


I am experiencing spacing issues with my divs that is apparently fixed 
when I delete white space between DIV's using firebug.


I am having trouble with jEditable/textarea that seems to be related to your 
issue.  When I do a POST, and the textarea kicks back to the div, a space 
and two newlines are being inserted in the DOM in my div.  If I go and 
re-edit the textarea, I have to delete the newlines from the textarea that 
were inserted in the div.


I don't know if this is in the guts of jQuery somewhere or if it has to do 
with jEditable in particular.


-- Josh




[jQuery] Re: vertical fisheye menu? OSX dock or tsunami

2007-04-23 Thread Sapphire


Very nice. Will it work for images?

Patrick Hall wrote:

Here's my crummy attempt:

http://ruphus.com/code/jquery/fisheye.html


-p@


  




[jQuery] Re: Alternative way of reacting to clicked link?

2007-04-23 Thread Alessandro Portale

Hi,

thanks for the suggestions.

> While not unobtrusive, you'd be better off generated that content w/embedded
> onclick events.
> This seriously goes against the jQuery philosophy, but DOM parsing is just
> sluggish when you have thousands of elements.

I could live with not being 100% philosophy compliant with JQuery in
order to have the pages working on all browsers. However, I cannot
modify the HTML data (besides a few inclusions in the headers) and
thus am forced to be unobtrusive. That's the perfect job for JQuery :)

> With all that said, I can't ever imagine why I'd need a page w/12,000 links
> on it. It sure seems like you'd be better served by generated links
> on-demand.

Those monster pages are generated references for an Application
Library (for example http://doc.trolltech.com/4.3-snapshot/functions.html
and http://doc.trolltech.com/4.3-snapshot/qwidget.html). Splitting up
at least the first page and fixing the HTML will be done soon. But for
now, I need to handle those pages.

Alessandro



[jQuery] DOM manipulation white space issues

2007-04-23 Thread Ariel Jakobovits

I am experiencing spacing issues with my divs that is apparently fixed when I 
delete white space between DIV's using firebug.

is there a CSS way around this?

do we need a trim functionality added to append() and such?


[jQuery] Re: ext dialog and form

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

Eli,

>I'm trying to use extjs to replace all the popup windows in my system
>(currently using thickbox) to change pref, add members etc'.

You might find quicker help over at the Ext JS forums:
http://extjs.com/forum/

There's a lot of expertise over there and it's all specific to Ext JS. I
haven't played around w/the library enough to be of any help.

-Dan



[jQuery] ext dialog and form

2007-04-23 Thread Eli

Hey guys,
I'm trying to use extjs to replace all the popup windows in my system
(currently using thickbox) to change pref, add members etc'.

i managed to create the window, managed to create the forum (well,
srota), but i can't seem to "submit" the form and hide the dialog.

I've created the dialog, and set the submit button to run the function
submitDLG:
dialog.addButton('Submit', sebmitDLG, dialog);

now, in submitDLG i can't quite get how I proccess the forum, i used
to use the fastSerialize function, but that doesn't seems to work with
extjs.

and plus, i can't figure out how to close the dialog from the
submitDLG function, tried to use dialog.hide() (when dialog is passed
from the dialog.addButton('Submit', sebmitDLG,
dialog); call), it just hides my submit button...

Thanks.



[jQuery] Re: Browser Dom Performance

2007-04-23 Thread lacroix1547

>This is very interesting.  Is it something you can share with this group?

http://beta00.logient.com/cat/dom-analysis.rar
You are not supposed to have any js error in ff2 or ie6.
Its really just experimental.
Still I have some nice demos.
Start with domAnalysisDemo.html
The basic idea was to do the heavy lifting with the static analysis
then to do the fancy stuff with jquery.
At first the static analysis started with some sort of directory of
css classes to efficiently find dom elements.
Then it become some sort of fancy css classes indexing solution.
As you will see, classes starting with an underscore have a special
meaning.
They can be ignored or not...
Enjoy.

>Using JS for straightforward styling feels... awkward.
Or with something like http://dean.edwards.name/IE7/compatibility/
(which is slower then jquery to my experience)
I am just talking about 'js powered css like style rules'

The point is that advanced styling (html decoration as I like to call
it) with power, expressivity, portability and cost-efficiency with
todays css...
I think we can do beter.
As I said maybe IE7 will be enough soon enough... but I was still
develloping for ie5.5 not long ago so...
And maybe I am just too dramatic about not being able to use the >
selector in ie6.
And Maybe I should just do some flash or flex !












[jQuery] Re: vertical fisheye menu? OSX dock or tsunami

2007-04-23 Thread Patrick Hall

Here's my crummy attempt:

http://ruphus.com/code/jquery/fisheye.html


-p@



[jQuery] Re: Blink effect

2007-04-23 Thread Alexandre Plennevaux
i just found out the interface plugin has the "pulsate" effect :) 
grreat!

   _  

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Josh 
Nathanson
Sent: lundi 23 avril 2007 20:42
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Blink effect


How about callback = function() {
$("#mydiv").hide().show().hide().show()
}
 
-- Josh

- Original Message - 
From: HYPERLINK "mailto:[EMAIL PROTECTED]"Alexandre Plennevaux 
To: HYPERLINK "mailto:jquery-en@googlegroups.com"jquery-en@googlegroups.com 
Sent: Monday, April 23, 2007 1:27 PM
Subject: [jQuery] Blink effect

hi,
 
i've been playing with the effects built in jquery and had a lot of fun playing 
with such flexibility. However, i could not achieve what i wanted: having an 
element blink twice when its html content get loaded via ajax. The problem is 
the blinking of course, jquery has mad ajax so easy.
i was wondering if anyone succeeded in creating that special effect, that would 
have something blink a certain number of times upon appearing ?
 
thank you very much!
 
alex
 

Alexandre Plennevaux - LAb[au] asbl.vzw / MediaRuimte
Lakensestraat/Rue de Laeken 104
B-1000 Brussel-Bruxelles-Brussels
Belgie-Belgique-Belgium

Tel:+32(0)2.219.65.55
Fax:+32(0)2.426.69.86
Mobile:+32(0)476.23.21.42
HYPERLINK "blocked::http://www.lab-au.com/"http://www.lab-au.com
HYPERLINK "blocked::http://www.mediaruimte.be/"http://www.mediaruimte.be

HYPERLINK 
"blocked::http://www.mediaruimte.be/"__

The information in this e-mail is intended only for the addressee named above.  
If you are not that addressee, please note that any disclosure, distribution or 
copying of this e-mail is prohibited.
Because e-mail can be electronically altered, the integrity of this 
communication cannot be guaranteed.

__

 


Ce message Envoi est certifié sans virus connu.
Analyse effectuée par AVG.
Version: 7.5.465 / Base de données virus: 269.5.9/773 - Date: 22/04/2007 20:18



Ce message Envoi est certifié sans virus connu.
Analyse effectuée par AVG.
Version: 7.5.465 / Base de données virus: 269.5.9/773 - Date: 22/04/2007 20:18
 


[jQuery] Re: blockUI plugin blocking form submit on IE 6 & 7

2007-04-23 Thread Mike Alsup



OK, after lunch I knocked together a quick and very dirty php page
that contains a form that submits back to itself. In my testing, this
form displays the much of the same behavior that I described
originally. Works fine in FF. Form doesn't submit in IE 6 or 7. This
example, however, does not present the iframe alignment problem I
encountered with my original form. I can deal with that I think. It
must be some sort of CSS collision. Here's the form:


Thanks for the sample page, Stuart.  I reworked your code a bit before
I started debugging and once I did it started working fine.  I think
it's important to use setTimeout so that the browser has some time to
render the updated DOM before lauching into its submit operation.  I
don't know why the submit wasn't working in ie previously, but it is
now.  Give this a shot:

http://www.w3.org/TR/html4/strict.dtd";>





$.blockUI.defaults.elementMessage = "Please Wait...";
$.extend($.blockUI.defaults.elementMessageCSS, {
  color: '#00a',
  backgroundColor: '#fff',
  border: '2px solid #2f4f4f'
});

$(function () {
   $("#insertForm").submit(function() {
   $(this).block();
   setTimeout(test, 100);
   return false;
   });
});

function test() {
   $("#insertForm")[0].submit();
}



Insert Record



  First Name: 
  Last Name: 
  Age: 


  
  
  First Name
  Last Name
  Age
  
  
  
  
  
  
  
  
  
  
  
  







[jQuery] Re: Show()/Hide() Bug?

2007-04-23 Thread Brandon Aaron

Explicitly set a background color on the text to try and prevent the
text smoothing issue. Otherwise you can checkout interface plugin as I
believe it has some color animating options which might suit your
needs better.

http://interface.eyecon.ro/

--
Brandon Aaron

On 4/23/07, d3 <[EMAIL PROTECTED]> wrote:


But in IE opacity draw with DirectX and not support smoothing. This
text when is not smoothed.

On 24 апр, 00:21, "Brandon Aaron" <[EMAIL PROTECTED]> wrote:
> The opacity is set to 0. to avoid a Firefox flicker back in 1.0.
> It is no longer in the latest SVN and soon to be 1.3.
>
> --
> Brandon Aaron
>
> On 4/23/07, d3 <[EMAIL PROTECTED]> wrote:
>
>
>
> > In FireFox 2.0.0.3 and in IE7 after show and hide with speed parameter
> > opacity of element not restored to 1.
>
> > Before execute script:
> > Test text
> > After execute script:
> > Test text
>
> > See it in FireBug or in IE DOM explorer: element P is now with minimal
> > transparency.
>
> > On 23 апр, 22:17, "Sean Catchpole" <[EMAIL PROTECTED]> wrote:
> > > I ran you code in FireFox and in IE6 and recieved no such error.
>
> > > ~Sean




[jQuery] Re: Alternative way of reacting to clicked link?

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

Alessandro,

>I have a page with about 12000 links in it. A few of these links point
>to anchors on the same page. A function should be called when those
>"intra page" links are clicked.

The bottom line is anything you do to parse 12,000 DOM objects on the same
page is going to be slow--even more so if each link would reside inside one
or more other elements. 

While not unobtrusive, you'd be better off generated that content w/embedded
onclick events. You can still minimize the obtrusiveness of your code by
doing something like:

link

function clickHandler(el){
// do whatever you want w/the element reference
alert(el.href);
// prevent the href from happening
return false;
}

This seriously goes against the jQuery philosophy, but DOM parsing is just
sluggish when you have thousands of elements.

With all that said, I can't ever imagine why I'd need a page w/12,000 links
on it. It sure seems like you'd be better served by generated links
on-demand.

-Dan



[jQuery] Re: Show()/Hide() Bug?

2007-04-23 Thread d3

But in IE opacity draw with DirectX and not support smoothing. This
text when is not smoothed.

On 24 апр, 00:21, "Brandon Aaron" <[EMAIL PROTECTED]> wrote:
> The opacity is set to 0. to avoid a Firefox flicker back in 1.0.
> It is no longer in the latest SVN and soon to be 1.3.
>
> --
> Brandon Aaron
>
> On 4/23/07, d3 <[EMAIL PROTECTED]> wrote:
>
>
>
> > In FireFox 2.0.0.3 and in IE7 after show and hide with speed parameter
> > opacity of element not restored to 1.
>
> > Before execute script:
> > Test text
> > After execute script:
> > Test text
>
> > See it in FireBug or in IE DOM explorer: element P is now with minimal
> > transparency.
>
> > On 23 апр, 22:17, "Sean Catchpole" <[EMAIL PROTECTED]> wrote:
> > > I ran you code in FireFox and in IE6 and recieved no such error.
>
> > > ~Sean



[jQuery] Re: library conflict

2007-04-23 Thread Brian Miller

PeriodicalUpdater is actually pretty easy to extract from Prototype, or to
simply rewrite yourself.  It's just a wrapper around the
window.setInterval method, combined with the equivalent of $.load().

In fact, I think there's a plugin that does just that, called jHeartbeat. 
Check the plugins page.

- Brian


> Think perhaps that jQuery rounded corners in one of those that needs to
> be re-done, 'cos
> no matter what order I call the libraries, whether I use
> jQuery.noConflict() or not, it just
> will not round the box corners.
>
> The sole reason of trying to use prototype is cos of PeriodicalUpdater
> which makes it easy
> for me to loop a function.  I say easy cos I'm not a coder. So if anyone
> can point out a
> jQuery-equivalent to PeriodicalUpdater, I'll just stick with jQuery for
> all my js needs.
>
> TIA
>
> Mike Alsup wrote:
>>
>> Kelly,
>>
>> I assume that "your code" is jQuery based.  The easiest approach is to
>> simply scope your code like this:
>>
>> (function($) {
>>
>>// your code here
>>
>> })(jQuery);
>>
>> This lets you write in typical jQuery style (using the $ symbol)
>> without worrying about collisions with other libraries.  Most jQuery
>> plugins have been refactored to use this approach.  However, as I
>> pointed our earlier, some older plugins still assume that $ == jQuery.
>> Thickbox is an older plugin that is known to rely on $ but Klaus
>> Hartl is currently rewritting it and a new and improved version will
>> be available soon(ish).
>>
>> Mike
>>
>>
>> On 4/23/07, kerford <[EMAIL PROTECTED]> wrote:
>>>
>>> I'd like to piggyback on this thread if I could. I'm writing for an
>>> environment that may or may not have other libraries included in the
>>> page. It's not something I can know beforehand. I also won't know in
>>> what order libraries (if any) are loaded. What is the best, most
>>> defensive approach to take for this kind of environment?
>>>
>>> Thanks,
>>> Kelly



[jQuery] Re: Show()/Hide() Bug?

2007-04-23 Thread Brandon Aaron

The opacity is set to 0. to avoid a Firefox flicker back in 1.0.
It is no longer in the latest SVN and soon to be 1.3.

--
Brandon Aaron

On 4/23/07, d3 <[EMAIL PROTECTED]> wrote:


In FireFox 2.0.0.3 and in IE7 after show and hide with speed parameter
opacity of element not restored to 1.

Before execute script:
Test text
After execute script:
Test text

See it in FireBug or in IE DOM explorer: element P is now with minimal
transparency.

On 23 апр, 22:17, "Sean Catchpole" <[EMAIL PROTECTED]> wrote:
> I ran you code in FireFox and in IE6 and recieved no such error.
>
> ~Sean




[jQuery] Re: Blink effect

2007-04-23 Thread Brandon Aaron


You can just use the fadeOut and fadeIn methods to animate just the opacity:

$('#mydiv').fadeOut().fadeIn().fadeOut().fadeIn();

You could loop a set number of times with something like this:

var blinkCount = 2*2;// two blinks, 4*2 for four blinks
do {
   $('#mydiv')['fade'+(blinkCount%2==0?'Out':'In')]('slow');
} while (--blinkCount);

--
Brandon Aaron


On 4/23/07, Alexandre Plennevaux <[EMAIL PROTECTED]> wrote:



no it does not work: it seems show() / hide() works on the width, height, or
opacity. but then i guess i could try to build this effect by using a
timeout and display:none / auto or something like that

 
 From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Josh Nathanson
Sent: lundi 23 avril 2007 20:42
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Blink effect



How about callback = function() {
$("#mydiv").hide().show().hide().show()
}

-- Josh

- Original Message -
From: Alexandre Plennevaux
To: jquery-en@googlegroups.com
Sent: Monday, April 23, 2007 1:27 PM
Subject: [jQuery] Blink effect


hi,

i've been playing with the effects built in jquery and had a lot of fun
playing with such flexibility. However, i could not achieve what i wanted:
having an element blink twice when its html content get loaded via ajax. The
problem is the blinking of course, jquery has mad ajax so easy.
i was wondering if anyone succeeded in creating that special effect, that
would have something blink a certain number of times upon appearing ?

thank you very much!

alex


Alexandre Plennevaux - LAb[au] asbl.vzw / MediaRuimte
Lakensestraat/Rue de Laeken 104
B-1000 Brussel-Bruxelles-Brussels
Belgie-Belgique-Belgium

Tel:+32(0)2.219.65.55
Fax:+32(0)2.426.69.86
Mobile:+32(0)476.23.21.42
http://www.lab-au.com
http://www.mediaruimte.be

__

The information in this e-mail is intended only for the addressee named
above.  If you are not that addressee, please note that any disclosure,
distribution or copying of this e-mail is prohibited.
Because e-mail can be electronically altered, the integrity of this
communication cannot be guaranteed.

__



Ce message Envoi est certifié sans virus connu.
Analyse effectuée par AVG.
Version: 7.5.465 / Base de données virus: 269.5.9/773 - Date: 22/04/2007
20:18



Ce message Envoi est certifié sans virus connu.
 Analyse effectuée par AVG.
 Version: 7.5.465 / Base de données virus: 269.5.9/773 - Date: 22/04/2007
20:18



[jQuery] JavaScript Inclusion

2007-04-23 Thread Brad

Hi all,

I'm just getting started working with jQuery but have been impressed
thus far by its capabilities.  Here is my problem:

I'm developing a Java application utilizing Struts and tiles which has
a main "layout" page that includes separate .jsp files for sub-pages.
I've been able to create a standalone working example utilizing jQuery
in a single .jsp but when I attempt to incorporate it into my project
it locks up the entire application.  Is there an issue with tiles that
I'm not aware of?  Do all JavaScript inclusions need to be on one page
in order for jQuery to work?

Please help!

Thanks,
Brad



[jQuery] IE not executing JS loaded on the fly

2007-04-23 Thread [EMAIL PROTECTED]

Hi,

I have this code

// loads modules for the selected tab.
function loadAllModules() {
$.get('draw_modules.php',
{},
function(data){
$("#container").empty().append(data);
});
}

The page "draw_modules.php" creates some HTML and also some
Javascript.  The HTML gets loaded fine, but the JS doesn't get
executed on PC IE 7.  The JS is stuff like:

document.getElementById('ce10').checked = true;

What is a better way of running the JS on IE?  If my question doesn't
make sense, please let me know what else I can include.

Much thanks, - Dave



[jQuery] Re: Show()/Hide() Bug?

2007-04-23 Thread d3

In FireFox 2.0.0.3 and in IE7 after show and hide with speed parameter
opacity of element not restored to 1.

Before execute script:
Test text
After execute script:
Test text

See it in FireBug or in IE DOM explorer: element P is now with minimal
transparency.

On 23 апр, 22:17, "Sean Catchpole" <[EMAIL PROTECTED]> wrote:
> I ran you code in FireFox and in IE6 and recieved no such error.
>
> ~Sean



[jQuery] Alternative way of reacting to clicked link?

2007-04-23 Thread Alessandro Portale

Hi,

I have a page with about 12000 links in it. A few of these links point
to anchors on the same page. A function should be called when those
"intra page" links are clicked.

$("[EMAIL PROTECTED]").click(...) seems to be too slow for some browsers on
some machines if 12000 links need to be filtered.

I hoped that $(window).click(...) could give me the possibility to
handle the new window.location on-the-fly but unfortunately my bound
function is called before the browser jumps to the anchor, so that
window.location is still outdated.

Does anybody know another way of on-the-fly reacting to a link click
which allows to access the new url?

Thanks in advance,
Alessandro



[jQuery] Re: blockUI plugin blocking form submit on IE 6 & 7

2007-04-23 Thread Stuart

OK, after lunch I knocked together a quick and very dirty php page
that contains a form that submits back to itself. In my testing, this
form displays the much of the same behavior that I described
originally. Works fine in FF. Form doesn't submit in IE 6 or 7. This
example, however, does not present the iframe alignment problem I
encountered with my original form. I can deal with that I think. It
must be some sort of CSS collision. Here's the form:

http://www.w3.org/
TR/html4/strict.dtd">





$(function () {
$("#insertForm :submit").click( function() {
$.blockUI.defaults.elementMessage = "Please Wait...";
$.extend(
$.blockUI.defaults.elementMessageCSS, {
color: '#00a',
backgroundColor: '#fff',
border: '2px solid #2f4f4f'
}
);
$("#insertForm").block();
return true;
} );
} );


Insert Record


blockUI Test Page

First Name: 
Last Name: 
Age: 




First Name
Last Name
Age


  









  





Sorry for just pasting the code here but I'm unable to host a live
page at the moment. If that's necessary I can do that after I get home
from work. Hope this helps.

Thanks

On Apr 23, 11:01 am, Stuart Batty <[EMAIL PROTECTED]> wrote:
> The form is not submitted by ajax. It is a http post. I'll simplify the form
> down to something manageable and post.
>
>
>
> malsup wrote:
>
> > Stuart,
>
> > Is the form submitted via normal browser invocation or via ajax?
> > Also, it would be immensely helpful if you could put together a simple
> > html page (ignore the server component) that demonstrates the problem.
>
> > Mike
>
> > On 4/23/07, Stuart Batty <[EMAIL PROTECTED]> wrote:
>
> >> Mike, I don't immediately see any way to post a sample page since the
> >> application is a intranet java webapp running on Tomcat using MyFaces. I
> >> could possibly post the compiled output from the .jsp but I fear that may
> >> mask the original problem. I could probably work around the odd modal
> >> alignment issue in IE 6 if I could get the form to submit. Here's the
> >> function I'm using to bind blockUI to the onclick event:
> >> [code]
> >> $("#myForm :submit").click( function() {
> >> $.blockUI.defaults.elementMessage = "Please Wait...";
> >> $.extend(
> >> $.blockUI.defaults.elementMessageCSS, {
> >> color: '#00a',
> >> backgroundColor: '#fff',
> >> border: '2px solid #2f4f4f'
> >> }
> >> );
> >> $("#myForm").block();
> >> return true;
> >> } );
> >> [/code]
> >> There are two submit buttons on the form; Save and Submit, that I want to
> >> apply the block to onclick. On form submit the appropriate java method is
> >> executed and the form is re-displayed with a message confirming the
> >> action.
> >> One other thing I've noticed is that when one clicks a submit button in
> >> IE
> >> it seems to take several seconds for the iframe to appear where in FF it
> >> is
> >> instantaneous. If you can think of any test methods I can employ please
> >> let
> >> me know. Your plugin does exactly what I need to do but I must support
> >> IE.
>
> >> malsup wrote:
>
> >> > Stuart,
>
> >> > Can you post a sample page?
>
> >> > Mike
>
> >> --
> >> View this message in context:
> >>http://www.nabble.com/blockUI-plugin-blocking-form-submit-on-IE-6---7...
> >> Sent from the JQuery mailing list archive at Nabble.com.
>
> --
> View this message in 
> context:http://www.nabble.com/blockUI-plugin-blocking-form-submit-on-IE-6---7...
> Sent from the JQuery mailing list archive at Nabble.com.



[jQuery] Re: Blink effect

2007-04-23 Thread Alexandre Plennevaux
no it does not work: it seems show() / hide() works on the width, height, or 
opacity. but then i guess i could try to build this effect by using a timeout 
and display:none / auto or something like that

   _  

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Josh 
Nathanson
Sent: lundi 23 avril 2007 20:42
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Blink effect


How about callback = function() {
$("#mydiv").hide().show().hide().show()
}
 
-- Josh

- Original Message - 
From: HYPERLINK "mailto:[EMAIL PROTECTED]"Alexandre Plennevaux 
To: HYPERLINK "mailto:jquery-en@googlegroups.com"jquery-en@googlegroups.com 
Sent: Monday, April 23, 2007 1:27 PM
Subject: [jQuery] Blink effect

hi,
 
i've been playing with the effects built in jquery and had a lot of fun playing 
with such flexibility. However, i could not achieve what i wanted: having an 
element blink twice when its html content get loaded via ajax. The problem is 
the blinking of course, jquery has mad ajax so easy.
i was wondering if anyone succeeded in creating that special effect, that would 
have something blink a certain number of times upon appearing ?
 
thank you very much!
 
alex
 

Alexandre Plennevaux - LAb[au] asbl.vzw / MediaRuimte
Lakensestraat/Rue de Laeken 104
B-1000 Brussel-Bruxelles-Brussels
Belgie-Belgique-Belgium

Tel:+32(0)2.219.65.55
Fax:+32(0)2.426.69.86
Mobile:+32(0)476.23.21.42
HYPERLINK "blocked::http://www.lab-au.com/"http://www.lab-au.com
HYPERLINK "blocked::http://www.mediaruimte.be/"http://www.mediaruimte.be

HYPERLINK 
"blocked::http://www.mediaruimte.be/"__

The information in this e-mail is intended only for the addressee named above.  
If you are not that addressee, please note that any disclosure, distribution or 
copying of this e-mail is prohibited.
Because e-mail can be electronically altered, the integrity of this 
communication cannot be guaranteed.

__

 


Ce message Envoi est certifié sans virus connu.
Analyse effectuée par AVG.
Version: 7.5.465 / Base de données virus: 269.5.9/773 - Date: 22/04/2007 20:18



Ce message Envoi est certifié sans virus connu.
Analyse effectuée par AVG.
Version: 7.5.465 / Base de données virus: 269.5.9/773 - Date: 22/04/2007 20:18
 


[jQuery] Re: How to Trigger link , without click event

2007-04-23 Thread Benjamin Sterling

this is assuming that your php is wrapped in the javascript tag



of course this is not tested, but I am assuming you want this to show when
your page loads, so you would also put that code in the
$(document).ready(function(){}); statement.

On 4/23/07, akiratsu <[EMAIL PROTECTED]> wrote:




Hi Benjamin,

How could i execute that 'javascript function'(without click) from my php
?

for example:
 $('#ex3a').jqm .  '
   }
?>

thanks for help,
Rudy




bmsterling wrote:
>
> .jqmShow(); will execute the show.
>
> $().ready(function() {
>   $('#ex3a').jqm({
> trigger: '#ex3aTrigger',
> overlay: 30, /* 0-100 (int) : 0 is off/transparent, 100 is opaque */
> overlayClass: 'whiteOverlay'}).jqmShow();
>
> });
>
> --
> Benjamin Sterling
> http://www.KenzoMedia.com
> http://www.KenzoHosting.com
>
>

--
View this message in context:
http://www.nabble.com/How-to-Trigger-link-%2C-without-click-event-tf3588041s15494.html#a10147502
Sent from the JQuery mailing list archive at Nabble.com.





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


[jQuery] Re: library conflict

2007-04-23 Thread Mike Alsup


For the record, recent version of the jQuery corner plugin do not have
a problem with $ usage.

http://dev.jquery.com/browser/trunk/plugins/corner/jquery.corner.js?format=txt

Mike



Think perhaps that jQuery rounded corners in one of those that needs to
be re-done, 'cos
no matter what order I call the libraries, whether I use
jQuery.noConflict() or not, it just
will not round the box corners.

The sole reason of trying to use prototype is cos of PeriodicalUpdater
which makes it easy
for me to loop a function.  I say easy cos I'm not a coder. So if anyone
can point out a
jQuery-equivalent to PeriodicalUpdater, I'll just stick with jQuery for
all my js needs.

TIA

Mike Alsup wrote:
>
> Kelly,
>
> I assume that "your code" is jQuery based.  The easiest approach is to
> simply scope your code like this:
>
> (function($) {
>
>// your code here
>
> })(jQuery);
>
> This lets you write in typical jQuery style (using the $ symbol)
> without worrying about collisions with other libraries.  Most jQuery
> plugins have been refactored to use this approach.  However, as I
> pointed our earlier, some older plugins still assume that $ == jQuery.
> Thickbox is an older plugin that is known to rely on $ but Klaus
> Hartl is currently rewritting it and a new and improved version will
> be available soon(ish).
>
> Mike
>
>
> On 4/23/07, kerford <[EMAIL PROTECTED]> wrote:
>>
>> I'd like to piggyback on this thread if I could. I'm writing for an
>> environment that may or may not have other libraries included in the
>> page. It's not something I can know beforehand. I also won't know in
>> what order libraries (if any) are loaded. What is the best, most
>> defensive approach to take for this kind of environment?
>>
>> Thanks,
>> Kelly
>>
>>
>




[jQuery] Re: Blink effect

2007-04-23 Thread Josh Nathanson
How about callback = function() {
$("#mydiv").hide().show().hide().show()
}

-- Josh
  - Original Message - 
  From: Alexandre Plennevaux 
  To: jquery-en@googlegroups.com 
  Sent: Monday, April 23, 2007 1:27 PM
  Subject: [jQuery] Blink effect


  hi,

  i've been playing with the effects built in jquery and had a lot of fun 
playing with such flexibility. However, i could not achieve what i wanted: 
having an element blink twice when its html content get loaded via ajax. The 
problem is the blinking of course, jquery has mad ajax so easy.
  i was wondering if anyone succeeded in creating that special effect, that 
would have something blink a certain number of times upon appearing ?

  thank you very much!

  alex

  Alexandre Plennevaux - LAb[au] asbl.vzw / MediaRuimte
  Lakensestraat/Rue de Laeken 104
  B-1000 Brussel-Bruxelles-Brussels
  Belgie-Belgique-Belgium

  Tel:+32(0)2.219.65.55
  Fax:+32(0)2.426.69.86
  Mobile:+32(0)476.23.21.42
  http://www.lab-au.com
  http://www.mediaruimte.be

  __

  The information in this e-mail is intended only for the addressee named 
above.  If you are not that addressee, please note that any disclosure, 
distribution or copying of this e-mail is prohibited.
  Because e-mail can be electronically altered, the integrity of this 
communication cannot be guaranteed.

  __




  Ce message Envoi est certifié sans virus connu.
  Analyse effectuée par AVG.
  Version: 7.5.465 / Base de données virus: 269.5.9/773 - Date: 22/04/2007 20:18



[jQuery] Re: library conflict

2007-04-23 Thread Sapphire


Think perhaps that jQuery rounded corners in one of those that needs to 
be re-done, 'cos
no matter what order I call the libraries, whether I use 
jQuery.noConflict() or not, it just

will not round the box corners.

The sole reason of trying to use prototype is cos of PeriodicalUpdater 
which makes it easy
for me to loop a function.  I say easy cos I'm not a coder. So if anyone 
can point out a
jQuery-equivalent to PeriodicalUpdater, I'll just stick with jQuery for 
all my js needs.


TIA

Mike Alsup wrote:


Kelly,

I assume that "your code" is jQuery based.  The easiest approach is to
simply scope your code like this:

(function($) {

   // your code here

})(jQuery);

This lets you write in typical jQuery style (using the $ symbol)
without worrying about collisions with other libraries.  Most jQuery
plugins have been refactored to use this approach.  However, as I
pointed our earlier, some older plugins still assume that $ == jQuery.
Thickbox is an older plugin that is known to rely on $ but Klaus
Hartl is currently rewritting it and a new and improved version will
be available soon(ish).

Mike


On 4/23/07, kerford <[EMAIL PROTECTED]> wrote:


I'd like to piggyback on this thread if I could. I'm writing for an
environment that may or may not have other libraries included in the
page. It's not something I can know beforehand. I also won't know in
what order libraries (if any) are loaded. What is the best, most
defensive approach to take for this kind of environment?

Thanks,
Kelly








[jQuery] Re: How to Trigger link , without click event

2007-04-23 Thread akiratsu


Hi Benjamin,

How could i execute that 'javascript function'(without click) from my php ?

for example: 
 $('#ex3a').jqm .  '
   }
?>

thanks for help,
Rudy




bmsterling wrote:
> 
> .jqmShow(); will execute the show.
> 
> $().ready(function() {
>   $('#ex3a').jqm({
> trigger: '#ex3aTrigger',
> overlay: 30, /* 0-100 (int) : 0 is off/transparent, 100 is opaque */
> overlayClass: 'whiteOverlay'}).jqmShow();
> 
> });
> 
> -- 
> Benjamin Sterling
> http://www.KenzoMedia.com
> http://www.KenzoHosting.com
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-Trigger-link-%2C-without-click-event-tf3588041s15494.html#a10147502
Sent from the JQuery mailing list archive at Nabble.com.



[jQuery] Blink effect

2007-04-23 Thread Alexandre Plennevaux
hi,
 
i've been playing with the effects built in jquery and had a lot of fun playing 
with such flexibility. However, i could not achieve what i wanted: having an 
element blink twice when its html content get loaded via ajax. The problem is 
the blinking of course, jquery has mad ajax so easy.
i was wondering if anyone succeeded in creating that special effect, that would 
have something blink a certain number of times upon appearing ?
 
thank you very much!
 
alex
 

Alexandre Plennevaux - LAb[au] asbl.vzw / MediaRuimte
Lakensestraat/Rue de Laeken 104
B-1000 Brussel-Bruxelles-Brussels
Belgie-Belgique-Belgium

Tel:+32(0)2.219.65.55
Fax:+32(0)2.426.69.86
Mobile:+32(0)476.23.21.42
HYPERLINK "blocked::http://www.lab-au.com/"http://www.lab-au.com
HYPERLINK "blocked::http://www.mediaruimte.be/"http://www.mediaruimte.be

HYPERLINK 
"blocked::http://www.mediaruimte.be/"__

The information in this e-mail is intended only for the addressee named above.  
If you are not that addressee, please note that any disclosure, distribution or 
copying of this e-mail is prohibited.
Because e-mail can be electronically altered, the integrity of this 
communication cannot be guaranteed.

__

 

Ce message Envoi est certifié sans virus connu.
Analyse effectuée par AVG.
Version: 7.5.465 / Base de données virus: 269.5.9/773 - Date: 22/04/2007 20:18
 


[jQuery] Re: library conflict

2007-04-23 Thread Karl Swedberg

On Apr 23, 2007, at 2:43 PM, Mike Alsup wrote:


However, as I
pointed our earlier, some older plugins still assume that $ == jQuery.
Thickbox is an older plugin that is known to rely on $ but Klaus
Hartl is currently rewritting it and a new and improved version will
be available soon(ish).


The jTip plugin is another example (which, I think, Mike pointed out  
earlier). I've been planning to rewrite that one for a while, but  
other projects have kept getting in the way. Looks like I'll have  
some time to devote to it soon, though. ;-)


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




[jQuery] Re: Browser Dom Performance

2007-04-23 Thread Scott Sauyet


lacroix1547 wrote:
> [ ... ]

I tried to made a trivial ( or gory I am not sure anymore ) dom query
system with such dom static analysis to be used allong jquery. Nothing
very serious but results were there. Everything looked instantaneous.


This is very interesting.  Is it something you can share with this group?

[ ... ] Is IE7 css support enough to say that a nice n fast javascript 
style engine would be useless?


Well, I don't expect that developers are going to be abandoning the IE6 
market for quite some time, so there might be some interest in this. 
But I have been thinking along with a number of other people for the 
last few years that CSS and JS are fairly independent concerns, that we 
build plain semantic HTML as a basis, then layer CSS on for design 
considerations, and then layer JS on for dynamic behavior.  Using JS for 
straightforward styling feels... awkward.


Still I would very much like to see what you've done and see if I would 
have any uses for it myself.


Cheers,

  -- Scott



[jQuery] Re: How to Trigger link , without click event

2007-04-23 Thread Benjamin Sterling

.jqmShow(); will execute the show.

$().ready(function() {
 $('#ex3a').jqm({
   trigger: '#ex3aTrigger',
   overlay: 30, /* 0-100 (int) : 0 is off/transparent, 100 is opaque */
   overlayClass: 'whiteOverlay'}).jqmShow();

});

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


[jQuery] Browser Dom Performance

2007-04-23 Thread lacroix1547

Lately I have been crazy about jquery.
Maybe I abused a little but, I made an experience wich consisted in
replacing all my css rules(well, some basic css understandable for
ie6 ) for more intelligent 'styling rules' expressed with jquery.
Wow, I had a PORTABLE intelligent style engine.

But oups, even with some wise reuse of nodeset, when my page started
to grow, performance went down. Nothing critical but 2,3,4 seconds
just for jquery processing (on top of all the database access) is too
much since I have to reload the entire page on 90% of the user click.
Yea I know, I should use more ajax. Anyway ajax is another story.

Then while profiling this all I started to suspect that most of the
time was spent in the browser dom api. It is significative in the
whole performance discussion because if the browsers dom are too slow,
a siginificant performance boost for dom queries would be obtained by
caching the dom in an internal form.

In other words, dom queries would operate on a write-through dom
cache. And since you would probably put indexes everywhere to have
instantaneous getElementsByClass and getElementsByTagName on any node,
it would be in fact a sort of static dom analysis. (maybe indexes are
the real performance booster here)

Of course you might have to think about refreshing your dom analysis
but for the use case I started with (replacing css rules by wiser
jquery rules),  your dom is immutable so it is not an issue.

I tried to made a trivial ( or gory I am not sure anymore ) dom query
system with such dom static analysis to be used allong jquery. Nothing
very serious but results were there. Everything looked instantaneous.

So it raises a couple of questions.

Are the browsers api really slow?
Is IE7 css support enough to say that a nice n fast javascript style
engine would be useless?
Is there some dom query engine out there that work with a static
analysis of the DOM ?



[jQuery] How to Trigger link , without click event

2007-04-23 Thread akiratsu


I tried to used your plugin 'jqModal' and run 'Example 3a'.
http://dev.iceburg.net/jquery/jqModal/

How to 'trigger' the function without 'click' it on view(link) ??

for example, i have condition(php) that have to call/trigger the function
like :



Thanks in advance
-- 
View this message in context: 
http://www.nabble.com/How-to-Trigger-link-%2C-without-click-event-tf3588041s15494.html#a10026998
Sent from the JQuery mailing list archive at Nabble.com.



[jQuery] Re: Recommended way to overload jquery method?

2007-04-23 Thread Mike Alsup



For example, if jQuery were to define their trim() method as a prototype to
the String object, then it would/could override a pre-defined version of the
function. If the two functions did not behave *exactly* a like, now you have
some issue that's very hard to debug and track down.


I agree.  One of jQuery's strengths is that it plays well with other
libraries.  By keeping all of its code within the jQuery namespace it
respects existing utility extensions, but more importantly, it
protects its own.  For those that like to have access to utility
functions via object prototypes there are many  available in the
plugins/methods folder of SVN.

Mike


[jQuery] Re: library conflict

2007-04-23 Thread Mike Alsup


Kelly,

I assume that "your code" is jQuery based.  The easiest approach is to
simply scope your code like this:

(function($) {

   // your code here

})(jQuery);

This lets you write in typical jQuery style (using the $ symbol)
without worrying about collisions with other libraries.  Most jQuery
plugins have been refactored to use this approach.  However, as I
pointed our earlier, some older plugins still assume that $ == jQuery.
Thickbox is an older plugin that is known to rely on $ but Klaus
Hartl is currently rewritting it and a new and improved version will
be available soon(ish).

Mike


On 4/23/07, kerford <[EMAIL PROTECTED]> wrote:


I'd like to piggyback on this thread if I could. I'm writing for an
environment that may or may not have other libraries included in the
page. It's not something I can know beforehand. I also won't know in
what order libraries (if any) are loaded. What is the best, most
defensive approach to take for this kind of environment?

Thanks,
Kelly




[jQuery] Re: Recommended way to overload jquery method?

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

Matt,

>Is there any reason why it's not done this way? Perhaps there are
>things I'm not thinking of :)

You can access the functions using $.trim(), etc. While I had no part in
planning, I suspect the decision to place all this code w/in the jQuery
object was to avoid having the jQuery code interfere w/other libraries or
existing code base.

For example, if jQuery were to define their trim() method as a prototype to
the String object, then it would/could override a pre-defined version of the
function. If the two functions did not behave *exactly* a like, now you have
some issue that's very hard to debug and track down.

-Dan



[jQuery] Re: Interface Slider - Clicks don't trigger onChange event

2007-04-23 Thread Geoffrey Knutzen

Yeah, I see the hidden slider too when clicking and dragging. 
Looking at firebug, it looks like a copy of the handle is made while
sliding, and that is what is showing up.

Maybe there is a solution with unbind? May not even need to have the hidden
handle if we could just unbind the action from the slider. I will look at
this later today. If you make any headway, let me know

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of skimber
Sent: Monday, April 23, 2007 11:10 AM
To: jQuery (English)
Subject: [jQuery] Re: Interface Slider - Clicks don't trigger onChange event


Thanks for the suggestion!

On first try I've got some strange stuff happening if i click and
inadvertently drag a little.  The hidden slider appears while being
dragged and then disappears again when let go...  but maybe some
tweaking can solve that...

Maybe we could override the click event somehow?  Sadly the following
doesn't work:

$('.slider').click(function(){ return false; }).Slider(
{
accept : '.indicator',
fractions: 100,
onChange : function( cordx, cordy, x , y) {  /* Do
Stuff Here */ },
values: [ [200,0] ]
}
);

Nor does it work if i move the .click() to after the .Slider() .  Also
tried adding .unbind('click') but no joy there either. If there's some
way of making it work then that would be the cleanest solution
probably.  Any ideas? :)






On Apr 23, 5:21 pm, "Geoffrey Knutzen" <[EMAIL PROTECTED]>
wrote:
> If you can get by without the ability to click on the slider to get the
> handle to move, you might try a real ugly hack.
>
> You can put two handles on the slider, and then hide the first handle.
Only
> the first handle is affected by clicking on the slider.
>
> It is ugly, but might solve your problem.
>
> BTW, I wish there were a way to disable the feature of clicking on the
> slider instead of the handle. It gets very confusing if you have multiple
> handles on one slider. You click on the slider and you are not sure which
> handle will move if the handles have been mixed together.
>
>
>
> -Original Message-
> From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
>
> Behalf Of skimber
> Sent: Monday, April 23, 2007 5:45 AM
> To: jQuery (English)
> Subject: [jQuery] Re: Interface Slider - Clicks don't trigger onChange
event
>
> Hi all,
>
> If anybody can suggest a way of working around this bug, or fixing it,
> I would be hugely grateful!
>
> I've not had any response to my bug report and this bug is now the
> only thing preventing me from finishing a project.
>
> Any help would be very much appreciated!
>
> Thanks
>
> Simon
>
> On Apr 13, 4:29 pm, "skimber" <[EMAIL PROTECTED]> wrote:
> > If anyone's interested I have now posted this as a bug report here:
>
> >http://dev.jquery.com/ticket/1122- Hide quoted text -
>
> - Show quoted text -



[jQuery] Re: Recommended way to overload jquery method?

2007-04-23 Thread Matt Kruse

On Apr 23, 4:36 am, Remy Sharp <[EMAIL PROTECTED]> wrote:
> Though if you're thinking of overloading functions like trim, wouldn't
> it be better to extend the String object?

Why doesn't jQuery extend existing objects (other than Object, of
course) and then reference those methods instead of defining its own
internally?

If all of jQuery's string manipulations were just extensions to
String's prototype, then these methods could be used outside of a
jQuery chain also, adding real functionality and usefulness to the
library.

For example, adding a class to an object is just a delimited string
operation. So a
String.prototype.AddDelimitedValue(className,delimiter) method (or
something like it) would serve the same purpose but also be reusable
for other methods that want to implement the same functionality. Then
jQuery could create its own addClass method that does its null checks
and each'ing or whatever and then calls this underlying method on the
object's className attribute directly.

Is there any reason why it's not done this way? Perhaps there are
things I'm not thinking of :)

Matt Kruse



[jQuery] Re: Sortable reverting to original state

2007-04-23 Thread John C. Bland II

No, the elements don't exist at the same time.

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



John,

>No, I went straight to the container vs walking it with #left >
>div.sortables.

My question was does the selector "#left > div.sortables" also retrieve
the
specific ID? I'm wonder if you're attaching 2 different behaviors to the
same element.

-Dan





--
John C. Bland II
Chief Geek
Katapult Media, Inc. - www.katapultmedia.com
---
Biz Blog - http://blogs.katapultmedia.com/jb2
Personal Blog - http://blog.blandfamilyonline.com
http://www.lifthimhigh.com - "Christian Products for Those Bold Enough to
Wear Them"
Home of FMUG.az - http://www.gotoandstop.org
Home of AZCFUG - http://www.azcfug.org


[jQuery] Re: library conflict

2007-04-23 Thread kerford

I'd like to piggyback on this thread if I could. I'm writing for an
environment that may or may not have other libraries included in the
page. It's not something I can know beforehand. I also won't know in
what order libraries (if any) are loaded. What is the best, most
defensive approach to take for this kind of environment?

Thanks,
Kelly



[jQuery] Re: Show()/Hide() Bug?

2007-04-23 Thread Sean Catchpole


I ran you code in FireFox and in IE6 and recieved no such error.

~Sean


[jQuery] Re: Recommended way to overload jquery method?

2007-04-23 Thread Jörn Zaefferer


howard chen schrieb:


I want to overload some core jQuery method, e.g. trim() method

any codes sample or recommendation to do this?
Save a reference to the original method in a closure and call that when 
appropiate. An example for this can be found here: 
http://dev.jquery.com/browser/trunk/plugins/metadata/lib/jQuery/metadata.js


The advantage over this instead of saving the original to a static name 
like _setArray: You can override a method more then once and won't notice.


--
Jörn Zaefferer

http://bassistance.de



[jQuery] Re: Interface Slider - Clicks don't trigger onChange event

2007-04-23 Thread skimber

Thanks for the suggestion!

On first try I've got some strange stuff happening if i click and
inadvertently drag a little.  The hidden slider appears while being
dragged and then disappears again when let go...  but maybe some
tweaking can solve that...

Maybe we could override the click event somehow?  Sadly the following
doesn't work:

$('.slider').click(function(){ return false; }).Slider(
{
accept : '.indicator',
fractions: 100,
onChange : function( cordx, cordy, x , y) {  /* Do 
Stuff Here */ },
values: [ [200,0] ]
}
);

Nor does it work if i move the .click() to after the .Slider() .  Also
tried adding .unbind('click') but no joy there either. If there's some
way of making it work then that would be the cleanest solution
probably.  Any ideas? :)






On Apr 23, 5:21 pm, "Geoffrey Knutzen" <[EMAIL PROTECTED]>
wrote:
> If you can get by without the ability to click on the slider to get the
> handle to move, you might try a real ugly hack.
>
> You can put two handles on the slider, and then hide the first handle. Only
> the first handle is affected by clicking on the slider.
>
> It is ugly, but might solve your problem.
>
> BTW, I wish there were a way to disable the feature of clicking on the
> slider instead of the handle. It gets very confusing if you have multiple
> handles on one slider. You click on the slider and you are not sure which
> handle will move if the handles have been mixed together.
>
>
>
> -Original Message-
> From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
>
> Behalf Of skimber
> Sent: Monday, April 23, 2007 5:45 AM
> To: jQuery (English)
> Subject: [jQuery] Re: Interface Slider - Clicks don't trigger onChange event
>
> Hi all,
>
> If anybody can suggest a way of working around this bug, or fixing it,
> I would be hugely grateful!
>
> I've not had any response to my bug report and this bug is now the
> only thing preventing me from finishing a project.
>
> Any help would be very much appreciated!
>
> Thanks
>
> Simon
>
> On Apr 13, 4:29 pm, "skimber" <[EMAIL PROTECTED]> wrote:
> > If anyone's interested I have now posted this as a bug report here:
>
> >http://dev.jquery.com/ticket/1122- Hide quoted text -
>
> - Show quoted text -



[jQuery] iUtil has no properties??

2007-04-23 Thread Ad4m


Hi!

I'm using Interface and Thickbox plugin for clientside image resizing 
and when trying to resize image i'm getting an error:

*Error: jQuery.iUtil has no properties*
Script was already working and suddenly stopped. I got back to the last 
working version and the error didn't disappear!

Enyone knows what could couse the problem?

regards,
Adam


[jQuery] Re: jVariations = new plug-in/tool

2007-04-23 Thread Scott Sauyet


Brian Cherne wrote:
jVariations is a developer tool that generates a control panel (with 
checkboxes and radio buttons) to show and hide variations (aka corner 
cases) in a single HTML template.


This is a very nice little tool!

One thing that would make it more useful for me would be to hide the 
control panel by default and use a bookmarklet to hide or show it as 
needed.  This works for me in FF2 and IE7:


jqVar

If you wanted then, you could keep this debugging code in production 
sites (at the cost of an extra 3K of compressed JS) or at least keep it 
live for quite a while as designers play with the options.


Thanks for sharing,

  -- Scott



[jQuery] 2 separate Sortables

2007-04-23 Thread Michael

I have two separate sortable divs on one page. Each sortable can not
interact with the other and can't seem to get this working properly.

IE the first sortable works fine, but the second doesn't.
FF Niether sortable works properly.

Should I have 2 separate sortable functions with different naming
conventions on them or have it all in one with the same naming
conventions but set containment as (containment:'parent').

I have tried many possible solutions and configurations but keep
running into different issues.

have anyone encountered this or have a solution/suggestion?

Thanks alot.



[jQuery] Show()/Hide() Bug?

2007-04-23 Thread d3

Source HTML file:
---
http://www.w3.org/
TR/xhtml11/DTD/xhtml11.dtd">
http://www.w3.org/1999/xhtml"; >

Show/Hide Test






Test text




After loading in browser I see:


Test text


Is it bug? :)



[jQuery] Re: Can it be done? (Modifying plugin parameters at runtime)

2007-04-23 Thread skimber



Hi Sean,

Thanks for that... I'd tried that and it didn't work...  however i
worked it backwards and found a handy little function that outputs the
content of an object and found what I was looking for...  I actually
had to refer to them via:

this.resizeOptions.maxHeight

So I guess I'll have to do the same bit of investigative work for any
other plugins I want to do something similar with.

Thanks for the nudge in the right direction!

Cheers

Simon


On Apr 23, 5:12 pm, "Sean Catchpole" <[EMAIL PROTECTED]> wrote:
> Hello Simon,
>
> Yes, your onResize function can change the values of maxWidth. Here is
> an example:
> $('#resizeMe').Resizable(
>{
>minWidth: 50,
>minHeight: 50,
>maxWidth: 400,
>maxHeight: 400,
>// etc. etc.
> onResize : function(size, position) {
> this.maxWidth = size;
>}
>}
> )
>
> Please note that "this" needs to be pre-pended before the variable in
> order to access it.
>
> ~Sean



[jQuery] Re: what's the best way to catch malformed xml in an ajax call?

2007-04-23 Thread Ⓙⓐⓚⓔ

success isn't successful, it just gets back the xml if successful or in the
case of firefox, it seems to get a special parsererror (formatted as xml)!

I've removed all callbacks except complete, I have to do a lot of browser
specific code to determine if the xml is malformed or the file is missing.

the final case is the actual success.

this is what I have so far:

   var surveyComplete = function(xrh, status){
   var xml = xrh.responseXML
   if (status!="success")
   theSurvey
   .append("" + status.toUpperCase() + " requesting page "
+ url + "")
   .append("" + xrh.responseText + "")
   else if (xml && xml.hasChildNodes && !xml.hasChildNodes())
   form.html(" broken xml ")
   else if ( xml && xml.firstChild.nodeName == "parsererror")
   form.html($.xml(xml))
   else
   surveyProcess(xml)
   }
   $.ajax({url:url,datatype:'xml',complete:surveyComplete})


On 4/22/07, Klaus Hartl <[EMAIL PROTECTED]> wrote:



Ⓙⓐⓚⓔ schrieb:
> I use the error callback, but it doesn't get called back when the xml is
> malformed.
>
> Do I need to use the complete callback??

Yes, I think so. Or the success callback. The reason is, that the
response has been successfully delivered, just with ill-formed XML.

You may need a try/catch, but I don't know how browsers handle
ill-formed XML, e.g. if you can catch that error...


-- Klaus





--
Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ


[jQuery] Re: jVariations = new plug-in/tool

2007-04-23 Thread Diego A.

You could always use the excellent metaData plugin to extract
information about each test div via the 'class' or 'data' attribute...
things like the group it belongs to and what kind of control to
display...

Having said that, I agree about the more explicit and meaningful
labels and I think you've done a great job!

On Apr 23, 6:13 pm, "Brian Cherne" <[EMAIL PROTECTED]> wrote:
> Thanks Diego. I'll think about this for a little bit and see what shakes out
> of the tree.
>
> I sort of like the recipe being more explicit and have meaningful labels for
> the checkboxes. I'm not sure how I could do that with "#tests div" without
> adding/assuming stuff about the HTML DOM.
>
> Brian.
>
> On 4/22/07, Diego A. <[EMAIL PROTECTED]> wrote:
>
>
>
> > Rather then manually starting up the control panel by defining each
> > individual item...
> > $.jVariation({...});
>
> > it would be nicer to simple say...
> > $('#tests').jVariation({ /* settings here */});
> > ...where jVariation would automatically take (say), every div within
> > #tests and create the controls for it... But that's a whole new can of
> > worms!
>
> > Thanks for sharing. I'll definitely find it useful...
>
> > On Apr 21, 9:21 pm, "Brian Cherne" <[EMAIL PROTECTED]> wrote:
> > > jVariations is a developer tool that generates a control panel (with
> > > checkboxes and radio buttons) to show and hide variations (aka corner
> > cases)
> > > in a single HTML template.
>
> > > Why? When providing HTML templates to server-side engineers I got tired
> > of
> > > having separate files to show variations... think error messages,
> > > alternative messaging, varying number of tab sets, etc. Using
> > jVariations,
> > > you can provide simple variations in one file and use the convenient
> > control
> > > panel to toggle visibility.
>
> > > 
>
> > > I haven't actually used this in a real-world situation... so I'm not
> > sure if
> > > it'll actually be useful. But I wanted to share it with the community in
> > > case other's could find a use for it.
>
> > > Cheers,
> > > Brian.



[jQuery] Re: jVariations = new plug-in/tool

2007-04-23 Thread Brian Cherne

Thanks Diego. I'll think about this for a little bit and see what shakes out
of the tree.

I sort of like the recipe being more explicit and have meaningful labels for
the checkboxes. I'm not sure how I could do that with "#tests div" without
adding/assuming stuff about the HTML DOM.

Brian.

On 4/22/07, Diego A. <[EMAIL PROTECTED]> wrote:



Rather then manually starting up the control panel by defining each
individual item...
$.jVariation({...});

it would be nicer to simple say...
$('#tests').jVariation({ /* settings here */});
...where jVariation would automatically take (say), every div within
#tests and create the controls for it... But that's a whole new can of
worms!

Thanks for sharing. I'll definitely find it useful...

On Apr 21, 9:21 pm, "Brian Cherne" <[EMAIL PROTECTED]> wrote:
> jVariations is a developer tool that generates a control panel (with
> checkboxes and radio buttons) to show and hide variations (aka corner
cases)
> in a single HTML template.
>
> Why? When providing HTML templates to server-side engineers I got tired
of
> having separate files to show variations... think error messages,
> alternative messaging, varying number of tab sets, etc. Using
jVariations,
> you can provide simple variations in one file and use the convenient
control
> panel to toggle visibility.
>
> 
>
> I haven't actually used this in a real-world situation... so I'm not
sure if
> it'll actually be useful. But I wanted to share it with the community in
> case other's could find a use for it.
>
> Cheers,
> Brian.




[jQuery] Re: Taconite question...

2007-04-23 Thread Shelane Enos

OK, so as a workaround for IE, I assigned the click event to the img.

My lasso code looks something like this:

[if:client_browser >> 'MSIE']




$j('#mystatusimg').click(function(){
setStatus('mystatus', 'statusID', 'update status to this value');
});
[else]


[/if]

dynamic date status created




On 4/20/07 7:47 PM, "Dan G. Switzer, II" <[EMAIL PROTECTED]> wrote:

> 
> Shelane,
> 
>> I'm having a strange issue on IE (isn't it almost always the culprit
>> of issues).
>> 
>> I'm returning this:
>> 
>> 
>> 
>> > height="16" border="0" />
>> 
>> 
>> dynamic date status created
>> 
>> 
>> 
>> it's hard to see exactly what's coming in on IE without firebug but
>> the items are getting updated.  The problem comes when I try to click
>> on the "checkbox" image the second time (after it was first called and
>> the data is returned).  However, that second time does nothing.  The
>> function setStatus is not being called (determined by putting an alert
>> at the top of the function just to tell me it's being called).
>> 
>> I would just use a bind click event, but the problem is that I have a
>> dynamic number of "statuses" that have to pass specific values to the
>> server in order to be processed.  Since it was all working everywhere
>> else, I thought I was good, until I tried in in IE.
>> 
>> Any suggestions?
> 
> It sounds like you're running into this problem:
> http://groups.google.com/group/jquery-en/browse_frm/thread/3535a8ba195d0a37/
> 9d05b60155ed547e?lnk=gst&q=ext+click&rnum=2#9d05b60155ed547e
> 
> If it is, then hopefully the problem will be resolved soon. Heck, it might
> already be fixed in the SVN--I haven't looked.
> 
> -Dan
> 
> 
> 


[jQuery] Re: Arbitrary Number of Parents

2007-04-23 Thread Sean Catchpole


Kim, I think you are right.
$(this).parents("div.foo") should work.
The following might also work:
$("../div.foo",this)
But I haven't had time to punch that in myself yet.

~Sean


[jQuery] Re: Interface Slider - Clicks don't trigger onChange event

2007-04-23 Thread Geoffrey Knutzen

If you can get by without the ability to click on the slider to get the
handle to move, you might try a real ugly hack.

You can put two handles on the slider, and then hide the first handle. Only
the first handle is affected by clicking on the slider. 

It is ugly, but might solve your problem.

BTW, I wish there were a way to disable the feature of clicking on the
slider instead of the handle. It gets very confusing if you have multiple
handles on one slider. You click on the slider and you are not sure which
handle will move if the handles have been mixed together.

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of skimber
Sent: Monday, April 23, 2007 5:45 AM
To: jQuery (English)
Subject: [jQuery] Re: Interface Slider - Clicks don't trigger onChange event


Hi all,

If anybody can suggest a way of working around this bug, or fixing it,
I would be hugely grateful!

I've not had any response to my bug report and this bug is now the
only thing preventing me from finishing a project.

Any help would be very much appreciated!

Thanks

Simon


On Apr 13, 4:29 pm, "skimber" <[EMAIL PROTECTED]> wrote:
> If anyone's interested I have now posted this as a bug report here:
>
> http://dev.jquery.com/ticket/1122



[jQuery] Re: automatic scroll like google calendar

2007-04-23 Thread Sean Catchpole


Javascript has a built in scrollTo(x,y) function. One would only need
to get the .offsetTop of the element and viola. Ok well perhaps that
was over simplified, but at least there's some stuff to point you in
the right direction.

~Sean


[jQuery] Re: ajax and links

2007-04-23 Thread Sean Catchpole


Good example Klaus!

Here's another reference for checking the url if you need it:
http://www.sunsean.com/Jistory/

~Sean


[jQuery] Re: Can it be done? (Modifying plugin parameters at runtime)

2007-04-23 Thread Sean Catchpole


Hello Simon,

Yes, your onResize function can change the values of maxWidth. Here is
an example:
$('#resizeMe').Resizable(
  {
  minWidth: 50,
  minHeight: 50,
  maxWidth: 400,
  maxHeight: 400,
  // etc. etc.
   onResize : function(size, position) {
   this.maxWidth = size;
  }
  }
)

Please note that "this" needs to be pre-pended before the variable in
order to access it.

~Sean


[jQuery] Re: OT: How to request something from the google groups folks?

2007-04-23 Thread Sam Collett

On Apr 23, 1:22 am, Chris Jordan <[EMAIL PROTECTED]> wrote:
> Does anyone know if you can request a feature for GoogleGroups?
>
> Just in case someone from Google is monitoring (... they *do* do that
> don't they?) here's my request:
> I've got a request for the web based interface. I'd like to see a
> method of adding code windows. Not unlike those in BlogCFC or over at
> jQuery.com.
>
> For example:
>
> 
> if(my.codeExampleWorks){
> I.will.eat(my.hat);
> }
> 
>
> You know? It'd be really nice. I realize they'd have to do something
> special so that the posts when sent as email appeared normal, but
> that's probably doable right? :o)

I doubt they read this group (unless they are interested in switching
to jQuery), but there is a group for suggestions (I assume they read
it): http://groups.google.com/group/Groups-Suggestions/topics.

There is also a form you can fill in: 
http://groups.google.com/support/bin/request.py



[jQuery] Re: blockUI plugin blocking form submit on IE 6 & 7

2007-04-23 Thread Stuart Batty


The form is not submitted by ajax. It is a http post. I'll simplify the form
down to something manageable and post. 

malsup wrote:
> 
> 
> Stuart,
> 
> Is the form submitted via normal browser invocation or via ajax?
> Also, it would be immensely helpful if you could put together a simple
> html page (ignore the server component) that demonstrates the problem.
> 
> Mike
> 
> On 4/23/07, Stuart Batty <[EMAIL PROTECTED]> wrote:
>>
>>
>> Mike, I don't immediately see any way to post a sample page since the
>> application is a intranet java webapp running on Tomcat using MyFaces. I
>> could possibly post the compiled output from the .jsp but I fear that may
>> mask the original problem. I could probably work around the odd modal
>> alignment issue in IE 6 if I could get the form to submit. Here's the
>> function I'm using to bind blockUI to the onclick event:
>> [code]
>> $("#myForm :submit").click( function() {
>> $.blockUI.defaults.elementMessage = "Please Wait...";
>> $.extend(
>> $.blockUI.defaults.elementMessageCSS, {
>> color: '#00a',
>> backgroundColor: '#fff',
>> border: '2px solid #2f4f4f'
>> }
>> );
>> $("#myForm").block();
>> return true;
>> } );
>> [/code]
>> There are two submit buttons on the form; Save and Submit, that I want to
>> apply the block to onclick. On form submit the appropriate java method is
>> executed and the form is re-displayed with a message confirming the
>> action.
>> One other thing I've noticed is that when one clicks a submit button in
>> IE
>> it seems to take several seconds for the iframe to appear where in FF it
>> is
>> instantaneous. If you can think of any test methods I can employ please
>> let
>> me know. Your plugin does exactly what I need to do but I must support
>> IE.
>>
>> malsup wrote:
>> >
>> >
>> > Stuart,
>> >
>> > Can you post a sample page?
>> >
>> > Mike
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/blockUI-plugin-blocking-form-submit-on-IE-6---7-tf3620149s15494.html#a10142260
>> Sent from the JQuery mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/blockUI-plugin-blocking-form-submit-on-IE-6---7-tf3620149s15494.html#a10143321
Sent from the JQuery mailing list archive at Nabble.com.



[jQuery] Re: Getting an elements classes

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

>I'm missing the blatantly obvious...
>
>jQuery can .addClass(), .removeClass(), and .toggleClass().

The following code would alert "true" if the #myElement had the class of
"myClass".

alert(
$("#myElement").is(".myClass")
);

-Dan



[jQuery] Re: Getting an elements classes

2007-04-23 Thread Aaron Heimlich

On 4/23/07, wls <[EMAIL PROTECTED]> wrote:


How does one tell if an element has a class



if( $("#myElement").is(".myClass") ) {
   // do super cool stuff...
}

or alternatively, get a list of classes?




Try this:

var classes = $("#myElement").attr("class").split(" ");

--
Aaron Heimlich
Web Developer
[EMAIL PROTECTED]
http://aheimlich.freepgs.com


[jQuery] Re: Getting an elements classes

2007-04-23 Thread Sam Collett

On Apr 23, 4:51 pm, wls <[EMAIL PROTECTED]> wrote:
> I'm missing the blatantly obvious...
>
> jQuery can .addClass(), .removeClass(), and .toggleClass().
>
> How does one tell if an element has a class, or alternatively, get a
> list of classes?
>
> -wls

You can do:

if( $("#mydiv").is(".myclass") ) alert("has myclass");

And you can get the classes (space separated):

$("#mydiv").attr("class");

or

$("#mydiv")[0].className;



[jQuery] Re: Getting an elements classes

2007-04-23 Thread Sean Catchpole


On 4/23/07, wls <[EMAIL PROTECTED]> wrote:

How does one tell if an element has a class, or alternatively, get a
list of classes?

The following would return an array of the classes the first item has.
var classes = $(query)[0].className.split(" ");

~Sean


[jQuery] Getting an elements classes

2007-04-23 Thread wls

I'm missing the blatantly obvious...

jQuery can .addClass(), .removeClass(), and .toggleClass().

How does one tell if an element has a class, or alternatively, get a
list of classes?

-wls



[jQuery] Re: blockUI plugin blocking form submit on IE 6 & 7

2007-04-23 Thread Mike Alsup


Stuart,

Is the form submitted via normal browser invocation or via ajax?
Also, it would be immensely helpful if you could put together a simple
html page (ignore the server component) that demonstrates the problem.

Mike

On 4/23/07, Stuart Batty <[EMAIL PROTECTED]> wrote:



Mike, I don't immediately see any way to post a sample page since the
application is a intranet java webapp running on Tomcat using MyFaces. I
could possibly post the compiled output from the .jsp but I fear that may
mask the original problem. I could probably work around the odd modal
alignment issue in IE 6 if I could get the form to submit. Here's the
function I'm using to bind blockUI to the onclick event:
[code]
$("#myForm :submit").click( function() {
$.blockUI.defaults.elementMessage = "Please Wait...";
$.extend(
$.blockUI.defaults.elementMessageCSS, {
color: '#00a',
backgroundColor: '#fff',
border: '2px solid #2f4f4f'
}
);
$("#myForm").block();
return true;
} );
[/code]
There are two submit buttons on the form; Save and Submit, that I want to
apply the block to onclick. On form submit the appropriate java method is
executed and the form is re-displayed with a message confirming the action.
One other thing I've noticed is that when one clicks a submit button in IE
it seems to take several seconds for the iframe to appear where in FF it is
instantaneous. If you can think of any test methods I can employ please let
me know. Your plugin does exactly what I need to do but I must support IE.

malsup wrote:
>
>
> Stuart,
>
> Can you post a sample page?
>
> Mike
>
>

--
View this message in context: 
http://www.nabble.com/blockUI-plugin-blocking-form-submit-on-IE-6---7-tf3620149s15494.html#a10142260
Sent from the JQuery mailing list archive at Nabble.com.




[jQuery] Re: List of all images showing

2007-04-23 Thread cheesegrits


Hey Dan,

Thanks for the response, but I finally spotted my Deliberate Mistake (ha
ha).  I posted a follow-up, but it got delayed somewhere inside the Nabble
gateway.  And just to compound my embarrassment, I ended up duplicating the
followup!

Anyway, problem solved.  Helps if you rename the main #mycarousel class that
hides the UL if you rename the UL itself.  :)

Speaking of which.  It would be kind of nice if jCarousel could show a dummy
'loading' div of the same dimensions, and hide it when the real one is ready
for display, so the browser can format everything on the first pass and not
have to re-arrange things when the carousel pops into being.

   -- hugh


Dan G. Switzer, II wrote:
> 
> 
> Hugh,
> 
>>I'm using the simple static method to display a carousel.  My page is
>>generated from PHP (as a "widget" for vBulletin).
>>
>>Everything works fine, except that during page loading, the original
>>vanilla
>>UL (with all the thumbnails) appears on the page until all thumbs have
been
>>loaded, before transmogrifying into the carousel.  This behaviour is the
>>same for both FF and IE7.
>>
>>Any ideas?  I really like jCarousel, but obviously this is a show stopper.
> 
> What code are you using to initialize the carousel? When does it get
> invoked
> (i.e during window.onload, when the DOM is ready, or right after you've
> the
>  element is ended?)
> 
> -Dan
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/List-of-all-images-showing-tf3627349.html#a10142951
Sent from the jCarousel mailing list archive at Nabble.com.



[jQuery] Re: library conflict

2007-04-23 Thread Mike Alsup


Thickbox and jTip are not written correctly to work in noConflict
mode.  Try doing a search/replace on those plugins to replace the $
with jQuery.  Also, if you're going to include prototype before jQuery
then remember to invoke the noConflict function.

Mike



http://liniverse.com/index.php?id=57



[jQuery] Re: library conflict

2007-04-23 Thread Sapphire


Well I did not consider that aspect, but just tried it and here's what I 
found:
If I reference prototype/scriptaculous before jQuery and it's plugins, 
jquery

works, but prototype breaks. If I reverse the order, then jQuery fails and
prototype works.
The site I'm using this on is not yet meant for the public and it's 
still under

construction, but here:

http://liniverse.com/index.php?id=57

Thanks


Mike Alsup wrote:



Well it looks like jQuery and prototype will never play on the same page


That's not true either.  jQuery and [insert library name here] *do*
work together.  If you're still having a problem it is likely due to
the order in which you are including the libraries on your page.

If your code looks like this:




Then you don't need to do anything special in your JavaScript other
than use '$' for prototype and 'jQuery' for jQuery.  The noConflict
method is to support this scenario:




Here jQuery has taken over control of the $ function because it was
included last.  To return control, you use noConflict:


   jQuery.noConfict();


Remember also that if you're using plugins it is *possible* that they
are not correctly coded to respect the jQuery-vs-$ usage.  It's always
best to first start with the simplest possible test case.

If you can't get this working then please post a sample page for us
and we can help debug.

Mike





[jQuery] Re: Sortable reverting to original state

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

John,

>No, I went straight to the container vs walking it with #left >
>div.sortables.

My question was does the selector "#left > div.sortables" also retrieve the
specific ID? I'm wonder if you're attaching 2 different behaviors to the
same element.

-Dan



[jQuery] Re: Sortable reverting to original state

2007-04-23 Thread John C. Bland II

No, I went straight to the container vs walking it with #left >
div.sortables.

I keep drudging through it and see if I can get it working.

Is there a way to use the non-compressed version of JS?

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



John,

>I wish I could show the page but I can't (it is a cms that is protected).
>Here is the code:

The problem is the problem most likely resides in the DOM structure/CSS
declarations--so just seeing the invocation code isn't of too much help.

I would recommend isolating your HTML/CSS into a separate file for
testing--just to get it down to the code that you actually can't get
working. That will help isolate problem and give you less to worry about.

One other thought, #contentSortContainerLeft doesn't happen to also match
the selector "#left > div.sortables" does it?

-Dan





--
John C. Bland II
Chief Geek
Katapult Media, Inc. - www.katapultmedia.com
---
Biz Blog - http://blogs.katapultmedia.com/jb2
Personal Blog - http://blog.blandfamilyonline.com
http://www.lifthimhigh.com - "Christian Products for Those Bold Enough to
Wear Them"
Home of FMUG.az - http://www.gotoandstop.org
Home of AZCFUG - http://www.azcfug.org


[jQuery] Re: blockUI plugin blocking form submit on IE 6 & 7

2007-04-23 Thread Stuart

I just did an experiment where I added an explicit call to submit
after the block and it works in IE. I just added $
("#myForm").submit(); after the call to block. It still takes about 6
seconds for the modal to appear but this does show that the submit
event is getting clobbered somehow.




[jQuery] Re: blockUI plugin blocking form submit on IE 6 & 7

2007-04-23 Thread Stuart Batty


Mike, I don't immediately see any way to post a sample page since the
application is a intranet java webapp running on Tomcat using MyFaces. I
could possibly post the compiled output from the .jsp but I fear that may
mask the original problem. I could probably work around the odd modal
alignment issue in IE 6 if I could get the form to submit. Here's the
function I'm using to bind blockUI to the onclick event:
[code]
$("#myForm :submit").click( function() { 
$.blockUI.defaults.elementMessage = "Please Wait...";
$.extend(
$.blockUI.defaults.elementMessageCSS, {
color: '#00a', 
backgroundColor: '#fff', 
border: '2px solid #2f4f4f'
}
);
$("#myForm").block();
return true;
} );
[/code]
There are two submit buttons on the form; Save and Submit, that I want to
apply the block to onclick. On form submit the appropriate java method is
executed and the form is re-displayed with a message confirming the action.
One other thing I've noticed is that when one clicks a submit button in IE
it seems to take several seconds for the iframe to appear where in FF it is
instantaneous. If you can think of any test methods I can employ please let
me know. Your plugin does exactly what I need to do but I must support IE.

malsup wrote:
> 
> 
> Stuart,
> 
> Can you post a sample page?
> 
> Mike
> 
> 

-- 
View this message in context: 
http://www.nabble.com/blockUI-plugin-blocking-form-submit-on-IE-6---7-tf3620149s15494.html#a10142260
Sent from the JQuery mailing list archive at Nabble.com.



[jQuery] binding problem with content added after the document ready

2007-04-23 Thread willy

Hi,

I have probleme binding generated content with the events I binded on
load:


my dom il like that

my
nodeName



In my app, a html / js tree, I can create node adding in the existing
li node:

 ma new node name

 but then I want to bind it to the same event I binded the li node
with $(document).ready().

so I'm doing that kind of stuff:

$('"nod41").bind('click', function(event){ nodeClickEvent(event, $
(this))} ) ;
$('"nod41").children('img').bind('click', function(event)
{ imgClickEvent(event, $(this))} );

unfortunately, where I click on the new ,  the event on the fist
raises, even if I stop event Propagation in my function.

Is there any way refreshing DOM or event priority?



[jQuery] Re: blockUI plugin blocking form submit on IE 6 & 7

2007-04-23 Thread Mike Alsup


Stuart,

Can you post a sample page?

Mike


[jQuery] Re: library conflict

2007-04-23 Thread Mike Alsup



Well it looks like jQuery and prototype will never play on the same page


That's not true either.  jQuery and [insert library name here] *do*
work together.  If you're still having a problem it is likely due to
the order in which you are including the libraries on your page.

If your code looks like this:




Then you don't need to do anything special in your JavaScript other
than use '$' for prototype and 'jQuery' for jQuery.  The noConflict
method is to support this scenario:




Here jQuery has taken over control of the $ function because it was
included last.  To return control, you use noConflict:


   jQuery.noConfict();


Remember also that if you're using plugins it is *possible* that they
are not correctly coded to respect the jQuery-vs-$ usage.  It's always
best to first start with the simplest possible test case.

If you can't get this working then please post a sample page for us
and we can help debug.

Mike


[jQuery] problem with Interface plugin

2007-04-23 Thread Ad4m


Hi!

I'm using Interface and Thickbox plugin for clientside image resizing 
and when trying to resize image i'm getting an error:

*Error: jQuery.iUtil has no properties*
Script was already working and suddenly stoped. I got back to the last 
working version and the error didn't disappeared!

Enyone knows what could couse the problem?

regards,
Adam



[jQuery] Re: blockUI plugin blocking form submit on IE 6 & 7

2007-04-23 Thread Stuart Batty


Pardon me for replying to my own thread but I can't seem figure out why it's
not getting accepted to the mailing list. I'm subscribed but I keep getting
email saying that it's still pending. I posted it 3 days ago so I'm thinking
that's not normal. By the way, if this gets on the mailing list, I can sure
use a little help with this IE issue.

Thanks

Stuart Batty wrote:
> 
> I'm trying to use blockUI to block user from accessing menus, links, etc
> after clicking on a form submit button by blocking the form element. This
> would hopefully have the added benefit of keeping the user from clicking
> the submit button multiple times while waiting for the submit. I've
> successfully done this in FF but it doesn't work as expected in IE. In IE
> 6 the overlay is not centered and the form doesn't submit. In IE7 the
> overlay is centered but the form still doesn't submit. In both cases the
> overlay appears and the browser simply hangs. After some thought I figured
> that maybe it is actually blocking the submit in IE so I tried wrapping
> the form in a div and blocking that. No change. As suggested elsewhere,
> I've changed the transitional DTD to strict but no change. I did an
> experiment where I used the submit click event to block an element outside
> the form and it did not block the submit event but the overlay was still
> jacked-up in IE6.
> 
> Can anyone help me figure out what blockUI is doing in regards to event
> handling here? I'm guessing from looking at the code that it would block
> the submit by design but it works in FF. I need some way to block the UI
> while the submit action is processing. This is a java application using
> MyFaces.
> 
> Thanks for any suggestions.
> 
> Almost forgot, this plug-in is pretty sweet!
> 

-- 
View this message in context: 
http://www.nabble.com/blockUI-plugin-blocking-form-submit-on-IE-6---7-tf3620149s15494.html#a10141754
Sent from the JQuery mailing list archive at Nabble.com.



[jQuery] Re: library conflict

2007-04-23 Thread Sunday


Well it looks like jQuery and prototype will never play on the same 
page, and

I find the behavior strange. Take this example call:


*jQuery.noConflict();*
jQuery(document).ready(function($j) {
$j("#box").corner("round 20px");
$j("#banner").corner("bottom 20px").corner("top bevel");

});


This causes *jQuery *to fail, but prototype works just fine. When I remove
the *jQuery.noConflict() *line and preserve everythiing else, jQuery works,
but prototype fails.
What's with *jQuery.noConflict()?*
* *

Mike Alsup wrote:


Oops! I just took a look at the $() ready shortcut--which looks to 
pass in

the selector--not the jQuery object.

25  var jQuery = function(a,c) {
26  // If the context is global, return a new object
27  if ( window == this )
28  return new jQuery(a,c);
29
30  // Make sure that a selection was provided
31  a = a || document;
32
33  // HANDLE: $(function)
34  // Shortcut for document ready
35  if ( jQuery.isFunction(a) )
36  return new jQuery(document)[ jQuery.fn.ready ? "ready" :
"load" ]( a );



Yeah, that's just the shortcut for passing the user fn.  You need to
look at the ready impl:

ready: function(f) {
   // If the DOM is already ready
   if ( jQuery.isReady )
   // Execute the function immediately
   f.apply( document, [jQuery] );

   // Otherwise, remember the function for later
   else {
   // Add the function to the wait list
   jQuery.readyList.push( function() { return f.apply(this, 
[jQuery]) } );

   }

   return this;
}


Mike





[jQuery] Re: library conflict

2007-04-23 Thread Mike Alsup


Dan,

"Lazy" is definitely not a word I would use to describe you!

Cheers!

Mike


That was the problem--I didn't look at the actual event.js file to see what
ready() does. :) That'll teach me never to be lazy when looking up answers.


[jQuery] Re: library conflict

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

>Yeah, that's just the shortcut for passing the user fn.  You need to
>look at the ready impl:

That was the problem--I didn't look at the actual event.js file to see what
ready() does. :) That'll teach me never to be lazy when looking up answers.
;)

-Dan



[jQuery] Re: library conflict

2007-04-23 Thread Mike Alsup



Oops! I just took a look at the $() ready shortcut--which looks to pass in
the selector--not the jQuery object.

25  var jQuery = function(a,c) {
26  // If the context is global, return a new object
27  if ( window == this )
28  return new jQuery(a,c);
29
30  // Make sure that a selection was provided
31  a = a || document;
32
33  // HANDLE: $(function)
34  // Shortcut for document ready
35  if ( jQuery.isFunction(a) )
36  return new jQuery(document)[ jQuery.fn.ready ? "ready" :
"load" ]( a );



Yeah, that's just the shortcut for passing the user fn.  You need to
look at the ready impl:

ready: function(f) {
   // If the DOM is already ready
   if ( jQuery.isReady )
   // Execute the function immediately
   f.apply( document, [jQuery] );

   // Otherwise, remember the function for later
   else {
   // Add the function to the wait list
   jQuery.readyList.push( function() { return f.apply(this, [jQuery]) } );
   }

   return this;
}


Mike


[jQuery] Re: library conflict

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

Mike,

>jQuery.noConflict();
>
>jQuery(document).ready(function($) {
>// use the $ here safely to ref jQuery
>$().ajaxStart($.blockUI).ajaxStop($.unblockUI);
>});

Oops! I just took a look at the $() ready shortcut--which looks to pass in
the selector--not the jQuery object.

25  var jQuery = function(a,c) {
26  // If the context is global, return a new object
27  if ( window == this )
28  return new jQuery(a,c);
29  
30  // Make sure that a selection was provided
31  a = a || document;
32 
33  // HANDLE: $(function)
34  // Shortcut for document ready
35  if ( jQuery.isFunction(a) )
36  return new jQuery(document)[ jQuery.fn.ready ? "ready" :
"load" ]( a );

-Dan



[jQuery] Re: library conflict

2007-04-23 Thread Mike Alsup



The ready function gets a copy of the elements specified in the
selector--not a reference to the jQuery object.


That's not true.  The ready fn is passed a jQuery object so that you
can alias it as needed.  A common usage pattern is:

jQuery.noConflict();

jQuery(document).ready(function($) {
   // use the $ here safely to ref jQuery
   $().ajaxStart($.blockUI).ajaxStop($.unblockUI);
});


[jQuery] Can it be done? (Modifying plugin parameters at runtime)

2007-04-23 Thread skimber

Hi Everyone,

I asked something along these lines a while back but got no responses,
so I'm assuming it's not possible, but if there's anybody out there
who would be kind enough to give me a definitive answer then I'll be
able to stop worrying that i've missed something blindingly
obvious which is quite possible!

What I want to know is if it is possible to dynamically read and
change the parameters you set for a plugin like this? If, using an
Interface plugin for example, I instigate the plugin like this:

$('#resizeMe').Resizable(
{
minWidth: 50,
minHeight: 50,
maxWidth: 400,
maxHeight: 400,
// etc. etc.
 onResize : function(size, position) {
// DO STUFF HERE
}
}
)


then can I, from within the onResize function, read and change values
such as maxWidth and maxHeight?


Any help much appreciated!


Simon



  1   2   >