RE: [jQuery] Autocomplete
Hi, Thanks. I still cannot pinpoint where I can handle the following problem, any guidance greatly appreciated. My data can have multiple words for one entry that must be separated by a comma. For example: array [ Item 1, Item 2, Item, value3... ]; When my clients type in the autocomplete field I need the comma to be ignored, so for example: If they type 'Item va' I need 'Item, value3' to be returned in the autocomplete prompt list. At the moment clients have to type 'Item, va' to see 'Item, value3' in the autocomplete prompt list. How can I handle this. Thanks again Andrew _ From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of waseem sabjee Sent: 02 January 2010 19:39 To: jquery-en@googlegroups.com Subject: Re: [jQuery] Autocomplete i would suggest you check out jQuery UI On Sat, Jan 2, 2010 at 9:35 PM, AndrewM amer...@amwebright.com wrote: Hi, I am new to jQuery and have 2 questions: I am using the bassistance.de jQuery plug-in. 1. For speed I have created my Array of data to be searched client side in a .js file as I have 25k + items. In Firefox and IE8 the auto prompt is very fast - however in for some clients it is not - for example some using IE7. How can I speed up the load process? 2. My data can have multiple words for one entry that must be separated by a comma. For example: array [ Item 1, Item 2, Item, value3... ]; When my clients type in the autocomplete field I need the comma to be ignored, so for example: If they type 'Item va' I need 'Item, value3' to be returned in the autocomplete prompt list. At the moment clients have to type 'Item, va' to see 'Item, value3' in the autocomplete prompt list. How can I handle this. Thanks for your help. Andrew
Re: [jQuery] Re: Animate or ToggleClass
Hi, yes that does seem like a script errors.I will get back to you later on. it's 10:27 AM here So i am still at work. On Sun, Jan 3, 2010 at 10:28 PM, John Sanabria busetolo...@gmail.comwrote: Waseem, again thank you for your help. Now, this is what I'm trying to do. (I'm adding a couple of screenshots for further detail) First image: As you can see, I have a unordered list with an id of filter that *filters* the items of the also unordered list with an id of portafolio. The filtering works by adding a class of current to the items that are visible (and match the category you're clicking, eg web, print, etc) and a hidden class (witha a display:none) to the ones that are hidden. The div with an class of portfolioclip is the container of the portfolio items and it initially displays ONLY the first three items, regardless if the number of items made visible by the filtering script is higher. The .portfolioclip has a height of 225px and overflow:hidden. So when one clicks in the plus button (#portfolio-morelink) I want the container's height to grow automatically to show all the visible items, as you can see in the next image. I've sort of accomplished this toggling the class of the container with jQuery to .portfoliofull (height:100%) and a 2000 ms duration so it slides smoothly when it grows. $s('.portfolioclip').toggleClass('portfoliofull', 2000); return false; }); The problem, as I stated in the first post, is that Internet Explorer doesn't pick the duration value and it expands/contracts the div very harshly, no smooth animation. I've read I can do this with toggling the initial height (232px) with the final height (auto) but I don't understand how to state the initial height is different than 0. So it goes from 232px to 0 which is not what I want. Also I tried with animating the height without the toggling and it works fine except it only works once cause since there is no toggling, the div doesn't return to its previous state. I hope I've explained myself. If not, please tell me what more info do you need and I will answer. Again, thank you very much. PD: The link, once more, is http://invitro.vegasoftweb.com/es/
Re: [jQuery] Autocomplete
loop through all the items in array and use item.replace(,,',) this should be ok now... -- http://ranacseruet.blogspot.com/
[jQuery] Drag and Drop and Swap
Hi, I have 3 divs on my page like so: div id=divA Panel A /div div id=divB Panel B /div div id=divC Panel C /div I want to allow the divs to dragged and swapped with each other. So if I drag divA over divB and release the mouse, they should swap places. Same thing, if I drag divC over divB then they should swap accordingly. Eventually I'd like to have a little transition/animation/effect when it happens but for now I'll settle for just the drag/drop How can I do this? Thanks, -West -- View this message in context: http://old.nabble.com/Drag-and-Drop-and-Swap-tp27010297s27240p27010297.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
RE: [jQuery] Autocomplete
Hi, Thanks for your reply. Can you please confirm that if I have a file called mydata.js that includes the following: var mydata = [ TownOne, County, Town Two, County, Town Three, County, TownFour, County, ]; that using item.replace(...) as suggested will for example ensure: 1. Town Two, County will be shown in the prompt list if the user types Town Two C or Town Two Co etc... OR TownFour, County will be shown in the prompt list if the user types TownFour C or TownFour Co etc... Sorry to ask this extra question it must be the New Year my brain is still in Christmas mode... Thanks again Andrew _ From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Md. Ali Ahsan Rana Sent: 04 January 2010 08:33 To: jquery-en@googlegroups.com Subject: Re: [jQuery] Autocomplete loop through all the items in array and use item.replace(,,',) this should be ok now... -- http://ranacseruet.blogspot.com/
Re: [jQuery] Autocomplete
i just tried with this cities = [TownOne, County, Town Two, County, Town Three, County, TownFour, County]; $(#suggest1).autocomplete(cities); its working correctly. The problem you said, event doesn't appear. So, can you explain what you r using and what is happening actually? Regards ranacseruet http://ranacseruet.blogspot.com
Re: [jQuery] Autocomplete
If you want to match ignoring the comma(may be this is what you want), then you have to pass some extra parameters and some more suggestion will show up besides the expected.. $(#suggest1).focus().autocomplete(cities, {multiple: true, multipleSeparator: , matchContains:true} ); -- http://ranacseruet.blogspot.com/
[jQuery] Re: $(form).serialize() does not include submit button data
Exactly. jQuery doesn't know which input type=submit was clicked by the time it gets around to the serialize method. jQuery knows all the form input types, but which submit button was clicked? Which input type image was clicked? It is because of lines 3296 and 3297 of the serialize function in jQuery. Here are the two source code lines and the complete methods are listed below for serialize() and serializeArray() (serializeArray is called by serialize): 3296 (this.checked || /select|textarea/i.test(this.nodeName) || 3297 /text|hidden|password|search/i.test(this.type)); serialize: function() { return jQuery.param(this.serializeArray()); }, serializeArray: function() { return this.map(function(){ return this.elements ? jQuery.makeArray(this.elements) : this; }) .filter(function(){ return this.name !this.disabled (this.checked || /select|textarea/i.test(this.nodeName) || /text|hidden|password|search/i.test(this.type)); }) .map(function(i, elem){ var val = jQuery(this).val(); return val == null ? null : jQuery.isArray(val) ? jQuery.map( val, function(val, i){ return {name: elem.name, value: val}; }) : {name: elem.name, value: val}; }).get(); } It's not checking for input type submit elements. However, you have it right in your click event handler, so use this little workaround: var post = $(this).attr(name) + = + $(this).val(); var data = $(this.form).serialize() + + post;
RE: [jQuery] Autocomplete
Thanks _ From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Md. Ali Ahsan Rana Sent: 04 January 2010 12:06 To: jquery-en@googlegroups.com Subject: Re: [jQuery] Autocomplete If you want to match ignoring the comma(may be this is what you want), then you have to pass some extra parameters and some more suggestion will show up besides the expected.. $(#suggest1).focus().autocomplete(cities, {multiple: true, multipleSeparator: , matchContains:true} ); -- http://ranacseruet.blogspot.com/
Re: [jQuery] Re: How to check whether an element is bound to an event or not?
In jQuery 1.3.x, .live() only works for a subset of event types. jQuery 1.4 extends support to all event types: Possible event values: click, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, keydown, keypress, keyup Currently not supported: blur, focus, mouseenter, mouseleave, change, submit http://docs.jquery.com/Events/live#typefn Kudos for rolling your own solution for 1.3.x with the onfocusin event. --Karl Karl Swedberg www.englishrules.com www.learningjquery.com On Jan 3, 2010, at 5:31 AM, Md. Ali Ahsan Rana wrote: I don't know about this much. But, just a while ago, i wa having problem binding focus event with live() method. Just solved it by the following code that i found somewhere on internet: (function(){ var special = jQuery.event.special, uid1 = 'D' + (+new Date()), uid2 = 'D' + (+new Date() + 1); jQuery.event.special.focus = { setup: function() { var _self = this, handler = function(e) { e = jQuery.event.fix(e); e.type = 'focus'; if (_self === document) { jQuery.event.handle.call(_self, e); } }; jQuery(this).data(uid1, handler); if (_self === document) { /* Must be live() */ if (_self.addEventListener) { _self.addEventListener('focus', handler, true); } else { _self.attachEvent('onfocusin', handler); } } else { return false; } }, teardown: function() { var handler = jQuery(this).data(uid1); if (this === document) { if (this.removeEventListener) { this.removeEventListener('focus', handler, true); } else { this.detachEvent('onfocusin', handler); } } } }; jQuery.event.special.blur = { setup: function() { var _self = this, handler = function(e) { e = jQuery.event.fix(e); e.type = 'blur'; if (_self === document) { jQuery.event.handle.call(_self, e); } }; jQuery(this).data(uid2, handler); if (_self === document) { /* Must be live() */ if (_self.addEventListener) { _self.addEventListener('blur', handler, true); } else { _self.attachEvent('onfocusout', handler); } } else { return false; } }, teardown: function() { var handler = jQuery(this).data(uid2); if (this === document) { if (this.removeEventListener) { this.removeEventListener('blur', handler, true); } else { this.detachEvent('onfocusout', handler); } } } }; })(); -- http://ranacseruet.blogspot.com/
Re: [jQuery] Re: simple jquery question
this solution could be simplified a bit: $('h3.example').each(function() { $('#deptFilter').append( 'option' + $(this).html() + '/option' ); }); --Karl Karl Swedberg www.englishrules.com www.learningjquery.com On Jan 3, 2010, at 6:53 AM, Paul Hutson wrote: This will do what you want, first I assigned the elements via a filter : elements = $('h3').filter('.example'); Then I scrolled around the items found and output them to a span for debugging. elements.each(function() { $('#Output').html($('#Output').html() + br + $(this).html()); }); Here's the entire test code : html head script type=text/javascript src=http://ajax.googleapis.com/ajax/ libs/jquery/1.3/jquery.min.js/script script type=text/javascript $(document).ready(function(){ elements = $('h3').filter('.example'); elements.each(function() { $('#Output').html($('#Output').html() + br + $(this).html ()); }); }); /script /head body h3 class=example LALALA /h3 h3 class=notexample NOT example :) /h3 h3 class=example Blub /h3 brbr span id=Output /span /body /html On Jan 2, 8:25 pm, jason jasona...@gmail.com wrote: Hey, was wondering if anyone could help me with a basic JQ question. Ok so I am trying to select each element that has a certain class on my page, and then use what is inside of the h3 class=example I am selecting to populate a drop down select box with the id of deptFilter. (with each result found inside of the H3, wrapped in option tags.) I am having trouble understanding how I actually store the variables found in each H3 with the class of example. Any help would be greatly appreciated.
Re: [jQuery] Re: Animate or ToggleClass
Hi, I can do your solution here no problem. I am still at work for now. will be done in about an hour then I can work on your small project :) tell me exactly what type of animation you want. slide fade...slide bounce...slide elastic etc. On Sun, Jan 3, 2010 at 10:28 PM, John Sanabria busetolo...@gmail.comwrote: Waseem, again thank you for your help. Now, this is what I'm trying to do. (I'm adding a couple of screenshots for further detail) First image: As you can see, I have a unordered list with an id of filter that *filters* the items of the also unordered list with an id of portafolio. The filtering works by adding a class of current to the items that are visible (and match the category you're clicking, eg web, print, etc) and a hidden class (witha a display:none) to the ones that are hidden. The div with an class of portfolioclip is the container of the portfolio items and it initially displays ONLY the first three items, regardless if the number of items made visible by the filtering script is higher. The .portfolioclip has a height of 225px and overflow:hidden. So when one clicks in the plus button (#portfolio-morelink) I want the container's height to grow automatically to show all the visible items, as you can see in the next image. I've sort of accomplished this toggling the class of the container with jQuery to .portfoliofull (height:100%) and a 2000 ms duration so it slides smoothly when it grows. $s('.portfolioclip').toggleClass('portfoliofull', 2000); return false; }); The problem, as I stated in the first post, is that Internet Explorer doesn't pick the duration value and it expands/contracts the div very harshly, no smooth animation. I've read I can do this with toggling the initial height (232px) with the final height (auto) but I don't understand how to state the initial height is different than 0. So it goes from 232px to 0 which is not what I want. Also I tried with animating the height without the toggling and it works fine except it only works once cause since there is no toggling, the div doesn't return to its previous state. I hope I've explained myself. If not, please tell me what more info do you need and I will answer. Again, thank you very much. PD: The link, once more, is http://invitro.vegasoftweb.com/es/
[jQuery] Re: How to check whether an element is bound to an event or not?
There is an DOM element, which is reloading(replaced by ajax response with same id/tag), then the event isn't no more bounded. I want it to be bounded all the time instead of all the overhead of binding/unbinding/looking-to-do-either, why not: a) just replace the contents of the DOM object b) wrap wherever you inject the ajax response with another uniquely identifiable DOM object and wire the event to that? then the binding is done once and it doesn't matter if the Ajax call is never made or is made 100 times, the event isn't going anywhere :-) On Jan 4, 8:19 am, Karl Swedberg k...@englishrules.com wrote: In jQuery 1.3.x, .live() only works for a subset of event types. jQuery 1.4 extends support to all event types: Possible event values: click, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, keydown, keypress, keyup Currently not supported: blur, focus, mouseenter, mouseleave, change, submit http://docs.jquery.com/Events/live#typefn Kudos for rolling your own solution for 1.3.x with the onfocusin event. --Karl Karl Swedbergwww.englishrules.comwww.learningjquery.com On Jan 3, 2010, at 5:31 AM, Md. Ali Ahsan Rana wrote: I don't know about this much. But, just a while ago, i wa having problem binding focus event with live() method. Just solved it by the following code that i found somewhere on internet: (function(){ var special = jQuery.event.special, uid1 = 'D' + (+new Date()), uid2 = 'D' + (+new Date() + 1); jQuery.event.special.focus = { setup: function() { var _self = this, handler = function(e) { e = jQuery.event.fix(e); e.type = 'focus'; if (_self === document) { jQuery.event.handle.call(_self, e); } }; jQuery(this).data(uid1, handler); if (_self === document) { /* Must be live() */ if (_self.addEventListener) { _self.addEventListener('focus', handler, true); } else { _self.attachEvent('onfocusin', handler); } } else { return false; } }, teardown: function() { var handler = jQuery(this).data(uid1); if (this === document) { if (this.removeEventListener) { this.removeEventListener('focus', handler, true); } else { this.detachEvent('onfocusin', handler); } } } }; jQuery.event.special.blur = { setup: function() { var _self = this, handler = function(e) { e = jQuery.event.fix(e); e.type = 'blur'; if (_self === document) { jQuery.event.handle.call(_self, e); } }; jQuery(this).data(uid2, handler); if (_self === document) { /* Must be live() */ if (_self.addEventListener) { _self.addEventListener('blur', handler, true); } else { _self.attachEvent('onfocusout', handler); } } else { return false; } }, teardown: function() { var handler = jQuery(this).data(uid2); if (this === document) { if (this.removeEventListener) { this.removeEventListener('blur', handler, true); } else { this.detachEvent('onfocusout', handler); } } } }; })(); -- http://ranacseruet.blogspot.com/
[jQuery] Automatic scrolling
I am using 3 radio buttons input type=radio id=oui class=btchoix name=choix value=oui / ... user clicks on radio button 1 called input#oui jQuery('input#oui').click(function(){ jQuery('div#reponse1').show('slow'); jQuery('div.postpop').show('slow'); jQuery('div#reponse2').hide('fast'); jQuery('div#reponse3').hide('fast'); }); This works perfectly well but as size of text on page changes quite a bit I need to send reader to either top of page automatically or better to a certain div How can I achieve this as simulating a click on a link doesn't work using locallScroll as I do for top of page or botton of page Thanks for help
[jQuery] Re: FireFox Pages flicker when jQuery reads a CSS attribute of a div
where's your demo? i've used the css() method on DIVs before and never noticed flickering...
[jQuery] Delaying Click Event
I've been searching high and low on Google over the last hour looking for this, but can't seem to find anything. Maybe I'm using the wrong search terms, but I'd think what I'm trying to accomplish is something that's been done before. What I'm looking to do is delay the action of a click for a set period of time. I have a list of links for download zip archives and when you click on one of those links, I use the BlockUI plugin to show an overlay with a message that tells the user their download will start momentarily. The reason this is done is so that I can fire off an AJAX event that inserts a record into a database for download tracking. Ideally what I'd like to do is fire the AJAX event (which should only take about .2 seconds to run) and then wait for 2 or 3 seconds before unblocking the UI and *then* letting the default action of the click (offering up the zip archive) fire. Any ideas how I might accomplish something like this?
[jQuery] How to define/access public functions for a plugin?
Hi, I've just developed a plugin that mimics the combo box control, albeit it's a special one. That's being defined as follows: (function($) { $.fn.extend({ smartList: function(settings) { //prepare settings, blah blah blah... return this.each(function() { //whatever code goes here... }); } }); })(jQuery); You know, to use this plugin, I could easily write the following JavaScript code: var $myList = $('myElement').smartList(); No problem so far. Now, I need to define and access some functions that's specific to the smartList. say, e.g., getSelectedValue, insertItem, and the like. The problem is that I've got no idea how to address such a thing in JavaScript. i.e., I need to write things like: $myList.getSelectedValue(); $myList.insetItem('foo', 'bar'); But this isn't possible, since the $myList variable is a jQuery object. So I just defined some functions, say, $.smartList.getSelectedValue and the like... but in this approach, I've to pass the jQuery object to this functions as a mandatory parameter and this really sucks. i.e., I need to get the selected value of $myList this way: var value = $.smartList.getSelectedValue($myList); Is there any better approach to address such a thing? Any help would be highly appreciated, TIA, Mehdi
[jQuery] preventing other events from firing in validate plugin (validate)
I need to block other events from firing on a form submission from within the validate plugin's invalidHandler function. I'd like to call stopImmediatePropagation on the current event, but I don't know how to access that event. Here is a sample of the code I have: $(document).ready(function() { }
[jQuery] preventing other events from firing in validate plugin (validate)
I need to block other events from firing on a form submission from within the validate plugin's invalidHandler function. I'd like to call stopImmediatePropagation on the current event, but I don't know how to access that event. Here is a sample of the code I have: $(document).ready(function() { $(#myform).validate{ invalidHandler: function(form, validator) { // get current event and prevent it from propagating event.stopImmediatePropagation(); } } } Accidentally submitted this before I finished adding the code snippet. Sorry for the double submission.
[jQuery] Jquery cluetip plugin behavior
Hello, The jquery plugin for cluetip (http://plugins.learningjquery.com/ cluetip/) currently defaults to showing a cluetip on left. I want to modify the behavior to show X pxl from the right of the element (table row).Is there a known work around for this? I digged in to the options for cluetip and found only leftOffset available.
[jQuery] vertical coverflow
Hi , I would like to create vertical coverflow using jquery like this link http://dougmccune.com/blog/2007/11/19/flex-coverflow-performance-improvement-flex-carousel-component-and-vertical-coverflow/ Please help me as soon as possible. Regards, John
[jQuery] Help needed to find image dimensions
I'm using Preview.js to create image previews on hover. The script as it is now displays the full size image on hover, but that is often too big. I have been able to reduce the preview size by defining width='200px' which works fine in many cases, but when the image is tall and narrow a 200px wide image my be 700px tall. So what I'm trying to do is determine the image dimensions and if the width is greater than the height, set width='200px', otherwise set height='200px'. I haven't been able to figure out how to get the image dimensions from the wrapped set. Here is an excerpt of my markup: a href=?php echo $mainImgDir . $mainImg; ? class=preview title=?php echo $mainImg; ?img src=?php echo $thumbsDir . $image; ? alt=?php echo $image; ? class=center //a Here is an excerpt of my js code: $(a.preview).hover(function(e){ this.t = this.title; this.title = ; var orientation = ((this.img[src]).width() (this.img[src]).height()) ? ' alt='Image preview' width ='200px' / : ' alt='Image preview' height='200px' /); var c = (this.t != ) ? br/ + this.t : ; $(body).append(p id='preview'img src='+ this.href + orientation + c +/p); Can anyone see what I'm doing wrong? TIA
[jQuery] Tooltip Plugin - Font issue in IE7
Hi all, I've noticed an issue with the font rendering on IE7 on Vista and Win 7 when using the Tooltip plugin from http://bassistance.de When the page first renders and you a mouse-over tooltip for the first time, the font renders smoothly and nicely anti-aliased, however when you mouse-out and then mouse-over the same or a different tooltip, the font isn't rendered properly and you see jagged edges on the text. This is visible on the demo page for the tooltip - http://jquery.bassistance.de/tooltip/demo/ - Look at the second tooltip demo, specifically the 'footnote' link. Its hard to see cause the font is small but when you look at that tooltip the first time after a page render it is fine, then subsequent displays of the tooltip show the font as non-anti-aliased. Has anyone else seen this issue and does anyone know of a work-around? Thanks, Paul
[jQuery] slideDown trouble in Safari/Chrome
Hi! I'm having problem with a relatively simple effect in Safari (version 4) and Google Chrome/Win. See this web page: http://mansbjorkman.net/ I have created a div, windowContent, inside another div, windowFrame. When the heading is clicked, windowContent is supposed to slideDown while also expanding to the width specified by the css. The outer div, windowFrame, is supposed to automatically resize to make room for windowContent. This works great in almost all browsers. But in Safari and Google Chrome, the width of windowFrame is not adjusted, so the text in windowContent spills out over the background. I have tried various solutions, including changing the overflow css property of windowFrame, and forcibly changing the width of windowContent with javascript after slideDown. Neither solution has worked very well. Any ideas? Many thanks in advance. Yours, Måns
Re: [jQuery] Delaying Click Event
The simplest way to do this is to use the setTimeout method (straight JS) and give it an anonymous function as callback to trigger after given period. Something like this should do the trick : $('a.delayed').click(function() { // assuming these links all share the delayed class var clicked = $(this); // when setTimeout calls your anonymous function, this will point to something else entirely setTimeout(function () { window.location.href = clicked.attr('href'); // assuming you want to go wherever the link points to }, 1000); return false; // to prevent default action to be immediately triggered }); Hope it helps. Michel Belleville 2010/1/4 david.vansc...@gmail.com david.vansc...@gmail.com: I've been searching high and low on Google over the last hour looking for this, but can't seem to find anything. Maybe I'm using the wrong search terms, but I'd think what I'm trying to accomplish is something that's been done before. What I'm looking to do is delay the action of a click for a set period of time. I have a list of links for download zip archives and when you click on one of those links, I use the BlockUI plugin to show an overlay with a message that tells the user their download will start momentarily. The reason this is done is so that I can fire off an AJAX event that inserts a record into a database for download tracking. Ideally what I'd like to do is fire the AJAX event (which should only take about .2 seconds to run) and then wait for 2 or 3 seconds before unblocking the UI and *then* letting the default action of the click (offering up the zip archive) fire. Any ideas how I might accomplish something like this?
[jQuery] Need jQuery expert to slightly modify plugin
I'm using the newest version of jQuery(http://www.jquery.com) and the jCarousel Lite plugin (http://www.gmarwaha.com/jquery/jcarousellite/). It is a content slider that rotates content slides. It is setup to auto rotate on a set time, and you can also hit the previous/next buttons to move through the slides. This has been working great. Now I have the need for a pause button that will stop the auto rotate. I think this should be fairly easy for someone familiar with javascript and jQuery. Please email me at mike (at) moxiedisplays (dot) com. This is a paid job if we can find someone to do it correctly and in a timely manner. Thanks!
Re: [jQuery] Need jQuery expert to slightly modify plugin
http://groups.google.com/group/jquery-en/browse_thread/thread/f550b94914d10065 On 04/01/2010 15:12, MikeTheVike wrote: I'm using the newest version of jQuery(http://www.jquery.com) and the jCarousel Lite plugin (http://www.gmarwaha.com/jquery/jcarousellite/). It is a content slider that rotates content slides. It is setup to auto rotate on a set time, and you can also hit the previous/next buttons to move through the slides. This has been working great. Now I have the need for a pause button that will stop the auto rotate. I think this should be fairly easy for someone familiar with javascript and jQuery. Please email me at mike (at) moxiedisplays (dot) com. This is a paid job if we can find someone to do it correctly and in a timely manner. Thanks!
[jQuery] Re: Delaying Click Event
That worked like a charm! I didn't realize I could pass an anonymous function to setTimeout like that. Thanks for the quick reply! David On Jan 4, 10:01 am, Michel Belleville michel.bellevi...@gmail.com wrote: The simplest way to do this is to use the setTimeout method (straight JS) and give it an anonymous function as callback to trigger after given period. Something like this should do the trick : $('a.delayed').click(function() { // assuming these links all share the delayed class var clicked = $(this); // when setTimeout calls your anonymous function, this will point to something else entirely setTimeout(function () { window.location.href = clicked.attr('href'); // assuming you want to go wherever the link points to }, 1000); return false; // to prevent default action to be immediately triggered }); Hope it helps. Michel Belleville 2010/1/4 david.vansc...@gmail.com david.vansc...@gmail.com: I've been searching high and low on Google over the last hour looking for this, but can't seem to find anything. Maybe I'm using the wrong search terms, but I'd think what I'm trying to accomplish is something that's been done before. What I'm looking to do is delay the action of a click for a set period of time. I have a list of links for download zip archives and when you click on one of those links, I use the BlockUI plugin to show an overlay with a message that tells the user their download will start momentarily. The reason this is done is so that I can fire off an AJAX event that inserts a record into a database for download tracking. Ideally what I'd like to do is fire the AJAX event (which should only take about .2 seconds to run) and then wait for 2 or 3 seconds before unblocking the UI and *then* letting the default action of the click (offering up the zip archive) fire. Any ideas how I might accomplish something like this?
[jQuery] Re: slideDown trouble in Safari/Chrome
Any ideas? Many thanks in advance. Without looking into it too much I can't see the cause of the problem... ... however, site design wise, would it not be better to have the buttons expand an area on the page to show the information? You could have the divs all created prior to the page loading (much like you do now [as a side note here, hiding the divs in the definition would be a good idea as when it loads up slowly it shows them before hiding them]) then just using the $(#divid).show(slow); when clicking on them (and hiding the currently open one). I know that isn't exactly the answer you were looking for - but it should help out. For reference, you can change CSS type properties directly with a call like this : document.getElementById(NAMEOFDIV).style.width = 10; I can't remember how to do it in a more jquery like way at the moment. HTHs, Paul Hutson
Re: [jQuery] Re: slideDown trouble in Safari/Chrome
On 04/01/2010 15:35, Paul Hutson wrote: Any ideas? Many thanks in advance. Without looking into it too much I can't see the cause of the problem... ... however, site design wise, would it not be better to have the buttons expand an area on the page to show the information? You could have the divs all created prior to the page loading (much like you do now [as a side note here, hiding the divs in the definition would be a good idea as when it loads up slowly it shows them before hiding them]) then just using the $(#divid).show(slow); when clicking on them (and hiding the currently open one). I know that isn't exactly the answer you were looking for - but it should help out. For reference, you can change CSS type properties directly with a call like this : document.getElementById(NAMEOFDIV).style.width = 10; I can't remember how to do it in a more jquery like way at the moment. HTHs, Paul Hutson that would be $(#NAMEOFDIV).width('10');
Re: [jQuery] Sentence Case?
You could try something like this: function sentenceCase(str) { // callback function for regex replace var replacer = function(match, endmark, cap) { if (endmark) { return endmark + cap.toUpperCase(); } else { return match.toUpperCase(); } }; return str .replace(/^[a-z]/, replacer) .replace(/([.!?]\s+)([a-z])/g, replacer); } // convert to sentence case on keyup in text inputs. $('input:text').keyup(function() { this.value = sentenceCase(this.value); }); --Karl Karl Swedberg www.englishrules.com www.learningjquery.com On Jan 3, 2010, at 11:35 PM, dmikester1 wrote: I can't find any jQuery plugin or even code that will do Sentence Case in a input field onkeyup. Does anyone know how I can do this? Thanks Mike
[jQuery] Re: Automatic scrolling
Thanks for help This should do what you want (well, it's an example, but I'm sure you can pull out the bits you need) : http://www.position-relative.net/creation/anchor/ It'll smooth scroll to the right location for you... :) (we've also used it on the help for Outer Empires, here... http://gameview.outer-empires.com/Info/Newbie.asp) HTHs, Paul Hutson
[jQuery] Re: No ajax response from Firefox?
For the purposes of testing, I have been calling this PHP script: ? echo response; ? Instead of the echo response; try creating a span with the id response. i.e. span id=responseWrite to here/span
[jQuery] Re: jquery.js and jquery-1.2.6.pack.js conflict
how can i get the full version of files? http://code.google.com/apis/ajaxlibs/documentation/index.html#jquery
[jQuery] Re: $(form).serialize() does not include submit button data
Makes sense, that's also a simple workaround. Thanks. -- Milan
Re: [jQuery] Re: Animate or ToggleClass
heres our HTML CSS we have 9 divs. the first three are shown and other 6 are hidden. style type=text/css * { margin:0; padding:0; } . block { float:left; width:32%; // 3 blocks per row. less 1% for IE height:200px; // height is good to have...but required for IE border:1px solid #000; // thin black border } .end { clear:left; // clear float height:0; // no weird space } . expand { width:100%; text-align:left; } /style div class=container div class=rowwrap div class=block Block Content Here /div div class=block Block Content Here /div div class=block Block Content Here /div br class=end / /div div class=expand a href=# class=expander+/a /div div class=rowwrap div class=block Block Content Here /div div class=block Block Content Here /div div class=block Block Content Here /div br class=end / /div div class=rowwrap div class=block Block Content Here /div div class=block Block Content Here /div div class=block Block Content Here /div br class=end / /div /div heres our script script type=text/javascript var $w = jQuery.noConflict(); // prevent any possible conflicts $w(function() { var obj = $w(. container); // obj reference point var rows = $w(. rowwrap, obj); // row reference point rows.slideUp(0); rows.eq(0).slideDown(0); var expander = $(.expander, obj); var switcher = 0; expander.click(function(e) { e.preventDefault(); if(switcher == 0) { rows.eq(1).slideDown(500); rows.eq(2).slideDown(500); expander.text(-); switcher = 1; } else if(switcher == 1) { rows.eq(1).slideUp(500); rows.eq(2).slideUp(500); expander.text(+); switcher = 0; } }); }); /script On Sun, Jan 3, 2010 at 10:28 PM, John Sanabria busetolo...@gmail.comwrote: Waseem, again thank you for your help. Now, this is what I'm trying to do. (I'm adding a couple of screenshots for further detail) First image: As you can see, I have a unordered list with an id of filter that *filters* the items of the also unordered list with an id of portafolio. The filtering works by adding a class of current to the items that are visible (and match the category you're clicking, eg web, print, etc) and a hidden class (witha a display:none) to the ones that are hidden. The div with an class of portfolioclip is the container of the portfolio items and it initially displays ONLY the first three items, regardless if the number of items made visible by the filtering script is higher. The .portfolioclip has a height of 225px and overflow:hidden. So when one clicks in the plus button (#portfolio-morelink) I want the container's height to grow automatically to show all the visible items, as you can see in the next image. I've sort of accomplished this toggling the class of the container with jQuery to .portfoliofull (height:100%) and a 2000 ms duration so it slides smoothly when it grows. $s('.portfolioclip').toggleClass('portfoliofull', 2000); return false; }); The problem, as I stated in the first post, is that Internet Explorer doesn't pick the duration value and it expands/contracts the div very harshly, no smooth animation. I've read I can do this with toggling the initial height (232px) with the final height (auto) but I don't understand how to state the initial height is different than 0. So it goes from 232px to 0 which is not what I want. Also I tried with animating the height without the toggling and it works fine except it only works once cause since there is no toggling, the div doesn't return to its previous state. I hope I've explained myself. If not, please tell me what more info do you need and I will answer. Again, thank you very much. PD: The link, once more, is http://invitro.vegasoftweb.com/es/
[jQuery] Re: Animate or ToggleClass
Hi Waseem. Thanks for your help. A slidedown transition would work just fine! On 4 ene, 09:07, waseem sabjee waseemsab...@gmail.com wrote: Hi, I can do your solution here no problem. I am still at work for now. will be done in about an hour then I can work on your small project :) tell me exactly what type of animation you want. slide fade...slide bounce...slide elastic etc. On Sun, Jan 3, 2010 at 10:28 PM, John Sanabria busetolo...@gmail.comwrote: Waseem, again thank you for your help. Now, this is what I'm trying to do. (I'm adding a couple of screenshots for further detail) First image: As you can see, I have a unordered list with an id of filter that *filters* the items of the also unordered list with an id of portafolio. The filtering works by adding a class of current to the items that are visible (and match the category you're clicking, eg web, print, etc) and a hidden class (witha a display:none) to the ones that are hidden. The div with an class of portfolioclip is the container of the portfolio items and it initially displays ONLY the first three items, regardless if the number of items made visible by the filtering script is higher. The .portfolioclip has a height of 225px and overflow:hidden. So when one clicks in the plus button (#portfolio-morelink) I want the container's height to grow automatically to show all the visible items, as you can see in the next image. I've sort of accomplished this toggling the class of the container with jQuery to .portfoliofull (height:100%) and a 2000 ms duration so it slides smoothly when it grows. $s('.portfolioclip').toggleClass('portfoliofull', 2000); return false; }); The problem, as I stated in the first post, is that Internet Explorer doesn't pick the duration value and it expands/contracts the div very harshly, no smooth animation. I've read I can do this with toggling the initial height (232px) with the final height (auto) but I don't understand how to state the initial height is different than 0. So it goes from 232px to 0 which is not what I want. Also I tried with animating the height without the toggling and it works fine except it only works once cause since there is no toggling, the div doesn't return to its previous state. I hope I've explained myself. If not, please tell me what more info do you need and I will answer. Again, thank you very much. PD: The link, once more, ishttp://invitro.vegasoftweb.com/es/
[jQuery] Firefox not respecting cache:false
Hello: This is in the nature of an FYI with a sort of fix. I make an ajax request with cache:false, but Firefox returns the cached page. (I know that's what's happening because if I disable caching with the web developer extension I get the expected data.) I've fixed it by putting a metatag in the page requesting no-cache, which FF respects. But maybe the jquery mechanism for requesting no cache is broken? Patrick
Re: [jQuery] Tooltip Plugin - Font issue in IE7
You need to explicitly remove the style after the image has faded in : document.getElementById(whatever).style.filter=; L Paul wrote: Hi all, I've noticed an issue with the font rendering on IE7 on Vista and Win 7 when using the Tooltip plugin from http://bassistance.de When the page first renders and you a mouse-over tooltip for the first time, the font renders smoothly and nicely anti-aliased, however when you mouse-out and then mouse-over the same or a different tooltip, the font isn't rendered properly and you see jagged edges on the text. This is visible on the demo page for the tooltip - http://jquery.bassistance.de/tooltip/demo/ - Look at the second tooltip demo, specifically the 'footnote' link. Its hard to see cause the font is small but when you look at that tooltip the first time after a page render it is fine, then subsequent displays of the tooltip show the font as non-anti-aliased. Has anyone else seen this issue and does anyone know of a work-around? Thanks, Paul No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.431 / Virus Database: 270.14.124/2599 - Release Date: 01/04/10 08:24:00
[jQuery] IE6 Not 'showing' issue
I can't link a direct link (the whole keeping a project under wraps thing) but heres the code: JS: $('.accordion .btn_more2').click(function(){ if($(this).text() == 'More'){ $(this).siblings('.content').show('fast'); $(this).text('Hide'); $(this).addClass('hide'); $(this).siblings('.btn_icon').attr('name','close'); }else{ $(this).siblings('.content').hide('fast'); $(this).text('More'); $(this).removeClass('hide'); $(this).siblings('.btn_icon').attr('name','open'); } return false; }); HTML: li # pDAM -aecenas ut turpis. In vitae erat ac orci dignissim eleifend. some more text/p # More div class=content pmroe text Cras dictum. Maecenas ut turpis. In vitae erat ac orci dignissim eleifendbr /more filler text/p /div /li CSS #benefits_bottom_a ul li { border-bottom:1px solid #D6DBDE; border-top:medium none; margin-bottom:3px; position:relative; } #benefits_bottom_a .content ul li { border-bottom:medium none; margin:-10px 0 0; overflow:hidden; padding:5px 0 0 34px; position:relative; width:200px; } #benefits_bottom_a .content ul.accordion li { width:585px; } This is already in another accordion, so its an accordion inside an accordion. It works fine in all main browsers except IE6. What happens is when I click it the .content div becomes visible, but it doesn't expand to the full size. I can see the text inside the div visible but it cuts off at midway in the first sentence. I'll see if I can post a link, but due to the project, i'm not sure I can do it :( Thanks for any and all help, Justin *Attahed is an image of what it looks like along with it 'expanded' http://old.nabble.com/file/p27016864/ie6issue.jpg ie6issue.jpg -- View this message in context: http://old.nabble.com/IE6-Not-%27showing%27-issue-tp27016864s27240p27016864.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] jQuery Cycle Plugin width problems
The Goal I want to cycle through list items in an unordered list. I want the list items to take up the full width of the browser, even when the browser is resized. The Problem Once the first slide transition takes place and the browser is resized smaller horizontal scroll bars are introduced. Then when the browser is resized larger than the original size, the list item width is only as wide as it was when the page was first loaded. The Assumption The cycle plugin needs to calculate the width of the item it is transitioning and then sets it to that width. The Question Is it possible to keep all widths as percentages maintaining the fluid width of the list item? The HTML ul class=slideshow li class=lah3Label Applicators/h3/li li class=pah3Print and Apply/h3/li li class=tth3Table-Top Printers/h3/li li class=hsh3High Speed/h3/li li class=csh3Custom Systems/h3/li /ul div class=ssnavwrap ul id=ssnav li class=laa href=#LA/a/li li class=paa href=#PA/a/li li class=tta href=#TT/a/li li class=hsa href=#HS/a/li li class=csa href=#CS/a/li /ul /div The CSS .slideshow { margin: 43px 0 0; height: 340px; } .slideshow li { height: 340px; width: 100%; overflow: hidden; } The Javascript $(document).ready(function() { $('.slideshow').cycle({ fx: 'fade', height: 'auto', width: 'auto', fit: 0, containerResize: 0, speed: 1400, timeout: 6000, pager: '#ssnav', manualTrump: false, pagerAnchorBuilder: function(idx, slide) { return '#ssnav li:eq(' + idx + ') a'; } }); $('#ssnav li a').click(function() { $('.slideshow').cycle('pause'); }); }); The Attempts I've tried things like overflow: hidden in the CSS. I've tried options in Cycle like width, fit, contatinerResize. Thanks for any help on this.
[jQuery] Callback in $.getJSON is called but variable assignment doesn't persist.
Hi, on the following code: $.getJSON(http://www.tametick.com/test2/json/settings.json,function (data) { this.Settings = data; alert(data); alert(this.Settings); }); which can be found on http://www.tametick.com/test2 (line 63 in http://www.tametick.com/test2/js/cardinal-quest.js), I am getting the alerts correctly (returning the object read from the file) but after the function ends this.Settings revurts back to null and I get the error: Error: Settings is undefined Source File: http://www.tametick.com/test2/js/cardinal-quest.js Line: 70 Any idea what is going wrong? Thanks, Ido.
[jQuery] Pagination + DOMWindow = FAIL
I'm trying to use the pagination plugin with DOMWindow, but they're not playing well together. I think it's probably just my lack of knowledge with jQuery, so I thought I post for help. The DOMWindow stops working after I use any of the pagination links. If I use DOMWindow as soon as the page loads, it's fine. script type=text/javascript src=http://ajax.googleapis.com/ajax/ libs/jquery/1.3.2/jquery.min.js/script script type=text/javascript src=js/jquery.pagination.js/script script type=text/javascript src=js/jquery.DOMWindow.js/script script type=text/javascript //![CDATA[ function pageselectCallback(page_index, jq){ var new_content = $('#pages div.page:eq('+page_index+')').clone(); $('#pages_container').empty().append(new_content); return false; } function initPagination() { var num_entries = $('#pages div.page').length; // Create pagination element $(#pagination).pagination(num_entries, { num_edge_entries: 2, num_display_entries: 8, callback: pageselectCallback, items_per_page:1 }); } $(document).ready(function(){ initPagination(); $('.fixedAjaxDOMWindow').openDOMWindow({ borderColor:'#999', borderSize:'2', overlay:1, overlayColor:'#000', overlayOpacity:'60', height:360, width:549, eventType:'click', loader:1, loaderImagePath:'images/ajax-loader.gif', loaderHeight:16, loaderWidth:17, windowSource:'ajax', windowHTTPType:'get' }); }); //]] /script div id=pagination class=pagination/div div id=pages_container/div div id=pages style=display:none; div class=page div class=thumb a href=detail.php?id=1 class=fixedAjaxDOMWindowimg src=1.jpg //a p1/p /div /div div class=page div class=thumb a href=detail.php?id=2 class=fixedAjaxDOMWindowimg src=2.jpg //a p2/p /div /div div class=page div class=thumb a href=detail.php?id=3 class=fixedAjaxDOMWindowimg src=3.jpg //a p3/p /div /div /div
RE: [jQuery] Callback in $.getJSON is called but variable assignment doesn't persist.
Probably an async issue - any code after the $.getJSON call (but not in the callback) will get executed before the async call returns. Any code that is dependent on this.Settings being set with the returned data must be within the callback function. Also this is probably not what you are expecting it to be. Do an alert or console.log with this in your callback function to make sure it's what you're expecting. -- Josh -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Ido Yehieli Sent: Monday, January 04, 2010 9:55 AM To: jQuery (English) Subject: [jQuery] Callback in $.getJSON is called but variable assignment doesn't persist. Hi, on the following code: $.getJSON(http://www.tametick.com/test2/json/settings.json,function (data) { this.Settings = data; alert(data); alert(this.Settings); }); which can be found on http://www.tametick.com/test2 (line 63 in http://www.tametick.com/test2/js/cardinal-quest.js), I am getting the alerts correctly (returning the object read from the file) but after the function ends this.Settings revurts back to null and I get the error: Error: Settings is undefined Source File: http://www.tametick.com/test2/js/cardinal-quest.js Line: 70 Any idea what is going wrong? Thanks, Ido.
[jQuery] Re: Sumbit multiple checkboxes via ajax to php script using jQuery
So would you recommend doing something like data = $('input:checkbox[name=ckdOrd[]]:checked').serialize() ...in the ajax? On Nov 25 2009, 12:41 am, Bryan Garaventa goo...@gutterstar.net wrote: I'd recommend serializing the array into a string, then reverse the serialization on the server side using PHP. This way, you can pass the array string within a url. Hope this helps, Bryan Garaventa - Original Message - From: Bonji benho...@googlemail.com To: jQuery (English) jquery-en@googlegroups.com Sent: Tuesday, November 24, 2009 2:52 PM Subject: [jQuery] Sumbit multiple checkboxes via ajax to php script using jQuery Hi, I am working on improvements for a web app. It currently submits checkboxes to a php script for processing by simply submitting the form naturally. However i require this action using a ajax post to save bandwidth etc. and im struggling to work out how to do this. Im familiar with normal ajax posts using jquery but here i need to post an array. Simplified a little this is what i have. input type=checkbox name=ckdOrd[] value=1 id=order_1 / input type=checkbox name=ckdOrd[] value=2 id=order_2 / input type=checkbox name=ckdOrd[] value=3 id=order_3 / input type=checkbox name=ckdOrd[] value=4 id=order_4 / It used to build an array ckdOrd[] and post to a php script with a loop for processing. It needs to post the order numbers as an array for processing. Is there a way to simply create the same post using ajax jQuery? I would prefer this as that would mean i dont have to make major changes to the php script. the php simply does something like this //get posted array $ckdOrd=$_REQUEST['ckdOrd']; foreach($ckdOrd as $key = $ord_no){ //update mysql here } I have seen other posts but they all seem to be cluttered and unhelpful. Is it correct to avoid the name attribute and simple find each checked checkbox using jquery? or am i going down the wrong path.
[jQuery] jQuery/Ajax client storage
I apologize if this is already answered somewhere, as I could not find it... If the client is constantly calling ajax objects and those objects are bringing with them additional jQuery scripts, how does jQuery handle the removal and handling of objects that go away, because they are replace by a new object with a new script. Does one have to use a destroy/unbind to prevent memory/storage from growing? For example: 1) Client page loads 2) Page loads an edit (ObjA edit) via ajax, and the object is loaded with it's own set of validation and jquery functions. 3) ObjA edit is completed, so a new edit is loaded for ObjB (an entirely different object, not just a new instance of ObjA). Before load the div storing the edit is cleared. The newly loaded edit (ObjB edit) has it's own unique logic and validation. Will jQuery still contain the bound events and created functions for ObjA, eventhough the div was cleared? Thanks! Patrick
[jQuery] Another Why doesn't this work in IE
$(#TOAppr).live(click, function(){ $.post(webapps/hr/admin/actions/act_adminHR_handler.cfm, { desc: $(this).attr('desc'), pk: $(this).attr('pk') }); $(#content-box).load(webapps/hr/admin/display/dsp_timeOffApprove.cfm?dept =+dept+ap=1); return false; }); This is the typical click the link, database stuff happens in the background, and the page is re-rendered with new data. You wind up with a table that rows are removed from when a link is clicked. This works fine in Firefox, but no re-rendering in IE, the database calls happen,, but nothing is sent back to the browser. Any suggestions -- Scott Stewart IT Consultant/ColdFusion Developer 4405 Oakshyre Way Raleigh, NC 27616 (919) 874-6229
[jQuery] How should I structure this?
Hello Lets say we have a database where things are going to be added at random times, over the whole day. I want a AJAX script to load new items every 5s (its a local database so no problem with spamming it) and for each of these items I have to do a AJAX request to get some more data... From the back-end I will get something like: unique ID time number name text How do I detect which items I already have added to my site? Because If I just get the latest one, there is a chance I miss something, so its safest if the back-end returns the latest 5 items, or? Any example code how to use the unique ID to validate that I got every row I wanted? Am I thinking completely wrong? I have access to the back-end also so I can change what I want.. Help needed! Thanks ;)
[jQuery] Superfish showing problems in IE7
Hello there, I am using Superfish for some Joomla websites. I face problems on the following sites an hope that you can help me out with it: http://stophersentumoren.woosh.nl: 1. When hovering on a list item that has children, the item appears to become smaller (the chaniging background color moves to left a little bit and does not cotain teh full arrow-image that should be in it). 2. The menu gives problems showing the left column of the website (the header-text disappears as well as the text of the first news item) http://www.atosrtv.nl 1. The child-items are being overrun by their neighbouring parents 2. The menu-items ahow underneath teh main content div I really hope that you can help me out with this... Regards, Frank The Netherlands
[jQuery] Paging Ability with numbering and Text with jQuery Cycle Plugin
I have set up a test page at http://capnhud.host22.com/examples/sample_cycle.html but was wondering what would I need to change in order for the paging to resemble this a href=http://www.dickssportinggoods.com/home/ index.jsppage/a
[jQuery] ajaxfileupload and additional data
Hello all, I'm running this plug in http://www.phpletter.com/Our-Projects/AjaxFileUpload/ and I need to send along additional post data can anyone help ? here is my current code [code] var obj = {}; obj.id = id; obj.func = file_uploaded; obj.type = file; obj.pdata ={} if (loc == bigart) { obj.pdata.random='bigart'; obj.pdata.func='upload_bigart'; } else { obj.pdata.random=random; obj.pdata.func='upload_image'; } $.ajaxFileUpload({ url:prefix, secureuri: false, fileElementId: 'fileToUpload' + obj.id, data: obj.pdata, dataType: 'json', error: function(data) { if (data.status == 302) { top.location.href = data.getResponseHeader ('Location'); } else { display_messages({ messages: { error: invalid json response please try again file error: + data.error } }); } }, success: function(data) { display_messages(data.messages); if (data.messages data.messages.error !== undefined) { $(#form + argObject.id).remove(); add_form_field(); } else { obj.func(data, obj.id); } } }); [/code] thanks Mean Mike
Re: [jQuery] Another Why doesn't this work in IE
Is it okay if the load happens immediately after the data is posted? Or will it be loading something based on the DB actions having been successful completed? As it is it's not waiting for the post to complete before issuing the load. Nathan
[jQuery] Re: Does anybody know when jquery 1.3.3 or 1.4 will be released?
January 14th is only 10 days away. Hope it will be on time. On Dec 31 2009, 4:13 pm, Šime Vidas sime.vi...@gmail.com wrote: I read somewhere, on January 14th
RE: [jQuery] Another Why doesn't this work in IE
It's doing a DB Update on the back side, so it may not be ready until after the update completes.. -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Nathan Klatt Sent: Monday, January 04, 2010 3:52 PM To: jquery-en@googlegroups.com Subject: Re: [jQuery] Another Why doesn't this work in IE Is it okay if the load happens immediately after the data is posted? Or will it be loading something based on the DB actions having been successful completed? As it is it's not waiting for the post to complete before issuing the load. Nathan
RE: [jQuery] Re: Does anybody know when jquery 1.3.3 or 1.4 will be released?
Have you tested the 1.4 nightly with your code? Any issues with it? -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Bruce Sent: Monday, January 04, 2010 1:28 PM To: jQuery (English) Subject: [jQuery] Re: Does anybody know when jquery 1.3.3 or 1.4 will be released? January 14th is only 10 days away. Hope it will be on time. On Dec 31 2009, 4:13 pm, Šime Vidas sime.vi...@gmail.com wrote: I read somewhere, on January 14th
Re: [jQuery] Another Why doesn't this work in IE
Then I'd say you ought to try making the load the callback of the post and see if that works, something along the lines of: $(#TOAppr).live(click, function() { $.post(webapps/hr/admin/actions/act_adminHR_handler.cfm, { desc: $(this).attr('desc'), pk: $(this).attr('pk') }, function() { $(#content-box).load(webapps/hr/admin/display/dsp_timeOffApprove.cfm?dept=+dept+ap=1); }); return false; });
[jQuery] Re: Does anybody know when jquery 1.3.3 or 1.4 will be released?
January 14th is only 10 days away. and yet, there's no official announcement anywhere about it..i wouldn't bet on it.. as it stands right this second, Alpha 2 is the latest official announced version: http://blog.jquery.com/2009/12/18/jquery-14-alpha-2-released/ chances that it will go through a beta process and be released as ready for production use in a 10 day period doesn't seem likely. and take it from people like me who on Day # 1 use the latest and greatest. plan on waiting a little bit, even a day or two i recall on the last two big releases (1.2.4 and 1.3) that they were quickly updated versions addressing some major issue... Hope it will be on time. anything you are coding in particular that requires 1.4 ? if that version is absolutely necessary, did you create a ticket when that stack overflow error you hit, is there an update for it by someone on the jQuery team? are you using the nightly builds as suggested above to see if it has been fixed along the way? Lots of things to consider. we all want the latest and greatest, but it's got to be solid :-)
[jQuery] Re: Does anybody know when jquery 1.3.3 or 1.4 will be released?
I need 1.4 for the bind object feature mentioned in this arctile: http://brandonaaron.net/blog/2009/05/12/jquery-edge-bind-with-a-different-this I will check out http://blog.jquery.com/2009/12/18/jquery-14-alpha-2-released/. It is 4 days older than the nightly build. Thanks On Jan 4, 4:11 pm, MorningZ morni...@gmail.com wrote: January 14th is only 10 days away. and yet, there's no official announcement anywhere about it..i wouldn't bet on it.. as it stands right this second, Alpha 2 is the latest official announced version: http://blog.jquery.com/2009/12/18/jquery-14-alpha-2-released/ chances that it will go through a beta process and be released as ready for production use in a 10 day period doesn't seem likely. and take it from people like me who on Day # 1 use the latest and greatest. plan on waiting a little bit, even a day or two i recall on the last two big releases (1.2.4 and 1.3) that they were quickly updated versions addressing some major issue... Hope it will be on time. anything you are coding in particular that requires 1.4 ? if that version is absolutely necessary, did you create a ticket when that stack overflow error you hit, is there an update for it by someone on the jQuery team? are you using the nightly builds as suggested above to see if it has been fixed along the way? Lots of things to consider. we all want the latest and greatest, but it's got to be solid :-)
[jQuery] Re: Does anybody know when jquery 1.3.3 or 1.4 will be released?
this alpha 2 fixed stack overflow. Thanks On Jan 4, 4:32 pm, Bruce brucejin...@gmail.com wrote: I need 1.4 for the bind object feature mentioned in this arctile: http://brandonaaron.net/blog/2009/05/12/jquery-edge-bind-with-a-diffe... I will check outhttp://blog.jquery.com/2009/12/18/jquery-14-alpha-2-released/. It is 4 days older than the nightly build. Thanks On Jan 4, 4:11 pm, MorningZ morni...@gmail.com wrote: January 14th is only 10 days away. and yet, there's no official announcement anywhere about it..i wouldn't bet on it.. as it stands right this second, Alpha 2 is the latest official announced version: http://blog.jquery.com/2009/12/18/jquery-14-alpha-2-released/ chances that it will go through a beta process and be released as ready for production use in a 10 day period doesn't seem likely. and take it from people like me who on Day # 1 use the latest and greatest. plan on waiting a little bit, even a day or two i recall on the last two big releases (1.2.4 and 1.3) that they were quickly updated versions addressing some major issue... Hope it will be on time. anything you are coding in particular that requires 1.4 ? if that version is absolutely necessary, did you create a ticket when that stack overflow error you hit, is there an update for it by someone on the jQuery team? are you using the nightly builds as suggested above to see if it has been fixed along the way? Lots of things to consider. we all want the latest and greatest, but it's got to be solid :-)- Hide quoted text - - Show quoted text -
[jQuery] Re: jQuery Cycle Plugin width problems
Thanks for any help on this. .slideshow li { width: 100% !important }
[jQuery] Problems with arrays got from php
Hello, I have a form with multi select field like so: SELECT NAME=cats id=cats class=cats OPTION value=11/OPTION OPTION value=22/OPTION ... /SELECT If I'm passing one value script works, but if I have multiple options, it only gets me last in array. jquery script working this out like: $(document).ready(function() { $(#cats).blur(function(){ alert($(this).val()); //this shows ok (ex. 1,2,3) $.post(user_availability.php,{ cats: $(this).val () } ,function(data) { alert(data); // this returns only ex. 3 }); ... user_availability.php only takes passed data echo's for the sake of simplicity in this case. and the echo is the same as in alert(data)- that is 3. Help me please. I'm new to jquery and I need to maintain the same structure as shown as I have already done this form for 7 more fields, so a lot of work put in.
[jQuery] Accessing REST API via JQUERY?
Hi there. I'd like to use jQuery to access a remote website that has a REST API which returns XML data. Should I be able to use the jQuery.getJSON request to do it or is there another command since it's returning XML. Example Request Details (HTTP GET): https://{username}:{passwo...@api.opsourcecloud.net/oec/0.9/myaccount Example Response Details: ?xml version=1.0 encoding=UTF-8 standalone=yes? ns3:Account xmlns:ns2=http://oec.api.opsource.net/schemas/ organization .. ns3:userNamerdyer/ns3:userName ns3:fullNameJoe Public/ns3:fullName ns3:firstNameJoe/ns3:firstName ns3:lastNamePublic/ns3:lastName ns3:emailAddressjpublic24...@pop.net/ns3:emailAddress ns3:orgId1831c1a9-9c03-44df-a5a4-f2a4662d6bde/ns3:orgId ns3:roles ns3:role ns3:nameprimary administrator/ns3:name /ns3:role /ns3:roles /ns3:Account
[jQuery] New to JS and jQuery
Hey guys, I'm trying to create 1 really simple function but it just doesn't work! function showMenu(menu) { var menuid = $( #+menu ); var menuRoot = $( #+menu+-root ); menuid.toggle(); menuRoot.blur(); } What this suppose to do is when you click a link, it will change settings of a specific div to visible The HTML: a id=stuff-root class=baritem href=javascript:void(0) onclick=showMenu('stuff');My Account/a div id=stuff a href=##My Account/a a href=##More stuff/a a href=##Here is a menu item/a a href=##Here is a menu item/a a href=##Here is a menu item/a a href=##Here is a menu item/a /div Why doesn't this work? What am I doing wrong.. When I alert this, I get the correct div ids?
Re: [jQuery] How should I structure this?
On the backend you could add a timestamp for when items are added to the database. Then your query would return anything with a timestamp newer than the last time you asked for items. in client js: last_request = time(); Then send the time along with your request to the server script. on the server: ?php $query = select * from `item_table` where `added_on` $_POST[last_request]; ? Hope this helps On Mon, Jan 4, 2010 at 12:11 PM, Apaz b831...@uggsrock.com wrote: Hello Lets say we have a database where things are going to be added at random times, over the whole day. I want a AJAX script to load new items every 5s (its a local database so no problem with spamming it) and for each of these items I have to do a AJAX request to get some more data... From the back-end I will get something like: unique ID time number name text How do I detect which items I already have added to my site? Because If I just get the latest one, there is a chance I miss something, so its safest if the back-end returns the latest 5 items, or? Any example code how to use the unique ID to validate that I got every row I wanted? Am I thinking completely wrong? I have access to the back-end also so I can change what I want.. Help needed! Thanks ;) -- If you ask me if it can be done. The answer is YES, it can always be done. The correct questions however are... What will it cost, and how long will it take?
[jQuery] Re: Problems with arrays got from php
To allow multiple selection the parameter name must be an array SELECT NAME=cats[] id=cats class=cats OPTION value=11/OPTION OPTION value=22/OPTION /SELECT Notice the array braces [] following the name parameter. Without them the parameter can only hold one item at a time. On the server side you'll need to process cats as an array: $cats = array(); $cats = $_POST['cats']; foreach($cats as $cat) { // do something with each cat here } Hope this helps On Jan 4, 2:52 pm, ChrisMc man...@limani-design.co.uk wrote: Hello, I have a form with multi select field like so: SELECT NAME=cats id=cats class=cats OPTION value=11/OPTION OPTION value=22/OPTION ... /SELECT If I'm passing one value script works, but if I have multiple options, it only gets me last in array. jquery script working this out like: $(document).ready(function() { $(#cats).blur(function(){ alert($(this).val()); //this shows ok (ex. 1,2,3) $.post(user_availability.php,{ cats: $(this).val () } ,function(data) { alert(data); // this returns only ex. 3 }); ... user_availability.php only takes passed data echo's for the sake of simplicity in this case. and the echo is the same as in alert(data)- that is 3. Help me please. I'm new to jquery and I need to maintain the same structure as shown as I have already done this form for 7 more fields, so a lot of work put in.
Re: [jQuery] Re: Looking for that plugin that uses scrollTo for product demos...
Maybe this? http://www.slidedeck.com/ - Jack kgosser wrote: bump. any thoughts? On Dec 17 2009, 6:24 pm, kgosser kgos...@gmail.com wrote: Hey all, I saw this site a few months ago that was showing off a new plugin which used the scrollTo tool to scroll through one screen shot. I can't seem to find it with a Google search, and I forgot to save it to my Delicious. Yikes! I was wondering if this rings a bell for anyone and if you could direct me to that site? Thanks!
RE: [jQuery] Re: Looking for that plugin that uses scrollTo for product demos...
Whoa! $299 for the Pro version! Unreal! Perhaps the last 9 is a typo, and the price is a more realistic $29. From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Jack Killpatrick Sent: Monday, January 04, 2010 7:16 PM To: jquery-en@googlegroups.com Subject: Re: [jQuery] Re: Looking for that plugin that uses scrollTo for product demos... Maybe this? http://www.slidedeck.com/ - Jack kgosser wrote: bump. any thoughts? On Dec 17 2009, 6:24 pm, kgosser mailto:kgos...@gmail.com kgos...@gmail.com wrote: Hey all, I saw this site a few months ago that was showing off a new plugin which used the scrollTo tool to scroll through one screen shot. I can't seem to find it with a Google search, and I forgot to save it to my Delicious. Yikes! I was wondering if this rings a bell for anyone and if you could direct me to that site? Thanks!
[jQuery] jquery UI sortable, how can i get the text of the li that i just moved ?
what i'm trying to do is to get the text that is contained by the moved li, after the list item was moved. Is there a way to do that? i tried: $(ui.item).text() but i get an ui is not defined error (i imported just jquery.js, ui.core.js and ui.sortable.js , do i have to import something else?) thanks
Re: [jQuery] Need jQuery expert to slightly modify plugin
I also have an enhanced version of the jCarouselLite plugin that you are free to use: http://github.com/kswedberg/jquery-carousel-lite --Karl Karl Swedberg www.englishrules.com www.learningjquery.com On Jan 4, 2010, at 10:19 AM, Liam Potter wrote: http://groups.google.com/group/jquery-en/browse_thread/thread/f550b94914d10065 On 04/01/2010 15:12, MikeTheVike wrote: I'm using the newest version of jQuery(http://www.jquery.com) and the jCarousel Lite plugin (http://www.gmarwaha.com/jquery/ jcarousellite/). It is a content slider that rotates content slides. It is setup to auto rotate on a set time, and you can also hit the previous/next buttons to move through the slides. This has been working great. Now I have the need for a pause button that will stop the auto rotate. I think this should be fairly easy for someone familiar with javascript and jQuery. Please email me at mike (at) moxiedisplays (dot) com. This is a paid job if we can find someone to do it correctly and in a timely manner. Thanks!
[jQuery] How to retrieve the selected cells
Hi all, I am new to jQuery and I would like to process a matrix operation using PHP. The front-end code is done bellow, its a 3x3 table. the user could select/deselect individual cells of the table and click the button that calls a PHP script that will run some function. 1) How do I know if a cell is selected? Is there is is_selected( ) function in jQuery? 2) Would it be possible to send a 3x3 array to my PHP script? Please provide me with any info on this. Thanks! MT My current test code. htmlheadtitleTest/title script type='text/javascript' src='http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js'/ script script type=text/javascript $(document).ready(function() { $(td).toggle( function () { $(this).addClass(sel); }, function () { $(this).removeClass(sel); } ); }); /script style .sel { background-color:red; } /style /headbody table border=5 cellspace=10 trtd1/tdtd2/tdtd3/td/tr trtd4/tdtd5/tdtd6/td/tr trtd7/tdtd8/tdtd9/td/tr /table buttonClick here to process the selection with a php script/button /body/html
[jQuery] Re: jquery UI sortable, how can i get the text of the li that i just moved ?
i tried: $(ui.item).text() but i get an ui is not defined error that would potentially be a valid way to do it, but without any of your code to work with, it's hard to help with that
[jQuery] Re: Accessing REST API via JQUERY?
$.getJSON gets, well, JSON data... it doesn't handle XML data you can use the generic $.ajax method (which $.getJSON ultimately uses anyways, but just with the tpye set to JSON) and handle the data in the callback event On Jan 4, 4:06 pm, Simon simon@rewardstream.com wrote: Hi there. I'd like to use jQuery to access a remote website that has a REST API which returns XML data. Should I be able to use the jQuery.getJSON request to do it or is there another command since it's returning XML. Example Request Details (HTTP GET): https://{username}:{passwo...@api.opsourcecloud.net/oec/0.9/myaccount Example Response Details: ?xml version=1.0 encoding=UTF-8 standalone=yes? ns3:Account xmlns:ns2=http://oec.api.opsource.net/schemas/ organization .. ns3:userNamerdyer/ns3:userName ns3:fullNameJoe Public/ns3:fullName ns3:firstNameJoe/ns3:firstName ns3:lastNamePublic/ns3:lastName ns3:emailAddressjpublic24...@pop.net/ns3:emailAddress ns3:orgId1831c1a9-9c03-44df-a5a4-f2a4662d6bde/ns3:orgId ns3:roles ns3:role ns3:nameprimary administrator/ns3:name /ns3:role /ns3:roles /ns3:Account
[jQuery] Re: FireFox Pages flicker when jQuery reads a CSS attribute of a div
Hi Šime, Thanks for your question. My demo is at http://dev.jquery.com/ticket/5743 more specifically the attachement http://dev.jquery.com/attachment/ticket/5743/ScrollFlickerSimple.html I did not include in my testcase the DOM method to get the CSS attribute directly, only through jQuery. If I get it directly, then there is no flicker. So this has nothing to do with FireFox. I am complaining that jQuery manipulates the browser with CSS updates when in fact I am only making a read-only call. This is extremely upsetting and actually illegal in IT. My page (orders of magnitudes more complex than the testcase) completely disappears for a second. On Jan 5, 3:36 am, Šime Vidas sime.vi...@gmail.com wrote: where's your demo? i've used the css() method on DIVs before and never noticed flickering...
[jQuery] Re: How to retrieve the selected cells
1) How do I know if a cell is selected? Is there is is_selected( ) function in jQuery? There's the :selected selector, but it's for valid form fields, not table cells... in your case, $(table td.sel) would give you all selected table cells I have no idea what your PHP looks like, but one way to gather the data could be: http://jsbin.com/areti/edit but that all depends on what you are looking for (just selected cell values? do you need position on the grid? something else?) On Jan 4, 10:11 pm, MT matt.tha...@gmail.com wrote: Hi all, I am new to jQuery and I would like to process a matrix operation using PHP. The front-end code is done bellow, its a 3x3 table. the user could select/deselect individual cells of the table and click the button that calls a PHP script that will run some function. 1) How do I know if a cell is selected? Is there is is_selected( ) function in jQuery? 2) Would it be possible to send a 3x3 array to my PHP script? Please provide me with any info on this. Thanks! MT My current test code. htmlheadtitleTest/title script type='text/javascript' src='http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js'/ script script type=text/javascript $(document).ready(function() { $(td).toggle( function () { $(this).addClass(sel); }, function () { $(this).removeClass(sel); } ); }); /script style .sel { background-color:red; } /style /headbody table border=5 cellspace=10 trtd1/tdtd2/tdtd3/td/tr trtd4/tdtd5/tdtd6/td/tr trtd7/tdtd8/tdtd9/td/tr /table buttonClick here to process the selection with a php script/button /body/html
Re: [jQuery] Accessing REST API via JQUERY?
The remote XML API is not on the same domain as your page, is it? Then you can't do it. Browser cross-domain restrictions will not permit it. The only reason you can use getJSON for cross-domain requests is that it actually downloads executable JavaScript code with a dynamic script element, i.e. the JSONP format - and that only works with servers that support JSONP. To use an XML REST API from another domain in your JavaScript code, you will need to put a proxy of some sort on your server, so that you can make the request to your own domain. This can be as simple as a few lines of PHP code - search for something like php proxy for some examples. -Mike On Mon, Jan 4, 2010 at 1:06 PM, Simon simon@rewardstream.com wrote: Hi there. I'd like to use jQuery to access a remote website that has a REST API which returns XML data. Should I be able to use the jQuery.getJSON request to do it or is there another command since it's returning XML. Example Request Details (HTTP GET): https://{username}:{passwo...@api.opsourcecloud.net/oec/0.9/myaccounthttp://username%7D:%7bpassword...@api.opsourcecloud.net/oec/0.9/myaccount Example Response Details: ?xml version=1.0 encoding=UTF-8 standalone=yes? ns3:Account xmlns:ns2=http://oec.api.opsource.net/schemas/ organization .. ns3:userNamerdyer/ns3:userName ns3:fullNameJoe Public/ns3:fullName ns3:firstNameJoe/ns3:firstName ns3:lastNamePublic/ns3:lastName ns3:emailAddressjpublic24...@pop.net/ns3:emailAddress ns3:orgId1831c1a9-9c03-44df-a5a4-f2a4662d6bde/ns3:orgId ns3:roles ns3:role ns3:nameprimary administrator/ns3:name /ns3:role /ns3:roles /ns3:Account
[jQuery] Re: Automatic scrolling
Thanks for advice but your answer doesn't help as you cannot generate a click on a link with jQuery I have used this solution on other pages and it works great but in this particular case: I would like visitor to be scrolled automatically to particular spot on page depending on radio button being clicked I am looking for something like: jQuery('input#oui').click(function(){ jQuery('div#reponse1').show('slow'); jQuery('div.postpop').show('slow'); jQuery('div#reponse2').hide('fast'); jQuery('div#reponse3').hide('fast'); jQuery(SCROLLTO-automatically-to-paragraph1); }); Still trying to find answer Jean On 4 jan, 16:45, Paul Hutson hutsonphu...@googlemail.com wrote: Thanks for help This should do what you want (well, it's an example, but I'm sure you can pull out the bits you need) :http://www.position-relative.net/creation/anchor/ It'll smooth scroll to the right location for you... :) (we've also used it on the help for Outer Empires, here...http://gameview.outer-empires.com/Info/Newbie.asp) HTHs, Paul Hutson