[jQuery] jquery-1.2.1.js critical error on IE 6, Look all

2007-12-21 Thread Alexsandro_xpt

jQuery-1.2.1 rise a error type [Failed] in #943 line on IE 6:


#935merge: function(first, second) {
#936// We have to loop this way because IE & Opera overwrite the
length
#937// expando of getElementsByTagName
#938
#939// Also, we need to make sure that the correct elements are
being returned
#940// (IE returns comment nodes in a '*' query)
#941if ( jQuery.browser.msie ) {
#942for ( var i = 0; second[i]; i++ )
#943if ( second[i].nodeType != 8 )
#944first.push(second[i]);


In this line
if ( second[i].nodeType != 8 )
my IE 6 return follow erro:

---
Erro
---
Runtime error.
Debug it?

Line: 943
Erro: Failed
---
Yes   No
---


And all this cause by that follow js call:
jQuery(".inputcorner");


The inputcorner is class selector and it has a css display none.

What happen there?


[jQuery] FlyDOM + New Input Field != New Field being Submitted

2007-12-21 Thread Bitruder

I'm using jQuery + FlyDOM to add new elements dynamically after page
load to the DOM tree. I'm adding new input fields this way. They are
clearly within  tags (added as children to a  within
the  ). However, when I submit the form, only the pre-
existing input fields get submitted and show up in PHP's $_POST
variable.

Any idea how to get the new input fields to submit as well?

Thanks


[jQuery] Re: clicking on row vs. clicking on link in that row

2007-12-21 Thread Shawn

You probably need to return false from your click handlers

 // highlight rows, load details
$("#myTable tr").mouseover(function() {
$(this).addClass("over");}).mouseout(function() {
$(this).removeClass("over");
}).click(function(){
$(this).addClass("thisRow").siblings().removeClass("thisRow");
var job = $(this).attr('id')
var details = (job + '.htm')
$("#console").load(details);
return false;
});

$("#myTable a.ackn").click( function(){
$(this).parents('tr').hide();
 return false;
});

That *should* take care of things for you...

Shawn

rolfsf wrote:
> 
> I've set up a simple action when a user clicks on a row in a table.
> (highlight the row, load some details via ajax into a div)
> 
> However, in one column of the table I've got a link/button that, when
> clicked, will hide that row. If clicked, I don't want to highlight the row
> or load it's details. How do I distinguish between the two?
> 
>   
>   // highlight rows, load details
>   $("#myTable tr").mouseover(function() {
>   $(this).addClass("over");}).mouseout(function() {
>   $(this).removeClass("over");
>   }).click(function(){
>   $(this).addClass("thisRow").siblings().removeClass("thisRow");
>   var job = $(this).attr('id')
>   var details = (job + '.htm')
>   $("#console").load(details);
>   });
>   
> 
>   // hide a row after acknowledgement 
>   $("#myTable a.ackn").click( function(){
>   $(this).parents('tr').hide();
>   });
> 
> thanks,
> r.


[jQuery] Re: creating own callback

2007-12-21 Thread Eric Teubert

> jQuery.extend({
>preloadImage: function(imagePath,callback) {
>  var image = new Image();
>  if(jQuery.isFunction(callback)) image.onload = callback;
>  image.src = "gfx/"+imagePath;
>}
>
> });

Looks good, I'll give it a try.

Thanks a lot!

Eric


[jQuery] Re: Announcing jQuery HowTo's

2007-12-21 Thread Guy Fraser

Shawn wrote:
> The actual how-to's are at http://jquery.open2space.com/howto.  And if 
> you'd like to contribute, I have some quick instructions and guidelines 
> at http://jquery.open2space.com/node/2.
>   

Sweet! Could you add a section on debugging / browser tools? Feel free 
to rob anything from the following pages on our site:

http://www.adaptavist.com/display/~gfraser/2007/11/09/Script+debugging+in+MS+Internet+Exploder
(there's some good links in the comments also - picked them up from a 
recent topic on this list about debugging in IE)

http://www.adaptavist.com/display/USERGUIDE/Firefox+Extensions+for+CSS
(and yes, I know Opera is arguably more standards-compliant than FF, but 
I'm an FF fanboy :p)

Guy


[jQuery] Re: using AJAX with jQuery

2007-12-21 Thread jjshell

Thanks a lot for your reply and time :)

It's all clear now.


[jQuery] form submission and error messages: what's your approach?

2007-12-21 Thread jjshell

Hi,

Initiating myself to Ajax, I cam to wonder one important thing:

How do you guys handle error messages in the context of a form
submission? So far, I have always proceded like this:

The fields are treated server-side. If a problem is detected, I return
the page to Client (with persistant content relying on session) with:

1. One general error message (ex:"an error occured")
2. Next to each problematic field, a specific error message.

Now that I am "ajaxing" my forms, what approaches would you recommand?
How do you do that? What is the jQuery mentality?

Regards,

-jj.


[jQuery] Is there a slider like control/plugin to scroll my table?

2007-12-21 Thread Monica

I have a table with both Row Header and column headers. Now this table
width goes beyond the page. Is there like a slider control that will
keep the row headers sticky but would scroll/move the table colums
left or right as I am moving the slider. The slider control would sit
at a little( 20 pixels) distance from the bottom of the table?

If there is no such plugin, could you give me some pointers on how to
tackle this?

Thanks,
Monica.


[jQuery] Re: Menus states and cookies - simple DOM question, please help!

2007-12-21 Thread Jonny

Hmmm, looks interesting, if not a bit complex :)  I'll take a closer
look after holidays :-)

- J



On Dec 21, 1:48 pm, "Glen Lipka" <[EMAIL PROTECTED]> wrote:
> This might be a case for the history plugin.
> Checkout how the tabs plugin uses the history plugin to maintain which tab
> is open.
> It should fundamentally be the same technique.
>
> http://stilbuero.de/jquery/history/
>
> Glen
>
> On Dec 21, 2007 12:01 PM, Jonny <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hello,
>
> > I think this should be a pretty simple issue but I can't find any
> > clear information on how to do it :(
>
> > In-a-nutshell, I just need an accordion menu to not lose it's state
> > (what is open/closed at the time of click) when the new page loads.
>
> > I've poured over the following pages already:
>
> >http://www.learningjquery.com/2007/03/accordion-madness
> >http://bassistance.de/jquery-plugins/jquery-plugin-accordion/
> >http://jeroencoumans.nl/journal/simple-accessible-jquery-menu
>
> > And while they all work as is, I'm not able to modify them for my
> > needs, so I'm obviously not at that skill level, which of course is
> > why I'm writing post now :)
>
> > So far I've learned that "this" will return the current value of the
> > href within the link, and if turned into a variable first will return
> > the element (a in this case)...
>
> > How do I save the dom path of "this" into a cookie so that I
> > can .show() the exact same element when the new page loads?
>
> > I hope someone can help before I tear all my hair out ;)
>
> > - Jonny


[jQuery] Re: using AJAX with jQuery

2007-12-21 Thread Shawn

You can also use the .serialize() method to collect your values:

. . .
data : $("#myform").serialize(),
. . .

That works best on text inputs though.  If you have select boxes - and 
especially if they are multi-select, then you may have better luck with 
the .serializeArray() method.

http://docs.jquery.com/Ajax/serialize
http://docs.jquery.com/Ajax/serializeArray

I find I get the best control by creating my own string for the data 
property though.  On my forms, I often only want a couple of the form 
elements to be submitted.  (i.e. submit an employee ID, not the employee 
name - depending on the purpose of my form of course... )

Hope that helps.

Shawn

jjshell wrote:
> First of all, thanks for your time and answers. I really appreciate
> it. Having made a few tests, the $.ajax approach seems the one that
> fits the most my application.
> 
> Just a few questions:
> 
> 1.
> Can you avoid to explicitely name each field of your form?
> data: "test=" + $("input[name=test]").val(),
> What if a form is dynamically created server-side? Do you also have to
> dynamically create a line for jQuery?
> 
> 2.
> How dows this approach reacts to array fields?
> 
> 
> 
> 
> 
> Thank you again for your time :)


[jQuery] HELP Needed extending Ajax File Uploader Plugin For Jquery

2007-12-21 Thread Big Moxy

Download URL - http://www.phpletter.com/DOWNLOAD/

I want to extend the sample upload form with two additional fields. My
problem is I do not know how to get those additional field variables
passed in the POST process. Here is a snippet of the javascript used.
In the function ajaxFileUpload, s.fileElementId is the name of the
file to be uploaded. I can see where it is added to the form
constructed in the function createUploadForm.

How do I introduce 2 new form field names so that I can reference them
in the php file that is called by the form action method?


createUploadForm: function(id, fileElementId)
{
//create form
var formId = 'jUploadForm' + id;
var fileId = 'jUploadFile' + id;
var form = $('');
var oldElement = $('#' + fileElementId);
var newElement = $(oldElement).clone();
$(oldElement).attr('id', fileId);
$(oldElement).before(newElement);
$(oldElement).appendTo(form);
//set attributes
$(form).css('position', 'absolute');
$(form).css('top', '-1200px');
$(form).css('left', '-1200px');
$(form).appendTo('body');
return form;
},


ajaxFileUpload: function(s) {
s = jQuery.extend({}, jQuery.ajaxSettings, s);
var id = new Date().getTime()
var form = jQuery.createUploadForm(id, s.fileElementId);
var io = jQuery.createUploadIframe(id, s.secureuri);
var frameId = 'jUploadFrame' + id;
var formId = 'jUploadForm' + id;

Thank you in advance!!!
Tim


[jQuery] Re: Announcing jQuery HowTo's

2007-12-21 Thread Shawn

Thanks Larry.

My thought on the Tips/Tricks section was that this would likely be 
handled in the user Blogs.  A Tip/Trick might be something very simple, 
but could also be a detailed description of doing something more complex.

I personally have some techniques I've worked out that I want to blog 
about, but they don't fit in the "HowTo" class...

I'm not against creating a Tips/Tricks section though.  So if we get a 
few HowTo's or blogs that would fit there, we'll do so.. :)

Shawn

McLars wrote:
> So, again, I think you have a fantastic idea there. I really hope it
> takes off, and I, too, would love to see this added to the jQuery
> site. Don't worry about repeating information that may be available
> elsewhere. Just focus on keeping the tasks atomic and making it super
> fast and well organized to find what you you need at the moment. A
> sugggestion would be to add a Tips & Tricks section.
> 
> Larry



[jQuery] Re: Announcing jQuery HowTo's

2007-12-21 Thread Shawn

Good point.  I had envisioned the how-to's being kept current, but 
knowing the way things go your tip will probably be needed.

Shawn

ajma wrote:
> I'd suggest marking each How To article with version numbers. After a
> few iterations of jQuery, people aren't going to know if the article
> is still applicable or not.


[jQuery] Re: clicking on row vs. clicking on link in that row

2007-12-21 Thread rolfsf


that looks promising! Thanks Erik



Erik Beeson wrote:
> 
> Maybe try:
> 
>// hide a row after acknowledgement
>$("#myTable a.ackn").click( function(e){
>e.stopPropagation();
>$(this).parents('tr').hide();
>});
> 
> See also:
> http://docs.jquery.com/Events_(Guide)#event.stopPropagation.28__.29
> 
> --Erik
> 
> 
> On 12/21/07, rolfsf <[EMAIL PROTECTED]> wrote:
>>
>>
>>
>> I've set up a simple action when a user clicks on a row in a table.
>> (highlight the row, load some details via ajax into a div)
>>
>> However, in one column of the table I've got a link/button that, when
>> clicked, will hide that row. If clicked, I don't want to highlight the
>> row
>> or load it's details. How do I distinguish between the two?
>>
>>
>> // highlight rows, load details
>> $("#myTable tr").mouseover(function() {
>> $(this).addClass("over");}).mouseout(function() {
>> $(this).removeClass("over");
>> }).click(function(){
>>
>>
>> $(this).addClass("thisRow").siblings().removeClass("thisRow");
>> var job = $(this).attr('id')
>> var details = (job + '.htm')
>> $("#console").load(details);
>> });
>>
>>
>> // hide a row after acknowledgement
>> $("#myTable a.ackn").click( function(){
>> $(this).parents('tr').hide();
>> });
>>
>> thanks,
>> r.
>> --
>> View this message in context:
>> http://www.nabble.com/clicking-on-row-vs.-clicking-on-link-in-that-row-tp14464501s27240p14464501.html
>> Sent from the jQuery General Discussion mailing list archive at
>> Nabble.com
>> .
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/clicking-on-row-vs.-clicking-on-link-in-that-row-tp14464501s27240p14464813.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: clicking on row vs. clicking on link in that row

2007-12-21 Thread Erik Beeson
Maybe try:

   // hide a row after acknowledgement
   $("#myTable a.ackn").click( function(e){
   e.stopPropagation();
   $(this).parents('tr').hide();
   });

See also:
http://docs.jquery.com/Events_(Guide)#event.stopPropagation.28__.29

--Erik


On 12/21/07, rolfsf <[EMAIL PROTECTED]> wrote:
>
>
>
> I've set up a simple action when a user clicks on a row in a table.
> (highlight the row, load some details via ajax into a div)
>
> However, in one column of the table I've got a link/button that, when
> clicked, will hide that row. If clicked, I don't want to highlight the row
> or load it's details. How do I distinguish between the two?
>
>
> // highlight rows, load details
> $("#myTable tr").mouseover(function() {
> $(this).addClass("over");}).mouseout(function() {
> $(this).removeClass("over");
> }).click(function(){
>
> $(this).addClass("thisRow").siblings().removeClass("thisRow");
> var job = $(this).attr('id')
> var details = (job + '.htm')
> $("#console").load(details);
> });
>
>
> // hide a row after acknowledgement
> $("#myTable a.ackn").click( function(){
> $(this).parents('tr').hide();
> });
>
> thanks,
> r.
> --
> View this message in context:
> http://www.nabble.com/clicking-on-row-vs.-clicking-on-link-in-that-row-tp14464501s27240p14464501.html
> Sent from the jQuery General Discussion mailing list archive at Nabble.com
> .
>
>


[jQuery] clicking on row vs. clicking on link in that row

2007-12-21 Thread rolfsf


I've set up a simple action when a user clicks on a row in a table.
(highlight the row, load some details via ajax into a div)

However, in one column of the table I've got a link/button that, when
clicked, will hide that row. If clicked, I don't want to highlight the row
or load it's details. How do I distinguish between the two?


// highlight rows, load details
$("#myTable tr").mouseover(function() {
$(this).addClass("over");}).mouseout(function() {
$(this).removeClass("over");
}).click(function(){
$(this).addClass("thisRow").siblings().removeClass("thisRow");
var job = $(this).attr('id')
var details = (job + '.htm')
$("#console").load(details);
});


// hide a row after acknowledgement 
$("#myTable a.ackn").click( function(){
$(this).parents('tr').hide();
});

thanks,
r.
-- 
View this message in context: 
http://www.nabble.com/clicking-on-row-vs.-clicking-on-link-in-that-row-tp14464501s27240p14464501.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: internet explorer debugging

2007-12-21 Thread bingo

oops..
I posted the same google group link :-P

here is the correct link http://ragrawal.wordpress.com/
2007/10/25/top-5-reasons-why-ie7-is-complaining-about-your-
javascript/">http://ragrawal.wordpress.com/2007/10/25/top-5-reasons-
why-ie7-is-complaining-about-your-javascript/



On Dec 21, 5:50 pm, bingo <[EMAIL PROTECTED]> wrote:
> hi,
>
> I have collected some common reasons which causes JS to crash in 
> IE7.http://groups.google.com/group/jquery-en/browse_thread/thread/f1eab9b...
>
> Generally, I try to make sure my JS is working fine in FF and once
> everything is working fine, I test in FF and check for any mistake
> (reported in my blog). I would say 95% of the time, these are the five
> mistake that make my JS to break in IE
>
> Regards,
> bingo
>
> On Dec 21, 1:25 pm, Shawn <[EMAIL PROTECTED]> wrote:
>
>
>
> > When I run into these "works in FF but not IE" issues, I plop my code
> > into jslint (http://www.jslint.com/).  Reading through the warnings and
> > errors it found does two things for me
> > - first it helps me identify problem areas.  IE is notorious for
> > throwing errors on extra commas - FF ignores them - i.e. { a : "a", }
> > would cause an error in IE.  jslint notes these.
> > - secondly it makes my code better overall.  I caused me to question
> > some of the long standing "habits" I had and revise my coding style
> > appropriately.
>
> > HTH.
>
> > Shawn
>
> > Alexandre Plennevaux wrote:
> > > hello friends,
>
> > > my application is running ok in firefox but is not doing so great in
> > > internet explorer. I'm having a hard time tracking down the bug(s).
> > > Can someone help me? Problem is i didn't find any decent tool to debug
> > > javascrpt in internet explorer.
>
> > > Anyway, here is the prototype i'm working on:
>
> > >http://www.pixeline.be/test/m2/
>
> > > the source code is here:
> > >http://www.pixeline.be/test/m2/_js/frontend/6_proto_strata+datascape+...
>
> > > Basically, a good part of the code is used to make sure all elements
> > > fits nicely graphically on the background 4px grid, whatever the
> > > screen resolution.
> > > The top menu is "strataGrid" and after clicking on the second line of
> > > options in the menu, you get to the "datascape".
>
> > > now, i'm not an expert in javascript so any coding improvement you can
> > > suggest is welcomed, i did it my way :)
>
> > > The issue comes with the apparition of the datascape. It chokes and
> > > does not finish appearing. In firefox 2 it works well though.
>
> > > I think the error is somewhere here:
>
> > > $('.strataTrigger').bind('click', function(){
> > >         var $thisMenu = $(this).parents('.mainmenu');
> > >         var li = $(this).parent();
> > >         var index = li.parent().children('li').index(li[0]);
> > >         $newLeft = strataGrid.startX + (strataGrid.colCenter - (index
> > > + 1)) * strataGrid.colWidth;
> > >         $('.strataTrigger', $thisMenu).removeClass('selected');
> > >         $(this).addClass('selected');
> > >         $thisMenu.animate({
> > >             left: $newLeft + 'px'
> > >         });
> > >         // 4._ SHOW/HIDES MENUS
> > >         if ($thisMenu.attr('id') == 'strata1') {
> > >             var showme = $(this).metadata().showme;
> > >             //remove datascape if displayed
> > >             if ($('#datascape').length) {
> > >                 $('#datascape').unbind().fadeOut("slow", function(){
> > >                     clearInterval(datascape.$interval);
> > >                     $(this).hide(); // HIDE OR REMOVE ?? _ A SURVEILLER
> > >                 });
> > >             }
>
> > >             $('.strata2').each(function(){
> > >                 if ($(this).hasClass(showme)) {
> > >                     $(this).show();
> > >                 }
> > >                 else {
> > >                     $(this).hide();
> > >                 }
> > >             });
> > >         }
> > >         else
> > >             if ($thisMenu.hasClass('strata2')) {
> > >                 $('#strata3').html('');
> > >                 $("#datascape").load('ajax_datascape.inc.html', 
> > > function(){
> > >                     $(this).fadeIn("slow");
> > >                     drawDatascape(strataGrid, '');
> > >                 });
> > >             }
> > >         return false;
> > >     });- Hide quoted text -
>
> > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -


[jQuery] Re: internet explorer debugging

2007-12-21 Thread bingo

hi,

I have collected some common reasons which causes JS to crash in IE7.
http://groups.google.com/group/jquery-en/browse_thread/thread/f1eab9b59e923fca/40b64f80117f62f2#40b64f80117f62f2

Generally, I try to make sure my JS is working fine in FF and once
everything is working fine, I test in FF and check for any mistake
(reported in my blog). I would say 95% of the time, these are the five
mistake that make my JS to break in IE

Regards,
bingo

On Dec 21, 1:25 pm, Shawn <[EMAIL PROTECTED]> wrote:
> When I run into these "works in FF but not IE" issues, I plop my code
> into jslint (http://www.jslint.com/).  Reading through the warnings and
> errors it found does two things for me
> - first it helps me identify problem areas.  IE is notorious for
> throwing errors on extra commas - FF ignores them - i.e. { a : "a", }
> would cause an error in IE.  jslint notes these.
> - secondly it makes my code better overall.  I caused me to question
> some of the long standing "habits" I had and revise my coding style
> appropriately.
>
> HTH.
>
> Shawn
>
>
>
> Alexandre Plennevaux wrote:
> > hello friends,
>
> > my application is running ok in firefox but is not doing so great in
> > internet explorer. I'm having a hard time tracking down the bug(s).
> > Can someone help me? Problem is i didn't find any decent tool to debug
> > javascrpt in internet explorer.
>
> > Anyway, here is the prototype i'm working on:
>
> >http://www.pixeline.be/test/m2/
>
> > the source code is here:
> >http://www.pixeline.be/test/m2/_js/frontend/6_proto_strata+datascape+...
>
> > Basically, a good part of the code is used to make sure all elements
> > fits nicely graphically on the background 4px grid, whatever the
> > screen resolution.
> > The top menu is "strataGrid" and after clicking on the second line of
> > options in the menu, you get to the "datascape".
>
> > now, i'm not an expert in javascript so any coding improvement you can
> > suggest is welcomed, i did it my way :)
>
> > The issue comes with the apparition of the datascape. It chokes and
> > does not finish appearing. In firefox 2 it works well though.
>
> > I think the error is somewhere here:
>
> > $('.strataTrigger').bind('click', function(){
> >         var $thisMenu = $(this).parents('.mainmenu');
> >         var li = $(this).parent();
> >         var index = li.parent().children('li').index(li[0]);
> >         $newLeft = strataGrid.startX + (strataGrid.colCenter - (index
> > + 1)) * strataGrid.colWidth;
> >         $('.strataTrigger', $thisMenu).removeClass('selected');
> >         $(this).addClass('selected');
> >         $thisMenu.animate({
> >             left: $newLeft + 'px'
> >         });
> >         // 4._ SHOW/HIDES MENUS
> >         if ($thisMenu.attr('id') == 'strata1') {
> >             var showme = $(this).metadata().showme;
> >             //remove datascape if displayed
> >             if ($('#datascape').length) {
> >                 $('#datascape').unbind().fadeOut("slow", function(){
> >                     clearInterval(datascape.$interval);
> >                     $(this).hide(); // HIDE OR REMOVE ?? _ A SURVEILLER
> >                 });
> >             }
>
> >             $('.strata2').each(function(){
> >                 if ($(this).hasClass(showme)) {
> >                     $(this).show();
> >                 }
> >                 else {
> >                     $(this).hide();
> >                 }
> >             });
> >         }
> >         else
> >             if ($thisMenu.hasClass('strata2')) {
> >                 $('#strata3').html('');
> >                 $("#datascape").load('ajax_datascape.inc.html', function(){
> >                     $(this).fadeIn("slow");
> >                     drawDatascape(strataGrid, '');
> >                 });
> >             }
> >         return false;
> >     });- Hide quoted text -
>
> - Show quoted text -


[jQuery] Increasing CPU usage as menu is used

2007-12-21 Thread Bryan Opfer

I created a menu using the jdMenu plugin and having issues with CPU
usage.  It seems that as my menu is used, the CPU usage will climb.

It's probably best to show an example.  I have created a test page
with just my menu.  The URL is:

http://neo.bopfer.com/1/

Upon first load, if you hover over "Center", then hover over the sub
items, the hover action is very responsive and the items change yellow
as they are hovered.

Now, hover back and forth between "Website" and "Center" 15 or so
times.  Then go back and hover over the sub items in "Center".  The
hover action will become laggy and cpu usage will be much higher than
when the page first loaded. (Note: I am using Firefox)

This seems like a pretty simple use case and I don't notice any issues
like this in the jdMenu examples.  So, it must be something I am
doing.   But, I have no clue what it would be.

Anyone have any advice on what's causing this problem?

-Bryan


[jQuery] Re: creating own callback

2007-12-21 Thread Erik Beeson
I doubt that will work. There need not be anything particularly "jQueryish"
about preloading images, but if you want to stick it under $, maybe
something like:

jQuery.extend({
   preloadImage: function(imagePath,callback) {
 var image = new Image();
 if(jQuery.isFunction(callback)) image.onload = callback;
 image.src = "gfx/"+imagePath;
   }
});

--Erik


On 12/21/07, Jake McGraw <[EMAIL PROTECTED]> wrote:
>
> I'm sure there's a more sophisticated way of doing this, but functions can
> be passed around like any other variable type in JavaScript, so:
>
> jQuery.extend({
>preloadImage: function(imagePath,callback) {
>  jQuery("").attr("src", "gfx/"+imagePath);
>  callback();
>}
> });
>
> Should do the trick.
>
> - jake
>
> On Dec 21, 2007 3:11 PM, Eric Teubert < [EMAIL PROTECTED]> wrote:
>
> >
> > Hi,
> >
> > I spend some time in browsing through the documentation but I didn't
> > find anything about creating own functions with callback-
> > functionality. How do I do this?
> >
> > What I want to do:
> > Write a function that preloads an image and returns a callback when
> > the image is loaded. It looks like
> >
> > jQuery.extend({
> >preloadImage: function(imagePath) {
> >jQuery("").attr("src", "gfx/"+imagePath);
> >}
> > });
> >
> > $.preloadImage("example.gif ");
> >
> > But how have I to edit the first part when I want the second to look
> > like the following?
> >
> > $.preloadImage("example.gif", function() { alert("Preloading
> > finished"); });
> >
> > Thanks!
> >
>
>


[jQuery] Re: creating own callback

2007-12-21 Thread Jake McGraw
I'm sure there's a more sophisticated way of doing this, but functions can
be passed around like any other variable type in JavaScript, so:

jQuery.extend({
   preloadImage: function(imagePath,callback) {
 jQuery("").attr("src", "gfx/"+imagePath);
 callback();
   }
});

Should do the trick.

- jake

On Dec 21, 2007 3:11 PM, Eric Teubert <[EMAIL PROTECTED]> wrote:

>
> Hi,
>
> I spend some time in browsing through the documentation but I didn't
> find anything about creating own functions with callback-
> functionality. How do I do this?
>
> What I want to do:
> Write a function that preloads an image and returns a callback when
> the image is loaded. It looks like
>
> jQuery.extend({
>preloadImage: function(imagePath) {
>jQuery("").attr("src", "gfx/"+imagePath);
>}
> });
>
> $.preloadImage("example.gif");
>
> But how have I to edit the first part when I want the second to look
> like the following?
>
> $.preloadImage("example.gif", function() { alert("Preloading
> finished"); });
>
> Thanks!
>


[jQuery] Re: Menus states and cookies - simple DOM question, please help!

2007-12-21 Thread Glen Lipka
This might be a case for the history plugin.
Checkout how the tabs plugin uses the history plugin to maintain which tab
is open.
It should fundamentally be the same technique.

http://stilbuero.de/jquery/history/

Glen

On Dec 21, 2007 12:01 PM, Jonny <[EMAIL PROTECTED]> wrote:

>
> Hello,
>
> I think this should be a pretty simple issue but I can't find any
> clear information on how to do it :(
>
> In-a-nutshell, I just need an accordion menu to not lose it's state
> (what is open/closed at the time of click) when the new page loads.
>
> I've poured over the following pages already:
>
> http://www.learningjquery.com/2007/03/accordion-madness
> http://bassistance.de/jquery-plugins/jquery-plugin-accordion/
> http://jeroencoumans.nl/journal/simple-accessible-jquery-menu
>
> And while they all work as is, I'm not able to modify them for my
> needs, so I'm obviously not at that skill level, which of course is
> why I'm writing post now :)
>
> So far I've learned that "this" will return the current value of the
> href within the link, and if turned into a variable first will return
> the element (a in this case)...
>
> How do I save the dom path of "this" into a cookie so that I
> can .show() the exact same element when the new page loads?
>
> I hope someone can help before I tear all my hair out ;)
>
> - Jonny
>


[jQuery] Re: Call Function From AJAX Loaded Page

2007-12-21 Thread Jake McGraw
Hmm, first thing that caught my eye:

http://www.w3.org/TR/html4/types.html#type-name

Secondly, make sure that your document has been loaded BEFORE binding
events, you can't simply do:




  $("a.twitter").click(function(){...});





Hello!

Because when $("a.twitter") runs, the entire document hasn't yet been
loaded, so no elements are found and no events are bound. Luckily, jQuery
has a very easy way to remedy this, wrap anything that interacts with
elements with $(document).ready(function(){...})




  $(document).ready(function(){
$("a.twitter").click(function(){...});
//  Other bindings, events, etc 
  });





Hello!

For more information on this, check out:

http://docs.jquery.com/Events/ready

- jake

On Dec 21, 2007 3:23 PM, Dave <[EMAIL PROTECTED]> wrote:

>
> I am trying to call a function from this link (  id="twitter_display">
> Alright! New office chair![next] div> )   I want this to activate on the click() of
> a.twitter   but $
> ("a.twitter").click(function() {... is not calling the function.
> What do I need to replace "a.twitter" with to get this function to
> call?  Thanks
>


[jQuery] Re: .click working once only

2007-12-21 Thread Richard D. Worth
Try the Live Query plugin by Brandon Aaron:

http://plugins.jquery.com/project/livequery/
http://brandonaaron.net/docs/livequery/

- Richard

On Dec 21, 2007 2:57 PM, pedalpete <[EMAIL PROTECTED]> wrote:

>
> I've kinda figured out a bit why this is happening.
>
> When the .clickable items are loaded into the page via ajax,
> [code]
>  $.ajax({
>type: "GET",
>url: "processes/addNow.php",
>data: "uid="+uid+"&sid="+sid+,
>success: function(response2){
>$("."+usid
> +"-"+uid).html(response2);
>$("#addForm").fadeOut("slow");
>}
>
>});
> [/code]
>
> i'm guessing they are not available to the DOM. this is my guess
> because when I view the table source after a new item has been loaded
> via the ajax call, that new class is not visible in the html source.
>
> How do I get jquery to refresh and look for new objects?
>


[jQuery] Re: .click working once only

2007-12-21 Thread pedalpete

I've kinda figured out a bit why this is happening.

When the .clickable items are loaded into the page via ajax,
[code]
  $.ajax({
type: "GET",
url: "processes/addNow.php",
data: "uid="+uid+"&sid="+sid+,
success: function(response2){
$("."+usid
+"-"+uid).html(response2);
$("#addForm").fadeOut("slow");
}

});
[/code]

i'm guessing they are not available to the DOM. this is my guess
because when I view the table source after a new item has been loaded
via the ajax call, that new class is not visible in the html source.

How do I get jquery to refresh and look for new objects?


[jQuery] Call Function From AJAX Loaded Page

2007-12-21 Thread Dave

I am trying to call a function from this link ( 
Alright! New office chair![next] )   I want this to activate on the click() of
a.twitter   but $
("a.twitter").click(function() {... is not calling the function.
What do I need to replace "a.twitter" with to get this function to
call?  Thanks


[jQuery] Re: Announcing jQuery HowTo's

2007-12-21 Thread McLars

Shawn,

Bravo! This is an excellent idea.You know, this is the sort of thing
that makes jQuery stand out from the pack of other frameworks/
libraries. Getting started with any framework presents a significant
hurdle, and most seem to think publishing an API is sufficient. APIs
are necessary for reference, when you know the command and just need
the syntax specifics. Great for advanced users, or even those
transitioning from another framework. But they are confusing and
overwhelming for beginners. Tutorials are a good first step, and there
are a few for jQuery, but they could still use improvement. Books can
cover the whole spectrum, but they make it hard to located specific
tasks, grow out of date quickly and, frankly, many people just don't
want to shell out the bucks and won't read them cover-to-cover. Howtos
fit nicely between a tutorial and the API.

I can't count how many times I've seen comments on other frameworks'
lists like "just read the API" or "you need to learn Javascript."
Those are so discouraging and send the message that newbies aren't
welcome. Telling people to "just read the API" is like expecting
people trying to learn english to just read a dictionary.

Howtos are perfect for people who know the basics (e.g. through a
tutorial or book) but need to quickly find out how to perform a
specific task. I think there are a lot of people who aren't building
full-blown Ajax applications and aren't zealous OO fanboys. Many of us
work primarily with server-side environments and just need small bits
of client-side functionality here and there to finish out an
application. That's exactly where a list of Howtos is perfect.

So, again, I think you have a fantastic idea there. I really hope it
takes off, and I, too, would love to see this added to the jQuery
site. Don't worry about repeating information that may be available
elsewhere. Just focus on keeping the tasks atomic and making it super
fast and well organized to find what you you need at the moment. A
sugggestion would be to add a Tips & Tricks section.

Larry


On Dec 21, 12:50 am, Shawn <[EMAIL PROTECTED]> wrote:
> In a recent thread
> (http://groups.google.com/group/jquery-en/browse_thread/thread/acfe180...)
> the need for volunteer help with the documentation was discussed.  I
> posted a suggestion that maybe a "how-to" type of document may help
> those who do not like the reference style of the official docs.  I took
> a look at adding to the wiki, but don't know the syntax/formatting
> needed (yet).  But I wanted to do something about this idea while it was
> more or less fresh in my head.
>
> So, I slapped together a quick Drupal site under a sub-domain to my own
> domain, and started typing.  Actually, I had started typing first, but
> quickly realized that an approach was needed to allow the community to
> offer feedback and/or help out.  So, a Drupal site sounded perfect for
> this - for now at least.  So, the site is at
>
> http://jquery.open2space.com
>
> I have some basic items in there right now, and am planning on extending
> the how-to's as I have time.  But I'm only one person and the areas I
> think would be helpful may be only a small subset of what everyone else
> thinks is helpful.  So feel free to create an account and help out.
>
> The actual how-to's are athttp://jquery.open2space.com/howto.  And if
> you'd like to contribute, I have some quick instructions and guidelines
> athttp://jquery.open2space.com/node/2.
>
> Logged in users can also blog about their jQuery experiences if they'd like.
>
> This is a bit of an experiment for me (the community driven site that
> is).  I'd like to see the community grow this idea, and even better -
> make it so popular that it makes sense to roll back into the official
> jQuery site. :)  My thoughts right now is that this site become a jQuery
> learning center, with links to pertinent books and blogs, and other
> resources for learning jQuery.  (Yep I have the Learning jQuery blog in
> the feeds.. any others that should be there? :)
>
> Any suggestions on making the site better are much appreciated.  And
> thanks to everyone who helped me get as far in my own understanding of
> jQuery!
>
> Shawn Grover

On Dec 21, 12:50 am, Shawn <[EMAIL PROTECTED]> wrote:
> In a recent thread
> (http://groups.google.com/group/jquery-en/browse_thread/thread/acfe180...)
> the need for volunteer help with the documentation was discussed.  I
> posted a suggestion that maybe a "how-to" type of document may help
> those who do not like the reference style of the official docs.  I took
> a look at adding to the wiki, but don't know the syntax/formatting
> needed (yet).  But I wanted to do something about this idea while it was
> more or less fresh in my head.
>
> So, I slapped together a quick Drupal site under a sub-domain to my own
> domain, and started typing.  Actually, I had started typing first, but
> quickly realized that an approach was needed to allow the community to
> offer feedback and/or help 

[jQuery] creating own callback

2007-12-21 Thread Eric Teubert

Hi,

I spend some time in browsing through the documentation but I didn't
find anything about creating own functions with callback-
functionality. How do I do this?

What I want to do:
Write a function that preloads an image and returns a callback when
the image is loaded. It looks like

jQuery.extend({
preloadImage: function(imagePath) {
jQuery("").attr("src", "gfx/"+imagePath);
}
});

$.preloadImage("example.gif");

But how have I to edit the first part when I want the second to look
like the following?

$.preloadImage("example.gif", function() { alert("Preloading
finished"); });

Thanks!


[jQuery] Re: Error in Ajax Queue plugin

2007-12-21 Thread [EMAIL PROTECTED]

My bad Jörn, was in the middle of a rushed build, will check it out...

On Dec 6, 7:44 pm, Jörn Zaefferer <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] schrieb:> Well I tried it, and it seems to work, however it 
> triggers the 'error'
> > handler too:
>
> If you'd be actually using the version I pointed to, there would be an
> error saying $.ajaxQueue is not a function. Please check that you are
> actually using the right version.
>
> And to get a bit more feedback about the error you could log the
> arguments to the error callback.
>
> Jörn


[jQuery] Re: .click working once only

2007-12-21 Thread pedalpete

I just got this working by putting the .click actions into a function
and then calling that function after the ajax is loaded

this thread has more info
http://groups.google.com/group/jquery-en/browse_thread/thread/8d6abc5c9b1a4fa0/5a780aa16e5cd55c?lnk=gst&q=addressing+dynamically+loaded+elements#5a780aa16e5cd55c


[jQuery] Re: iterating functionality

2007-12-21 Thread McLars

Can you give us a sample of what you're doing now? I would imagine you
just need one procedure, probably when the page loads, that loops
through the table, hiding the second rows and assigning a handler to
each of the links in the first rows. The handler would find the parent
row () for the clicked link and then show the next row.

Larry

On Dec 21, 8:23 am, FrankTudor <[EMAIL PROTECTED]> wrote:
> Hi all I have a simple hide/show function that doesn't seem to work
> the way I want.
>
> I need some theory help here.
>
> Currently in my code I have a loop that iterates over a block of code
> and builds a table.
>
> I have a two row relationship.
>
> Row one  is important info, where row two  has the break out
> info that can be shown by clicking some text in row one..
>
> I have a jquery hide/show function that also iterate over in the loop
> (you see where i am going with this).
>
> So this code repeats itself over and over to the end of the loop as
> needed.
>
> I would like to have one copy of this code at the top of my page
> instead of duplicating it over and over.
>
> but how would i do this?
>
> Frank


[jQuery] Menus states and cookies - simple DOM question, please help!

2007-12-21 Thread Jonny

Hello,

I think this should be a pretty simple issue but I can't find any
clear information on how to do it :(

In-a-nutshell, I just need an accordion menu to not lose it's state
(what is open/closed at the time of click) when the new page loads.

I've poured over the following pages already:

http://www.learningjquery.com/2007/03/accordion-madness
http://bassistance.de/jquery-plugins/jquery-plugin-accordion/
http://jeroencoumans.nl/journal/simple-accessible-jquery-menu

And while they all work as is, I'm not able to modify them for my
needs, so I'm obviously not at that skill level, which of course is
why I'm writing post now :)

So far I've learned that "this" will return the current value of the
href within the link, and if turned into a variable first will return
the element (a in this case)...

How do I save the dom path of "this" into a cookie so that I
can .show() the exact same element when the new page loads?

I hope someone can help before I tear all my hair out ;)

- Jonny


[jQuery] Re: Announcing jQuery HowTo's

2007-12-21 Thread ajma

I'd suggest marking each How To article with version numbers. After a
few iterations of jQuery, people aren't going to know if the article
is still applicable or not.


On Dec 20, 11:50 pm, Shawn <[EMAIL PROTECTED]> wrote:
> In a recent thread
> (http://groups.google.com/group/jquery-en/browse_thread/thread/acfe180...)
> the need for volunteer help with the documentation was discussed.  I
> posted a suggestion that maybe a "how-to" type of document may help
> those who do not like the reference style of the official docs.  I took
> a look at adding to the wiki, but don't know the syntax/formatting
> needed (yet).  But I wanted to do something about this idea while it was
> more or less fresh in my head.
>
> So, I slapped together a quick Drupal site under a sub-domain to my own
> domain, and started typing.  Actually, I had started typing first, but
> quickly realized that an approach was needed to allow the community to
> offer feedback and/or help out.  So, a Drupal site sounded perfect for
> this - for now at least.  So, the site is at
>
> http://jquery.open2space.com
>
> I have some basic items in there right now, and am planning on extending
> the how-to's as I have time.  But I'm only one person and the areas I
> think would be helpful may be only a small subset of what everyone else
> thinks is helpful.  So feel free to create an account and help out.
>
> The actual how-to's are athttp://jquery.open2space.com/howto.  And if
> you'd like to contribute, I have some quick instructions and guidelines
> athttp://jquery.open2space.com/node/2.
>
> Logged in users can also blog about their jQuery experiences if they'd like.
>
> This is a bit of an experiment for me (the community driven site that
> is).  I'd like to see the community grow this idea, and even better -
> make it so popular that it makes sense to roll back into the official
> jQuery site. :)  My thoughts right now is that this site become a jQuery
> learning center, with links to pertinent books and blogs, and other
> resources for learning jQuery.  (Yep I have the Learning jQuery blog in
> the feeds.. any others that should be there? :)
>
> Any suggestions on making the site better are much appreciated.  And
> thanks to everyone who helped me get as far in my own understanding of
> jQuery!
>
> Shawn Grover


[jQuery] Re: Conditional events

2007-12-21 Thread LeonL



Thanks Mika, but it doesn't seem to work for me :(
What I did is (for testing):

$(".item_title").editable("operator.php",{
submitdata: {'type': 'title'},
width: 250,
}).bind("click",function() {
alert(edit)
});

This will work fine - alert the edit var value.
However, when adding 'event: "edit"' it wont do a thing:


$(".item_title").editable("operator.php",{
submitdata: {'type': 'title'},
width: 250,
event: "edit"
}).bind("click",function() {
alert(edit)
});

Is there something I'm doing wrong?
Thanks!


Mika Tuupola wrote:
> 
> 
> 
> On Dec 21, 2007, at 12:24 PM, LeonL wrote:
> 
>>
>>
>> Hello everyone.
>> I've been trying for some time now to make this code to execute ONLY  
>> if a
>> variable called edit equals to 1:
>> The code:
>>  $(".item_title").editable("operator.php",{
>>  submitdata: {'type': 'title'},
>>  width: 250
>>  });//EOE
>>
>> Does anybody have an idea how to do that??
>> Thanks.
> 
> 
> This is one way to do it:
> 
> -cut-
>   var check = 1;
> 
>   $(".item_title").editable("echo.php", {
>   event : "edit",
>   }).bind("click", function() {
> if (check) {
> $(this).trigger("edit");
> }
>   });
> -cut-
> 
> Basically it binds custom event "edit" to start Jeditable. Then after  
> click it check if variable "check" is true. If it is it triggers  
> "edit" event on Jeditable.
> 
> --
> Mika Tuupola
> http://www.appelsiini.net/
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Conditional-events-tp14453255s27240p14461121.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: jquery forms with ajax responses

2007-12-21 Thread pedalpete

Hi ngilbert,

not sure exactly what I did to be honest.
I downloaded and installed the ajaxForm, and the strange part of what
I did was to include the initial 'form' tags with the required class
in the initial page, and the loading page starts with the 'select' (or
other form statements).

So rather than loading the form into a div, the form is already on the
page (but empty) and then I load the form elements.


here's some of my code... (you'll have to download the jquery AjaxFrom
plugin).

[code]
$(".getForm").click(function(event) {
var id = this.id;
var posTop = event.pageY-30;
var posLeft = event.pageX-30;
$.ajax({
type: "GET",
url: "addItem.php",
data: id,
success: function(response){
$("#addForm").css({ position: 
'absolute', top: posTop, left:
posLeft });

$("#addForm").fadeIn("slow").html(response);
}

});

});


// prepare the form when the DOM is ready

var options = {
target:'#addForm',   // target element(s) to be
updated with server response
success:  showResponse
};

// bind to the form's submit event
$('#addForm').submit(function() {
// inside event callbacks 'this' is the DOM element so we
first
// wrap it in a jQuery object and then invoke ajaxSubmit
$(this).ajaxSubmit(options);

// !!! Important !!!
// always return false to prevent standard browser submit and
page navigation
return false;
});


// pre-submit callback
function showRequest(formData, jqForm, options) {
// formData is an array; here we use $.param to convert it to a
string to display it
// but the form plugin does this for you automatically when it
submits the data
var queryString = $.param(formData);

// jqForm is a jQuery object encapsulating the form element.  To
access the
// DOM element for the form do this:
// var formElement = jqForm[0];

  alert('About to submit: \n\n' + queryString);


// here we could return false to prevent the form from being
submitted;
// returning anything other than false will allow the form submit
to continue

}

// post-submit callback
function showResponse(options)  {
// for normal html responses, the first argument to the success
callback
// is the XMLHttpRequest object's responseText property

// if the ajaxSubmit method was passed an Options Object with the
dataType
// property set to 'xml' then the first argument to the success
callback
// is the XMLHttpRequest object's responseXML property

// if the ajaxSubmit method was passed an Options Object with the
dataType
// property set to 'json' then the first argument to the success
callback
// is the json data object returned by the server


$.ajax({
type: "GET",
url: "processes/getForm.php",
data: "uid="+uid+"&sid="+sid+"&date="+date,
success: function(response2){
$("."+date+"-"+uid).html(response2);
$("#addForm").fadeOut("slow");
}

});
}
});






[/code]

Unfortunately I am now having the problem that .click can only be
executed on each item once. So if you know how to fix that, I would be
much obliged.

Let me know how this works for you.
Pete
On Dec 20, 4:44 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> pedalpete,  I am having this very same issue.  Is there something
> specific you had to do to get jquery to work on returned forms?
>
> Thanks
>
> On Dec 18, 5:35 pm, pedalpete <[EMAIL PROTECTED]> wrote:
>
> > Thanks for your help Hamish,
>
> > I just got this working with the ajaxForm plugin.


[jQuery] Re: Slide toggle trigger to swap images depending on show hide state

2007-12-21 Thread somnamblst

And the answer is..

All credit goes to wizzud for the answer


#wrap {
   margin-left:0px;
   margin-right:auto;
   width: 910px;
}
#top h1 {
   display: block;
   background: url("image_910x40.jpg") no-repeat left top;
   height: 40px;
   width: 910px;
   margin: 0px;
   padding: 0px;
}

#slidebar {
   background: #00 url(image_910x200.jpg') no-repeat left top;
   padding: 0px;
   height: 200px;
   width: 910px;
}

#slidebartrigger {
   background: #ffcc99 url("replay.gif") no-repeat right top;
   display: block;
   padding: 0px;
   height: 14px;
}
#slidebartrigger.closeSlide {
   background: #0033ff url("close.gif") no-repeat right top;
   display: block;
   padding: 0px;
   height: 14px;
}
/* this is purely so that replay.gif isn't showing during during the
initial slideDown...*/
#slidebartrigger.firstSlide {
   background: #ff url("blank.gif") no-repeat right top;
   display: block;
   padding: 0px;
   height: 14px;
}

   

   
$(document).ready(function(){


 var slideTimeout // timer
  , sbTrigger = $('#slidebartrigger') // convenience
  , sbFirstSlide = true // indicates first time through
  ;
 function toggleSlideboxes(){

  if(slideTimeout) clearTimeout(slideTimeout);

  var isDown = sbTrigger.is('.closeSlide');

  $('#slidebar')['slide' + (isDown ? 'Up' : 'Down')]((isDown ? 3000 :
1000), function(){

  if(sbFirstSlide){ sbTrigger.removeClass('firstSlide');
sbFirstSlide
= false; }

  sbTrigger[(isDown ? 'remove' : 'add') +
'Class']('closeSlide').one('click', toggleSlideboxes);

  if(!isDown) slideTimeout = setTimeout(toggleSlideboxes, 4000);
});
 }
 toggleSlideboxes();
});



   
   
   

   
   

   
   


[jQuery] Cookie issue - path?

2007-12-21 Thread Sam Granger


I have a draggable menu which remembers its position using a cookie. I want
to use this menu all over my site and just use the 1 cookie to read from. It
works at first if I drag the menu on the main page and go to a subpage but
when I move it on the subpage it appears a new cookie is made with a new
path. However I am only using the code below:


$().ready(function() {
$('#sidebar').draggable({
handle: 'div#logo',
opacity: 0.8,
zIndex: 50,
stop: function() {
var y = $('#sidebar').css('top');
var x = $('#sidebar').css('left');
jQuery.cookie('menu_position', x+','+y, 20, { expires: 
7, path: '/',
domain: 'intrellia.com', secure: true });


}
});
var pos = jQuery.cookie('menu_position').split(',');
$('#sidebar').css({ position: 'absolute', top:pos[1], left:pos[0] });
});


What am I missing? Thanks!
-- 
View this message in context: 
http://www.nabble.com/Cookie-issue---path--tp14456821s27240p14456821.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: internet explorer debugging

2007-12-21 Thread Shawn

When I run into these "works in FF but not IE" issues, I plop my code 
into jslint (http://www.jslint.com/).  Reading through the warnings and 
errors it found does two things for me
- first it helps me identify problem areas.  IE is notorious for 
throwing errors on extra commas - FF ignores them - i.e. { a : "a", } 
would cause an error in IE.  jslint notes these.
- secondly it makes my code better overall.  I caused me to question 
some of the long standing "habits" I had and revise my coding style 
appropriately.

HTH.

Shawn

Alexandre Plennevaux wrote:
> hello friends,
> 
> my application is running ok in firefox but is not doing so great in
> internet explorer. I'm having a hard time tracking down the bug(s).
> Can someone help me? Problem is i didn't find any decent tool to debug
> javascrpt in internet explorer.
> 
> Anyway, here is the prototype i'm working on:
> 
> http://www.pixeline.be/test/m2/
> 
> the source code is here:
> http://www.pixeline.be/test/m2/_js/frontend/6_proto_strata+datascape+project.js
> 
> Basically, a good part of the code is used to make sure all elements
> fits nicely graphically on the background 4px grid, whatever the
> screen resolution.
> The top menu is "strataGrid" and after clicking on the second line of
> options in the menu, you get to the "datascape".
> 
> now, i'm not an expert in javascript so any coding improvement you can
> suggest is welcomed, i did it my way :)
> 
> The issue comes with the apparition of the datascape. It chokes and
> does not finish appearing. In firefox 2 it works well though.
> 
> 
> I think the error is somewhere here:
> 
> $('.strataTrigger').bind('click', function(){
> var $thisMenu = $(this).parents('.mainmenu');
> var li = $(this).parent();
> var index = li.parent().children('li').index(li[0]);
> $newLeft = strataGrid.startX + (strataGrid.colCenter - (index
> + 1)) * strataGrid.colWidth;
> $('.strataTrigger', $thisMenu).removeClass('selected');
> $(this).addClass('selected');
> $thisMenu.animate({
> left: $newLeft + 'px'
> });
> // 4._ SHOW/HIDES MENUS
> if ($thisMenu.attr('id') == 'strata1') {
> var showme = $(this).metadata().showme;
> //remove datascape if displayed
> if ($('#datascape').length) {
> $('#datascape').unbind().fadeOut("slow", function(){
> clearInterval(datascape.$interval);
> $(this).hide(); // HIDE OR REMOVE ?? _ A SURVEILLER
> });
> }
> 
> $('.strata2').each(function(){
> if ($(this).hasClass(showme)) {
> $(this).show();
> }
> else {
> $(this).hide();
> }
> });
> }
> else
> if ($thisMenu.hasClass('strata2')) {
> $('#strata3').html('');
> $("#datascape").load('ajax_datascape.inc.html', function(){
> $(this).fadeIn("slow");
> drawDatascape(strataGrid, '');
> });
> }
> return false;
> });
> 
> 
> 


[jQuery] Re: Jquery Sortable plugin bug when dragging Flash movie

2007-12-21 Thread somnamblst

I don't have an answer for you but thought I would add something I
encounter with a Flash movie (SWF) in a sliding div in FF. My close/
replay tab GIF slides up under the SWF, then the SWF disappears.

That being said I alsodid notice with scriptaculous and SWF files that
I had to have the AC_Runactivecontent.js workaround or the SWF would
flicker during a slideUp/slideDown

On Dec 21, 9:50 am, jamietssg <[EMAIL PROTECTED]> wrote:
> Hello all,
>
> I have encountered a serious bug with the JQuery sortable plugin and
> flash movies.
>
> To explain:
>
> I am using the JQuery and the Sortable functions provided by the
> Interface Plugin.
>
> I have a flash movie playing in the sortable div.
>
> In IE when you drag a flash movie that is currently playing, the flash
> movie will disappear and may leave 'trails' of blocks shapes in its
> path.
>
> When you drop the sortable in place the flash movie resumes as normal.
>
> Any ideas?
>
> Appreciate any feedback.
>
> Jamie


[jQuery] Re: Ajax with Jquery : "Load" or "$.get"

2007-12-21 Thread Brandnew

Thank you for your answer !

The only problem I get with $.get $.post, is that I don't achieve to
receive a message from the other page (which was called) and screen
it. With load, it's easy. But with $.get and $.post, the only I can do
is to make "alert" or "prompt" like "Succees"... I prefer to do --> if
succees, get the info that are sent as an echo.

I hope I'm understandable with this...

Thanks !

On Dec 17, 8:41 pm, real <[EMAIL PROTECTED]> wrote:
> Well to my knowledge, the reasons I generally use $.load() is to
> inject HTML dynamically into my page. Since you can pass variables in
> the $.load() function you're able to do it that way, but I'm not sure
> if that's the intended use of that method.
>
> $.get('newsletter_db.php', {email: email, type: type, nom: nom},
> function(responseText){
> // do whatever you want on a successful ajax request
>
> });
>
> What problems were you encountering with the $.get() and $.post()
> methods? There's also the $.ajax() method which you could use as such:
>
> $.ajax({
> url: 'newsletter_db.php',
> type: 'GET',// or 'POST'
> data: {email: email, type: type, nom: nom},
> success: function(responseText){
> // on success callback},
>
> error: function(responseText){
> // on error callback
>
> }
> });
>
> On Dec 16, 10:33 am,Brandnew<[EMAIL PROTECTED]> wrote:
>
> > Hello,
>
> > i'm fairly new to the Jquery process, but i'm enjoying a lot learning
> > how to use it. Lately, I made my first attempt at using a "kind of
> > Ajax" page for the Newsletter of my website.
>
> > I couldn't use things like $.get or $.post because I surely don't use
> > them well since they don't work for me (still lot to learn). But
> > instead I used "load". And so far it has been quite effective even if
> > I know I'm probably not on the right path.
>
> > So my question is : is it real Ajax if I use Load like this :
>
> > var nom = $('.nom').val();
> > var email = $('.email').val();
> > var type = $('select').val();
>
> > $('#html').load("newsletter_db.php", {email:email, type:type,
> > nom:nom},
> >  function(responseText){
> > $('#html').show(1000);
> >   });
>
> > Basically on the "newsletter_db.php" file, it takes the variables
> > ($_REQUEST['']) and complete action with the database following what's
> > been written on the form. If it's a subscription or a unsubscription,
> > what's the name and the email (checked by a preg_replace). And then
> > there are message if the database connection failed, or if the email
> > was not written correctly, or if one input was blank...
>
> > I used that technique because when I try with $.get or $.post, I
> > cannot make a message appear on the screen where the user is. I mean,
> > I could make an "alert('Success')" for example. But I want the message
> > to come from the other page which is called. That's why I use load.
>
> > Am I totally screwing up ?
>
> > And if so, could you give me some clue on how to make that with $.get
> > or $.post ?
>
> > Thank you !


[jQuery] Re: Problems with clueTip

2007-12-21 Thread Karl Swedberg


Hi firstlor,

I think the problem in your situation might be that you're setting the  
clueTip to use both the title attribute ( using splitTitle: '|' ) and  
the local element ( using local: true ). I cleaned up your options  
map, removing redundant or conflicting options. Please try this  
version and let me know if you still experience the problem:


// Tipps für die Hilfen auf Icons:
$('a.help').cluetip({
cluetipClass: 'jtip',
arrows: true,
dropShadow: false,
leftOffset: 20,
fx: {
  open:   'fadeIn', // can be 'show' or 'slideDown' or 
'fadeIn'
  openSpeed:  ''
},
local: true,
hideLocal: true,
});

/
Here are the options that I removed:

		hoverIntent: false, // <-- you later set hoverIntent with the  
default settings

//sticky: true, // <-- this is commented out anyway
//mouseOutClose: true, //  <-- this is commented out anyway
		closePosition: 'title', // <-- since sticky: true is commented out,  
this is no longer necessary
		closeText: '', //  
<-- since sticky: true is commented out, this is no longer necessary
		splitTitle: '|', //  <-- ** this one is probably the option that  
is causing your problems

positionBy: 'auto', //  <-- this is 'auto' by default, so 
unnecessary
		hoverIntent: {, //  <-- these are the hoverIntent defaults, so  
unnecessary

sensitivity:  3,
interval: 50,
timeout:  0
},

/


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



On Dec 21, 2007, at 7:45 AM, firstlor wrote:



Hello,

I want to use cluetip for displaying tooltips :) If I do it like that,
everything works fine:


[code]
JS:
// Tipps für die Hilfen auf Icons:
$('a.help').cluetip({
cluetipClass: 'jtip',
arrows: true,
dropShadow: false,
hoverIntent: false,
//sticky: true,
//mouseOutClose: true,
closePosition: 'title',
closeText: '',
splitTitle: '|',
positionBy: 'auto',
leftOffset: 20,
fx: {
  open:   'fadeIn', // can be 'show' or 'slideDown' or 
'fadeIn'
  openSpeed:  ''
},
hoverIntent: {
sensitivity:  3,
interval: 50,
timeout:  0
},
});

HTML:

[/code]

But if I want to use te same content quite often, I want to use the
content from a hidden p, so I used the following:

[code]
Js:
// Tipps für die Hilfen auf Icons:
$('a.help').cluetip({
cluetipClass: 'jtip',
arrows: true,
dropShadow: false,
hoverIntent: false,
//sticky: true,
//mouseOutClose: true,
closePosition: 'title',
closeText: '',
splitTitle: '|',
positionBy: 'auto',
leftOffset: 20,
fx: {
  open:   'fadeIn', // can be 'show' or 'slideDown' or 
'fadeIn'
  openSpeed:  ''
},
hoverIntent: {
sensitivity:  3,
interval: 50,
timeout:  0
},
local: true,
hideLocal: true,
});

HTML:

Löschen|Diesen Bereich und alle
darin enthaltenen Beiträge löschen
[/code]

But that doesn't work :( Why, what's wrong with it??

Thanks!




[jQuery] Re: Announcing jQuery HowTo's

2007-12-21 Thread Jake McGraw
Very cool, I often write detailed responses for how to questions on this
list. From now on, I'll post to your website and send them a link.

- jake

On Dec 21, 2007 2:50 AM, Shawn <[EMAIL PROTECTED]> wrote:

>
> In a recent thread
> (
> http://groups.google.com/group/jquery-en/browse_thread/thread/acfe180142e9668a/0453acd9acf83754?lnk=gst&q=New+jQuery+release#0453acd9acf83754
> )
> the need for volunteer help with the documentation was discussed.  I
> posted a suggestion that maybe a "how-to" type of document may help
> those who do not like the reference style of the official docs.  I took
> a look at adding to the wiki, but don't know the syntax/formatting
> needed (yet).  But I wanted to do something about this idea while it was
> more or less fresh in my head.
>
> So, I slapped together a quick Drupal site under a sub-domain to my own
> domain, and started typing.  Actually, I had started typing first, but
> quickly realized that an approach was needed to allow the community to
> offer feedback and/or help out.  So, a Drupal site sounded perfect for
> this - for now at least.  So, the site is at
>
> http://jquery.open2space.com
>
> I have some basic items in there right now, and am planning on extending
> the how-to's as I have time.  But I'm only one person and the areas I
> think would be helpful may be only a small subset of what everyone else
> thinks is helpful.  So feel free to create an account and help out.
>
> The actual how-to's are at http://jquery.open2space.com/howto.  And if
> you'd like to contribute, I have some quick instructions and guidelines
> at http://jquery.open2space.com/node/2.
>
> Logged in users can also blog about their jQuery experiences if they'd
> like.
>
> This is a bit of an experiment for me (the community driven site that
> is).  I'd like to see the community grow this idea, and even better -
> make it so popular that it makes sense to roll back into the official
> jQuery site. :)  My thoughts right now is that this site become a jQuery
> learning center, with links to pertinent books and blogs, and other
> resources for learning jQuery.  (Yep I have the Learning jQuery blog in
> the feeds.. any others that should be there? :)
>
> Any suggestions on making the site better are much appreciated.  And
> thanks to everyone who helped me get as far in my own understanding of
> jQuery!
>
> Shawn Grover
>
>


[jQuery] Re: using AJAX with jQuery

2007-12-21 Thread Jake McGraw
As you can tell, the possibilities are endless with jQuery... best skimming
through the documents so you can get an idea of the tools out there.

- jake

On Dec 21, 2007 11:28 AM, Jake McGraw <[EMAIL PROTECTED]> wrote:

> JJShell:
>
> You can address both issues by using all inputs within a form
>
> var values = {};
>
> $("form").find("input:text").each(function(){
>   values[$(this).attr("name")] = $(this).val();
> });
>
> Now values will have the following structure for your second example,
> which PHP should automatically turn into an array within $_POST:
>
> {
>   "pagetitle[1]" : "test",
>   "pagetitle[2]" : "some title",
>   "pagetitle[3]" : "some other title"
> }
>
> - jake
>
>
> On Dec 21, 2007 3:00 AM, jjshell <[EMAIL PROTECTED] > wrote:
>
> >
> > First of all, thanks for your time and answers. I really appreciate
> > it. Having made a few tests, the $.ajax approach seems the one that
> > fits the most my application.
> >
> > Just a few questions:
> >
> > 1.
> > Can you avoid to explicitely name each field of your form?
> > data: "test=" + $("input[name=test]").val(),
> > What if a form is dynamically created server-side? Do you also have to
> > dynamically create a line for jQuery?
> >
> > 2.
> > How dows this approach reacts to array fields?
> >
> > 
> > 
> > 
> >
> > Thank you again for your time :)
> >
>
>


[jQuery] Re: using AJAX with jQuery

2007-12-21 Thread Jake McGraw
JJShell:

You can address both issues by using all inputs within a form

var values = {};

$("form").find("input:text").each(function(){
  values[$(this).attr("name")] = $(this).val();
});

Now values will have the following structure for your second example, which
PHP should automatically turn into an array within $_POST:

{
  "pagetitle[1]" : "test",
  "pagetitle[2]" : "some title",
  "pagetitle[3]" : "some other title"
}

- jake

On Dec 21, 2007 3:00 AM, jjshell <[EMAIL PROTECTED]> wrote:

>
> First of all, thanks for your time and answers. I really appreciate
> it. Having made a few tests, the $.ajax approach seems the one that
> fits the most my application.
>
> Just a few questions:
>
> 1.
> Can you avoid to explicitely name each field of your form?
> data: "test=" + $("input[name=test]").val(),
> What if a form is dynamically created server-side? Do you also have to
> dynamically create a line for jQuery?
>
> 2.
> How dows this approach reacts to array fields?
>
> 
> 
> 
>
> Thank you again for your time :)
>


[jQuery] Re: cluetip and clicking on href

2007-12-21 Thread Karl Swedberg


Hi K,

Thanks for the feedback and for the clear description of the problem  
you're having with the clueTip plugin. It was actually a "feature" to  
disable the link's default behavior if the href and the tip attribute  
(rel by default) were the same. Turns out the feature was based on a  
bad assumption. ;-)


Anyway, someone else recently asked about the same thing, so I  
modified the plugin to allow for clicking through, no matter what.   
Unfortunately, my updates to the plugin have come in fits and starts,  
basically whenever I find a free hour or two (which is pretty rare).  
The update isn't currently available in a nice packaged download, and  
I haven't thoroughly tested it, but if you want to give it a shot,  
feel free to grab it from here:


http://jqueryjs.googlecode.com/svn/trunk/plugins/cluetip/jquery.cluetip.js

Then, you'll just need to add one key-value pair to the options:

 $('a.basic').cluetip({
 width:'830px',
 positionBy: 'bottomTop',
 waitImage: false,
 clickThrough: true
 });
});



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



On Dec 21, 2007, at 8:51 AM, K Bouton wrote:



I have cluetip working - love it. Easy to set up and use.
I have a calendar
you hover over a day and if fetches a remote page with events into the
cluetip. Perfect.
But... I also want the user to be able to click on the day and go to
the events page, but ti doesn't seem to work.


$(document).ready(function() {
 $('a.basic').cluetip({
 width:'830px',
 positionBy: 'bottomTop',
 waitImage: false
 });
});


then in the table the clue tip is created dynamically like


$month;?>">
The "rel" brings the pop up just like I want, but the href does
nothing when clicked?

Thanks - new to jquery and this is the first plugin I'm playing with.

K




[jQuery] Re: jQuery LightBox issue in IE7

2007-12-21 Thread Rey Bango


I changed the doctype to match the demo pages and no dice. I thought for 
sure that would resolve it but it didn't. :P


I'm going to remove it to see what effect it has.

Thanks for the feedback.

Rey

Wizzud wrote:

Have you tried either completing your doctype with a dtd, and/or
removing the doctype altogether?

On Dec 21, 2:51 pm, Rey Bango <[EMAIL PROTECTED]> wrote:

Hey Su, thanks for the feedback. Replies below:


Following from that, the first thing I'd do is just put back the
original styling from his example page to see what happens. In case you
hadn't tried already.

I've not tried that but will do it.


It's also worth noting that the slidedown div isn't /just/ truncated,
it's exactly as wide as the image. Have you seen what happens if you
make them, or even just one of them, bigger? It might hint at something
if the behavior changes.

Yep. I tried that this morning and same results. I used the same pics
that were used in his demo in IE7, the slide down div sizes itself to
the size of the pic instead of the dialog.

http://dev.healthybuyersclub.com/guide/detail.cfm?id=9

Rey...




[jQuery] cluetip and clicking on href

2007-12-21 Thread K Bouton

I have cluetip working - love it. Easy to set up and use.
I have a calendar
you hover over a day and if fetches a remote page with events into the
cluetip. Perfect.
But... I also want the user to be able to click on the day and go to
the events page, but ti doesn't seem to work.


$(document).ready(function() {
  $('a.basic').cluetip({
  width:'830px',
  positionBy: 'bottomTop',
  waitImage: false
  });
});


then in the table the clue tip is created dynamically like


The "rel" brings the pop up just like I want, but the href does
nothing when clicked?

Thanks - new to jquery and this is the first plugin I'm playing with.

K


[jQuery] Problems with clueTip

2007-12-21 Thread firstlor

Hello,

I want to use cluetip for displaying tooltips :) If I do it like that,
everything works fine:


[code]
JS:
// Tipps für die Hilfen auf Icons:
$('a.help').cluetip({
cluetipClass: 'jtip',
arrows: true,
dropShadow: false,
hoverIntent: false,
//sticky: true,
//mouseOutClose: true,
closePosition: 'title',
closeText: '',
splitTitle: '|',
positionBy: 'auto',
leftOffset: 20,
fx: {
  open:   'fadeIn', // can be 'show' or 'slideDown' or 
'fadeIn'
  openSpeed:  ''
},
hoverIntent: {
sensitivity:  3,
interval: 50,
timeout:  0
},
});

HTML:

[/code]

But if I want to use te same content quite often, I want to use the
content from a hidden p, so I used the following:

[code]
Js:
// Tipps für die Hilfen auf Icons:
$('a.help').cluetip({
cluetipClass: 'jtip',
arrows: true,
dropShadow: false,
hoverIntent: false,
//sticky: true,
//mouseOutClose: true,
closePosition: 'title',
closeText: '',
splitTitle: '|',
positionBy: 'auto',
leftOffset: 20,
fx: {
  open:   'fadeIn', // can be 'show' or 'slideDown' or 
'fadeIn'
  openSpeed:  ''
},
hoverIntent: {
sensitivity:  3,
interval: 50,
timeout:  0
},
local: true,
hideLocal: true,
});

HTML:

Löschen|Diesen Bereich und alle
darin enthaltenen Beiträge löschen
[/code]

But that doesn't work :( Why, what's wrong with it??

Thanks!


[jQuery] Jquery Sortable plugin bug when dragging Flash movie

2007-12-21 Thread jamietssg

Hello all,

I have encountered a serious bug with the JQuery sortable plugin and
flash movies.

To explain:

I am using the JQuery and the Sortable functions provided by the
Interface Plugin.

I have a flash movie playing in the sortable div.

In IE when you drag a flash movie that is currently playing, the flash
movie will disappear and may leave 'trails' of blocks shapes in its
path.

When you drop the sortable in place the flash movie resumes as normal.

Any ideas?

Appreciate any feedback.

Jamie


[jQuery] Cookie issue - path?

2007-12-21 Thread Sam Granger

I have a draggable menu which remembers its position using a cookie. I
want to use this menu all over my site and just use the 1 cookie to
read from. It works at first if I drag the menu on the main page and
go to a subpage but when I move it on the subpage it appears a new
cookie is made with a new path. However I am only using the code
below:


$().ready(function() {
$('#sidebar').draggable({
handle: 'div#logo',
opacity: 0.8,
zIndex: 50,
stop: function() {
var y = $('#sidebar').css('top');
var x = $('#sidebar').css('left');
jQuery.cookie('menu_position', x+','+y, 20,
{ expires: 7, path: '/', domain: 'intrellia.com', secure: true });


}
});
var pos = jQuery.cookie('menu_position').split(',');
$('#sidebar').css({ position: 'absolute', top:pos[1],
left:pos[0] });
});


What am I missing? Thanks!


[jQuery] Re: Interface droppables versus UI Droppables

2007-12-21 Thread Karl Delandsheere

Thanks :).

The problem is that $.ui.ddmanager.prepareOffsets() isn't mentionned
anywhere in the documentation. ^^

Anyway, I stopped using Droppables. I only use Draggables with some
Event Delegation on "drag" and "stop". It's ... kewl ^^. But I'll try
"prepareOffsets()" as soon as possible, so that this topic could be
"resolved" :).

And thanks to Richard too, even if I didn't wrote any ticket ^^.


On Dec 21, 6:49 am, Paul Bakaus <[EMAIL PROTECTED]> wrote:
> Guys, there already is that feature available. It's just called a
> little different: $.ui.ddmanager.prepareOffsets(); (I guess). Please
> try if it works for you. Thanks.
>
> On Dec 20, 11:06 am, "Richard D. Worth" <[EMAIL PROTECTED]> wrote:
>
> > If you could file a feature request ticket here, I'd be happy to take a look
> > at it:
>
> >http://dev.jquery.com/newticket
>
> > Thanks.
>
> > - Richard
>
> > On Dec 19, 2007 6:11 AM, Karl Delandsheere <[EMAIL PROTECTED]>
> > wrote:
>
> > > Hi!
>
> > > I'm moving a project from Interface to UI.
>
> > > When it was working with Interface, I used to call ".recallDroppable"
> > > when the DOM was modified (display new droppables and so on) while
> > > dragging.
>
> > > The comment of ".recallDroppable" is to the point :D...
>
> > > "* useful when the positions/dimensions for droppables
> > >  * are changed while dragging a element"
>
> > > So! My question is "how can I do the same with UI Droppable?"
>
> > > It seems nothing is planed for that in UI :/.


[jQuery] Re: jQuery LightBox issue in IE7

2007-12-21 Thread Wizzud

Have you tried either completing your doctype with a dtd, and/or
removing the doctype altogether?

On Dec 21, 2:51 pm, Rey Bango <[EMAIL PROTECTED]> wrote:
> Hey Su, thanks for the feedback. Replies below:
>
> > Following from that, the first thing I'd do is just put back the
> > original styling from his example page to see what happens. In case you
> > hadn't tried already.
>
> I've not tried that but will do it.
>
> > It's also worth noting that the slidedown div isn't /just/ truncated,
> > it's exactly as wide as the image. Have you seen what happens if you
> > make them, or even just one of them, bigger? It might hint at something
> > if the behavior changes.
>
> Yep. I tried that this morning and same results. I used the same pics
> that were used in his demo in IE7, the slide down div sizes itself to
> the size of the pic instead of the dialog.
>
> http://dev.healthybuyersclub.com/guide/detail.cfm?id=9
>
> Rey...


[jQuery] iterating functionality

2007-12-21 Thread FrankTudor

Hi all I have a simple hide/show function that doesn't seem to work
the way I want.

I need some theory help here.

Currently in my code I have a loop that iterates over a block of code
and builds a table.

I have a two row relationship.

Row one  is important info, where row two  has the break out
info that can be shown by clicking some text in row one..

I have a jquery hide/show function that also iterate over in the loop
(you see where i am going with this).

So this code repeats itself over and over to the end of the loop as
needed.

I would like to have one copy of this code at the top of my page
instead of duplicating it over and over.

but how would i do this?

Frank


[jQuery] Re: jQuery LightBox issue in IE7

2007-12-21 Thread Rey Bango


Hey Su, thanks for the feedback. Replies below:

Following from that, the first thing I'd do is just put back the 
original styling from his example page to see what happens. In case you 
hadn't tried already.


I've not tried that but will do it.

It's also worth noting that the slidedown div isn't /just/ truncated, 
it's exactly as wide as the image. Have you seen what happens if you 
make them, or even just one of them, bigger? It might hint at something 
if the behavior changes.


Yep. I tried that this morning and same results. I used the same pics 
that were used in his demo in IE7, the slide down div sizes itself to 
the size of the pic instead of the dialog.


http://dev.healthybuyersclub.com/guide/detail.cfm?id=9

Rey...


[jQuery] Re: dynamically remove scripts form page

2007-12-21 Thread Giovanni Battista Lenoci


GianCarlo Mingati ha scritto:

leaving the old framework was creating problems with the easing
equations used in my slideviewer plugin wich uses jquery 1.2 and the
easing functions. The plugin is used along the blog in some posts. In
some way, the last framework loaded (the old one, from Digg) was used
as THE framework from the browser, generating errors.
I'm quite happy but i'm sure you did not get a word of whati'm
saying... sorry for my english
BTW merry christmas everybody!
GC
  

Buon Natale Giancarlo!

Merry christmas from me to!




[jQuery] Re: dynamically remove scripts form page

2007-12-21 Thread Karl Swedberg


Nice work GianCarlo! Glad to see that you discovered a solution the  
the problem. Merry Christmas to you, too.



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



On Dec 21, 2007, at 8:43 AM, GianCarlo Mingati wrote:



it's ok now.
Instead of trying to remove the old framework imported via the digg
widget, i checked the content of
http://digg.com/tools/widgetjs
and i directly pasted the generated code excluding the old framework.
was incredibly easy.
the finished result can be found here http://www.gcmingati.net near
the end of the right sidebar: a "cycled" digg news.

leaving the old framework was creating problems with the easing
equations used in my slideviewer plugin wich uses jquery 1.2 and the
easing functions. The plugin is used along the blog in some posts. In
some way, the last framework loaded (the old one, from Digg) was used
as THE framework from the browser, generating errors.
I'm quite happy but i'm sure you did not get a word of whati'm
saying... sorry for my english
BTW merry christmas everybody!
GC



On Dec 21, 1:51 pm, GianCarlo Mingati <[EMAIL PROTECTED]>
wrote:

Hi all.
I wonder how you remove an external script from a page.
In particular i have a problem with a widget from DIGG wich uses
jquery 1.1.4. Such widget imports also this version of the framework
wich creates conflict with the easing 1.2 plugin because of the  
easing

names.
I tried with
$("#digghack + script").remove();
where #digghack is the frist script DIGG loads, where "+ script" os
jquery1.1.4.

Looking at the generated source viith firebug effectively the scritp
is removed from the source but is still in memory. I'm sure of that
because of the errors.
Any idea?
GC




[jQuery] Re: internet explorer debugging

2007-12-21 Thread pixeline

guess what, i found it too, and downloaded it but at the time of
instal, it said it required 1G. of disk space. At that point i said,
"no way, i'm not going to install a crap by microsoft to debug
javascript in their crappy browser, that weights 1 gigs".

On 21 déc, 13:43, Enrique Meléndez Estrada <[EMAIL PROTECTED]> wrote:
> have you try this:http://channel9.msdn.com/Showpost.aspx?postid=301814?
> it is a free alternative from microsoft, using Visual Web Developer
> Express but only for debugging Jscript (no for programming as I suppose
> it will add lot of "noise" to your source...)
>
> --
> Enrique Meléndez Estrada (2367)
> Servicios Informáticos
> Organización y Servicios Internos
> Instituto Tecnológico de Aragón


[jQuery] Re: Conditional events

2007-12-21 Thread Mika Tuupola



On Dec 21, 2007, at 12:24 PM, LeonL wrote:




Hello everyone.
I've been trying for some time now to make this code to execute ONLY  
if a

variable called edit equals to 1:
The code:
$(".item_title").editable("operator.php",{
submitdata: {'type': 'title'},
width: 250
});//EOE

Does anybody have an idea how to do that??
Thanks.



This is one way to do it:

-cut-
 var check = 1;

 $(".item_title").editable("echo.php", {
 event : "edit",
 }).bind("click", function() {
   if (check) {
   $(this).trigger("edit");
   }
 });
-cut-

Basically it binds custom event "edit" to start Jeditable. Then after  
click it check if variable "check" is true. If it is it triggers  
"edit" event on Jeditable.


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



[jQuery] Re: dynamically remove scripts form page

2007-12-21 Thread GianCarlo Mingati

it's ok now.
Instead of trying to remove the old framework imported via the digg
widget, i checked the content of
http://digg.com/tools/widgetjs
and i directly pasted the generated code excluding the old framework.
was incredibly easy.
the finished result can be found here http://www.gcmingati.net near
the end of the right sidebar: a "cycled" digg news.

leaving the old framework was creating problems with the easing
equations used in my slideviewer plugin wich uses jquery 1.2 and the
easing functions. The plugin is used along the blog in some posts. In
some way, the last framework loaded (the old one, from Digg) was used
as THE framework from the browser, generating errors.
I'm quite happy but i'm sure you did not get a word of whati'm
saying... sorry for my english
BTW merry christmas everybody!
GC



On Dec 21, 1:51 pm, GianCarlo Mingati <[EMAIL PROTECTED]>
wrote:
> Hi all.
> I wonder how you remove an external script from a page.
> In particular i have a problem with a widget from DIGG wich uses
> jquery 1.1.4. Such widget imports also this version of the framework
> wich creates conflict with the easing 1.2 plugin because of the easing
> names.
> I tried with
> $("#digghack + script").remove();
> where #digghack is the frist script DIGG loads, where "+ script" os
> jquery1.1.4.
>
> Looking at the generated source viith firebug effectively the scritp
> is removed from the source but is still in memory. I'm sure of that
> because of the errors.
> Any idea?
> GC


[jQuery] tablesorter: sorting tbodies

2007-12-21 Thread patrickk

is it possible to sort tbodies instead of tr's with the tablesorter-
plugin?

thanks,
patrick


[jQuery] dynamically remove scripts form page

2007-12-21 Thread GianCarlo Mingati

Hi all.
I wonder how you remove an external script from a page.
In particular i have a problem with a widget from DIGG wich uses
jquery 1.1.4. Such widget imports also this version of the framework
wich creates conflict with the easing 1.2 plugin because of the easing
names.
I tried with
$("#digghack + script").remove();
where #digghack is the frist script DIGG loads, where "+ script" os
jquery1.1.4.

Looking at the generated source viith firebug effectively the scritp
is removed from the source but is still in memory. I'm sure of that
because of the errors.
Any idea?
GC


[jQuery] Re: internet explorer debugging

2007-12-21 Thread Enrique Meléndez Estrada


have you try this: http://channel9.msdn.com/Showpost.aspx?postid=301814 ?
it is a free alternative from microsoft, using Visual Web Developer 
Express but only for debugging Jscript (no for programming as I suppose 
it will add lot of "noise" to your source...)


--
Enrique Meléndez Estrada (2367)
Servicios Informáticos
Organización y Servicios Internos
Instituto Tecnológico de Aragón



[jQuery] Re: internet explorer debugging

2007-12-21 Thread pixeline

hi Guy,

funny it seems i went pretty much to the same conclusions and ended up
isntalling aptana - really great! - and upgrading to Pro (trial
version for the moment).
Yet, i didn't find the debugger to be too helpful. maybe i'm missing
the right "methodology"...



On 21 déc, 12:11, Guy Fraser <[EMAIL PROTECTED]> wrote:
> Stefan Petre wrote:
> > Maybe this helpshttp://www.debugbar.com/
>
> I've yet to work out how that thing allows /debugging/ - it's got some
> basic features for looking at various aspects of the page, but it's
> hardly a debugger IMHO?
>
> There is a free "Microsoft Script Debugger" (MSD), but it's pants and
> quickly gets confused by even slightly complex pages.
>
> There is also a "Microsoft Script Editor" (MSE) which comes with MS
> Office 2003+ (and possibly also FrontPage). It's far better than MSD but
> still pretty pants, as you would expect from MS.
>
> http://www.jonathanboutelle.com/mt/archives/2006/01/howto_debug_jav.html
>
> If you want to splash the cash, you could use Microsoft Visual Studio
> but that seems like overkill to me just to get decent debugging in the
> browser.
>
> There's Firebug Lite which you can embed in your pages, but I haven't
> tried it so don't know what it's like.
>
> http://www.getfirebug.com/lite.html
>
> I ended up using Aptana (specifically the professional version) which
> seems to generally help me track down and solve problems, although I've
> not yet worked out how to pre-set breakpoints on sites where the JS is
> on the server and not directly accessible to me - eg. a script within a
> .jar file in a J2EE app.
>
> http://www.aptana.com/products/studio_professional.php
>
> I blogged about my MSIE debugging hell:
>
> http://www.adaptavist.com/display/~gfraser/2007/11/09/Script+debuggin...
>
> Guy


[jQuery] Reset values of Textboxes and Dropdowns

2007-12-21 Thread JQueryProgrammer

I have some textboxes and dropdowns on my page. now I already have a
function which resets my fields. I can do it by

$("#myFieldId")[0].value = "";

OR

$("#myFieldId")[0].selectedIndex = 0;

Can I do it by some easy way..?


[jQuery] Re: UI draggable working but not without errors

2007-12-21 Thread David Decraene

I'm getting the same error...

On Dec 12, 7:30 pm, Peter Bengtsson <[EMAIL PROTECTED]> wrote:
> I download the jquery-ui.min.js by just selecting the Draggable plugin
> which produced an 18K file.
> $('table.draggable').draggable();
> actually works just fine on my page. It even works in IE 6.
>
> BUT! I'm getting errors in Firebug and the Error Console. And on IE6 I'm
> getting some error warnings. When I load the page I first get this::
>
>"$.ui[w] has no properties"jquery-ui.min.js (line 8)
>
> (since it's minified it doesn't really make sense to show what's on line 8)
>
> When I start dragging the element I get another error::
>
>   "$(this.helper).outerWidth is not a function"   jquery-ui.min.js (line 23)
>
> I'm using jquery-1.2.1.min.js.
> The second error about outerWidth goes away when I also install dimensions.
>
> --
> Peter Bengtsson,
> workwww.fry-it.com
> homewww.peterbe.com
> hobbywww.issuetrackerproduct.com


[jQuery] Conditional events

2007-12-21 Thread LeonL


Hello everyone.
I've been trying for some time now to make this code to execute ONLY if a
variable called edit equals to 1: 
The code:
$(".item_title").editable("operator.php",{
submitdata: {'type': 'title'},
width: 250
});//EOE

Does anybody have an idea how to do that??
Thanks.

-- 
View this message in context: 
http://www.nabble.com/Conditional-events-tp14453255s27240p14453255.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Announcing jQuery HowTo's

2007-12-21 Thread Shawn

In a recent thread 
(http://groups.google.com/group/jquery-en/browse_thread/thread/acfe180142e9668a/0453acd9acf83754?lnk=gst&q=New+jQuery+release#0453acd9acf83754)
 
the need for volunteer help with the documentation was discussed.  I 
posted a suggestion that maybe a "how-to" type of document may help 
those who do not like the reference style of the official docs.  I took 
a look at adding to the wiki, but don't know the syntax/formatting 
needed (yet).  But I wanted to do something about this idea while it was 
more or less fresh in my head.

So, I slapped together a quick Drupal site under a sub-domain to my own 
domain, and started typing.  Actually, I had started typing first, but 
quickly realized that an approach was needed to allow the community to 
offer feedback and/or help out.  So, a Drupal site sounded perfect for 
this - for now at least.  So, the site is at

http://jquery.open2space.com

I have some basic items in there right now, and am planning on extending 
the how-to's as I have time.  But I'm only one person and the areas I 
think would be helpful may be only a small subset of what everyone else 
thinks is helpful.  So feel free to create an account and help out.

The actual how-to's are at http://jquery.open2space.com/howto.  And if 
you'd like to contribute, I have some quick instructions and guidelines 
at http://jquery.open2space.com/node/2.

Logged in users can also blog about their jQuery experiences if they'd like.

This is a bit of an experiment for me (the community driven site that 
is).  I'd like to see the community grow this idea, and even better - 
make it so popular that it makes sense to roll back into the official 
jQuery site. :)  My thoughts right now is that this site become a jQuery 
learning center, with links to pertinent books and blogs, and other 
resources for learning jQuery.  (Yep I have the Learning jQuery blog in 
the feeds.. any others that should be there? :)

Any suggestions on making the site better are much appreciated.  And 
thanks to everyone who helped me get as far in my own understanding of 
jQuery!

Shawn Grover



[jQuery] Re: internet explorer debugging

2007-12-21 Thread Guy Fraser
Stefan Petre wrote:
> Maybe this helps http://www.debugbar.com/
I've yet to work out how that thing allows /debugging/ - it's got some 
basic features for looking at various aspects of the page, but it's 
hardly a debugger IMHO?

There is a free "Microsoft Script Debugger" (MSD), but it's pants and 
quickly gets confused by even slightly complex pages.

There is also a "Microsoft Script Editor" (MSE) which comes with MS 
Office 2003+ (and possibly also FrontPage). It's far better than MSD but 
still pretty pants, as you would expect from MS.

http://www.jonathanboutelle.com/mt/archives/2006/01/howto_debug_jav.html

If you want to splash the cash, you could use Microsoft Visual Studio 
but that seems like overkill to me just to get decent debugging in the 
browser.

There's Firebug Lite which you can embed in your pages, but I haven't 
tried it so don't know what it's like.

http://www.getfirebug.com/lite.html

I ended up using Aptana (specifically the professional version) which 
seems to generally help me track down and solve problems, although I've 
not yet worked out how to pre-set breakpoints on sites where the JS is 
on the server and not directly accessible to me - eg. a script within a 
.jar file in a J2EE app.

http://www.aptana.com/products/studio_professional.php

I blogged about my MSIE debugging hell:

http://www.adaptavist.com/display/~gfraser/2007/11/09/Script+debugging+in+MS+Internet+Exploder

Guy


[jQuery] Using jQuery with Prism

2007-12-21 Thread Yansky

Just thought I'd mention that jQuery can be used with Prism. All you
need to do is redeclare "document" as a local variable (which points
to the browser) and you can then put jQuery inside the webapp.js
file. :)

e.g.

function doStuff(document){

//put jQuery packed here

$('body').prepend('jQuery Rocks!');

}

function startup() {

  var appcontent = host.getBrowser();

  if(appcontent){

 appcontent.addEventListener("DOMContentLoaded",
function(aEvent) {

doStuff(aEvent.originalTarget);

 }, true);

  }

}


[jQuery] Re: Superfish menu extremely slow/clunky in IE6 with wordpress

2007-12-21 Thread jbadger

Hi Joel,

Thanks for your prompt response!  The page is validating now, but we
still have the same problem.

You've asked for the HTML, CSS and JS, but this is a WordPress page,
so the HTML is created from a bunch of PHP files.

Do you want me to package-up the WordPress template and send it to
you?  Let me know.

Merry Christmas!

- John


[jQuery] Re: using AJAX with jQuery

2007-12-21 Thread jjshell

First of all, thanks for your time and answers. I really appreciate
it. Having made a few tests, the $.ajax approach seems the one that
fits the most my application.

Just a few questions:

1.
Can you avoid to explicitely name each field of your form?
data: "test=" + $("input[name=test]").val(),
What if a form is dynamically created server-side? Do you also have to
dynamically create a line for jQuery?

2.
How dows this approach reacts to array fields?





Thank you again for your time :)


[jQuery] Re: Best technique? .load() and div height...

2007-12-21 Thread Micky Hulse

Just to post my current solution, I ended-up writing a couple of
functions to apply min-height:

..

/* addMinHeight($ele)
** Set min-height, of parent, during the loading of content.
** @param: Target object. */
function addMinHeight($ele) {
$ele.parent().css('min-height', $ele.height());
}

/* removeMinHeight($ele)
** Remove min-height, from parent, after the loading of content.
** @param: Target object. */
function removeMinHeight($ele) {
$ele.parent().css('min-height', '');
}

..

Basically, I call addMinHeight() to the parent element of the div that
loads the new content before I apply fadeOut(), then after I fadeIn()
the newly loaded content, I call removeMinHeight() and remove the 'min-
height' of the parent element...

I had to target the parent element, because I was not able to get 'min-
height' to work on the div that loads the actual content... Not sure
why.

I have yet to target IE < 7/PC... I need to figure out how to apply
the "* html #ele { height }" hack via jQuery... Yadda yadda yadda...
did that all make any sense? :D

Haha, ok... time for sleep.

Cheers,
Micky


[jQuery] Re: Droppable Objects

2007-12-21 Thread Richard D. Worth
Do you have a sample page that you could show what you mean?

- Richard

On Dec 20, 2007 9:17 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]>
wrote:

>
> Hi All
> I 2 droppable objects "FormObject" and"RadioComposite" object .There
> is another object "RadioObject".
> What i am trying to do is drop RadioComposite into FormObject  and
> then drop RadioObject into RadioComposite.
>
> As of now, i can only drop RadioComposite into FormObject. After which
> i am unable to drop RadioObject into RadioComposite .
> Does jQuery support this scenario
> Thanks
> Haritha
>


[jQuery] Re: Using jqGrids as the subgrid

2007-12-21 Thread Tony

Chuck,
This is very interesting. I will try to help you.
Regards
Tony

On 21 Дек, 07:12, Chuck <[EMAIL PROTECTED]> wrote:
> Hello, I would like to use jqGrids as the subgrids for each row as its
> expanded.  To that end, I have modified jqGrid to allow the dynamic
> creation of jqGrids that are set as the subgrid.
>
> The idea is to have jqGrid nested inside another jqGrid.
>
> This code is a work in progress and is probably quite a hack.  As I am
> not a "client-side" guy, I don't quite know how to finish the work.
>
> I'm hoping some browser / jQuery guru will take mercy on me and help
> finish this thing - I need to get back to my real side-project.
>
> Please see the comments at the top of 'jquery.jqgrid.js'.
>
> What I have, and its caveats, can be found at:
>http://home.comcast.net/~mccrobie2000
>
> Everything needed to run the example is in the zip file, including the
> json data files.  I'll keep hacking at this, but I'm wondering if my
> time will be better spent with OpenLaszlo and its DHTML stuff.  Does
> anyone have experience with OpenLaszlo / DHTML - I'm NOT interested in
> the Flash rendering.
>
> Chuck McCrobie


[jQuery] Re: internet explorer debugging

2007-12-21 Thread Alexandre Plennevaux

great tips, thanks Wizzud ! I've updated the link with corrected code
according to your comments( except for the left:... because i rememberd
facing issues with old browsers if i didn't use the unit explicitely).

Now i'm facing bugs in the datascape movement (if you mouse on the left end
or right end side of the screen).

Also, I would like to try to make my datascape function into a plugin to
make sure i use jquery how it is meant to be used but i'm not successful so
far.
I'll see if the week end coding sessions prove more successful than the week
:)
 

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Wizzud
Sent: vendredi 21 décembre 2007 11:55
To: jQuery (English)
Subject: [jQuery] Re: internet explorer debugging


Ok, apparently not! Seems like you've already resolved it!

Couple of points, if you're interested:

if ($('#datascape').length) {
  $('#datascape').unbind().fadeOut("slow", function(){
You don't need to check length, just go straight into the $
('#datascape')...
jQuery will only proceed along the chain if the selector finds the
element.

$('#strata3').html('');
You can just use $('#strata3').empty();
html() does an empty() before applying the new content, and seeing as
you don't have any replacement content, a simple empty() should
suffice.


On Dec 21, 10:28 am, Wizzud <[EMAIL PROTECTED]> wrote:
> It appears to be choking on ...
>
> $thisMenu.animate({
> left: $newLeft + 'px'
> });
>
> You might need to ensure that 'left' is set to a value for anything
> you wish to animate. At the moment, IE7 is giving a start point of NaN
> for a left animation.
> PS. You don't need to supply the 'px',
> eg. just $thisMenu.animate({left:$newLeft}); will do.
>
> Looks neat!
>
> On Dec 21, 9:46 am, "Stefan Petre" <[EMAIL PROTECTED]> wrote:
>
> > Maybe this helpshttp://www.debugbar.com/
>
> > 2007/12/21, Alexandre Plennevaux <[EMAIL PROTECTED]>:
>
> > > hello friends,
>
> > > my application is running ok in firefox but is not doing so great in
> > > internet explorer. I'm having a hard time tracking down the bug(s).
> > > Can someone help me? Problem is i didn't find any decent tool to debug
> > > javascrpt in internet explorer.
>
> > > Anyway, here is the prototype i'm working on:
>
> > >http://www.pixeline.be/test/m2/
>
> > > the source code is here:
>
> >
>http://www.pixeline.be/test/m2/_js/frontend/6_proto_strata+datascape+...
>
> > > Basically, a good part of the code is used to make sure all elements
> > > fits nicely graphically on the background 4px grid, whatever the
> > > screen resolution.
> > > The top menu is "strataGrid" and after clicking on the second line of
> > > options in the menu, you get to the "datascape".
>
> > > now, i'm not an expert in javascript so any coding improvement you can
> > > suggest is welcomed, i did it my way :)
>
> > > The issue comes with the apparition of the datascape. It chokes and
> > > does not finish appearing. In firefox 2 it works well though.
>
> > > I think the error is somewhere here:
>
> > > $('.strataTrigger').bind('click', function(){
> > > var $thisMenu = $(this).parents('.mainmenu');
> > > var li = $(this).parent();
> > > var index = li.parent().children('li').index(li[0]);
> > > $newLeft = strataGrid.startX + (strataGrid.colCenter - (index
> > > + 1)) * strataGrid.colWidth;
> > > $('.strataTrigger', $thisMenu).removeClass('selected');
> > > $(this).addClass('selected');
> > > $thisMenu.animate({
> > > left: $newLeft + 'px'
> > > });
> > > // 4._ SHOW/HIDES MENUS
> > > if ($thisMenu.attr('id') == 'strata1') {
> > > var showme = $(this).metadata().showme;
> > > //remove datascape if displayed
> > > if ($('#datascape').length) {
> > > $('#datascape').unbind().fadeOut("slow", function(){
> > > clearInterval(datascape.$interval);
> > > $(this).hide(); // HIDE OR REMOVE ?? _ A
SURVEILLER
> > > });
> > > }
>
> > > $('.strata2').each(function(){
> > > if ($(this).hasClass(showme)) {
> > > $(this).show();
> > > }
> > > else {
> > > $(this).hide();
> > > }
> > > });
> > > }
> > > else
> > > if ($thisMenu.hasClass('strata2')) {
> > > $('#strata3').html('');
> > > $("#datascape").load('ajax_datascape.inc.html',
> > > function(){
> > > $(this).fadeIn("slow");
> > > drawDatascape(strataGrid, '');
> > > });
> > > }
> > > return false;
> > > });
>
> > > --
> > > Alexandre Plennevaux
> > > LAb[au]
>
> > >http://www.lab-au.com

Ce message Envoi est certifié sans virus connu.
Analyse effectuée par AVG.
Version: 7.5.516 

[jQuery] Re: internet explorer debugging

2007-12-21 Thread Wizzud

Ok, apparently not! Seems like you've already resolved it!

Couple of points, if you're interested:

if ($('#datascape').length) {
  $('#datascape').unbind().fadeOut("slow", function(){
You don't need to check length, just go straight into the $
('#datascape')...
jQuery will only proceed along the chain if the selector finds the
element.

$('#strata3').html('');
You can just use $('#strata3').empty();
html() does an empty() before applying the new content, and seeing as
you don't have any replacement content, a simple empty() should
suffice.


On Dec 21, 10:28 am, Wizzud <[EMAIL PROTECTED]> wrote:
> It appears to be choking on ...
>
> $thisMenu.animate({
> left: $newLeft + 'px'
> });
>
> You might need to ensure that 'left' is set to a value for anything
> you wish to animate. At the moment, IE7 is giving a start point of NaN
> for a left animation.
> PS. You don't need to supply the 'px',
> eg. just $thisMenu.animate({left:$newLeft}); will do.
>
> Looks neat!
>
> On Dec 21, 9:46 am, "Stefan Petre" <[EMAIL PROTECTED]> wrote:
>
> > Maybe this helpshttp://www.debugbar.com/
>
> > 2007/12/21, Alexandre Plennevaux <[EMAIL PROTECTED]>:
>
> > > hello friends,
>
> > > my application is running ok in firefox but is not doing so great in
> > > internet explorer. I'm having a hard time tracking down the bug(s).
> > > Can someone help me? Problem is i didn't find any decent tool to debug
> > > javascrpt in internet explorer.
>
> > > Anyway, here is the prototype i'm working on:
>
> > >http://www.pixeline.be/test/m2/
>
> > > the source code is here:
>
> > >http://www.pixeline.be/test/m2/_js/frontend/6_proto_strata+datascape+...
>
> > > Basically, a good part of the code is used to make sure all elements
> > > fits nicely graphically on the background 4px grid, whatever the
> > > screen resolution.
> > > The top menu is "strataGrid" and after clicking on the second line of
> > > options in the menu, you get to the "datascape".
>
> > > now, i'm not an expert in javascript so any coding improvement you can
> > > suggest is welcomed, i did it my way :)
>
> > > The issue comes with the apparition of the datascape. It chokes and
> > > does not finish appearing. In firefox 2 it works well though.
>
> > > I think the error is somewhere here:
>
> > > $('.strataTrigger').bind('click', function(){
> > > var $thisMenu = $(this).parents('.mainmenu');
> > > var li = $(this).parent();
> > > var index = li.parent().children('li').index(li[0]);
> > > $newLeft = strataGrid.startX + (strataGrid.colCenter - (index
> > > + 1)) * strataGrid.colWidth;
> > > $('.strataTrigger', $thisMenu).removeClass('selected');
> > > $(this).addClass('selected');
> > > $thisMenu.animate({
> > > left: $newLeft + 'px'
> > > });
> > > // 4._ SHOW/HIDES MENUS
> > > if ($thisMenu.attr('id') == 'strata1') {
> > > var showme = $(this).metadata().showme;
> > > //remove datascape if displayed
> > > if ($('#datascape').length) {
> > > $('#datascape').unbind().fadeOut("slow", function(){
> > > clearInterval(datascape.$interval);
> > > $(this).hide(); // HIDE OR REMOVE ?? _ A SURVEILLER
> > > });
> > > }
>
> > > $('.strata2').each(function(){
> > > if ($(this).hasClass(showme)) {
> > > $(this).show();
> > > }
> > > else {
> > > $(this).hide();
> > > }
> > > });
> > > }
> > > else
> > > if ($thisMenu.hasClass('strata2')) {
> > > $('#strata3').html('');
> > > $("#datascape").load('ajax_datascape.inc.html',
> > > function(){
> > > $(this).fadeIn("slow");
> > > drawDatascape(strataGrid, '');
> > > });
> > > }
> > > return false;
> > > });
>
> > > --
> > > Alexandre Plennevaux
> > > LAb[au]
>
> > >http://www.lab-au.com


[jQuery] Re: internet explorer debugging

2007-12-21 Thread Wizzud

It appears to be choking on ...

$thisMenu.animate({
left: $newLeft + 'px'
});

You might need to ensure that 'left' is set to a value for anything
you wish to animate. At the moment, IE7 is giving a start point of NaN
for a left animation.
PS. You don't need to supply the 'px',
eg. just $thisMenu.animate({left:$newLeft}); will do.

Looks neat!

On Dec 21, 9:46 am, "Stefan Petre" <[EMAIL PROTECTED]> wrote:
> Maybe this helpshttp://www.debugbar.com/
>
> 2007/12/21, Alexandre Plennevaux <[EMAIL PROTECTED]>:
>
>
>
> > hello friends,
>
> > my application is running ok in firefox but is not doing so great in
> > internet explorer. I'm having a hard time tracking down the bug(s).
> > Can someone help me? Problem is i didn't find any decent tool to debug
> > javascrpt in internet explorer.
>
> > Anyway, here is the prototype i'm working on:
>
> >http://www.pixeline.be/test/m2/
>
> > the source code is here:
>
> >http://www.pixeline.be/test/m2/_js/frontend/6_proto_strata+datascape+...
>
> > Basically, a good part of the code is used to make sure all elements
> > fits nicely graphically on the background 4px grid, whatever the
> > screen resolution.
> > The top menu is "strataGrid" and after clicking on the second line of
> > options in the menu, you get to the "datascape".
>
> > now, i'm not an expert in javascript so any coding improvement you can
> > suggest is welcomed, i did it my way :)
>
> > The issue comes with the apparition of the datascape. It chokes and
> > does not finish appearing. In firefox 2 it works well though.
>
> > I think the error is somewhere here:
>
> > $('.strataTrigger').bind('click', function(){
> > var $thisMenu = $(this).parents('.mainmenu');
> > var li = $(this).parent();
> > var index = li.parent().children('li').index(li[0]);
> > $newLeft = strataGrid.startX + (strataGrid.colCenter - (index
> > + 1)) * strataGrid.colWidth;
> > $('.strataTrigger', $thisMenu).removeClass('selected');
> > $(this).addClass('selected');
> > $thisMenu.animate({
> > left: $newLeft + 'px'
> > });
> > // 4._ SHOW/HIDES MENUS
> > if ($thisMenu.attr('id') == 'strata1') {
> > var showme = $(this).metadata().showme;
> > //remove datascape if displayed
> > if ($('#datascape').length) {
> > $('#datascape').unbind().fadeOut("slow", function(){
> > clearInterval(datascape.$interval);
> > $(this).hide(); // HIDE OR REMOVE ?? _ A SURVEILLER
> > });
> > }
>
> > $('.strata2').each(function(){
> > if ($(this).hasClass(showme)) {
> > $(this).show();
> > }
> > else {
> > $(this).hide();
> > }
> > });
> > }
> > else
> > if ($thisMenu.hasClass('strata2')) {
> > $('#strata3').html('');
> > $("#datascape").load('ajax_datascape.inc.html',
> > function(){
> > $(this).fadeIn("slow");
> > drawDatascape(strataGrid, '');
> > });
> > }
> > return false;
> > });
>
> > --
> > Alexandre Plennevaux
> > LAb[au]
>
> >http://www.lab-au.com


[jQuery] digg widget: Top 10 list from All Topics with CYCLE

2007-12-21 Thread GianCarlo Mingati

Hi all.
yesterday i 'pasted' on the sidebar of my blog, the code necessary to
display the Digg news widget. Unfortunately i was unhappy with any of
the selectable color schemes, so i decided to get an 'unstyled' one on
work on that. Then i used the jquery.cycle plugin to "rotate" the LI
elements.
It is defintaly better now. It was just an experiment to see how easy
is to do nearly everything with jquery.

www.gcmingati.net
look at the end of the sidebar.

Ciao
GC


[jQuery] Re: internet explorer debugging

2007-12-21 Thread pixeline

i found the bug!

replacing

drawDatascape(strataGrid,'');

by

drawDatascape(strataGrid);

and whoops IE6 and IE7 users can now join the party!

Still i would be very grateful for any code enhancement suggestion.

Thanks all!


[jQuery] Re: internet explorer debugging

2007-12-21 Thread Alexandre Plennevaux
unfortunately not really i find it to be a bloatware. I  found this one to be 
better: HYPERLINK 
"http://www.pixeline.be/blog/2007/free-javascript-debugger-for-internet-explorer/"http://www.pixeline.be/blog/2007/free-javascript-debugger-for-internet-explorer/
 
 
i think the issue is in the second argument of my function drawDatascape()
most of the time, this argument is empty. Is it possible to set the default 
value of an argument in the function declaration in javascript ?
function drawDatascape(strataGrid, targetPos){
...

if (typeof(targetPos) != "undefined") {
datascape.travellingTo(targetPos);
datascape.isTravelling = true;
}
...
}


   _  

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Stefan 
Petre
Sent: vendredi 21 décembre 2007 10:47
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: internet explorer debugging


Maybe this helps HYPERLINK "http://www.debugbar.com/"http://www.debugbar.com/


2007/12/21, Alexandre Plennevaux mailto:[EMAIL PROTECTED]"[EMAIL 
PROTECTED]>: 


hello friends,

my application is running ok in firefox but is not doing so great in 
internet explorer. I'm having a hard time tracking down the bug(s).
Can someone help me? Problem is i didn't find any decent tool to debug
javascrpt in internet explorer.

Anyway, here is the prototype i'm working on: 

HYPERLINK "http://www.pixeline.be/test/m2/"http://www.pixeline.be/test/m2/

the source code is here:
HYPERLINK 
"http://www.pixeline.be/test/m2/_js/frontend/6_proto_strata+datascape+project.js"http://www.pixeline.be/test/m2/_js/frontend/6_proto_strata+datascape+project.js
 

Basically, a good part of the code is used to make sure all elements
fits nicely graphically on the background 4px grid, whatever the
screen resolution.
The top menu is "strataGrid" and after clicking on the second line of 
options in the menu, you get to the "datascape".

now, i'm not an expert in javascript so any coding improvement you can
suggest is welcomed, i did it my way :)

The issue comes with the apparition of the datascape. It chokes and 
does not finish appearing. In firefox 2 it works well though.


I think the error is somewhere here:

$('.strataTrigger').bind('click', function(){
var $thisMenu = $(this).parents('.mainmenu'); 
var li = $(this).parent();
var index = li.parent().children('li').index(li[0]);
$newLeft = strataGrid.startX + (strataGrid.colCenter - (index
+ 1)) * strataGrid.colWidth;
$('.strataTrigger', $thisMenu).removeClass('selected'); 
$(this).addClass('selected');
$thisMenu.animate({
left: $newLeft + 'px'
});
// 4._ SHOW/HIDES MENUS
if ($thisMenu.attr('id') == 'strata1') { 
var showme = $(this).metadata().showme;
//remove datascape if displayed
if ($('#datascape').length) {
$('#datascape').unbind().fadeOut("slow", function(){ 
clearInterval(datascape.$interval);
$(this).hide(); // HIDE OR REMOVE ?? _ A SURVEILLER
});
}

$('.strata2').each(function(){ 
if ($(this).hasClass(showme)) {
$(this).show();
}
else {
$(this).hide();
}
});
} 
else
if ($thisMenu.hasClass('strata2')) {
$('#strata3').html('');
$("#datascape").load('ajax_datascape.inc.html', function(){ 
$(this).fadeIn("slow");
drawDatascape(strataGrid, '');
});
}
return false;
});



--
Alexandre Plennevaux 
LAb[au]

HYPERLINK "http://www.lab-au.com"http://www.lab-au.com




Ce message Envoi est certifié sans virus connu.
Analyse effectuée par AVG.
Version: 7.5.516 / Base de données virus: 269.17.5/1191 - Date: 20/12/2007 14:14
 


[jQuery] Re: jQuery LightBox issue in IE7

2007-12-21 Thread Su
On Dec 21, 2007 12:13 AM, Rey Bango <[EMAIL PROTECTED]> wrote:

> So there must be something off with my code. Any help would be greatly
> appreciated.


Following from that, the first thing I'd do is just put back the original
styling from his example page to see what happens. In case you hadn't tried
already.

It's also worth noting that the slidedown div isn't /just/ truncated, it's
exactly as wide as the image. Have you seen what happens if you make them,
or even just one of them, bigger? It might hint at something if the behavior
changes.


[jQuery] Re: jQuery assistance w/ moving nearby elements

2007-12-21 Thread Wizzud

Lets break it down step by step...

On Dec 21, 4:15 am, soupenvy <[EMAIL PROTECTED]> wrote:
> I've now got it doing what I want, thanks to the .prevAll() selector.
>
> However, the closing portion of my JS doesn't seem to work:
>
> $(document).ready(function() {
> $("#tabs > li").addClass("closed")

(1)...Every LI immediate child of #tabs now has a class of 'closed'

>
> $("#tabs > li.closed").click (function() {

(2)...For every element that you've just assigned the 'closed' class
to, now bind a click function (you could simply have chained this onto
the previous statement because it's working on the same set of
elements!)

> $(this).animate({top:'-387'},
> 500).removeClass("closed").addClass("open");

(2A)...Animated the clicked LI element and switch its class from
'closed' to 'open'

> $(this).prevAll().animate({top:'-387'},
> 500).removeClass("closed").addClass("open");

(2B)...Animated all preceding LI elements and switch their class from
'closed' to 'open'

> return false;
> });
>
> $("#tabs > li.open").click (function() {

(3)...For every LI immediate child of #tabs that has a class of
'open', bind a click function to it.
The only problem here is that you don't have any elements with a class
of 'open' because in step (1) above you gave them all a class of
'closed'! (and I assume an element cannot be both 'closed' and 'open'
at the same time).
So given that $('#tabs > li.open') contains an empty set, the
following click function will not be bound to anything.

When the document loads, it will run (1), then run (2), then run (3).
Then, when any element in the selected set in (2) [or (1), because
they're the same] is clicked on, then (2A) and (2B) will be run. You
can click on them as many times as you like, it is still (2A) and (2B)
that will run.

You have to remember that a selector will only pick up elements that
match its criteria *at the instant the selector is run*.
What you are attempting to do in step (3) is anticipate what some
elements *might* be selectable by at some point in the future, and
that won't work.

"So what do I do instead?" I hear you say.
Well, there is a plugin called Jquery Live which will do exactly what
you trying to do above, but for your case, that might be a bit like
using a bulldozer on a molehill - and wouldn't help you to get to
grips with the jQuery basics.
The simplest solution is just to bind a single click handler to your
LI elements, and within that handler check for the current class of
the element clicked and perform your opening or closing as
appropriate.

HTH

> $(this).animate({top:'0'},
> 500).removeClass("open").addClass("closed");
> $(this).nextAll().animate({top:'0'},
> 500).removeClass("open").addClass("closed");
> return false;
> });
>
> });
>
> Jquery gives open list items a class of "open" just fine, but clicking
> on those do nothing at all.
>
> Does it have something to do w/ the fact that jQuery has added the
> class open, but the document hasn't "reloaded"?


[jQuery] Re: internet explorer debugging

2007-12-21 Thread Stefan Petre
Maybe this helps http://www.debugbar.com/

2007/12/21, Alexandre Plennevaux <[EMAIL PROTECTED]>:
>
>
> hello friends,
>
> my application is running ok in firefox but is not doing so great in
> internet explorer. I'm having a hard time tracking down the bug(s).
> Can someone help me? Problem is i didn't find any decent tool to debug
> javascrpt in internet explorer.
>
> Anyway, here is the prototype i'm working on:
>
> http://www.pixeline.be/test/m2/
>
> the source code is here:
>
> http://www.pixeline.be/test/m2/_js/frontend/6_proto_strata+datascape+project.js
>
> Basically, a good part of the code is used to make sure all elements
> fits nicely graphically on the background 4px grid, whatever the
> screen resolution.
> The top menu is "strataGrid" and after clicking on the second line of
> options in the menu, you get to the "datascape".
>
> now, i'm not an expert in javascript so any coding improvement you can
> suggest is welcomed, i did it my way :)
>
> The issue comes with the apparition of the datascape. It chokes and
> does not finish appearing. In firefox 2 it works well though.
>
>
> I think the error is somewhere here:
>
> $('.strataTrigger').bind('click', function(){
> var $thisMenu = $(this).parents('.mainmenu');
> var li = $(this).parent();
> var index = li.parent().children('li').index(li[0]);
> $newLeft = strataGrid.startX + (strataGrid.colCenter - (index
> + 1)) * strataGrid.colWidth;
> $('.strataTrigger', $thisMenu).removeClass('selected');
> $(this).addClass('selected');
> $thisMenu.animate({
> left: $newLeft + 'px'
> });
> // 4._ SHOW/HIDES MENUS
> if ($thisMenu.attr('id') == 'strata1') {
> var showme = $(this).metadata().showme;
> //remove datascape if displayed
> if ($('#datascape').length) {
> $('#datascape').unbind().fadeOut("slow", function(){
> clearInterval(datascape.$interval);
> $(this).hide(); // HIDE OR REMOVE ?? _ A SURVEILLER
> });
> }
>
> $('.strata2').each(function(){
> if ($(this).hasClass(showme)) {
> $(this).show();
> }
> else {
> $(this).hide();
> }
> });
> }
> else
> if ($thisMenu.hasClass('strata2')) {
> $('#strata3').html('');
> $("#datascape").load('ajax_datascape.inc.html',
> function(){
> $(this).fadeIn("slow");
> drawDatascape(strataGrid, '');
> });
> }
> return false;
> });
>
>
>
> --
> Alexandre Plennevaux
> LAb[au]
>
> http://www.lab-au.com
>


[jQuery] internet explorer debugging

2007-12-21 Thread Alexandre Plennevaux

hello friends,

my application is running ok in firefox but is not doing so great in
internet explorer. I'm having a hard time tracking down the bug(s).
Can someone help me? Problem is i didn't find any decent tool to debug
javascrpt in internet explorer.

Anyway, here is the prototype i'm working on:

http://www.pixeline.be/test/m2/

the source code is here:
http://www.pixeline.be/test/m2/_js/frontend/6_proto_strata+datascape+project.js

Basically, a good part of the code is used to make sure all elements
fits nicely graphically on the background 4px grid, whatever the
screen resolution.
The top menu is "strataGrid" and after clicking on the second line of
options in the menu, you get to the "datascape".

now, i'm not an expert in javascript so any coding improvement you can
suggest is welcomed, i did it my way :)

The issue comes with the apparition of the datascape. It chokes and
does not finish appearing. In firefox 2 it works well though.


I think the error is somewhere here:

$('.strataTrigger').bind('click', function(){
var $thisMenu = $(this).parents('.mainmenu');
var li = $(this).parent();
var index = li.parent().children('li').index(li[0]);
$newLeft = strataGrid.startX + (strataGrid.colCenter - (index
+ 1)) * strataGrid.colWidth;
$('.strataTrigger', $thisMenu).removeClass('selected');
$(this).addClass('selected');
$thisMenu.animate({
left: $newLeft + 'px'
});
// 4._ SHOW/HIDES MENUS
if ($thisMenu.attr('id') == 'strata1') {
var showme = $(this).metadata().showme;
//remove datascape if displayed
if ($('#datascape').length) {
$('#datascape').unbind().fadeOut("slow", function(){
clearInterval(datascape.$interval);
$(this).hide(); // HIDE OR REMOVE ?? _ A SURVEILLER
});
}

$('.strata2').each(function(){
if ($(this).hasClass(showme)) {
$(this).show();
}
else {
$(this).hide();
}
});
}
else
if ($thisMenu.hasClass('strata2')) {
$('#strata3').html('');
$("#datascape").load('ajax_datascape.inc.html', function(){
$(this).fadeIn("slow");
drawDatascape(strataGrid, '');
});
}
return false;
});



-- 
Alexandre Plennevaux
LAb[au]

http://www.lab-au.com


[jQuery] Re: How to get all CSS values from Attributes

2007-12-21 Thread Wizzud

var foo =$('#divname').css('top');
var bar = $('#divname').css('marginTop');

Be careful with padding though, because I think different browsers
report it in different ways because it is a sort of shorthand for
padding-top + padding-right + ...etc. As such, just asking for $
('#divname').css('padding') may not always return what you might
expect. It is safer to get each one separately ... $
('#divname').css('paddingTop'); etc. Of course, if you're sure they're
all set the same then one will do. [same applies to $
('#divname').css('margin');]

On Dec 21, 1:19 am, Jeroen <[EMAIL PROTECTED]> wrote:
> Suppose this piece of css, how would I get the values for top, margin-
> left or padding?
>
> #divname {
>top: 0;
>margin-left: 1px;
>padding: 7px;
>
> }
>
> Setting this is easy:
>
> $(#divname).css('height', '200px');
>
> And getting it also:
>
> var foo = $(#divname).width();
> or
> var foo = $('#divname').get(0).width;
>
> However  top, margin etc. I don't how to fetch it. Probably very
> obvious problem but seem to overlook it.
> Thanks in advance!
>
> ---
> Jeroen