[jQuery] Re: IE6 - Ajax onchange error
good morning :o) I solved the problem: - IE6 is deleting every single option if you use XXX.html(''); or the jq-plugin with .removeOption(/./); and stops the browser for this time - all other(including IE7+IE8) are handling this in background process. Result: I used the beforeSend methode to clean those options, as a result the box stayed open until those boxes are empty. On inserting this cleaning in the success function this error disappeared. -- Solved :o) Thanks a lot for trying... greeting, mathew
[jQuery] Re: Attribute selection not working in MSIE; eg $(input[name=name]).val()
Sorry about the lack of information :o The input box is: input type=text name=name value= / The jQuery code is: $(input[name=name]).val(); And no results. The problem exists on MSIE8, but I think to remember it also is in MSIE7.. On firefox it works great.
[jQuery] Re: Loading jQuery without blocking
Hi Eric, thanks for your reply. Using jQuery to backload any additional plugins or scripts can be super useful - yes, that's why I've been doing for a while now. :) As mentioned, I was primarily playing around with these techniques to see how it goes, and I wish I could have a gotten a bit more info on why it doesn't seem to work properly in IE (more than an unknown error at least). I think if there is a recognizable increase in performance then for rather massive pages. So I actually don't need to worry about this too much... ;) Cheers On 6 Aug., 23:03, Eric Garside gars...@gmail.com wrote: Honestly, I'd load jQuery regularly, and use the getScript function to load the rest of the files after domready. I don't know that you're getting a big performance increase in loading the jquery library in this method, and it is causing an unknown error, which isn't an ideal thing to debug. :P Using jQuery to backload any additional plugins or scripts can be super useful, but including the jQuery library asynchronously seems like a poor decision. On Aug 6, 4:12 am, north ollo...@web.de wrote: Hi all, I played around with Steve Souders' techniques of loading JS without blocking a bit (I had already been using jQuery's getScript/ajax to load bigger chunks of code for certain parts of the site only if necessary). I tried to use what Nicolas Zakas calls the best way to load JS (http://www.nczonline.net/blog/2009/07/28/the-best-way-to-load- external-javascript/) for the project I work on. I created the script... tag for jquery.js the way described in the article, and then tried to use onload/readystate to start loading the file with my plugins/functions right after jquery did. This seems to work fine in all browsers except, you guessed it, IE... For some reason IE (I think it happened in 6, 7 and 8) throws me an unknown error every now and then. It's just a guess, since an unknown error doesn't really help me debugging, but maybe sometimes the plugin/functions file finishes loading before jquery. Even though that should be prevented by checking the readystate... I tried several other approaches then (like adding an ajax call to the plugins/functions file at the end of the jquery file, or checking for (typeof jQuery == 'undefined') in a loop to try loading the files as soon as this statement equals false), but none would work. Is anybody using one of these non-blocking techniques with jQuery successfully? Thanks
[jQuery] Re: Switching a tabs content from a remote source to a local source
I'm using JQuery 1.3.2 and jQuery UI 1.7.2. It was apparent in Firefox 3.5 definitely but also IE 6/7/8 I believe. To overcome this problem, I am currently removing the remote tab then adding the same tab except with a local source which is obviously a bit clunky. On Jul 23, 7:43 am, Klaus Hartl klaus.ha...@googlemail.com wrote: That shouldn't happen and a similiar bug was fixed for IE long time ago. Which browser do you encounter this bug in and which version of jQuery UI do you use? --Klaus On 22 Jul., 19:22, WR willrya...@googlemail.com wrote: It seems that if you change the url of a tab from a remote source (ajax request) to a local source i.e. ('#myTabs').tabs('url', 1, '#myLocalContentDiv'); When you then click on this tab, it makes an ajax request (tohttp://myURL/#myLocalContentDiv) rather than simply showing the local content. This in effect reloads the entire page into the tab. Any way round this, or shall I report this as a bug? Thanks.
[jQuery] Re: Google Maps inside jqModal
Hey Anshu shetti, Your trying to display google map with model box. May be your google map is having some issue check with its flow, 1 - goolgle map should be generate first. 2 - model box code should execute after that. Here I think so your model box is appearing first before to generate google map thats y ur not able see google maps tiles. Keep your jquery ready function bottom of body. $().ready(function() { $('#dialog').jqm(); }); Lets give a try :) cheers. On Wed, Aug 5, 2009 at 12:37 AM, Anush Shetty anushshe...@gmail.com wrote: On Tue, Aug 4, 2009 at 9:23 PM, Liam Potter radioactiv...@gmail.comwrote: can you post an example? anush wrote: Has anybody tried embedding Google Maps inside jqModal ? The maps aren't getting displayed properly. $().ready(function() { $('#dialog').jqm(); }); !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd; html xmlns=http://www.w3.org/1999/xhtml; xmlns:v=urn:schemas-microsoft-com:vml head meta http-equiv=content-type content=text/html; charset=utf-8/ titleGoogle Maps JavaScript API Example: Simple Map/title script src=http://maps.google.com/maps?file=apiamp;v=2amp;sensor=falseamp;key=ABQIzr2EBOXUKnm_jVnk0OJI7xSosDVG8KKPE1-m51RBrvYughuyMxQ-i1QfUnH94QxWIa6N4U6MouMmBA http://maps.google.com/maps?file=apiv=2sensor=falsekey=ABQIzr2EBOXUKnm_jVnk0OJI7xSosDVG8KKPE1-m51RBrvYughuyMxQ-i1QfUnH94QxWIa6N4U6MouMmBA type=text/javascript/script script type=text/javascript $().ready(function() { $('#dialog').jqm(); }); function initialize() { if (GBrowserIsCompatible()) { var map = new GMap2(document.getElementById(map_canvas)); map.setCenter(new GLatLng(37.4419, -122.1419), 13); map.setUIToDefault(); } } /script /head body onload=initialize() onunload=GUnload() div class=jqmWindow id=dialog style=width:800px a href=# class=jqmCloseClose/a div id=map_canvas style=width: 500px; height: 300px/div /div /body /html -- Regard Mohd.Tareque
[jQuery] Re: Fade in / Out
$(div).fadeIn(300).animate({opacity:1},5000).fadeOut(300); Dave Maharaj :: WidePixels.com wrote: I was wondering how do you make text fade in for a specific amount of time then fade out. I have the fade in / out part..i just cant figure out the duration so it stays there after fading in for 5 seconds then fades out. Dave
[jQuery] HTML5 video tag available?
Hi, do you know if it is possible to use selectors for a video tag? For example: $(this).find('div.misc').find('ul').addClass('thumb-fila').find ('li').find('video').each(function(){ }); to capture the video tags on a li? Thanks
[jQuery] Re: HTML5 video tag available?
try it? quiKe wrote: Hi, do you know if it is possible to use selectors for a video tag? For example: $(this).find('div.misc').find('ul').addClass('thumb-fila').find ('li').find('video').each(function(){ }); to capture the video tags on a li? Thanks
[jQuery] calling a jQuery function from RJS/onclick
Hi, Im using jNice (a jQuery plugin) in rails. I have the following jQuery function on the head of my page. script type=text/javascript jQuery.noConflict(); /* calling jNice on document ready */ jQuery(document).ready(function($) { $('div.jNice').jNice(); }); . /script On page load, this gets called correctly. Now there's a link on the page that lets me add more rows and i do this via RJS. Here's the code. tr id=empty_item div id=plussign%= add_item_link + %/div /tr def add_item_link(name) link_to_function name do |page| page.insert_html :before, :empty_item, :partial='item', :object = Item.new end end Now this partial 'item' contains form elements upon which jNice needs to work its magic. How can I call the jNice function after the user clicks on the add_item_link? Thanks.
[jQuery] Re: Resizing a Thickbox
Here's how you do it with a jQuery UI Dialog: http://jsbin.com/ujumi - Richard On Thu, Aug 6, 2009 at 9:37 PM, ste...@braingia.org wrote: Hello, I've done a bit of googling and some experimentation but I'm a bit lost. I'm trying to dynamically resize a modal lightbox created with thickbox. So for instance, I draw the div with certain content, say a form with a select box. I'd like to be able to add additional content to the div using the select boxes 'onchange' event, like to add images or other content below the select box. Is that possible with thickbox or any other jquery plugin? Thanks for any help or pointers.
[jQuery] Working with XML
I have the following XML to be processed: doc status/status value form field type = input name = organisation description = Organisatie / field type = select name = organisationType description = Soort Organisatie option value = geen / option value = Non Profit / option value = ZZP / option value = MKB / option value = Anders / /field field type = input name = firstName description = Voornaam / field type = input name = lastName description = Achternaam / field type = input name = email description = E-mail / field type = input name = telephone description = Telefoon / field type = input name = address description = Adres / field type = input name = zipcode description = Postcode / field type = input name = city description = Plaats / field type = select name = reason description = Reden Voor Contact option value = geen / option value = Vraag / option value = Opmerking / option value = Verzoek Om Informatie / option value = Neem Contact Met Mij op / /field field type = textarea name = description description = Omschrijving / /form /value durationUitvoeren van het script duurde 21.371 milisec/duration /doc I process it with the folowing code: $.post(cgiURL, {command: getForm, form: cgiForm}, function(xml){ $(xml).find('field').each(function() { if( $(this).attr('type') == 'input' ) { Is there a better way to do this? There a severall 'problems'. There should be exactly one form. Only the field records that are immediate descendants of form should be used. When there comes another type which also has children with type field, this code will process those also.
[jQuery] [validate] Problem with custom methods and eager/lazy validation
Hi, I'm using the validator plugin and it's great! I understand the following: Before a field is marked as invalid, the validation is lazy: Before submitting the form for the first time, the user can tab through fields without getting annoying messages - he won't get bugged before he had the chance to actually enter a correct value This is cool and how I want it to work. However, I have some custom validation methods using addMethod like: $.validator.addMethod(currency, function(value, element){ element.value = $.trim(value); return this.optional(element) || /^([0-9]+|[0-9]{1,3}(,[0-9]{3})*)(\. [0-9]{2})?$/.test(element.value); }, 'This value should be in the form 1234, 1234.56 or 1,234.56'); These custom methods validate eagerly from the start, i.e. before I've tried to submit the form. This means that in a form with one input using say this 'currency' method, and another input using the built in 'required' method, as I tab through them, the required one will not be validated but the currency one will. How can I ensure that these custom validation methods only validate after initial submit/validation has occurred, like the built in ones do? Many thanks, Jim.
[jQuery] [validate] How to focus on error container above the form after the form tries to submit
Hi everyone, I have the validate plugin working for my form so that on submit the errors are all displayed in a container div above my form. By default the focus goes to the first input field that didn't pass validation, but I'd like it to focus on the error container div. Has anybody done this or does anybody know how to? Thanks in advance! Manoj
[jQuery] [autocomplete]
Hi, I'm trying to get Joerns awesome autocomplete-plugin to work with UTF-8 but I've had no luck in making it work. Has anyone managed to query the backend using UTF-8 encodend characters? Right now I'm trying my best to decode the incoming string ie q=Östman but nothing happens? Do I need to encode the returned string as well? Any thoughts are greatly appreciated! Christer
[jQuery] Jquery animate marginTop in IE (jerky)
Hi everyone! I have an issue with IE which has been driving me absolutely mad for like last 2 days. Basically all works awesome, crossbrowser, etc. apart from one floated div, when I am trying to animate it's margin- top on hover (move it down, when mouse go out - move it back up). All browsers perform the animation as a charm - slick, smooth, fast and cool looking, but IE has to be different, hasn't it? Anyways, I will copy and paste the markup, css script related to the issue. It's not all the template, to make it shorter I cut only the bits relating to #top_user div. I am using jQuery 1.3.2, XHTML1.0 strict (validates) and the background image is a transparent png32 if that helps. The easing plugin I added just recently hoping it's gonna prevent the jerkiness in IE (it didn't) - so with or without it - it's crap in IE and great in anything else 1) Markup body div id=top div id=top1024 div id=top_user p/p /div /div /div /body 2) CSS body { width: 100%; height: 100%; background-color:#E4E4E4; margin: 0px; padding: 0px; font-family:Verdana, Geneva, sans-serif; font-size:12px; color:#333; } #top { height:248px; width:100%; background-image: url(/images/layout/top/top_background.png); background-repeat: repeat-x; } #top1024 { height:100%; width:1024px; float:left; } #top_user { width:514px; height:222px; background-image: url(/images/layout/top/user_cp.png); background-repeat: no-repeat; float:right; margin-top:-372px; padding:0px; /* The black bit appears as 35px height while hidden */ } #top_user p { color:#FFF; margin-top: 195px; text-indent: 40px; } 3) Script jQuery(#top_user).hover(function() { jQuery(this).animate({marginTop: '-300px'}, {duration: 300, easing: 'easeOutBounce'}); }, function() { jQuery(this).stop().animate({marginTop: '-372px'}, {duration: 300, easing: 'easeOutBounce'}); }); Any help is well appreciated as my frustration levels are unbelievable right now;) Cheers TouchTheSky
[jQuery] jQuery Superfish Joomla issue for IE6
Hi! Oddly enough, I have no problems with my IE7 version of my superfish menu is Joomla, but in IE6 it does not work properly. It does work, thank God, but not like in the other browsers. Two things occur. 1) The menu is not resized all the way over to the width of the screen. 2) The buttons do not work for the entire span, but only work when you rollover the actual link. This does not behave this way in IE7 or 8. Does anyone have any idea how to fix this? Here is my site: http://www.looledo.com Try it in IE6 and IE8 and you will see what I am referring to.
[jQuery] Checkbox behaviour
Hi, This is my first little foray into JQuery, so far i'm impressed, having had very little JS experience, I was able to create the result I wanted very qucikly and easily! However, I'm having one little niggle... Here's my code: [code] $(document).ready(function(){ $(.submit_problem_form_right).css(visibility,hidden); $(#left_submit).css(visibility,visible); $(#show_resolve).click(function () { if ($(#show_resolve).is(:checked)) { $(.submit_problem_form_right).css(visibility,visible); $(#left_submit).css(visibility,hidden); } else { $(.submit_problem_form_right).css(visibility,hidden); $(#left_submit).css(visibility,visible); } }); }); [/code] This works fine.. ticking the checkbox shows and hides the div. However, if I check the checkbox and refresh the page, the checkbox remains ticked, but the div is hidden. Any ideas how I can make it work reliably?
[jQuery] Jquery Animate Issue
Hi Guys Iam having an issue with the JQuery animate function. Iam not sure if its because iam potentially mis-using the animate function or if its a genuine issue so I thought I would seek some adivce here before looking into it any further :-). I have posted up an example of the bug on Jsbin with the following URL: http://jsbin.com/iquzo There is an expand arrow on the left hand side that when clicked will make the left panel slide out. The arrow then turns the other way so you can click and slide back in. After 10 slide out , slide in's - the animation really starts to slow and there is a logarithmic delay in it sliding in and sliding out which is bizarre. Iam using IE7.0.5730.13 , and one of my colleagues has noticed the same behaviour in Firefox 3.0 and IE8. I cant see anything obivous happing like a JS error or bad CSS on my part so iam thinking it might be an issue with the animate function. Can anyone shed anylight on this issue for me? Thanks in advance Mike
[jQuery] Simplemodal ajax dialog
Hello everyone, Using the simplemodal plugin I create a dialog dynamically from links using $(.dialog-link).live('click', function(e) { e.preventDefault(); $.get($(this).attr('href'),function(data) { $.modal(data, {onOpen: open, position: ['10%','30%']}); }); }); (FYI: the onOpen callback just sets some height) The document returned by the ajax call (contained in data) has some jquery calls to datepicker, etc. But when my dialog displays the datepicker won't work. As far as I can tell the javascript in the document called with AJAX isn't executed, but I do get my alert() test statements... Does anyone know where my error lies? Thanks, Michael
[jQuery] ajax download file
Hi, Can anyone hellp me please. I integrated phpexcel with codeigniter, Phpexcel generates a pdf file. When the button print to pdf is press it will send an request to the server using ajax. now the problem is i dont know how to make jquery to make aprompt that the file is being downloaded. the server response is a binary not a link. is there any function in jquery.post to set its header? thanks vile:D
[jQuery] Filter Certain columns
hi ... i use flexgrid with .net mvc to show records from my table... i use jquery for this... i use certain objects like {display: 'ID', name: 'CustomerID', width: 40, sortable: true, align: 'left'}, {display: 'Company', name: 'CompanyName', width: 100, sortable: true, align: 'left'}, {display: 'Name', name: 'ContactName', width: 100, sortable: true, align: 'left'}, {display: 'Title', name: 'ContactTitle', width: 100, sortable: true, align: 'left'}, {display: 'Address', name: 'Address', width: 100, sortable: true, align: 'left'}, {display: 'City', name: 'City', width: 80, sortable: true, align: 'left'}, to show the cols in the grid. but when i hide either of it the value of the column is not changing rather the colum header changes to something else and mismatch showing is happening how would i fix this
[jQuery] Re: tablesorter help?
Hi, Change the sortList definition to sortList: [[3,0]], or sortList: [[3,1]], depending on what order you want the column sorted in. You could also tidy up your HTML by adding tbody/tbody tags and form elements are not valid inside tr/tr Paul On Aug 7, 6:53 am, jsrobinson magiclampnetwo...@gmail.com wrote: I have two custom parsers, one works on one column but not on another. The second parser is working fine. Example: http://jquery.magiclamp.net/tablesorter.html Cols 2 and 3 have the exact same data, use the same parser, and yet sorting on col 2 works but sorting on col 3 returns Sorting on 3,NaN and dir NaN time:,3ms Rebuilt table:,1ms Any clues? Thank you for an awesome plugin!!!
[jQuery] jQuery animate marginTop jerky in IE
Hi everyone! I have an issue with IE which has been driving me absolutely mad for like last 2 days. Basically all works awesome, crossbrowser, etc. apart from one floated div, when I am trying to animate it's margin-top on hover (move it down, when mouse go out - move it back up). All browsers perform the animation as a charm - slick, smooth, fast and cool looking, but IE has to be different, hasn't it? Anyways, I will copy and paste the markup, css script related to the issue. It's not all the template, to make it shorter I cut only the bits relating to #top_user div. I am using jQuery 1.3.2, XHTML1.0 strict (validates) and the background image is a transparent png32 if that helps. The easing plugin I added just recently hoping it's gonna prevent the jerkiness in IE (it didn't) - so with or without it - it's crap in IE and great in anything else 1) Markup body div id=top div id=top1024 div id=top_user p/p /div /div /div /body 2) CSS body { width: 100%; height: 100%; background-color:#E4E4E4; margin: 0px; padding: 0px; font-family:Verdana, Geneva, sans-serif; font-size:12px; color:#333; } #top { height:248px; width:100%; background-image: url(/images/layout/top/top_background.png); background-repeat: repeat-x; } #top1024 { height:100%; width:1024px; float:left; } #top_user { width:514px; height:222px; background-image: url(/images/layout/top/user_cp.png); background-repeat: no-repeat; float:right; margin-top:-372px; padding:0px; /* The black bit appears as 35px height while hidden */ } #top_user p { color:#FFF; margin-top: 195px; text-indent: 40px; } 3) Script jQuery(#top_user).hover(function() { jQuery(this).animate({marginTop: '-300px'}, {duration: 300, easing: 'easeOutBounce'}); }, function() { jQuery(this).stop().animate({marginTop: '-372px'}, {duration: 300, easing: 'easeOutBounce'}); }); Any help is well appreciated as my frustration levels are unbelievable right now;) Cheers TouchTheSky -- View this message in context: http://www.nabble.com/jQuery-animate-marginTop-jerky-in-IE-tp24863683s27240p24863683.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: jQuery animate marginTop jerky in IE
Have you tried animating just the top position instead? touch_the_sky wrote: Hi everyone! I have an issue with IE which has been driving me absolutely mad for like last 2 days. Basically all works awesome, crossbrowser, etc. apart from one floated div, when I am trying to animate it's margin-top on hover (move it down, when mouse go out - move it back up). All browsers perform the animation as a charm - slick, smooth, fast and cool looking, but IE has to be different, hasn't it? Anyways, I will copy and paste the markup, css script related to the issue. It's not all the template, to make it shorter I cut only the bits relating to #top_user div. I am using jQuery 1.3.2, XHTML1.0 strict (validates) and the background image is a transparent png32 if that helps. The easing plugin I added just recently hoping it's gonna prevent the jerkiness in IE (it didn't) - so with or without it - it's crap in IE and great in anything else 1) Markup body div id=top div id=top1024 div id=top_user p/p /div /div /div /body 2) CSS body { width: 100%; height: 100%; background-color:#E4E4E4; margin: 0px; padding: 0px; font-family:Verdana, Geneva, sans-serif; font-size:12px; color:#333; } #top { height:248px; width:100%; background-image: url(/images/layout/top/top_background.png); background-repeat: repeat-x; } #top1024 { height:100%; width:1024px; float:left; } #top_user { width:514px; height:222px; background-image: url(/images/layout/top/user_cp.png); background-repeat: no-repeat; float:right; margin-top:-372px; padding:0px; /* The black bit appears as 35px height while hidden */ } #top_user p { color:#FFF; margin-top: 195px; text-indent: 40px; } 3) Script jQuery(#top_user).hover(function() { jQuery(this).animate({marginTop: '-300px'}, {duration: 300, easing: 'easeOutBounce'}); }, function() { jQuery(this).stop().animate({marginTop: '-372px'}, {duration: 300, easing: 'easeOutBounce'}); }); Any help is well appreciated as my frustration levels are unbelievable right now;) Cheers TouchTheSky
[jQuery] Re: [validate] Problem with custom methods and eager/lazy validation
You've got the this.optional(element) stuff included, so that method works just like the builtin methods, unless something else is broken. Jörn On Thu, Aug 6, 2009 at 10:37 PM, Jim Evansximxim...@googlemail.com wrote: Hi, I'm using the validator plugin and it's great! I understand the following: Before a field is marked as invalid, the validation is lazy: Before submitting the form for the first time, the user can tab through fields without getting annoying messages - he won't get bugged before he had the chance to actually enter a correct value This is cool and how I want it to work. However, I have some custom validation methods using addMethod like: $.validator.addMethod(currency, function(value, element){ element.value = $.trim(value); return this.optional(element) || /^([0-9]+|[0-9]{1,3}(,[0-9]{3})*)(\. [0-9]{2})?$/.test(element.value); }, 'This value should be in the form 1234, 1234.56 or 1,234.56'); These custom methods validate eagerly from the start, i.e. before I've tried to submit the form. This means that in a form with one input using say this 'currency' method, and another input using the built in 'required' method, as I tab through them, the required one will not be validated but the currency one will. How can I ensure that these custom validation methods only validate after initial submit/validation has occurred, like the built in ones do? Many thanks, Jim.
[jQuery] Re: HTML5 video tag available?
tried (doesn´t work) but i wanted to know if maybe i was on a mistake. On Aug 7, 12:52 pm, Liam Potter radioactiv...@gmail.com wrote: try it? quiKe wrote: Hi, do you know if it is possible to use selectors for a video tag? For example: $(this).find('div.misc').find('ul').addClass('thumb-fila').find ('li').find('video').each(function(){ }); to capture the video tags on a li? Thanks
[jQuery] Re: Checkbox behaviour
You'll have to run the whole function block within $(#show_resolve).click() on load (ie. put it somewhere in $(document).ready(function(){}). Make it a seperate function so you can avoid copy/pasting the whole thing Jonathan Samuurai wrote: Hi, This is my first little foray into JQuery, so far i'm impressed, having had very little JS experience, I was able to create the result I wanted very qucikly and easily! However, I'm having one little niggle... Here's my code: [code] $(document).ready(function(){ $(.submit_problem_form_right).css(visibility,hidden); $(#left_submit).css(visibility,visible); $(#show_resolve).click(function () { if ($(#show_resolve).is(:checked)) { $(.submit_problem_form_right).css(visibility,visible); $(#left_submit).css(visibility,hidden); } else { $(.submit_problem_form_right).css(visibility,hidden); $(#left_submit).css(visibility,visible); } }); }); [/code] This works fine.. ticking the checkbox shows and hides the div. However, if I check the checkbox and refresh the page, the checkbox remains ticked, but the div is hidden. Any ideas how I can make it work reliably? -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be
[jQuery] Re: HTML5 video tag available?
try adding document.createElement(video); before your jquery script quiKe wrote: tried (doesn´t work) but i wanted to know if maybe i was on a mistake. On Aug 7, 12:52 pm, Liam Potter radioactiv...@gmail.com wrote: try it? quiKe wrote: Hi, do you know if it is possible to use selectors for a video tag? For example: $(this).find('div.misc').find('ul').addClass('thumb-fila').find ('li').find('video').each(function(){ }); to capture the video tags on a li? Thanks
[jQuery] Re: jQuery animate marginTop jerky in IE
I've made a quick test right now. I set the position:absolute for the div specified the top and left in css. What I've noticed, in this setup animating the actual top is quite bad, however when I animate marginTop now, the animation is much smoother, still far away from FF,Safari or Opera though. -- View this message in context: http://www.nabble.com/jQuery-animate-marginTop-jerky-in-IE-tp24863683s27240p24865529.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: Working with XML
2009/8/7 Decebal cldwester...@gmail.com: I process it with the folowing code: $.post(cgiURL, {command: getForm, form: cgiForm}, function(xml){ $(xml).find('field').each(function() { if( $(this).attr('type') == 'input' ) { Is there a better way to do this? There a severall 'problems'. There should be exactly one form. Only the field records that are immediate descendants of form should be used. When there comes another type which also has children with type field, this code will process those also. I now use: $(xml).find('doc value form field').each(function() { So the last problem is solved. -- Cecil Westerhof
[jQuery] Re: Make event happen after a certain amount of time has passed.
check this out http://plugins.jquery.com/project/timers - Original Message - From: James james.gp@gmail.com To: jQuery (English) jquery-en@googlegroups.com Sent: Thursday, August 06, 2009 4:19 PM Subject: [jQuery] Re: Make event happen after a certain amount of time has passed. Then you can do something like this: Have a setTimeout (say, executes in 20 seconds) with a callback function, say moveToLocation. Then you need a way to find out whether the div has been scrolled to the certain location or not. That can be done by checking either for the user's top/left coordinate of their screen, or you can set a variable when the user clicks on that button. After the 20 seconds comes by and the moveToLocation function is called, it checks for that location (or some variable you set). If it's true (meaning, the user has scrolled to the certain location), then do nothing. Otherwise, do the auto-scroll. The idea is that the moveToLocation is called no matter what. It's just that whether you do the actual action or not depends on the state of things. On Aug 6, 12:09 pm, Simon Vansintjan svansint...@gmail.com wrote: Well, it's pretty theoretical at the moment, so there's no code down, but the idea would be that a div appears, and that the user can click on a button that would scroll the div to a certain location. However, if the user doesn't click, I would still want the div to move to that location (in case he/she doesn't get it that it would move, dunno). On Thu, Aug 6, 2009 at 6:03 PM, James james.gp@gmail.com wrote: Use the setTimeout/setInterval functions with some kind of global counter. If some kind of action/event occurs, the counter would be refreshed and the function would not execute. Would you like to specify in more detail what you would like to achieve? On Aug 6, 11:43 am, Simon svansint...@gmail.com wrote: Hey, After a user hasn't triggered an event for a given amount of purple, would it be possible to trigger that event anyway? I have no idea how to even start looking for this. Thanks for any hints/ideas/whatever you can throw my way. Simon -- simon.vansintjan.org
[jQuery] Re: Floating DIV
I figured that I could bind a DIV tag to the tool tip but with it calling another page to fetch the contents. I think I can live with that. I figures I can set the closeWait to a reasonable higher number of seconds (say 20 seconds) and that should be fine with user but ideally would love to have it open till the mouse goes out of focus. Thanks. On Aug 6, 2:28 pm, Just Check justcheck.2...@gmail.com wrote: I am looking for something similar to what's there atwww.monster.com. When you search for a job, it shows you the job list (Single line mode) and when you hover over the Job Title column it pops up an AJAX dialog with links and further details within it. Is there some existing plugin that I can use (the closest I could find was BetterTooltip:http://edgarverle.com/BetterTip/default.cfm). But the problems I see there are a.) I do not want to create another page to fetch the contents; I want the DIV to be in the same page. b.) I do not see a property that can make the tooltip DIV to remain open till the user has focus over it. It would be great if someone can suggest a way to achieve that (as it seems it should be that tough -- it's just that I'm not getting it). Another thing to note is I'll be rendering my tabular data using ASP.Net gridview. Thanks.
[jQuery] Re: Attribute selection not working in MSIE; eg $(input[name=name]).val()
mmm.. $(document).ready(function(){ var x = $(input[name=name]).val(); window.alert(x); }); Works for me in IE 7 When you say no results, do you mean, an error?? or just that $(input[name=name]).val() is returning an empty string?? - Original Message - From: V vincenti...@gmail.com To: jQuery (English) jquery-en@googlegroups.com Sent: Friday, August 07, 2009 2:45 AM Subject: [jQuery] Re: Attribute selection not working in MSIE; eg $(input[name=name]).val() Sorry about the lack of information :o The input box is: input type=text name=name value= / The jQuery code is: $(input[name=name]).val(); And no results. The problem exists on MSIE8, but I think to remember it also is in MSIE7.. On firefox it works great.
[jQuery] Re: Checkbox behaviour
I've changed it a little bit, so it doesn't show/hide the div, it's meant to disable the input elements: Can anyone see why ticking it works, but unticking it leaves the input tags disabled still? script type=text/javascript $(document).ready(function(){ $(#show_resolve).click(function () { if ($(#show_resolve).is(:checked)) { $(.submit_problem_form_right).children(:input).attr (disabled, disabled); } if ($(#show_resolve).is(:checked)) { $(.submit.problem_form_right).children(:input).removeAttr (disabled); } }); }); /script Thank you! On Aug 7, 1:43 pm, Jonathan Vanherpe (T T NV) jonat...@tnt.be wrote: You'll have to run the whole function block within $(#show_resolve).click() on load (ie. put it somewhere in $(document).ready(function(){}). Make it a seperate function so you can avoid copy/pasting the whole thing Jonathan Samuurai wrote: Hi, This is my first little foray into JQuery, so far i'm impressed, having had very little JS experience, I was able to create the result I wanted very qucikly and easily! However, I'm having one little niggle... Here's my code: [code] $(document).ready(function(){ $(.submit_problem_form_right).css(visibility,hidden); $(#left_submit).css(visibility,visible); $(#show_resolve).click(function () { if ($(#show_resolve).is(:checked)) { $(.submit_problem_form_right).css(visibility,visible); $(#left_submit).css(visibility,hidden); } else { $(.submit_problem_form_right).css(visibility,hidden); $(#left_submit).css(visibility,visible); } }); }); [/code] This works fine.. ticking the checkbox shows and hides the div. However, if I check the checkbox and refresh the page, the checkbox remains ticked, but the div is hidden. Any ideas how I can make it work reliably? -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be
[jQuery] Re: Checkbox behaviour
Sorry Johnathan, I sent a seperate reply, but it never came through. Thanks for your input.. My question about it was... is it bad practice to have more than one $(document.ready(function(){}) scripts, or can I have multiple? Cheers, Beren On Aug 7, 1:43 pm, Jonathan Vanherpe (T T NV) jonat...@tnt.be wrote: You'll have to run the whole function block within $(#show_resolve).click() on load (ie. put it somewhere in $(document).ready(function(){}). Make it a seperate function so you can avoid copy/pasting the whole thing Jonathan Samuurai wrote: Hi, This is my first little foray into JQuery, so far i'm impressed, having had very little JS experience, I was able to create the result I wanted very qucikly and easily! However, I'm having one little niggle... Here's my code: [code] $(document).ready(function(){ $(.submit_problem_form_right).css(visibility,hidden); $(#left_submit).css(visibility,visible); $(#show_resolve).click(function () { if ($(#show_resolve).is(:checked)) { $(.submit_problem_form_right).css(visibility,visible); $(#left_submit).css(visibility,hidden); } else { $(.submit_problem_form_right).css(visibility,hidden); $(#left_submit).css(visibility,visible); } }); }); [/code] This works fine.. ticking the checkbox shows and hides the div. However, if I check the checkbox and refresh the page, the checkbox remains ticked, but the div is hidden. Any ideas how I can make it work reliably? -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be
[jQuery] Re: Injecting javascript code into page via prepend?
so is this not possible? On Aug 5, 4:21 pm, bwdev blackwater...@gmail.com wrote: I'm trying to retro-fit google ad-manager to an existing site. Currently, we have a div on every page and then have a header file which randomly selects an add and uses jquery.prepend to put the ad in that div. With google, we now have js code we need to use. How can we use prepend to add the js code and have it run? Is that possible?
[jQuery] How to maintain data Yes or No in output...
I've got a MySQL db that contains Yes or No in char datafields. When I use $.ajax to bring that into the DOM and output the data via ' + row[12] + ', for example, the values are converted to true or false when output on the screen. What's the best method of getting Yes or No as the output instead of true or false? Thanks for any suggestions! Rick -- Ninety percent of the politicians give the other ten percent a bad reputation. - Henry Kissinger
[jQuery] help needed retrieving json data with jquery
There is not a single clear example that explains how to pull json data as simple as possible. I have a valid json and I need to retrieve it with jquery my json output is as: { title: blog entries, items : [ { title: Can Members of the Diaspora Work Effectively at th, date: 8/4/2009 9:42:38 AM }, { title: Ashoka Brazil, date: 7/15/2009 8:56:12 AM }, { title: Pozitron/Endeavor, date: 5/26/2009 8:58:39 PM } ] } my codes. $.getJSON(http://www.pangeaadvisors.org/sep123/blog.cs.asp;, { PROCESS: ViewBlog }, function(json) { for (var i = 0; i json.length; i++) { var title = json[i].Title; $('div class=news_title/div').html (title).appendTo('#news_wrap'); } });
[jQuery] Re: jQuery animate marginTop jerky in IE
bump!;) -- View this message in context: http://www.nabble.com/jQuery-animate-marginTop-jerky-in-IE-tp24863683s27240p24868155.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: help needed retrieving json data with jquery
It should be json[i].title as per your json. Thanks Regards, Dhruva Sagar. On Fri, 2009-08-07 at 09:38 -0700, efet wrote: There is not a single clear example that explains how to pull json data as simple as possible. I have a valid json and I need to retrieve it with jquery my json output is as: { title: blog entries, items : [ { title: Can Members of the Diaspora Work Effectively at th, date: 8/4/2009 9:42:38 AM }, { title: Ashoka Brazil, date: 7/15/2009 8:56:12 AM }, { title: Pozitron/Endeavor, date: 5/26/2009 8:58:39 PM } ] } my codes. $.getJSON(http://www.pangeaadvisors.org/sep123/blog.cs.asp;, { PROCESS: ViewBlog }, function(json) { for (var i = 0; i json.length; i++) { var title = json[i].Title; $('div class=news_title/div').html (title).appendTo('#news_wrap'); } }); attachment: draft-paper.png
[jQuery] Re: help needed retrieving json data with jquery
That did not fix. On Aug 7, 12:44 pm, Dhruva Sagar dhruva.sa...@gmail.com wrote: It should be json[i].title as per your json. Thanks Regards, Dhruva Sagar. On Fri, 2009-08-07 at 09:38 -0700, efet wrote: There is not a single clear example that explains how to pull json data as simple as possible. I have a valid json and I need to retrieve it with jquery my json output is as: { title: blog entries, items : [ { title: Can Members of the Diaspora Work Effectively at th, date: 8/4/2009 9:42:38 AM }, { title: Ashoka Brazil, date: 7/15/2009 8:56:12 AM }, { title: Pozitron/Endeavor, date: 5/26/2009 8:58:39 PM } ] } my codes. $.getJSON(http://www.pangeaadvisors.org/sep123/blog.cs.asp;, { PROCESS: ViewBlog }, function(json) { for (var i = 0; i json.length; i++) { var title = json[i].Title; $('div class=news_title/div').html (title).appendTo('#news_wrap'); } }); draft-paper.png 1KViewDownload
[jQuery] Re: help needed retrieving json data with jquery
That did not fix. On Aug 7, 12:44 pm, Dhruva Sagar dhruva.sa...@gmail.com wrote: It should be json[i].title as per your json. Thanks Regards, Dhruva Sagar. On Fri, 2009-08-07 at 09:38 -0700, efet wrote: There is not a single clear example that explains how to pull json data as simple as possible. I have a valid json and I need to retrieve it with jquery my json output is as: { title: blog entries, items : [ { title: Can Members of the Diaspora Work Effectively at th, date: 8/4/2009 9:42:38 AM }, { title: Ashoka Brazil, date: 7/15/2009 8:56:12 AM }, { title: Pozitron/Endeavor, date: 5/26/2009 8:58:39 PM } ] } my codes. $.getJSON(http://www.pangeaadvisors.org/sep123/blog.cs.asp;, { PROCESS: ViewBlog }, function(json) { for (var i = 0; i json.length; i++) { var title = json[i].Title; $('div class=news_title/div').html (title).appendTo('#news_wrap'); } }); draft-paper.png 1KViewDownload
[jQuery] Re: How to maintain data Yes or No in output...
If the values are truly the words Yes and No in the db, then it's probably the library you're using on the server side to prepare the data for returning for the ajax call. Check the output of that. If that's still showing the words, it seems odd that they would transform again on their way to the browser, but maybe just make sure they have quotes around them (again, seems unlikely). - Jack Rick Faircloth wrote: I've got a MySQL db that contains Yes or No in char datafields. When I use $.ajax to bring that into the DOM and output the data via ' + row[12] + ', for example, the values are converted to true or false when output on the screen. What's the best method of getting Yes or No as the output instead of true or false? Thanks for any suggestions! Rick -- /Ninety percent of the politicians give the other ten percent a bad reputation. - Henry Kissinger/
[jQuery] Re: Tablesorter plugin - grouping rows and sorting per group?
Don't be so sure now... I'm still a rookie when it comes to jQuery. After playing with the code a bit, I realized I can't even logically fathom how to go about making this work for multiple tables/classes, thus I've got what you can call a writer's block when it comes to putting it into code - I can't see it visually to start off with... What's funny enough (and a bit frustrating too) is that if I have multiple tables with tablesorter and multiple class assigned to them show up on the page in different tabs (if I plug in the tabbed viewing of sorts), if any of these tables have different number of columns and some of those are defined inline as non-sortable (just added a class {sorter: false} as per instructions in tablesorter docs), that limitation seems to apply to all tables with tablesorter class across the board, and when I try to multi-sort on say column 2 on tables 2 3 (bound together with the code above), if table 1 had sorter:false on that column, table 3 doesn't get sorted on that column either - only the original table 2 does. Something I need to work around, or maybe, possibly declare different classes for each table and apply tablesorter() on them individually... maybe. On Aug 5, 5:18 pm, aquaone aqua...@gmail.com wrote: I'm sure you can look at the code and find a way to get it working in the general case. What's there was just kinda a quick and dirty hack I wrote for another guy a while ago. I'll leave it as an exercise for the reader though. ;-) aquaone On Wed, Aug 5, 2009 at 14:16, Crazy Serb crazys...@gmail.com wrote: A-ha! That's pretty much what I'd need... Now, is there any slick way of repeating that over and over for different tables (with class names of multisort1, multisort2, etc) in case I have a few of these multi-sort tables on the same page and need to keep them separate? Or would I pretty much have to rewrite that logic and change the class name(s) to the new table's class name every time? Just out of curiosity... Thanks again! On Aug 4, 5:02 pm, aquaone aqua...@gmail.com wrote: Tablesorter doesn't support that. You could do it as separate tables with no gaps between them... but that's as close as you'll get. If you need linked sorting, e.g. clicking the header of one table sorts all tables, you'll need something like this: script type='text/javascript' language='JavaScript' $(document).ready( function(){ $(table.tablesorter).tablesorter(); var $multisort = $(table.multisort); $multisort.addClass( multisort_unsorted ); $multisort.bind( sortStart, function(){ $(this).removeClass( multisort_unsorted ); }); $multisort.filter( .multisort_unsorted ).bind( sortEnd, function(){ var sortOrder = [ this.config.sortList ]; // get sort order $multisort.filter( .multisort_unsorted ).removeClass( multisort_unsorted ).trigger( sorton, sortOrder ); setTimeout( function(){ $multisort.addClass( multisort_unsortedd ); }, 0 ); // avoid retriggering }); }); /script /head body table class=tablesorter multisort thead tr thcol 1/th thcol 2/th thcol 3/th /tr /thead tbody tr td1/td td10/td tdbeef/td /tr tr td1/td td6/td tdsausage/td /tr tr td-3/td td12/td tdham/td /tr tr td-3/td td6/td tdbeef/td /tr tr td4/td td7/td tdpork/td /tr tr td4/td td7/td tdbeef/td /tr /tbody /table table class=tablesorter multisort thead tr thcol 1/th thcol 2/th thcol 3/th /tr /thead tbody tr td11/td td4/td tdpork/td /tr tr td12/td td3/td tdham/td /tr tr td10/td td1/td tdsausage/td /tr tr td4/td td7/td tdpork/td /tr /tbody /table table class=tablesorter multisort thead tr thcol 1/th thcol 2/th thcol 3/th /tr /thead tbody tr td7/td td-2/td tdturkey/td /tr tr td4/td td7/td tdpork/td /tr tr td20/td td-10/td tdbeef/td /tr tr td17/td td6/td tdfish/td /tr /tbody /table On Tue, Aug 4, 2009 at 11:57, Crazy Serb crazys...@gmail.com wrote: In using Tablesorter plugin, I have run into an challenging issue. What I am looking to do is group certain rows in a single table into two different groups, have a blank row between them and be able to sort based on columns that apply to both groups of rows but
[jQuery] Re: How to maintain data Yes or No in output...
Thanks for the perspective, Jack. I just used firebug to check the json values being returned in the query (ColdFusion) and, indeed, the data is true and false instead of yes and no. I'll have to work something up server-side. Maybe it's the json formatting that's doing it. I have set ColdFusion to return the data to the calling page in json. Rick From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Jack Killpatrick Sent: Friday, August 07, 2009 1:09 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: How to maintain data Yes or No in output... If the values are truly the words Yes and No in the db, then it's probably the library you're using on the server side to prepare the data for returning for the ajax call. Check the output of that. If that's still showing the words, it seems odd that they would transform again on their way to the browser, but maybe just make sure they have quotes around them (again, seems unlikely). - Jack Rick Faircloth wrote: I've got a MySQL db that contains Yes or No in char datafields. When I use $.ajax to bring that into the DOM and output the data via ' + row[12] + ', for example, the values are converted to true or false when output on the screen. What's the best method of getting Yes or No as the output instead of true or false? Thanks for any suggestions! Rick -- Ninety percent of the politicians give the other ten percent a bad reputation. - Henry Kissinger
[jQuery] Re: Attribute selection not working in MSIE; eg $(input[name=name]).val()
Try it here if it works or not: http://jsbin.com/imadi On Aug 7, 4:57 am, Cesar Sanz the.email.tr...@gmail.com wrote: mmm.. $(document).ready(function(){ var x = $(input[name=name]).val(); window.alert(x); }); Works for me in IE 7 When you say no results, do you mean, an error?? or just that $(input[name=name]).val() is returning an empty string?? - Original Message - From: V vincenti...@gmail.com To: jQuery (English) jquery-en@googlegroups.com Sent: Friday, August 07, 2009 2:45 AM Subject: [jQuery] Re: Attribute selection not working in MSIE; eg $(input[name=name]).val() Sorry about the lack of information :o The input box is: input type=text name=name value= / The jQuery code is: $(input[name=name]).val(); And no results. The problem exists on MSIE8, but I think to remember it also is in MSIE7.. On firefox it works great.
[jQuery] Re: Checkbox behaviour
Hi There Try this [code] $(document).ready(function(){ if ($(#show_resolve).is (:checked)) { $ (.submit_problem_form_right).css(visibility,visible); $(#left_submit).css (visibility,hidden); } $ (.submit_problem_form_right).css(visibility,hidden); $(#left_submit).css (visibility,visible); $(#show_resolve).click (function () { if ($(#show_resolve).is (:checked)) { $ (.submit_problem_form_right).css(visibility,visible); $(#left_submit).css (visibility,hidden); } else { $ (.submit_problem_form_right).css(visibility,hidden); $(#left_submit).css (visibility,visible); } }); }); [/code]
[jQuery] Dropdown menu Issue
So I got a bit of a issue. I have a working dropdown menu animated on hover with slideDown and slideUp. But the problem is if I move off and on the menu quickly it will repeat the slideDown/Up effect. So I thought I would add stop() right before slideDown/Up and that breaks it. It'll work for the first couple times but then it starts cutting the menu off. Its really weird. Does anyone have a suggestion? Here is the code: !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd; html xmlns=http://www.w3.org/1999/xhtml; head titleCSS Dropdown/title script type=text/javascript src=php/jquery.tools.min.js/script style type=text/css /* General */ * { padding: 0; margin: 0; } body { font-family: verdana, arial, sans-serif; font-size: small; background-color: black; } #menu, #menu ul { list-style: none; } #menu {margin:10px;} /* Head links */ #menu li.topnav { width: 150px; float: left; margin-left: -1px; border: 1px black solid; background-color: #e9e9e9; text-align: center; } #menu li.topnav a { display: block; padding: 15px; } /* Child lists and links */ #menu li.topnav ul { display: none; border-top: 1px black solid; text- align: left; } #menu li.topnav:hover ul { display: block; } #menu li.topnav ul li a { padding: 5px; height: 17px; } #menu ul.topnav li a:hover {background-color: #333; } /style script language=JavaScript $(function(){ $('#menu li').hover( function() { $(this).find('ul:first').css({display:none}).slideDown(); }, function(){ $(this).find('ul:first').slideUp('slow'); }); }); /script /head body ul id=menu li class=topnav a href=#Search Engines/a ul lia href=http://google.com/;Google/a/li lia href=http://yahoo.com/;Yahoo/a/li lia href=http://live.com/;Live Search/a/li /ul /li li class=topnav a href=http://shopping.com;Shopping/a ul lia href=http://amazon.com/;Amazon/a/li lia href=http://ebay.com/;eBay/a/li lia href=http://craigslist.com/;CraigsList/a/li /ul /li /ul /body /html
[jQuery] Re: disable column from sorting in tablesorter
great answer: D advise someone better? thx jQuery Lover-2 wrote: You can write a javascript function that will add a row count column and after every table sort action will fire to clean the content of the column and repopulate it with numbers from 1 to 100. You can use tablesort's events: $(table).bind(sortEnd,function() { // write your code here }); Read jQuery HowTo Resource - http://jquery-howto.blogspot.com On Sat, Jan 17, 2009 at 11:09 PM, Rick Pasotto r...@niof.net wrote: On Sat, Jan 17, 2009 at 10:02:01AM -0800, MorningZ wrote: So to clarify, you always want that column to be sequentially 1 to n where n is the number of rows? Yes. and if so, and the sort is descending, would it be n to 1 ? No. the first row should always rank #1. The user can reverse the sort order if he wants to. The user wants to know the rank of some row near the middle of the table without having to manually count the rows. On Jan 17, 12:10 pm, Rick Pasotto r...@niof.net wrote: I have a table in which the first column is the row number (always from 1 at the top to 100 at the bottom) so no matter how the other columns are sorted that first column should be the 'rank' for that particular sort. Is it possible to do this with tablesorter? Could I change the values in the first column after tablesorter did it's work? I see how to disable sorting on the first column but that is not what I want. Could someone suggest another way to achieve what I want? -- Everything that you can imagine is real. -- Pablo Picasso Rick Pasottor...@niof.nethttp://www.niof.net -- Our doctrine is based on private property. Communism is based on systematic plunder, since it consists in handing over to one man, without compensation, the labor of another. If it distributed to each one according to his labor, it would, in fact, recognize private property and would no longer be communism. -- Frédéric Bastiat (1801-1850) Rick Pasottor...@niof.nethttp://www.niof.net -- View this message in context: http://www.nabble.com/disable-column-from-sorting-in-tablesorter-tp21518538s27240p24865981.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Regular Expression validation
I would like to validate a textbox that numbers cannot be entered into the text input, how do i do this??? With regular expression?? nouky
[jQuery] sign preview
I have a client that needs a web tool that will allow users to upload an image and preview that exact image on a sign template. Also, to be able to type text into a field and preview how that text will display on a sign. Similar to zazzle's custom product creation and buildasign. http://www.buildasign.com/PowerDesign.aspx?T=39694C57787463586A774D3Dcid=1430 Does anyone have suggestions on where I should start?
[jQuery] (validate) - validator.addMethod problems
Hi All I am hoping somebody can help me with this. I have two drop down select boxes (Month, Year) which I use to select a credit card expiry date. I want to check if the month and year they select is before the current month and year (to check if credit card has expired). I have created a custom validation method to do this using the jquery validation plugin. The code for the addMethod is below: // add method to validate expiry date $.validator.addMethod(expirydate, function(value, element) { var result = true; var strYear = value; var strMonth = $(#fMonth option:selected).val(); var datNow = new Date(); var intMonth = datNow.getMonth()+1; var intYear = datNow.getFullYear() if(strYear.length==2) { intYear = + intYear strYear = intYear.substring(0,2) + strYear } alert(strYear); if (parseInt(strYear) parseInt(intYear)) { result = false; } if (parseInt(strMonth) parseInt(intMonth)) { result = false; } // return result return this.optional(element) || result==true; }, Card has already expired); Problem is that my jquery does work at all on the page when I add this method. The problem is with the following two lines: if (parseInt(strYear) parseInt(intYear)) { result = false; } if (parseInt(strMonth) parseInt(intMonth)) { result = false; } I cant see anything wrong with this code and cant understand why it does not work. Here is the html code for the select boxes tr td class=formLabelspan class=required*/spanExpiry Date/ td td class=formFieldselect name=fMonth id=fMonth option selected=selected value=Month/option option value=0101/option option value=0202/option option value=0303/option option value=0404/option option value=0505/option option value=0606/option option value=0707/option option value=0808/option option value=0909/option option value=1010/option option value=/option option value=1212/option /select select name=fYear id=fYear option selected=selected value=Year/option option value=092009/option option value=102010/option option value=112011/option /select /td /tr The following code is how I implemented the validation: rules: { fYear: { required: function() { return $(input[name=rbPaymentType]) [0].checked==true; }, expirydate } } If anybody can help I would greatly appreciate it. Thanks mwskuzzy
[jQuery] jquery treeview vertical lines missing
I am trying to use treeview and have a tester page http://sitemaster-internet.co.uk/treeview/tester2.php the html for the directory view is generated dynamically with php building the unordered list from directories on the server, the html passes validation and 'looks' ok, but when the page renders the vertical lines are missing from the treeview. By way of a test I copied the html for my ul and pasted it into the original demo file that came with treeview and got the same result, so it has to be something wrong with my code (as always :-)) The supplied demo works fine. I have stared at this for hours so . . . any suggestions welcome
[jQuery] Re: Regular Expression validation
yes, you can grab the value of the textbox and match it against a regular expression var reg = new RegExp(/[a-zA-Z]/); if(reg.test(string)) { return valid; } else { return not valid; } like that cheers Michael Lawson Development Lead, Global Solutions, ibm.com Phone: 1-276-206-8393 E-mail: mjlaw...@us.ibm.com 'Whether one believes in a religion or not, and whether one believes in rebirth or not, there isn't anyone who doesn't appreciate kindness and compassion..' From: nouky a.noor...@gmail.com To: jQuery (English) jquery-en@googlegroups.com Date: 08/07/2009 02:45 PM Subject:[jQuery] Regular Expression validation I would like to validate a textbox that numbers cannot be entered into the text input, how do i do this??? With regular expression?? nouky inline: graycol.gifinline: ecblank.gif
[jQuery] Re: How to maintain data Yes or No in output...
I do CF dev work, too, but haven't come across this yet, but it made me curious. I googled coldfusion yes no serialize json and it brought up a few articles about this. Sounds like adding a space after yes and no is the workaround some other people used. Ooof. - Jack Rick Faircloth wrote: Thanks for the perspective, Jack. I just used firebug to check the json values being returned in the query (ColdFusion) and, indeed, the data is true and false instead of yes and no. I'll have to work something up server-side. Maybe it's the json formatting that's doing it. I have set ColdFusion to return the data to the calling page in json. Rick *From:* jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] *On Behalf Of *Jack Killpatrick *Sent:* Friday, August 07, 2009 1:09 PM *To:* jquery-en@googlegroups.com *Subject:* [jQuery] Re: How to maintain data Yes or No in output... If the values are truly the words Yes and No in the db, then it's probably the library you're using on the server side to prepare the data for returning for the ajax call. Check the output of that. If that's still showing the words, it seems odd that they would transform again on their way to the browser, but maybe just make sure they have quotes around them (again, seems unlikely). - Jack Rick Faircloth wrote: I've got a MySQL db that contains Yes or No in char datafields. When I use $.ajax to bring that into the DOM and output the data via ' + row[12] + ', for example, the values are converted to true or false when output on the screen. What's the best method of getting Yes or No as the output instead of true or false? Thanks for any suggestions! Rick -- /Ninety percent of the politicians give the other ten percent a bad reputation. - Henry Kissinger/
[jQuery] Re: How to maintain data Yes or No in output...
Ug.hate having to manipulate data like that. This sounds like the solution I may have to use for another problem, which is that javascript strips off any leading zeros from data. I have passwords that lead with a 0, so I've got to do something about that. Over on the cf-talk list, it was suggested that I use the YesNoFormat function, but can't since I'm outputting the data using javascript. Is there no js formatting option available? I googled for a solution before posting, but couldn't find anything very helpful. didn't good for your words, however. Seems like the js language would have a solution for this on the output side. Rick From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Jack Killpatrick Sent: Friday, August 07, 2009 2:55 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: How to maintain data Yes or No in output... I do CF dev work, too, but haven't come across this yet, but it made me curious. I googled coldfusion yes no serialize json and it brought up a few articles about this. Sounds like adding a space after yes and no is the workaround some other people used. Ooof. - Jack Rick Faircloth wrote: Thanks for the perspective, Jack. I just used firebug to check the json values being returned in the query (ColdFusion) and, indeed, the data is true and false instead of yes and no. I'll have to work something up server-side. Maybe it's the json formatting that's doing it. I have set ColdFusion to return the data to the calling page in json. Rick From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Jack Killpatrick Sent: Friday, August 07, 2009 1:09 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: How to maintain data Yes or No in output... If the values are truly the words Yes and No in the db, then it's probably the library you're using on the server side to prepare the data for returning for the ajax call. Check the output of that. If that's still showing the words, it seems odd that they would transform again on their way to the browser, but maybe just make sure they have quotes around them (again, seems unlikely). - Jack Rick Faircloth wrote: I've got a MySQL db that contains Yes or No in char datafields. When I use $.ajax to bring that into the DOM and output the data via ' + row[12] + ', for example, the values are converted to true or false when output on the screen. What's the best method of getting Yes or No as the output instead of true or false? Thanks for any suggestions! Rick -- Ninety percent of the politicians give the other ten percent a bad reputation. - Henry Kissinger
[jQuery] Re: Make event happen after a certain amount of time has passed.
That's a pretty neat plugin. Thanks Cesar. On Fri, Aug 7, 2009 at 10:48 AM, Cesar Sanz the.email.tr...@gmail.comwrote: check this out http://plugins.jquery.com/project/timers - Original Message - From: James james.gp@gmail.com To: jQuery (English) jquery-en@googlegroups.com Sent: Thursday, August 06, 2009 4:19 PM Subject: [jQuery] Re: Make event happen after a certain amount of time has passed. Then you can do something like this: Have a setTimeout (say, executes in 20 seconds) with a callback function, say moveToLocation. Then you need a way to find out whether the div has been scrolled to the certain location or not. That can be done by checking either for the user's top/left coordinate of their screen, or you can set a variable when the user clicks on that button. After the 20 seconds comes by and the moveToLocation function is called, it checks for that location (or some variable you set). If it's true (meaning, the user has scrolled to the certain location), then do nothing. Otherwise, do the auto-scroll. The idea is that the moveToLocation is called no matter what. It's just that whether you do the actual action or not depends on the state of things. On Aug 6, 12:09 pm, Simon Vansintjan svansint...@gmail.com wrote: Well, it's pretty theoretical at the moment, so there's no code down, but the idea would be that a div appears, and that the user can click on a button that would scroll the div to a certain location. However, if the user doesn't click, I would still want the div to move to that location (in case he/she doesn't get it that it would move, dunno). On Thu, Aug 6, 2009 at 6:03 PM, James james.gp@gmail.com wrote: Use the setTimeout/setInterval functions with some kind of global counter. If some kind of action/event occurs, the counter would be refreshed and the function would not execute. Would you like to specify in more detail what you would like to achieve? On Aug 6, 11:43 am, Simon svansint...@gmail.com wrote: Hey, After a user hasn't triggered an event for a given amount of purple, would it be possible to trigger that event anyway? I have no idea how to even start looking for this. Thanks for any hints/ideas/whatever you can throw my way. Simon -- simon.vansintjan.org -- simon.vansintjan.org
[jQuery] Re: How to maintain data Yes or No in output...
Just, fyi, Jack and anyone else. The solution was to put an inline condition into the code: .spanRight' + (row[18] ? 'Yes' : 'No') + '/span. Works great! Rick From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Jack Killpatrick Sent: Friday, August 07, 2009 2:55 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: How to maintain data Yes or No in output... I do CF dev work, too, but haven't come across this yet, but it made me curious. I googled coldfusion yes no serialize json and it brought up a few articles about this. Sounds like adding a space after yes and no is the workaround some other people used. Ooof. - Jack Rick Faircloth wrote: Thanks for the perspective, Jack. I just used firebug to check the json values being returned in the query (ColdFusion) and, indeed, the data is true and false instead of yes and no. I'll have to work something up server-side. Maybe it's the json formatting that's doing it. I have set ColdFusion to return the data to the calling page in json. Rick From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Jack Killpatrick Sent: Friday, August 07, 2009 1:09 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: How to maintain data Yes or No in output... If the values are truly the words Yes and No in the db, then it's probably the library you're using on the server side to prepare the data for returning for the ajax call. Check the output of that. If that's still showing the words, it seems odd that they would transform again on their way to the browser, but maybe just make sure they have quotes around them (again, seems unlikely). - Jack Rick Faircloth wrote: I've got a MySQL db that contains Yes or No in char datafields. When I use $.ajax to bring that into the DOM and output the data via ' + row[12] + ', for example, the values are converted to true or false when output on the screen. What's the best method of getting Yes or No as the output instead of true or false? Thanks for any suggestions! Rick -- Ninety percent of the politicians give the other ten percent a bad reputation. - Henry Kissinger
[jQuery] Re: Bug? -- toggle() of TR broke in IE8
Here: http://dev.jquery.com/ticket/4753, and Here: http://dev.jquery.com/ticket/4960 some users send this bug on bug tracker. The example are almost the same of this situation. On 5 Ago, 17:02, Liam Potter radioactiv...@gmail.com wrote: Sorry about the hostility, was having a pretty stressful day and I didn't really look into the problem too much, so my apologies for that. Now that I've had a better look, it actually does look like a bug. If you enter a value to the toggle, IE8 will do something with the TR, but it ends up hiding at the end. You may want to post a bug reporthttp://dev.jquery.com/report/ Fontzter wrote: Liam, Thanks for your input, we all know how irritating IE can be. However, there are a few things about this that puzzle me: * It works in IE6, IE7, FF, Chrome and Opera * It works with jQuery 1.2.6 * You can call show() and hide() on the TRs and it works in IE8 (see http://jsbin.com/ifiqa/edit) For these reasons, I did not think it was inappropriate to ask (I did use a question mark in the subject) if this was a possible bug. Thanks, Dave On Aug 4, 11:18 am, Liam Potter radioactiv...@gmail.com wrote: It's down to the way IE handles tables, nothing to do with a jquery bug (people are so quick to shout out that word). Boiled down, you can't do a lot of things to tr's in IE, and display none is one of the things you can't change. - Liam Fontzter wrote: bump? Can anyone confirm this? On Jul 29, 9:52 am, Fontzter dmfo...@gmail.com wrote: I put together a simple case to demonstrate this:http://jsbin.com/ijini This works in other browsers but not IE8. Thanks, Dave
[jQuery] count checkboxes selected
I have a script where a user can select any 10 out of 20 CD's. I am using the jQuery Field Plug-in to limit the users selections to 10. My question is, how can I display the number of checkboxes selected, and remaining? I want to say: You have 3 CD's selected. You have 7 selections left. Here is a live example: http://psylicyde.com/misc/checkbox/ -- View this message in context: http://www.nabble.com/count-checkboxes-selected-tp24871849s27240p24871849.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: count checkboxes selected
Suppose all your checkbox has the class myCheckbox: var numSelected = $(input.myCheckbox:checked).length; alert(numSelected); You can use simple math to get how many are remaining. On Aug 7, 10:53 am, ripcurlksm kevin.mccorm...@cox.net wrote: I have a script where a user can select any 10 out of 20 CD's. I am using the jQuery Field Plug-in to limit the users selections to 10. My question is, how can I display the number of checkboxes selected, and remaining? I want to say: You have 3 CD's selected. You have 7 selections left. Here is a live example:http://psylicyde.com/misc/checkbox/ -- View this message in context:http://www.nabble.com/count-checkboxes-selected-tp24871849s27240p2487... Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: Bug? -- toggle() of TR broke in IE8
These are a duplicate of http://dev.jquery.com/ticket/4512 which has been fixed. --John On Fri, Aug 7, 2009 at 4:53 PM, Mondo Libero i...@vincenzoferme.it wrote: Here: http://dev.jquery.com/ticket/4753, and Here: http://dev.jquery.com/ticket/4960 some users send this bug on bug tracker. The example are almost the same of this situation. On 5 Ago, 17:02, Liam Potter radioactiv...@gmail.com wrote: Sorry about the hostility, was having a pretty stressful day and I didn't really look into the problem too much, so my apologies for that. Now that I've had a better look, it actually does look like a bug. If you enter a value to the toggle, IE8 will do something with the TR, but it ends up hiding at the end. You may want to post a bug reporthttp://dev.jquery.com/report/ Fontzter wrote: Liam, Thanks for your input, we all know how irritating IE can be. However, there are a few things about this that puzzle me: * It works in IE6, IE7, FF, Chrome and Opera * It works with jQuery 1.2.6 * You can call show() and hide() on the TRs and it works in IE8 (see http://jsbin.com/ifiqa/edit) For these reasons, I did not think it was inappropriate to ask (I did use a question mark in the subject) if this was a possible bug. Thanks, Dave On Aug 4, 11:18 am, Liam Potter radioactiv...@gmail.com wrote: It's down to the way IE handles tables, nothing to do with a jquery bug (people are so quick to shout out that word). Boiled down, you can't do a lot of things to tr's in IE, and display none is one of the things you can't change. - Liam Fontzter wrote: bump? Can anyone confirm this? On Jul 29, 9:52 am, Fontzter dmfo...@gmail.com wrote: I put together a simple case to demonstrate this: http://jsbin.com/ijini This works in other browsers but not IE8. Thanks, Dave
[jQuery] Re: How to maintain data Yes or No in output...
Nice workaround, for some reason I thought you didn't have control over the js side or something weird. Cool. Sure would be nice to know that CF isn't altering data, eh? FWIW, I've been using the ajaxCFC module for a long time (to serialize CF objects into JSON) and haven't run up against the same issue, but I'm not sure if I've had Yes/No data to deal with. - Jack Rick Faircloth wrote: Just, fyi, Jack and anyone else... The solution was to put an inline condition into the code: ...spanRight' + (row[18] ? 'Yes' : 'No') + '/span... Works great! Rick *From:* jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] *On Behalf Of *Jack Killpatrick *Sent:* Friday, August 07, 2009 2:55 PM *To:* jquery-en@googlegroups.com *Subject:* [jQuery] Re: How to maintain data Yes or No in output... I do CF dev work, too, but haven't come across this yet, but it made me curious. I googled coldfusion yes no serialize json and it brought up a few articles about this. Sounds like adding a space after yes and no is the workaround some other people used. Ooof. - Jack Rick Faircloth wrote: Thanks for the perspective, Jack. I just used firebug to check the json values being returned in the query (ColdFusion) and, indeed, the data is true and false instead of yes and no. I'll have to work something up server-side. Maybe it's the json formatting that's doing it. I have set ColdFusion to return the data to the calling page in json. Rick *From:* jquery-en@googlegroups.com mailto:jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] *On Behalf Of *Jack Killpatrick *Sent:* Friday, August 07, 2009 1:09 PM *To:* jquery-en@googlegroups.com mailto:jquery-en@googlegroups.com *Subject:* [jQuery] Re: How to maintain data Yes or No in output... If the values are truly the words Yes and No in the db, then it's probably the library you're using on the server side to prepare the data for returning for the ajax call. Check the output of that. If that's still showing the words, it seems odd that they would transform again on their way to the browser, but maybe just make sure they have quotes around them (again, seems unlikely). - Jack Rick Faircloth wrote: I've got a MySQL db that contains Yes or No in char datafields. When I use $.ajax to bring that into the DOM and output the data via ' + row[12] + ', for example, the values are converted to true or false when output on the screen. What's the best method of getting Yes or No as the output instead of true or false? Thanks for any suggestions! Rick -- /Ninety percent of the politicians give the other ten percent a bad reputation. - Henry Kissinger/
[jQuery] Re: count checkboxes selected
I dont want to use an alert, I want to use ajax or some method to show how many checkboxes are selected in REAL TIME. So when you select one checkbox it says on the page: You have 1 CD's selected. You have 9 selections left. When you select a second checkbox it says on the page: You have 2 CD's selected. You have 8 selections left. -- View this message in context: http://www.nabble.com/count-checkboxes-selected-tp24871849s27240p24872358.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: count checkboxes selected
It was an example to show you how to get the number of selected checkbox... If you want to integrate it with events, then you might want to do something like: $(input.myCheckbox).click(function() { var numSelected = $(input.myCheckbox:checked).length; var numLeft = 10 - parseInt(numSelected); $(#statusBox).html(You have +numSelected+ CD's selected.brYou have +numLeft+ selections left.); }); On Aug 7, 11:34 am, ripcurlksm kevin.mccorm...@cox.net wrote: I dont want to use an alert, I want to use ajax or some method to show how many checkboxes are selected in REAL TIME. So when you select one checkbox it says on the page: You have 1 CD's selected. You have 9 selections left. When you select a second checkbox it says on the page: You have 2 CD's selected. You have 8 selections left. -- View this message in context:http://www.nabble.com/count-checkboxes-selected-tp24871849s27240p2487... Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: count checkboxes selected
Thanks James, that was really helpful -- I've placed the code, but I can not get it to populate the div. Did I place it in the correct area? http://psylicyde.com/misc/checkbox -- View this message in context: http://www.nabble.com/count-checkboxes-selected-tp24871849s27240p24872962.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: count checkboxes selected
Usually checkboxes should have different names for its attributes, and add class=chkLimit. input.chkLimit means an input element with class chkLimit Otherwise, for your code, you can try to use: input[id^=chkLimit_] if you want. This means all inputs with id that begins with chkLimit_. On Aug 7, 12:36 pm, ripcurlksm kevin.mccorm...@cox.net wrote: Thanks James, that was really helpful -- I've placed the code, but I can not get it to populate the div. Did I place it in the correct area? http://psylicyde.com/misc/checkbox -- View this message in context:http://www.nabble.com/count-checkboxes-selected-tp24871849s27240p2487... Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: disable column from sorting in tablesorter
I'm not sure if this helps, but you can configure tablesorter on a per column basis http://tablesorter.com/docs/example-options-headers.html On Aug 7, 12:38 pm, gord007 josef@gmail.com wrote: great answer :D advise someone better? thx jQuery Lover-2 wrote: You can write a javascript function that will add a row count column and after every table sort action will fire to clean the content of the column and repopulate it with numbers from 1 to 100. You can use tablesort's events: $(table).bind(sortEnd,function() { // write your code here }); Read jQuery HowTo Resource - http://jquery-howto.blogspot.com On Sat, Jan 17, 2009 at 11:09 PM, Rick Pasotto r...@niof.net wrote: On Sat, Jan 17, 2009 at 10:02:01AM -0800, MorningZ wrote: So to clarify, you always want that column to be sequentially 1 to n where n is the number of rows? Yes. and if so, and the sort is descending, would it be n to 1 ? No. the first row should always rank #1. The user can reverse the sort order if he wants to. The user wants to know the rank of some row near the middle of the table without having to manually count the rows. On Jan 17, 12:10 pm, Rick Pasotto r...@niof.net wrote: I have a table in which the first column is the row number (always from 1 at the top to 100 at the bottom) so no matter how the other columns are sorted that first column should be the 'rank' for that particular sort. Is it possible to do this with tablesorter? Could I change the values in the first column after tablesorter did it's work? I see how to disable sorting on the first column but that is not what I want. Could someone suggest another way to achieve what I want? -- Everything that you can imagine is real. -- Pablo Picasso Rick Pasotto r...@niof.net http://www.niof.net -- Our doctrine is based on private property. Communism is based on systematic plunder, since it consists in handing over to one man, without compensation, the labor of another. If it distributed to each one according to his labor, it would, in fact, recognize private property and would no longer be communism. -- Frédéric Bastiat (1801-1850) Rick Pasotto r...@niof.net http://www.niof.net -- View this message in context:http://www.nabble.com/disable-column-from-sorting-in-tablesorter-tp21... Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: disable column from sorting in tablesorter
apologies, I see now that it isn't exactly what you're looking for On Aug 7, 7:18 pm, amuhlou amysch...@gmail.com wrote: I'm not sure if this helps, but you can configure tablesorter on a per column basis http://tablesorter.com/docs/example-options-headers.html On Aug 7, 12:38 pm, gord007 josef@gmail.com wrote: great answer :D advise someone better? thx jQuery Lover-2 wrote: You can write a javascript function that will add a row count column and after every table sort action will fire to clean the content of the column and repopulate it with numbers from 1 to 100. You can use tablesort's events: $(table).bind(sortEnd,function() { // write your code here }); Read jQuery HowTo Resource - http://jquery-howto.blogspot.com On Sat, Jan 17, 2009 at 11:09 PM, Rick Pasotto r...@niof.net wrote: On Sat, Jan 17, 2009 at 10:02:01AM -0800, MorningZ wrote: So to clarify, you always want that column to be sequentially 1 to n where n is the number of rows? Yes. and if so, and the sort is descending, would it be n to 1 ? No. the first row should always rank #1. The user can reverse the sort order if he wants to. The user wants to know the rank of some row near the middle of the table without having to manually count the rows. On Jan 17, 12:10 pm, Rick Pasotto r...@niof.net wrote: I have a table in which the first column is the row number (always from 1 at the top to 100 at the bottom) so no matter how the other columns are sorted that first column should be the 'rank' for that particular sort. Is it possible to do this with tablesorter? Could I change the values in the first column after tablesorter did it's work? I see how to disable sorting on the first column but that is not what I want. Could someone suggest another way to achieve what I want? -- Everything that you can imagine is real. -- Pablo Picasso Rick Pasotto r...@niof.net http://www.niof.net -- Our doctrine is based on private property. Communism is based on systematic plunder, since it consists in handing over to one man, without compensation, the labor of another. If it distributed to each one according to his labor, it would, in fact, recognize private property and would no longer be communism. -- Frédéric Bastiat (1801-1850) Rick Pasotto r...@niof.net http://www.niof.net -- View this message in context:http://www.nabble.com/disable-column-from-sorting-in-tablesorter-tp21... Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: jQuery Superfish Joomla issue for IE6
not sure what this part of your code is but IE 6 throwing errors on it. Try removing it temporarily and see what happens window.addEvent((window.webkit) ? 'load' : 'domready', function() { window.rokajaxsearch = new RokAjaxSearch({ j_samm...@comcast.net wrote: Hi! Oddly enough, I have no problems with my IE7 version of my superfish menu is Joomla, but in IE6 it does not work properly. It does work, thank God, but not like in the other browsers. Two things occur. 1) The menu is not resized all the way over to the width of the screen. 2) The buttons do not work for the entire span, but only work when you rollover the actual link. This does not behave this way in IE7 or 8. Does anyone have any idea how to fix this? Here is my site: http://www.looledo.com Try it in IE6 and IE8 and you will see what I am referring to.
[jQuery] Re: Checkbox behaviour
You can have as many document ready checks as you want. I'd like to keep things organized by only having one though. As for the checkbox being selected by default when the page loads, you can do either of two things: 1) run the function on page load that checks for the checkbox and do any changes 2) or run a code to that unchecks the checkbox on page load so that it's always unchecked on page load. On Aug 7, 5:18 am, Samuurai djbe...@gmail.com wrote: Sorry Johnathan, I sent a seperate reply, but it never came through. Thanks for your input.. My question about it was... is it bad practice to have more than one $(document.ready(function(){}) scripts, or can I have multiple? Cheers, Beren On Aug 7, 1:43 pm, Jonathan Vanherpe (T T NV) jonat...@tnt.be wrote: You'll have to run the whole function block within $(#show_resolve).click() on load (ie. put it somewhere in $(document).ready(function(){}). Make it a seperate function so you can avoid copy/pasting the whole thing Jonathan Samuurai wrote: Hi, This is my first little foray into JQuery, so far i'm impressed, having had very little JS experience, I was able to create the result I wanted very qucikly and easily! However, I'm having one little niggle... Here's my code: [code] $(document).ready(function(){ $(.submit_problem_form_right).css(visibility,hidden); $(#left_submit).css(visibility,visible); $(#show_resolve).click(function () { if ($(#show_resolve).is(:checked)) { $(.submit_problem_form_right).css(visibility,visible); $(#left_submit).css(visibility,hidden); } else { $(.submit_problem_form_right).css(visibility,hidden); $(#left_submit).css(visibility,visible); } }); }); [/code] This works fine.. ticking the checkbox shows and hides the div. However, if I check the checkbox and refresh the page, the checkbox remains ticked, but the div is hidden. Any ideas how I can make it work reliably? -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be
[jQuery] Re: Jquery Animate Issue
the problem with your setup is you keep adding click handlers on top of click handlers every time a click is made 10 round trips in and out and you add 20 new click handlers to the same elements Mr Withers wrote: Hi Guys Iam having an issue with the JQuery animate function. Iam not sure if its because iam potentially mis-using the animate function or if its a genuine issue so I thought I would seek some adivce here before looking into it any further :-). I have posted up an example of the bug on Jsbin with the following URL: http://jsbin.com/iquzo There is an expand arrow on the left hand side that when clicked will make the left panel slide out. The arrow then turns the other way so you can click and slide back in. After 10 slide out , slide in's - the animation really starts to slow and there is a logarithmic delay in it sliding in and sliding out which is bizarre. Iam using IE7.0.5730.13 , and one of my colleagues has noticed the same behaviour in Firefox 3.0 and IE8. I cant see anything obivous happing like a JS error or bad CSS on my part so iam thinking it might be an issue with the animate function. Can anyone shed anylight on this issue for me? Thanks in advance Mike
[jQuery] Sortables and helper appending
Does anyone know how I can make the draggable helper the last container in my sortables? I've been messing with the appendTo option, but I haven't a clue how to get it to work. thx
[jQuery] jquery(VALIDATE)
I need a way to debug what is being returned when I use the REMOTE option. I cant get the validation to give me an error class when a duplicate is found. here is my lookup.php which works perfectly fine when I use jquery $get to call it. Lookup.php ? $noheaders = true; //prevents config.php from loading any header data such a scripts and styles. include(config.php); $table = $_GET[table]; $key = $_REQUEST[key]; $value = $_REQUEST[value]; $failmsg = (isset($_GET[failmsg]) ? $_GET[failmsg] : $value.: Not Found in TABLE: .$table. for KEY: .$key); $foundmsg = (isset($_GET[foundmsg]) ? $_GET[foundmsg] : $value.: Found in TABLE: .$table. for KEY: .$key); $sql=SELECT * FROM $table WHERE $key='$value' ; $result=mysql_query($sql); if (mysql_num_rows($result) 0) { echo $foundmsg; } else {echo $failmsg; }; ? Here are my rules: var validator = $(#myform).validate({ rules: { username: { required: true, minlength: 4, type: GET, remote: lookup.php?table=membersfailmsg=truefoundmsg=false }, password: { required: true, minlength: 5 }, email: { required: true, email: true, type: GET, remote: lookup.php?table=membersfailmsg=truefoundmsg=false } }, messages: { Thanks, Mike
[jQuery] Re: jQuery conflicts
yes, with a disclaimer as to what you mean by "libraries". jQuery itself is often referred to as a library. You won't need to change anything inside jQuery.js or plugins, only functions that you generate in script tags "$" is an alias for "jQuery" but is also used by other "libraries" such as Mootools, thus the noConflict use end result, change out all those wierd noConflict variable names to "jQuery(" yourSelector).. " bencharity wrote: Thanks for the reply Charlie! I'm reading up on the NoConflict but am a little confused (this is all still quite new to me). It says "By using this function, you will only be able to access jQuery using the 'jQuery' variable. For example, where you used to do $ ("div p"), you now must do jQuery("div p")." Does this mean I call it after my first jQuery instance and then have to change every $ to jQuery in my subsequent libraries??? On Aug 5, 12:56pm, Charlie charlie...@gmail.com wrote: you only need to call jQueryNoConflict once for the page after that any jQuery functions would start with jQuery('selector' Try removing all the noconflict variables bencharity wrote:I would like to use several jQuery effects through a website that I am developing; a login popup, a drop down contact form, coda content scroller, and tabbed content. However, these implementations keep interfering with each other. Is there any way to get around this? I seems as though there must be a way to use multiple jQuery functions. The page is here:http://atlanta.scadswap.com/points-of-interest/clubs/opera/Implementing the Login Popup (which doesn't have a login form inside it yet) broke the contact drop down, and it stays revealed now. The tabbed content in the sidebar seems fine though. Something already broke my coda jQuery content scroller here:http://atlanta.scadswap.com/points-of-interest/Thank you in advance for your time!
[jQuery] Re: Dropdown menu Issue
worked fine for me in IE7 and FF3 Xenongasman wrote: So I got a bit of a issue. I have a working dropdown menu animated on hover with slideDown and slideUp. But the problem is if I move off and on the menu quickly it will repeat the slideDown/Up effect. So I thought I would add stop() right before slideDown/Up and that breaks it. It'll work for the first couple times but then it starts cutting the menu off. Its really weird. Does anyone have a suggestion? Here is the code: !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" html xmlns="http://www.w3.org/1999/xhtml" head titleCSS Dropdown/title script type="text/_javascript_" src=""/script style type="text/css" /* General */ * { padding: 0; margin: 0; } body { font-family: verdana, arial, sans-serif; font-size: small; background-color: black; } #menu, #menu ul { list-style: none; } #menu {margin:10px;} /* Head links */ #menu li.topnav { width: 150px; float: left; margin-left: -1px; border: 1px black solid; background-color: #e9e9e9; text-align: center; } #menu li.topnav a { display: block; padding: 15px; } /* Child lists and links */ #menu li.topnav ul { display: none; border-top: 1px black solid; text- align: left; } #menu li.topnav:hover ul { display: block; } #menu li.topnav ul li a { padding: 5px; height: 17px; } #menu ul.topnav li a:hover {background-color: #333; } /style script language="_javascript_" $(function(){ $('#menu li').hover( function() { $(this).find('ul:first').css({display:"none"}).slideDown(); }, function(){ $(this).find('ul:first').slideUp('slow'); }); }); /script /head body ul id="menu" li class="topnav" a href=""Search Engines/a ul lia href="" class="moz-txt-link-rfc2396E" href="http://google.com/">"http://google.com/"Google/a/li lia href="" class="moz-txt-link-rfc2396E" href="http://yahoo.com/">"http://yahoo.com/"Yahoo/a/li lia href="" class="moz-txt-link-rfc2396E" href="http://live.com/">"http://live.com/"Live Search/a/li /ul /li li class="topnav" a href="" class="moz-txt-link-rfc2396E" href="http://shopping.com">"http://shopping.com"Shopping/a ul lia href="" class="moz-txt-link-rfc2396E" href="http://amazon.com/">"http://amazon.com/"Amazon/a/li lia href="" class="moz-txt-link-rfc2396E" href="http://ebay.com/">"http://ebay.com/"eBay/a/li lia href="" class="moz-txt-link-rfc2396E" href="http://craigslist.com/">"http://craigslist.com/"CraigsList/a/li /ul /li /ul /body /html
[jQuery] Re: jquery(VALIDATE)
Well, to look at the actual AJAX response, you can use Firebug for Firefox to see it. You're suppose to have your remote page return true if it's good and false if it's not okay. Looking at your code, both username and email validation checks have the same url and data. Ideally, you're suppose to pass the inputted username and email data to that URL for your remote script to check your database again those values, and return true or false. On Aug 7, 3:12 pm, Miket3 miketro...@gmail.com wrote: I need a way to debug what is being returned when I use the REMOTE option. I cant get the validation to give me an error class when a duplicate is found. here is my lookup.php which works perfectly fine when I use jquery $get to call it. Lookup.php ? $noheaders = true; //prevents config.php from loading any header data such a scripts and styles. include(config.php); $table = $_GET[table]; $key = $_REQUEST[key]; $value = $_REQUEST[value]; $failmsg = (isset($_GET[failmsg]) ? $_GET[failmsg] : $value.: Not Found in TABLE: .$table. for KEY: .$key); $foundmsg = (isset($_GET[foundmsg]) ? $_GET[foundmsg] : $value.: Found in TABLE: .$table. for KEY: .$key); $sql=SELECT * FROM $table WHERE $key='$value' ; $result=mysql_query($sql); if (mysql_num_rows($result) 0) { echo $foundmsg;} else {echo $failmsg; }; ? Here are my rules: var validator = $(#myform).validate({ rules: { username: { required: true, minlength: 4, type: GET, remote: lookup.php?table=membersfailmsg=truefoundmsg=false }, password: { required: true, minlength: 5 }, email: { required: true, email: true, type: GET, remote: lookup.php?table=membersfailmsg=truefoundmsg=false } }, messages: { Thanks, Mike