[jQuery] Re: Wrong Width in Firefox
I can't see the 1 pixel protrusion in ur gallery right now. did u already solve it. If yes, i am interested to know how... can u please explain. BTW, your gallery and the gallery design in wonderful... -GTG On 8/24/07, b0bd0gz [EMAIL PROTECTED] wrote: Hi, I have a gallery of images and when one is loaded it gets the width of the image and then sets the p tag underneath the image to the same width, the problem is in firefox, on SOME of the images, the width of the p tag is a pixel out, but in IE7 it displays everything correctly. here is a link to the gallery itself http://b0bd0gz.adsl24.co.uk/gallery2/ and here is a link to a screenshot of the problem http://img44.imagevenue.com/img.php?image=75951_wrong_width_122_861lo.JPG heres the code that gets and then sets the width var imgload = img = $('img.full_img')[0]; imgload.onload = function() { var description = $('a.selected img').attr(alt); var width = $('.full_img').width(); $('p.hidden').css('width', width + 16); // The + 16 is added because the image has a border $('p.hidden').html(description); $('p.hidden').fadeIn(slow); }; I have no idea what's causing this so any ideas would be greatly welcomed. If you need anymore info let me know. Thanks in advance. b0bd0gz -- View this message in context: http://www.nabble.com/Wrong-Width-in-Firefox-tf4324806s15494.html#a12316725 Sent from the JQuery mailing list archive at Nabble.com.
[jQuery] Re: [NEWS] More Press for tableSorter
I know i am late to the party... but still dugg it. Very nice work christian, we need more like this from u. -GTG On 8/24/07, Christian Bach [EMAIL PROTECTED] wrote: Thanks Brandon and Marshall! /christian 2007/8/24, Marshall Salinger [EMAIL PROTECTED]: I upgraded from 1.0 to 2.0 in my app and noticed a big improvement in speed. It is an excellent plug-in. Dugg! Christian Bach wrote: Thanks Rey! If anyone would like to help me get the word out even more, please feel free to digg: http://digg.com/programming/jQuery_plugin_Tablesorter_2_0 Best regards Christian 2007/8/24, Rey Bango [EMAIL PROTECTED]: The press continues around Christian Bach's tableSorter plugin. The most recent is an intro to the plugin on the AMIS Technology Blog: http://technology.amis.nl/blog/?p=2376 The phrase that caught my attention was I really love the tablesorter plugin. It's very easy to use and the code looks so clean!. Great work Christian!
[jQuery] Re: Release: Accordion 1.5
Jörn, this is fantastic... very re-usable as well.. I have a question/suggestion though... When i hover over one of the items, and before the animation completes if i hover over another item, the animation for the second item doesn't occur. Now, i will have to move my mouse out of that item and hover over it again to get the other item to expand. Is it something that can be fixed, or is it a known limitation that we will have to live by... -GTG On 8/25/07, Jörn Zaefferer [EMAIL PROTECTED] wrote: Jack Killpatrick schrieb: Jörn, happy to have this, thx! Question: is it possible to set the height of individual accordion panels? Perhaps that goes against the grain of an accordion's bottom edge staying in place, but in my use case it would be ok if the bottom moved up and down as the user moved through the panels. I have some panels with a bunch of content, which would have scrollbars appear (fine), but some of the panels have very little content and in this case I'd like to prevent a big gob of whitespace at the bottom of them, by tweaking the height for that panel a bit. Thanks for bringing this up. I need a bit more math to support that together with the new animation system. -- Jörn
[jQuery] Re: [ANNOUNCEMENT] jqGalView (yet another image gallery)
Benjamin, That update would be nice, also I think you could try either the jquery tooltips plugin or stick all tooltips in one place instead of moving all around your mouse. Cheers, On 8/26/07, Benjamin Sterling [EMAIL PROTECTED] wrote: Thanks Joan, that is on the to do list. I was hoping to have an update up tonight, but got caught up on some things. I am going to try for Monday now. Thanks. On 8/26/07, Joan Piedra [EMAIL PROTECTED] wrote: Hi, I like the 'pan view' idea. Just found a 'bug', when you are seeing an image it should cover the whole gallery (aka. thumbs and gallery tabs), you can click another tab while you are browsing a pic, this is confusing because when you close it you are in new gallery section. Keep working on it, looks nice. On 8/24/07, Benjamin Sterling [EMAIL PROTECTED] wrote: Hello All, Wanted to announce yet another image gallery! What is different between this one and other million out there, well, I made it :). The url: http://benjaminsterling.com/2007/08/24/jquery-jqgalview-photo-gallery/ I am still working on the documentation, I am not very good at it so if there are any questions, please ask. I will post all questions asked and fixes posted here in the comments on the site for easy reading. I am still working on developing a clean coding style that would be easy for all to read, so if you have suggestions on what I can combine/change/do better in general, I would most appreciate it. I have a few other plugins that are in development and it will help me to clean them up also. Thanks. -- Benjamin Sterling http://www.KenzoMedia.com http://www.KenzoHosting.com -- Joan Piedra || Frontend webdeveloper http://joanpiedra.com/ -- Benjamin Sterling http://www.KenzoMedia.com http://www.KenzoHosting.com -- Joan Piedra || Frontend webdeveloper http://joanpiedra.com/
[jQuery] cluetip issue
this is my cluetip code: $('#trip_builder_popup').cluetip({local: true, mouseOutClose: true, sticky: true, positionBy: 'auto'}); I want the box to appear in the same place every time but it is placed based on my mouse, how can i stop this as the demo page works like i want it to? -- View this message in context: http://www.nabble.com/cluetip-issue-tf4330231s15494.html#a12332590 Sent from the JQuery mailing list archive at Nabble.com.
[jQuery] Re: Blueprint and jQuery
this is very good... i am not sure if i am understanding it right? but, if it is doing, what i think it is, then i absolutely love it. So, a writeup would be awesome. -GTG P.S - Among other things, i think it has a min width and a max width and between those widths, you are able to dynamically resize. On 8/25/07, Kevin F [EMAIL PROTECTED] wrote: absolutely make it available! just another bonus for the jquery community :) thx. On 8/24/07, george.gsgd [EMAIL PROTECTED] wrote: Building on the work done by matz in auto generating grids (http:// kematzy.com/blueprint-generator/). I've been working on a javascripty dynamicly resizing grid using jQuery. Have a look at the demo here: http://gsgd.co.uk/sandbox/blueprint/ Feedback much appreciated. Is it worth making available as a download? Worth a proper write up? I've not tested on Safari/Opera/Konqueror yet. Thanks, George.
[jQuery] Re: Plugin Repository - Report New Bugs and Request New Features?
On Aug 26, 5:23 am, Karl Swedberg [EMAIL PROTECTED] wrote: Why is hardly anyone using these on the plugin pages? The path of least resistance. They all post here instead. And the developers here normally say either won't fix that or I just posted an update, which means no long-term tracking is needed. :/ It's seems a shame not to use what looks like a nice tool. i agree 100%, and i think it would help if the plugin developers started directing people to the bug db. The bug db has a higher barrier to entry than the list does (one has to create an account on the web site), though, so that might keep some people away (most list- goers have a Google account already). As I've been working on the clueTip plugin, one of the hardest things for me has been to keep track of what people want out of it and what they're finding wrong with it. If memory serves me properly, most people report bugs to you via this list or your blog. Okay, sorry, I'm rambling. i think you've brought a very useful topic to the surface. A summary of my stance is: it's a problem of education - the developers should get in the habit of teaching the users to file bug reports by simply requesting them to please file a bug report at http://...; That may be overkill for trivial reports which you know you can fix in a few minutes, but for bugs which won't/can't be fixed immediately, i feel it's a good solution. :)
[jQuery] Re: Plugin Repository - Report New Bugs and Request New Features?
For starters, i don't know if i have write access to the jquery svn repository to checkin my plugin. Once i know that i already have it or not, or if i am given one, then i might be more interested in tracking bugs and enhancements from the plugin page itself. Second, the plugin site is fairly new, and as u know we faced quite a few issues using that in the first place... So, it is just a matter of time before both developers and users get confidence in the repo. Third, the main jquery page still points to the docs.jquery.com/plugins wiki instead of the plugin page. Many people are still using that. And, as Stephan says it is both a problem of education and the barrier to entry. But, these are expected from the users to get quality extensions from any open source software. Yet, it has to solved. Again, i guess i am just rambling... -GTG On 8/25/07, Karl Swedberg [EMAIL PROTECTED] wrote: Hey folks, I was looking through the plugins at jquery.com/plugins/ and noticed that, even though the project pages have bug-report and feature-request tools built right in, hardly any of the plugins have anything entered for any of it. Kelvin Luck's plugins are the only ones I saw from a cursory skim through the list that are taking advantage of them. So, I'm curious. What do more seasoned plugin developers recommend for tracking bugs and feature requests? Why is hardly anyone using these on the plugin pages? Is there something better out there that others are using? It's seems a shame not to use what looks like a nice tool. But before I jump in and start using it for my own plugin, I thought I'd seek the perspective of others. As I've been working on the clueTip plugin, one of the hardest things for me has been to keep track of what people want out of it and what they're finding wrong with it. I think it would be nice to have a centralized location where I could monitor this stuff for my own plugins, and it would also be cool to be able to look at other plugin pages and check on their progress. Any thoughts on this? How about not just from plugin *developers*, but from plugin *users* as well? People out there using these plugins -- would you find it helpful to be able to look at these plugin pages at the jquery.com plugin repository and check on their status? Okay, sorry, I'm rambling. --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com
[jQuery] Re: Wrong Width in Firefox
Unfortunately I haven't fixed the problem, it's still showing with me when using Firefox 2.0.0.6, and it's really irritating because nothing seems to fix it :( Glad you like the design though :D If anyone has any ideas please let us know. b0bd0gz I can't see the 1 pixel protrusion in ur gallery right now. did u already solve it. If yes, i am interested to know how... can u please explain. BTW, your gallery and the gallery design in wonderful... -GTG -- View this message in context: http://www.nabble.com/Wrong-Width-in-Firefox-tf4324806s15494.html#a12332786 Sent from the JQuery mailing list archive at Nabble.com.
[jQuery] Re: [ANNOUNCEMENT] jqGalView (yet another image gallery)
Ben, I've seen the 'flash image gallery' and I see you are actually porting it to javascript, if you just want to port it then don't mind my previous messages :P Really nice work porting it. Regards, -- Joan Piedra || Frontend webdeveloper http://joanpiedra.com/
[jQuery] Re: Error with Ajax Submit with Form plugin in IE
Hi, I finally could debug my error. It's the packed version of the validate plugin which generates me two errors. The js file which is not compressed is working fine in ie6 Thank you for your assistance malsup. malsup wrote: in IE6, a new page is opened, like the ajax is not working. I also noticed in IE6 that my javascript generates an error. I think you answered your own question there. You need to fix that error, whatever it is. That's why IE opens a new page when you submit. Mike -- View this message in context: http://www.nabble.com/Error-with-Ajax-Submit-with-Form-plugin-in-IE-tf4328848s15494.html#a12333132 Sent from the JQuery mailing list archive at Nabble.com.
[jQuery] Re: Wrong Width in Firefox
I suspect it's because you are using max-width and max-height to compress your images into the available space. When the width of an oversize image is computed the values are coming out to 3 or more decimal places, and depending on how the rounding/truncation works out, the returned width value that you are using for the paragraph may not exactly match the displayed pixel width of the image. For example, if the computed image size is x.9733 you may be receiving x+1 (rounded) as the width but the image width is being displayed (truncated) as x. Note that this is all supposition/guesswork on my part! A way around it might be to try wrapping your anchor/image and subsequent paragraph in a div, and let the paragraph find its own width within that div, which should autosize to its content (ie. the image). You should not need to retrieve the image width at all. I don't know whether this is helpful or not! Unfortunately I haven't fixed the problem, it's still showing with me when using Firefox 2.0.0.6, and it's really irritating because nothing seems to fix it :( Glad you like the design though :D If anyone has any ideas please let us know. b0bd0gz Ganeshji Marwaha wrote: I can't see the 1 pixel protrusion in ur gallery right now. did u already solve it. If yes, i am interested to know how... can u please explain. BTW, your gallery and the gallery design in wonderful... -GTG -- View this message in context: http://www.nabble.com/Wrong-Width-in-Firefox-tf4324806s15494.html#a12333177 Sent from the JQuery mailing list archive at Nabble.com.
[jQuery] Re: how find this value
1. Your ids should be unique 2. I'm not entirely clear on what it is that you are trying to achieve, but IF all you want to do is retrieve the values of the appropriate hidden input field and select field when the relevant Salvez button is clicked then, with your current HTML, ... $('.button').click(function(){ var _me = $(this) , _selv = _me.parent().next().find('select').val() // current value of select , _iph = _me.next().val() // current value of hidden input field ; // what you do with them is up to you... }); David-378 wrote: I have this table: table width=98% cellspacing=3 cellpadding=3 border=0 class=cnu thead tr thstrongOperatii/strong/th thstrongTIP /strong/th thstrongDenumire articol sau serviciu/ strong/th thstrongUM/strong/th /thead /tr tr tdinput type=button class=button ccc name=salvezidarticol id=salvezidarticol value=Salvez/ input type=hidden value=1 name=codintern id=codintern class=codint//td td class=class_td select id=idfelp name=idfelp option value=7Alte mat. consumabile/option option value=9Ambalaje/option option value=13Amenajari provizorii/option option value=5Combustibili/option option value=17Discount iesiri/option /select/td td class=strongBISCUITI/strong/td td class=class_tdstrongcut/strong/td td class=class_tdstronginput type=text value=19.00 size=2//strong/td /tr tr tdinput type=button class=button ccc name=salvezidarticol id=salvezidarticol value=Salvez/ input type=hidden value=2 name=codintern id=codintern class=codint//td td class=class_td select id=idfelp name=idfelp option value=7Alte mat. consumabile/option option value=9Ambalaje/option option value=13Amenajari provizorii/option option value=5Combustibili/option option value=17Discount iesiri/option /select/td td class=strongCAFEA/strong/td td class=class_tdstrongkg/strong/td td class=class_tdstronginput type=text value=19.00 size=2//strong/td /tr tr tdinput type=button class=button ccc name=salvezidarticol id=salvezidarticol value=Salvez/ input type=hidden value=3 name=codintern id=codintern class=codint//td td class=class_td select id=idfelp name=idfelp option value=7Alte mat. consumabile/option option value=9Ambalaje/option option value=13Amenajari provizorii/option option value=5Combustibili/option option value=17Discount iesiri/option /select/td td class=strongTRUSA SCULE/strong/td td class=class_tdstrongbuc/strong/td td class=class_tdstronginput type=text value=19.00 size=2//strong/td /tr tr tdinput type=button class=button ccc name=salvezidarticol id=salvezidarticol value=Salvez/ input type=hidden value=4 name=codintern id=codintern class=codint//td td class=class_td select id=idfelp name=idfelp option value=7Alte mat. consumabile/option option value=9Ambalaje/option option value=13Amenajari provizorii/option option value=5Combustibili/option option value=17Discount iesiri/option /select/td td class=strongCIOCOLATA/strong/td td class=class_tdstrongbuc/strong/td td class=class_tdstronginput type=text value=19.00 size=2//strong/td /tr tr tdinput type=button class=button ccc name=salvezidarticol id=salvezidarticol value=Salvez/ input type=hidden value=5 name=codintern id=codintern class=codint//td td class=class_td select id=idfelp name=idfelp option value=7Alte mat. consumabile/option option value=9Ambalaje/option option value=13Amenajari provizorii/option option value=5Combustibili/option option value=17Discount iesiri/option /select/td
[jQuery] Re: Plugin Repository - Report New Bugs and Request New Features?
On Aug 26, 9:03 am, Ganeshji Marwaha [EMAIL PROTECTED] wrote: For starters, i don't know if i have write access to the jquery svn repository to checkin my plugin. You don't need it - anyone can submit a plugin to the plugin web site, which is independent of the svn tree. You just need to create an account on the plugins site, then you're all set to go. Third, the main jquery page still points to the docs.jquery.com/plugins wiki instead of the plugin page. Many people are still using that. Someone posted a few weeks ago saying that they would install a redirect on the plugins page soon. When... i don't remember. And, as Stephan says it is both a problem of education and the barrier to entry. Perhaps we can get the webmasters to allow anonymous posts to the bug db (assuming that the underlying framework allows it, which i'm not sure about at all). :)
[jQuery] PDF docs for version 1.1.4
Following a request from Stefan Gabos, I've updated my PDF documentation for JQuery version 1.1.4: http://corky.net/dotan/log/2007/01/jquery-documentation-in-pdf.html I've got two PDFs, one for documentation in the JQuery distribution file itself, and one from the plugins defined in the build.xml file. The last time I did this, I created a file with documentation extracted from all the plugins, but I think the plugins directories are crammed with too much stuff for me to do this lazily. Hope people find this helpful. - Dotan
[jQuery] An introduction to using JQuery with Lasso
jQuery is the topic this week for LassoSoft's _Tip of the Week_ (publishers of Lasso): - The tip of the week for August 24, 2007 introduces JQuery and shows how a simple newsticker plugin can be used with Lasso. The tip shows how Lasso can be used to automatically add the required JQuery elements to the head of the document. http://www.lassosoft.com/Documentation/TotW/index.lasso?9302 - - Bil
[jQuery] Re: Possible bug in slideDown()?
I thought of that, but I can't do that either. It'll be variable width due to the blog post. What I might end up doing is slideing that element down, then getting it's height, then animating the parent container. A bit of a kludge but if you've looked at it and don't have any ideas, then there's probably not an answer. On Aug 25, 10:35 pm, John Resig [EMAIL PROTECTED] wrote: When worse comes to worse, apply a fixed width to the element that you're sliding down - sometimes that can fix sticky issues like this. --John On 8/25/07, Andy Matthews [EMAIL PROTECTED] wrote: I just added comments to my blog: http://www.andyandjaime.com/ When the user submits, it posts to my processing page and sends back a string, which I then display inline. I put the comment there, then use slideDown() to show it. When slideDown() occurs, the form used to post the comment also slides down (as you would expect). But the submit button slides down below the bottom of the container element. Does anyone know why this is happening?- Hide quoted text - - Show quoted text -
[jQuery] Problem with $(document) and actually with every $(...) call
First of all, thanks for this wonderful library. Then here is my problem. I updated my jQuery library in my application with the latest version (1.1.4) and I have the following issue: jQuery(document).ready(function() { jQuery(#user_name).focus(); }); works just fine, but my old: $(document).ready(function() { $(#user_name).focus(); }); The error I am getting is: $ is not a function. I mention that using jQuery version 1.1.3.1, the above issue is not happening. What is going on? Thanks all.
[jQuery] Re: Problem with $(document) and actually with every $(...) call
Somebody please delete this, because I am stupid. Is my fault! I am so shamed! On Aug 26, 4:58 pm, PCPbSlack [EMAIL PROTECTED] wrote: First of all, thanks for this wonderful library. Then here is my problem. I updated my jQuery library in my application with the latest version (1.1.4) and I have the following issue: jQuery(document).ready(function() { jQuery(#user_name).focus(); }); works just fine, but my old: $(document).ready(function() { $(#user_name).focus(); }); The error I am getting is: $ is not a function. I mention that using jQuery version 1.1.3.1, the above issue is not happening. What is going on? Thanks all.
[jQuery] Re: amazon popup box
cluetip does not seem to work like i want it to because the tip that display is placed where the mpouse is, is there a way to make it appear statically? Karl Swedberg-2 wrote: I'm not sure I follow exactly what you're looking for, but maybe the clueTip plugin can help: http://plugins.learningjquery.com/cluetip/ go to the Info Demo page, click the Examples link and then scroll down to the first jTip example. It will show the clueTip on mouseover. To hide it, either mouse out of the tool tip or click the X in the upper right. Chhers, --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com On Aug 24, 2007, at 11:41 AM, Eridius wrote: I am trying to create a popup box like amazon (the one you get when you hover over to see all categories). I was think that i would create a div that has absolute position and position exactly where i want it(as it will stay in the same place as the button will also). I would then create a hover effect on the over to show the box , i will explain the out hover function for this later. I would then create a out hover effect function on the div that is acting like a popup box, will explain the over function later. This leads to 2 problems. 1. I want the popup box to disappear if they are not over the button of the box(which is a div) but the way i setup above will not do that because i left the other 2 functions blank. 2. if i fill the function for the out the hide the box the the button hover effect then i will not be able to see the box when i hover over it. Can anyone help me on this. is there an existing plugin that does what i am looking for. -- View this message in context: http://www.nabble.com/amazon-popup- box-tf4324284s15494.html#a12314839 Sent from the JQuery mailing list archive at Nabble.com. -- View this message in context: http://www.nabble.com/amazon-popup-box-tf4324284s15494.html#a12335333 Sent from the JQuery mailing list archive at Nabble.com.
[jQuery] Re: cluetip issue
To be more clear i am using an img as the link, and this seems to be the problem cuase when i use just text the tooltip appeared in the same place everytime. is there an issue using cluetip with images a the link? Eridius wrote: this is my cluetip code: $('#trip_builder_popup').cluetip({local: true, mouseOutClose: true, sticky: true, positionBy: 'auto'}); I want the box to appear in the same place every time but it is placed based on my mouse, how can i stop this as the demo page works like i want it to? -- View this message in context: http://www.nabble.com/cluetip-issue-tf4330231s15494.html#a12335700 Sent from the JQuery mailing list archive at Nabble.com.
[jQuery] Re: cluetip issue(another issue)
Another thing i am looking for is to be able to change the content in the tooltip with ajax while it is displaying. I tried to change the content and the content does change in the div i have added to but the tooltip does not(i guess it pulls the content from the div a displays it instead of displaying the actucally div). is there a way to refrest the tooltip while it is displaying? Eridius wrote: this is my cluetip code: $('#trip_builder_popup').cluetip({local: true, mouseOutClose: true, sticky: true, positionBy: 'auto'}); I want the box to appear in the same place every time but it is placed based on my mouse, how can i stop this as the demo page works like i want it to? -- View this message in context: http://www.nabble.com/cluetip-issue-tf4330231s15494.html#a12336034 Sent from the JQuery mailing list archive at Nabble.com.
[jQuery] Improving jQuery Timers Applications
I am interested to hear any test reports for jQuery applications that are using AJAX, any animation for PCs that might have altered the system timer resolution. I posted an entry at my blog with discussing this, with a C/C++ utility you can use to test to see how your applications behave in normal sleep mode vs fast Sleep mode. http://santronics.blogspot.com/ Here is the fastsleep.cpp comments: // Utility to toggle the PC with Windows OS multi-media // resolution that speeds up the Sleep() quantum. // // All PC has a quantum of 10-15ms regardless of the // sleep value. Assuming the PC is 15ms, if you use // Sleep(1), the time slice is 15ms. Sleep(18) is 30ms, // and so on. // // This utility allows you to toggle the resolution // to 1 ms. The actual delay is shown by this utility. // // Why? // // This can change the behavior of your applications // which depends on timers, like many of the Web 2.0 // Javascript applications. In Windows, the multi media // function timeBeginPeriod() changes the resolution // for the entire system. So if some other application // is running with timeBeginPeriod(1) enabled, this // will have a drastic effect on your Web 2.0 application. // It may behave better, it may behave unexpectedly worst. // It might explain someone reported to you, hey this // is not running right. But others don't see this, // and you can't repeat it, so you just blew the report // away.This utility can be use to design your // application properly under all conditions. -- HLS
[jQuery] Re: An introduction to using JQuery with Lasso
very nice! thanks for sharing that with the list. --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com On Aug 26, 2007, at 8:53 AM, Bil Corry wrote: jQuery is the topic this week for LassoSoft's _Tip of the Week_ (publishers of Lasso): - The tip of the week for August 24, 2007 introduces JQuery and shows how a simple newsticker plugin can be used with Lasso. The tip shows how Lasso can be used to automatically add the required JQuery elements to the head of the document. http://www.lassosoft.com/Documentation/TotW/index.lasso?9302 - - Bil
[jQuery] Re: cluetip issue(another issue)
Hi eridius, Eridius wrote: this is my cluetip code: $('#trip_builder_popup').cluetip({local: true, mouseOutClose: true, sticky: true, positionBy: 'auto'}); I want the box to appear in the same place every time but it is placed based on my mouse, how can i stop this as the demo page works like i want it to? I may have to refactor the code a bit now that I have the positionBy option in there. Early revisions of the plugin tried to decide for you when to position the tool tip by the element and when to position it by the mouse, and I kind of took a sledgehammer approach. Currently, the following conditions will position it by mouse, no matter what you do: - the hovered element has display: block - the hovered element is a map area - there isn't enough room to the right of the left of the hovered element to fit the tool tip completely within the viewable area. I can probably remove the first condition, at least for the horizontal positioning. Vertical positioning is a little different, though. If the hovered element has display:block and its height is fairly large, the tooltip might get positioned in an unexpected place (because if it's not done by mouse position, it lines the tooltip up with the top of the hovered element). Any suggestions are most welcome. Another thing i am looking for is to be able to change the content in the tooltip with ajax while it is displaying. I tried to change the content and the content does change in the div i have added to but the tooltip does not(i guess it pulls the content from the div a displays it instead of displaying the actucally div). is there a way to refrest the tooltip while it is displaying? Here is the relevant code for populating the clueTip with local content: var localContent = $(tipAttribute).html(); $cluetipInner.html(localContent); So, yes, it grabs the innerHTML of the div and displays it. If there is a more reasonable or beneficial way of doing this, let me know. Since I'm already emptying $cluetipInner before I populate it with the new contents, I suppose I could do it this way: $cluetipInner.append(tipAttribute); But I don't think that will solve your problem. If you want to refresh the tooltip while it is displaying, couldn't you just do so by using the $('#cluetip-inner') selector and one of jQuery's DOM insertion methods? Also, if you could show me an example of what you're trying to do, that would be helpful, since I'm not sure I'm quite understanding you properly. --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com
[jQuery] Re: Plugin Repository - Report New Bugs and Request New Features?
You don't need it - anyone can submit a plugin to the plugin web site, which is independent of the svn tree. You just need to create an account on the plugins site, then you're all set to go. I am aware of that... coz, i have my plugins already listed there. What, i was trying to convey was, although my plugins are listed there, i am not motivated to effectively use the plugin web site for issue tracking and feature requests because, i don't have the actual code in the repo. -GTG On 8/26/07, Stephan Beal [EMAIL PROTECTED] wrote: On Aug 26, 9:03 am, Ganeshji Marwaha [EMAIL PROTECTED] wrote: For starters, i don't know if i have write access to the jquery svn repository to checkin my plugin. You don't need it - anyone can submit a plugin to the plugin web site, which is independent of the svn tree. You just need to create an account on the plugins site, then you're all set to go. Third, the main jquery page still points to the docs.jquery.com/pluginswiki instead of the plugin page. Many people are still using that. Someone posted a few weeks ago saying that they would install a redirect on the plugins page soon. When... i don't remember. And, as Stephan says it is both a problem of education and the barrier to entry. Perhaps we can get the webmasters to allow anonymous posts to the bug db (assuming that the underlying framework allows it, which i'm not sure about at all). :)
[jQuery] Re: cluetip issue(another issue)
Hey, Karl. so you did get the positioning setup where the clueTip will display to the top or bottom of the mouse-over element if the clueTip is too wide to fully display on the right or left of the element? As far as positioning to the top, right, bottom, or left goes, I hope that's automatic depending on screen space available based on the position of the element. Rick From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Karl Swedberg Sent: Sunday, August 26, 2007 1:22 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: cluetip issue(another issue) Hi eridius, Eridius wrote: this is my cluetip code: $('#trip_builder_popup').cluetip({local: true, mouseOutClose: true, sticky: true, positionBy: 'auto'}); I want the box to appear in the same place every time but it is placed based on my mouse, how can i stop this as the demo page works like i want it to? I may have to refactor the code a bit now that I have the positionBy option in there. Early revisions of the plugin tried to decide for you when to position the tool tip by the element and when to position it by the mouse, and I kind of took a sledgehammer approach. Currently, the following conditions will position it by mouse, no matter what you do: - the hovered element has display: block - the hovered element is a map area - there isn't enough room to the right of the left of the hovered element to fit the tool tip completely within the viewable area. I can probably remove the first condition, at least for the horizontal positioning. Vertical positioning is a little different, though. If the hovered element has display:block and its height is fairly large, the tooltip might get positioned in an unexpected place (because if it's not done by mouse position, it lines the tooltip up with the top of the hovered element). Any suggestions are most welcome. Another thing i am looking for is to be able to change the content in the tooltip with ajax while it is displaying. I tried to change the content and the content does change in the div i have added to but the tooltip does not(i guess it pulls the content from the div a displays it instead of displaying the actucally div). is there a way to refrest the tooltip while it is displaying? Here is the relevant code for populating the clueTip with local content: var localContent = $(tipAttribute).html(); $cluetipInner.html(localContent); So, yes, it grabs the innerHTML of the div and displays it. If there is a more reasonable or beneficial way of doing this, let me know. Since I'm already emptying $cluetipInner before I populate it with the new contents, I suppose I could do it this way: $cluetipInner.append(tipAttribute); But I don't think that will solve your problem. If you want to refresh the tooltip while it is displaying, couldn't you just do so by using the $('#cluetip-inner') selector and one of jQuery's DOM insertion methods? Also, if you could show me an example of what you're trying to do, that would be helpful, since I'm not sure I'm quite understanding you properly. --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com
[jQuery] Re: It is possible to do in js with jquery?
Very nice! Where do I find everything I need to implement this? Or is everything in the source of the page? Rick -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of gianiaz Sent: Saturday, August 25, 2007 12:18 PM To: jQuery (English) Subject: [jQuery] Re: It is possible to do in js with jquery? I did it! :-) If yo can take a look here you can see the script in his MAGNIFYcient shape :-) http://www.gianiaz.net/jquery/magnify/lente.html I have a few question: 1. I've tried to create vml elements with jquery syntax, something like this: $vml = $('v:oval').appendTo(divStruttura); But it seems it doesn't work, it is my fault or jquery can't handle this type of elements? In firefox I've got an error when images are not loaded in time, when you have the image in cache everithing works fine.. How can I solve? Thank for your support. p.s. I've tested it in IE6, IE7 and Firefox
[jQuery] Re: Improving jQuery Timers Applications
Very interesting! I never thought about the effect that other applications might have on JavaScript timers. Thanks for posting that. (BTW, do you prefer to go by Pops or Hector?) Here is something that may be useful in conjunction with your program. A couple of weeks ago when Yehuda was working on iPhone scrolling, I wrote a little test page that logs the timing for several repeats of setInterval() and setTimeout(), using intervals of 0, 1, and 100 milliseconds. http://mg.to/test/interval/ On IE, setInterval(0) does not work, so the page skips that test. All the Windows browsers show the minimum 15ms time just like you said. On the Mac, Firefox shows a minimum setTimeout in the 3-4ms range, and a minimum setInterval around 11ms. Safari shows some 0ms timings for both setInterval(0) and setTimeout(0). iPhone has a minimum 10ms on setInterval. Anyway, I hope that's helpful in any timer investigations. -Mike From: Pops I am interested to hear any test reports for jQuery applications that are using AJAX, any animation for PCs that might have altered the system timer resolution. I posted an entry at my blog with discussing this, with a C/C++ utility you can use to test to see how your applications behave in normal sleep mode vs fast Sleep mode. http://santronics.blogspot.com/ Here is the fastsleep.cpp comments: // Utility to toggle the PC with Windows OS multi-media // resolution that speeds up the Sleep() quantum. // // All PC has a quantum of 10-15ms regardless of the // sleep value. Assuming the PC is 15ms, if you use // Sleep(1), the time slice is 15ms. Sleep(18) is 30ms, // and so on. // // This utility allows you to toggle the resolution // to 1 ms. The actual delay is shown by this utility. // // Why? // // This can change the behavior of your applications // which depends on timers, like many of the Web 2.0 // Javascript applications. In Windows, the multi media // function timeBeginPeriod() changes the resolution // for the entire system. So if some other application // is running with timeBeginPeriod(1) enabled, this // will have a drastic effect on your Web 2.0 application. // It may behave better, it may behave unexpectedly worst. // It might explain someone reported to you, hey this // is not running right. But others don't see this, // and you can't repeat it, so you just blew the report // away.This utility can be use to design your // application properly under all conditions. -- HLS
[jQuery] Re: cluetip issue(another issue)
Hi Rick, yes, that's in there. and yes, it's automatic. check out the demo http://plugins.learningjquery.com/cluetip/demo/ and try example #7. it's the click to activate one, so you'll have to, um, click to activate it. :) You should see the top/bottom positioning. --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com On Aug 26, 2007, at 1:37 PM, Rick Faircloth wrote: Hey, Karl… so you did get the positioning setup where the clueTip will display to the top or bottom of the mouse-over element if the clueTip is too wide to fully display on the right or left of the element? As far as positioning to the top, right, bottom, or left goes, I hope that’s automatic depending on screen space available based on the position of the element… Rick From: jquery-en@googlegroups.com [mailto:jquery- [EMAIL PROTECTED] On Behalf Of Karl Swedberg Sent: Sunday, August 26, 2007 1:22 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: cluetip issue(another issue) Hi eridius, Eridius wrote: this is my cluetip code: $('#trip_builder_popup').cluetip({local: true, mouseOutClose: true, sticky: true, positionBy: 'auto'}); I want the box to appear in the same place every time but it is placed based on my mouse, how can i stop this as the demo page works like i want it to? I may have to refactor the code a bit now that I have the positionBy option in there. Early revisions of the plugin tried to decide for you when to position the tool tip by the element and when to position it by the mouse, and I kind of took a sledgehammer approach. Currently, the following conditions will position it by mouse, no matter what you do: - the hovered element has display: block - the hovered element is a map area - there isn't enough room to the right of the left of the hovered element to fit the tool tip completely within the viewable area. I can probably remove the first condition, at least for the horizontal positioning. Vertical positioning is a little different, though. If the hovered element has display:block and its height is fairly large, the tooltip might get positioned in an unexpected place (because if it's not done by mouse position, it lines the tooltip up with the top of the hovered element). Any suggestions are most welcome. Another thing i am looking for is to be able to change the content in the tooltip with ajax while it is displaying. I tried to change the content and the content does change in the div i have added to but the tooltip does not(i guess it pulls the content from the div a displays it instead of displaying the actucally div). is there a way to refrest the tooltip while it is displaying? Here is the relevant code for populating the clueTip with local content: var localContent = $(tipAttribute).html(); $cluetipInner.html(localContent); So, yes, it grabs the innerHTML of the div and displays it. If there is a more reasonable or beneficial way of doing this, let me know. Since I'm already emptying $cluetipInner before I populate it with the new contents, I suppose I could do it this way: $cluetipInner.append(tipAttribute); But I don't think that will solve your problem. If you want to refresh the tooltip while it is displaying, couldn't you just do so by using the $('#cluetip-inner') selector and one of jQuery's DOM insertion methods? Also, if you could show me an example of what you're trying to do, that would be helpful, since I'm not sure I'm quite understanding you properly. --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com
[jQuery] Re: Plugin Repository - Report New Bugs and Request New Features?
your site is hosted on hostmonster (same as mine), and they run apache 1.x, which doesn't have the necessary apache modules for hosting an svn server. yup, that is true :-( . -GTG On 8/26/07, Stephan Beal [EMAIL PROTECTED] wrote: On Aug 26, 7:29 pm, Ganeshji Marwaha [EMAIL PROTECTED] wrote: What, i was trying to convey was, although my plugins are listed there, i am not motivated to effectively use the plugin web site for issue tracking and feature requests because, i don't have the actual code in the repo. Ah, that's a good point. But the plugins page allows you to add a link to your own repo (obviously, most people don't have a publicly- accessible repo, though). IIRC, your site is hosted on hostmonster (same as mine), and they run apache 1.x, which doesn't have the necessary apache modules for hosting an svn server.
[jQuery] Re: Problem with $(document) and actually with every $(...) call
Heh no worries ... we've all done the same thing before ... at least I have :) -- Brandon Aaron On 8/26/07, PCPbSlack [EMAIL PROTECTED] wrote: Somebody please delete this, because I am stupid. Is my fault! I am so shamed! On Aug 26, 4:58 pm, PCPbSlack [EMAIL PROTECTED] wrote: First of all, thanks for this wonderful library. Then here is my problem. I updated my jQuery library in my application with the latest version (1.1.4) and I have the following issue: jQuery(document).ready(function() { jQuery(#user_name).focus(); }); works just fine, but my old: $(document).ready(function() { $(#user_name).focus(); }); The error I am getting is: $ is not a function. I mention that using jQuery version 1.1.3.1, the above issue is not happening. What is going on? Thanks all.
[jQuery] Re: Possible bug in slideDown()?
That should have read that it would be variable height, not width. On Aug 26, 8:33 am, Andy Matthews [EMAIL PROTECTED] wrote: I thought of that, but I can't do that either. It'll be variable width due to the blog post. What I might end up doing is slideing that element down, then getting it's height, then animating the parent container. A bit of a kludge but if you've looked at it and don't have any ideas, then there's probably not an answer. On Aug 25, 10:35 pm, John Resig [EMAIL PROTECTED] wrote: When worse comes to worse, apply a fixed width to the element that you're sliding down - sometimes that can fix sticky issues like this. --John On 8/25/07, Andy Matthews [EMAIL PROTECTED] wrote: I just added comments to my blog: http://www.andyandjaime.com/ When the user submits, it posts to my processing page and sends back a string, which I then display inline. I put the comment there, then use slideDown() to show it. When slideDown() occurs, the form used to post the comment also slides down (as you would expect). But the submit button slides down below the bottom of the container element. Does anyone know why this is happening?- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text -
[jQuery] Re: Possible bug in slideDown()?
I don't have any help here, just wanted to say that is a really nice website you've got there. On 8/25/07, Andy Matthews [EMAIL PROTECTED] wrote: I just added comments to my blog: http://www.andyandjaime.com/ When the user submits, it posts to my processing page and sends back a string, which I then display inline. I put the comment there, then use slideDown() to show it. When slideDown() occurs, the form used to post the comment also slides down (as you would expect). But the submit button slides down below the bottom of the container element. Does anyone know why this is happening? -- Benjamin Sterling http://www.KenzoMedia.com http://www.KenzoHosting.com
[jQuery] Re: cluetip issue(another issue)
Alright!!! That is great! I've got to update my version of clueTip! Thanks, Karl! Rick From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Karl Swedberg Sent: Sunday, August 26, 2007 2:16 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: cluetip issue(another issue) Hi Rick, yes, that's in there. and yes, it's automatic. check out the demo http://plugins.learningjquery.com/cluetip/demo/ and try example #7. it's the click to activate one, so you'll have to, um, click to activate it. :) You should see the top/bottom positioning. --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com On Aug 26, 2007, at 1:37 PM, Rick Faircloth wrote: Hey, Karl. so you did get the positioning setup where the clueTip will display to the top or bottom of the mouse-over element if the clueTip is too wide to fully display on the right or left of the element? As far as positioning to the top, right, bottom, or left goes, I hope that's automatic depending on screen space available based on the position of the element. Rick From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Karl Swedberg Sent: Sunday, August 26, 2007 1:22 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: cluetip issue(another issue) Hi eridius, Eridius wrote: this is my cluetip code: $('#trip_builder_popup').cluetip({local: true, mouseOutClose: true, sticky: true, positionBy: 'auto'}); I want the box to appear in the same place every time but it is placed based on my mouse, how can i stop this as the demo page works like i want it to? I may have to refactor the code a bit now that I have the positionBy option in there. Early revisions of the plugin tried to decide for you when to position the tool tip by the element and when to position it by the mouse, and I kind of took a sledgehammer approach. Currently, the following conditions will position it by mouse, no matter what you do: - the hovered element has display: block - the hovered element is a map area - there isn't enough room to the right of the left of the hovered element to fit the tool tip completely within the viewable area. I can probably remove the first condition, at least for the horizontal positioning. Vertical positioning is a little different, though. If the hovered element has display:block and its height is fairly large, the tooltip might get positioned in an unexpected place (because if it's not done by mouse position, it lines the tooltip up with the top of the hovered element). Any suggestions are most welcome. Another thing i am looking for is to be able to change the content in the tooltip with ajax while it is displaying. I tried to change the content and the content does change in the div i have added to but the tooltip does not(i guess it pulls the content from the div a displays it instead of displaying the actucally div). is there a way to refrest the tooltip while it is displaying? Here is the relevant code for populating the clueTip with local content: var localContent = $(tipAttribute).html(); $cluetipInner.html(localContent); So, yes, it grabs the innerHTML of the div and displays it. If there is a more reasonable or beneficial way of doing this, let me know. Since I'm already emptying $cluetipInner before I populate it with the new contents, I suppose I could do it this way: $cluetipInner.append(tipAttribute); But I don't think that will solve your problem. If you want to refresh the tooltip while it is displaying, couldn't you just do so by using the $('#cluetip-inner') selector and one of jQuery's DOM insertion methods? Also, if you could show me an example of what you're trying to do, that would be helpful, since I'm not sure I'm quite understanding you properly. --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com
[jQuery] Adding a 'reset' feature to form
Hi all, I currently have your rudimentary HTML form. ( it's large and complex by nature, but lacks any fancy JS plugins etc. ) I was curious if there is a way to integrate a 'Reset All' button to clear all the values to their original values if possible, using some JQuery plugin? Something quick and hackish would work. Thanks all.
[jQuery] Re: Improving jQuery Timers Applications
Michael, Excellent piece of javascript code you have there to begin a real benchment and summary report of all the browsers, machines, OSes timing related issues. I didn't study it yet, but just running it on my XP box with IE and FF, there are different results. I have to see what that means. Thanks for this. I'll have some more info soon. I would love to hear from others who have working web sites or code with grooving jQuery animation that can do a quick test with FastSleep.exe on their windows station. PS: My gmail account was suppose to be my external testing, anonymous, sign up to whatever junk account, but it has taken on a new life. Hector is fine. :-) -- HLS On Aug 26, 1:59 pm, Michael Geary [EMAIL PROTECTED] wrote: Very interesting! I never thought about the effect that other applications might have on JavaScript timers. Thanks for posting that. (BTW, do you prefer to go by Pops or Hector?) Here is something that may be useful in conjunction with your program. A couple of weeks ago when Yehuda was working on iPhone scrolling, I wrote a little test page that logs the timing for several repeats of setInterval() and setTimeout(), using intervals of 0, 1, and 100 milliseconds. http://mg.to/test/interval/ On IE, setInterval(0) does not work, so the page skips that test. All the Windows browsers show the minimum 15ms time just like you said. On the Mac, Firefox shows a minimum setTimeout in the 3-4ms range, and a minimum setInterval around 11ms. Safari shows some 0ms timings for both setInterval(0) and setTimeout(0). iPhone has a minimum 10ms on setInterval. Anyway, I hope that's helpful in any timer investigations. -Mike From: Pops I am interested to hear any test reports for jQuery applications that are using AJAX, any animation for PCs that might have altered the system timer resolution. I posted an entry at my blog with discussing this, with a C/C++ utility you can use to test to see how your applications behave in normal sleep mode vs fast Sleep mode. http://santronics.blogspot.com/ Here is the fastsleep.cpp comments: // Utility to toggle the PC with Windows OS multi-media // resolution that speeds up the Sleep() quantum. // // All PC has a quantum of 10-15ms regardless of the // sleep value. Assuming the PC is 15ms, if you use // Sleep(1), the time slice is 15ms. Sleep(18) is 30ms, // and so on. // // This utility allows you to toggle the resolution // to 1 ms. The actual delay is shown by this utility. // // Why? // // This can change the behavior of your applications // which depends on timers, like many of the Web 2.0 // Javascript applications. In Windows, the multi media // function timeBeginPeriod() changes the resolution // for the entire system. So if some other application // is running with timeBeginPeriod(1) enabled, this // will have a drastic effect on your Web 2.0 application. // It may behave better, it may behave unexpectedly worst. // It might explain someone reported to you, hey this // is not running right. But others don't see this, // and you can't repeat it, so you just blew the report // away.This utility can be use to design your // application properly under all conditions. -- HLS
[jQuery] Re: Beginner not getting it.
Yeah, I'm an idiot, the jQuery script was uploaded to the wrong directory for whatever reason. Sorry for the pointless post, lol. So far I'm tinkering with it and truly enjoying the potential I see jQuery offering. Thanks for not being mean about it!!
[jQuery] Re: Problems with IE after a jquery load
I have the same problem here, does someone can found a solution ?
[jQuery] Help Traversing
script type=text/javascript src=jquery-1.1.4.js/script script type=text/javascript $(document).ready(function(){ $(#comments span h5 a).click(function(){ var author = $(this).parent(span).next(p).text(); alert(author); }) }); /script /head body div id=comments div id=5spanh4Minion/h4h5(a href=#Reply/a)/h5/ spanbr pBack to normal status/p /div /div I'm trying to figure out how to grab the text between the p tags when reply is clicked. I know I got the reply link targeted. I first just had an alert, but tried going further. At first I just had $ (this).next(p).text(); but thought maybe I needed to go to the parent, then move on, but it just shows a blank alert box.
[jQuery] Stop similar ajax requests?
Hi! I'm working on the next version of my web site macforbeginners.com and I'm having a problem with one of the site's features. Here's what I have created so far: I have a buch of articles with tags and I'm now developing a way to browse these tags. When a tag is hovered, I'm loading the articles which have been tagged with that tag into a div. It's nothing complicated really. When the matching articles are being loaded, a spinner appears, indicating that articles are being fetched. Now, here is my problem: If you hover your mouse over several tags quickly, my script will perform ajax requests for each tag, causing the spinner to show and hide several times. What I'm looking for is a solution that will stop all the other ajax requests fetching matching articles when another tag is hovered. Here is the site: http://macforbeginners.com/jquery-problem/ And here is my function: var clickTag = function(scope) { $('ul.tags li', scope).hover(function() { var tag = $(this).html(); $.ajax({ beforeSend: function() { $(.tag-results #spinner).fadeIn(500); }, complete: function() { $(.tag-results #spinner).fadeOut(250); }, type: GET, url: fetch-articles.php, data: view=tagsearchs=+tag, success: function(msg){ $(.tag-results #tag-results-content).empty().append(msg); } }); $(ul.tags li).removeClass(active); $(this).addClass(active); }); } I'm very grateful for any help! Cheers, Mårten
[jQuery] Re: jQuery 1.1.4: Faster, More Tests, Ready for 1.2
I ran the test suite at http://jquery.com/test/ on my five browsers (Firefox 2.0.0.6, MSIE 6, MSIE 7, Opera 9.23, and Safari (Windows) 3.0.3), and in four of them, 0 tests of 816 failed. In Safari, however, 0 tests of 745 failed. What happened to the other 71 tests? I'm new to jQuery, so perhaps this is documented, but I just don't know where. If so, please excuse and direct me. ^_^ Pyro
[jQuery] Re: jQuery 1.1.4: Faster, More Tests, Ready for 1.2
Hi John, that's great news for everybody. We just updated the new builder for the YAML CSS Framework to jQuery version 1.1.4 and it worked like a charm. The builder runs more smooth now! Nice work. You can check it out, it was originally build on version 1.1.3: YAML (Yet Another Multicolumn Layout) Builder: http://builder.yaml.de/ -Tom On Aug 24, 10:46 am, John Resig [EMAIL PROTECTED] wrote: Hi Everyone - jQuery 1.1.4 has just been released! The full details of this release can be found on the jQuery blog:http://jquery.com/blog/2007/08/24/jquery-114-faster-more-tests-ready-... Suffice it to say that some significant speed increases, test coverage increases, and API reductions have been made. Please let us know if you encounter any new problems from jQuery 1.1.3.1. --John
[jQuery] Re: Very confused!
Weel, it's simple (easy to say after a couple of tries, I must admit). The real reason is in the REGEXP, which does not work at all for numbers, but only on empty []. So, the FIRST run of the script works in both cases, since the [] are empty. But then, on the second run, the REGEXP is failing miserably... only on the broken code (the div productOption AFTER the #newProductOption div). Why ? Because starting at the 2nd run, the var tpl = JQ('.productOption:first') line is now retrieving, in this broken situation, the FIRST created .productOption div, with a name of [1000]. Since the REGEXP is failing, it does not match anything, so it does not CHANGE anything... your cloned node remains the same, cloning after cloning. On the working solution, of course, you always select the always-first div that does not contain an number in its name, so the REGEXP still matches. Try to put [2000], you'll see it's failing. But, overall, I think your code is complex: why take :first, if your template div is the last ? Putting a more logical (to me) last would work like a charm. It took me a bit of time because initially, I thought that you would extract the number from the name, increment it, and write it to the new node. But with the way your algorithm works (much simpler than my first though), why not simply create a node on the fly, with JQ('my html code [' + OINDEX + '] blabla') ? Best, Order of divs make the jQuery selector retrieve different On Aug 25, 4:36 pm, Stephan Beal [EMAIL PROTECTED] wrote: On Aug 24, 3:10 pm, Scott Sauyet [EMAIL PROTECTED] wrote: var new_name = n.replace(/\[\d?\]/, '[' + OINDEX + ']'); For your code you don't need the \d?, because your template doesn't have a number in it. That said, your template code is incorrect: JQ(tpl).find('[EMAIL PROTECTED]').each(function(){ Carefully count the [ and ] characters in that string and you'll find that they're mismatched and cannot match your regex: var new_name = n.replace(/\[\d?\]/, '[' + OINDEX + ']'); Also, it wouldn't surprise me if you need to escape the [ and ] inside the find() command, as detailed in the FAQ: http://docs.jquery.com/Frequently_Asked_Questions#How_do_I_select_an_... But apparently your working example demonstrates that that's not necessary. THAT i can't explain, though. :)
[jQuery] Help Traversing
I hope this isn't a double post, my other one was over 12hrs ago and it never displayed. I'm trying to get the text out of a p tag, I can do this if I set an id name, but I don't want to id everything, since with jQuery I don't need to. The premise is I'm clicking a link and it gets two values and inserts them in a texarea. Inserting isn't the problem, just finding the values. $(document).ready(function(){ $(#comments span h5 a).click(function(){ var author = $(this).parent(span).next(p).text(); alert(author); }) }); div id=comments div id=5spanh4Minion/h4h5(a href=#Reply/a)/h5/ spanbr pBack to normal status/p /div /div I'm finding the link, I had an alert test, so I know it works. So I then tried to capture the data in the p tag. I just get a blank alert though. I tried without the parent at first, but got nothing. So thought I had to go up to the main tag before calling next, still nothing. While on topic, is there a way to get the value of an id tag? The number 5 will serve importance later.
[jQuery] RE: jQuery 1.1.4: Faster, More Tests, Ready for 1.2
Hi John, that's great news for everybody. We just updated the new builder for the YAML CSS Framework to jQuery version 1.1.4 and it worked like a charm. The builder runs more smooth now! Nice work. It was originally build on version 1.1.3: YAML (Yet Another Multicolumn Layout) Builder: http://builder.yaml.de/ -Tom On Aug 24, 10:46 am, John Resig [EMAIL PROTECTED] wrote: Hi Everyone - jQuery 1.1.4 has just been released! The full details of this release can be found on the jQuery blog:http://jquery.com/blog/2007/08/24/jquery-114-faster-more-tests-ready-... Suffice it to say that some significant speed increases, test coverage increases, and API reductions have been made. Please let us know if you encounter any new problems from jQuery 1.1.3.1. --John
[jQuery] Ajax errors
I can't seem to figure out why this isn't working. request.php is working just fine. $(document).ready(function(){ $(input.search).keypress(function(){ $(select.make).removeAttr('disabled'); $(button.search).removeAttr('disabled'); }); $(select.make).each(function(i){ $(this).change(function(){ if($(this).val() 0) { $.ajax({ type: POST, url: /request.php, data: action=model_listmake_id= + $(this).val(), dataType: json, success: function(json) { $(select.model)[i].empty(); for(ii in json) { $(select.model)[i].append('option value=' + json[ii]['id'] + '' + json[ii]['name'] + '/option'); } }, error: function(object, msg) { alert(msg); }, complete: function() { $(select.model)[i].removeAttr('disabled'); } }); } }); }); }); I get an alert box with error...
[jQuery] Stopping a link from forwarding
I have the following code and was wondering how you stop a link from forwarding to the url when clicked? I'd assume it'd go inside the click, but couldn't find a way looking through the Visual jQuery. $(#pnav li a).click(function(){ $(#article).slideUp(slow); }); Also, not sure if anyone will get this message. This is the 3rd response/post I've tried that has not appeared. I've waited to see if they post, but never do.
[jQuery] Re: Is there an autocomplete plugin that allows for a hidden field that does not show?
Now I see that, and I have played around with it, but that requires the species to show in the results, which I don't want. :/ On Aug 23, 8:10 pm, Dylan Verheul [EMAIL PROTECTED] wrote: On 8/23/07, inVINCable [EMAIL PROTECTED] wrote: I am new from prototype and scriptaculous and have been puzzled all day by trying to figure out this autocomplete business with jQuery. I have searched all over including the plugins page on the jquery website and cannot find what I need, an autocomplete field that will get the ID of the selection without showing it. A good example would be let's say we take the id a company was assigned to, say 3434. When the user clicks on that company, I want 3434 to be submitted with the form, but NOT in the actual text box, or anywhere visible. I was able to do this in prototype by assigned an id to the li that is equal to the ID, then the id is taken from the li element of the selection then submitted as a hidden form element. Unless I misunderstand, The example you mention is widely present in the various autocomplete examples (most of which are improvements of one and the same script, and a rewrite). Onhttp://www.dyve.net/jquery/?autocomplete, start typing some letters (for example: 'com') in the search box. Some bird species will appear. Select one, and the page will show you the scientific name. The parameter used is onSelectItem. Substitute bird name = company name, scientific name = id, and you should be good to go. Jörn's rewrite (http://jquery.bassistance.de/autocomplete/) offers similar examples. ( ... ) I really would like to avoid using prototype/scripaculous but I might have to if there is no solution via jQuery :/ You aren't blackmailing us are you? ;-) Good luck with the autocomplete. Dylan
[jQuery] How do you make a dive stick to the top of the screen even if you scroll down?
Hi all, I pretty much asked my question on the subject line but If it is not clear, read below: I want a div to stay at the top of the screen when you scroll up and down. This container div will have two divs inside, the upper one will contain 'tools' (links, serchbox, etc.), the bottom one will just contain a stub picture to toggle the 'tools' dive on and off. Thus normally the page has a small stub fixed at a top corner, when it is clicked a toolbar slides down. I wondered if this could be done with jQuery Many thanks.
[jQuery] .ajax error, error object has responseText.
I've tried many things to fix this. In the error alert box I get: [{id:827,make_id:96,name:tC}, {id:825,make_id:96,name:xA}, {id:826,make_id:96,name:xB}, {id:828,make_id:96,name:xD}] Which is correct. $(function(){ $(input.search).keypress(function(){ $(select.make).removeAttr('disabled'); $(button.search).removeAttr('disabled'); }); $(select.make).each(function(i){ $(this).change(function(){ var make_id = $(this).val(); var select_models = $(select.model)[i]; if(make_id 0) { $.ajax({ type: POST, url: /request.php, data: {action: model_list, make_id: make_id}, dataType: json, success: function(models) { select_models.empty(); $(models).each(function(ii){ select_models.append('option value=' + $(this)['id'] + '' + $(this)['name'] + '/option'); }); select_models.removeAttr('disabled'); }, error: function(object, msg) { alert(object.responseText); } }); } }); }); });
[jQuery] Cross-Domain xmlHttp
Hi All, Has anybody used jquery for cross-domain xmlHttp (AJAX) requests? Is this supported by jquery. When I say cross-domain, I mean (say) http://abc.com doing an xmlHttp request to http://def.com Cheers in advence
[jQuery] Passing variable in jQuery
I'm trying to get the text of what I clicked for later in the function, but can't seem to pass it. $(#pnav li a).click(function(){ var page = $(this).text(); $(#article).slideUp(slow, function(page){ alert(page); }); return false; }); If I test the alert before I go into the slideup it works, do you have to pass it a different way or am I doing it right just wrong, lol?
[jQuery] Re: interface draggable and resizeable
I'm sorry for moving this post up but I'm still looking for the answer. Anyone?
[jQuery] Re: Ajax errors
Try changing your error handler to this and see what you get: error: function(object, msg, err) { alert(err); }, Mike On 8/26/07, c4st [EMAIL PROTECTED] wrote: I can't seem to figure out why this isn't working. request.php is working just fine. $(document).ready(function(){ $(input.search).keypress(function(){ $(select.make).removeAttr('disabled'); $(button.search).removeAttr('disabled'); }); $(select.make).each(function(i){ $(this).change(function(){ if($(this).val() 0) { $.ajax({ type: POST, url: /request.php, data: action=model_listmake_id= + $(this).val(), dataType: json, success: function(json) { $(select.model)[i].empty(); for(ii in json) { $(select.model)[i].append('option value=' + json[ii]['id'] + '' + json[ii]['name'] + '/option'); } }, error: function(object, msg) { alert(msg); }, complete: function() { $(select.model)[i].removeAttr('disabled'); } }); } }); }); }); I get an alert box with error...
[jQuery] Re: Help Traversing
On Aug 25, 2007, at 1:10 AM, atomicnuke wrote: script type=text/javascript src=jquery-1.1.4.js/script script type=text/javascript $(document).ready(function(){ $(#comments span h5 a).click(function(){ var author = $(this).parent(span).next(p).text(); alert(author); }) }); /script /head body div id=comments div id=5spanh4Minion/h4h5(a href=#Reply/a)/h5/ spanbr pBack to normal status/p /div /div I'm trying to figure out how to grab the text between the p tags when reply is clicked. I know I got the reply link targeted. I first just had an alert, but tried going further. At first I just had $ (this).next(p).text(); but thought maybe I needed to go to the parent, then move on, but it just shows a blank alert box. You could try something like this: $(document).ready(function() { $('h5 a').click(function() { var txt = $(this).parents('div:first').next().text(); alert(txt); return false; }); }); This goes up the DOM to the first div that is an ancestor of the clicked item, then goes to the next sibling and grabs its text. --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com
[jQuery] Re: Stopping a link from forwarding
You need to add return false: $(#pnav li a).click(function(){ $(#article).slideUp(slow); return false; }); Also, you should be able to post w/o moderation now. Mike On 8/26/07, atomicnuke [EMAIL PROTECTED] wrote: I have the following code and was wondering how you stop a link from forwarding to the url when clicked? I'd assume it'd go inside the click, but couldn't find a way looking through the Visual jQuery. $(#pnav li a).click(function(){ $(#article).slideUp(slow); }); Also, not sure if anyone will get this message. This is the 3rd response/post I've tried that has not appeared. I've waited to see if they post, but never do.
[jQuery] Re: Adding a 'reset' feature to form
Do you mean something different than using the standard reset button? On 8/26/07, Steve Finkelstein [EMAIL PROTECTED] wrote: Hi all, I currently have your rudimentary HTML form. ( it's large and complex by nature, but lacks any fancy JS plugins etc. ) I was curious if there is a way to integrate a 'Reset All' button to clear all the values to their original values if possible, using some JQuery plugin? Something quick and hackish would work. Thanks all.
[jQuery] Re: How do you make a dive stick to the top of the screen even if you scroll down?
Majid, You can do that by assigning the position style of fixed. That will work in all browsers except IE6. In IE6 you need to use style expressions. The blockUI plugin does this so you might be able to get some ideas from it: http://jqueryjs.googlecode.com/svn/trunk/plugins/blockUI/jquery.blockUI.js Mike On 8/25/07, Majid [EMAIL PROTECTED] wrote: Hi all, I pretty much asked my question on the subject line but If it is not clear, read below: I want a div to stay at the top of the screen when you scroll up and down. This container div will have two divs inside, the upper one will contain 'tools' (links, serchbox, etc.), the bottom one will just contain a stub picture to toggle the 'tools' dive on and off. Thus normally the page has a small stub fixed at a top corner, when it is clicked a toolbar slides down. I wondered if this could be done with jQuery Many thanks.
[jQuery] Re: jQuery 1.1.4: Faster, More Tests, Ready for 1.2
Hi Tom - This is very cool, great work! --John On 8/25/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi John, that's great news for everybody. We just updated the new builder for the YAML CSS Framework to jQuery version 1.1.4 and it worked like a charm. The builder runs more smooth now! Nice work. You can check it out, it was originally build on version 1.1.3: YAML (Yet Another Multicolumn Layout) Builder: http://builder.yaml.de/ -Tom On Aug 24, 10:46 am, John Resig [EMAIL PROTECTED] wrote: Hi Everyone - jQuery 1.1.4 has just been released! The full details of this release can be found on the jQuery blog:http://jquery.com/blog/2007/08/24/jquery-114-faster-more-tests-ready-... Suffice it to say that some significant speed increases, test coverage increases, and API reductions have been made. Please let us know if you encounter any new problems from jQuery 1.1.3.1. --John
[jQuery] Re: Passing variable in jQuery
Don't declare page in the function argument for the slideUp callback. You're overriding the page you declared above which is already in scope. Mike On 8/26/07, atomicnuke [EMAIL PROTECTED] wrote: I'm trying to get the text of what I clicked for later in the function, but can't seem to pass it. $(#pnav li a).click(function(){ var page = $(this).text(); $(#article).slideUp(slow, function(page){ alert(page); }); return false; }); If I test the alert before I go into the slideup it works, do you have to pass it a different way or am I doing it right just wrong, lol?
[jQuery] Re: Cross-Domain xmlHttp
Unfortunately, no. This is a limitation in all browsers in order to limit security concerns. In jQuery 1.2 you'll be able to do cross-domain Ajax, but only if you're working with Scripts or JSON data. --John On 8/26/07, hogsmill [EMAIL PROTECTED] wrote: Hi All, Has anybody used jquery for cross-domain xmlHttp (AJAX) requests? Is this supported by jquery. When I say cross-domain, I mean (say) http://abc.com doing an xmlHttp request to http://def.com Cheers in advence
[jQuery] Re: Problems with IE after a jquery load
I'm having a similar problem when I call this function: frameMe : function() { alert(frameMe...); $(#content .frame).load(function() { alert(image loaded...); [ ...code... ] }); } Firefox gives the alert frameMe... followed by each of the image loaded... alerts for the images that it binds to. IE6 and IE7 both alert frameMe... and nothing afterward. Are there others having problems with IE and the load event? Or others with a solution? Thanks, Danny
[jQuery] Re: Improving jQuery Timers Applications
Michael, At first glance, your code is essentially establishling a baseline for the optimal timing the js user agent because each test is sequentially synchronized. There is a clear difference with IE and FF. This is good and allow us to being proposing, if further required, a consistent solution for jQuery. What I am going to do, and you might to try this yourself if interested (since your JS coding is far superior to mine (for the mean time g) is: 1 - Perform multi-tasking timing test. This will give more real life applicability. This is basically firing 1, 2, 4, 8, 16 timeout dispatches to see how it degrades the system. Two set of test: 1.1 - A common dispatch should be all the same and have VERY little overhead. Mostly nothing. 1.2 - A common dispatch does some work. Ideally, the works should be two kinds, one that is small enough so that the pre-emptive context switching is minimize, and the second would be a more extensive work where the context switching is higher. In short, this will give us an overall Coding Recommendation that applets should minimize dispatch work (this is par for the course). But we can also gain insight on what jQuery work might be too much in dispatches. I realize this might be all for nothing, but atleast we will have a better grip on the timer issues and thus a better jQuery timer design, if possible, without the swags that inevitably creates QA problems. -- HLS On Aug 26, 3:54 pm, Pops [EMAIL PROTECTED] wrote: Michael, Excellent piece of javascript code you have there to begin a real benchment and summary report of all the browsers, machines, OSes timing related issues. I didn't study it yet, but just running it on my XP box with IE and FF, there are different results. I have to see what that means. Thanks for this. I'll have some more info soon. I would love to hear from others who have working web sites or code with grooving jQuery animation that can do a quick test with FastSleep.exe on their windows station. PS: My gmail account was suppose to be my external testing, anonymous, sign up to whatever junk account, but it has taken on a new life. Hector is fine. :-) -- HLS On Aug 26, 1:59 pm, Michael Geary [EMAIL PROTECTED] wrote: Very interesting! I never thought about the effect that other applications might have on JavaScript timers. Thanks for posting that. (BTW, do you prefer to go by Pops or Hector?) Here is something that may be useful in conjunction with your program. A couple of weeks ago when Yehuda was working on iPhone scrolling, I wrote a little test page that logs the timing for several repeats of setInterval() and setTimeout(), using intervals of 0, 1, and 100 milliseconds. http://mg.to/test/interval/ On IE, setInterval(0) does not work, so the page skips that test. All the Windows browsers show the minimum 15ms time just like you said. On the Mac, Firefox shows a minimum setTimeout in the 3-4ms range, and a minimum setInterval around 11ms. Safari shows some 0ms timings for both setInterval(0) and setTimeout(0). iPhone has a minimum 10ms on setInterval. Anyway, I hope that's helpful in any timer investigations. -Mike From: Pops I am interested to hear any test reports for jQuery applications that are using AJAX, any animation for PCs that might have altered the system timer resolution. I posted an entry at my blog with discussing this, with a C/C++ utility you can use to test to see how your applications behave in normal sleep mode vs fast Sleep mode. http://santronics.blogspot.com/ Here is the fastsleep.cpp comments: // Utility to toggle the PC with Windows OS multi-media // resolution that speeds up the Sleep() quantum. // // All PC has a quantum of 10-15ms regardless of the // sleep value. Assuming the PC is 15ms, if you use // Sleep(1), the time slice is 15ms. Sleep(18) is 30ms, // and so on. // // This utility allows you to toggle the resolution // to 1 ms. The actual delay is shown by this utility. // // Why? // // This can change the behavior of your applications // which depends on timers, like many of the Web 2.0 // Javascript applications. In Windows, the multi media // function timeBeginPeriod() changes the resolution // for the entire system. So if some other application // is running with timeBeginPeriod(1) enabled, this // will have a drastic effect on your Web 2.0 application. // It may behave better, it may behave unexpectedly worst. // It might explain someone reported to you, hey this // is not running right. But others don't see this, // and you can't repeat it, so you just blew the report // away.This utility can be use to design your // application properly under all conditions. -- HLS
[jQuery] Re: Passing variable in jQuery
So simple, thank you!
[jQuery] Re: FadeIn problems
Could you post the html as well? It's much easier to understand what you're trying to do if we can see the html you're working on. /Anders On 25 Aug, 03:54, Neal [EMAIL PROTECTED] wrote: I have a page with several DIVs, and inside each DIV are paragraphs and headings. On the side I have a list of named anchors. My script adds an onclick event to the anchors that hides all of the DIVs, then fades the selected DIV. It looks fantastic in FireFox, but there's no fade in IE6 or IE7. And the kicker is Safari fades the DIV in, but when 100% opacity is reached, all of the paragraphs float to the top of the containing DIV, as if their positioning property was switched to absolute. Here's my code: $(#side a).each(function(){ $(this).click(function(){ $(#primary div).hide(); $(#primary div:first).before( $(this.hash)[0] ); $(this.hash).fadeIn(1700); // fails in Safari return false; }); }); }), Any ideas?
[jQuery] Re: Stop similar ajax requests?
martenbjork schrieb: Hi! I'm working on the next version of my web site macforbeginners.com and I'm having a problem with one of the site's features. Here's what I have created so far: I have a buch of articles with tags and I'm now developing a way to browse these tags. When a tag is hovered, I'm loading the articles which have been tagged with that tag into a div. It's nothing complicated really. When the matching articles are being loaded, a spinner appears, indicating that articles are being fetched. Now, here is my problem: If you hover your mouse over several tags quickly, my script will perform ajax requests for each tag, causing the spinner to show and hide several times. What I'm looking for is a solution that will stop all the other ajax requests fetching matching articles when another tag is hovered. There isn't an offical release yet, but it sounds like you need the ajaxQueue plugin. Code is here: http://dev.jquery.com/browser/trunk/plugins/ajaxQueue/ Usage is very simple: Just add one or two options to your $.ajax call: // cancel a previous pending request when starting this one mode: abort // optional: specify a port to cancel only requests of a certain kind port: tags Let me know if that works for you. -- Jörn
[jQuery] Re: Release: Accordion 1.5
Ganeshji Marwaha schrieb: Jörn, this is fantastic... very re-usable as well.. I have a question/suggestion though... When i hover over one of the items, and before the animation completes if i hover over another item, the animation for the second item doesn't occur. Now, i will have to move my mouse out of that item and hover over it again to get the other item to expand. Is it something that can be fixed, or is it a known limitation that we will have to live by... Well, so far that was intended to be a feature, not a bug. The combination of long-running animations with hover is annoying, right. But it is also annoying when the accordion keeps changing on each mouse move, even when you didn't intend to get a different chunk. Fixing it isn't difficult, but it is difficult to decide what the right fix actually is. Your help is appreciated. -- Jörn
[jQuery] Re: Plugin Repository - Report New Bugs and Request New Features?
Ganeshji Marwaha schrieb: your site is hosted on hostmonster (same as mine), and they run apache 1.x, which doesn't have the necessary apache modules for hosting an svn server. yup, that is true :-( . You can use Google Code just like jQuery does. And in contrast to sourceforge.net, your project creation request isn't delayed or denied on some random basis. -- Jörn
[jQuery] Re: cluetip issue(another issue)
Well. can't get the new stuff to work. I believe I've replaced all the previous downloads with the downloads from the plug-in download page. Everything updated. Using the load-local technique, as before. All the various files seem to be in place. I can download all of them from the browser. All my images that should be hidden, are just sitting on the page. if you get a second, could you see if there's something obvious amiss? http://gs.whitestonemedia.com The insect images are what are of concern. The larger versions are just sitting below them. See anything? Thanks! Rick From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Karl Swedberg Sent: Sunday, August 26, 2007 2:16 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: cluetip issue(another issue) Hi Rick, yes, that's in there. and yes, it's automatic. check out the demo http://plugins.learningjquery.com/cluetip/demo/ and try example #7. it's the click to activate one, so you'll have to, um, click to activate it. :) You should see the top/bottom positioning. --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com On Aug 26, 2007, at 1:37 PM, Rick Faircloth wrote: Hey, Karl. so you did get the positioning setup where the clueTip will display to the top or bottom of the mouse-over element if the clueTip is too wide to fully display on the right or left of the element? As far as positioning to the top, right, bottom, or left goes, I hope that's automatic depending on screen space available based on the position of the element. Rick From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Karl Swedberg Sent: Sunday, August 26, 2007 1:22 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: cluetip issue(another issue) Hi eridius, Eridius wrote: this is my cluetip code: $('#trip_builder_popup').cluetip({local: true, mouseOutClose: true, sticky: true, positionBy: 'auto'}); I want the box to appear in the same place every time but it is placed based on my mouse, how can i stop this as the demo page works like i want it to? I may have to refactor the code a bit now that I have the positionBy option in there. Early revisions of the plugin tried to decide for you when to position the tool tip by the element and when to position it by the mouse, and I kind of took a sledgehammer approach. Currently, the following conditions will position it by mouse, no matter what you do: - the hovered element has display: block - the hovered element is a map area - there isn't enough room to the right of the left of the hovered element to fit the tool tip completely within the viewable area. I can probably remove the first condition, at least for the horizontal positioning. Vertical positioning is a little different, though. If the hovered element has display:block and its height is fairly large, the tooltip might get positioned in an unexpected place (because if it's not done by mouse position, it lines the tooltip up with the top of the hovered element). Any suggestions are most welcome. Another thing i am looking for is to be able to change the content in the tooltip with ajax while it is displaying. I tried to change the content and the content does change in the div i have added to but the tooltip does not(i guess it pulls the content from the div a displays it instead of displaying the actucally div). is there a way to refrest the tooltip while it is displaying? Here is the relevant code for populating the clueTip with local content: var localContent = $(tipAttribute).html(); $cluetipInner.html(localContent); So, yes, it grabs the innerHTML of the div and displays it. If there is a more reasonable or beneficial way of doing this, let me know. Since I'm already emptying $cluetipInner before I populate it with the new contents, I suppose I could do it this way: $cluetipInner.append(tipAttribute); But I don't think that will solve your problem. If you want to refresh the tooltip while it is displaying, couldn't you just do so by using the $('#cluetip-inner') selector and one of jQuery's DOM insertion methods? Also, if you could show me an example of what you're trying to do, that would be helpful, since I'm not sure I'm quite understanding you properly. --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com
[jQuery] Re: Adding a 'reset' feature to form
On Aug 26, 9:50 pm, Steve Finkelstein [EMAIL PROTECTED] wrote: I was curious if there is a way to integrate a 'Reset All' button to clear all the values to their original values if possible, using some JQuery plugin? Something quick and hackish would work. No need for a hack - HTML has this feature already: http://www.htmlcodetutorial.com/forms/_INPUT_TYPE_RESET.html
[jQuery] Re: Plugin Repository - Report New Bugs and Request New Features?
On Aug 26, 11:04 pm, Jörn Zaefferer [EMAIL PROTECTED] wrote: You can use Google Code just like jQuery does. And in contrast to sourceforge.net, your project creation request isn't delayed or denied on some random basis. Thanks for that tip. :) What services do they provide? i'm poking around code.google.com and can find absolutely zero info about what services they provide to hosted projects. i know i could find out by creating a new project, but i don't want to create a project just to find out what they offer.
[jQuery] Re: jQuery 1.1.4: Faster, More Tests, Ready for 1.2
Pops schrieb: So who knows what the developer of this code was thinking when he/she set this value to 1. Maybe you do need it for animation. Maybe he had yahoo finance running at the time and it mistakely thought that 1ms is the Fastest Possible when it fact it is not. Zero ms is the fastest. The problem is that 0ms is so fast, it will create a massive CPU hogging. So you don't want 0ms. Here is one resource about minimum timeout values: http://dev.opera.com/articles/view/efficient-javascript/?page=2#timeouts (last paragraph). Not exactly accurate, but at least a better rule of thumb then just guessing in the wild. -- Jörn
[jQuery] Re: cluetip issue(another issue)
Doh! What a dummy. (I should have emailed you off-list! :o) thanks, Karl. The plug-in seems to be *much* quicker, too! Rick From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Karl Swedberg Sent: Sunday, August 26, 2007 5:46 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: cluetip issue(another issue) Hey Rick, Your code isn't inside the $(document).ready() :-) --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com On Aug 26, 2007, at 5:03 PM, Rick Faircloth wrote: Well. can't get the new stuff to work. I believe I've replaced all the previous downloads with the downloads from the plug-in download page. Everything updated. Using the load-local technique, as before. All the various files seem to be in place. I can download all of them from the browser. All my images that should be hidden, are just sitting on the page. if you get a second, could you see if there's something obvious amiss? http://gs.whitestonemedia.com http://gs.whitestonemedia.com The insect images are what are of concern. The larger versions are just sitting below them. See anything? Thanks! Rick From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Karl Swedberg Sent: Sunday, August 26, 2007 2:16 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: cluetip issue(another issue) Hi Rick, yes, that's in there. and yes, it's automatic. check out the demo http://plugins.learningjquery.com/cluetip/demo/ http://plugins.learningjquery.com/cluetip/demo/ and try example #7. it's the click to activate one, so you'll have to, um, click to activate it. :) You should see the top/bottom positioning. --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com On Aug 26, 2007, at 1:37 PM, Rick Faircloth wrote: Hey, Karl. so you did get the positioning setup where the clueTip will display to the top or bottom of the mouse-over element if the clueTip is too wide to fully display on the right or left of the element? As far as positioning to the top, right, bottom, or left goes, I hope that's automatic depending on screen space available based on the position of the element. Rick From: jquery-en@googlegroups.com [ mailto:jquery-en@googlegroups.com mailto:[EMAIL PROTECTED] On Behalf Of Karl Swedberg Sent: Sunday, August 26, 2007 1:22 PM To: mailto:jquery-en@googlegroups.com jquery-en@googlegroups.com Subject: [jQuery] Re: cluetip issue(another issue) Hi eridius, Eridius wrote: this is my cluetip code: $('#trip_builder_popup').cluetip({local: true, mouseOutClose: true, sticky: true, positionBy: 'auto'}); I want the box to appear in the same place every time but it is placed based on my mouse, how can i stop this as the demo page works like i want it to? I may have to refactor the code a bit now that I have the positionBy option in there. Early revisions of the plugin tried to decide for you when to position the tool tip by the element and when to position it by the mouse, and I kind of took a sledgehammer approach. Currently, the following conditions will position it by mouse, no matter what you do: - the hovered element has display: block - the hovered element is a map area - there isn't enough room to the right of the left of the hovered element to fit the tool tip completely within the viewable area. I can probably remove the first condition, at least for the horizontal positioning. Vertical positioning is a little different, though. If the hovered element has display:block and its height is fairly large, the tooltip might get positioned in an unexpected place (because if it's not done by mouse position, it lines the tooltip up with the top of the hovered element). Any suggestions are most welcome. Another thing i am looking for is to be able to change the content in the tooltip with ajax while it is displaying. I tried to change the content and the content does change in the div i have added to but the tooltip does not(i guess it pulls the content from the div a displays it instead of displaying the actucally div). is there a way to refrest the tooltip while it is displaying? Here is the relevant code for populating the clueTip with local content: var localContent = $(tipAttribute).html(); $cluetipInner.html(localContent); So, yes, it grabs the innerHTML of the div and displays it. If there is a more reasonable or beneficial way of doing this, let me know. Since I'm already emptying $cluetipInner before I populate it with the new contents, I suppose I could do it this way: $cluetipInner.append(tipAttribute); But I don't think that will solve your problem. If you want to refresh the tooltip while it is displaying, couldn't you just do so by using the $('#cluetip-inner')
[jQuery] Re: Release: Accordion 1.5
In my opinion (and only my opinion) i think that it is kinda disturbing if we hover on one item and immediately if we hover on another item, the accordian doesn't open for the second item. If you look at the mootools.net home page, you see the kwick(horizontal acoordian). I am working on something like that. I am facing the same problem there as well. But in the mootools site, if you hover from the left end to the right end fast, you could see that the intermediate items partially animate... As far as i know this can be solved using the stop() method in fx. But the stop() method is available only as part of the interface's animation extension. John has promised that as part of the core in 1.2 though. So, again, in my opinion, i would favor an approach where if we hover over one item and then immediately if we hover over the other item before the animation of first is complete, then the animation of the first item should be stopped in the middle and the second animation should start. That would be ideal. But i am not sure how easy or difficult it is. I am keen and willing to do any help that might be required. -GTG On 8/26/07, Jörn Zaefferer [EMAIL PROTECTED] wrote: Ganeshji Marwaha schrieb: Jörn, this is fantastic... very re-usable as well.. I have a question/suggestion though... When i hover over one of the items, and before the animation completes if i hover over another item, the animation for the second item doesn't occur. Now, i will have to move my mouse out of that item and hover over it again to get the other item to expand. Is it something that can be fixed, or is it a known limitation that we will have to live by... Well, so far that was intended to be a feature, not a bug. The combination of long-running animations with hover is annoying, right. But it is also annoying when the accordion keeps changing on each mouse move, even when you didn't intend to get a different chunk. Fixing it isn't difficult, but it is difficult to decide what the right fix actually is. Your help is appreciated. -- Jörn
[jQuery] Re: Release: Accordion 1.5
Jörn, how hard would it be to incorporate hoverIntent? Brian. On 8/26/07, Jörn Zaefferer [EMAIL PROTECTED] wrote: Ganeshji Marwaha schrieb: Jörn, this is fantastic... very re-usable as well.. I have a question/suggestion though... When i hover over one of the items, and before the animation completes if i hover over another item, the animation for the second item doesn't occur. Now, i will have to move my mouse out of that item and hover over it again to get the other item to expand. Is it something that can be fixed, or is it a known limitation that we will have to live by... Well, so far that was intended to be a feature, not a bug. The combination of long-running animations with hover is annoying, right. But it is also annoying when the accordion keeps changing on each mouse move, even when you didn't intend to get a different chunk. Fixing it isn't difficult, but it is difficult to decide what the right fix actually is. Your help is appreciated. -- Jörn
[jQuery] Re: Plugin Repository - Report New Bugs and Request New Features?
On Aug 26, 2007, at 2:55 AM, Stephan Beal wrote: On Aug 26, 5:23 am, Karl Swedberg [EMAIL PROTECTED] wrote: It's seems a shame not to use what looks like a nice tool. i agree 100%, and i think it would help if the plugin developers started directing people to the bug db. The bug db has a higher barrier to entry than the list does (one has to create an account on the web site), though, so that might keep some people away (most list- goers have a Google account already). Okay then. If anyone would like to report a bug or add a feature request for the clueTip plugin, you may do so here: http://jquery.com/plugins/node/add/project_issue/cluetip/bug or here: http://jquery.com/plugins/node/add/project_issue/cluetip/feature :-) As I've been working on the clueTip plugin, one of the hardest things for me has been to keep track of what people want out of it and what they're finding wrong with it. If memory serves me properly, most people report bugs to you via this list or your blog. yeah. multiple threads, multiple blog entries. and personal email. and IM. :-) Hard to keep track of. Just to be clear -- I'm not complaining, and I'm not suggesting that it's anyone's fault but my own. I'm just seeking guidance for managing this stuff and wondering if there was a flaw in the plugin repository's tools or if people weren't using them for some other reason. Sounds like you and Ganeshji think there's nothing inherently wrong with those tools, but other factors, such as force of habit, path of least resistance, etc. are the (de-)motivating factors. I really appreciate the input, Stephan. And Ganeshji. Okay, sorry, I'm rambling. i think you've brought a very useful topic to the surface. A summary of my stance is: it's a problem of education - the developers should get in the habit of teaching the users to file bug reports by simply requesting them to please file a bug report at http://...; That may be overkill for trivial reports which you know you can fix in a few minutes, but for bugs which won't/can't be fixed immediately, i feel it's a good solution. Excellent suggestion. I think I'll start doing that. Thanks again! --Karl
[jQuery] Re: Improving jQuery Timers Applications
Michael just a quick comment: On IE, setInterval(0) does not work, so the page skips that test. What did you see that made it not work? I just tried it and setInterval(0) worked fine, just like setTimeout(0) both provided a 15ms resolution. I did something like this: var dispatches = []; function done(disp,n,start) { if (disp) clearInterval(dispatches[n]); var diff = getTime()-start; var s = n: +n+ diff: +diff+br; // $('#divLog').append(s); document.getElementById('divLog').innerHTML += s; } function doInterval() // called by button A click { var t = $('#intervalms').val(); for (i=0; i 10; i++) { dispatches[i] = setInterval(done(1,+i+,+getTime()+),t); } } function doTimeout() // called by button B click { var t = $('#timeoutms').val(); for (i=0; i 10; i++) { setTimeout(done(0,+i+,+getTime()+),t); } } -- HLS
[jQuery] Re: jQuery 1.1.4: Faster, More Tests, Ready for 1.2
WebKit nightlies and Safari 3 disregard any timers less than 10ms and according to this article so does IE and Firefox. See the section titled (3) JS Timeouts and Intervals here: http://webkit.org/blog/?p=96 -- Brandon Aaron On 8/26/07, Jörn Zaefferer [EMAIL PROTECTED] wrote: Pops schrieb: So who knows what the developer of this code was thinking when he/she set this value to 1. Maybe you do need it for animation. Maybe he had yahoo finance running at the time and it mistakely thought that 1ms is the Fastest Possible when it fact it is not. Zero ms is the fastest. The problem is that 0ms is so fast, it will create a massive CPU hogging. So you don't want 0ms. Here is one resource about minimum timeout values: http://dev.opera.com/articles/view/efficient-javascript/?page=2#timeouts (last paragraph). Not exactly accurate, but at least a better rule of thumb then just guessing in the wild. -- Jörn
[jQuery] Cycle Plugin
I'm using the cycle plug in and I was wondering if anyone knew a way to access the file name and display it with the image. If this can't be done I have worked myself into a nice hole J Thanks Mitch
[jQuery] Re: Cycle Plugin
Mitch, You can use the before callback to do interesting things like that. In fact I do something very similar on the callbacks example: http://www.malsup.com/jquery/cycle/int2.html Mike On 8/26/07, Mitchell Waite [EMAIL PROTECTED] wrote: I'm using the cycle plug in and I was wondering if anyone knew a way to access the file name and display it with the image. If this can't be done I have worked myself into a nice hole J Thanks Mitch
[jQuery] Re: Wrong Width in Firefox
That's fine. It's along the lines of where my (not very comprehensive) suggestion was leading! b0bd0gz wrote: Thanks for the reply Wizzud, I think your probably right about why the width is out by a pixel. Wrapping the image and paragraph in a div did't work but it did lead to me figuring out a workaround. What I did was wrap the anchor, image and paragraph in a div, then instead of jQuery setting the paragraphs width I made it set the wrapping div's width and added 18 to that value. Then with CSS set the wrapping divs background colour to white. So now the over sized div is now the white border and background of the paragraph. Don't know if that explanation of what I did made any sense what so ever, if it didn't and you want me to try and explain it again let me know. Thanks for all the help :D b0b0dgz -- View this message in context: http://www.nabble.com/Wrong-Width-in-Firefox-tf4324806s15494.html#a12340089 Sent from the JQuery mailing list archive at Nabble.com.
[jQuery] Re: Plugin Repository - Report New Bugs and Request New Features?
Excellent Karl, initiatives like this is what makes open source so much fun... -GTG On 8/26/07, Karl Swedberg [EMAIL PROTECTED] wrote: On Aug 26, 2007, at 2:55 AM, Stephan Beal wrote: On Aug 26, 5:23 am, Karl Swedberg [EMAIL PROTECTED] wrote: It's seems a shame not to use what looks like a nice tool. i agree 100%, and i think it would help if the plugin developers started directing people to the bug db. The bug db has a higher barrier to entry than the list does (one has to create an account on the web site), though, so that might keep some people away (most list- goers have a Google account already). Okay then. If anyone would like to report a bug or add a feature request for the clueTip plugin, you may do so here: http://jquery.com/plugins/node/add/project_issue/cluetip/bug or here: http://jquery.com/plugins/node/add/project_issue/cluetip/feature :-) As I've been working on the clueTip plugin, one of the hardest things for me has been to keep track of what people want out of it and what they're finding wrong with it. If memory serves me properly, most people report bugs to you via this list or your blog. yeah. multiple threads, multiple blog entries. and personal email. and IM. :-) Hard to keep track of. Just to be clear -- I'm not complaining, and I'm not suggesting that it's anyone's fault but my own. I'm just seeking guidance for managing this stuff and wondering if there was a flaw in the plugin repository's tools or if people weren't using them for some other reason. Sounds like you and Ganeshji think there's nothing inherently wrong with those tools, but other factors, such as force of habit, path of least resistance, etc. are the (de-)motivating factors. I really appreciate the input, Stephan. And Ganeshji. Okay, sorry, I'm rambling. i think you've brought a very useful topic to the surface. A summary of my stance is: it's a problem of education - the developers should get in the habit of teaching the users to file bug reports by simply requesting them to please file a bug report at http://...; That may be overkill for trivial reports which you know you can fix in a few minutes, but for bugs which won't/can't be fixed immediately, i feel it's a good solution. Excellent suggestion. I think I'll start doing that. Thanks again! --Karl
[jQuery] Re: Cycle Plugin
Mike I must have missed that the last time I check the cycle demo pages. It's PERFECT. I love the way it reads the ALT= text and then can output it to a div. The one thing I could not figure out is how do you get the very first image to show a title. When you run cycle it does not add the title until it displays the SECOND image. Any thoughts? Again massively excellent plugin Mike. Mitch -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mike Alsup Sent: Sunday, August 26, 2007 5:08 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: Cycle Plugin Mitch, You can use the before callback to do interesting things like that. In fact I do something very similar on the callbacks example: http://www.malsup.com/jquery/cycle/int2.html Mike On 8/26/07, Mitchell Waite [EMAIL PROTECTED] wrote: I'm using the cycle plug in and I was wondering if anyone knew a way to access the file name and display it with the image. If this can't be done I have worked myself into a nice hole J Thanks Mitch
[jQuery] Re: Cycle Plugin
Mitch, You'd have to do the first one by hand (for now). For example, if your slideshow div has an id of slideshow and your before handler is onBefore you could add this to you doc-ready block: onBefore.apply($('#slideshow img:first')[0]); Mike On 8/26/07, Mitchell Waite [EMAIL PROTECTED] wrote: Mike I must have missed that the last time I check the cycle demo pages. It's PERFECT. I love the way it reads the ALT= text and then can output it to a div. The one thing I could not figure out is how do you get the very first image to show a title. When you run cycle it does not add the title until it displays the SECOND image. Any thoughts? Again massively excellent plugin Mike. Mitch -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mike Alsup Sent: Sunday, August 26, 2007 5:08 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: Cycle Plugin Mitch, You can use the before callback to do interesting things like that. In fact I do something very similar on the callbacks example: http://www.malsup.com/jquery/cycle/int2.html Mike On 8/26/07, Mitchell Waite [EMAIL PROTECTED] wrote: I'm using the cycle plug in and I was wondering if anyone knew a way to access the file name and display it with the image. If this can't be done I have worked myself into a nice hole J Thanks Mitch
[jQuery] Re: Help Traversing
... var txt = $(this).parents('div:first').find('p').text(); ... or ... var txt = $(this).parents('div:first').children('p').text(); ... or ... var txt = $(this).parents('span:first').siblings('p').text(); ... or ... var txt = $(this).parent().parent().siblings('p').text(); ... etc etc Karl Swedberg-2 wrote: On Aug 25, 2007, at 1:10 AM, atomicnuke wrote: script type=text/javascript src=jquery-1.1.4.js/script script type=text/javascript $(document).ready(function(){ $(#comments span h5 a).click(function(){ var author = $(this).parent(span).next(p).text(); alert(author); }) }); /script /head body div id=comments div id=5h4Minion/h4h5( # Reply )/h5/ spanbr pBack to normal status/p /div /div I'm trying to figure out how to grab the text between the p tags when reply is clicked. I know I got the reply link targeted. I first just had an alert, but tried going further. At first I just had $ (this).next(p).text(); but thought maybe I needed to go to the parent, then move on, but it just shows a blank alert box. You could try something like this: $(document).ready(function() { $('h5 a').click(function() { var txt = $(this).parents('div:first').next().text(); alert(txt); return false; }); }); This goes up the DOM to the first div that is an ancestor of the clicked item, then goes to the next sibling and grabs its text. --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com -- View this message in context: http://www.nabble.com/Help-Traversing-tf4332092s15494.html#a12340253 Sent from the JQuery mailing list archive at Nabble.com.
[jQuery] Re: interface draggable and resizeable
In the onResize handler, check the left/top + width/height of the child el. If it exceeds the new size of the resizable, reposition it by the exceeding delta. - Richard On 8/26/07, marcin. [EMAIL PROTECTED] wrote: I'm sorry for moving this post up but I'm still looking for the answer. Anyone?
[jQuery] attr({'type':'hidden'}) in IE6
Getting an error when I tried to set a input attribute to hidden in v1.1.2, v.1.1.3.1 and v1.1.4. Using $ (#inputID).attr({'type':'hidden'}) and $ (#inputID).attr(type,hidden).
[jQuery] Re: attr({'type':'hidden'}) in IE6
Why would you need to do that? --Erik On 8/26/07, Minh [EMAIL PROTECTED] wrote: Getting an error when I tried to set a input attribute to hidden in v1.1.2, v.1.1.3.1 and v1.1.4. Using $ (#inputID).attr({'type':'hidden'}) and $ (#inputID).attr(type,hidden).
[jQuery] Re: attr({'type':'hidden'}) in IE6
On Aug 27, 5:49 am, Minh [EMAIL PROTECTED] wrote: Getting an error when I tried to set a input attribute to hidden in v1.1.2, v.1.1.3.1 and v1.1.4. Using $ (#inputID).attr({'type':'hidden'}) and $ (#inputID).attr(type,hidden). Input elements are special cases in that their 'type' setting completely changes how the are created and rendered. (In my opinion, the fact that type=xxx is used, instead of a separate TAG, is a design flaw in HTML.) Once an input element's type is set, it cannot feasibly be changed. Consider, for example, changing from type=submit to type=text. What should happen to: a) the onclick handler? b) the onfocus handler? c) should the value of the button now become the value of the text field? d) etc. etc. etc. Obviously, you do not want onclick on a type=text to submit your form. Similarly, changing the other onXXX events could produce weird/ undesired side effects when switching type= between arbitrary types.
[jQuery] Re: attr({'type':'hidden'}) in IE6
It's a quirk of IE, nothing to do with jQuery. It doesn't allow you to change the type of an input element once it's created. The best you could do would be to create a new hidden field and copy across the contents of the visible element. Then delete the visible element. Karl Rudd On 8/27/07, Minh [EMAIL PROTECTED] wrote: Getting an error when I tried to set a input attribute to hidden in v1.1.2, v.1.1.3.1 and v1.1.4. Using $ (#inputID).attr({'type':'hidden'}) and $ (#inputID).attr(type,hidden).
[jQuery] Re: attr({'type':'hidden'}) in IE6
Actually another is to just hide it using CSS: $(#inputID).hide(); Karl Rudd On 8/27/07, Karl Rudd [EMAIL PROTECTED] wrote: It's a quirk of IE, nothing to do with jQuery. It doesn't allow you to change the type of an input element once it's created. The best you could do would be to create a new hidden field and copy across the contents of the visible element. Then delete the visible element. Karl Rudd On 8/27/07, Minh [EMAIL PROTECTED] wrote: Getting an error when I tried to set a input attribute to hidden in v1.1.2, v.1.1.3.1 and v1.1.4. Using $ (#inputID).attr({'type':'hidden'}) and $ (#inputID).attr(type,hidden).
[jQuery] Re: attr({'type':'hidden'}) in IE6
Note that showing and hiding form fields (text fields, buttons, etc) should be done with .show() and .hide() (that is, by changing the display or visibility styles of the element), not by trying to change the type property. --Erik On 8/26/07, Erik Beeson [EMAIL PROTECTED] wrote: Why would you need to do that? --Erik On 8/26/07, Minh [EMAIL PROTECTED] wrote: Getting an error when I tried to set a input attribute to hidden in v1.1.2, v.1.1.3.1 and v1.1.4. Using $ (#inputID).attr({'type':'hidden'}) and $ (#inputID).attr(type,hidden).
[jQuery] Re: attr({'type':'hidden'}) in IE6
Stephan thanks for the explanations and Karl thanks for the alternative solution. Erik - I have a form and after the user enter a value then it goes through Ajax validation. If it's validated then I need to disabled or hide it so the user can't edit it. Problem with disabled is that when the form is submitted disabled field doesn't get submitted.
[jQuery] Re: attr({'type':'hidden'}) in IE6
On 8/26/07, Minh [EMAIL PROTECTED] wrote: If it's validated then I need to disabled or hide it so the user can't edit it. Try using the readonly attribute instead of disabling or hiding it, e.g. $(#inputID).attr(readOnly, true). But I have to ask: Why would you want to do this? -- Aaron Heimlich Web Developer [EMAIL PROTECTED] http://aheimlich.freepgs.com
[jQuery] Re: attr({'type':'hidden'}) in IE6
Ajax validation. If it's validated then I need to disabled or hide it so the user can't edit it. Problem with disabled is that when the form is submitted disabled field doesn't get submitted. You can make it read only, and maybe make the text gray so it's a little clearer that it can't be edited: $('#inputID').attr('readonly', 'readonly').css('color', '#999'); If you really want to convert it to hidden, just make a new hidden element and copy over the name and value properties. --Erik
[jQuery] Re: attr({'type':'hidden'}) in IE6
Erik- Nope I'm just looking for a way to stop the user from editing the field. Setting it to readonly is good and the css will be a nice visual cue. Thanks. On Aug 26, 11:19 pm, Erik Beeson [EMAIL PROTECTED] wrote: Ajax validation. If it's validated then I need to disabled or hide it so the user can't edit it. Problem with disabled is that when the form is submitted disabled field doesn't get submitted. You can make it read only, and maybe make the text gray so it's a little clearer that it can't be edited: $('#inputID').attr('readonly', 'readonly').css('color', '#999'); If you really want to convert it to hidden, just make a new hidden element and copy over the name and value properties. --Erik
[jQuery] Why is the + being turned into a space?
Hello, I'm having a weird issue with data being passed through $.ajax. If I submit my form through normal means I do not witness the unexpected behavior. Only when I submit the form through $.ajax does it happen. The problem is that I'm trying to submit an email address with a + sign in it. Firebug even says that I'm submitting [EMAIL PROTECTED] but PHP says that I've submitted email [EMAIL PROTECTED]. It would seem that this is PHP's fault since Firebug reports the correct data. But that's why this is so weird. When I take $.ajax out of the loop PHP says that I have submitted [EMAIL PROTECTED]. Here is the jQuery code I am working with: http://www.pastebin.ca/671971 Maybe it's really simple and I just don't see it? Thanks, Chris.
[jQuery] Re: Why is the + being turned into a space?
On Aug 27, 6:34 am, barophobia [EMAIL PROTECTED] wrote: It would seem that this is PHP's fault since Firebug reports the correct data. But that's why this is so weird. When I take $.ajax out of the loop PHP says that I have submitted [EMAIL PROTECTED]. Our of curiousity, does the $.ajax call still behave as desired if you change the 'POST' to 'GET'? i'm not well-versed in the subtleties of character translation via-a-vis POST and GET, but my gut tells me that the problem may be related to that. (??)
[jQuery] Re: Why is the + being turned into a space?
The reason + gets turned into a space is because your incoming data is being urldecoded (or unescaped) by PHP, and +, just like %20, gets turned into a space. The reason this is happening to you when you use ajax is because when you pass a String as the data parameter, it is assumed that it's already escaped. When you don't use ajax, the browser takes care of escaping the + for you (it is escaped as %2B). To fix your problem, you need to change line 9 and wrap this.value in encodeURIComponent(this.value). But more importantly, you really don't need to be generating the parameter string like this. You could just as easily generate a parameter object and let jQuery deal with it. Something like: var inputs = {}; $(':input', this).each(function () { inputs[this.name] = this.value; }); ... data: inputs, ... BUT, more importantly, I suggest you just use Mike's form plugin, found here: http://www.malsup.com/jquery/form/ Then you could replace the whole thing with: $('#lightning').ajaxForm({ type: 'POST', dataType: 'json', success: function(json) { // do whatever here. } }); Good luck with it. --Erik On 8/26/07, barophobia [EMAIL PROTECTED] wrote: Hello, I'm having a weird issue with data being passed through $.ajax. If I submit my form through normal means I do not witness the unexpected behavior. Only when I submit the form through $.ajax does it happen. The problem is that I'm trying to submit an email address with a + sign in it. Firebug even says that I'm submitting [EMAIL PROTECTED] but PHP says that I've submitted email [EMAIL PROTECTED]. It would seem that this is PHP's fault since Firebug reports the correct data. But that's why this is so weird. When I take $.ajax out of the loop PHP says that I have submitted [EMAIL PROTECTED]. Here is the jQuery code I am working with: http://www.pastebin.ca/671971 Maybe it's really simple and I just don't see it? Thanks, Chris.