[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] Re: jEditable issue in Firefox 2.0.0.13
(and is jEditable the best edit-in-place plugin for jQuery anyway?) Yes.
[jQuery] Can you poll a database with jQuery or do I just use plain ajax?
Hi, new to jQuery and really any of the javascript libraries. I have read about many of them and seen the examples and am settling on jQuery or Mootools. If I want to poll a database every x seconds and view new entries by users on a site (assuming I have many users updating, etc.), is that an ajax only thing or is that jQuery? In other words, is that something that I should do in Ajax alone or use the ajax jQuery classes? Thanks.
[jQuery] Re: cluetip on Safari Mac throws error: NO_MODIFICATION_ALLOWED_ERR: DOM Exception 7
I managed to find the issue. I was serving the page as valid application/xhtml+xml, which Safari mac apparently didn't like. Switching to the less-valid text/html fixed the issue, albeit with a warning upon validation. On Mar 31, 9:08 am, Karl Swedberg [EMAIL PROTECTED] wrote: When I open your page in Firefox, I immediately get the following error message in the Firebug console: An invalid or illegal string was specified code: 12 The Safari error is a little different, I see. I wonder if it might have something to do with the permissions that are set for that file on your server? Just a guess here, but since the script is doing some DOM modification, maybe you have something set that doesn't allow for that. Perhaps you could try temporarily setting the file to 777 and see what happens. If that doesn't work, you could try isolating where that error is coming from. For example, if you think it's the cluetip script, you could remove all of your other script references (except the core jquery one, of course). Then use a selector that points to a single element. --Karl _ Karl Swedbergwww.englishrules.comwww.learningjquery.com On Mar 31, 2008, at 1:06 AM, Krittick wrote: Yeah, that page works fine, but my page doesn't, although the syntax doesn't seem to have any issues. Page is visible athttp://krittickalhost.net/plans/ The ? text is what triggers the cluetip event on hover. It's using the span title method of displaying it. On Mar 30, 9:01 pm, Karl Swedberg [EMAIL PROTECTED] wrote: Hmm. Not sure. Might it have something to do with an ajax request? Are you testing it on a page that resides on your local machine? Are you getting the same error on this page? ...http://plugins.learningjquery.com/cluetip/demo/ It's working fine for me here with Safari 3.1 Mac. If it's a problem with a page up on a public server, can you provide a link? Thanks, --Karl _ Karl Swedbergwww.englishrules.comwww.learningjquery.com On Mar 29, 2008, at 10:58 PM, Krittick wrote: Safari on mac is throwing this error: NO_MODIFICATION_ALLOWED_ERR: DOM Exception 7 When using any method to call the tooltip function. Safari Windows has no issues, nor does any other browser. Any ideas?
[jQuery] change in the slide panel movement
Dear all, I am working on slide panel as in http://www.webdesignerwall.com/demo/jquery/simple-slide-panel.html what i need to do is a reversed movement, instead of on clicking the div is pulled down, on clicking the div is pulled up Please advice me what do i need to do. Thanks in advance.
[jQuery] Re: Hover flickers when mousing over select box
Karl, Thanks so much. You have helped me solve the issue. My implementation ended up looking more like this, but it works: $('.pos_fix').hover( function() { $(this).children('.IL_hover').fadeIn(fast); }, function(event) { if ( (!$(event.target).is('option')) (!$ (event.target).is('select')) (!$(event.target).is('div.form_box')) (!$(event.target).is('form')) ) { $(this).children('.IL_hover').fadeOut(fast); } } ); I will be sure to put some credit to you in my code and look forward to seeing your fix in action at the release of patterntap.com Greatfully yours, Chris On Apr 4, 1:21 pm, Karl Swedberg [EMAIL PROTECTED] wrote: Hi Chris, I'm not sure why this is happening, but I think I know how to fix it. Jörn Zaefferer and I ran into this same problem with our tooltip/ clueTip plugins the other day. Following the approach that Jörn proposed for the plugins, you might be able to fix the problem by making sure that the target property of the event argument is not an option element: $('document').ready(function() { $('#hoverthis').hover( function() { $(this).children('#showonhover').fadeIn(fast); }, function(event) { if ( !$(event.target).is('option') ) { $(this).children('#showonhover').fadeOut(fast); } } ); }); Give that a shot and see if it works for you. --Karl _ Karl Swedbergwww.englishrules.comwww.learningjquery.com On Apr 4, 2008, at 12:18 AM, Chris wrote: http://patterntap.com/hover-test.html Check out the URL above for the test case. The flicker happens in all browsers (IE 7, Firefox and Safari). The showonhover appears on when the parent div is hovered over. Inside showonhover is a SELECT box. When I try to select an item it causes the entire hover area to flicker. Any thoughts on why this is happening and how to fix it?
[jQuery] Re: New Plugin to help optimise usage of jQuery plugins - contributions welcome
Ariel, thanks for the feedback. I included the debugging option so that developers can see how long it takes for some plugins to load, so that they could optimise it accordingly (fewer selectors for each plugin, no/less calls to getNeeded() function). It seems however that 'alternate stylesheet' isn't the trick for Opera in this case. On Apr 4, 9:21 pm, Ariel Flesler [EMAIL PROTECTED] wrote: Just a guess, but set rel=alternate stylesheet to the style.. it solved a problem I had some time ago, not exactly this, but I know it is a quirk. -- Ariel Fleslerhttp://flesler.blogspot.com On 4 abr, 12:27, Nicolas R [EMAIL PROTECTED] wrote: There seems to be a problem with the plugin when loading external CSS and the browser is Opera. From what I understand Opera loads the DOM first, and then the CSS (all others do it the other way around). For some reason external style sheets will not be applied to the DOM (even if they are appended to the 'head' or 'body' or wherever). This issue was found when using $.getPlugin with datepicker a thickbox plugins, both of which have a script and a stylesheet. As they both append elements to the DOM after $(document).ready, and after their styles have been loaded, the styles are not applied to the newly appended elements. Any suggestions about this? On Apr 4, 2:19 am, Nicolas R [EMAIL PROTECTED] wrote: Hey all, I've just released getPlugin, a plugin that aims to minimise loading/ rendering times by keeping unnecessary scripts and styles out of the DOM. What it does is basically check whether or not a specific plugin/ script/style should be imported, and then imports it. The concept is similar to $.getScript, but it's much more flexible (and it also allows browsers to cache the external files, so that download times are even shorter). Basic syntax is : $.getPlugin(plugin,[check],[data],[callback]); As the goal of this plugin is to keep loading times as short as possible, any suggestions and modifications that help achieve that goal are more than welcome. The one issue that I encountered has to do with events and ajax requests, where events are removed from elements updated via ajax. If anyone has a fix for this or any suggestion I'm all ears. For those interested the plugin can be found at:http://plugins.jquery.com/project/getPlugin Cheers- Ocultar texto de la cita - - Mostrar texto de la cita -
[jQuery] How can I check what button was clicked
Hi, For example I have form method=post input type=submit name=edit_1 id=edit_1 value=Edit_1 br / input type=submit name=edit_2 id=edit_2 value=Edit_2 br / input type=submit name=edit_3 id=edit_3 value=Edit_3 br / input type=submit name=edit_4 id=edit_4 value=Edit_4 br / /form So how can I know that Edit_3 was clicked or other?
[jQuery] Re: cluetip on Safari Mac throws error: NO_MODIFICATION_ALLOWED_ERR: DOM Exception 7
Thanks for sharing your discovery! Glad to hear that you managed to resolve the issue, even though the solution required a compromise. --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com On Apr 5, 2008, at 2:15 AM, Krittick wrote: I managed to find the issue. I was serving the page as valid application/xhtml+xml, which Safari mac apparently didn't like. Switching to the less-valid text/html fixed the issue, albeit with a warning upon validation. On Mar 31, 9:08 am, Karl Swedberg [EMAIL PROTECTED] wrote: When I open your page in Firefox, I immediately get the following error message in the Firebug console: An invalid or illegal string was specified code: 12 The Safari error is a little different, I see. I wonder if it might have something to do with the permissions that are set for that file on your server? Just a guess here, but since the script is doing some DOM modification, maybe you have something set that doesn't allow for that. Perhaps you could try temporarily setting the file to 777 and see what happens. If that doesn't work, you could try isolating where that error is coming from. For example, if you think it's the cluetip script, you could remove all of your other script references (except the core jquery one, of course). Then use a selector that points to a single element. --Karl _ Karl Swedbergwww.englishrules.comwww.learningjquery.com On Mar 31, 2008, at 1:06 AM, Krittick wrote: Yeah, that page works fine, but my page doesn't, although the syntax doesn't seem to have any issues. Page is visible athttp://krittickalhost.net/plans/ The ? text is what triggers the cluetip event on hover. It's using the span title method of displaying it. On Mar 30, 9:01 pm, Karl Swedberg [EMAIL PROTECTED] wrote: Hmm. Not sure. Might it have something to do with an ajax request? Are you testing it on a page that resides on your local machine? Are you getting the same error on this page? ...http://plugins.learningjquery.com/cluetip/demo/ It's working fine for me here with Safari 3.1 Mac. If it's a problem with a page up on a public server, can you provide a link? Thanks, --Karl _ Karl Swedbergwww.englishrules.comwww.learningjquery.com On Mar 29, 2008, at 10:58 PM, Krittick wrote: Safari on mac is throwing this error: NO_MODIFICATION_ALLOWED_ERR: DOM Exception 7 When using any method to call the tooltip function. Safari Windows has no issues, nor does any other browser. Any ideas?
[jQuery] Re: get next item of sibling relationship unknown (was: first child of type form control)
Caveat- I'm a newbie, and I'm just guessing...but I thought I would try to answer some questions rather than just asking them... Does it fail when there is more than one ? Try an .eq(0) i.e. $('.scrollTo').eq(0).findNext(:input).focus(); On Apr 4, 9:50 am, dug [EMAIL PROTECTED] wrote: Richard, Thanks for your fantastic advice on my next problem. I realise that the way I initially asked the question I didn't explain the requirement in enough detail. Here's my challenge: - I have a valid xhtml document that contains a a name=ScrollTo class=scrollTo / tag. I don't know where this tag will appear, it may be in a form, it may not. - There will be instances (I don't control the doc gen) where multiple a name=ScrollTo class=scrollTo / tags appear - in some cases, the page will include objects with class=scrollTo AND class=errorState The script does two things. 1 - If exists class=errorState then scroll the page down to the first instance of errorState. Else scroll page to first instance of class=ScrollTo 2 - Starting from the point the page has been scrolled to, continue down the document and set the focus to the next instance of a form input widget (any, could be radio, check, textarea, text, select etc.) The problem I have is I can't know ahead of time the sibling relationship between the first instance of error or scroll and the form input object. Currently I have the following: $(document).ready(function() { // scroll to the first instance of .errorState if exists otherwise scroll to .scrollTo var $scrollTarget = $('.errorState'); if($scrollTarget.length 0) { $.scrollTo('.errorState', 1000); $('.errorState').findNext(:input).focus(); } else { $.scrollTo('.scrollTo', 1000); $('.scrollTo').findNext(:input).focus(); } }); The scroll is working but the focus only works intermittently Thanks :-) Dug
[jQuery] cycle plugin with image Array
hello, is it possible to configure cycle plugin to retrieve image files from an array instead of a li config? what i would like to achieve is: when you do have many images per list download times can get long so i was thinking that a dynamic download could help.. but im not sure of it.
[jQuery] Re: ui.tabs - setting the title attribute of newly added tab
Try: $('#example').tabs({ add: function(ui) { ui.tab.title = foo; } }); --Klaus On Apr 5, 1:17 am, rolfsf [EMAIL PROTECTED] wrote: How do I set the title attribute of the anchor element of a newly created tab? In one case, I'm generating the tab label (tab name) and panel ID from the title attribute of my triggering element (an anchor tab for simplicity), but I'm truncating tab labels longer than 25 characters. I want the full (long) label to be available to the user via hover. Hence, I want to set the title attribute as I'm generating the new tab... but I don't quite understand how I do that my basic function is $('#wrapper ul.tabs-nav').tabs('add', tabID, tabName); tabID and tabName are the results of some truncating and cleaning var fullName is a variable that holds the full text I'd like to use as a title attribute any help is much appreciated rolfsf
[jQuery] Re: jQuery History Plugin
You'll probably have to maintain the state on your own. I'm currently rewriting the History plugin, so that you can do: $.history('add', 'state_name', function { // handle, e.g. restore state... }); --Klaus On Apr 5, 1:12 am, sbyrne [EMAIL PROTECTED] wrote: I'm with you regarding the click event, but how does that solve the problem of the state of the form (values of the input fields) when it was submitted via AJAX? On Feb 27, 2:43 pm, Klaus Hartl [EMAIL PROTECTED] wrote: History can only work with links because the whole hack relies on changing the fragment identifier of the current address. This is not possible with form submits. Workaround: Use a click event that submits the form as an Ajax form. The form plugin makes that pretty easy and maybe you were talking of my history plugin: http://stilbuero.de/jquery/history/ --Klaus On Feb 27, 7:54 pm, urbolutions [EMAIL PROTECTED] wrote: Is there a good jQuery history plugin that works with form submissions? Critical part being form posts here. Found one that seems to only work with click events...need the form posts. Any help would be greatly appreciated!
[jQuery] Re: jquery tabs bind to tabselect
Try (with latest version from SVN): var $tabs = $('.ui-tabs-nav').tabs({ select: function(ui) { alert( $('a', $tabs).index(ui.tab) ); } }); Maybe it is a good idea to attach the index to the ui object, so that you could do: alert(ui.index); or something similiar... this question pops up from time to time. I'll add that to my Todos. --Klaus On Apr 4, 4:49 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hello, I'm trying to incorporate jquery tabs to a project at work. I read in the documentation that you can bind to stages of the tab. I would like to bind to the tabselect stage i.e. $('.ui-tabs-nav').bind('tabsselect', function(event, ui) { ui.instance // internal widget instance ui.options // options used to intialize this widget ui.tab // anchor element of the currently shown tab ui.panel // element, that contains the contents of the currently shown tab }); My question is that I really need to be able to figure out the index of the ui element in all tabs inside of the bind statement. Could someone shine some light as what's the best way to do it? I looked closely at the ui object but didn't find anything. Perhaps I just missed it. Help is appreciated. Thanks!
[jQuery] Re: cycle plugin with image Array
is it possible to configure cycle plugin to retrieve image files from an array instead of a li config? what i would like to achieve is: when you do have many images per list download times can get long so i was thinking that a dynamic download could help.. but im not sure of it. There is no support for that in the plugin. When you invoke the cycle function it is expected that all the slides exist in the DOM at that time. How you get them there is up to you, but cycle doesn't support dynamically adding them at later stages.
[jQuery] click on a link and have a table appear - can't get it to work
I'm a newbie to jquery, so no flames please...I have a basic 3 column web page - nav, center and left. That works great. My left column is navigation. When I click on a link on the left nav pane, I want a basic table to appear in the center and right panes - not even getting anything from a database, just displaying a schedule table. It seems pretty easy but I must be doing something wrong. Here is my jquery js: $(document).ready(function() { $('#btn-slide').click(function() { $(#col1).show('slow'); return false; }) }) Here is my nav stuff: ul class = categoryitems li # id=btn-slideSchedule /li Later in the code is the middle column that I want replaced with the new material when the user clicks on a nav link: div class=col1 id=col1 blah, blah... /div What am I doing wrong?
[jQuery] Re: click on a link and have a table appear - can't get it to work
Shouldn't it be li id=btn-slideSchedule/li On Sat, Apr 5, 2008 at 9:09 AM, ktpmm5 [EMAIL PROTECTED] wrote: I'm a newbie to jquery, so no flames please...I have a basic 3 column web page - nav, center and left. That works great. My left column is navigation. When I click on a link on the left nav pane, I want a basic table to appear in the center and right panes - not even getting anything from a database, just displaying a schedule table. It seems pretty easy but I must be doing something wrong. Here is my jquery js: $(document).ready(function() { $('#btn-slide').click(function() { $(#col1).show('slow'); return false; }) }) Here is my nav stuff: ul class = categoryitems li # id=btn-slideSchedule /li Later in the code is the middle column that I want replaced with the new material when the user clicks on a nav link: div class=col1 id=col1 blah, blah... /div What am I doing wrong? -- Ted
[jQuery] Re: click on a link and have a table appear - can't get it to work
Let's make a few adjustments to your code and see what happens... First (and something I used to forget when I first started), do you have your jquery referenced in the head section of your document? script src=jquery-1.2.2.pack.js type=text/javascript/script Now, the jquery... try this: $(document).ready(function() { $('#col1').hide(); $('#btn-slide').click(function() { $('#col1').toggle('slow'); return false; }); }); Above, added the second line to initially hide the table with id=col1. Also, I changed the show function to toggle so the table with show or hide depending on its state when clicked. Now, on the link, we need to fix up your mark-up a little. Try this: ul class=categoryitems lia id=btn-slide href=#Schedule/a/li /ul And here's the simple table I created to test the function: table id=col1 width=200 border=1 tr tdTable col1/td tdnbsp;/td /tr /table I tested it in IE7 and FF2. The table's not beautiful, but at leat it proves the code works. Let me know if you have any more questions! :o) Rick -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of ktpmm5 Sent: Saturday, April 05, 2008 9:10 AM To: jQuery (English) Subject: [jQuery] click on a link and have a table appear - can't get it to work I'm a newbie to jquery, so no flames please...I have a basic 3 column web page - nav, center and left. That works great. My left column is navigation. When I click on a link on the left nav pane, I want a basic table to appear in the center and right panes - not even getting anything from a database, just displaying a schedule table. It seems pretty easy but I must be doing something wrong. Here is my jquery js: $(document).ready(function() { $('#btn-slide').click(function() { $(#col1).show('slow'); return false; }) }) Here is my nav stuff: ul class = categoryitems li # id=btn-slideSchedule /li Later in the code is the middle column that I want replaced with the new material when the user clicks on a nav link: div class=col1 id=col1 blah, blah... /div What am I doing wrong?
[jQuery] Sticky (scrolling) element
Hi there I have a scrolling box here: http://backflip.info/test/ Everything works fine except for two things: - I'd like the box to start scrolling not until arriving at the top of the page. Now there is always the initial margin. Is this possible with the ui.slider I'm using? - When the box is higher than the screen (click expand) there is an unwanted effect when scrolling to the bottom of the page. How can I define a minimal margin to the bottom? Thanks a lot, Thomas
[jQuery] Re: How can I check what button was clicked
Hola, You'd want to do something like this, probably: $(input).click(function() { var foo = $(this).attr(name); //do something }); Alternatively you could just set a click event to each one. $(#edit_1).click(function() { //do something... }); $(#edit_2).click(function() { //do something... }); $(#edit_3).click(function() { //do something... }); $(#edit_4).click(function() { //do something... }); On Apr 5, 6:17 am, keyser_soze [EMAIL PROTECTED] wrote: Hi, For example I have form method=post input type=submit name=edit_1 id=edit_1 value=Edit_1 br / input type=submit name=edit_2 id=edit_2 value=Edit_2 br / input type=submit name=edit_3 id=edit_3 value=Edit_3 br / input type=submit name=edit_4 id=edit_4 value=Edit_4 br / /form So how can I know that Edit_3 was clicked or other?
[jQuery] Re: random tab and simple content switching
Hi Sperks I'm a bit new at JQuery and have been following what you have done here. I'm trying though to add a third id in and can't figure out how to get it to work with an additional set of div's or more for that matter. Can you help? On Feb 22, 2:33 pm, sperks [EMAIL PROTECTED] wrote: I worked a little longer and in case anyone has been watching trying to work out what I was on about... Here's my final code. I don't thinks it's very clean, and I'm sure there are easier ways of doing this, ways that don't require me to name the ids, etc., but I'm not familiar with the intricate workings of math functions. Heck I'm proud I got this far. $(document).ready(function() { var ids = [ 'latestArticle', 'inTheMag' ]; var index = Math.round( Math.random()*10 ) % 2; var id = ids[ index ]; $('#mainArticle #' + id + ' .teaser').hide(); $('#mainArticle #' + id + ' h1 span').addClass(hidden); $('#mainArticle div h1').click(function(){ var place = $(this).parent().attr(id); $('#mainArticle h1 span').addClass(hidden); $('#' + place + ' h1 span').removeClass(hidden); $('#mainArticle .teaser').hide(); $('#' + place + ' .teaser').slideDown('slow'); }); }); On Feb 21, 6:32 pm, sperks [EMAIL PROTECTED] wrote: update: I'm still looking for the random side of things, but I've got a solution for the switching. However, I'm a little concerned that I'm targeting h1 rather than the span (how do I go back two parents?) $(document).ready(function() { $('#mainArticle #latestArticle .teaser').hide(); $('#mainArticle #latestArticle h1 span').addClass(hidden); $('#mainArticle div h1').click(function(){ var place = $(this).parent().attr(id); $('#mainArticle h1 span').addClass(hidden); $('#' + place + ' h1 span').removeClass(hidden); $('#mainArticle .teaser').hide(); $('#' + place + ' .teaser').slideDown('slow'); }); });
[jQuery] ui real world demo modification
http://dev.jquery.com/view/trunk/ui/demos/real-world/layout/ Anyone made a modification to this one so that the positions after drag and drop can be saved in cookie
[jQuery] Re: Autocomplete and JSON
Many thanks Shawn and Jorn - the use of the MAX parameter makes sense now. Onto, Ajax and JSON. On the Autocomplete site there is an example as follows: EXAMPLE Autocomplete a text-input with data received via AJAX. For small to medium sized datasets. JavaScript: $.getJSON(my_backend.php, function(data) { $(#input_box).autocomplete(data); }); HTML: input id=input_box / Is this still valid to use for my requirements with a large number of string items on the server, a small subset of string items returned to Autocomplete, and continually going back and forth to the server for subsets of data? I'm using a Python backend which has a module (library) called 'simplejson' that can package the subset data into JSON format before sending to Autocomplete. Cheers! Dinesh On Apr 2, 1:14 pm, Shawn [EMAIL PROTECTED] wrote: As Jorn said (and he'd be THE definitive source as the author of that plugin) - the MAX parameter is not used by the server. Otherwise, I think you have the gist of it. The routine regarding the MAX goes like so: - user enters some text - that text is passed to the server side code via the Q parameter - the server side code does something that may or may not make use of the Q parameter to generate results. (The point is that what happens on the server doesn't really matter for the plugin - as long as the results are in the proper format) - the server then sends those results back. ALL of them that matched the server side processing. If you had 100 entries that started with A and the user had typed A then you would be getting 100 entries returned to your plugin (assuming you did the filter correctly on the server) - The plugin checks if it has a MAX value - if so then it takes the first X results and displays them. (where X is the MAX value) - If there is no MAX value (or it is set to zero - I think), then all the results are rendered. So, if the server side filtering results in 1000 values, then 1000 values are returned to the script. If a MAX value is not specified, then 1000 values are displayed. So, you may want to set a height and overflow: auto on the result div so you get a nice scrollbar. Don't forget that MAX may have a default value. I think the docs say it defaults to 10, but I remember getting eradicate issues with this. But that was probably my specific code. Anyways - I found it better to set an explicit value for MAX to get the behavior I wanted (which was to NOT restrict the number of output rows...). Not sure if it helps, but I blogged about the autocomplete plugin back in December: http://grover.open2space.com/node/190 More to do with making use of database IDs with the results though. Maybe this is a little advanced for what you need, or maybe it'll trigger something that'll help... (otherwise, my apologies if this is a shameless plug) Shawn dineshv wrote: Hi Shawn. Thank-you very much for the clear explanation. I mean remote as in the same domain. Let's see if I understand your explanation: A large number (10,000) of string items are held in a database (or array) at the server. We want to make the string items available to the autocomplete plugin at the browser. However, we only want a (relevant and small) subset of the string items sent to the browser at a time dependent on what the user enters into the input box. Text (well letters, really) entered into the input box are sent to the server as the autocomplete 'q' parameter. The server queries the database (or array) to find MAX items around the user-entered text and sends these items to the browser (as aJSONstring). The MAX parameter can be set within autocomplete or within the query to the database (or array). Is this the gist of it? Btw, my backend is written in Python. Dinesh On Apr 1, 4:09 pm, Shawn [EMAIL PROTECTED] wrote: When you say remote, do you mean another domain?? If so, then yes there are some problems there, but your server side page for getting your results can handle that. If you mean remote as in not on the same web page, but from a file/database accessible in the same domain, then I suspect a slight misunderstanding is taking place here. In this case, you feed the autocomplete plugin a file to request your data from. That file can be server side processing code that will dynamically create your results list for you. How that server side page goes about the process is irrelevant to the autocomplete plugin - it only cares about what data it is given. So, the sample you need is something like this: $(#mytext).autocomplete(mydata.php); Then the mydata.php file does the filtering you need: ?php $sql = select name from employee where name like '. $_GET[q] .'; //... database connection code $result = $db-query($sql); //... code to generate the autocomplete input based on the data //in the $result variable.
[jQuery] @ Mike Alsup: Cleartype fix
Thanks again for your help last night, Mike. Client's so happy with the result using Cycle, she's decided to go live before her new site is finished! ( http://homeholistics.com ) jQuery fade is ruining my beautiful work in ie7. I've tried the available Cleartype fixes, but they're not working - whereas the one you've included with Cycle does! I'm prepared to use Cycle unneccesarily if I have to, but wondered if you'd share the secret with the rest of us?
[jQuery] Re: cycle plugin with image Array
I had the same issues, and am experimenting with various ways to delay and/or prevent un-needed image loading. I'll post back with any promising results and will be pleased if you'd do the same, tetris :) On Apr 5, 2:08 pm, Mike Alsup [EMAIL PROTECTED] wrote: is it possible to configure cycle plugin to retrieve image files from an array instead of a li config? what i would like to achieve is: when you do have many images per list download times can get long so i was thinking that a dynamic download could help.. but im not sure of it. There is no support for that in the plugin. When you invoke the cycle function it is expected that all the slides exist in the DOM at that time. How you get them there is up to you, but cycle doesn't support dynamically adding them at later stages.
[jQuery] Re: cycle plugin with image Array
I had the same issues, and am experimenting with various ways to delay and/or prevent un-needed image loading. I'll post back with any promising results and will be pleased if you'd do the same, tetris :) I'm looking into a way to make this more manageable too.
[jQuery] Re: @ Mike Alsup: Cleartype fix
Thanks again for your help last night, Mike. Client's so happy with the result using Cycle, she's decided to go live before her new site is finished! ( http://homeholistics.com ) jQuery fade is ruining my beautiful work in ie7. I've tried the available Cleartype fixes, but they're not working - whereas the one you've included with Cycle does! I'm prepared to use Cycle unneccesarily if I have to, but wondered if you'd share the secret with the rest of us? Take a look at this link: http://malsup.com/jquery/fadetest.html Cheers!
[jQuery] Re: @ Mike Alsup: Cleartype fix
Thank you!!! :) On Apr 5, 8:05 pm, Mike Alsup [EMAIL PROTECTED] wrote: Thanks again for your help last night, Mike. Client's so happy with the result using Cycle, she's decided to go live before her new site is finished! (http://homeholistics.com) jQuery fade is ruining my beautiful work in ie7. I've tried the available Cleartype fixes, but they're not working - whereas the one you've included with Cycle does! I'm prepared to use Cycle unneccesarily if I have to, but wondered if you'd share the secret with the rest of us? Take a look at this link: http://malsup.com/jquery/fadetest.html Cheers!
[jQuery] IE6,7,8b Transparency with Fade causes problems.
Ok, in IE the Fade: option is not working at all for me, it causes blank or non-existent images to be rotated in, This happens if I say True, or put a numerical value in, it doesn't matter. Fade works fine in FF
[jQuery] Comet Technique - possible with jQuery? Plugin?
Hey, I have been doing some research on Comet to use on my site: http://rksdesignstudios.com/magnet/ - To try to keep it live as possible almost to push the content to see other changes and keep the page constantly updated. I did a search here on the group but really didn't find anything, any ideas on what I can do? Is there a plugin or other technologies I can do using jQuery to achieve my goal? Thanks, Ryan
[jQuery] Re: Drag and Drop question
I am still having problems with this. I can't find anything on the web about inspecting the arguments. Help :) On Apr 4, 1:45 pm, chris [EMAIL PROTECTED] wrote: I am trying to allow a person to sort a list of items by dragging and dropping them. I need to know the new index to where the item was dropped into. I would imagine that value is contained in the ui argument that is handled by the drop callback. ... drop: function(ev, ui) { // act on the drop event } Is there a place or a method to find out what is contained within the ui arg? Thanks for the help.
[jQuery] click removing highlight
I am trying to capture highlighted text. To activate the capture method I am clicking on a div that jQuery is watching. When I click on the div the highlight goes away. The div is actually a context menu... YUI's context menu does not remove the highlight (see http://developer.yahoo.com/yui/examples/menu/contextmenu_source.html highlight the word Dolly and then use the context menu, Dolly stays highlighted). What do I need to do to keep the highlighted text?
[jQuery] Re: Sticky (scrolling) element
Could you please rephrase your first question? Not sure people would understand.. As for the second one, have you tried setting overflow: hidden; on the #content box? On Apr 5, 10:58 am, Thomas Jaggi [EMAIL PROTECTED] wrote: Hi there I have a scrolling box here:http://backflip.info/test/ Everything works fine except for two things: - I'd like the box to start scrolling not until arriving at the top of the page. Now there is always the initial margin. Is this possible with the ui.slider I'm using? - When the box is higher than the screen (click expand) there is an unwanted effect when scrolling to the bottom of the page. How can I define a minimal margin to the bottom? Thanks a lot, Thomas
[jQuery] Re: Sticky (scrolling) element
- I'd like the box to start scrolling not until arriving at the top of the page. Now there is always the initial margin. Is this possible with the ui.slider I'm using? Could you please rephrase your question? - When the box is higher than the screen (click expand) there is an unwanted effect when scrolling to the bottom of the page. How can I define a minimal margin to the bottom? Does setting overflow: hidden; on #content box achieve what you want?
[jQuery] smartposition - a scrolling detection problem.
I'm using some code that I found in the K2 theme for WordPress. function smartPosition(obj) { // Detect if content is being scroll offscreen. if ( (document.documentElement.scrollTop || document.body.scrollTop) = jQuery(obj).offset().top) { jQuery('body').addClass('smartposition'); } else { jQuery('body').removeClass('smartposition'); } } It's supposed to add and remove the `smartposition` class when the scrolling threshold is right. It works perfectly in K2. I have the style body.smartposition #post-navigation { background:#FF none repeat scroll 0% 0%; border-bottom:1px solid #EE; margin:0pt; padding:10px 0pt; position:fixed; top:0px; z-index:10; } In my stylesheet, but the problem is that the class isn't removing!
[jQuery] Re: smartposition - a scrolling detection problem.
I have only had a look round at the code I have in a wordpress install with k2, I have not upgraded either since 2.5 came out. Make sure you have this somewhere jQuery(document).scroll(function() { smartPosition('.configstuff') }); possibly the k2 jquery pack includes dimensions plugin or something -S On 05/04/2008, Brad [EMAIL PROTECTED] wrote: I'm using some code that I found in the K2 theme for WordPress. function smartPosition(obj) { // Detect if content is being scroll offscreen. if ( (document.documentElement.scrollTop || document.body.scrollTop) = jQuery(obj).offset().top) { jQuery('body').addClass('smartposition'); } else { jQuery('body').removeClass('smartposition'); } } It's supposed to add and remove the `smartposition` class when the scrolling threshold is right. It works perfectly in K2. I have the style body.smartposition #post-navigation { background:#FF none repeat scroll 0% 0%; border-bottom:1px solid #EE; margin:0pt; padding:10px 0pt; position:fixed; top:0px; z-index:10; } In my stylesheet, but the problem is that the class isn't removing!
[jQuery] Re: cycle plugin with image Array
I had the same issues, and am experimenting with various ways to delay and/or prevent un-needed image loading. I'll post back with any promising results and will be pleased if you'd do the same, tetris :) I'm looking into a way to make this more manageable too. Just added a feature to make Cycle a bit more flexible. This page shows how you can add slides to a running slideshow: http://www.malsup.com/jquery/cycle/add.html Mike
[jQuery] Order of presence of DOM Elements
Hi. I think i have a problem of understanding in what order the nodes get into the DOM. I have a select that is bound to different Text-Converter which is present within all content input areas in our little CMS. I integrated the markItUp! Editor successfully at least (thanks Jay for the hints). Fortunately there are Text-Converter Plug-Ins available yet which fits perfectly with the parsing options we afford. So i of course must take action on every 'onchange' of the select to load at least the 'set.js' of the appropriate set and insert it into the DOM to make them available. This is what i want to achive described within the example below (excerpt,- the 'onload' handling of page skipped). But everytime i select an option firebug gives me a 'mySettings are not defined'. So it seems the dynamically generated script tag are 'too late'. Anyone has a hint what i do wrong? bye and thanks in advance Olaf /* Example start here */ jQuery(document).ready(function(){ // Foremost Mozilla browser only jQuery('#simple_page_text_converter option').click(function() { var t = jQuery(this).text().toLowerCase(); var s=document.createElement('script'); s.setAttribute('src','../static/libs/thirdparty/markitup/sets/' + t + '/set.js'); s.setAttribute('type','text/javascript'); document.getElementsByTagName('body')[0].appendChild(s); ... jQuery('#simple_page_content').markItUp(mySettings); }); }); /* Example ends here */ -- Olaf Gleba : creatics media.systems tel. +49 (0)212 38 32 94 30 : fax. +49 (0)212 38 32 94 31 [EMAIL PROTECTED] : http://www.creatics.de http://www.creatics.de/keys/
[jQuery] Re: Order of presence of DOM Elements
Olaf, I take it that mySettings is a variable defined in your set.js script, is that right? When you load a script dynamically, the JavaScript interpreter does not halt and wait for that script. Your code continues executing without pause, therefore any variables defined by that script are not available yet. You should change set.js to call a function instead of merely setting a variable. The function it calls will be where you put the code that depends on mySettings. -Mike From: Olaf Gleba Hi. I think i have a problem of understanding in what order the nodes get into the DOM. I have a select that is bound to different Text-Converter which is present within all content input areas in our little CMS. I integrated the markItUp! Editor successfully at least (thanks Jay for the hints). Fortunately there are Text-Converter Plug-Ins available yet which fits perfectly with the parsing options we afford. So i of course must take action on every 'onchange' of the select to load at least the 'set.js' of the appropriate set and insert it into the DOM to make them available. This is what i want to achive described within the example below (excerpt,- the 'onload' handling of page skipped). But everytime i select an option firebug gives me a 'mySettings are not defined'. So it seems the dynamically generated script tag are 'too late'. Anyone has a hint what i do wrong? bye and thanks in advance Olaf /* Example start here */ jQuery(document).ready(function(){ // Foremost Mozilla browser only jQuery('#simple_page_text_converter option').click(function() { var t = jQuery(this).text().toLowerCase(); var s=document.createElement('script'); s.setAttribute('src','../static/libs/thirdparty/markitup/sets/ ' + t + '/set.js'); s.setAttribute('type','text/javascript'); document.getElementsByTagName('body')[0].appendChild(s); ... jQuery('#simple_page_content').markItUp(mySettings); }); }); /* Example ends here */ -- Olaf Gleba : creatics media.systems tel. +49 (0)212 38 32 94 30 : fax. +49 (0)212 38 32 94 31 [EMAIL PROTECTED] : http://www.creatics.de http://www.creatics.de/keys/
[jQuery] Re: Having trouble with += and toFixed for some reason
Thanks alot - i've never been good with javascript... worked great. On Apr 4, 3:01 pm, Wizzud [EMAIL PROTECTED] wrote: Initialise as numbers instead of strings?... var bagqty = 0; var bagtotal = 0; On Apr 4, 9:35 pm, Chuck Cheeze [EMAIL PROTECTED] wrote: Here is my code: pre script type=text/javascript //on page load $(document).ready(function() { //add up the cart totals and display on the page //setup default values var bagqty = ''; var bagtotal = ''; //get all table rows $('#shoppingcart tbody tr').each(function() { //get the row's price, remove the $ var price = parseFloat($('.itemprice', this).text().replace(/^[^ \d.]*/, '')); //make sure its a number price = isNaN(price) ? 0 : price; //get the row's quantity var qty = parseInt($('.itemqty', this).text()); //get the item's shipping amount var ship = parseFloat($('.itemshipping', this).text().replace(/^[^ \d.]*/, '')); //make sure its a number ship = isNaN(ship) ? 0 : ship; //calculate the extended price var extprice = (qty * price) + ship; //add back in the $ sign and write to the page $('.itemextprice', this).text('$' + extprice.toFixed(2)); //add to totals bagqty += qty; bagtotal += extprice; }); //return the totals $('.bagtotal').text('$' + bagtotal.toFixed(2)); }); /script /pre I have 2 issues- 1- the bagqty += qty; and bagtotal += extprice; calculations return appended values, not added. So if there are 2 products and the bagqty values are 5 and 3 I get 53 instead of 8. 2- the $('.bagtotal').text('$' + bagtotal); line won't work. I get a bagtotal.toFixed is not a function error. It works fine in the itemextprize calculation up higher. Any ideas?
[jQuery] tablesort
I cannot get table sorter plug in to work. I have things pointing correctly. I have the id's correct. hOWEVER , it still doesn't sort. its seems very easy to use but it will not work. script src=jquery2.js type=text/javascript/script script src=jquery.tablesorter.js type=text/javascript/script script type=text/javascript $(document).ready(function() { $(#tablesorter- demo).tablesorter(); } ); /script
[jQuery] Re: smartposition - a scrolling detection problem.
Okay. I figured it out. Since smartPosition was tracking the moving div, and since the moving div was always in the same place after the initial switch, the calculations weren't returning the div upon scroll up. I changed the smartPosition param to #content-area, which was a parent of the #post-navigation class. It's working now. And beautifully, too. Thanks for the help! Brad Kovach bradkovach.com On Apr 5, 5:17 pm, Sam Sherlock [EMAIL PROTECTED] wrote: I have only had a look round at the code I have in a wordpress install with k2, I have not upgraded either since 2.5 came out. Make sure you have this somewhere jQuery(document).scroll(function() { smartPosition('.configstuff') }); possibly the k2 jquery pack includes dimensions plugin or something -S On 05/04/2008, Brad [EMAIL PROTECTED] wrote: I'm using some code that I found in the K2 theme for WordPress. function smartPosition(obj) { // Detect if content is being scroll offscreen. if ( (document.documentElement.scrollTop || document.body.scrollTop) = jQuery(obj).offset().top) { jQuery('body').addClass('smartposition'); } else { jQuery('body').removeClass('smartposition'); } } It's supposed to add and remove the `smartposition` class when the scrolling threshold is right. It works perfectly in K2. I have the style body.smartposition #post-navigation { background:#FF none repeat scroll 0% 0%; border-bottom:1px solid #EE; margin:0pt; padding:10px 0pt; position:fixed; top:0px; z-index:10; } In my stylesheet, but the problem is that the class isn't removing!
[jQuery] Re: smartposition - a scrolling detection problem.
I do have that in the footer of my page. To be exact it says: jQuery(document).ready( function() { }); jQuery(window).scroll( function(){ smartPosition('#post- navigation'); }); The smartPosition param tells it which ID to track in the DOM. Thanks for the reply! On Apr 5, 5:17 pm, Sam Sherlock [EMAIL PROTECTED] wrote: I have only had a look round at the code I have in a wordpress install with k2, I have not upgraded either since 2.5 came out. Make sure you have this somewhere jQuery(document).scroll(function() { smartPosition('.configstuff') }); possibly the k2 jquery pack includes dimensions plugin or something -S On 05/04/2008, Brad [EMAIL PROTECTED] wrote: I'm using some code that I found in the K2 theme for WordPress. function smartPosition(obj) { // Detect if content is being scroll offscreen. if ( (document.documentElement.scrollTop || document.body.scrollTop) = jQuery(obj).offset().top) { jQuery('body').addClass('smartposition'); } else { jQuery('body').removeClass('smartposition'); } } It's supposed to add and remove the `smartposition` class when the scrolling threshold is right. It works perfectly in K2. I have the style body.smartposition #post-navigation { background:#FF none repeat scroll 0% 0%; border-bottom:1px solid #EE; margin:0pt; padding:10px 0pt; position:fixed; top:0px; z-index:10; } In my stylesheet, but the problem is that the class isn't removing!