[jQuery] Adding properties to $.ajax(options)
$.ajax({ type: GET, url: prefix+url, success: script_saved, custom_property : someVar }); Is there anything wrong with this?
[jQuery] Re: Adding properties to $.ajax(options)
There is not an error, I was just wondering if this is frowned upon. On Apr 17, 8:32 am, Raja Koduru kscr...@gmail.com wrote: don't see any.. what is the error you are experiencing? - raja koduru On Fri, Apr 17, 2009 at 5:30 PM, blasto333 m...@chrismuench.com wrote: $.ajax({ type: GET, url: prefix+url, success: script_saved, custom_property : someVar }); Is there anything wrong with this?
[jQuery] Re: Adding properties to $.ajax(options)
There is not an error, I was just wondering if this is frowned upon. On Apr 17, 8:32 am, Raja Koduru kscr...@gmail.com wrote: don't see any.. what is the error you are experiencing? - raja koduru On Fri, Apr 17, 2009 at 5:30 PM, blasto333 m...@chrismuench.com wrote: $.ajax({ type: GET, url: prefix+url, success: script_saved, custom_property : someVar }); Is there anything wrong with this?
[jQuery] JQuery.isReady property
JQuery.isReady is NOT documented, but I have a valid use case for it and was wondering if there is a documented way of doing the same thing. I have a case where some code could be loaded as the page loads, but I don't have a particular function to fire until the document isReady. The same code could also be loaded in a context after the page loads (Injected into the dom) if (JQuery.isReady) { //Call function explicitly } else { //Call function on document.ready() }
[jQuery] click
I am having an odd behavior when calling click() on a checkbox [2] vs manually checking a checkbox [1]. function checkbox_click(event) { event.stopPropagation(); do_email(enable_email.url); if($(event.target).attr('checked')) { $(event.target).parent().parent().find(td).addClass('selected'); } else { $(event.target).parent().parent().find(td).removeClass(); } } 1. $('#sortable_table tbody :checkbox').click(checkbox_click); 2. $(#sortable_table tbody tr).click(function(event) { $(this).find(:checkbox).click(); }); #1 calls the function checkbox_click when a checkbox inside a table is clicked. Is a checkbox is checked after the click occurs,$ (event.target).attr('checked') is TRUE. #2 is called when a row in the table is clicked. It then finds the checkbox inside the row and clicks it. This causes checkbox_click to be fired, but ,$(event.target).attr('checked') is FALSE. How can I get the same result from each function?
[jQuery] Re: [autocomplete] do search on input focus
That works for when the field is focused by clicking in it, but now when tabbing into it (even though the focus event does occur!) Any other ideas? On Oct 23, 3:57 pm, Jörn Zaefferer [EMAIL PROTECTED] wrote: Try this: $(...).autocomplete(url, { minChars: 0 }).focus(function() { $(this).click(); }); Jörn On Thu, Oct 23, 2008 at 9:38 PM,blasto333[EMAIL PROTECTED] wrote: Still no luck, the plugin I am using is: http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/ On Oct 23, 6:21 am, Isaak Malik [EMAIL PROTECTED] wrote: Oups, I think it should be: $(function() { $(#category).focus(function(){this.autocomplete(do_search.php,{max:100, minChars:0,delay:10}) }); }); On Thu, Oct 23, 2008 at 12:16 AM,blasto333[EMAIL PROTECTED] wrote: That didn't work either. If I double click in the field, the expected behavior occurs. On Oct 22, 10:41 am, Isaak Malik [EMAIL PROTECTED] wrote: I have no idea which autocomplete plugin you're using but does the following work for you? $(function() { $(#category).focus(function(){$(this).autocomplete(do_search.php,{max:1 00,minChars:0,delay:10}) }); }); On Wed, Oct 22, 2008 at 4:19 PM,blasto333[EMAIL PROTECTED] wrote: Is there a way to force a field to do a search on focus of the input? (I basically want the user to be suggested a default set of items before typing anything. I tried this $(#category).autocomplete(do_search.php,{max:100,minChars:0,delay: 10}); -- Isaak Malik Web Developer -- Isaak Malik Web Developer
[jQuery] [autocomplete] do search on input focus
Is there a way to force a field to do a search on focus of the input? (I basically want the user to be suggested a default set of items before typing anything. I tried this $(#category).autocomplete(do_search.php,{max:100,minChars:0,delay: 10});
[jQuery] Re: [autocomplete] do search on input focus
That didn't work either. If I double click in the field, the expected behavior occurs. On Oct 22, 10:41 am, Isaak Malik [EMAIL PROTECTED] wrote: I have no idea which autocomplete plugin you're using but does the following work for you? $(function() { $(#category).focus(function(){$(this).autocomplete(do_search.php,{max:1 00,minChars:0,delay:10}) }); }); On Wed, Oct 22, 2008 at 4:19 PM, blasto333 [EMAIL PROTECTED] wrote: Is there a way to force a field to do a search on focus of the input? (I basically want the user to be suggested a default set of items before typing anything. I tried this $(#category).autocomplete(do_search.php,{max:100,minChars:0,delay: 10}); -- Isaak Malik Web Developer
[jQuery] JQuery $ function
How does this work...(This actually does what I want it to, but I am amazed that JQuery can figure out how to select from an array) function get_selected_rows() { var selected_rows = new Array(); $(#sortable_table tbody :checkbox:checked).each(function() { selected_rows.push($(this).parent().parent()); }); return selected_rows; } $(get_selected_rows()).parent().parent().remove();
[jQuery] tablesorter AJAX resort
I have an table that a user can sort by selecting one or more columns. A user can then do a search on the table which will clear out the tbody and then insert new table rows into the tbody. When this happens the table headings still have the user selections for which columns they want sorted, but the table is NOT sorted because of the ajax call and subsequent update to the tbody. I do this after the ajax update of the table. $(#sortable_table).trigger(update); I know I have to do $(#sortable_table).trigger(sorton,OPTIONS) in order for sorting to work, but I need options to be the current columns selected to be sorted. (This is in config.sortList, but I do not know how to access it.)