[jQuery] SuperFish - Auto width of main menu when vertical
Using a vertical menu and supersubs so that the submenus all have the correct width. The only thing missing is I need the main vertical menu to size itself to the correct width too! How can we make supersubs also correctly autosize the main items on the vertical menu?
[jQuery] $.ajax and $.get
Hi Guys, Need some help on $.get or $.ajax, I have the following code that will send request to server then get either JSON or XML data back, but it seems only working in IE8, not working in Firefox 3.5, In IE8, it returns: data: [object Object] textStatus: success something: undefined in Firefox 3.5 it returns: XMLHttpRequest: [object XMLHttpRequest] textStatus: parsererror errorThrown: undefined Wonder why am I getting parsererror here? $.ajax({ type: GET, url: http://192.168.213.85:8080/solr/select?q=northwt=jsonindent=onqt=standard , dataType: json, success: function (data, textStatus, something) { alert(data: +data+\n+textStatus: +textStatus+\n+something: +something); }, error: function (XMLHttpRequest, textStatus, errorThrown) { alert(XMLHttpRequest: +XMLHttpRequest+\n+textStatus: +textStatus+\n+errorThrown: +errorThrown); } }); Regards, W
Re: [jQuery] $.ajax and $.get
Hi Michael, It is one of our internal server here, and don't think you will have access to it, see the message it returns when I use $.ajax in IE8, it returns: data: [object Object] textStatus: success something: undefined in Firefox 3.5 it returns: XMLHttpRequest: [object XMLHttpRequest] textStatus: parsererror errorThrown: undefined Regards, W On Fri, Nov 27, 2009 at 5:28 PM, Michael Geary m...@mg.to wrote: If you would post a link to a test page, I'm sure someone can tell you what's wrong. Without that, we have to start playing 20 Questions. :-) First questions: 1) What is the response from the server in both cases? 2) Install Fiddler2 [*] and have it log the session. What does it show? -Mike [*]: http://www.fiddler2.com/ On Fri, Nov 27, 2009 at 5:50 AM, Wayne Tong wei.tong.n...@gmail.comwrote: Hi Guys, Need some help on $.get or $.ajax, I have the following code that will send request to server then get either JSON or XML data back, but it seems only working in IE8, not working in Firefox 3.5, In IE8, it returns: data: [object Object] textStatus: success something: undefined in Firefox 3.5 it returns: XMLHttpRequest: [object XMLHttpRequest] textStatus: parsererror errorThrown: undefined Wonder why am I getting parsererror here? $.ajax({ type: GET, url: http://192.168.213.85:8080/solr/select?q=northwt=jsonindent=onqt=standard , dataType: json, success: function (data, textStatus, something) { alert(data: +data+\n+textStatus: +textStatus+\n+something: +something); }, error: function (XMLHttpRequest, textStatus, errorThrown) { alert(XMLHttpRequest: +XMLHttpRequest+\n+textStatus: +textStatus+\n+errorThrown: +errorThrown); } }); Regards, W
[jQuery] (validate) Using text input arrays do not work
If you have the same 'name' for an input type, the error is only shown for the first one. For example, take the dynamic forms example: http://jquery.bassistance.de/validate/demo/dynamic-totals.html change the template it uses for adding rows and change it so the name of the input does not use the format {0} argument: input size='4' class=quantity min=1 id=item-quantity-{0} name=item-quantity / This should work as all the id's are unique and the names will cause an array to be formed. While the framework still attempts to validate - the error is only shown on the first text box. It should be shown on all items. If you correct the first item, the error will then be shown on the second item (if you hit submit) and so on. Please advise.
[jQuery] SuperFish: Auto width of main menu when vertical
Using a vertical menu and supersubs so that the submenus all have the correct width. The only thing missing is I need the main vertical menu to size itself to the correct width too! How can we make supersubs also correctly autosize the main items on the vertical menu?
[jQuery] How to animate a div's position
Hi, I have a div that is about half way down a page between some content. It displays 3 fields of a form. I have a add more info link, which when click expands the form to cover the page. This works great in FF, the div expands smoothly upwards to the top of the page, outward right out to the edge of the page, and down to the bottom. However in IE and safari, the div jumps to the top of the page and then expands out right and downward. I'm trying to get it to act the same as FF. My div: div id=formToShow style=border:1px solid red;width:500px;z-index: 30;background-color:#FFF; input type=text value=ad/br/ input type=text value=ad/br/ input type=text value=ad/br/ input type=submit/ a href=# id=moreinfo add more info/a more fields /div script: $('#moreinfo').click(function() { $('#formToShow').css(position,absolute); $('#formToShow').animate( { width: 100%, height: 100%, top: 0, left: 0, padding: 50pt }, 2000); }); Any ideas how I could get this to work, I've tried various combinates with no luck. I'm completly new to jquery so if you can help or have any pointers I would really appreciate it. many thanks Wayne
[jQuery] Re: [validate] Having an issue with validator clearing file input fields onfocus in IE
Hey! I'm afraid I cant provide a testpage, but here is a sample of the code if that help? script src=%= Url.Content (~/Scripts/jquery-1.2.6.js) % type=text/javascript/script script src=%= Url.Content (~/Scripts/jquery.validate.js) % type=text/javascript/script script type=text/javascript jQuery(document).ready(function(){ jQuery(#group-edit-form).validate({ rules: { title: { required: true, }, description: { required: true } }, }) }); /script h2Groups/h2 form action=%= Url.Action (Save, new { id = ViewData [GroupId] }) % id=group-edit-form class=GroupForm enctype=multipart/form-data method=post label for=groupImageUploadUpload group image*/label input type=file name=groupImageUpload id=groupImageUpload / label*emrequired field/em/labelinput type=submit name=submit value=Save gt;gt; class=submit / /form Thanks! Wayne On Dec 9, 9:57 pm, Jörn Zaefferer [EMAIL PROTECTED] wrote: Could you provide a testpage? Jörn On Tue, Dec 9, 2008 at 6:11 PM, Wayne Austin [EMAIL PROTECTED] wrote: Hi, i'm having an issue when using thevalidateplugin. When the plugin is applied to the form, if I select afilein myfileinput field then focus on another field in the form it removes the value. This only seems to happen in IE and only tofileinputfields. Any ideas as to why this would be happening? Thanks!- Hide quoted text - - Show quoted text -
[jQuery] [validate] Having an issue with validator clearing file input fields onfocus in IE
Hi, i'm having an issue when using the validate plugin. When the plugin is applied to the form, if I select a file in my file input field then focus on another field in the form it removes the value. This only seems to happen in IE and only to file input fields. Any ideas as to why this would be happening? Thanks!
[jQuery] Re: Way to use a Multi-Line Example Prompt in a Single-line Text Input Field
Yeah, that might work. I'm experimenting with making it suitable for my use, where I would need 2 labels, I guess. But, that would let me wrap text and do whatever I want without putting any text in the actual field. Thanks for the find. -Wayne On Oct 20, 10:55 am, Dan Switzer [EMAIL PROTECTED] wrote: Wayne: I'm trying to prompt for input within the field using the Example plugin (http://plugins.jquery.com/project/example). The idea is that I'm styling my input field to be unsually large when the user types (it will be no more than a 4 or 5 digits), so I can use closer to normal size text as the prompt. I know I can do this with a textarea, but it's semantically incorrect, and using the return key creates a new line. I don't want to shoehorn the simple input into a textarea, but I want the prompt to be meaningful, like Enter a measurement for this baseline, instead of type here or whatever short message I could use. I also like the amount of space that it takes up visually with two lines. What is a better way of doing this? Should I just use a jEditable element and style it to look like a form input? Why not just use an input / element? Use CSS to give it a transparent background and other styles you want and then place a div / with a lower z-index underneath with the label. I think maybe this plug-in does that: http://plugins.jquery.com/project/overlabel (But it might just be replacing the text in the field--the site is down at the moment.) If you do something like the following, then you can position the label underneath: div style=position: relative; input type=text style=font-size: 32px; background-color: transparent; z-index: 2; / div id=underlabel style=position: absolute; z-index; 1;Your label here.../div /div You'll need to set the underlabel div / to the dimensions of the input / element, but then you should be able to use CSS to control everything else about the layer. You can then just show/hide the underlabel based upon whether or not the field has focus. -Dan
[jQuery] Re: jQuery efficiency with a large DOM.
I obviously don't know your scale, specifically, but the site I've put together I don't consider to be all that deep, however, I see some apparent slowness with the AJAX actions having to wait for responses from my server scripts as well as short animations that seem to stack on each other waiting for things to happen in the order they're executed. If you'd like a better view into the timing of things, make sure you watch the page's performance in the Firebug extension (http:// getfirebug.com/) with the YSlow add-on (http://developer.yahoo.com/ yslow/), as well. Chrome has a similarly handy time charting mechanism, but I don't have it handy on my machine to see what it's called. You might also want to debug with BlackBird (http:// www.gscottolson.com/blackbirdjs/) as it makes it mindlessly easy to do time-profiling on the various components, to help you zero in on the slowness, some more. -Wayne On Oct 21, 11:49 am, ricardobeat [EMAIL PROTECTED] wrote: How many event handlers do you have registered? IE starts to slow down at some point. It seems that the obvious performance improvements have been taken care of (id selectors, tag names for class selectors), anything else would be implementation specific. Are you using livequery? On Oct 21, 7:48 am, mrmoosehead [EMAIL PROTECTED] wrote: Hi, I have a web app that is hosted within a .hta wrapper (for some security uses including hosting an ActiveX control) therefore uses ie as its engine. The app rarely, if ever leaves the containing page and all interaction with the server is done using ajax and loading information into various container 'controls' - hidden at times but left in the DOM for easy re-use, rather than reloading every time they want to view. I am finding that the speed of the interface is suffering badly as more stuff is loaded into the DOM. Most selectors are ID based ones where possible, therefore should be as efficient as possible. I cache jQuery objects where possible to avoid re-searching What I am finding is that it can take almost 2 seconds for an event to even be actioned by the browser - e.g a simple onclick on an element in a dynamically loaded chunk of HTML markup can take this time to even start actioning a $.get request. Anyone any thoughts as to why? Apart from it's IE - I get similar delays on FF and Chrome, but nowhere near the same magnitude. I am trying to keep the DOM as clean as possible, but it's hard with such a rich app. Any tips and tricks for efficiency in large DOM pages with jQuery? TIA.
[jQuery] Re: BUG: oversized overlay in IE web browsers ( demo included )
Is this why ThickBox sets all paddings and margins to 0? I agree, it's annoying. I switched to John's Greybox Redux (http://jquery.com/blog/2006/02/10/ greybox-redux/) for my modal, and I don't see problems on IE6. It also was more semantically correct than Thickbox's iFrame implementation of putting the sizes in the href. -Wayne On Oct 21, 1:04 pm, tallvanilla [EMAIL PROTECTED] wrote: (bump) Any takers? On Oct 20, 7:47 pm, tallvanilla [EMAIL PROTECTED] wrote: Thanks for the reply, Josh... but that isn't the problem. To demonstrate, I updated my demo according to your suggestion: http://74.205.76.81/blockuitest/ Even if that WAS the solution, it would force people to zero out their body padding and margins. Not a problem for most, but inconvenient for many. If you consider IE important, it's a blockUI bug. Any other takers? Here's how Boxy's author fixed it (in his own words): I've added a separate sizing method specifically for IE6 which uses the viewport dimensions instead of the document, and repositions on scroll as well as on resize. I tried using this approach for all browsers but Firefox was having none of it. JR On Oct 20, 4:09 pm, Josh Nathanson [EMAIL PROTECTED] wrote: This happens where there is some padding or margin on the body. If you set them to 0 via css it should take care of the problem. /* css */ body { padding: 0; margin: 0; } -- Josh - Original Message - From: tallvanilla [EMAIL PROTECTED] To: jQuery (English) jquery-en@googlegroups.com Sent: Monday, October 20, 2008 2:27 PM Subject: [jQuery] BUG: oversized overlay in IE web browsers ( demo included ) Hello. I found a minor bug that affects overlay in IE web browsers (at least in IE6). Please take a look at this very simple demo: http://74.205.76.81/blockuitest/ In IE(6), the overlay is a bit taller than the browser window, so a scrollbar appears on the right whenever the overlay is present. In other web browsers, this doesn't happen. I found a similar bug with the Boxy plug-in a couple of weeks ago, and its author was able to fix it pretty easily. I'm a jQuery/javascript novice, so I'm not sure how the fix was implemented. Would this be worthwhile and easy fix for blockUI as well? JR
[jQuery] Re: Way to use a Multi-Line Example Prompt in a Single-line Text Input Field
By way of example, here's what I'm currently using. I'm not happy with the textarea actions, though. http://dev.ficclaims.com/test/textbox.php Would it be smarter to use a textarea and switch it to an input[type=text] on click? Thanks, -Wayne On Oct 17, 1:16 pm, Wayne [EMAIL PROTECTED] wrote: I'm trying to prompt for input within the field using the Example plugin (http://plugins.jquery.com/project/example). The idea is that I'm styling my input field to be unsually large when the user types (it will be no more than a 4 or 5 digits), so I can use closer to normal size text as the prompt. I know I can do this with a textarea, but it's semantically incorrect, and using the return key creates a new line. I don't want to shoehorn the simple input into a textarea, but I want the prompt to be meaningful, like Enter a measurement for this baseline, instead of type here or whatever short message I could use. I also like the amount of space that it takes up visually with two lines. What is a better way of doing this? Should I just use a jEditable element and style it to look like a form input? -Wayne
[jQuery] Way to use a Multi-Line Example Prompt in a Single-line Text Input Field
I'm trying to prompt for input within the field using the Example plugin (http://plugins.jquery.com/project/example). The idea is that I'm styling my input field to be unsually large when the user types (it will be no more than a 4 or 5 digits), so I can use closer to normal size text as the prompt. I know I can do this with a textarea, but it's semantically incorrect, and using the return key creates a new line. I don't want to shoehorn the simple input into a textarea, but I want the prompt to be meaningful, like Enter a measurement for this baseline, instead of type here or whatever short message I could use. I also like the amount of space that it takes up visually with two lines. What is a better way of doing this? Should I just use a jEditable element and style it to look like a form input? -Wayne
[jQuery] AJAX Success Callback referring to $(this)
I've been looking for this quite a bit, today, and haven't quite found what I'm looking for, so maybe someone can point me in the right direction. I'm performing an AJAX request, and I pass an anonymous function as the success callback, upon which I will want to do some DOM modification to the element that triggered the AJAX event. Ordinarily, $(this) would work fine for doing this, but it seems that $(this) points instead to something besides a DOM element. First, what does $(this) point to when you're inside the AJAX Success callback. Second, what is considered the best practice for accessing the triggering element after a successful AJAX query? Any help is appreciated, Wayne
[jQuery] Re: AJAX Success Callback referring to $(this)
Here's a context of when it would be useful: jQuery.ajax({ data: inputs.join(''), url: delete_bline.php, timeout: 5000, error: function() { alert(Sorry, deleting the baseline could not be completed at this time. Please try again, later.); }, success: function(r) { delete_failed = ( isNaN(r) ); if( !delete_failed ) { var original_item = $(this).parents(li); // hide this element original_item.hide(slide, { direction: up }); // remove the matching node in the remeasures list $( #ri + original_item.attr(id).substr(2) ).remove(); // remove this node original_item.remove(); } Thanks, -Wayne On Oct 8, 10:57 am, MorningZ [EMAIL PROTECTED] wrote: How about posting what you have? that would give a good basis to start to explain it To hope to help though, since the Ajax request is made asynchronously, it loses the context of this On Oct 8, 10:49 am, Wayne [EMAIL PROTECTED] wrote: I've been looking for this quite a bit, today, and haven't quite found what I'm looking for, so maybe someone can point me in the right direction. I'm performing an AJAX request, and I pass an anonymous function as the success callback, upon which I will want to do some DOM modification to the element that triggered the AJAX event. Ordinarily, $(this) would work fine for doing this, but it seems that $(this) points instead to something besides a DOM element. First, what does $(this) point to when you're inside the AJAX Success callback. Second, what is considered the best practice for accessing the triggering element after a successful AJAX query? Any help is appreciated, Wayne
[jQuery] Re: AJAX Success Callback referring to $(this)
OK. I haven't tried this yet, but how is this any different? Even though you're moving the ajax call inside of another function, aren't you abstracting the same logic out by calling the anonymous function inside of success? Maybe I'm not understanding what trigger and trigger condition are supposed to represent, but I assumed that was related to my isNaN(r) logic. Thanks, -Wayne On Oct 8, 12:36 pm, Josh Nathanson [EMAIL PROTECTED] wrote: this referenced in the success callback will refer to the jQuery object when you do an ajax call. You might want to put the ajax call within another function that can also receive information about the triggering element: doAjax: function( trigger ) { jQuery.ajax({ // etc. success: function() { if ( trigger condition ) { // do stuff } } }); } $(triggeringelement).click(function() { doAjax( this ); }); -- Josh - Original Message - From: Wayne [EMAIL PROTECTED] To: jQuery (English) jquery-en@googlegroups.com Sent: Wednesday, October 08, 2008 7:49 AM Subject: [jQuery] AJAX Success Callback referring to $(this) I've been looking for this quite a bit, today, and haven't quite found what I'm looking for, so maybe someone can point me in the right direction. I'm performing an AJAX request, and I pass an anonymous function as the success callback, upon which I will want to do some DOM modification to the element that triggered the AJAX event. Ordinarily, $(this) would work fine for doing this, but it seems that $(this) points instead to something besides a DOM element. First, what does $(this) point to when you're inside the AJAX Success callback. Second, what is considered the best practice for accessing the triggering element after a successful AJAX query? Any help is appreciated, Wayne
[jQuery] Re: AJAX Success Callback referring to $(this)
Right, but that trigger doesn't work in the context of the anonymous function. Unless, I'm missing something you changed. -Wayne On Oct 8, 3:43 pm, Josh Nathanson [EMAIL PROTECTED] wrote: Ok, I think I see what's happening -- you have something like this: $(whatever).click(function() { $.ajax({ blah blah.. So you just need to do this: $(whatever).click(function() { var trigger = this; $.ajax({ success: function() { // do whatever with 'trigger' } }); }); -- Josh - Original Message - From: Wayne [EMAIL PROTECTED] To: jQuery (English) jquery-en@googlegroups.com Sent: Wednesday, October 08, 2008 12:15 PM Subject: [jQuery] Re: AJAX Success Callback referring to $(this) OK. I haven't tried this yet, but how is this any different? Even though you're moving the ajax call inside of another function, aren't you abstracting the same logic out by calling the anonymous function inside of success? Maybe I'm not understanding what trigger and trigger condition are supposed to represent, but I assumed that was related to my isNaN(r) logic. Thanks, -Wayne On Oct 8, 12:36 pm, Josh Nathanson [EMAIL PROTECTED] wrote: this referenced in the success callback will refer to the jQuery object when you do an ajax call. You might want to put the ajax call within another function that can also receive information about the triggering element: doAjax: function( trigger ) { jQuery.ajax({ // etc. success: function() { if ( trigger condition ) { // do stuff } } }); } $(triggeringelement).click(function() { doAjax( this ); }); -- Josh - Original Message - From: Wayne [EMAIL PROTECTED] To: jQuery (English) jquery-en@googlegroups.com Sent: Wednesday, October 08, 2008 7:49 AM Subject: [jQuery] AJAX Success Callback referring to $(this) I've been looking for this quite a bit, today, and haven't quite found what I'm looking for, so maybe someone can point me in the right direction. I'm performing an AJAX request, and I pass an anonymous function as the success callback, upon which I will want to do some DOM modification to the element that triggered the AJAX event. Ordinarily, $(this) would work fine for doing this, but it seems that $(this) points instead to something besides a DOM element. First, what does $(this) point to when you're inside the AJAX Success callback. Second, what is considered the best practice for accessing the triggering element after a successful AJAX query? Any help is appreciated, Wayne
[jQuery] Re: jEditable Clone Referring to the Original Element, livequery ok to use?
Wow! Hey, that actually worked. I don't fully understand why, though. I thought that clone(true) simply allowed for jQuery to grab a clone from the new clone. Does livequery duplicate or interfere with that procedure? Thanks for digging into my code, Brandon. I seem to be working, now. -Wayne On Sep 29, 10:31 pm, Brandon Aaron [EMAIL PROTECTED] wrote: After glancing over the JS it looks like you are using both live query and clone(true). Using both is unnecessary and might be the cause of the issue. Just try using one of the two and see if that resolves your issue. -- Brandon Aaron On Mon, Sep 29, 2008 at 2:04 PM, Wayne [EMAIL PROTECTED] wrote: On Sep 29, 1:25 pm, Mika Tuupola [EMAIL PROTECTED] wrote: 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? Right, because I'm cloning the :last li of the list, that's the element that the editable latches onto. In the example linked, it's the caption tag of each table within the li. -Wayne
[jQuery] Show/Hide items in unordered list
I have a unordered list of, say, ten items. I want to initially show five items and provide the user with a plus and minus key to either increase or decrease the number of viewable items. This is commonly done in expandable content boxes and can be seen on sites such as http://www.bbc.co.uk I am sure there is an easy way to do this in jQuery, however, I am probably over thinking it. I can dynamically show / hide the entire list, however, not the individual li items. Does anyone have any sample code or an example they have seen that they could point me towards? Thanks in advance. Wayne
[jQuery] Re: Show/Hide items in unordered list
MorningZ, thank you very much! That is perfect and will do nicely to get me started in the right direction. I wasn't sure if I needed to assign unique ids to the individual li items or not and your example shows me I can do it without them. Very cool. Thanks, again. Wayne On Sep 30, 6:03 am, MorningZ [EMAIL PROTECTED] wrote: This help to get the idea of what could be done? http://paste.pocoo.org/show/86584/ On Sep 30, 1:19 am, Wayne Dyck [EMAIL PROTECTED] wrote: I have a unordered list of, say, ten items. I want to initially show five items and provide the user with a plus and minus key to either increase or decrease the number of viewable items. This is commonly done in expandable content boxes and can be seen on sites such ashttp://www.bbc.co.uk I am sure there is an easy way to do this in jQuery, however, I am probably over thinking it. I can dynamically show / hide the entire list, however, not the individual li items. Does anyone have any sample code or an example they have seen that they could point me towards? Thanks in advance. Wayne
[jQuery] Re: jEditable Clone Referring to the Original Element, livequery ok to use?
I may have phrased it poorly, but, for my needs, the livequery function would probably work. However, any method that I try still seems to be binding the jEditable onto both the clone and the original. That is, if I click on the clone to edit it, it opens jEditable forms on both the original and the clone, and when I submit, it will only submit AJAX data based on the original element. 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. Any insight is appreciated. -Wayne On Sep 28, 3:48 pm, Mika Tuupola [EMAIL PROTECTED] wrote: 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 Tuupolahttp://www.appelsiini.net/
[jQuery] Re: jEditable Clone Referring to the Original Element, livequery ok to use?
On Sep 29, 1:25 pm, Mika Tuupola [EMAIL PROTECTED] wrote: 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? Right, because I'm cloning the :last li of the list, that's the element that the editable latches onto. In the example linked, it's the caption tag of each table within the li. -Wayne
[jQuery] Re: jEditable Clone Referring to the Original Element, livequery ok to use?
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? -Wayne On Sep 22, 9:06 am, Wayne [EMAIL PROTECTED] wrote: Thanks, Mike. This info helps. Great work, btw. -Wayne On Sep 20, 12:22 pm, Mika Tuupola [EMAIL PROTECTED] wrote: 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_st... basically you need to rebind events to cloned elements. -- Mika Tuupolahttp://www.appelsiini.net/
[jQuery] Re: cool new DatePicker with a familiar name, but how to make multi-month start with current
Glad it helps. Make sure that there's no conflict with adding a month to a 31 day month when there is no 31 in the following month (i.e. 8/31 + 1 month = 9/31 which doesn't exist). I didn't test it, but that might give you an unexpected result. -Wayne On Sep 22, 5:21 pm, pedalpete [EMAIL PROTECTED] wrote: Very nice work around Wayne, can't believe I didn't think of that. Here's the code I used to set-up the next month in case anybody else needs this. [code] function multiCalDate(){ var startingDate = new Date(); var startMonth = startingDate.addMonths(1); return startMonth; } [/code] On Sep 22, 1:00 pm, Wayne [EMAIL PROTECTED] wrote: Wow, that's got some pretty styling. Good find. I don't know how to modify the plugin code, but I found that if you want to display the current month as the first month, you can set the current value to a date in next month, while leaving the date value to the date you want initially selected. As follows: $('#date').DatePicker({ flat: true, date: '2008-09-22', current: '2008-10-01', calendars: 3, starts: 1 }); Hope that helps, -Wayne On Sep 22, 2:40 pm, pedalpete [EMAIL PROTECTED] wrote: I've been using Kevin Lucks datepicker for the past few months, and I was trying to figure out how to make it a 'range' datepicker when I came acrosshttp://www.eyecon.ro/datepicker/ The naming will probably get confusing, but this is a really nice range picker. I am having one problem with it though. When I show multiple calendars on my page (3), I've got is showing last month, this month, and next month, but I'm trying to get the code to show this month, next month, following month as there is no point in having history on my site. The section of code which defines which calendars to display is [code] for (var i = ; i options.calendars; i++) { date = new Date(options.current); date.addMonths(-currentCal +i); tblCal = cal.find('table').eq(i+1); switch (tblCal[0].className) { case 'datepickerViewDays': dow = formatDate(date, 'B, Y'); [/code] changing to 'date.addMonths(currentCal +i)' starts at next month, and everything else I've tried screws everything up. Any idea how to change this code to show this month?
[jQuery] Re: jEditable Clone Referring to the Original Element
Thanks, Mike. This info helps. Great work, btw. -Wayne On Sep 20, 12:22 pm, Mika Tuupola [EMAIL PROTECTED] wrote: 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_st... basically you need to rebind events to cloned elements. -- Mika Tuupolahttp://www.appelsiini.net/
[jQuery] Re: cool new DatePicker with a familiar name, but how to make multi-month start with current
Wow, that's got some pretty styling. Good find. I don't know how to modify the plugin code, but I found that if you want to display the current month as the first month, you can set the current value to a date in next month, while leaving the date value to the date you want initially selected. As follows: $('#date').DatePicker({ flat: true, date: '2008-09-22', current: '2008-10-01', calendars: 3, starts: 1 }); Hope that helps, -Wayne On Sep 22, 2:40 pm, pedalpete [EMAIL PROTECTED] wrote: I've been using Kevin Lucks datepicker for the past few months, and I was trying to figure out how to make it a 'range' datepicker when I came acrosshttp://www.eyecon.ro/datepicker/ The naming will probably get confusing, but this is a really nice range picker. I am having one problem with it though. When I show multiple calendars on my page (3), I've got is showing last month, this month, and next month, but I'm trying to get the code to show this month, next month, following month as there is no point in having history on my site. The section of code which defines which calendars to display is [code] for (var i = ; i options.calendars; i++) { date = new Date(options.current); date.addMonths(-currentCal +i); tblCal = cal.find('table').eq(i+1); switch (tblCal[0].className) { case 'datepickerViewDays': dow = formatDate(date, 'B, Y'); [/code] changing to 'date.addMonths(currentCal +i)' starts at next month, and everything else I've tried screws everything up. Any idea how to change this code to show this month?
[jQuery] jEditable Clone Referring to the Original Element
Hi all, I'm trying to make a jEditable element part of an duplicateable group of elements so that users can create as many elements as they want. What I'm running into is that, while the new elements take on the properties of the original counterparts, the jEditable elements that are newly inserted still refer to the item from which I based the clones, which has a unique ID from the clone. 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? Thanks, Wayne