[jQuery] Re: editinplace plugin - change bakground color of loading div
On Oct 8, 2009, at 3:20 PM, mattastic wrote: Could someone please tell me how I can reference the loading div to change the background color? Which in place edit plugin do you mean and what you exactly are trying to do? -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Drag and drop file upload
This is a request for help from people who have Google Gears installed. Could you try the following demo: http://www.appelsiini.net/demo/gears_upload/demo.html Just drag and drop image or multiple images to the page and they are uploaded. I try to figure out if there are any browsers with which this does not work. I already know Gears is broken with FireFox 3.5.x. This should be fixed in next Release of Gears. -- Mika Tuupola http://www.appelsiini.net/
[jQuery] IE as native droptarget
You used to be able to use textarea as native droptarget even with IE. You could drag a link over textarea and the URL appeared when dropping. It seems during some point in last two months there has been an update to IE which prohibits this. Textarea is not a valid drop target for links anymore. When you try to drag an link to all you get is the "denied" mouse cursor (circle which line through it). Anyone know a workaround for this? -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: Edittable plugin problem
On Jun 3, 2009, at 5:56 PM, Gustavo Salomé wrote: If youre talking about Jeditable then id of the edited dom element is sent automatically. There is no need for any unorthodox magic. Try get it here: http://jsbin.com/ejejo/edit I made a live example too. 2009/6/3 bharani kumar The Boss , Link redirecting site not working BOSS , Please provide alternate link, Thanks On Tue, Jun 2, 2009 at 10:38 PM, Gustavo Salomé wrote: Its here: http://jquery.izfree.com/editable.js Now any function get the return (data, object) You can use it, for example, this way: $('object').editable({onSubmit:function(data,$this){ class=$this.attr('class'); }}); 2009/6/2 bharani kumar yes please send it On Tue, Jun 2, 2009 at 6:26 AM, Gustavo Salomé wrote: No way you can do this. Ive a modified version of the plugin that i made which can do this. Ill send to if u want it. 2009/6/1 bharani kumar Hi All, Am using the editable plug in , When i edit the values , i want to check the already exist and also want to pass the unique key to the query , for the Update WHERE condition , var oTable; $(document).ready(function() { /* Apply the jEditable handlers to the table */ </pre><tt>$('#example tbody td').editable( 'edit_update.php?id='(i want the </tt><tt>getID value here ), { </tt><pre style="margin: 0em;"> "callback": function( sValue, y ) { var aPos = oTable.fnGetPosition( this ); oTable.fnUpdate( sValue, aPos[0], aPos[1] ); } } ); /* Init DataTables */ oTable = $('#example').dataTable(); } ); id; echo ""; echo "$row->value"; echo ""; } ?> How i do this , Thanks -- Regards B.S.Bharanikumar http://php-mysql-jquery.blogspot.com/ -- Gustavo Salome Silva -- Regards B.S.Bharanikumar http://php-mysql-jquery.blogspot.com/ -- Gustavo Salome Silva -- Regards B.S.Bharanikumar http://php-mysql-jquery.blogspot.com/ -- Gustavo Salome Silva -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: Jeditable - How to style a button using CSS
On May 29, 2009, at 6:40 AM, Charles wrote: Hello all, I am a newbie to jquery and jeditable. I have a select that is working using jeditable. However, I cannot figure out how to style the submit button. I have the DIV of the field to edit within a of a table. Lets say you have something like this: $(".editable").editable("http://www.example.com/save.php";, { type : 'textarea', submit : 'OK', cancel : 'cancel', cssclass : "editable" }); Generated HTML would be like this: OK cancel You should then be able to style buttons with something like: form.editable > button { color : #F00 } -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: Make jeditable select show the option's text instead of value
On Mar 24, 2009, at 12:16 PM, gringo wrote: The selects options are displayed correctly when I click on the editable area but when I select something - for example 'blue' - the '2' string is used to replace original text instead of 'blue'. Looks like this is a bug in jquery. Jeditable displays the same string your saving script echoes back. Echo back "blue" from the saving script to display "blue". -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: jeditable addition of checkboxes, doubleclick to select.
On Feb 11, 2009, at 7:13 PM, Brian Loomis wrote: Unfortunately I am not able to get the checkbox to select without first selecting the containing element (which has the appearance of having to get the checkbox a double click to check it) However - the checkbox unselects with only one click. I do not have to click the containing element to get this behavior. I would like to get the checkbox to select with one click - before my designer whomps me with the usability paddle and makes me do a tear out and use standard forms. Sorry but I do not understand your explanation what you are trying to do. Do you want the checkbox to be automatically checked when you click editable element and the checkbox appears? You could try adding this to you custom input code: -cut- plugin : function(settings, original) { $("input", this).attr("checked", true); }, -cut- You need to set checked in plugin method instead of element because browsers are a bit touchy when value of input is set. -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Native offline jQuery docs for OS X
I accidentaly posted this to jquery-ui group first. Now I am guilty of cross-posting too :) Ruthless self promotion and ask for help. I created OS X dictionary from jQuery docs. Basically it is native offline document format and integrates fully with operating system. You can search the docs in Spotlight (Leopard only), context menus (Leopard and Tiger) and of course the dictionary itself. So if you could try it out. Report if you have any problems, especially Tiger users. I do not have access to Tiger at the moment. http://www.appelsiini.net/2009/2/search-jquery-api-docs-from-spotlight Thanks to David Serduke who wrote the Python script for exporting jQuery wiki to XML format. Also thanks Jörn Zaefferer whose XSLT stylesheets I used as basis for XSLT stylesheet which converts exported jQuery docs to OS X dictionary XML source. -- Mika Tuupola http://www.appelsiini.net/
[jQuery] plugins.jquery.com does not have 1.3.x
When submitting a new plugin or plugin release there is no 1.3.x option in the "plugins.jquery.com" pulldown. Can someone add it? -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: jeditable and checkboxes
On Jan 30, 2009, at 1:09 AM, Loomis wrote: Been trying to get to Mike's site today but it seems it's down: http://www.appelsiini.net/ Fixed. Apache got into weird loop. and am having luck saving the textbox change. I would like however to return a checked checkbox if selected and an empty one if it's deselected. ... My question is this: What is the best way to "fork" this so that the browser gets the html and I can write the value of yes or no to the table? Can you put some example online. I did not really understand what the saving script is returning and what you want to be outputted to page. Jeditable by default writes whatever the saving script returns to the page. -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: Jeditable submitting to function question
On Jan 13, 2009, at 9:56 AM, Rhys M wrote: just continues on. I can't seem to figure out a way to get the function to wait for the Ajax function to return and then in the callback somehow pass the value to the original function that Jeditable is expecting the return value from. Take the following code for example: Sorry it took a while. Was having a vacation. Have you tried setting the ajaxrequest to be synchronous with: async : false in Ajax options? -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Examples of great plugin documentation?
I am about to rewrite documentation of Jeditable plugin (has been on my TODO list for a while). While putting together some notes it would be great if people from list could send me links to other plugin documentation you have found to be well structured or written. -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: jeditable & autocomplete - time to revisit?
On Dec 28, 2008, at 3:23 AM, Diogo Merovingio wrote: I still with problems. When the "onblur" submit the form, the autocomplete didn't finish yet. The consequence is that when I select something from autocomplete and press tab the string submitted was only part of what I wrote (ex.: I write "fran", the autocomplete suggest "France", if I select or press tab the string posted is "fran"). Sorry it took a while. Was on vacation. I guess the problem is using submit onblur. The input most likely blurs when you tab. Have you tried using ignore onblur? -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: Licensing Question
On Dec 16, 2008, at 6:44 PM, Eric Hobo Garside wrote: I've got a quick question for all the licensing gurus who happen to be on or about the list. I'm developing a plugin for jQuery for a company, and want to release it as open source with a non-competition stipulation. Is it possible to release the code under something like a Creative Commons license where it's free for non corporate use, but requires companies who seek to use the product in a commercial sense If you want people to use your code just use a non-restrictive non- viral license (such as MIT). IMO. -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: [TUTORIAL] Create an amazing music player using mouse gestures & hotkeys in jQuery
On Dec 4, 2008, at 7:28 PM, AdrianMG wrote: You can see the tutorial over here: http://yensdesign.com/2008/12/create-an-amazing-music-player-using-mouse-gestures-hotkeys-in-jquery/ Should there be music too? It is silent for me FF3 & Safari in OSX? -- Mika Tuupola http://www.appelsiini.net/
[jQuery] UI download builder broken?
http://ui.jquery.com/download_builder/ Is UI download builder working? I choose the components I want and click download but nothing happens. It just resets the form. -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: [jEditable] select editinplace has empty pulldown
On Nov 30, 2008, at 11:07 PM, Rodent of Unusual Size wrote: I'm trying to set up some form elements for in-place editing using jEditable, but in every case the pulldown is always empty. Firebug doesn't reports any errors or problems. As far as I can tell, I'm doing this according to the documentation at the jEditable site. Is this me again? Jeditable excpects data to be json string. You are now passing native hash. The following should work: data : "{'1':'True','0':'False'}", -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: jeditable tooltip for empty table cell becomes content
On Nov 29, 2008, at 7:26 AM, Rodent of Unusual Size wrote: New demonstration case for another problem I've noticed with jeditable: http://apache.pastebin.ca/1270021 I'm making cells in a table editable, and passing jeditable a string for the hover tooltip. However, if the cell in question has no content (e.g., ) jeditable stuffs the tooltip into the element as its value. "Click to edit" is also default value for parameter "placeholder". Jeditable inserts the placeholder to element if it is empty (otherwise there is nothing to click). If you really want the empty you can do something like. $('.edit').editable('http://www.example.com/save.php', { placeholder : "" }); -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: Jeditable, async value
On Nov 27, 2008, at 6:37 PM, Viktor wrote: If the server responses I wanna set the title to the new value else I'd like to use the old value $(".title").editable(function(value, settings) { setTitle(function() { // return value }, function() { // return old_value }, value); }, { submit : 'OK' }); Are you actually calling setTitle() function at some point? Do you have example code somewhere onlne? Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: jeditable - Tabbing between jeditable elements
On Nov 21, 2008, at 7:10 AM, [EMAIL PROTECTED] wrote: At present, a tab keyPress results in discarding the edits. I have not been able to get the callback to fire to submit the edit then change focus to the target element if I tab out of the element. I would like the tab key to result in the submit event which would trigger the callback function. Is there anything I could do short of modifying the plugin? * @param String options[onblur]'cancel', 'submit', 'ignore' or function ?? cancel means discard edits when input goes out of focus. ignore means nothing happens. submit means the same as clicking submit. or you can write whatever function() { /* something *} if you have some unorthodox need :) Maybe onblur = submit is what you are after? -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: text link to fire Jeditable
On Nov 18, 2008, at 8:32 PM, RyOnLife wrote: One note for future readers... Though it seems clear to me now, took me a few minutes to realize that instead of trigger('edit'), use trigger('click') or trigger('dblclick')—whatever event you use in your editable() For people not to get confused. You absolutely CAN use trigger('edit') or trigger('foobar') or trigger('whatever'). Clicking external link has to trigger the SAME event you used in Jeditable settings. If you have $(".edit").editable("http://www.example.com/save.php";, { event : "edit" }); use trigger('edit') in external link. If you have $(".edit").editable("http://www.example.com/save.php";, { event : "click" }); Use trigger('click') in external link. And so on. On Nov 10, 5:05 pm, Mika Tuupola <[EMAIL PROTECTED]> wrote: On Nov 10, 2008, at 9:02 PM, RyOnLife wrote: Hello, I am using Jeditable. Currently firing the plugin when the editable div is double clicked. I'd also like to add a text link outside of the editable div, and when clicked, it would make the div editable. Just want to give my users a visual cue for those that aren't yet aware of the ability to double click. Can someone let me know how to do this? Thanks! There are many ways to do it. But for example If your html is: -cut- Editable text Edit me!! -cut- You could do something like: -cut- $(".edit").editable("http://www.example.com/save.php";, { event : "edit" }); $(".edit_trigger").bind("click", function() { $(this).prev().trigger("edit"); }); -cut- -- Mika Tuupolahttp://www.appelsiini.net/ -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: jeditable and XHTML?
On Nov 15, 2008, at 2:24 AM, Rodent of Unusual Size wrote: http://github.com/tuupola/jquery_jeditable/tree/master/ jquery.jeditab... Brilliant! Works a treat now. Ok great :) Thanks for the heads up! You betcha. Who closes the tracker item? i can close. -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: jeditable and XHTML?
On Nov 14, 2008, at 1:23 AM, Rodent of Unusual Size wrote: I want to use jeditable to edit fields in a table, but right now I'm trying to get it to work on any old XHTML.. Can you try latest from github: http://github.com/tuupola/jquery_jeditable/tree/master/jquery.jeditable.js?raw=true It was a stoopid mistake of using tags such as instead of in several places. Your test case passed ok now with my tests when xhtml is served as application/xhtml+xml. Thanks for the heads up! -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: jeditable and XHTML?
On Nov 14, 2008, at 1:23 AM, Rodent of Unusual Size wrote: Anyway, is there anything obviously wrong with the fragment at http://apache.pastebin.ca/1254469 ? BTW. You have an extra , in the code. Remove it from the last configuration parameter tooltip : 'Click to edit', -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: jeditable and XHTML?
On Nov 14, 2008, at 1:23 AM, Rodent of Unusual Size wrote: Is there a known problem with jQuery/jeditable and XHTML? I keep running into this 'invalid string' message with JS and XHTML. First Dojo, now here.. it's getting discouraging. What am I doing wrong? Do you have example page somewhere online? -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: jeditable & autocomplete - time to revisit?
On Nov 12, 2008, at 9:25 PM, [EMAIL PROTECTED] wrote: Wow, that was sooo simple. Works like a charm! Impressive.. Now, thats the way a plugin should work. Nice work Mike. Thank you :) Usually when someone has the need to do something special (such as use autocomplete) with Jeditable there is no need to touch Jeditable code itself. All you need to do is to write a custom input. The reason why I created the plugin architecture (plugins for plugin) was to avoid bloat. Take 10 people and they have at least eight different needs. Making all their needs a configurable option would bloat the code. Thus the solution: Make all basic features configurable and create API with which people can extend the features how ever they want. -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: jeditable & autocomplete - time to revisit?
On Nov 12, 2008, at 10:28 AM, Mika Tuupola wrote: On Nov 12, 2008, at 1:46 AM, [EMAIL PROTECTED] wrote: I was wondering if it my be possible to add autocomplete functionality using the addInputType API. It looks like it might be possible to attach autocomplete to the text input through the "element:" argument when declaring a custom input type. It should be fairly easy. Usually you just to need to create the element using "element" and add plugin to it using "plugin". It is basically 5 lines of code. Quick and dirty autocomplete input for Jeditable: -cut- $.editable.addInputType('autocomplete', { element : $.editable.types.text.element, plugin : function(settings, original) { $('input', this).autocomplete(settings.autocomplete.data); } }); -cut- Then you can call it with something like: -cut- $(".autocomplete").editable("http://www.example.com/save.php";, { type : "autocomplete", tooltip : "Click to edit...", onblur: "submit", autocomplete : { data : ["Aberdeen", "Ada", "Adamsville", "Addyston", "Adelphi", "Adena", "Adrian", "Akron"] } }); -cut- -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: jeditable & autocomplete - time to revisit?
On Nov 12, 2008, at 1:46 AM, [EMAIL PROTECTED] wrote: I was wondering if it my be possible to add autocomplete functionality using the addInputType API. It looks like it might be possible to attach autocomplete to the text input through the "element:" argument when declaring a custom input type. It should be fairly easy. Usually you just to need to create the element using "element" and add plugin to it using "plugin". Check for example these custom inputs: http://github.com/tuupola/jquery_jeditable_markitup/tree/master/jquery.jeditable.markitup.js http://github.com/tuupola/jquery_jeditable/tree/master/jquery.jeditable.autogrow.js http://github.com/tuupola/jquery_jeditable/tree/master/jquery.jeditable.charcounter.js http://github.com/tuupola/jquery_jeditable/tree/master/jquery.jeditable.masked.js I can give autocomplete a try later today if I have time. -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: text link to fire Jeditable
On Nov 10, 2008, at 9:02 PM, RyOnLife wrote: Hello, I am using Jeditable. Currently firing the plugin when the editable div is double clicked. I'd also like to add a text link outside of the editable div, and when clicked, it would make the div editable. Just want to give my users a visual cue for those that aren't yet aware of the ability to double click. Can someone let me know how to do this? Thanks! There are many ways to do it. But for example If your html is: -cut- Editable text Edit me!! -cut- You could do something like: -cut- $(".edit").editable("http://www.example.com/save.php";, { event : "edit" }); $(".edit_trigger").bind("click", function() { $(this).prev().trigger("edit"); }); -cut- -- Mika Tuupola http://www.appelsiini.net/
[jQuery] jQuery Tweets
I forgot who is running jQuery Twitter feed so I'll just ask here. How do you handle it? Do people send you tips on new websites using jQuery and new plugins? -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: Jeditable plugin
On Oct 2, 2008, at 1:33 AM, Dr3adl0ck wrote: I'd like to activate/deactivate making an edit in place field editable depending on if a user selects something. Is there a way in jQuery remove events associated with a class or something to that effect? $.unbind() It is probably a good idea to namespace your events. So instead of binding to click bind to click.editable. Then you can later $.unbind('click.editable) to remove click events related to inline editing. Otherwise it will unbind all click events. -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: jEditable Clone Referring to the Original Element, livequery ok to use?
On Sep 29, 2008, at 7:30 PM, Wayne wrote: Here's an example that I cut out of the project: http://dev.ficclaims.com/perf/proj/test.php When you click the link to "Add another baseline" that's when the clone will be made, and you can see how it works from there. The way I understand it, livequery should be dynamically unbinding and rebinding that jEditable function, but for some reason, I don't see it doing that. In layman's terms. After clicking baseline the new item is still editable, but the problem is when triggering the event it also makes not only the clicked element but also previous element editable. Is this your problem? -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: [jEditable] dynamically updating a parameter value
On Sep 29, 2008, at 11:55 AM, Bruce MacKay wrote: The following function loads a div on the current page with new content relating to an item ID of fID (selected from a list of items in another div on the page). I then use jEditable to allow the user to update the content of that item. That bit works fine on the first cycle. However, when I select and load in another item with a different fID, I cannot get jEditable to update its value for fID, either in the URL (first arrow) or through the submitdata function (second arrow). Maybe related to this: http://docs.jquery.com/Frequently_Asked_Questions#Why_do_my_events_stop_working_after_an_AJAX_request.3F ? -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: jEditable Clone Referring to the Original Element, livequery ok to use?
On Sep 27, 2008, at 11:39 PM, Brandon Aaron wrote: I understood he was binding Jeditable to event called "editable" (which is possible). So the question would have been does LiveQuery handle other than inbuilt jQuery events? Although maybe misunderstood the original question. Quickly looking over the jEditable docs, 'editable' isn't an actual event. You can instead use a function based live query like this: $('.editable, .bline_measure caption').livequery(function(){ $(this).editable(function(value, settings) { ... }); }); -- Brandon Aaron On Fri, Sep 26, 2008 at 4:24 PM, Wayne <[EMAIL PROTECTED]> wrote: I was trying to put livequery in place on the site, but it seems to attach to pre-known events, like click, instead of new events, like editable. For instance, I'm trying to do this: $(".editable, .bline_measure caption").livequery("editable", function(value, settings) { Wanting to watch these items and rebind editable to the newly created captions when I clone them. Is this not a good job for livequery? -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: jEditable Plugin question
On Sep 25, 2008, at 1:42 AM, 3apo wrote: edit_2. and want to toggle between the two edits based upon some criterion. So if do a $(this).removeClass('edit_1'); $(this).addClass('edit_2'); This doesnt really propagate thru, and the editable area is still stuck with edit_1 options. You need to bind editable again after changing DOM. Although without testing I am not sure how it will work if you bind a plugin to element twice. -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: jEditable Clone Referring to the Original Element, livequery ok to use?
On Sep 27, 2008, at 12:24 AM, Wayne wrote: I was trying to put livequery in place on the site, but it seems to attach to pre-known events, like click, instead of new events, like editable. Brandon would be the correct person to answer this. He knows the internals on livquery the best. -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: jEditable Clone Referring to the Original Element
On Sep 19, 2008, at 6:20 PM, Wayne wrote: In short, I can clone jEditable items, but I can't edit them in place without a page reload and rewriting from the server side. Am I ignoring something or do I need to reset a binding somewhere when I do the DOM modification? This should help: http://docs.jquery.com/Frequently_Asked_Questions#Why_do_my_events_stop_working_after_an_AJAX_request.3F basically you need to rebind events to cloned elements. -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: jquery.com incredibly slow for me
On Sep 17, 2008, at 8:34 PM, acacio wrote: I had the same problem so I switched to the Google hosted files and it's *much* faster. AFAIK jquery.com provides files for downloading not hotlinking. So you should have used your own server to serve js in the first place. -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: WYSIWYG input for Jeditable
On Sep 7, 2008, at 6:01 AM, C.Everson wrote: On Sat, 6 Sep 2008 16:38:55 +0300, Mika Tuupola wrote: http://www.appelsiini.net/projects/jeditable/wysiwyg/wysiwyg.html Selecting text and clicking the H1-3 does not work for me in IE7. Look like a bug in jWYSIWYG plugin itself. Will investigate a bit. Also FYI - where it says "Weblog|Projects" seems pushed down the page (half off the black area at the top). Argh. Update CSS on the site yesterday. Forgot old CSS to some of the demo pages. Fixed nod. -- Mika Tuupola http://www.appelsiini.net/
[jQuery] WYSIWYG input for Jeditable
This has been sitting in my SVN for a while. Now I had time to fix last issues with FireFox. WYSIWYG input type for Jeditable. It uses Juan M Martínez's jWYSIWYG plugin. Demo, download and instructions: http://www.appelsiini.net/projects/jeditable/wysiwyg/wysiwyg.html http://www.appelsiini.net/2008/9/wysiwyg-for-jeditable You might remember that there was also MarkItUp! input: http://www.appelsiini.net/projects/jeditable/markitup/markitup.html http://www.appelsiini.net/2008/4/markitup-for-jeditable And Sam Curren wrote TinyMCE input: http://sam.curren.ws/index.cfm/2008/6/12/jEditable-TinyMCE-Plugin -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: jeditable lazy load?
On Sep 5, 2008, at 10:06 AM, [EMAIL PROTECTED] wrote: I have a grid which uses several edit in place fields. The load time on this is very high and I'm desperately trying to reduce it. Is there a way that the edit in place is not set untill the field is clicked for the first time? Just a wild idea, but seems to work. On click even it attaches Jeditable which is triggered using custom event called edit. $(".editable").bind("click", function() { $(this).editable("http://www.example.com/save.php";, { event : 'edit' }).trigger("edit"); }); Although you still bind click to several elements. You would be better off delegating event. Bind click to parent element and figure out later which child was clicked. -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: jeditable questions
On Sep 5, 2008, at 1:45 AM, kadm wrote: - I can't style the form element at all, I mean when you click the editable text and it is transformed into a textfield/textarea, it has a plain style, I'm unable to customize it neither using {cssclass : "someclass"} nor with {style : "property: atribute"}. Are those options available and functioning OK? Why can it be failing? Lets say you have something like this: $(".editable").editable("http://www.example.com/save.php";, { type : 'textarea', submit : 'OK', cancel : 'cancel', cssclass : "editable" }); Generated HTML would be like this: OK cancel You should then be able to style textarea with something like: form.editable > textarea { color : #F00 } - When I click an editable text, and then hit Enter or Esc or click outside the textfield, the textfield goes back to text, as expected. But when I have multiple editable texts in the same page (same cssclass, obviously different IDs) and click/make editable one of them, then click on another, the previous one doesn't reset its editable state back to text, but the editable textfield persists. If you have $(".editable").editable("http://www.example.com/save.php";, { onblur : 'cancel' }); which is the default, Jeditable should work as you expect. See this demo page. Does it work as expected for you? http://www.appelsiini.net/projects/jeditable/default.html Are you sure you do not have onblur : 'ignore'? -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: jquery in rails/rjs files
On Sep 3, 2008, at 8:38 AM, Jochen Kaechelin wrote: Is it possible to use jquery in rails rjs files? JRails should provide drop in replacement for Prototype. http://ennerchi.com/projects/jrails -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: best techniques to optimize loading of multiple libraries?
On Sep 3, 2008, at 6:44 AM, viktor wrote: How do you minify a .js file? http://www.crockford.com/javascript/jsmin.html On bottom of the page is link for implementations in several languages. -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: idiot alert!!! stupid jeditable question
On Aug 25, 2008, at 4:31 PM, Chris Hall wrote: However, using this example, when I click on the text area to edit it I see that it looks correct (no br tags and the line breaks are present). However when I save the text area the display isn't correct The breaks aren't there (it appears they are still newlines and not br tags?). Jeditable displays whatever your saving scrip echoes back. If you send newlines, but after saving you want to show tags instead of newlines, saving script needs to convert newlines to tags before echoing them back. -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: idiot alert!!! stupid jeditable question
On Aug 18, 2008, at 3:08 PM, Chris Hall wrote: Sorry for the stupid question, but can someone help me understand what I need to do to with jeditable (great plugin!) so when my text area data is submitted the line breaks are converted to br tags, but when the user edits the same text area again the br tags become line breaks again? One way is to convert newlines to br by using function as data parameter. For example: $(".editable").editable("http://www.example.com/save.php";, { type : "textarea", submit : "OK", data: function(value, settings) { var retval = value.replace(//gi, '\n'); return retval; } }); -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: "Uncompressed", "Minified and Gzipped" and "Packed"
On Jul 16, 2008, at 7:48 PM, Andy Matthews wrote: Packed takes the source code and runs it through an algorithmn which compresses variable names, methods, code, etc into one big line of javascript. You can find more information about it, and pack your own code, here: http://dean.edwards.name/packer/ Minified uses server side compression to further reduce the file size. Drawback of this method is that your server needs to be equipped to offer this version, and the file needs to be de-compressed on the client side. Minifying does not use server side compression. Minifying means removing all unnecessary characters from source code, without changing its functionality. Minified JavaScript files are usually further packed by gzipping them. This is done on the fly by server. Apache comes with mod_deflate module by default. This handles gzipping. Packed files have to be uncompressed on client side too. While gzipped files are uncompressed by browser natively, packed files are "uncompressed" calling JavaScript eval() everytime page loads. -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: jEditable and .load
On Jun 18, 2008, at 10:01 PM, Philip Brown wrote: last entry to allow for more data to be entered. Here is the issue: I need to refresh the div that this information is contained in. If I use .load, the content is not editable. I have even created some static HTML in a separate file, used .load to import it, but editable regions are not active. Has anyone else ran into this issue. Any help would be appreciated. I guess these two answer you question. http://docs.jquery.com/Frequently_Asked_Questions#Why_do_my_events_stop_working_after_an_Ajax_request.3F http://docs.jquery.com/Frequently_Asked_Questions#Why_doesn.27t_an_event_work_on_a_new_element_I.27ve_created.3F -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Attachments in bug reports broken?
Somebody was nice enough to include example code in bug report. But to me it seems file attachments in plugin bug reports are broken. Trying to download the attachment returns "Page not found" error. For example: http://plugins.jquery.com/project/comments/add/2901 -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: jEditable Used Many Times on a Page
On May 29, 2008, at 8:48 PM, Roscoe wrote: You might want to check this tutorial from CakeBaker: http://cakebaker.42dh.com/2008/02/24/edit-in-place-with-jquery-and-cakephp/ jEditable. I've included a code sample below. Anything with 'opts.' in front of it is a variable which can change from editable item to editable item.For a sense of scale I'm talking about anywhere from 20-50 items per page that might need to be editable in some way. The code below only shows it for a select version. I am not familiar with PHP Cake. But just give all item you want to be editable some class. For example "editable". Then call Jeditable like this: $(".editable").editable("url_to_post_to", { your_options: "here" }); Has anyone attempted to use this on this kind of scale before? Am I perhaps approaching something the wrong way and making this too difficult for myself? It practically does not matter if you have 1 or 100 elements which are editable. obj.editable( "/cake/index.php/"+opts.saveCont+"/ajaxEdit? isSelect=true&model="+opts.model+"&field="+opts.dispField, This syntax looks a bit weird to me. What is obj in this case? -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: [jQuery][ANN] New jQuery group on LinkedIn
On May 8, 2008, at 5:51 PM, Brandon Aaron wrote: You can join the LinkedIn group by following this invite link: http://www.linkedin.com/e/gis/100943/4C28294034F5 Is larger version of that logo available somewhere? -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: jeditable and validation
On May 9, 2008, at 12:36 PM, Krz wrote: 1) When using jeditable plugin, how to add validate to the activated input field or textarea field for preventing some malicious people empty the data. Ive tried frantically to get this working together. My jeditable works fine. But im trying to include the validation. Ive tried putting the validation function everywhere. After several combinations, I've not got a clue to proceed. This is what I last ended up with: I made a small change to Jeditable. Download from URL below. Jeditable will now abort submitting form if custom inputs call before submit hook returns false. http://tinyurl.com/678scb Word of warning. This change is EXPERIMENTAL. I am not 100% happy with it. I just wanted to help you out and this seemed a quick solution. I might do some changes on how it works after testing. Anyways, this change enables you to write code like below: -cut- $.editable.addInputType('validate', { element : $.editable.types.text.element, submit : function(settings, original) { var validation_failed = true; /* Validate here... */ if (validation_failed) { original.editing = false; $(original).html(original.revert); return false; } } }); -cut- and then -cut- $(".editable_select").editable("save.php", { type : "validate", submit : "OK", }); -cut- -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: Ext went GPL
On Apr 24, 2008, at 2:26 PM, MichaL Sanger wrote: Does it mean, that if I have PHP application, that uses javascript under GPL3, I must release also PHP source? AFAIK if you bundle something GPL everything will become GPL. This includes your PHP source. However if you do not bundle GPL code with your application situation is different. Instead if you force your user to download and install GPL:d library / code themselves then they are bound to GPL. Not you or your code. All this is exactly why I do not touch or write anything GPL. Other licenses such and MIT and BSD are clear. I give users freedom to do whatever they want with my code. I do not want to force anyone to change their license to something, for example GPL. -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Ext went GPL
Just a heads up to everyone who has done some work with Ext. Since Ext 2.1 the new license is GPL3 (not LGPL). Since GPL is viral all code that bundles Ext will become GPL3 too. Something you might not want to happen. -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: WYSIWYG Editor
On Apr 17, 2008, at 2:59 AM, Donald J Organ IV wrote: Does anyone know of a lightweight(code size) WYSIWYG editor that works with jQuery it needs to only do basic HTML editing. I have good experiences with MarkItUp! http://markitup.jaysalvat.com/home/ -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: jEditable issue in Firefox 2.0.0.13
On Apr 14, 2008, at 1:34 PM, [EMAIL PROTECTED] wrote: I'm sorry I haven't had time to look deep into it. Did you have any thoughts on what might be caugsing the conflict? Thanks, but I think you missed the problem. 'Editable item' does work, but 'Editable tab 3' doesn't. The reason I included both a standard ul and tabs one controlled by UI in example was to prove there's nothing wrong with the editable() command (as they both have the class .tabEdit). Sorry I misunderstood. Now I can see the problem. Editing "Editable tab 3" never submits anything. Confirmed. I am looking through UI Tabs code now to see if I can figure out the problem. -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: Edit-In-Place with Form plugin
On Apr 11, 2008, at 3:05 AM, Chris wrote: My problem is that I cannot edit in place the items submitted with the form plugin without refreshing the page. http://docs.jquery.com/Frequently_Asked_Questions#Why_do_my_events_stop_working_after_an_Ajax_request.3F -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: jEditable issue in Firefox 2.0.0.13
On Apr 8, 2008, at 8:55 PM, [EMAIL PROTECTED] wrote: Thanks, but I think you missed the problem. 'Editable item' does work, but 'Editable tab 3' doesn't. The reason I included both a standard ul and tabs one controlled by UI in example was to prove there's nothing wrong with the editable() command (as they both have the class .tabEdit). Sorry I misunderstood. Now I can see the problem. Editing "Editable tab 3" never submits anything. Confirmed. I am looking through UI Tabs code now to see if I can figure out the problem. -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: jEditable issue in Firefox 2.0.0.13
On Apr 8, 2008, at 6:47 PM, Mika Tuupola wrote: On Apr 8, 2008, at 6:05 PM, [EMAIL PROTECTED] wrote: Hi Mika, Here's a sample: http://www.rymix.co.uk/jquery/d15/inline.html It doesn't actually _do_ anything, but if you look at server activity you'll see that ok.php never gets called. It returns 'OK!' Regards, Firefox 2.0.0.13 on OSX. I doubleclick "Editable item". Write something and then hit enter. Firebug show request to ok.php which responds "OK!". Browsers alerts a "sucess!". Just FYI. I also installed 2.0.0.13 on Windows machine and encountered no problems. Firebug shows a request to ok.php which return "OK!" and browser alerts "success!". -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: jEditable issue in Firefox 2.0.0.13
On Apr 8, 2008, at 6:05 PM, [EMAIL PROTECTED] wrote: Hi Mika, Here's a sample: http://www.rymix.co.uk/jquery/d15/inline.html It doesn't actually _do_ anything, but if you look at server activity you'll see that ok.php never gets called. It returns 'OK!' Regards, Firefox 2.0.0.13 on OSX. I doubleclick "Editable item". Write something and then hit enter. Firebug show request to ok.php which responds "OK!". Browsers alerts a "sucess!". Is the problem that you want Jeditable to submit data to server when you click somewhere on the page (ie on blur event of the input, not when user presses enter?). If this is the case do something like: -cut- $(".tabEdit").editable("ok.php", { onblur : "submit", event: "dblclick", indicator: "Saving...", tooltip: "Double-click to edit", callback : function(value, settings) { alert('success!'); } }); -cut- -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: $(window).bind("load",function(){ vs onready
On Apr 8, 2008, at 6:23 PM, Jake McGraw wrote: Regardless of whether it validates, it's considered best practices to keep all
[jQuery] Re: $(window).bind("load",function(){ vs onready
On Apr 8, 2008, at 6:06 PM, Jake McGraw wrote: Mixing content and logic, a no no for "standardistas". It really depends on how much content you have on any given page. I'd suggest using both the head and "footer" methods to determine what provides the best end user experience Vs what keeps your pages standard compliant. All my sites validate perfectly with
[jQuery] Re: $(window).bind("load",function(){ vs onready
On Apr 8, 2008, at 6:30 AM, coughlinsmyalias wrote: I have heard about loading them at the end of the page, I would love to see statistics on it as well. I understand this all now, I kept seeing both and I was confused each of them. When possible JavaScript should be loaded in the end of the page. Browsers stop rendering while JavaScript file loads. Browsers download only one JavaScript file at the time blocking also any new parallel downloads of other elements. Thus when moving all scripts just before closing body tag will make page finish rendering sooner. -- Mika Tuupola http://www.appelsiini.net/
[jQuery] markItUp! input for Jeditable
Finally had some extra time so I glued markItUp! and Jeditable together. Actually writing the blog entry took more time than JavaScript code. This custom input is only six lines long. I still decided to write one more tutorial on how to write Jeditable inputs. Below links to tutorial and separate demo page. http://www.appelsiini.net/2008/4/markitup-for-jeditable http://www.appelsiini.net/projects/jeditable/markitup/markitup.html Thanks to Jay Salvat for great plugin! It was incredible easy to work with (read, I encountered zero problems). All feedback and bug reports are welcome. -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: jEditable issue in Firefox 2.0.0.13
On Apr 7, 2008, at 9:18 PM, [EMAIL PROTECTED] wrote: If anyone's trying to debug this, I have also tried running a function rather than loading "ok.php". Even if that function contains only an alert (and a return - or even just a return) it doesn't get run in I would debug, but I need some example page where this problem happens. I understand that problem occurs when using together with UI tabs. But I still need the page :) -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: jEditable issue in Firefox 2.0.0.13
On Apr 4, 2008, at 6:48 PM, [EMAIL PROTECTED] wrote: Hi all, I am building a really simple jEditable (plugin) implementation with the latest jQuery SVN. Trouble is I can't get it to work in Firefox 2.0.0.13. In this example in Firefox, no cal is being made to the php file (php/ tabsave.php). It's just not attempting to call it at all. IE7, 6 and Safari are all working fine. Do you have test page online? Just tested with 2.0.0.13 and did not encounter any problems. -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Autogrow textarea for Jeditable
I made a new custom input for Jeditable. It uses Chrys Baders excellent Autogrow plugin. Even custom input is only few lines of code I wrote a small tutorial to show how it was built. http://www.appelsiini.net/2008/4/autogrow-textarea-for-jeditable Also separate demo here: http://www.appelsiini.net/projects/jeditable/custom.html Tested with main browsers, but I would appreciate all testing and feedback :) Thanks! -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: jEditable and TinyMCE
On Mar 25, 2008, at 11:11 AM, [EMAIL PROTECTED] wrote: I've got problem in using jEditable. I would like to use TinyMCE in text area showed by jEditable. Is it possible anyway? Yes. But you need to write custom input type for it. Basically it is just few lines of code. If you can wait for a while. I almost have markItUp! input for Jeditable done. I am just awfully busy atm so might take couple of days to finish it. If you don't have time to wait check these and DIY ;) http://www.appelsiini.net/2008/2/creating-inline-timepicker-with-javascript http://www.appelsiini.net/2007/9/three-button-editable http://www.appelsiini.net/2007/8/custom-input-types or check autogrow input demo and source. It should be pretty close how TinyMCE input would be done. http://www.appelsiini.net/projects/jeditable/custom.html http://www.appelsiini.net/download/jquery.jeditable.autogrow.js -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: jEditable selects - Adding/binding events?
On Mar 24, 2008, at 12:12 PM, dgt wrote: Hey all, I have the following jEditable which allows a user to change their mood: ... This works great, however I need to bind a click/change/mouseover event to the select that's generated by jEditable, so I can show a visual description of the option the user selects. Do I understand correctly. You want to display something, for example a smiley somewhere in the html page according to what is selected in the select, but before submitting the value. Basically display something when "onchange" is triggered by select? -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: Lazy load in IE7?
On Mar 22, 2008, at 3:53 PM, Jeroen Coumans wrote: I'm using the lazy load plugin from <http://www.appelsiini.net/ projects/lazyload>, but it doesn't seem to work properly in IE7. Some images load, others never finish loading. I tried playing with the failurelimit option but that doesn't affect it. Works great in Firefox and Safari 3 though. Anybody have an idea? Check http://jeroencoumans.nl/portfolio Sorry it took a while to answer. I cannot reproduce the problem with my IE7. Does problem occur to you in these demo pages too? http://www.appelsiini.net/projects/lazyload/enabled_gazillion.html http://www.appelsiini.net/projects/lazyload/enabled_fadein.html -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: Parallax scrolling, background & foreground elements
On Feb 18, 2008, at 8:15 PM, timothytoe wrote: Looks like 4 layers there. Anyone look at the code yet? Is there Javascript controlling the positioning or is it all CSS? All CSS. Different position-x values for three layers. position-x 20% position-x 40% etc AFAIK same kind of effect can be achieved by using different size background images which are centered. -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: Parallax scrolling, background & foreground elements
On Feb 18, 2008, at 5:57 PM, Ty (tzmedia) wrote: A recent site launch has a bit of a buzz surrounding the use of parallax backgrounds. When resizing the window width at: We did something vaguely similar, but not as cool and only with two layers (scroll and check the moon). It was done with JavaScript that it works great in IE and Safari, but not Firefox. But this Silverback CSS Parallax effect is awesome ! :) http://www.greenwhitechristmas.com/ -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: what editor do you use?
On Feb 13, 2008, at 6:38 PM, Feijó wrote: I changed my own a few weeks ago, now I'm using Editpad++ (http://sourceforge.net/projects/notepad-plus/ ) its freeware, nice resources, like macros, quick-text, highlighted source, .. Textmate with jQuery bundle, of course :) http://macromates.com/ http://www.learningjquery.com/2006/09/textmate-bundle-for-jquery -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: jQuery.SerialScroll
On Feb 12, 2008, at 1:56 PM, Ariel Flesler wrote: The Zip is 12kb overall.. I didn't feel it was important to add separate links to each 4 of the files.. but it's the second time I'm told that, so I'll see if I can add them to the blog, won't probably to the demo to keep it clean. It is not the size. It is inconvenient to download and unpack a zipfile only to see the JavaScript source. -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: jQuery.SerialScroll
On Feb 12, 2008, at 4:00 AM, Ariel Flesler wrote: Those 2 urls broke down... Here I go again: ScrollTo: http://flesler.blogspot.com/2007/10/jqueryscrollto.html LocalScroll: http://flesler.blogspot.com/2007/10/jqueryscrollto.html In plugin pages, could you provide straight link to source (not zipped). Now one must view source of the demo page to find url to JavaScript source. But anyway, good stuff! -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: jQuery won't recognise attribute names containing [square brackets]
On Feb 8, 2008, at 6:53 PM, Marty Vance wrote: PHP uses square brackets as a shortcut to automagically build arrays from the request data. Like Karl said, this is illegal in HTML, and So does Rails too. -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: UPDATER
On Feb 5, 2008, at 1:16 AM, [EMAIL PROTECTED] wrote: Is there any function like AJAX.UPDATER in Prototype ?? Or how can I automaticly do AJAX.req in time interval for.ex. 2 minutes ? Is there a need for plugin? Warning untested code, but you will get the idea. setInterval( $("#some_div").load("http://www.example.com/some_content.html ", 2000) ); -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Viewport selectors
http://www.appelsiini.net/projects/viewport I recently needed to locate images inside and outside of viewport. So I extracted selectors I had in Lazy Load and added some new ones. Result is viewport selectors plugin. Gives you new jQuery selectors such as: $(":in-viewport") $(":below-the-fold") $(":above-the-top") $(":left-of-screen") $(":right-of-screen") They are not the fastest ones so if you have gazillion of images / elements to check it will weel sluggish. I tested with main browsers but any feedback, especially bug reports are welcome. Demo here: http://www.appelsiini.net/projects/viewport/3x2.html -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: Jeditable across td's
On Jan 31, 2008, at 3:01 PM, frizzle wrote: I managed to achieve to change the trigger for the Jeditable items in DIVs. Now i've created an overview of files in a folder. It's presented in a table. But now the following code doesn't work anymore: $(".edit").editable("file.php", { event : "edit" }); $(".edit_trigger").bind("click", function() { $(this).prev().trigger("edit"); }); It would be good idea to familiarize yourself with jQuery and dom traversing. http://docs.jquery.com/Traversing My table roughly looks like this: test_in_testdir Edit me!! For example: $(".edit_trigger").bind("click", function() { $ (this).parent().parent().children().find(".edit").trigger("edit"); }); -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: File inputs
On Jan 31, 2008, at 5:59 PM, Steffan A. Cline wrote: Works in FF-Mac, Safari-Mac, IE6&7-PC I wish this could be incorporated into the jQuery plugin. I am not that well versed yet enough to do this. While basic it could be done to have a dummy field that strips the path and shows just the file name. That is my plan on the real page. Just out of interest. Have you seen this: http://www.appelsiini.net/projects/filestyle http://www.appelsiini.net/projects/filestyle/demo.html -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: File inputs
On Jan 30, 2008, at 6:11 AM, Steffan A. Cline wrote: Well, I tried many variations of .click() with FF and according to this link: http://www.quirksmode.org/dom/inputfile.html Yes, it is not possible to programmatically trigger click event on file input. But still, I would suggest you provide example page. I still do not understand what you are trying to do :) -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: File inputs
On Jan 29, 2008, at 7:08 PM, Steffan A. Cline wrote: I know there is a plug-in for styling file inputs but what about using a custom image instead? I need to do something where I have an ADD and a DELETE button side by side. I tried this using .click() and it worked flawlessly but alas FF does not support it! How stupid!. What are you trying to achieve? What does ADD and DELETE buttons do? -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: Google map plugin?
On Jan 29, 2008, at 12:51 AM, Chris J. Lee wrote: Is there one that is simpler? I just need a google map marker created on the map. And possibly a form to enter driving directions to it. Why not just use Google's own API? -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: question about $(document).ready
On Jan 28, 2008, at 2:21 PM, Alexandre Plennevaux wrote: Am i correct to assume it means that document.ready means the html page is loaded, but not other files, such as its css, img and js dependencies? Yes. If you are doing preloading it is better to bind to window.load. Otherwise preloading will make rest of the page feel sluggish. $(window).bind('load', function() { /* preload stuff here */ }); -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: Feb 12 IE6 Forced Update
On Jan 24, 2008, at 7:01 PM, Bil Corry wrote: Microsoft Corp. has warned corporate administrators that it will push a new version of Internet Explorer 7 their way next month, and it has posted guidelines on how to ward off the automatic update if admins want to keep the older IE6 browser on their companies' machines. <http://www.pcworld.com/businesscenter/article/141472/warning_an_ie7_autoupdate_is_coming_soon.html Arstechnica has some insights on this: http://arstechnica.com/news.ars/post/20080123-the-ie7-auto-rollout-fact-and-fiction.html "News is spreading that on February 12, Internet Explorer 7 will be flagged for "automatic installation" through Windows update. Microsoft has published a knowledgebase article detailing the push, but there's plenty of misinformation out there stemming from flawed understandings of what the article actually says. In short, the Windows world isn't about to be forced to upgrade to IE7" -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: Feb 12 IE6 Forced Update
On Jan 24, 2008, at 7:16 PM, Karl Swedberg wrote: Of course you could also install two virtual machines, one with IE6 and one with IE7. I do this with my Mac and Parallels (Fusion also works well), and I'm sure there are Windows VM apps out there. I could imagine running two Windowses at the same time is quite a memory hog. How much do you have? 10G ? :) -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: Change Jeditable trigger
On Jan 24, 2008, at 1:39 PM, frizzle wrote: -cut- Editable text Edit me!! -cut- You could do something like: -cut- $(".edit").editable("echo.php", { event : "edit" }); $(".edit_trigger").bind("click", function() { $(this).prev().trigger("edit"); }); -cut- Hope this helps. Thank you both for your answers. I don't have time to test it yet, but i'm eager to try them! The way i see it now, i'll need Javier's code, if i'm right Mika's code would still require the actual editable item to be a trigger. No, the trigger is after the editable item. All I did was I added class="edit_trigger" to example HTML you provided. -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: Change Jeditable trigger
On Jan 23, 2008, at 11:50 PM, frizzle wrote: Hi there, Imagine i have a DIV with editable content (with Jeditable), but i want the trigger for that to be a link behind the div. It´s probably very simple, but i´m pretty new to jQuery and do not know how to achieve this. It has to look somewhat like this; Editable text Edit me!! If your html is: -cut- Editable text class="edit_trigger">Edit me!! -cut- You could do something like: -cut- $(".edit").editable("echo.php", { event : "edit" }); $(".edit_trigger").bind("click", function() { $(this).prev().trigger("edit"); }); -cut- Hope this helps. -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: Jeditable + Json + Multiple Select
On Jan 22, 2008, at 6:04 PM, Mika Tuupola wrote: I do not fully understand what you are trying to do, but the data parameter can be a function. This function can dynamically set the values to what you want them to be. For example something like: Now when I look at the code. Are you trying to do an editable field, which when clicked becomes three separate selects? Something like the two time pickers in here: http://www.appelsiini.net/projects/jeditable/custom.html If that is the case you would be better off writing an custom input element for it. Below are two blog entries which describe how input type plugins for Jeditable work. http://www.appelsiini.net/2007/9/three-button-editable http://www.appelsiini.net/2007/8/custom-input-types You also might want the check source code of example input type plugins. Check especially "time" input type. It is closest to what you are trying to achieve. http://svn.appelsiini.net/svn/javascript/trunk/jquery_jeditable/jquery.jeditable.inputs.js -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: Jeditable + Json + Multiple Select
On Jan 22, 2008, at 4:29 PM, daweb wrote: and this is the Js code in which I'm trying to use the plugin: $(".clickOnThisSelect").editable ("idEntryCod)?>", { indicator : " '>", tooltip : "lang->line('clickToEdit')?>", name : "newvalue", id : "elementid", data : data.selectmessage.select_1[0], ** type : "select", onblur: "cancel", submit : "OK", cssclass : "clickOnThisSelect" }); ** How can I dinamically change data.selectmessage.select_1[0] whit data.selectmessage.n[0]? Is it possible? I do not fully understand what you are trying to do, but the data parameter can be a function. This function can dynamically set the values to what you want them to be. For example something like: $(".editable").editable("http://www.example.com/save.php";, { type : "select", submit : "OK", data: function(value, settings) { if (something) { retval = data.selectmessage.select_1[0] } else { retval = data.selectmessage.select_2[0] } return retval; } }); -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: OT: how to benchmark user hardware?
On Jan 22, 2008, at 2:18 PM, Fabien Meghazi wrote: 1/ detect user setup or perform some tests, to determine the available CPU, graphic Card, RAM, browser,OS. It may not even be necessary to know these datas, if we run a test that just tells us if the end user specs are speedy or not. 2/ send a different javscript file according to the results of the benchmark. Has anyone done somethiing similaror have any thought about this? You won't be able to determine gfx card, ram, etc... in javascript. (except for the window size) You can find the browser and os in the user agent, see $.browser or this plugin : http://davecardwell.co.uk/javascript/jquery/plugins/jquery-browserdetect/ Actually there is something called Intel Web 2.0 Technology Development Kit (sic) which enables you to get quite much information. Although it works only with Windows XP and needs an installed extension. So not too useful. http://softwarecommunity.intel.com/articles/eng/1026.htm -- Mika Tuupola http://www.appelsiini.net/
[jQuery] [plugin] Facebox
Maybe old news, but found from the intterwebs: http://famspam.com/facebox/ -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: Post-load images? Tips?
On Jan 21, 2008, at 10:02 AM, Micky Hulse wrote: A bit more info: The hardest part for me to figure-out is the best approach for knowing when all of the needed images are loaded... I think I can handle all the other aspects of the coding. Is there a good technique for knowing when a group of images has fully loaded? One way would be to preload images sequentially one by one. When the last one is loaded then you could be sure all images are fully loaded. Something like: -cut- $(window).bind('load', function() { var preload = new Array('image_1.png', 'image_2.png', 'image_3.png'); var img = document.createElement('img'); $(img).bind('load', function() { if(preload[0]) { this.src = preload.shift(); } else { /* all images have been loaded */ } }).trigger('load'); }); -cut- -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: jeditable question
On Jan 18, 2008, at 1:03 PM, Lionel Martelly wrote: Does anyone know why French accents will return "accènt"? Also if I try to reedit and save, without doing anything, it will multiply itself, over and over to the extent that a 3 letters word will strech full page width after 3 or four clicks. Only for those entries with accents. Most likely UTF-8 problem. Make sure everything (page, saving scripts etc etc) are using UTF-8. Do you have the problem page online somewhere? -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: instant edit
On Jan 15, 2008, at 6:54 PM, Lionel Martelly wrote: I just spent a tremendous amount of time trying to figure out what's wrong. I was supposed to hit "enter" instead of living the field. Is there a way to keep the value without having to do "enter"? e.g. by clicking outside of textbox? From the headers of jquery.jeditable.js -cut- * @param String options[onblur]'cancel', 'submit' or 'ignore' -cut- Default action of when user clicks outside of editable area is to cancel edits. You can control this by setting onblur option. Possible values are: * onblur : cancel Clicking outside editable area cancels changes. Clicking submit button submits changes. * onblur : submit Clicking outside editable area submits changes. * onblur : ignore Click outside editable area is ignored. Pressing ESC cancels changes. Clicking submit button submits changes -- Mika Tuupola http://www.appelsiini.net/
[jQuery] **SPAM** Re: [jQuery] instant edit
Spam detection software, running on the system "rio.rio.ee", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On Jan 15, 2008, at 3:32 AM, Lionel Martelly wrote: > Why is the instant edit not editing please? When I click on it it > allows me > to edit but the text does not update at all. > Thanks > $(function() { > $(".click").editable("save.php?do=instant", { > id: "head_420", > indicator : "", > tooltip : "click to edit", > style : "inherit" > }); }); class="click" > id="head_420" style="display: inline">click to > editif > ($_REQUEST['do'] == 'instant') { $myvalue = $_REQUEST['value']; > $head = > $_REQUEST['head']; $arts = explode("_",$head); $artid = > $articles[1];do db > update here echo $myvalue; exit; [...] Content analysis details: (5.8 points, 2.5 required) pts rule name description -- -- -0.7 BAYES_05 BODY: Bayesian spam probability is 1 to 5% [score: 0.0207] 6.5 AWLAWL: From: address is in the auto white-list --- Begin Message --- On Jan 15, 2008, at 3:32 AM, Lionel Martelly wrote: Why is the instant edit not editing please? When I click on it it allows me to edit but the text does not update at all. Thanks ---$(function() { $(".click").editable("save.php?do=instant", { id: "head_420", indicator : "", tooltip : "click to edit", style : "inherit" }); });-class="click" id="head_420" style="display: inline">click to editif ($_REQUEST['do'] == 'instant') { $myvalue = $_REQUEST['value']; $head = $_REQUEST['head']; $arts = explode("_",$head); $artid = $articles[1];do db update here echo $myvalue; exit; PHP part looks bit confusing to me. Have you checked with Firebug that values sent to PHP script are the values you are expecting? -- Mika Tuupola http://www.appelsiini.net/ --- End Message ---
[jQuery] Re: Conditional events
On Dec 21, 2007, at 9:32 PM, LeonL wrote: This will work fine - alert the edit var value. However, when adding 'event: "edit"' it wont do a thing: $(".item_title").editable("operator.php",{ submitdata: {'type': 'title'}, width: 250, event: "edit" }).bind("click",function() { alert(edit) }); Is there something I'm doing wrong? Thanks! Sorry it took awhile. Just came back from christmas travels. Make sure you are using recent version of Jeditable. Latest here: http://www.appelsiini.net/download/jquery.jeditable-1.5.2.js -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: Conditional events
On Dec 21, 2007, at 12:24 PM, LeonL wrote: Hello everyone. I've been trying for some time now to make this code to execute ONLY if a variable called edit equals to 1: The code: $(".item_title").editable("operator.php",{ submitdata: {'type': 'title'}, width: 250 });//EOE Does anybody have an idea how to do that?? Thanks. This is one way to do it: -cut- var check = 1; $(".item_title").editable("echo.php", { event : "edit", }).bind("click", function() { if (check) { $(this).trigger("edit"); } }); -cut- Basically it binds custom event "edit" to start Jeditable. Then after click it check if variable "check" is true. If it is it triggers "edit" event on Jeditable. -- Mika Tuupola http://www.appelsiini.net/
[jQuery] **SPAM** [SITE SUBMISSION] Finnish National Broadcasting Company
Spam detection software, running on the system "rio.rio.ee", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: http://www.yle.fi/ Seems to use at least Tabs 3 (Klaus's tabs), jCarousel and hoverIntent. -- Mika Tuupola http://www.appelsiini.net/ [...] Content analysis details: (7.7 points, 2.5 required) pts rule name description -- -- -0.5 BAYES_20 BODY: Bayesian spam probability is 5 to 20% [score: 0.1328] 8.2 AWLAWL: From: address is in the auto white-list --- Begin Message --- http://www.yle.fi/ Seems to use at least Tabs 3 (Klaus's tabs), jCarousel and hoverIntent. -- Mika Tuupola http://www.appelsiini.net/ --- End Message ---
[jQuery] Re: Img Src replacement
On Dec 12, 2007, at 8:49 PM, Glen Lipka wrote: I have a nav that I do not control the HTML Source. I want to have a hover event applied to the IMG so that when you hover over the img src changes from foo.gif to foo_on.gif and bar.gif to bar_on.gif. http://www.appelsiini.net/2007/6/sequentially-preloading-images I use something like above. Includes hover image preloading. -- Mika Tuupola http://www.appelsiini.net/