[jQuery] Here is another nice plugin idea
If anyone wanted an idea for a jQuery plugin to write http://www.scbr.com/docs/products/dhtmlxGrid/samples/1/index.html I think we have most if not all the infrastructure in existing plugins, but making it into a widget that you can easily drop on a page would be cool. -Steve ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] How do I get the XML of an ajax request?
Hi all, How do I get the XML response of an ajax request? I want to put the XML text into a textarea and can do find this documented. $.get(/rgeo/, { x: document.rgeo.x.value, y: document.rgeo.y.value }, function(data){ console.log(data); $(textarea#response)[0].value = data; } ); My textarea ends up with the string [object XMLDocument] I also tried: $.ajax({ url: /rgeo/, dataType: xml, data: { x: document.rgeo.x.value, y: document.rgeo.y.value }, success: function(data){ console.log(data); $(textarea#response)[0].value = data; } }); Thanks, -Steve ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] How do I get the XML of an ajax request?
Jake, Thanks for the help. I changed my code to look like this and got things to work. $('#rgeo').bind('submit', function(){ var xml = $.ajax({ url: /rgeo/, dataType: xml, async: false, data: { x: document.rgeo.x.value, y: document.rgeo.y.value } }).responseText; $(#response)[0].value = xml; return false; }); This should be better documented in the $.ajax() documentation. Thanks, -Steve Ⓙⓐⓚⓔ wrote: you're close... you don't get simple text from an xml request. you get a big ol' request object. if you just want the text from the html you can see it in a 'complete' call back with data.responseText inside success, you get back the responseXML part of the request. it's an xmlDocument that needs to be navigated with $(answer,data) or something like that! Hope that helps! On 2/13/07, Stephen Woodbridge [EMAIL PROTECTED] wrote: Hi all, How do I get the XML response of an ajax request? I want to put the XML text into a textarea and can do find this documented. $.get(/rgeo/, { x: document.rgeo.x.value, y: document.rgeo.y.value }, function(data){ console.log(data); $(textarea#response)[0].value = data; } ); My textarea ends up with the string [object XMLDocument] I also tried: $.ajax({ url: /rgeo/, dataType: xml, data: { x: document.rgeo.x.value, y: document.rgeo.y.value }, success: function(data){ console.log(data); $(textarea#response)[0].value = data; } }); Thanks, -Steve ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] Interesting plugin idea if anyone is interested for jquery
http://www.solutoire.com/plotr ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Really Ugly?
Karl Swedberg wrote: Hello my jQuery friends, I received a comment on learningjquery.com this evening from someone who had a grievance with part of some example code. I was wondering if any of you would be willing to shed some light on this for me. I think what he's getting at is the whole innerHTML is evil thing, but since he doesn't really explain why he think it's really ugly, I'm just not sure. Here is the relevant snippet of his comment: Nice post, but … This part of code : $('#show-alert').click(function() { $('div class=quick-alertAlert! Watch me before it\'s too late!/div') .insertAfter( $(this) ); } should be AVOIDED as is. Inserting HTML code like this is really ugly, it’s a lot better to use the DOM methods : $('#show-alert').click(function() { var oDIV = document.createElement('div'); oDiv.className = 'quick-alert'; oText = document.createTextNode(Alert ! Watch me before it's too late !); $(oDiv).append(oText); $(oDiv).insertAfter(this); } I'd love to hear your opinions about this. With HTML/CSS stuff, I'm obsessed with standards and such. And one of the things that has always really attracted me to jQuery is its unobtrusiveness. I also read Jeremy Keith's DOM Scripting book and really appreciated his approach -- which is similar to what this commenter is suggesting. But I also love the super-fast development that can be done with jQuery and don't want to have to give that up if it's just a matter of someone's aesthetic sensibility being offended. I guess I just want to do the right thing. thanks, Karl, I think this the argument about separation of content and structure. Like the MVC concepts it is bad practice mix you content and structure. Hence 7 lines instead of 4. Personally, I don't like it conceptually either, but it is very convenient and all to easy to do for speed and easy of prototyping. I think this is also revolves around what we want to be teaching new jQuery users by the examples we use. my 2 cents, -Steve W ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] SVN is Broken
./dist/jquery.js Built Building ./dist/jquery.lite.js - Removing ScriptDoc from ./dist/jquery.js js: build/build/lite.js, line 1: Couldn't open file ../jquerybuild/js/writeFile.js. js: build/build/lite.js, line 6: uncaught JavaScript runtime exception: ReferenceError: writeFile is not defined. make: *** [dist/jquery.lite.js] Error 3 ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] I broke it - Why is it doing this?
Ⓙⓐⓚⓔ wrote: $(.button).bind( click, function(){ }); keeps everything associated with each individual button, throwing in a named function can easily hit some globals! and what is form_dirty? form_dirty is a boolean global that gets set it my pseudo-form get modified, so I can ignore asking the use to save if they move off the page. let's see the whole page! http://imaptools.com/sm/index-002.html - with named function http://imaptools.com/sm/index-003.html - with anon function To test the page, load it can click the GO button, it should call action_go() and load an image and the select list, this work with the anon function. I want to extract the named function so I can reuse it with the onchange event on #files to ask the user to save if the form is dirty. You can make the form dirty by clicking on the image. -Steve On 1/25/07, Stephen Woodbridge [EMAIL PROTECTED] wrote: I have a bunch of buttons, and use the following to assign click events. $(.button).each( function() { var data = { check_dirty: 1 }; data.action = $(this).text().toLowerCase(); if (data.action == 'save') data.check_dirty = 0; $(this).css(text-align, center); $(this).bind( click, data, check_save); }); The problem is that all the click handlers get the data that is assign by the last button processed. If I set through firebug, they are all getting assigned the correct values as the each loop is executing, but data seems to be global rather then scoped to the anon function! What am I missing here? -Steve ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] I broke it - Why is it doing this?
Ⓙⓐⓚⓔ wrote: not 100% sure but something like that happened to me! mydata, gets re-used! that's why we use the weird case of $.extend() to make a fresh object instead of just using it var mydata = { check_dirty: 1 }; seems to get shared! var mydata = jQuery.extend({},{ check_dirty: 1 }) makes a fresh mydata object there may be a better way of coding this... but it got me out of a similar situation! Jake, Thank you for the suggestion. I will give it a try tonight. reading, reading, reading, ... I think I know why this is happening. When you create a named function is is basically a static object stored in funcname of the scope it was defined in. when you declare a var in a function it is also a static object attached to the function object. As such mydata is a single static object and effectively a single object in the global space of objects. So repeated calls to funcname that set mydata will result in the last calls values be stored into mydata. With the anon function, you are actually creating multiple functions each with its own mydata variable defined within each anon function. The var statement DOES NOT work like it does in C where the variable is created on the stack and is unique to that function call at runtime. Does this sound right? So the real way around this problem, I think, is to create an object and use the new constructor and attach you local instance variables to this. Which is easier to say than to do for me, because my brain doesn't think this way yet. -Steve On 1/26/07, Stephen Woodbridge [EMAIL PROTECTED] wrote: Ⓙⓐⓚⓔ wrote: $(.button).bind( click, function(){ }); keeps everything associated with each individual button, throwing in a named function can easily hit some globals! and what is form_dirty? form_dirty is a boolean global that gets set it my pseudo-form get modified, so I can ignore asking the use to save if they move off the page. let's see the whole page! http://imaptools.com/sm/index-002.html - with named function http://imaptools.com/sm/index-003.html - with anon function To test the page, load it can click the GO button, it should call action_go() and load an image and the select list, this work with the anon function. I want to extract the named function so I can reuse it with the onchange event on #files to ask the user to save if the form is dirty. You can make the form dirty by clicking on the image. -Steve On 1/25/07, Stephen Woodbridge [EMAIL PROTECTED] wrote: I have a bunch of buttons, and use the following to assign click events. $(.button).each( function() { var data = { check_dirty: 1 }; data.action = $(this).text().toLowerCase(); if (data.action == 'save') data.check_dirty = 0; $(this).css(text-align, center); $(this).bind( click, data, check_save); }); The problem is that all the click handlers get the data that is assign by the last button processed. If I set through firebug, they are all getting assigned the correct values as the each loop is executing, but data seems to be global rather then scoped to the anon function! What am I missing here? -Steve ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] I broke it - Why is it doing this?
Michael Geary wrote: When you create a named function is is basically a static object stored in funcname of the scope it was defined in. when you declare a var in a function it is also a static object attached to the function object. As such mydata is a single static object and effectively a single object in the global space of objects. So repeated calls to funcname that set mydata will result in the last calls values be stored into mydata. With the anon function, you are actually creating multiple functions each with its own mydata variable defined within each anon function. The var statement DOES NOT work like it does in C where the variable is created on the stack and is unique to that function call at runtime. Does this sound right? No, not at all. (Sorry!) The var statement DOES work just like a variable declaration in C. A variable declared in a function is not attached to the function object. It is created when the function is *called*, the same as in C, and free for garbage collection when the function returns - unless there is an outstanding reference to it as in the case of a closure. Even when there is a closure, a variable is still specific to a single invocation of the function in which it is declared. Also, it makes no difference if a function is named or anonymous. The scope rules are identical for either kind of function. I'll go look at the original problem, but I just wanted to correct this first. Thank you Mike, I appreciate the correction. I was a little dumb founded by the only explanation that I could come up with and decided over dinner that I should test it out an verify it. I probably should have done that before posting. All the good thoughts seem to come after hitting Send! -Steve ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] I broke it - Why is it doing this?
Michael Geary wrote: I appreciate the correction. I was a little dumb founded by the only explanation that I could come up with and decided over dinner that I should test it out an verify it. I probably should have done that before posting. All the good thoughts seem to come after hitting Send! Not to worry, Steve, you should have seen some of the bloopers I've posted! I was going to try tracing through your code, but your earlier message said to click the GO button: http://imaptools.com/sm/index-002.html - with named function http://imaptools.com/sm/index-003.html - with anon function To test the page, load it can click the GO button, it should call action_go() and load an image and the select list, this work with the anon function. I see the word GO along with PREV/SAVE/NEXT, but none of them are buttons, just plain text. Right, they are aren't buttons yet, but they all have click events on them so you can just click the text. I plan to change them to buttons, I'm not sure why I did do that in the first place. In fact the whole control, is a pseudo-form, just text in cells. If I change it to a form I can probably use the form plugin and simplify my code somewhat. If you start with http://imaptools.com/sm/index-003.html it actually works more or less so you can see how it should interact. index-002.html was my 1st iteration on restructuring and clean it up, but I ran into this weird problem. -Steve ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] I broke it - Why is it doing this?
I have a bunch of buttons, and use the following to assign click events. $(.button).each( function() { var data = { check_dirty: 1 }; data.action = $(this).text().toLowerCase(); if (data.action == 'save') data.check_dirty = 0; $(this).css(text-align, center); $(this).bind( click, data, check_save); }); The problem is that all the click handlers get the data that is assign by the last button processed. If I set through firebug, they are all getting assigned the correct values as the each loop is executing, but data seems to be global rather then scoped to the anon function! What am I missing here? -Steve ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] I broke it - Why is it doing this?
Stephen Woodbridge wrote: I have a bunch of buttons, and use the following to assign click events. $(.button).each( function() { var data = { check_dirty: 1 }; data.action = $(this).text().toLowerCase(); if (data.action == 'save') data.check_dirty = 0; $(this).css(text-align, center); $(this).bind( click, data, check_save); }); The problem is that all the click handlers get the data that is assign by the last button processed. If I set through firebug, they are all getting assigned the correct values as the each loop is executing, but data seems to be global rather then scoped to the anon function! What am I missing here? To add to this puzzle if I replace check_save reference to a function, with an anonymous function it works correctly. Like this: $(.button).each( function() { var mydata = { check_dirty: 1 }; mydata.action = $(this).text().toLowerCase(); if (mydata.action == 'save') mydata.check_dirty = 0; $(this).css(text-align, center); $(this).bind( click, mydata, function (e) { var check_dirty = e.data.check_dirty; if (check_dirty form_dirty) { $(#continue).unbind(click); $(#continue).bind(click, e.data, function(e) { clear_form_data(); actions[e.data.action](e.data.data); $.unblockUI(); }); $(#save_it).unbind(click); $(#save_it).bind(click, function (e) { action_save(); if (e.data.action typeof actions[e.data.action] == function) actions[e.data.action](e.data.data); $.unblockUI(); }); $(#cancel).unbind(click); $(#cancel).bind(click, function() { $.unblockUI(); }); $.blockUI(saveMessage); } else if (typeof actions[e.data.action] == function) actions[e.data.action](e.data.data); }); }); ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] image position question, take 2
Jake, Sorry, I have commented out the console.debug() messages. I will convert the code over to $.log() when I get a chance. I'm using the console.debug() in FF2 and firebug 1.0b9 -Steve Ⓙⓐⓚⓔ wrote: your console.debug(button: action:+ e.data.action + check_dirty:+check_dirty); stops my firefox in it's tracks! I use jQuery.fn.debug = function(message) { return this.log('debug:' + (message || '') +[).each(function(){jQuery.log(this);}).log(]); } jQuery.fn.log = jQuery.log = function(message) { if (!message) message = 'UNDEFINED' if (typeof message == object) message = jsO(message) if(window.console window.console.log) //safari window.console.log(message) else if(window.console window.console.debug) //firebug window.console.debug(message) else jQuery(body).prepend(message+ br/) return this } and it works for any browser (especially firefox + firebug! $log(whatever) On 1/22/07, Stephen Woodbridge [EMAIL PROTECTED] wrote: Stephen Woodbridge wrote: Hi all, I know there has got to be an easy way to do thing but I'm having trouble figuring it out. I have a div that has an image in it and this image is positioned relative to the div based on what I want to look at and this works great so far. Now I want to overlay another transparent image over the first image. I know where the second image should be positioned relative the the 1st image. I can't figure out how to set top and left of the 2nd image to position it over the first. I know I need z-index set higher, but the positioning thing I get it to work. I started with: div id=mymap style=overflow: hidden; height:300; width:300; img class=map style=z-index: 10; / img class=cross style=z-index: 100; / /div I then set the position of the image with jQuery. But this structure seem problematic as the 2nd image is positioned relative to the 1st image and not relative to its parent. OK, so take 2 on this was to use the dimension plugin and get the offset of div#mymap and to set the images position: absolute and to calculate the top and left of the two images to position them absolute. This works great for positioning, but the large map image is no longer honoring its parent's div overflow: hidden attribute. It late and I'm going cross-eyed looking at this. I'm hoping some has a suggestion. Here is a link (ONLY WORKS IN FIREFOX ATM): http://imaptools.com/sm/ click GO it will load a map, the map should be clipped by the 300x300 div #imwin which is set to overflow: hidden I'm guessing this is because overflow:hidden on works when elements are layout in a flow and absolute must take them out of the flow. -Steve ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] image position question
Hi all, I know there has got to be an easy way to do thing but I'm having trouble figuring it out. I have a div that has an image in it and this image is positioned relative to the div based on what I want to look at and this works great so far. Now I want to overlay another transparent image over the first image. I know where the second image should be positioned relative the the 1st image. I can't figure out how to set top and left of the 2nd image to position it over the first. I know I need z-index set higher, but the positioning thing I get it to work. I started with: div id=mymap style=overflow: hidden; height:300; width:300; img class=map style=z-index: 10; / img class=cross style=z-index: 100; / /div I then set the position of the image with jQuery. But this structure seem problematic as the 2nd image is positioned relative to the 1st image and not relative to its parent. -Steve ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] image position question, take 2
Stephen Woodbridge wrote: Hi all, I know there has got to be an easy way to do thing but I'm having trouble figuring it out. I have a div that has an image in it and this image is positioned relative to the div based on what I want to look at and this works great so far. Now I want to overlay another transparent image over the first image. I know where the second image should be positioned relative the the 1st image. I can't figure out how to set top and left of the 2nd image to position it over the first. I know I need z-index set higher, but the positioning thing I get it to work. I started with: div id=mymap style=overflow: hidden; height:300; width:300; img class=map style=z-index: 10; / img class=cross style=z-index: 100; / /div I then set the position of the image with jQuery. But this structure seem problematic as the 2nd image is positioned relative to the 1st image and not relative to its parent. OK, so take 2 on this was to use the dimension plugin and get the offset of div#mymap and to set the images position: absolute and to calculate the top and left of the two images to position them absolute. This works great for positioning, but the large map image is no longer honoring its parent's div overflow: hidden attribute. It late and I'm going cross-eyed looking at this. I'm hoping some has a suggestion. Here is a link (ONLY WORKS IN FIREFOX ATM): http://imaptools.com/sm/ click GO it will load a map, the map should be clipped by the 300x300 div #imwin which is set to overflow: hidden I'm guessing this is because overflow:hidden on works when elements are layout in a flow and absolute must take them out of the flow. -Steve ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] THE List of Sites Using jQuery
Just tried it for the first time, and still has the DB error -Steve Rey Bango wrote: Yep, we're working on the Wiki. Fun, Fun! :o) Give it another go as the page came up for me. Rey... Erik Beeson wrote: Database error From jQuery JavaScript Library Jump to: navigation, search A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was: (SQL query hidden) from within function MediaWikiBagOStuff::_doquery. MySQL returned error 1205: Lock wait timeout exceeded; try restarting transaction (localhost). I'll try again in a bit :) --Erik On 1/16/07, *Rey Bango* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: As promised, I've compiled the list of sites using jQuery and have posted them up to the site. You can see the full list here: http://docs.jquery.com/Sites_Using_jQuery http://docs.jquery.com/Sites_Using_jQuery I've done my best to get everyone that sent me submissions. If I've missed someone, please don't hesitate to buzz me and I'll add your site in. Also, if I've made any mistakes on a site listing, please let me know and I'll get it corrected ASAP. Thanks again for all of the submissions. Rey... ___ jQuery mailing list discuss@jquery.com mailto:discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] OT: Interesting Website Creation tool
http://ajaxian.com/archives/weebly-online-website-creation-tool-using-ajax ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] SVN Broken???
Hi, Just tried to update update svn got the following: svn: No repository found in 'svn://jquery.com' -Steve ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] Strange error message
Hi, I am getting a very strange error message: Node cannot be inserted at the specified point in the hierarchy code: 3 This is using jquery and the blockUI plugin. I assume it is because I'm doing something wrong, but the error message does not point to a line number or anything else. Any thoughts on this? -Steve ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Strange error message
Stephen Woodbridge wrote: Hi, I am getting a very strange error message: Node cannot be inserted at the specified point in the hierarchy code: 3 This is using jquery and the blockUI plugin. I assume it is because I'm doing something wrong, but the error message does not point to a line number or anything else. Any thoughts on this? -Steve OK, figured it out. It was not happy with: var message = $(mesageDiv)[0]; $.unblock(message); I should have typed: $(#mesageDiv) -Steve ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] Using $.blockUI() to make modal dialog
Hi all, I have been using $.blockUI with my ajax and image load events very successfully. Thanks this is a great tool. I need a modal dialog that ask if the user wants to save data or continue without saving. I created a div with two buttons the and click events on them to save or continue. And this works if I do something like: $(function() { $.blockUI($('#dialog')[0]); alert(Hello!); }); The dialog opens, the UI is blocked, and clicking on the buttons works as expected, and the alert is shown after the dialog is dismissed. The problem is that when I move this code into my application blockUI is not blocking. function save_form_data(ask) { console.debug(save_form_data: ask=+ask+, form_dirty=+form_dirty); if (!form_dirty) return; // ask the user if they want to save it if (ask) { // ** this sequence does not block ** console.debug(action_save: calling blockUI); $.blockUI($('#dirtyFormMessage')[0]); console.debug(action_save: returned from blockUI); } else action_save(); } I'm running this mornings svn, FF 2.0.1 and it probably only works in FF. Anyone have some thoughts on this? You can test it here, sorry, it is not nearly as nice as the code I see others generating: http://imaptools.com/sm/ 1) click the GO 2) click on the map image will enter data in IX, IY 3) click NEXT This should bring up a dialog with a SAVE_IT and CONTINUE button that should block until one of the buttons is clicked. -Steve ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Using $.blockUI() to make modal dialog
Yeah, I thought of using that or greybox but I'm already using blockUI and I'm trying to minimize the number of packages that I require. I would also like to understand why the simple test case works but fails when integrated into my application. Is this a bug or more likely a fundamental misunderstanding of how this tool works. For example, reading through the code it is not obvious to me how the function $.blockUI() blocks continued execution of javascript until the ok button is clicked. I know this is done with events, but I'm not seeing the pattern of how this happens. -Steve Christopher Jordan wrote: Try the ThickBox plug-in. It's meant just for that sort of thing. :o) Cheers, Chris Stephen Woodbridge wrote: Hi all, I have been using $.blockUI with my ajax and image load events very successfully. Thanks this is a great tool. I need a modal dialog that ask if the user wants to save data or continue without saving. I created a div with two buttons the and click events on them to save or continue. And this works if I do something like: $(function() { $.blockUI($('#dialog')[0]); alert(Hello!); }); The dialog opens, the UI is blocked, and clicking on the buttons works as expected, and the alert is shown after the dialog is dismissed. The problem is that when I move this code into my application blockUI is not blocking. function save_form_data(ask) { console.debug(save_form_data: ask=+ask+, form_dirty=+form_dirty); if (!form_dirty) return; // ask the user if they want to save it if (ask) { // ** this sequence does not block ** console.debug(action_save: calling blockUI); $.blockUI($('#dirtyFormMessage')[0]); console.debug(action_save: returned from blockUI); } else action_save(); } I'm running this mornings svn, FF 2.0.1 and it probably only works in FF. Anyone have some thoughts on this? You can test it here, sorry, it is not nearly as nice as the code I see others generating: http://imaptools.com/sm/ 1) click the GO 2) click on the map image will enter data in IX, IY 3) click NEXT This should bring up a dialog with a SAVE_IT and CONTINUE button that should block until one of the buttons is clicked. -Steve ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Using $.blockUI() to make modal dialog
Mike Alsup wrote: For example, reading through the code it is not obvious to me how the function $.blockUI() blocks continued execution of javascript ... It doesn't. All blockUI does it put an iframe over the window and capture/discard keystrokes. The idea is to block the user from using the UI until unblockUI is called. Blocking continued execution of javascript would be self-defeating. Yes, you are correct. What I am trying to do is a modal dialog. My page has a form that is updated by user interaction. If the user tries to move on without save the data, I want to pop a modal dialog with a SAVE and CONTINUE button. The SAVE button saves the data and both buttons dismiss the dialog. While the dialog is up, I need the UI blocked. So the simple test case works great, but if I call it directly is does not wait to be dismissed. I'm not entirely sure what you're attempting to do, but one thing you should be aware of is that when you pass a message or DOM element to blockUI it first discards the current message (via empty()) and then adds the new one. So if you plan to use a DOM element be sure to cache it first, like the demo page does. Otherwise the next time you call this: $.blockUI($('#dirtyFormMessage')[0]); jQuery will not find the dirtyFormMessage element. Thanks, I noticed the empty() but didn't pickup on the side effect. -Steve ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Using $.blockUI() to make modal dialog
Mike Alsup wrote: Stephen, I put up a sample page that shows how to use blockUI to display a modal dialog. This may help give you some ideas. http://malsup.com/jquery/block/dialog.html Mike, Thanks! I'm sort of getting it. I think I need to reorganize my code to be less procedural and more object/event driven. Thanks, -Steve ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] help speeding up code
Seems to me that there were some posts a while back about code profiling maybe in firebug that would tell you how many calls you made to what functions and maybe how much time you spent in each function, maybe not this. But this would be the first step to optimizing your code. If you don't know where it is spending all its time then you don't know what to fix. You could also wrap function calls with a timer and log the times to the console. -Steve bmsterling wrote: Hey all, I am working on a project at http://ov.informationexperts.com/test.htm http://ov.informationexperts.com/test.htm and the only issue I am having is the speed of my code. steps to test: 1. create three or more points by click in the grey box area. 2. when finish, dbl click the first point your created to close the box. (at this point there is a second or two delay) 3. At this point you can resize/reshape the box by dbl click and then hold down any of the points. (when you mouse up there will be about a 3 second delay) Scripts being used: jquery w/ debug, dom, dimensions, idrag plugins jsgraphic (http://www.walterzorn.com/jsgraphics/jsgraphics_e.htm) After you do the above test, with firebox and web developer extension, view generated source and you will see all that went on. The jsgraphic script produces a ton of divs to achieve the graphics. It is a great script and would love to convert to jquery and that may speed things up, but would not know where to start. Basically what I need help with is speeding up this app. Thanks, Benjamin Sterling KenzoMedia.com KenzoHosting.com ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Create / access my own DOM element properties with jQuery?
Oliver, Yes an example of what you are trying to do would be great. I have done a lot with my family genealogy and I currently display it using php to layout the pages. One of my future projects is to convert the genealogy application to use jQuery and ajax to build a web2 version of it. http://swoodbridge.com/family/Woodbridge/ -Steve Oliver Boermans wrote: I'll attempt to answer Jake's question because I know the 'why' is often more useful than the 'how'. I am laying out an ordered list as a family tree of sorts. This involves setting the widths on the elements based on their descendants. My current concept for the method requires me to break the chain to repeat it over the whole multi-leveled list (my family tree is rather large!). Repeat below until every ol with no parent ol has 'kids' (or width) set LI -- find every li without 'kids' set in which every immediate child ol has 'kids' set or does not have an immediate child ol compare value of 'kids' of each of its immediate child ol/s set 'kids' on the parent li to the largest value or if there is no immediate child ol set 'kids' to 1 set width of the li to 'kids' multiplied by variable OL -- find every ol (without 'kids' set) inside which every immediate child li has 'kids' set set 'kids' on the ol to the sum of every of its immediate child li 'kids' values set width of the ol to kids multiplied by variable -- When it comes to writing jQuery selectors to match this logic - I expect it may be more practical to test for the widths I'm setting rather than a custom property like 'kids''? $([EMAIL PROTECTED]'width']).parent().not([EMAIL PROTECTED]'width']) I resorted to the property as it can be a number rather than a width value from which I would need to extract a number. e.g. '30em' Seems I've still got a long way to go to get this working! All pointers are welcome! Cheers Ollie 'out of his depth' Boermans On 31/12/06, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote: easy peasy and perfectly logical but what is Oliver's doing? is the attribute assigned to the object and then lost when the current $() is done? it would work from one line to the next, right? ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Fast way to remove duplicate array entries?
Rich Manalang wrote: Anyone know of a fast way to remove dups in an array? The Perl way to do this is to convert the array entries into hash keys and then extract the keys back into an array. This is faster than searching the array and it should work with javascript. -Steve ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Fast way to remove duplicate array entries?
Rich Manalang wrote: It is sorted, but it's an array of objects. Is there a way to hash an object? I guess a better question would be how do you determine object A is equal object B. Because if it is sorted, it would be much faster to walk the array and copy any element that is not the same as the last one you copied. -Steve On 12/20/06, *Christof Donat* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hi, Anyone know of a fast way to remove dups in an array? Is the array sorted? Then you can do function arrayUniq(a) { var rval = [a[0]]; var o = a[0]; for( var i = 1; i a.length; i++ ) if( a[i] != o ) { rval.push (a[i]); o = a[i]; } return rval; } Christof ___ jQuery mailing list discuss@jquery.com mailto:discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] More DOM Query Speed Tests
OK, here is an interesting tidbit. I used the test below and and did the 7 click thing, and out of all my tests except one, the long delay happened in has() and once I got it in find(). has() is pretty simple and I wonder if this has less to do with the number of clicks versus the number of regex's we use and dispose or something like that. I love testing!!! It makes one look at what is happening and sometimes you are surprised! but the questions and introspection are always good on occasion. -Steve Aaron Heimlich wrote: If you want some more detail (and have Firefox with Firebug 1.0 Beta installed), you can head on over to http://aheimlich.freepgs.com/tests/jquery/speed-test-firebug/ http://aheimlich.freepgs.com/tests/jquery/speed-test-firebug/ where I replicated Karl's tests using Firebug 1.0 Beta's script profiling abilities. The results aren't much different from Karl's, but there's still some interesting stuff there like: $(.dialog) does 815 function calls () $('#speech28') does 6 function calls On 12/18/06, *Karl Swedberg* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Thank you for that summary, Jake! And for the stat lesson. :) On Dec 18, 2006, at 11:19 PM, Ⓙⓐⓚⓔ wrote: Since the 7th click is reproducible, and has little to do with the issue, you can discard the value, with a simple note... years of stat classes! conclusions: running thru the whole dom looking for a class is slow. looking for an ID (which should be unique) after getting the tags is worthless. looking for a class after getting a subset of the dom is faster than searching the whole dom. Safari is almost always faster than ff! Just what was expected! GREAT WORK! On 12/18/06, *Karl Swedberg* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hey everyone, I have results of a few more speed tests that I ran this evening at http://test.learningjquery.com/speed-test.htm Method: I clicked 10 times on each query in Firefox 2.0 and Safari 2.0.4 (See HTML source for all code, markup, etc.) I recorded the mode (most common value) and the range of values for each, all in milliseconds. @ FF2 / Safari2 *1. $('#speech28') * - mode: 1 / 1 - range: 0-1 / 0-4 *2. $('div#speech28') * - mode: 43 / 32 - range: 42-59 / 30-35 *3. $('#final-speech div.final-dialog ') * - mode: 5ms / 5ms - range: 4-6 / 3-6 *4. $('#final-speech .final-dialog')* - mode: 6 / 5 - range: 5-8 / 3-6 *5. $('div.final-dialog')* - mode: 55 / 40 - range: 28-253 / 40-45 *6. $('.final-dialog')* - mode: 101 / 51 - range: 83-306 / 51-68 *** Note that queries 5 and 6 have huge ranges in Firefox because of the mysterious seventh click issue. Looks like these tests confirm what we've all been saying on this list about the relative speed of various selectors. This has been a fascinating exercise. I'd love to hear people's analysis, etc. --Karl ___ Karl Swedberg www.englishrules.com http://www.englishrules.com www.learningjquery.com http://www.learningjquery.com ___ jQuery mailing list discuss@jquery.com mailto:discuss@jquery.com http://jquery.com/discuss/ http://jquery.com/discuss/ -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ ___ jQuery mailing list discuss@jquery.com mailto:discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com mailto:discuss@jquery.com http://jquery.com/discuss/ -- Aaron Heimlich Web Developer [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] http://aheimlich.freepgs.com http://aheimlich.freepgs.com ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] JQuery driven site
Very nice. I tried (check all) and Sort by Most Downloaded then Search and got Bad Request (Invalid URL) FF2 on WinNT I like the nice style and use of effects. -Steve Stefan Holmberg wrote: fellows, Finally my first JQuery driven site has been released - http://www.findfreefonts.net . To start by presenting myself - I try to spread the word about JQuery in the ASP.NET world - through my site http://www.aspcode.net/articles/l_en-US/t_default/ASP.NET/ASP.NET2.0/Ajax/category_61.aspx cause the fact is that JQuery has become my JS toolkit choice - and not MS ASP.NET Ajax (formally Atlas).. Anyway, a little nervous cause I'm pretty new/lame when it comes to client side programming - but http://www.findfreefonts.net is my new the JQuery driven site. You might want to take a look, I thought (maybe you get an dns error today, I registered the domain today but found that it resolved instantly - at least for me...) Am using the cssRadio/cssCheckbox plugin, cookie plugin, hovertip etc. I know it doesn't look all right in Firefox etc, but hey, I need something to do waiting for Santa... Just wanted to thank you - and if you look at the site and find some abvious errors/stupid things - please let me know... /Stefan ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] jquery session handling versus PHP
Kim Johnson wrote: Currently I use PHP's built in session functions to handle ensuring users are logged in, etc. It doesn't work correctly a small percentage of the time, but is robust as far as being able to use the $_SESSION array and other such things. Now that I'm starting to use a bunch of jquery stuff, I'm interested in knowing if there's anything comparable. I hate troubleshooting why sessions aren't working so I'd like something more reliable. I noticed there's a cookie plugin for jquery but it seems to just do basic things. Is there anything comparable to PHP's system in jquery, or should I just stick with PHP? Sessions are in large part because HTTP applications used to be stateless and it was the only way to write an application that had flow. In that world the application lived on the server and the browser was just a presentation window. With Javascript and AJAX the application can move into the browser so all the state information is maintained there and then it can request services via AJAX from the server. Services might be: Authentication Service Information requests Data storage requests etc Your data storage services might store application data, application state data, etc. In many ways this is what might have been stored in a persistent session. You could use php servlets to implement the services. Similar ideas, but different way of decomposing the application into components. Smaller modular components foster reuse. -Steve ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] NEWS: Meet The People Behind jQuery
Hey this is cool! Little did I know the John is also in Massachusetts! Hi John, I'm in North Chelmsford! Sometimes out there on the web is just around the corner! It is great to see all the work and effort that is going into jQuery and toward promoting it. Keep it up guys! Great work. -Steve Rey Bango wrote: Some big changes have been going on in an effort to better organize the jQuery project as well improve the user experience and extend the project's visibility. John has done quite a bit of legwork and broken out the project team into dedicated groups that will help promote the effort on many different fronts. Be sure to check out all of the details at the jQuery blog: http://jquery.com/blog/2006/12/18/meet-the-people-behind-jquery/ Rey ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Optimizing DOM Traversal
You guys have fast machines! I get 47-63 on $(.dialog) with the 7th being 172 ms. I guessing, but I think the 7th click is also triggering some garbage collection. Running FF 2.0 on WinNT. -Steve Ⓙⓐⓚⓔ wrote: I ran your test in ff 2, very similar numbers, including the 7 click silliness !! (your machine is a little faster than mine). But in Safari, all the queries were approximately the same! and No every 7 click problem! On 12/17/06, *Karl Swedberg* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Ok, so I put together a little test page at http://test.learningjquery.com/speed-test.htm http://test.learningjquery.com/speed-test.htm I run the following queries, using .click() and checking the difference between the time they start and the time they end (on FF2 Mac): $(.dialog) $(div.dialog) $(div).filter('.dialog') There are 49 DIVs with class=dialog on the page. $(.dialog) averages ~30 milliseconds $(div.dialog) and $(div).filter('.dialog') usually clock in around 19-20 milliseconds The first one to be clicked typically takes about 10ms longer than subsequent clicks on it. Here is the really weird part: On every 7th click, the query will take 70 - 85 milliseconds, no matter which one is clicked or what the order is. I figure there must be something really stupid about the way I'm doing this. All the code is in the head, so feel free to take a look, and if it's really dumb, post to the list and let everyone know to disregard these numbers. If it's not so dumb and someone wants to test it on another system/browser, I'd be interested to hear what your results are. --Karl _ Karl Swedberg www.englishrules.com http://www.englishrules.com www.learningjquery.com http://www.learningjquery.com On Dec 17, 2006, at 8:48 PM, Stephen Woodbridge wrote: I seem to remember seeing that post also and having done a lot of testing in other jobs it is easy to make tests the are not representative, misleading, or distort reality, etc. However this is not an excuse for not developing tests, it should be just a caution that you need to be aware of what you are measuring. Having some standard tests that compare different searches using some standard, that ever that might be, complexity pages, may not reflect real-life queries, but it would give us some standards to compare against from version to version and if we find cases that are not well represented then we can add more cases. My $.02, -Steve Karl Swedberg wrote: I'd like to see some real benchmarks on this, too. Is it possible to rig up the test suite to do something like that? On the other hand, won't the speeds (and the respective difference in speeds) depend to some extent on the complexity of the page? I seem to recall having read a pretty convincing argument by someone on this list (Michael Geary maybe?) about the unreliability of speed benchmarks, but I could be confusing it with some other loosely related matter. --Karl _ Karl Swedberg www.englishrules.com http://www.englishrules.com www.learningjquery.com http://www.learningjquery.com On Dec 17, 2006, at 6:51 PM, Sam Collett wrote: Has anyone done any benchmarks to compare the speeds of using different expressions? Like how much faster $( a.myclass) is than $(.myclass) and the difference, if any, between $(a).filter(.myclass) and $(a.myclass) etc. ___ jQuery mailing list discuss@jquery.com mailto:discuss@jquery.com http://jquery.com/discuss/ -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Jobs and tasks at getJquery.org
Hi, GetjQuery.org looks great, but it is missing the most important thing! It needs a prominent [GetjQuery] or [Download] link to get jQuery. The rest only matters after I can Get It :) Thanks for your efforts. Great start! -Steve digital spaghetti wrote: Hey folks, I'm pretty happy with the setup over at http://getjquery.org now - I have groups up and running (so working groups can be created), buddy lists for the social element and a few other cool things so go check it out. Apologies for the length of this email also, but I'm typing this as I travel and just commiting my thoughts to email. Below are some on my thoughts on what to do next, you can contribute on-list, or feel free to start editing the wiki (http://getjquery.org/wiki) Now that this initial stage is running, I want to begin work on other parts. The first thing is the design. I'm torn between blog news style on the front page so it's more dynamic, or go with a static front page more like http://getfirebug.org that leads off in to other areas. The site will (hopefully) eventually be rather large with lots of user generated content, so I'm wondering if a best of both worlds could be done with this - say top half of the page static to content, and the bottom half dynamic content like latest news, latest blogs, latest tutorials, etc. The beauty of drupal is that each part of the site can easily have different layouts and styles that correspond to the data being presented. The next part is moderation and localisation. The primary language of the site will be english, but certainly I'd like to present it in other languages. Already the first french blog post has been made and the author is on board for helping make some translations. What are the other main languages that should be focused on (german, chinese, japanese, scandanavian and eastern european langauges)? Regarding moderation, I would be looking for people to help moderate incoming content. Most content types are available to registered users, such as stories, blogs, Book pages, groups, podcasts, etc. Blogs are the only content type that do not go in to a moderation queue (possibly book pages too, I'll have to double check). For all other types, I'd like to have some respected people on board who can moderate the content, and decide if something needs to be rejected (spam, buggy code, self-gratifying posts), accepted (most posts) or promoted (something so good, everyone and their dog needs to know about this via the front page). Finally for roles, there are developers - these are the people who will actually help build the site - they will be able to access the server to install and modify things, it's a bit too much for little ol' me to do all of it. If you want to help, then contact me and let me know. Make sure you sign up to the site and wiki. I'll soon be setting up a closed mailing list for core people who want to help so there is less clutter in this one. Regards, Tane Sent from my Blackberry, forgive the grammar and spelling. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Efforts to Convert Folks to jQuery
In spite of my suggestion for the tag line jQuery: puts the fun back in JavaScript! I think we should be very careful about be negative about JavaScript, after all it is the language we are working in. My line was meant more to reflect that fact the programming cross browser DOM stuff in JavaScript is really painful and not fun. jQuery has made it fun! Sure there are lots of other libraries that support cross browser scripting, but they tend to be more obtrusive, heavy handed and in your face. jQuery lets you focus on what you need to do. It is simple and elegant and if you don't looks for it, it almost doesn't seem to be there. It is all about the DOM and making is accessible. -Steve Marc Jansen wrote: What about jQuery: try today - stay forever, jQuery: JavaScript as it was meant, jQuery: efficient yet creative -- Marc Christopher Jordan schrieb: Yeah, but we probably don't want to slam other projects. That seems kinda like bad sportsmanship or bad geekmanship or something. Doing something like that may alienate more folks that it attracts. :o/ Cheers, Chris Edwin Martin wrote: jQuery: past prototype. I like the double meaning of it. Edwin Martin Christian Bach wrote: jQuery, duty now for the future :) Pje wrote: jQuery, the way that javascript should be. Just my 2 cents. :) On 12/8/06, Luke Lutman [EMAIL PROTECTED] wrote: Solid Source wrote: 1. Change the slogan New Wave Javascript to something more along the lines of explaining what it does or how it does it rather than what it is. Everyone thinks they are new wave right? :) How about: jQuery: The JavaScript Swiss Army Knife. I like the associations a Swiss Army knife has: - small lightweight - handy - does lots of stuff - can have all sorts of attachments (plugins) Luke ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] input type checkbox
Brandon, Dave, Thank you for the summaries. We have had a LOT of discussion about 1.1 over the last month+ and maybe it is time to create a wiki page the keeps a running list of decisions and issues. Links to bugs would be cool also. This would be really good for all. I would avoid rehashing a lot of stuff on the list because we could point people to a roadmap page and it would help others that are coding now so they are aware of changes that will be forth coming. Just a thought for a guy that has trouble keeping it all in his head :). -Steve Brandon Aaron wrote: On 12/7/06, Dave Methvin [EMAIL PROTECTED] wrote: I think the outcome of the past month's discussion was this: 1) .val() will be dead in jQuery 1.1, as will all of the macro properties. 2) It's easy to get the value of a non-input element with .attr(value). 3) Mike Alsup added fieldValue to the form plugin to get the value that would be used for the element if the form was submitted. Once .val() is well and truly dead, you can include the form plugin and create a custom .val() that uses fieldValue. Not all macros are being removed in 1.1. There has been some confusion about this but some macros are too highly used to be removed from the core, even to a plugin. The .val() macro happens to be one of those that are highly used ... but lets not get back into the 1.1 discussion just yet. -- Brandon Aaron ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Efforts to Convert Folks to jQuery
I kind of like: jQuery: puts the fun back in JavaScript! [huge snip] ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Attention Please
I think you will need to put together a simple? demo page that show the behavior you are describing. There is no way yo guess what might be going wrong. It might be a bug you are running into, it might be that you are not using something as intended, or any other number of things. -Steve Acuff, Daniel (Comm Lines, PAC) wrote: I have attempted to bring this up in the past but did not get any response. Which is amazing since this is such a huge issue. I *could* be doing something incorrectly, so please if so, I want to be corrected. One of the reasons for no-response a couple months back *MAY* be due to the complicated matter and it is hard to put into words to describe what is happening. I will try to make it clear. I am NOT a good jquery coder, just barely a newbie. So say for example I am doing a simple border on image hover. I believe this much of an example will suffice? I am relying on .ready, using IE 6.0.28 $(document).ready(function(){ $(img.helpIcon).hover( function() { $(this).addClass(jsHover); }, function () { $(this).removeClass(jsHover); }); // $(.frmElement).focus(function(){ $(this).addClass(selected); }) .blur(function(){ $(this).removeClass(selected); }) }); In my case I am displaying say 100 rows with an Icon at the start of each row, that when you hover over changes the border color. THE PROBLEM: Sometimes not 100% either way, the code will stop, and say only the first 50 rows have the DESIRED jQuery feature/hover. Something happens where any given amount CAN FAIL. And you will NOT see the results on all or some of the jquery effect. As most of you have been developing as long or longer than I, 10 years, you KNOW we cannot even allow a 1% failure rate. What can be done? How is everyone getting 100% accuracy and I am seeing effects fail? If you refresh more than a couple times you can usually see where the effect fails. This is a HUGE concern as it means I cannot role out using jQUERY to do ANYTHING important until I *learn* / find out what causes an effect to fail. Another example is is I use JQUERY to say color divs in a dynamic menu I built. Say the first 3 columns/tabs of the horizontal menu do the effect perfectly, I hover over a choice and jquery colors it from white to blue say. But all the sudden if you go to tab 5 the jquery effect is not working!! I told you this is hard to put into words, can anyone help me? * This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential and/or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this communication and destroy all copies. * ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] [OT] Firefox 2.0 Annoying Errors
Hi all, I recently upgrade to Firefox 2.0 and I get the following annoying error message on basically every request. [Exception... Component is not available nsresult: 0x80040111 (NS_ERROR_NOT_AVAILABLE) location: JS frame :: file:///C:/Program%20Files/Mozilla%20Firefox/components/nsSessionStore.js :: sss_saveState :: line 1688 data: no] This has nothing to do with jQuery, but I'm hoping that some of you might have seen this and figured out how to make it go away. I have googled for it, but nothing helpful showed up. Any ideas? Thanks, -Steve ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] [OT] Firefox 2.0 Annoying Errors
Ⓙⓐⓚⓔ wrote: not jquery. I get a bunch of errors each time I start up ff 2... they don't recur. do yours? Yeah this error occurs with every page load of ajax transaction. It fills up firebug with errors. Very annoying. -Steve On 11/25/06, Stephen Woodbridge [EMAIL PROTECTED] wrote: Hi all, I recently upgrade to Firefox 2.0 and I get the following annoying error message on basically every request. [Exception... Component is not available nsresult: 0x80040111 (NS_ERROR_NOT_AVAILABLE) location: JS frame :: file:///C:/Program%20Files/Mozilla%20Firefox/components/nsSessionStore.js :: sss_saveState :: line 1688 data: no] This has nothing to do with jQuery, but I'm hoping that some of you might have seen this and figured out how to make it go away. I have googled for it, but nothing helpful showed up. Any ideas? Thanks, -Steve ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] [OT] Firefox 2.0 Annoying Errors
Michael Geary wrote: This has nothing to do with jQuery, but I'm hoping that some of you might have seen this and figured out how to make it go away. I have googled for it, but nothing helpful showed up. not jquery. I get a bunch of errors each time I start up ff 2... they don't recur. do yours? Did you try this: Uninstall FF2, kill any remaining Firefox processes in Task Manager, and reinstall FF2. I had a bunch of problems when I upgraded and that fixed them. One of the other problems I had was missing bookmarks, which led me to this page where I found the reinstall tip: http://kb.mozillazine.org/Lost_bookmarks Thanks Mike and Jake. I will try the uninstall and reinstall. Sounds like that might help. I had thought of doing just that, but it seemed a little heavy handed but hey, if it works that would be great. -Steve ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] jQuery 1.1 by the end of Nov
Jörn Zaefferer wrote: jQuery documentation should clearly illustrate which base / core jQuery is required and dependencies should be illustrated in a clear manor. I think the php pear site exemplifies this, i think this is mostly covered but could be a touch clearer. PHP PEAR is a bad example: In most cases you won't care about 5 or 50 additonal php files on your server, but you can't do this with js files. I think the recommended/custom way is a good approach: API documentation and tutorials are all written with the recommended version as their base. When a single plugin has dependencies on another plugin, it must be explicitly stated somewhere. A package/requires system that automatically resolves those dependencies would be nice, but I don't think this should have a high priority. I would agree with Jörn, and expand that I think we need to require plugins include a: @Requires: blahblah.js[, version: 29+] @Requires: morestuff.js We are rapidly getting a large number of plugins and more and more of them seem to be using other plugins which is really good. This will help users figure out what plugins and versions they might need and it will supply the info needed for some future package system to figure this out also. -Steve ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] API docs draft 2
Jörn Zaefferer wrote: Hi folks, it's update time, take a look for yourself: http://fuzz.bassistance.de/api-draft/cat.xml The position:fixed hack for IE is implemented, but still a little fuzzy. Good thing: The complete API is bookmarkable across browsers. So far it's tested on FF 1.5, Opera 9, IE 6. Things that are not in there because they don't quite run as they should: Including the history plugin caused the page to eat my processor, not nice. I was unable to get the quicksearch plugin working on the navigation. Klaus: Could you please commit the history plugin? In addition, the tabs are not properly initiated, couldn't figure out what the problem was. When I click the first time on one of the tabs, the other gets hidden, but not before then. I hope to get some help from Rik with his quicksearch plugin. Jörn, Very nice! Would it be possible to set the style for #nav to hidden for printing, so the nav links and panel are gone? That would be very cool. Thanks for putting a lot of work into this. It really looks good! -Steve ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] jQuery support for namespace attributes
Klaus Hartl wrote: Stephen Woodbridge schrieb: Jörn Zaefferer wrote: I understand the CSS selector and have read the other thread but a true namespace selection based on xpath syntax doesn't work. As for writing a plug-in, I believe the issue could be corrected with a change to a regular expression. But, reg exps are, by their nature, difficult for me to tinker with, and I can't figure out which regular expression is used for node and attribute filtering. I asked about this back in September and am asking again because I believe better xpath support would improve jQuery's handling of xml docs as well as xhtml pages. The problem: Mixing XPath and CSS selectors is very limited. And as more users of jQuery are familiar with CSS then XPath, there is much more support for CSS then XPath. To fully support XPath you have to remove a lot of CSS selectors. Or escape the expression so we know it is explicitly XPath, or provide a separate function that is dedicated to XPath. -Steve This fits into the What to strip out for 1.1 discussion, I assume. I only use XPath when traversing through XML documents, so maybe XPath support could go into a plugin as well. I think this was discussed before... Yes agreed, not in 1.1, but definitely needed in future and a plugin would be fine for me. -Steve ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] new jQuery API draft
Jörn Zaefferer wrote: One suggestion, I really love in the php documentation: it should be possible to add user comments to every navigation point. I think, that such a feature is very helpful. It's true that the comments in the PHP documentation are very helpful. I wonder if it would be better to add a discussion system that results in improving the actualy documetantion. Anyway, it would be nice to have a comment system in the API, but it is currently out of the scope and not that easy with XML/XSTL only :-) If we had a database or used flat files, then an Ajax call could be used to fetch or update the comments on the backend. I'm just thinking out loud ... :) ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] jQuery 1.1 by the end of Nov
I think that it would be great if we had a few bundled flavors like: jQuery-minimal.js jQuery-lite.js jQuery-standard.js jQuery-heavy.js This way we get the benefit of claiming all the features and can claim starting at only xx bytes based on the packed size of the minimal flavor. Providing a other flavors makes it easy for uses to grab a package of features without having to deal with build issues. -Steve John Resig wrote: Hi Everyone - I want to start a discussion about the features that should go into (or be removed from) the upcoming 1.1 release. I'd like to shoot for a release by the end of this month. I know that Joern already has some event code, ready to be committed - and I have the non-destructive jQuery code ready to go. Brandon mentioned that he wants to rewrite the jQuery.attr() in time for release too. No significant features are going to be added to this release, think of it as jQuery 1.0++. Right now, the jQuery compressed build is teetering around 18-19KB, I really want to try and cut this down. Any thoughts on particular features that should be extracted into a plugin? For example: Since the 'form' plugin already does serialization really really well (much better than jQuery's serialization). I'm tempted to remove the serialization plugin from core and just defer everyone to using the form plugin. Also, stuff like .height() and .width() could be removed in favor of using the (more powerful) methods of the same name in the 'Dimensions' plugin. Let me know if you have any ideas. --John ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] jQuery 1.1 by the end of Nov
John, That is why I think some prepackaged packages might work better in the short term. Longer term we might want to have plugins define a requires statement so that is would be easier for a build system to pull in all the required modules. -Steve John Resig wrote: I'm all for the custom build feature - in fact it was one of the first things included on the jQuery home page when it first launched back in Jan. (I removed it at the 1.0 launch, because it was broken). My biggest worry about having custom builds is that if a user sees something in the documentation (e.g. .height()) and then it doesn't work at all, that'll cause a lot of confusion. Figuring out what package everything is in. It is for this reason that I think any sort of package system has to be documented very explicitly so that people know what they're getting in to. This would also require that all demos, tutorials, and plugins use the lowest comon denominator of code (which will require a lot of rewriting). In all, it's very tricky, and something that we'll want to consider carefully. --John On 11/14/06, Stephen Woodbridge [EMAIL PROTECTED] wrote: I think that it would be great if we had a few bundled flavors like: jQuery-minimal.js jQuery-lite.js jQuery-standard.js jQuery-heavy.js This way we get the benefit of claiming all the features and can claim starting at only xx bytes based on the packed size of the minimal flavor. Providing a other flavors makes it easy for uses to grab a package of features without having to deal with build issues. -Steve John Resig wrote: Hi Everyone - I want to start a discussion about the features that should go into (or be removed from) the upcoming 1.1 release. I'd like to shoot for a release by the end of this month. I know that Joern already has some event code, ready to be committed - and I have the non-destructive jQuery code ready to go. Brandon mentioned that he wants to rewrite the jQuery.attr() in time for release too. No significant features are going to be added to this release, think of it as jQuery 1.0++. Right now, the jQuery compressed build is teetering around 18-19KB, I really want to try and cut this down. Any thoughts on particular features that should be extracted into a plugin? For example: Since the 'form' plugin already does serialization really really well (much better than jQuery's serialization). I'm tempted to remove the serialization plugin from core and just defer everyone to using the form plugin. Also, stuff like .height() and .width() could be removed in favor of using the (more powerful) methods of the same name in the 'Dimensions' plugin. Let me know if you have any ideas. --John ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Alternative tooltip, with shadows...
Jörn Zaefferer wrote: Hey Rey! So I was planning on using Jorn's tooltip plugin, but my client nixed it saying that he wanted something that looked more like this: Not sure how difficult this would be but let me know if you get this done Andy as it would VERY cool. We already solved that. Checkout the updated demo, the fourth example features a nice shadow: http://jquery.bassistance.de/tooltip/tooltipTest.html Jörn, Very nice Jörn! I'll definitely be using these. A bug on the forth example is that on ff 1.5 the the tool tip is displayed at the bottom of the page and some of the tool tip extends below the bottom of the page and adds a scroll bar to the page. There is no way to scroll down to see the tools tip. Now that I write this I think this was discussed previously on the list, but I'm not sure. Anyway, tool tips the extend off the currently viewable window need to be repositioned to be totally in the viewable region, unless they are too big to do that, then I guess you have to just let them overflow. I love the work you do, it is always very clean and stylish. Thanks, -Steve ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] OO programming is confusing to old functional programmers
OK, How much of this is right? jQuery.Map = { // this is a public global attribute? // ie: global across all instances of jQuery.Map whatever : null, // a public function init : function(options) { // this is the jQuery search collection // self is a private pointer to the collection var self = this; // another private variable scoped to the function var _maph = 0; // an public attribute, accessed via $(#map).Map._maph this._maph= 0; // a method, accessed via $(#map).Map.recenter(x,y,dxy) this.recenter = function(x, y, dxy) { console.log(calling recenter()); }; return this.each( function(options) { // this is each respective object in the collection // this is a DOM object not a jQuery object // here I can modify the DOM, bind events, etc }; }; // This extends jQuery with my plugin jQuery.fn.extend( { Map : jQuery.Map.init } ); // I access my plugin via: $(#myMap).Map({ options hash }); // later I can access a public function on this object like: $(#myMap).Map.recenter(x, y, dxy); Is this right? I probably have some terminology mixed up. -Steve ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] OO programming is confusing to old functional programmers
Michael Geary wrote: I don't think this approach will work quite the way you'd like. In your example: // I access my plugin via: $(#myMap).Map({ options hash }); // later I can access a public function on this object like: $(#myMap).Map.recenter(x, y, dxy); Those two $(#myMap) calls are going to result in different jQuery objects. How does the recenter() method know it applies to the Map object you created earlier? This is what I'm having trouble understanding. So it sounds like Map object is not getting attached to the DOM object be to the jQuery object that the DOM object is wrapped in. So if you later search for the same DOM object, the jQuery result does not contain the Map. OTOH, you could easily get this to work: // Create a map object for an element var map = $(#myMap).Map({ options hash }); // later I can access a public function on this object like: map.recenter(x, y, dxy); So I need to save the instance I create an then work on that. But before I make any more specific suggestions, does your Map object always relate to a single map as in your example, or could one Map object relate to multiple maps, e.g. // Get a Map object that controls every map with class anyMap var maps = $('.anyMap').Map(); // Recenter all the maps maps.recenter( x, y, dxy ); It is conceivable that there will be multiple maps on a page and you might want to recenter them all or not. I will also want to be about to create a map and pass it to another map as a dependent map where it will get control by its owner. For example create a small overview map the shows the world and as the large map is zoom, it will tell the small map to display a rectangle showing its current extents. So ideally, I want a map object that I can attach to a DOM or jQuery object, that will expose some public methods. I then will have other controls on the page, that will manipulate the map object via these public methods. The map will be interactive based on events, like dragging the map, or selecting navigation tools on the map, or clicking or double clicking on the map, etc. I'm hoping to use other jQuery plugins for building this, like interface Resizable and Dragable, etc. I have a beasic shell I have started coding, but it has my head spinning. http://imaptools.com:8081/jmap/test.html I want to refactor/rewrite from scratch the mapping used in this: http://imaptools.com:8081/map/demo.html -Steve -Mike From: Stephen Woodbridge OK, How much of this is right? jQuery.Map = { // this is a public global attribute? // ie: global across all instances of jQuery.Map whatever : null, // a public function init : function(options) { // this is the jQuery search collection // self is a private pointer to the collection var self = this; // another private variable scoped to the function var _maph = 0; // an public attribute, accessed via $(#map).Map._maph this._maph= 0; // a method, accessed via $(#map).Map.recenter(x,y,dxy) this.recenter = function(x, y, dxy) { console.log(calling recenter()); }; return this.each( function(options) { // this is each respective object in the collection // this is a DOM object not a jQuery object // here I can modify the DOM, bind events, etc }; }; // This extends jQuery with my plugin jQuery.fn.extend( { Map : jQuery.Map.init } ); // I access my plugin via: $(#myMap).Map({ options hash }); // later I can access a public function on this object like: $(#myMap).Map.recenter(x, y, dxy); Is this right? I probably have some terminology mixed up. -Steve ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Overlib in combination with drag-n-drop from interface
Barry Nauta wrote: Or perhaps there is a way to have (optional) sticky tooltips in jQuery? That is the reason why I use overlib On Friday 10 November 2006 11:07, Barry Nauta wrote: Has anyone used the overlib libraries in combination with interfaces' dnd libs? I have some rows in a table (overlib hover of the name gives a popup with more details) and these rows can be dragged to a trashbin. When this happens, the overlib library goes insane telling me that the event (related to a mouseout event) does not exist. Sounds like someone needs to write a postit note plugin that can also be used for tool tips. For tools tips the postit would not be editable. For regular postits you would be able to add your own text to the postit and edit its content. -Steve ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Help: Trying to write my first plugin and its not trivial
Jörn Zaefferer wrote: Stephen Woodbridge schrieb: Hi all, I'm trying to write my first plugin and I'm having some conceptual problems on how to organize stuff and getting my head wrapped around this. The plugin will be for turning a div into an interactive mapping application. Just a quickie: Why don't you integrate the Resizable into your Map method? Makes coding it way easier. Ah, you mean load it like normal, but directly call jQuery.Resizable.whatever() directly. Yeah, I can do that. Like I said, getting over the initial duh! thats obvious stuff is hard sometimes. Working with a plugin for use to manipulate DOM objects has a pattern, but using a plugin inside of another plugin does not seem to be same pattern. Another point: To interact from other controls with your Map, you may want to hijack jQuery's event system, using bind, trigger and some wrapper methods. I did just that in my latest accordion update, it works very well and elegant: http://joern.jquery.com/accordion/accordion.html The intersting part is at the end here: http://joern.jquery.com/accordion/jquery.accordion.js $.fn.activate calls trigger, which calls an event handler that was registered via bind. Because the actual handler is defined inside the plugin method, I don't have to pass around tons of variables, they are all in one closure. Yeah that is cool, I can probably make use of that. Hope that helps somehow. Yeah, helps a bunch. I'm just trying to get my head around the problem to do this in a jQuery-ish way. Once I have worked through a few of these conceptual problems, I'll start coding otherwise it will be a total hack job instead of only a partial hack job ;) Thanks, -Steve ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] new jQuery API draft
Jörn, Very nice! and oh so close to what I want. Can you add a print link that will render the right panel only for printing? It would be nice it it could be printed in either aphabetical or catagory order. Please, please, please! Pretty please! -Steve Jörn Zaefferer wrote: Hi jQueryians, I'd like to present you a first draft for a new stylesheet for the jQuery API: http://joern.jquery.com/api-draft/cat.xml There is still lot's of work to do, but the main concern, a new concept for the navigation, is already functional. Both Alphabetical and Category lists will be provided as exapandable trees. Please don't waste your time checking it with IE, the draft works so far only with Firefox. Please post your opinions and ideas, I'm sure there are many. Regards Jörn ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] conflict between jtip and thickbox
Olivier Percebois-Garve wrote: Hi I'm trying to implement jtip on a page where I have already implemented the thickbox, both on a elements. Apparently the saveTitle function is not being called. Any thoughts ? In javascript I really miss not to have a print_r() function to debug. Often I use alert() and innerHTML in order to see what I am manipulating, but here with objects, I don't know how to debug... Here, just rename this function to print_r() // function to dump contents of an object var MAX_DUMP_DEPTH = 10; function dumpObj(obj, name, indent, depth) { if (depth MAX_DUMP_DEPTH) { return indent + name + : Maximum Depth Reached\n; } if (typeof(obj) == object) { var child = null; var output = indent + name + \n; indent += \t; for (var item in obj) { try { child = obj[item]; } catch (e) { child = Unable to Evaluate; } if (typeof(child) == object) { output += dumpObj(child, item, indent, depth + 1); } else { output += indent + item + : + child + \n; } } return output; } else { return obj; } } ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] does jQuery has support for parameter handling ?
Does decodeURIComponent() support character encoding character sequences? %F6 looks like an accented character, if you remove this does it work? That might give you a clue to the problem or what to search for. -Steve Truppe Steven wrote: Mark Gibson schrieb: Javascript has the functions: decodeURI(s) and decodeURIComponent(s) I get a string like this: Stumpf+einer+Palme%2C+ausgeh%F6hlt%2C+geschliffen+und+mit+Perlmutteinlegearbeiten+verziert If this string is inside the variable test and i do: var newtest = decodeURIComponent(test); I get the error malformed URI sequence. I've looked documentation on http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference but there i don't see much about that function... Thanks for the fast reply! What am i doing wrong ? best regards, Truppe Steven ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] Help: Trying to write my first plugin and its not trivial
Hi all, I'm trying to write my first plugin and I'm having some conceptual problems on how to organize stuff and getting my head wrapped around this. The plugin will be for turning a div into an interactive mapping application. So, I will start with something like this: $(document).ready(function(){ $(#map).Resizable( { onStop: function(dir) { this.Map.resized(); }, ... } ).Map( { // initialize a bunch of stuff cgi: /cgi-bin/mapserv, fullExtent: [-160.0, -60.0, 15.0, 75.0], toolPosition: right, tools: [zoomExt, zoomWin, zoomIn, zoomOut], onDblClick: function() { ... }, ... resized: function() { width = parseInt(jQuery(this).css('width')); height = parseInt(jQuery(this).css('height')); ... }, reCenter: function(x, y, dxy) { // recenter the map } } ); }); Ok, so here are the questions: I'm not sure how the Map() and the Resizable() interact or if they can? How do I get the onStop of the Resizable package to propagate to the Map package? In general, the Map package will run based on events that happen in the #map div, but what I can't figure out is how to to effect changes in the map when the user interacts with other controls on the page. Oh, I think I get it, if I add the reCenter function above, then can I later access it via: $(#map).Map.reCenter(x, y, dxy); Is this right? That initial call binds the Map() to the DOM object and later I can access it like this? -Steve ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] New Plugin: Resizeable
Mark Gibson wrote: Stephen Woodbridge wrote: Mark Gibson wrote: I've not had chance to test it, but I'm sure all elements have a resize event. If not then the resizeable plugin can trigger() it itself. Hi Mark, I tried to do this like this: $(document).ready(function(){ $('#resize_map').Resizeable( { minHeight: 100, maxHeight: 700, minWidth: 100, maxWidth: 800, handlers: { se: '#resize' } } ); $(#resize_map).bind('resize', function(e) { alert(resized event); }); }); But no event fires :(, I have also tried: $(#resize_map).resize(function(e) { alert(resized event); }); $(#resize_map).trigger('resize'); does force the event to fire. I can add the trigger('resize') to the resizable plugin, but it seems like it should just fire. Any other thoughts? Steve, After a quick flick through JavaScript, The Definitive Guide and a few online docs, it seems that the resize event only applies to window size changes. So you'd have to manually trigger the event. Also, I've noticed that trigger appears to be broken for IE in the latest jquery download r501! - but is fixed in SVN. BTW, you can just chain the bind: $('#resize_map') .Resizeable({ ... }) .bind('resize', function(e) { alert(resized event); }); Gilles, Thank you for you note about the rename in svn. Mark, I have made a little progress, reading the plugin and looking at the demo I found that: $(document).ready(function(){ $('#resize_map').Resizeable( { minHeight: 100, maxHeight: 700, minWidth: 100, maxWidth: 800, handlers: { se: '#resize' }, onResize: function(size, position){ console.log(size.height + 'x' + size.width + resized); }, onStop: function(){ alert(We have finished resizing!); } } ); }); This will fire on every mouse move. This is very cool, but is not what I want. I need just a single final event fired when the resizing is done so I can update the map with its new size and have it request an new image from the sever. The code looks like it has an onStop: function(){} option but I could not get that to fire. -Steve ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] New Plugin: Resizeable
Stephen Woodbridge wrote: Mark Gibson wrote: Stephen Woodbridge wrote: Mark Gibson wrote: I've not had chance to test it, but I'm sure all elements have a resize event. If not then the resizeable plugin can trigger() it itself. Hi Mark, I tried to do this like this: $(document).ready(function(){ $('#resize_map').Resizeable( { minHeight: 100, maxHeight: 700, minWidth: 100, maxWidth: 800, handlers: { se: '#resize' } } ); $(#resize_map).bind('resize', function(e) { alert(resized event); }); }); But no event fires :(, I have also tried: $(#resize_map).resize(function(e) { alert(resized event); }); $(#resize_map).trigger('resize'); does force the event to fire. I can add the trigger('resize') to the resizable plugin, but it seems like it should just fire. Any other thoughts? Steve, After a quick flick through JavaScript, The Definitive Guide and a few online docs, it seems that the resize event only applies to window size changes. So you'd have to manually trigger the event. Also, I've noticed that trigger appears to be broken for IE in the latest jquery download r501! - but is fixed in SVN. BTW, you can just chain the bind: $('#resize_map') .Resizeable({ ... }) .bind('resize', function(e) { alert(resized event); }); Gilles, Thank you for you note about the rename in svn. Mark, I have made a little progress, reading the plugin and looking at the demo I found that: $(document).ready(function(){ $('#resize_map').Resizeable( { minHeight: 100, maxHeight: 700, minWidth: 100, maxWidth: 800, handlers: { se: '#resize' }, onResize: function(size, position){ console.log(size.height + 'x' + size.width + resized); }, onStop: function(){ alert(We have finished resizing!); } } ); }); This will fire on every mouse move. This is very cool, but is not what I want. I need just a single final event fired when the resizing is done so I can update the map with its new size and have it request an new image from the sever. The code looks like it has an onStop: function(){} option but I could not get that to fire. -Steve Nevermind! it works just great out svn, exactly the way I wanted. -Steve ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] $.get - Retrieving XML Docs
Richard, This sounds like bug 164, which has been recently fixed in svn. -Steve Richard Walker wrote: Hi, I'm trying to use the $.get function to bring back a DOM Document which I can then manipulate with jQuery functions. In Firefox and Opera this works fine with a function call similar to the one below; $(xml) will give me a jQuery Dom Document I can work with without problem. If I try the same code in IE it just gives me javascript errors (Error: Object does not supprt this method or property). $.get(src_xml, function(xml) { alert(Requested XML: + $(xml).toXML()); }); It looks like IE is bringing back a XMLHTTPRequest Object - from which I can get the XML as text. How can I get the IE call to bring me back a DOM Document OR how can I turn the XML String into a working DOM Document for IE with jQuery? Regards, Richard. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] jquery incompatible with adsense?
I think it breaks if you click on the image. -Steve Luke Lutman wrote: Hmmm... Your test page looks fine (no errors) in Firefox and Safari for me. Luke Mark D.B.D wrote: I upgraded first to revision 522 and after to 524 and both doesn´t work. I get the following error on thinkbox.js: $(document).ready is not a function on line 11 Here is the test page: http://markdbd.com/proyectos/jquery_test/ Regards, On 11/6/06, *Luke Lutman* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: I had a similar problem, Mark. Upgrading to the latest revision of jQuery (522 at the time) solved the problem :-) Luke Mark D.B.D wrote: Hi all, When I finished my little project with jquery I decided to add my adsense code. After this I saw there is something that makes jquery incompatible with the adsense script. I don't know what it is so I created a little test page so you all can check it: http://www.markdbd.com/proyectos/jquery_test/ http://www.markdbd.com/proyectos/jquery_test/ Just click on the image to get the error, I think it only happens on firefox. I am using the thinkbox plugin but If I am right the bug is in jquery.js. Regards, -- -- Mark D.B.D http://www.markdbd.com [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] -- ___ jQuery mailing list discuss@jquery.com mailto:discuss@jquery.com http://jquery.com/discuss/ http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com mailto:discuss@jquery.com http://jquery.com/discuss/ -- -- Mark D.B.D http://www.markdbd.com [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] -- ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] New Plugin: Resizeable
Mark Gibson wrote: Stephen Woodbridge wrote: Hi Stefan, I have been trying your resize plugin, it is really slick and works great! I have a request, does it already have or can you add the ability to added a call back at the end of the resize, so other code can be notified of the change in size? Like notify below: $(document).ready(function(){ $('#resize_map').Resizeable( { minHeight: 100, maxHeight: 700, minWidth: 100, maxWidth: 800, handlers: { se: '#resize' }, notify: function(){ alert(I have been resized); $('#map_tag').Resized(this.sizes); } } ); }); Maybe there is another way to do this? Would this not be better suited to an event? $('#resize_map').bind('resize', function() { alert(I have been resized); }); I've not had chance to test it, but I'm sure all elements have a resize event. If not then the resizeable plugin can trigger() it itself. Hi Mark, I tried to do this like this: $(document).ready(function(){ $('#resize_map').Resizeable( { minHeight: 100, maxHeight: 700, minWidth: 100, maxWidth: 800, handlers: { se: '#resize' } } ); $(#resize_map).bind('resize', function(e) { alert(resized event); }); }); But no event fires :(, I have also tried: $(#resize_map).resize(function(e) { alert(resized event); }); $(#resize_map).trigger('resize'); does force the event to fire. I can add the trigger('resize') to the resizable plugin, but it seems like it should just fire. Any other thoughts? -Steve ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] New way of animating
I can't speak to most of these issues, but I would like to point that for myself, learning works best by taking something that exists and rewriting it into jQuery. This allows me to not have to think about the existing application, but rather focus on get it working or getting it right in jQuery. Getting a thoughtful (not judgmental) critic and suggestions from more knowledge users is also very useful. I often get so focused on what I am trying to get working, I totally miss that there was a different simpler way to solve the problem. jQuery is relatively new, and many of the things that some of the more mature packages have are not use available in jQuery, (for the good or bad), so I applaud anyone that has time and effort and a willingness to create and offer new tools. The free market place of plugins will determine which are more useful. -Steve Dan Atkinson wrote: There's a whole page of various plugins that can be attached to jQuery. http://jquery.com/plugins/ In my opinion, going after individuals who show their work would not only be a childish 'me too'-ism, but it would be damaging to the reputation of jQuery, as it would just make people think that we don't have our own ideas, so we have to copy those of others. Rey Bango-2 wrote: If all the animation features are in jQuery standalone, then I'm onboard with Dan. What would be good, though, is if a page showing this being done in jQuery was created. Paul, are you up for that challenge? :o) Rey... Paul Bakaus wrote: Hey guys, has someone seen this at ajaxian? Check it out: http://berniecode.com/writing/animator.html This is probably the most sexiest animate lib I've ever seen in my life. Porting this to jQuery would be the PERFECT addition to jQuery's css parsing possiblities. What do you think? -- Paul Bakaus Web Developer Hildastr. 35 79102 Freiburg ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] New way of animating
I think the putting the sizzle in is not a problem for jQuery. The real problem is much more basic and the one we are faced designing an site. What do we want to say? What is the material we have to offer? How do we want to organize it and present it? What is the story board of the work flow for the site? etc. Build the site, then unobtrusively add sizzle! One approach would be to look at other javascript library sites and see if there is something we like, or other sites for that matter. We should think about how to design a site that is extensible because jQuery is rapidly evolving. I think long term it would be a good idea to get some champions to start work on doing something like this. I'm also involved with the UMN Mapserver project and they have just reworked their site into a CMS, but it is a full-time(?) job to keep the site updated, not to mention that time it took to build originally. Check it out at http://mapserver.gis.umn.edu/ Using the design concepts of this site might go a long way to mapping the information that we need to present. We could build a sizzle only site, but I am a big believer in eating ones own dog food. So building a site and unobtrusively adding sizzle does few things for us. One is it gives us a good site, another is that it should the right way to use jQuery, it gives us a real production site for testing jQuery in. Well we might want to do the testing in a staging clone of the site, but you get the idea. Anyway, all good ideas, boil down to someone has to do a lot of hard work! But load share is a about what community is about. -Steve Dragan Krstic wrote: Can we make biz-wang-ultra-boom-bang-crash site, for jQuery, with tones of cool features, animations, etc... - Original Message - From: Rey Bango [EMAIL PROTECTED] To: jQuery Discussion. discuss@jquery.com Sent: Monday, November 06, 2006 7:07 PM Subject: Re: [jQuery] New way of animating Hey Karl! Yep, your site is invaluable. You really do have some great tutorials on there and I think expanding it out via your submissions and those from anyone else is an awesome idea. Rey... Karl Swedberg wrote: On Nov 6, 2006, at 11:29 AM, Rey Bango wrote: Hi Paul, This is the type of stuff that I think would be OOO helpful in a tutorial or demo page. Like a best practices type of thing. I recently spent a lot of time talking to John about how to get the project more exposure and one of the things we threw out was getting more examples of coding practices on the site. Would you mind terribly jotting down some of these examples? I think they'd really help new users transition to jQuery. Please forgive the self-promotion, but these are the kinds of thing I'm also trying to do on learningjquery.com, and I (again) warmly welcome anyone who would like to author one or more tutorials for it or offer suggestions. Of course, adding more of this to the official jquery.com site would be great, too. Still, IMO the more jQuery love out there, the better. Third-party sites such as Cody Lindley's jQuery examples page and 15 Days of jQuery did as much as anything to get me hooked on jQuery. I'm currently working on these topics (in roughly this order): - How to Get Anything You Want (DOM Traversing) - Multi-Level Drop-Down Menus - jQuery Chaining - Basic Ajax Form Submission - Create a Basic Plugin - Collapsible Details Using Definition Lists and Brandon Aaron has been working on Populating a Select Menu with JSON and AJAX. Cheers, Karl ___ Karl Swedberg www.englishrules.com www.learningjquery.com ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Is this possible?
Chris, I haven't tried it but would $([EMAIL PROTECTED]'enabled']).click() -Steve W Christopher Jordan wrote: Hi folks, I have a table that represents a calendar. The user will be able to select multiple dates from the calendar, but cannot select dates in the past. I've written this code before using all JavaScript and what I did was add several additional pieces of data to the td tag other than ID or CLASS. I added state, index, status and a few others. I accessed these through f.calendarid.state... that kind of thing. So I'm wanting to apply an event (probably several: click, mouseover, mouseout) to only those td tags that have their state set to enabled. Not to *all* tds and not even to all tds with a certain class. ID alone won't work. Is there a way to do this using jQuery? Something like: $(td status).click()... or whatever. Thanks, Chris ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] What is this?, I am so confused!!! or JavaScript Tutorial
Well actually I am not that confused any more. Ok, maybe a little at times, but that is nothing new :) I recently found this site that someone here or elsewhere posted for learning JavaScript: http://javascript.crockford.com/private.html which explains closures, this and other stuff, and when you down that you might want to spend some time reading the rest of the site that starts here: http://www.crockford.com/javascript/ -Steve ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Is this possible?
Chris, I think you would need to test for performance differences unless John or one of the other guys with more clue have some insight. This works by creating a jquery collection of all td objects and using each to iterate through them, then uses the if to filter them. $('td').each(function() { if (this.status == 'enabled') $(this).click(function() { // do something }); }); Where as: $([EMAIL PROTECTED]'enabled']).click() uses the xpath syntax to create a collection of just those td's that have the attribute state='enabled' set on them, then applies the click() method to each of them. The first is probably a little more readable if you are new to jquery and requires you to write more code. The later is probably more jQuery-ish and I guessing it is a little faster, but I have not done any testing and really have no facts to support the guess. -Steve Christopher Jordan wrote: Thanks Klaus! How does this syntax differ from other suggested syntax: $([EMAIL PROTECTED]'enabled']).click() I'm curiout which is preferred, or faster. They both look clean enough to me. Chris Klaus Hartl wrote: Christopher Jordan schrieb: Hi folks, I have a table that represents a calendar. The user will be able to select multiple dates from the calendar, but cannot select dates in the past. I've written this code before using all JavaScript and what I did was add several additional pieces of data to the td tag other than ID or CLASS. I added state, index, status and a few others. I accessed these through f.calendarid.state... that kind of thing. So I'm wanting to apply an event (probably several: click, mouseover, mouseout) to only those td tags that have their state set to enabled. Not to *all* tds and not even to all tds with a certain class. ID alone won't work. Is there a way to do this using jQuery? Something like: $(td status).click()... or whatever. Thanks, Chris Hi Christopher, this could work: $('td').each(function() { if (this.status == 'enabled') $(this).click(function() { // do something }); }); -- Klaus ___ jQuery mailing list discuss@jquery.com mailto:discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] Building a Community (was: Re: New way of animating
Rey Bango wrote: Hi Dan, Still, I suppose if you make enough examples of everythin everyone else has done, and then throw jQuery's own killer features, then we might get more converts! :D There's plenty of cool stuff out there that we should push more and more. Yep! See, part of my concern is that it seems that the other libraries get a ton more exposure than jQuery does so when someone creates a new whiz-bang page using moo or Prototype, it gives a ton of press to those libraries even though in many cases, jQuery has had those features for some time. So I think its important to empathize, in some tangible fashion, these capabilities especially to new visitors. I think the folks at Scriptaculous have done a really good job of this with their new site. This is in part that we are not well coordinated as a community and I think we are going through some growing pains. In the month+ that I have been playing with jQuery it seems like the list of new posters has more than doubled. The one thing that I find very had about jQuery is that there are a lot of person blogs and sites the contain a lot of the key information the is required to learn it, but it is not always obvious where to go look or how to find that information. We seem to have a lot of individual contributors doing their own things for the community, but we don't seem to have an organized community. If that makes sense. Some examples: I now bookmark every plugin reference, because there is no one single place to find the plugins. There is a plugin section in svn, there is a plugin page on the site, but many (most?) of the bookmarks are not there. In fact I remember a post a short while ago about some plugin getting lost because the site no longer existed. Some things we could do: create a contrib directory in svn the would allow us to capture more of these plugins in an unsupported way. Write up a simple standards doc for inclusion. Think of the Perl CPAN site as an example. Make it easier to find the other sites that promote jQuery, like visualjquery.com and learningjquery.com How can we better leverage the resources of the community? Like the jQuery button contest, but also promoting jQuery with announcement every time some creates a new plugin, or releases a site built on jQuery, etc. Recruit someone to work on a site redesign if John would be up for something like that. Personally, I would rather have John working on jQuery core than spending a lot of time on a new website because with a little guidance from John others could take that on and contribute to the community. Things like the following and comparisons to other library features is another thing the people from the community can work on as part of site content. Going along your comments, I think you're right that we need to clearly delineate whats already built-in to jQuery, what can be enhanced via a plugin, and what should be added to some best practices/demo page so that we're not constantly reinventing the wheel. I would just hate for someone to come by and say, Well, jQuery doesn't seem to have this animation capability that I saw on Ajaxian simply because its not obvious to them from what they see on the site. Rey... Anyway, I do not mean for any of this to be taken as criticism, its more an observation of where I think we are and what make sense to move it to the next level. I'm new to jQuery and I may be totally off base. If that is case please delete this and accept my apology. I think I hear a lot of desire for this to happen in the form of the suggestions that are focused on smaller tactical steps of trying to improve the doc or tutorials, etc. These are all things that are important and need to be done but I think a building and growing a community takes some planning and coordination and some leadership and thinking big. One way to do this is for the leadership (whoever that may be) to think about where they want this to go or what their vision is. Then identify concrete tasks of things that need to be done and ask for volunteers to work on them. I'm probably not say anything that you don't already know, but I hope putting it into words generates some discussion and action and provide a mechanism to focus community members on improving jQuery. I have to say that one of the better aspects of this community is the list and the support I have gotten from it. It is a very positive and instructive environment. Thanks and best regards, -Steve ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] New Plugin: Resizeable
Hi Stefan, I have been trying your resize plugin, it is really slick and works great! I have a request, does it already have or can you add the ability to added a call back at the end of the resize, so other code can be notified of the change in size? Like notify below: $(document).ready(function(){ $('#resize_map').Resizeable( { minHeight: 100, maxHeight: 700, minWidth: 100, maxWidth: 800, handlers: { se: '#resize' }, notify: function(){ alert(I have been resized); $('#map_tag').Resized(this.sizes); } } ); }); Maybe there is another way to do this? Thanks, -Steve Stefan Petre wrote: Franck, try this http://interface.eyecon.ro/demos/resize_textarea.html Franck Marcia wrote: 2006/10/21, Stefan Petre [EMAIL PROTECTED]: I think you can use for textareas, just that you have to move the handle while the textarea is resized I gave it a try: http://fmarcia.info/jquery/resize Report: There's a odd behavior with FF: after you resized the textarea the first time, it looses 4px in width. Adding a doctype declaration to make it xhtml 1.0 strict resolves the problem but the textarea becomes larger than the resizer (?) With IE, when you start to drag the resizer the first time, the textarea's height quickly becomes the min height. Same behavior than FF with the doctype declaration. Franck. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] New Plugin: Resizeable
Hi Stefan, I took a shot at adding the notify to your iresizeable.js and it seems to work for my limited testing. Here is the patch: [EMAIL PROTECTED]:~/work/jquery2/plugins/interface.eyecon.ro$ diff -Naur temp/iresizeable.js sew/iresizeable.js --- temp/iresizeable.js 2006-10-21 08:22:10.0 -0400 +++ sew/iresizeable.js 2006-11-05 10:28:54.0 -0500 @@ -17,6 +17,7 @@ pointer: null, sizes : null, position: null, +notify: function(){}, start : function(e) { jQuery(document) @@ -48,6 +49,7 @@ } jQuery.iResize.resizeElement = null; jQuery.iResize.resizeDirection = null; +jQuery.iResize.notify(); }, getWidth: function(dx, side) { @@ -208,6 +210,9 @@ } } } +if (options.notify typeof(options.notify) == function) { +jQuery.iResize.notify = options.notify; +} } ); } @@ -216,4 +221,4 @@ { Resizeable : jQuery.iResize.build } -); \ No newline at end of file +); Stephen Woodbridge wrote: Hi Stefan, I have been trying your resize plugin, it is really slick and works great! I have a request, does it already have or can you add the ability to added a call back at the end of the resize, so other code can be notified of the change in size? Like notify below: $(document).ready(function(){ $('#resize_map').Resizeable( { minHeight: 100, maxHeight: 700, minWidth: 100, maxWidth: 800, handlers: { se: '#resize' }, notify: function(){ alert(I have been resized); $('#map_tag').Resized(this.sizes); } } ); }); Maybe there is another way to do this? Thanks, -Steve Stefan Petre wrote: Franck, try this http://interface.eyecon.ro/demos/resize_textarea.html Franck Marcia wrote: 2006/10/21, Stefan Petre [EMAIL PROTECTED]: I think you can use for textareas, just that you have to move the handle while the textarea is resized I gave it a try: http://fmarcia.info/jquery/resize Report: There's a odd behavior with FF: after you resized the textarea the first time, it looses 4px in width. Adding a doctype declaration to make it xhtml 1.0 strict resolves the problem but the textarea becomes larger than the resizer (?) With IE, when you start to drag the resizer the first time, the textarea's height quickly becomes the min height. Same behavior than FF with the doctype declaration. Franck. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] New Plugin: Resizeable
OK, this is not quite right yet. In side the notify function this.sizes seems to be the original size of the div and not the new resized sizes. Using it like this: $(document).ready(function(){ $('#resize_map').Resizeable( { minHeight: 100, maxHeight: 700, minWidth: 100, maxWidth: 800, handlers: { se: '#resize' }, notify: function(){ alert(this.sizes.height + 'x' + this.sizes.width + resized); } } ); }); Looks like sizes and position get set on start but not on stop, so something a little smarter is required. I guess I'll need to poke at it some more. -Steve Stephen Woodbridge wrote: Hi Stefan, I took a shot at adding the notify to your iresizeable.js and it seems to work for my limited testing. Here is the patch: [EMAIL PROTECTED]:~/work/jquery2/plugins/interface.eyecon.ro$ diff -Naur temp/iresizeable.js sew/iresizeable.js --- temp/iresizeable.js 2006-10-21 08:22:10.0 -0400 +++ sew/iresizeable.js 2006-11-05 10:28:54.0 -0500 @@ -17,6 +17,7 @@ pointer: null, sizes : null, position: null, +notify: function(){}, start : function(e) { jQuery(document) @@ -48,6 +49,7 @@ } jQuery.iResize.resizeElement = null; jQuery.iResize.resizeDirection = null; +jQuery.iResize.notify(); }, getWidth: function(dx, side) { @@ -208,6 +210,9 @@ } } } +if (options.notify typeof(options.notify) == function) { +jQuery.iResize.notify = options.notify; +} } ); } @@ -216,4 +221,4 @@ { Resizeable : jQuery.iResize.build } -); \ No newline at end of file +); Stephen Woodbridge wrote: Hi Stefan, I have been trying your resize plugin, it is really slick and works great! I have a request, does it already have or can you add the ability to added a call back at the end of the resize, so other code can be notified of the change in size? Like notify below: $(document).ready(function(){ $('#resize_map').Resizeable( { minHeight: 100, maxHeight: 700, minWidth: 100, maxWidth: 800, handlers: { se: '#resize' }, notify: function(){ alert(I have been resized); $('#map_tag').Resized(this.sizes); } } ); }); Maybe there is another way to do this? Thanks, -Steve Stefan Petre wrote: Franck, try this http://interface.eyecon.ro/demos/resize_textarea.html Franck Marcia wrote: 2006/10/21, Stefan Petre [EMAIL PROTECTED]: I think you can use for textareas, just that you have to move the handle while the textarea is resized I gave it a try: http://fmarcia.info/jquery/resize Report: There's a odd behavior with FF: after you resized the textarea the first time, it looses 4px in width. Adding a doctype declaration to make it xhtml 1.0 strict resolves the problem but the textarea becomes larger than the resizer (?) With IE, when you start to drag the resizer the first time, the textarea's height quickly becomes the min height. Same behavior than FF with the doctype declaration. Franck. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] New Plugin: Resizeable
Sorry for the long list of posts replying to myself. Here is a new patch that fixes the last problem. I think there is probably a more elegant way to do this, but this seems to work now. diff -Naur temp/iresizeable.js sew/iresizeable.js --- temp/iresizeable.js 2006-10-21 08:22:10.0 -0400 +++ sew/iresizeable.js 2006-11-05 13:58:52.0 -0500 @@ -17,6 +17,7 @@ pointer: null, sizes : null, position: null, +notify: function(){}, start : function(e) { jQuery(document) @@ -46,8 +47,17 @@ if (jQuery.iResize.resizeElement.resizeOptions.onStart) { jQuery.iResize.resizeElement.resizeOptions.onStart.apply(jQuery.iResize.resizeElement, [jQuery.iResize.resizeDirection]) } + jQuery.iResize.sizes = { + width : parseInt(jQuery(jQuery.iResize.resizeElement).css('width'))||0, + height : parseInt(jQuery(jQuery.iResize.resizeElement).css('height'))||0 + }; + jQuery.iResize.position = { + top : parseInt(jQuery(jQuery.iResize.resizeElement).css('top'))||0, + left : parseInt(jQuery(jQuery.iResize.resizeElement).css('left'))||0 + }; jQuery.iResize.resizeElement = null; jQuery.iResize.resizeDirection = null; +jQuery.iResize.notify(); }, getWidth: function(dx, side) { @@ -208,6 +218,9 @@ } } } +if (options.notify typeof(options.notify) == function) { +jQuery.iResize.notify = options.notify; +} } ); } @@ -216,4 +229,4 @@ { Resizeable : jQuery.iResize.build } -); \ No newline at end of file +); Stephen Woodbridge wrote: OK, this is not quite right yet. In side the notify function this.sizes seems to be the original size of the div and not the new resized sizes. Using it like this: $(document).ready(function(){ $('#resize_map').Resizeable( { minHeight: 100, maxHeight: 700, minWidth: 100, maxWidth: 800, handlers: { se: '#resize' }, notify: function(){ alert(this.sizes.height + 'x' + this.sizes.width + resized); } } ); }); Looks like sizes and position get set on start but not on stop, so something a little smarter is required. I guess I'll need to poke at it some more. -Steve Stephen Woodbridge wrote: Hi Stefan, I took a shot at adding the notify to your iresizeable.js and it seems to work for my limited testing. Here is the patch: [EMAIL PROTECTED]:~/work/jquery2/plugins/interface.eyecon.ro$ diff -Naur temp/iresizeable.js sew/iresizeable.js --- temp/iresizeable.js 2006-10-21 08:22:10.0 -0400 +++ sew/iresizeable.js 2006-11-05 10:28:54.0 -0500 @@ -17,6 +17,7 @@ pointer: null, sizes : null, position: null, +notify: function(){}, start : function(e) { jQuery(document) @@ -48,6 +49,7 @@ } jQuery.iResize.resizeElement = null; jQuery.iResize.resizeDirection = null; +jQuery.iResize.notify(); }, getWidth: function(dx, side) { @@ -208,6 +210,9 @@ } } } +if (options.notify typeof(options.notify) == function) { +jQuery.iResize.notify = options.notify; +} } ); } @@ -216,4 +221,4 @@ { Resizeable : jQuery.iResize.build } -); \ No newline at end of file +); Stephen Woodbridge wrote: Hi Stefan, I have been trying your resize plugin, it is really slick and works great! I have a request, does it already have or can you add the ability to added a call back at the end of the resize, so other code can be notified of the change in size? Like notify below: $(document).ready(function(){ $('#resize_map').Resizeable( { minHeight: 100, maxHeight: 700, minWidth: 100, maxWidth: 800, handlers: { se: '#resize' }, notify: function(){ alert(I have been resized); $('#map_tag').Resized(this.sizes); } } ); }); Maybe there is another way to do this? Thanks, -Steve Stefan Petre wrote
Re: [jQuery] [Fwd: jquery bug 164]
Brandon, If I recall correctly, I think the version that I had that worked was marked r29. I'm not sure what that reflected, but I'm kicking myself for deleting it, when I upgraded. -Steve Brandon Aaron wrote: Since the move to /trunk I'm only able to go back to Rev 482. Is it just my SVN client (SVN X) or something I'm not doing right? I don't mind taking a look back to see if I can find anything revealing ... but I can't get to those older revesions. -- Brandon Aaron On 11/4/06, Jörn Zaefferer [EMAIL PROTECTED] wrote: Klaus Hartl schrieb: Hey Steve, as Dave said, this one is hard *and* no fun... But the bug didn't occur in pre 1.0, so theres still hope! Anyone up for some digging in those old revisions? No fun at all... -- Jörn Zaefferer http://bassistance.de ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] [Fwd: jquery bug 164]
Dave, Thank you for looking into this. I just set up a test case that fails roughly using your test case as a model. I tested it based on todays svn and it fails in IE6. Can you test it against the older versions. http://imaptools.com:8081/test/jquery-xml-bug.html http://imaptools.com:8081/test/jquery-xml-bug.xml -Steve Dave Methvin wrote: I just set up a test case based closely on the sample code at the top of bug #164 and can't get it to fail in IE6 with build 501: http://methvin.com/junk/jquery-xml-bug.html?501 It does not fail on 413 either, using the copy of the file from http://imaptools.com:8081/js/jquery.js : http://methvin.com/junk/jquery-xml-bug.html?413 Can someone still experiencing this problem in real code please respond with a working (uh, non-working) test case and information about the version of the browser? Is it possible that the dependent variable is the version of MSXML instead of the browser? For these situations, it would be very handy if we kept an archive of older builds, and if the files had the revision number inside the .jquery variable. You can't easily get the built files out of SVN. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] [Fwd: jquery bug 164]
Dave, It just dawned on me I could pull the js from you site: http://imaptools.com:8081/test/jquery-xml-bug2.html?413 http://imaptools.com:8081/test/jquery-xml-bug2.html?501 And both of these fail in IE6. -Steve Stephen Woodbridge wrote: Dave, Thank you for looking into this. I just set up a test case that fails roughly using your test case as a model. I tested it based on todays svn and it fails in IE6. Can you test it against the older versions. http://imaptools.com:8081/test/jquery-xml-bug.html http://imaptools.com:8081/test/jquery-xml-bug.xml -Steve Dave Methvin wrote: I just set up a test case based closely on the sample code at the top of bug #164 and can't get it to fail in IE6 with build 501: http://methvin.com/junk/jquery-xml-bug.html?501 It does not fail on 413 either, using the copy of the file from http://imaptools.com:8081/js/jquery.js : http://methvin.com/junk/jquery-xml-bug.html?413 Can someone still experiencing this problem in real code please respond with a working (uh, non-working) test case and information about the version of the browser? Is it possible that the dependent variable is the version of MSXML instead of the browser? For these situations, it would be very handy if we kept an archive of older builds, and if the files had the revision number inside the .jquery variable. You can't easily get the built files out of SVN. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] [Fwd: jquery bug 164] (fix?)
Dave, You are Awesome! this fixes the problem in IE6. http://imaptools.com:8081/maps/demo2.html double click the map and now you can toggle between the xml and formated html under the map. Many many thanks! -Steve *happy* *happy* *smiling* *smiling* Dave Methvin wrote: Okay, this version doesn't error out at least: http://methvin.com/junk/jquery-xml-bug.html?patched The fix is to change this line of attr() : Old: } else if ( elem.getAttribute != undefined elem.tagName ) { // IE elem.getAttribute passes even for style New: } else if ( typeof(elem.getAttribute) != undefined elem.tagName ) { \ I think IE is trying to _call_ elem.getAttribute for some reason, must be a bug in the COM typelib for the XML control. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Brandon Aaron Sent: Saturday, November 04, 2006 1:01 PM To: jQuery Discussion. Subject: Re: [jQuery] [Fwd: jquery bug 164] On 11/4/06, Brandon Aaron [EMAIL PROTECTED] wrote: This is interesting. These both fail for me ... Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727) I should also mention it fails with the line #722 'Wrong number of arguments or invalid property assignment' in both IE6 and IE7. -- Brandon Aaron ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] xml in Browser after ajax
Olaf Bosch wrote: Jörn Zaefferer schrieb: How I can let the grabbeing xml in browser explain? With the .html give me *[object XMLDocument]* If you need html, tell $.ajax to get it for you: $.ajax({ ... dataType: html, sucess: function(html) { $('#content').html(html); } }); Thank you all for the input. I have to play with all. I wanted to show it only visuel. Understand, in the DIV#content is to see: ?xml version=1.0 encoding=UTF-8? blatext/bla So the pure code, does a possibility exist there? Ooh! I know! Did this! look at: http://imaptools.com:8081/maps/demo2.html double click the map to get xml displayed under the map, click toggle to see it as formated html. Check my script, you welcome to any ideas I have there. I'm sure you can improve on them. -Steve ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] maps (was: xml in Browser after ajax
Ⓙⓐⓚⓔ wrote: Damn nice tool! On 11/4/06, Stephen Woodbridge [EMAIL PROTECTED] wrote: Ooh! I know! Did this! look at: http://imaptools.com:8081/maps/demo2.html double click the map to get xml displayed under the map, click toggle to see it as formated html. Check my script, you welcome to any ideas I have there. I'm sure you can improve on them. -Steve Thanks. Mapping and geospatial tools is what I do. mostly building server side tools, but this is my first attempt to pull together a javascript based client application. I want to rebuild the mapping application as a jquery plugin or at least make it use more jquery stuff, like make the map size dragable, convert the help to a thickbox, etc. This is also why I posted about having drawing tools. With those it would be pretty easy to click a feature on the map, fetch it via ajax, render and edit it, or add a new feature to the map and stuff like that. Then save the results back to the server via ajax. There are some other opensource efforts to build vector editing tools, but they are all targeted at large opensource geo frameworks. It would be very cool to have simple point, polyline and polygon drawing tools available in jquery. If I ever have the time to push this project that far, I probably make a plugin. -Steve ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] [Fwd: jquery bug 164]
Clem, As far as I know this is still an open issue. I am hoping the one of the developers that has some expertise in IE will take pity on us and try to fix this bug sooner rather than later ;). This was not a problem pre 1.0.0, but I'm sure a lot of code has change since then which has resulted in this bug. The thanks go to the jQuery team, not me. These guys are way smarter then me and are generating a very awesome package. Best regards, -Steve Original Message Subject: jquery bug 164 Date: Fri, 03 Nov 2006 19:42:28 +0100 From: Clément Beffa [EMAIL PROTECTED] To: [EMAIL PROTECTED] Hi, I'd would like to know if possible what is the status on the bug 164 in jquery. As I've a new project at uni were I'm using jquery in order to support most of browsers. However with this bug i can't use .attr() on XML object in IE, which is really bad. It crash in : - } else if ( elem.getAttribute != undefined elem.tagName ) { // IE elem.getAttribute passes even for style - This is really a blocker for me. Will there be a fix or jquery design is the problem? Do you have some dirty tricks to make it works even if it breaks other part of jquery, as i'm probably not using the whole thing ? Thanks you very much for your work, Clem ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] [Fwd: jquery bug 164]
Dave Methvin wrote: I'd would like to know if possible what is the status on the bug 164 in jquery. As far as I know this is still an open issue. I am hoping the one of the developers that has some expertise in IE will take pity on us and try to fix this bug sooner rather than later ;). If it's being ignored that either means it's hard, it's not fun, or both. :) Yeah, I figured as much. But hey, no pain, no gain! The bigger the challenge, the bigger the glory! ;) or something like that. Was the problem the .getAttribute(..., 2) in .attr()? That was probably put in as a patch to the situation where IE fiddles with href attributes unless you call it like .getAttribute('href', 2). Maybe you could just take out the second argument as a workaround for now? It's worth a try. Perhaps a permanent fix would be to only use the two-arg form of getAttribute if it's one of the troublesome attributes like href. I guess there is no way to know if we're working on an XML document? I think there are actually more than one problem here. I can't speak to Clem's problem, but my is that the that xpath searches on xml documents are failing in IE as documented in the bug. I spent about two days poking at it in IE, but I just don't have the knowledge or experience to sort out this type of problem. So I'm just stuck until some of you wizards put you minds to squashing this bug. Many thanks to all of you that work so hard to make jQuery so wonderful. I really love working with it. -Steve ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] xml in Browser after ajax
I barely know this stuff, but would something like this work: $(#el1).html($(for-el1, xml).text()); $(#el2).html($(for-el2, xml).text()); $(#el3).html($(for-el3, xml).text()); or if you have a lot of elements, then making an array of them and looping through the list might be cleaner. It seems like if you named the elements in the xml the same as the elements in the html, that you should be able to just loop through the elements in the xml and use the tagname there to do search in the html which would be more elegant. json might already do this for you, but I'm not familiar that much with json. -Steve [EMAIL PROTECTED] wrote: OK here's the point: suppose I want to return in one ajax call several values to be displayed in different dom elements. I'd return an XML value with for-el1.../for-el1for-el2.../for-el2 and so on. Then I'll use $(for-el1, xml) and so on to get each piece and stick it into the corresponding element. So how would I do it? Since the xml-tree value of the elipsis is exactly the dom elements I want to add, how do I replace the current contents of el1 with that? I'm sure its simple but I'm missing a clue on how to :) --Jacob yeah... but what's the point? debugging? some folks (not me) use html without trying to deal with it as xml, and just use some regexs and other methods to insert directly into the current dom (page) the beauty of the full ajax deal is to take what you need from the xml and slip it just where you want it! I've gone thru hoops to get back my html as full xml (xhtml) and played with it in the xml manner. On 11/3/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: OK so can it be converted back into a string somehow (w/o knowing the structure) and inserted inside a div for generating HTML display? --Jacob Success's parameter on an xml ajax call is not a string. it's a fully parsed out representation of the xml. Normally people call the parameter 'xml' not 'msg'. You deal with it differently... if you get pieces of the xml with standard jquery notation (plus you pass the xml, as in: $(somenode,xml).text() would give you the text from somenode the complete: callback gives you the whole http request so you can get whatever you want! On 11/3/06, Olaf Bosch [EMAIL PROTECTED] wrote: How I can let the grabbeing xml in browser explain? With the .html give me *[object XMLDocument]* The Function are: $.ajax({ type: GET, url: url.xml, dataType: xml, success: function(msg){ $(#content).html(msg); } }); -- Viele Grüße, Olaf --- [EMAIL PROTECTED] http://olaf-bosch.de www.akitafreund.de --- ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ -- Ⓙ�ⓚⓔ - יעקב �ǡǩȩ ᎫᎪ�Ꭼ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ -- Ⓙ�ⓚⓔ - יעקב �ǡǩȩ ᎫᎪ�Ꭼ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] jQuery 1.0.3 compressed - file header missing
Laurent Yaish wrote: The packed version of jQuery 1.0.3 is missing the file header, 1.0.2 had it. I know it makes the file slightly smaller but then there is no way to know what version you're using. Actually, it would be nice if jQuery had a var or function like: $.version or $.version() the returned the current version string. -Steve ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] jQuery Metadata Plugin
Or just adding an xml data island to your document that has everything you want it it and then parsing that using xpath. This is approach is much cleaner, should validate, and we already have the tools to parse it. -Steve W. Erik Beeson wrote: In the case of adding metedata to divs, are these approaches any better than just using nested hidden spans? --Erik On 10/31/06, *John Resig* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hi Everyone - I just finished reading over the massive thread that discusses embedding metadata into elements for later extraction. Well, I just finished a plugin to handle all three metadata-extraction methods. You can see a demo here: (Uses Firebug debug statements!) http://john.jquery.com/plugins/meta/ It's capable of extracting metadata from classes, random attributes, and child elements. For example, you can do: li data={some:'random', json: 'data'}.../li OR li class=someclass {some: 'data'} anotherclass.../li OR liscript type=sometype{some:json,data:true}/script .../li The default is the first method, but you can always change it but twiddling the options. This means that there is at least one option here to appease you. There's also a bunch of options (like loading data into a single property and the ability to ignore braces {}). Let me know what you think of this - I know that I'll probably be using it very soon. --John ___ jQuery mailing list discuss@jquery.com mailto:discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] jQuery Metadata Plugin
Oops, I forgot about that. The guys at work do this, but they don't use a dtd and in fact don't even use a doctype and clearly don't validate. Oh well, it was a thought, if only half baked. :) -Steve Ⓙⓐⓚⓔ wrote: sure, slip in a different namespace and you can make your own tags but it won't validate unless you do the dtd for it too. On 11/1/06, Stephen Woodbridge [EMAIL PROTECTED] wrote: Or just adding an xml data island to your document that has everything you want it it and then parsing that using xpath. This is approach is much cleaner, should validate, and we already have the tools to parse it. -Steve W. Erik Beeson wrote: In the case of adding metedata to divs, are these approaches any better than just using nested hidden spans? --Erik On 10/31/06, *John Resig* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hi Everyone - I just finished reading over the massive thread that discusses embedding metadata into elements for later extraction. Well, I just finished a plugin to handle all three metadata-extraction methods. You can see a demo here: (Uses Firebug debug statements!) http://john.jquery.com/plugins/meta/ It's capable of extracting metadata from classes, random attributes, and child elements. For example, you can do: li data={some:'random', json: 'data'}.../li OR li class=someclass {some: 'data'} anotherclass.../li OR liscript type=sometype{some:json,data:true}/script .../li The default is the first method, but you can always change it but twiddling the options. This means that there is at least one option here to appease you. There's also a bunch of options (like loading data into a single property and the ability to ignore braces {}). Let me know what you think of this - I know that I'll probably be using it very soon. --John ___ jQuery mailing list discuss@jquery.com mailto:discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] json.js
Jörn Zaefferer wrote: When I introcuded json.js [http://json.org/json.js] from http://json.org/ . Problem now is my browser keeps freezing and eating up CPU. I checked and it is clearly conflicting with JQuery. It extends Object, which seemes to cause lots of trouble with jQuery. You could check if it works when removing Object.prototype.toJSONString. I ran into a similar problem with another script the extended Object. I'm wondering if this is an easy condition to check for and generate an alert(). This would give the developer am early heads up to what seems to be a potentially come problem. -Steve ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] moddify the title tag
Mike Alsup wrote: You get only one chance at this - you can't change it once the tag is written. You can do this in FF and IE: document.title = 'my new title'; I could not get this to work via the url which might not be significant: javascript:document.title='my new title' but this worked: javascript:document.write('my new title') using FF 1.0.5.7 but neither worked as expected in IE 6. -Steve ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] today's svn test report
Hi all, I just got tools loaded to be able to run svn make and set up my system for running tests. Test results for todays svn follow: -Steve Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.0.7) Gecko/20060909 Firefox/1.5.0.7 $.find() (2, 93, 95) 69. Sibling Axis (//p/../) expected: [object HTMLParagraphElement],[object HTMLParagraphElement],[object HTMLDivElement],[object HTMLParagraphElement],[object HTMLUListElement],[object HTMLOListElement],[object HTMLFormElement],[object HTMLParagraphElement],[object HTMLParagraphElement],[object HTMLParagraphElement] result: [object HTMLParagraphElement],[object HTMLParagraphElement],[object HTMLDivElement],[object HTMLParagraphElement],[object HTMLUListElement],[object HTMLOListElement],[object HTMLFormElement],[object HTMLSpanElement],[object HTMLParagraphElement],[object HTMLParagraphElement],[object HTMLParagraphElement] 70. Sibling Axis (//p/../*) expected: [object HTMLParagraphElement],[object HTMLParagraphElement],[object HTMLDivElement],[object HTMLParagraphElement],[object HTMLUListElement],[object HTMLOListElement],[object HTMLFormElement],[object HTMLParagraphElement],[object HTMLParagraphElement],[object HTMLParagraphElement] result: [object HTMLParagraphElement],[object HTMLParagraphElement],[object HTMLDivElement],[object HTMLParagraphElement],[object HTMLUListElement],[object HTMLOListElement],[object HTMLFormElement],[object HTMLSpanElement],[object HTMLParagraphElement],[object HTMLParagraphElement],[object HTMLParagraphElement] Tests completed in 9516 milliseconds. 2 tests of 291 failed. Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322) 39. $.find() (1, 33, 34) Died on test #34: [object Error] 53. toggle(Function, Function) (1, 0, 1) Died on test #1: [object Error] 54. eventTesting() (1, 0, 1) Died on test #1: [object Error] 58. load(String, Hash, Function)xx (1, 0, 1) Died on test #1: [object Error] 60. ajaxHandlersTesting() (1, 0, 1) Died on test #1: [object Error] 69. $.ajaxTimeout(Number) (1, 0, 1) Check for timeout failed 73. $.ajax(Hash)xx (1, 0, 1) Died on test #1: [object Error] Tests completed in 24828 milliseconds. 7 tests of 188 failed. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Visual jQuery Announcement
Yehuda, Please add to your Future list to provide a printable version of the documentation like a single html page or pdf document that is linear so it prints on letter sized paper. This is really a great resource. Kudos for all your effort! Thanks, -Steve Yehuda Katz wrote: I've moved visualjquery.com http://visualjquery.com to a new, snappier server (that hopefully will have better uptime too). It's also now a Rails app, although the actual API stuff is still just the XML and XSL (Rails allows the use of static files). What's nice about MediaTemple's implementation is that I'm using their grid product, which means the site should easily be able to handle spiked in traffic (not so with my previous site). This way, it'll be much easier for me to add new stuff in the future, like more details about the plugins I release on this list. A list of recent changes: * All functions indicate a return value (let me know if there are errors) * Plugins have been added to the list * I started documenting Interface inline * It is now possible to indicate that a parameter is a Hash, and provide hash options separately (see Interface) * I improved the parameter style (it's much more readable now with multiple parameters). * Moved to a new server (MediaTemple) and switched to a Rails app. Future changes: * Finish documenting official plugins inline * Add a list of my plugins and better downloadability (probablty in a database) * Add style picker for changing colors * Redo UL implementation to DL implementation (will greatly simplify code and allow me to do more with the styles). * Do something about the static header. * Offer offline version via svn. If you have any other ideas, please let me know. -- Yehuda On 10/28/06, *Giuliano Marcangelo* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Scott, I have no problem whatsoever with yehuda's color scheme, but if you are having problems, why not use the wonderful firefox extension by Chris Pederick,the Web Developer Toolbar and disable yehuda's stylesheet and use your own.try this for starters.hides the header,and colors the body background white.not pretty, but will at the very least enable you to see this wonderful piece of work On 27/10/06, *Scott Sharkey* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Very nice, except for one thing. Black text (on the buttons) on very dark blue or brown buttons with a black background is just a non-starter. At least on my screens, Visual jQuery is useless, because I can't read the navigation screens. If it's just me, I apologize. -Scott Yehuda Katz wrote: I just updated Visual jQuery so it uses docs that include the plugins in the svn. I'm going to be adding inline docs to Interface over the next few days, so Interface docs will be available on visualjquery.com http://visualjquery.com http://visualjquery.com in the next few days. If there's a plugin that you have in the svn repository, but it's not currently on Visual jQuery, please let me know whether I can add the inline docs into the repository, or if you want to do it. The more we get centralized documentation, the better the overall jQuery community becomes. -- Yehuda Katz Web Developer | Wycats Designs (ph) 718.877.1325 ___ jQuery mailing list discuss@jquery.com mailto:discuss@jquery.com http://jquery.com/discuss/ http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com mailto:discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com mailto:discuss@jquery.com http://jquery.com/discuss/ -- Yehuda Katz Web Developer | Wycats Designs (ph) 718.877.1325 ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] today's svn test report
Also adding results from Opera 8 and 9: Opera/9.02 (Windows NT 5.0; U; en) - same results as Foxfire below Tests completed in 5750 milliseconds. 2 tests of 291 failed. Opera/8.54 (Windows NT 5.0; U; en) 39. $.find() (3, 92, 95) 53. Selected Option Element (option:selected) expected: [object HTMLOptionElement],[object HTMLOptionElement],[object HTMLOptionElement],[object HTMLOptionElement] result: [object HTMLOptionElement],[object HTMLOptionElement],[object HTMLOptionElement] 69. Sibling Axis (//p/../) expected: [object HTMLParagraphElement],[object HTMLParagraphElement],[object HTMLDivElement],[object HTMLParagraphElement],[object HTMLUListElement],[object HTMLOListElement],[object HTMLFormElement],[object HTMLParagraphElement],[object HTMLParagraphElement],[object HTMLParagraphElement] result: [object HTMLParagraphElement],[object HTMLParagraphElement],[object HTMLDivElement],[object HTMLParagraphElement],[object HTMLUListElement],[object HTMLOListElement],[object HTMLFormElement],[object HTMLElement],[object HTMLParagraphElement],[object HTMLParagraphElement],[object HTMLParagraphElement] 70. Sibling Axis (//p/../*) expected: [object HTMLParagraphElement],[object HTMLParagraphElement],[object HTMLDivElement],[object HTMLParagraphElement],[object HTMLUListElement],[object HTMLOListElement],[object HTMLFormElement],[object HTMLParagraphElement],[object HTMLParagraphElement],[object HTMLParagraphElement] result: [object HTMLParagraphElement],[object HTMLParagraphElement],[object HTMLDivElement],[object HTMLParagraphElement],[object HTMLUListElement],[object HTMLOListElement],[object HTMLFormElement],[object HTMLElement],[object HTMLParagraphElement],[object HTMLParagraphElement],[object HTMLParagraphElement] Tests completed in 5640 milliseconds. 3 tests of 291 failed. Stephen Woodbridge wrote: Hi all, I just got tools loaded to be able to run svn make and set up my system for running tests. Test results for todays svn follow: -Steve Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.0.7) Gecko/20060909 Firefox/1.5.0.7 $.find() (2, 93, 95) 69. Sibling Axis (//p/../) expected: [object HTMLParagraphElement],[object HTMLParagraphElement],[object HTMLDivElement],[object HTMLParagraphElement],[object HTMLUListElement],[object HTMLOListElement],[object HTMLFormElement],[object HTMLParagraphElement],[object HTMLParagraphElement],[object HTMLParagraphElement] result: [object HTMLParagraphElement],[object HTMLParagraphElement],[object HTMLDivElement],[object HTMLParagraphElement],[object HTMLUListElement],[object HTMLOListElement],[object HTMLFormElement],[object HTMLSpanElement],[object HTMLParagraphElement],[object HTMLParagraphElement],[object HTMLParagraphElement] 70. Sibling Axis (//p/../*) expected: [object HTMLParagraphElement],[object HTMLParagraphElement],[object HTMLDivElement],[object HTMLParagraphElement],[object HTMLUListElement],[object HTMLOListElement],[object HTMLFormElement],[object HTMLParagraphElement],[object HTMLParagraphElement],[object HTMLParagraphElement] result: [object HTMLParagraphElement],[object HTMLParagraphElement],[object HTMLDivElement],[object HTMLParagraphElement],[object HTMLUListElement],[object HTMLOListElement],[object HTMLFormElement],[object HTMLSpanElement],[object HTMLParagraphElement],[object HTMLParagraphElement],[object HTMLParagraphElement] Tests completed in 9516 milliseconds. 2 tests of 291 failed. Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322) 39. $.find() (1, 33, 34) Died on test #34: [object Error] 53. toggle(Function, Function) (1, 0, 1) Died on test #1: [object Error] 54. eventTesting() (1, 0, 1) Died on test #1: [object Error] 58. load(String, Hash, Function)xx (1, 0, 1) Died on test #1: [object Error] 60. ajaxHandlersTesting() (1, 0, 1) Died on test #1: [object Error] 69. $.ajaxTimeout(Number) (1, 0, 1) Check for timeout failed 73. $.ajax(Hash)xx (1, 0, 1) Died on test #1: [object Error] Tests completed in 24828 milliseconds. 7 tests of 188 failed. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Oooh! These are pretty!
Dan, Yes all good points. I was not very explicit about what I liked. It is the vector and object drawing done cross browser. Since a lot of what I do it maps and building apps on top of maps, I would really be able to use some generic tools for drawing that are fast, cross browser and capable of handling more than a few dozen points or objects. Dan Atkinson wrote: I'm not sure about the technical merit of drawing 100 circles on a screen to drag around, or what the point of it would be. The same thing could be achieved with jQuery and draggables in Interface. The result wouldn't be large files, and it would be quicker. Yeah, just eye candy :) Btw, how do you draw a circle in js? The clock would be nice, but isn't exactly very useful as this has been done for years in JS. Also, it absolutely killed my PC (a dev PC) when I opened the link. Firefox just hung for a minute while it loaded a clock. That's not a good sign. It's not like I was doing much at the time (except browsing BBC News). Yeah, I noticed that. It was just a nice integration of a lot of vector drawing and nice coordination of dragging the clock hands to adjust the time. The workflow demo on the other hand... Well, yes. That's definitely something special, and quite doable if someone took the time out to create something like that. I think the point here is that it would be nice to have a library of the primitive object create tools and the snapping or hotspot tools. I think that sessions would be able to be saved by writing a cookie with the location of various elements. or add save/load function that read/writes an xml document somewhere. -Steve Stephen Woodbridge wrote: Anyone up to porting some of this to jQuery? http://archive.dojotoolkit.org/nightly/demos/gfx/circles.html http://archive.dojotoolkit.org/nightly/demos/gfx/clock.html http://www.mxgraph.com/demo/mxgraph-web/web/mxWorkflow-Demo.html -Steve ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Oooh! These are pretty!
Sam, Yes, some thing like that would be great. It would also be nice to handle arrays of locations without the 'px' so it is easy to do math on them. // place a circle at the center of some container $(#container).drawShape(circle, { origin: centre, radius: 30}) // draw a circle $(#container).drawShape(circle, { origin: [5,8], radius: 30}) // draw multiple circles and style them all the same $(#container).drawShape(circle, { origin: [[5,8],[30,45],...], radius: 30, style: {color: red, opacity: .5, border-color: #900, border-style: solid}}) // draw a polyline $(#container).drawShape(line { path: [[5,8],[30,45],...], style: {color: red, line-style: dashed, lineWidth: 2}}).bind(mouseover, function(e){alert(I'm a line);}); I also think there is something to be said for creating shape objects like: var redcircle = { id: circle01, type: circle, x: 5, y: 8, radius: 30, style: {color: #f00;}, }; var bluecircle = { id: circle02, type: circle, x: 5, y: 8, radius: 10, style: {color: #00f;}, }; var shapes = []; shapes.push(redcircle); shapes.push(bluecircle); // add to circles, then hide the larger $(#container).addShape(shapes); $(#circle01).hide(); or // add two circles (nested), then hide both of them $(#container).addShape(redcircle); $(#circle01).addShape(bluecircle); $(#circle01).hide(); Anyway you get the idea. -Steve Sam Collett wrote: On 27/10/06, Stephen Woodbridge [EMAIL PROTECTED] wrote: snip Since a lot of what I do it maps and building apps on top of maps, I would really be able to use some generic tools for drawing that are fast, cross browser and capable of handling more than a few dozen points or objects./snip So I guess what you want a a shape drawing plugin? That could be useful and I could imaging a syntax similar to this: // draw a circle in the centre of #container $(#container).drawShape(circle, { origin: centre, radius: 30px}) // draw a circle in the 5px from the left and 8px from the top, cropped when it reaches the edge (so you get a partial circle) $(#container).drawShape(circle, { origin: {left: 5px, top: 8px}, radius: 30px }) // draw a rectangle in the centre $(#container).drawShape(rectangle, { origin: center, width: 30px, height: 35px }) Other shapes could perhaps be added as well (triangles, trapezoids etc). Some shapes are under several categories (a square is a rectangle and a rohmbus). However, I have no idea how to implement something like this. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] xml / javascript help requested
Hi Sean, look at http://imaptools.com:8081/maps/demo.html and double click on the map, then click the toggle button under the map. This is currently broken on IE, because of http://jquery.com/dev/bugs/bug/164/ (Which I hope gets FIXED soon, please!) You want to use xpath to extract values from your xml. -Steve Sean O wrote: Hi, I have an application that's loading values as XML from a text file on startup. I can see the data displayed fine, but I need to get it into an array to work with. the code: // returns XML data as responsestring.../stringstring.../string/response $.post(proc_loadhistory.php,{}, function(xml){ rawxml = $(string,xml).text(); // get text of each string/string $('#output').html(rawxml); // displays ALL strings clumped together outputs: data1data2data3... Soo... I need to be able to save this data (rawxml) in an array I can work with so that I can access individual string records by number (such as mystring[2] for the 3rd value). e.g. // output value in second string field $(#button2).click(function(){ $('#output').html('rawxml[1]'); // -- doesn't work, just an example of what i need }); Tried googling and scanning the docs, couldn't find anything. Can someone point me in the right direction? Thanks. SEAN O ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Oooh! These are pretty!
Dave Methvin wrote: Hmmm, I just checked all these links in IE 6.0.2800.1106 and they all work fine for me. So I'm wondering what version you are using? And why it works for me and not you? I've got the latest IE6 for XP SP2, which is 6.0.2900.2180. This page gives me one of those typically unhelpful IE errors: line 65, this.rawNode.fill is null or not an object. It's hard to trace the real error location in IE because of dojo's dynamic includes. http://archive.dojotoolkit.org/nightly/demos/gfx/circles.html Interesting. This also works for me in IE 6.0.2900.2180.xpsp2_gdr.050301-1519 - XP laptop don't you just love m$ version numbers! IE 6.0.2800.1106 is on my win2k workstation -Steve ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] xml / javascript help requested
Jörn Zaefferer wrote: Dave Methvin schrieb: look at http://imaptools.com:8081/maps/demo.html and double click on the map, then click the toggle button under the map. This is currently broken on IE, because of http://jquery.com/dev/bugs/bug/164/ (Which I hope gets FIXED soon, please!) I think this is breaking a find() case in the test suite as well. Did some recent change cause the breakage, or just that the error has been there all along and recently reported? Check my latest comment here: http://jquery.com/dev/bugs/bug/164/ These three lines cause lots of trouble when working with XML in IE: } else if ( elem.getAttribute != undefined elem.tagName ) { // IE elem.getAttribute passes even for style if ( value != undefined ) elem.setAttribute( name, value ); return elem.getAttribute( name, 2 ); Test attr(String, Object)x does not fail, instead IE hangs and skips the test. In addition, it indicates an error on the first line, but only the first time the page is loaded. Something about Wrong number of arguments or illegal property assignment. If you have any idea how to solve this, you are welcome. Hi Jörn, I do know that this was working in jQuery r29 because that was what I started all my development using. Unfortunately, I upgraded and did not test IE, then cleaned all the old version from my work area, so I don't have that version any more. -Steve ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] Oooh! These are pretty!
Anyone up to porting some of this to jQuery? http://archive.dojotoolkit.org/nightly/demos/gfx/circles.html http://archive.dojotoolkit.org/nightly/demos/gfx/clock.html http://www.mxgraph.com/demo/mxgraph-web/web/mxWorkflow-Demo.html -Steve ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] [Off-list] Re: Is svn broken or having problems?
Thanks, Yeah, all my other repositories were working fine also, but it seems to be fixed now! so thanks to whom ever fixed it. -Steve Choan C. Gálvez wrote: Hi, Stephen. I'm having problems too with SVN today (just for jquery, so I'm afraid there's something broken in the repo). On 10/23/06, Stephen Woodbridge [EMAIL PROTECTED] wrote: Hi all, Just tried to do: $ svn update svn: Can't find a temporary directory I googled for this and found a hint it my be the repository. I check that I do have /tmp and it is not full and it is writable. -Steve ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] Is svn broken or having problems?
Hi all, Just tried to do: $ svn update svn: Can't find a temporary directory I googled for this and found a hint it my be the repository. I check that I do have /tmp and it is not full and it is writable. -Steve ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] method/plugin for getting query string vars?
Hi Jörn, I seem to be missing something (so much to learn!). Your note creates an anonymous function that assigns its result to jQuery.query, but where does the function get attached and how does it get invoked, like in Luke's example. Thanks, -Steve Jörn Zaefferer wrote: Luke Lutman schrieb: I was thinking of something a little fancier ;-) jQuery.query = function() { var r = {}; var q = location.search; q = q.replace(/^\?/,''); // remove the leading ? q = q.replace(/\$/,''); // remove the trailing jQuery.each(q.split(''), function(){ var key = this.split('=')[0]; var val = this.split('=')[1]; // convert floats if(/^[0-9.]+$/.test(val)) val = parseFloat(val); // ingnore empty values if(val) r[key] = val; }); return r; }; Then you could use it like so: http://www.bork.com?foo=helloworldbar=0.333; $.query()['foo']; // helloworld (string) $.query()['bar']; // 0.333 (number) In that case, you should just assign the result to jQuery.query, eg: (function() { jQuery.query = r = {}; var q = location.search; q = q.replace(/^\?/,''); // remove the leading ? q = q.replace(/\$/,''); // remove the trailing jQuery.each(q.split(''), function(){ var key = this.split('=')[0]; var val = this.split('=')[1]; // convert floats if(/^[0-9.]+$/.test(val)) val = parseFloat(val); // ingnore empty values if(val) r[key] = val; }); })(); Considering that location.search does not change. I hope I'm not confusing something. -- Jörn ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Sorting (not tables)
Ok, I am just not worthy! sigh Somebody please walk me through how this plugin works. -Steve John Resig wrote: Hi Erik - With your particular example, give this plugin a try: jQuery.fn.sort = function() { return this.pushStack( [].sort.apply( this, arguments ), []); }; We've been talking about adding this for a little while now, so it may become official: http://jquery.com/dev/bugs/bug/255/ Using that plugin you can use your exact snippet, above. Let me know if this helps. --John I've been using jQuery for a month or so now and am really enjoying it! I haven't been able to figure out how to sort a collection of elements. I have something like the following: div class=entryspan class=foofoo1/spanspan class=barbar1/span/div div class=entryspan class=foofoo2/spanspan class=barbar2/span/div I would like to be able to do something like: $('.entry').sort(function(a, b) { return $('.foo', a).text()-$('.foo', b).text(); }).appendTo('#sortedStuff'); Or something like that. I know javascript has a sort function, but that's for arrays, so I'm not sure how that will work with jQuery? Also, a google search for 'jquery sort' (no quotes), brings up some stuff about sorting in the jQuery code, but it appears old and I can't find anything about sorting in the latest release. Lastly, jQarray.js seems like it would do what I want, but it appears that site is gone (taking jXs with it, btw). It would be nice if plugins were cached on the jQuery site. Anybody have jQarray/jXs? ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Sorting (not tables)
Ahhh! Thank you John! I was confused and thinking that sort was like an iterator, but it is not, it is operating on the whole collection returned by the $(...) search. And the pushStack makes sense now, so if I wanted the unsorted collection later you could reach into the stack and recover it presumably. Thank you for the enlightenment :) -Steve John Resig wrote: Sure. Let's start with this: [].sort.apply( this, arguments ) 'this' contains the current jQuery object, 'arguments' contains an array of all the arguments passed in to the .sort() function. jQuery Is a pseudo-array (not a true array) so it doesn't support operations like .sort(), natively. To mimic this, we get the sort function from a regular array: [].sort and then call it within the context of our jQuery array using JavaScript's apply method [].sort.apply( this, ... ) and pass in our arguments to it (which should be just a single function, which is exactly what an array's sort function takes). This whole mess returns a new array of DOM elements. Which brings us to the rest: return this.pushStack( ..., []); The pushStack function is part of jQuery, it allows it to keep a stateful watch over what you match (it allows you to do .find() and .end(), for example). In this case we want to make sure that .sort() is stateful, since it's modifying the contents of the jQuery object. The second argument to pushStack is normally the arguments array - this is so that you can do stuff like: .filter(.foo,function(){ ... }) but in this case, we don't have a function to pass into .sort(), so we just provide an empty array. The result is a stateful way of sorting a set of DOM elements contained within a jQuery object. It can be used like this: $(div.items).sort(function(a,b){ return a.innerHTML b.innerHTML ? 1 : -1; }).remove().appendTo(#itemlist); Hope this helps. --John On 10/19/06, Stephen Woodbridge [EMAIL PROTECTED] wrote: Ok, I am just not worthy! sigh Somebody please walk me through how this plugin works. -Steve John Resig wrote: Hi Erik - With your particular example, give this plugin a try: jQuery.fn.sort = function() { return this.pushStack( [].sort.apply( this, arguments ), []); }; We've been talking about adding this for a little while now, so it may become official: http://jquery.com/dev/bugs/bug/255/ Using that plugin you can use your exact snippet, above. Let me know if this helps. --John I've been using jQuery for a month or so now and am really enjoying it! I haven't been able to figure out how to sort a collection of elements. I have something like the following: div class=entryspan class=foofoo1/spanspan class=barbar1/span/div div class=entryspan class=foofoo2/spanspan class=barbar2/span/div I would like to be able to do something like: $('.entry').sort(function(a, b) { return $('.foo', a).text()-$('.foo', b).text(); }).appendTo('#sortedStuff'); Or something like that. I know javascript has a sort function, but that's for arrays, so I'm not sure how that will work with jQuery? Also, a google search for 'jquery sort' (no quotes), brings up some stuff about sorting in the jQuery code, but it appears old and I can't find anything about sorting in the latest release. Lastly, jQarray.js seems like it would do what I want, but it appears that site is gone (taking jXs with it, btw). It would be nice if plugins were cached on the jQuery site. Anybody have jQarray/jXs? ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] New Cheat Sheets in WIP, feedback , what you want to see
Klaus Hartl wrote: Stephen Woodbridge schrieb: 2. it looks like you have a typo on all of the {on}event you have {one}event, also you have ununload(fn) is this correct (i'm not familiar with the interface plugin?) Stephen, that is no typo, that is jQuery's superuseful feature to have an event only fired once (one click). ununload is to detach an unload event. Cool, I didn't know that. I just looked at Visual jQuery and found it. Thanks and please pardon my newbieness :), -Steve ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/