[jQuery] Re: How can I make searching not case-sensitive?
var xx=$(form#form1 *).fieldValue()[0].toLowerCase(); sorry :p
[jQuery] Re: Port FCK/TinyMCE to jQuery
Thanks for pointing that out. But what I'm more concerned with is the fact you're downloading TinyMCE, PLUS jQuery, PLUS the plugin so it's lot of stuff being downloaded, and much of the code you actually have downloaded is just duplicated effort. Both jQuery and MCE implement DOM selectors, iterators and manipulators, both implement an XHR wrapper, both implement event models, etc. What I was wondering has anybody taken the MCE code, cut its DOM, XHR, etc out and wired the jQuery ones in in their place? That'd eliminate duplication of effort between the two, and result in a smaller download size. On Feb 20, 5:27 pm, tlphipps [EMAIL PROTECTED] wrote: Regarding using jquery to 'attach' the editor, there is a plugin that I believe does just that:http://groups.google.com/group/jquery-en/browse_thread/thread/d33630d... On Feb 20, 10:33 am, Gordon [EMAIL PROTECTED] wrote: I've been using TinyMCE to build a CMS that's also being built around jQuery for other functionality, and I got to thinking, a lot of the TinyMCE code is simply replicating functionality that's already in jQuery (DOM selectors. XHR, etc), so has anybody tried to remove this stuff from the MCE codebase and use the jQuery implementations instead? Additionally, how about using jQuery functionality to attach editors to controls? For example $('textarea').tinyMCE () to attach editors to all elements, or $('#myEditor').tinyMCE to replace just a specific instance. You could use any CSS rule you wanted to determine where an editor should be created in theory. And how about using jQuery UI to implement MCE's inline popup windows? I do know there's WYM, which is built on jQuery, but that's very early on in its development and also appears to have stalled.
[jQuery] Re: Calling WCF services using jquery?
No takers, eh? Anyone using WCF with jquery without asp.net ScriptManager? TIA, Jack Jack Killpatrick wrote: Hi All, I'm wondering if anyone can advise me or steer me to some useful links... I'm doing some research about MS WCF 3.5 web services and how it can be used for json-based web services. All of the examples I'm finding use the asp.net ScriptManager tag on a server side page so that a js proxy for the web service methods gets created on page load. I don't want to use asp.net for page generation. I'm looking for an example of how to use jquery in a non-asp.net rendered page to make calls to the WCF 3.5 web services. IE, I want my client side code to be server agnostic: it could be plain HTML, or an AIR app, etcnot an asp.net app, not a page rendered by asp.net. I think I'm basically looking for a way around having to rely on the asp.net ScriptManager to generate the js proxy: I just want to call the services via jquery ajax calls, without having to rely on what the proxy would generate for me. Hope this makes sense to someone ;-) Any advice or links is welcome. BTW, this is research particularly for using WCF 3.5, so no need to recommend other backend WS technologies (unless maybe they are alternate WS engines that have a minimal C# learning curve and are not heavily bound internally to XML documents, like Dream is). Thanks, Jack
[jQuery] Re: is there a secret to jQuery with Opera?
What timothyjoe said is right, why don't you join the jpg-# ? The hash (#...) you add to the url is to avoid caching ? if so, you should use a search (?...) instead. That code is for images-off detection right ? What about this: $('img /') .load(function(){ $('#noimages').attr(href, '/styles/gotimages.css'); }) .error(function(){ $('#noimages').attr(href, '/styles/imagefree.css'); }) .attr('href','/images/bgimage.jpg'); I hope it was indeed helpful. Cheers Ariel Flesler On Feb 21, 1:01 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Glad I'm not the only one :) My code - and it *is* a fudge - uses a pretend variable, written into a bit of hidden html. I doesn't work properly with a real variable (in Opera, neither!) and I'm still looking for an un-fudged solution. Here it is: jQuery.imagesOn = function(){ $('img src=' + '/images/bgimage.jpg' + '#' + Math.random() + '/' ).load(function() { $('#noimages').attr(href, '/styles/gotimages.css'); $('.imagecheck').html('On'); }); if ( $('.imagecheck').val() != 'On' ) { $('#noimages').attr(href, '/styles/imagefree.css'); } } So - well, any comment must be a helpful comment ;) Cheers, Cherry On Feb 21, 3:00 am, timothytoe [EMAIL PROTECTED] wrote: Yeah, the first Windows version didn't seem able to run for 5 minutes without crashing violently. I hated it. The JavaScript has gotten so fast in that browser that a nasty bit of statistics code I run takes 35 seconds on Firefox and 20 seconds in Safari, so I've really started to like Safari. :-) As for Opera, I'm having my own problems with it. It's the only browser my code isn't running on right now, and I haven't had time to figure out why. For me, it's not really Opera's fault. After all, IE causes me the most trouble by far, but I try it every couple days to make sure it's still working. Explain to me what you're doing. Doesn't Math.Random() give you a number from 0 to 1? Is that really your code? Do you really have a # in there? If so, why isn't it part of the previous string? On Feb 20, 6:22 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Aha! My good reason(s) were that an earlier beta repeatedly crashed my machine, and I'm fed up with Apple's creeping-startup-takeover strategy. But the current Safari version installed without a hitch; I guess I'll have to either live with the startups, or spend some time killing them ;) Thanks for the heads-up TT! The page looks the same in Safari as in Firefox ie (phew!). So what's up with Opera? On Feb 21, 1:54 am, timothytoe [EMAIL PROTECTED] wrote: Safari for Windows is a pretty good browser now, especially if you want to have a good idea whether you'll run on Mac Safari (and iPhone). Is there a reason you're not testing with it as well? On Feb 20, 3:45 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Admittedly, the function in question is my own home-fudged one. It depends on: $('img src=' + '/images/thelogo.png' + '#' + Math.random() + '/ ' ).load(function() { Firefox and IE (hurrah) behave as required. Opera doesn't register the changed 'variable' (an .html() function), but loads the no-images stylesheet anyway. Do you understand why this might be? As I haven't got a Mac, I tend to trust that Opera will be at least as demanding as Safari. The thought of all Mac and Opera users getting the image-free version by default scares me to death! I haven't found any relevant documentation. I know this group houses some really hot browser experts - so am pleading for insight advice ... Cherry :/- Hide quoted text - - Show quoted text -
[jQuery] Re: Port FCK/TinyMCE to jQuery
http://batiste.dosimple.ch/blog/posts/2007-09-11-1/rich-text-editor-jquery.html On Feb 21, 9:20 am, Gordon [EMAIL PROTECTED] wrote: Thanks for pointing that out. But what I'm more concerned with is the fact you're downloading TinyMCE, PLUS jQuery, PLUS the plugin so it's lot of stuff being downloaded, and much of the code you actually have downloaded is just duplicated effort. Both jQuery and MCE implement DOM selectors, iterators and manipulators, both implement an XHR wrapper, both implement event models, etc. What I was wondering has anybody taken the MCE code, cut its DOM, XHR, etc out and wired the jQuery ones in in their place? That'd eliminate duplication of effort between the two, and result in a smaller download size. On Feb 20, 5:27 pm, tlphipps [EMAIL PROTECTED] wrote: Regarding using jquery to 'attach' the editor, there is a plugin that I believe does just that:http://groups.google.com/group/jquery-en/browse_thread/thread/d33630d... On Feb 20, 10:33 am, Gordon [EMAIL PROTECTED] wrote: I've been using TinyMCE to build a CMS that's also being built around jQuery for other functionality, and I got to thinking, a lot of the TinyMCE code is simply replicating functionality that's already in jQuery (DOM selectors. XHR, etc), so has anybody tried to remove this stuff from the MCE codebase and use the jQuery implementations instead? Additionally, how about using jQuery functionality to attach editors to controls? For example $('textarea').tinyMCE () to attach editors to all elements, or $('#myEditor').tinyMCE to replace just a specific instance. You could use any CSS rule you wanted to determine where an editor should be created in theory. And how about using jQuery UI to implement MCE's inline popup windows? I do know there's WYM, which is built on jQuery, but that's very early on in its development and also appears to have stalled.
[jQuery] Adding more than 3 images with jcarousel
Hi, I just downloaded the jcarousel and let me say its amazing! I'm going to use for a new site I'm working on, but the problem is that it only shows 3 images! I need it to show about 6 or 7, how can I make it to show more than 3 images? Thanks, Best regards, Richi3f PS: I'm using the thickbox example.
[jQuery] Taconite and Jquery 1.2.3
Has anyone been able to use Mike's great Taconite plugin with the latest jquery? When using Jquery 1.2.1, Firebug shows: [taconite] Plugin Version: 3.01 [taconite] [AJAX response] content-type: text/xml; status: 200 OK; has responseXML: true [taconite] type: undefined [taconite] responseXML: [object XMLDocument] [taconite] XML document root: taconite ... [taconite] time to process response: 171ms If I replace Jquery with 1.2.3 and do no change in coding: [taconite] Plugin Version: 3.01 [taconite] [AJAX response] content-type: text/xml; status: 200 OK; has responseXML: true [taconite] type: html [taconite] responseXML: [object XMLDocument] [taconite] jQuery core httpData returned: taconite ... [taconite] httpData: response is not XML (or not valid XML) I've even removed all HTML and left Taconite's replacecontent empty to see if perhaps I had some typo somewhere. But it anyway did the same. Talking about replacecontent, what is the difference between Taconite's replace and replacecontent? I've played with both and sometimes I can make things work with one and sometimes with the other. Peter :)
[jQuery] select first item over multiple lists
I have a feeling this is easy, but I can't seem to wrap my head around it. I want to match the first item of multiple lists. For example below, I would like a set with the foo 1 and bar 1 items . Can I get this using one match? My tries keep coming back to something like $('ul li:first'), but that only matches foo 1 of course. Thanks for any help! ul lifoo 1/li lifoo 2/li lifoo 3/li /ul ul libar 1/li libar 2/li libar 3/li /ul
[jQuery] Re: Read More button
Hi Karl, Yeah! It's very good. That's exactly what I want. I haven't used jQuery before. It's all new to me. So the first link below should help me how to do that. Thanks, Steve On Tue, Feb 19, 2008 at 10:17 PM, Karl Swedberg [EMAIL PROTECTED] wrote: I know of two plugins that do this sort of thing: Expander: http://plugins.learningjquery.com/expander/ Truncate: http://www.reindel.com/truncate/ --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com On Feb 19, 2008, at 2:19 PM, Steve Schnable wrote: I have some testimonials on my website but they take up a lot of space, I would like to have it so that it will show the first sentence and then have a 'Read More' button where they can click on it and it would would expand showing the rest of the paragraph. It would be like: I am an owner/agent that was trying everything in a down market to get my condo sold. I had it listed on MLS, signs in the windows, open houses, but nothing seemed to generate any traffic... READ MORE and once someone clicks on the 'READ MORE it would expand showing the rest of the quote. Please tell me where I can find a script for it. Thanks! Steve
[jQuery] jcarousel - displaying more than 3 images
Hi, I'm new here and I'm just a beginner. The jcarousel's great! I loved it since the first time I saw it working at game.co.uk. I'm planning to use it for a new site I'm working on, but the displayed images are only 3, is there a way to change it to 6 or 7? Thank you in advance. Best regards, Richi3f PS: I'm using the thickbox example.
[jQuery] Re: Sending base64 encoded data with .ajax()
Jeffrey, Thanks! That is exactly what I was missing. Working like a champ now. Thanks again, Tom On Feb 20, 12:48 pm, Jeffrey Kretz [EMAIL PROTECTED] wrote: Give the built-in javascript function encodeURIComponent a try and see if that helps. data: arg= + encodeURIComponent(arg) JK -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Tom Sent: Tuesday, February 19, 2008 7:58 PM To: jQuery (English) Subject: [jQuery] Sendingbase64encoded data with .ajax() I am attempting to sendbase64encoded data but what is received on the server is mangled (specifically, any plusses are turned into spaces). I have attempted to set processData to false, but that doesn't seem to work. Would setting the contentType help? If so, what should it be set to? $.ajax({ type: POST, url : processorURL, cache: false, timeout: 3000, processData: false, data: arg= + arg, success: DisplayResults, error: DisplayError }); Any ideas? TIA, Tom
[jQuery] Re: slideDown slideUp - Anyone Know How?
Or simply remove the dead link (#)! :) On 21 fev, 01:40, Karl Swedberg [EMAIL PROTECTED] wrote: If you're clicking on a link, you need to return false inside the click handler. For example ... $('a').click(function() { // do something ... return false; }); --Karl _ Karl Swedbergwww.englishrules.comwww.learningjquery.com On Feb 20, 2008, at 3:40 PM, BooZker wrote: OK I got it to work for myself, but now there is this other weird problem: Whenever you press the plus or minus buttons it jumps you back to the top of the screen. This is extremely annoying. How can I stop this. I have also noticed that jQuery is not as clean and smooth when it hides and unhides the elements. Anyway to improve this also? - Oscar On Feb 19, 9:00 pm, BooZker [EMAIL PROTECTED] wrote: I have been fussing with this for a long time. I don't know Javascript, so if someone knows how to help don't talk gibberish ;) Here is the link I was using:http://docs.jquery.com/Effects/slideDown#speedcallback I have tried the example of the slideDown and slideUp and have yet to get it to work the way I need it to. I know this is extremely basic since I can do it with MooTools with literally a couple lines of code. Unfortunately, I need ThickBox on the same page (jQuery), so I need to do this without MooTools since ThickBox wont work with MooTools. I have a plus (vectorsIn) and minus (vectorsOut) button that are visible at all times. These buttons hide or unhide the div, #vectors. The HTML is below and I would like it if I would not have to change it. I do not think I do though since MooTools and jQuery seem to be fairly similar in the HTML syntax. I want the plus and minus buttons to hide or unhide the div in short. I also want the #vector div hidden on page load and I want both plus and minus visible at all times. There is no CSS applied to any of the IDs below, only the Classes. I have this for my HTML: div class=freebieSliderContainer div class=freebieSlideBar div class=sliderNameVectors/div div class=sliderButtons a id=vectorsIn class=toggleLinks href=#img src=images/ freebies/open.png alt=Open content //a a id=vectorsOut class=toggleLinks href=#img src=images/ freebies/close.png alt=Close content //a /div /div br style=clear:both / div id=vectors class=sliderContent /div /div
[jQuery] Re: Problems in the overlay created by SimpleModal in IE6/7
Strange...I have IE7 on Vista and it reports 7.0 for $.browser.version... On Feb 20, 7:56 pm, Nazgulled [EMAIL PROTECTED] wrote: After lots and lots of digging and testing I found something that fixed the problem in IE7. The thing was, jQuery has a bug on $.browser.version() and so, IE7 on Vista was being detected as IE6. Because of that the following was being executed: // fix issues with IE and create an iframe if ($.browser.msie ($.browser.version 7)) { this.fixIE(); } Of course, that fix is only for IE6 and if used on IE7, it doesn't fix anything, it breaks it. My workaround for this problem and for now, was to add the following code: var userAgent = navigator.userAgent.toLowerCase(); var browserVersion = { version: (userAgent.match( /.+?(?:rv|it|ra|ie) [\/: ]([\d.]+)/ ) || [])[1] }; $.extend($.browser, browserVersion); This will make the browser detection for IE7 under Vista working. Anyway, I still have the same issue but on IE6 and I don't know how to fix it yet... On Feb 20, 4:40 pm, Eric Martin [EMAIL PROTECTED] wrote: The problem can be solved with some body styles (and I think it only happens in IE6):http://www.ericmmartin.com/projects/simplemodal/#comment-265 body { margin: 0; padding: 0; width: 100%; height: 100%; } -Eric On Feb 20, 4:50 am, Nazgulled [EMAIL PROTECTED] wrote: Hi, I don't know how many of you have used or useSimpleModalto create modal dialogs but I'm having a little issue that's happening in IE6/7. It works fine in Firefox and I don't see any reason to not work on IE. Maye you guys can help me find a workaround. I've created a sample here:http://nazgulled.clok.info/simplemodal/ The problem is in the overlay div create bySimpleModal(I think), you can easily see the problem in IE6/7 if you compare it to Firefox. I've downloaded all the samples onSimpleModalwebsite and tested them locally, the same problem happens. However, if I open the demo page onSimpleModalwebsite with IE6/7, all the examples work fine. And I don't get it because I have the same exact code! Hope someone can help me as this is getting me frustrated and I can't continue the development on my site without this fixed.
[jQuery] Re: formatting/defining variable values
HI there , Please send me the HTML form On Thu, Feb 21, 2008 at 2:02 AM, Robert Hill [EMAIL PROTECTED] wrote: Hello I'm collecting a number of values from various form elements: textfield, radio, checkbox. since some of the fields aren't require on my form, when I POST their values they are returned as 'undefined' is there a way in Jquery that would allow me to set all variables that are undefined with a given value like N/A or even just ? for example, after the form is submitted, I'm using the following code to populate my values: //cancer vars var cancerVal = $(input[name='cancer']:checked).val(); var cancerTypeVal = $(#cancerType).val(); var cancerDateVal = $(#cancerDate).val(); var chemoCanVal = $(input[name='chemoCan']:checked).val(); var radiationCanVal = $(input[name='radiationCan']:checked).val(); var surgeryCanVal = $(input[name='surgeryCan']:checked).val(); var otherCanMoreVal = $(input[name='otherCanMore']:checked).val(); doing something like: var chemoCanVal =; before the submit does not seem to help. Alternately, if there is a way that I can use a function to replace all instances of 'undefined' with another value after the form is submitted, that too would work. thanks in advance! cheers, -robert
[jQuery] Re: on form submission, how to decide on submit: return true / false
HI there, This is the Code which You need , have fun Var Mydata{ Username: $('#username').val(), Password: $('#password').val() } $.ajax({ url: 'check.php', type: 'POST', data:Mydata // id of the tree dataType: 'html', cache: false, beforeSend: function() {}, error: function(){ // if the datas has not been send }, success: function (txt){ }// end of the success });// end of the .ajax -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of freech Sent: Wednesday, February 20, 2008 5:35 PM To: jQuery (English) Subject: [jQuery] on form submission, how to decide on submit: return true / false Hi there, I got helps and also debugging on self for days on trying to implement a form submission with jQuery, now I was stunk on getting the results from call back .Post or .ajax to pass true false to the form submission. the code is pretty simple here: $(document).ready(function() { $(#regForm).submit(function() { $.post(check.php, { username: $('#username').val(),password: $ ('#password').val() }, function(data) { $('#errorMessage').html(data); if (data == pass ) return true; else return false; //check.php will output { pass, user name already token, input username password} //problem here, the true / false value doesn't work. //even if I commented this line and add return false, the form will still be submitted. //I got kind suggestions should try replace $.Post with $.ajax to call here, but don't know how to. }); }); }); the full code: !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http:// www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd html xmlns=http://www.w3.org/1999/xhtml; head meta http-equiv=Content-Type content=text/html; charset=utf-8 / titleRegister/title script type=text/javascript src=jquery.js/script script type=text/javascript $(document).ready(function() { $(#regForm).submit(function() { $.post(check.php, { username: $('#username').val(),password: $ ('#password').val() }, function(data) { $('#errorMessage').html(data); if (data == pass ) return true; else return false; }); }); }); /script /head body form TARGET=?php echo $PHP_SELF; ? method=POST id=regForm pUsername:input type=text name=username id=username / pPassword:input type=password name=password id=password / INPUT TYPE=HIDDEN NAME=stage VALUE=go p id=errorMessage style='color:#f00'/p input type=submit name=submit id=send value=Sign Up! / /form ?php if ($_POST['stage']=='go') { // do registration insert user data echo form submitted; } //print_r($_POST); ? /body /html
[jQuery] Re: .is() behaviour
I think you're missing the point of event delegation. The $.delegate snippet is just a convenience (and, in my mind, unnecessary). The following code: $('#nav a').click($.delegate({ '.exit: function() { /* do stuff */ }, '.open: function() { /* do other stuff */ } })); Is functionally equivalent (and suspiciously similar) to: $('#nav a').click(function(){ if($(this).is('.exit')){ /* do stuff */ }; if($(this).is('.open')){ /* do other stuff */ }; }); Note that, line by line, this what happens in $.delegate. ...OR might be more efficient run (to avoid the 'is' calls) as: $('#nav a.exit').click(function(){ /* do stuff */ }); $('#nav a.open').click(function(){ /* do other stuff */ }); $.delegate just provides a slightly different way of doing it (and, from the above code, I think you can see why I think it's not needed). Not sure what you mean by 'bubbling up'. If you do this: $('#nav').click(function(){ /* do stuff */ }); .. then the function applies to the div called nav ONLY. It will do stuff if you click on a nested element, but only because you're clicking on the div as well. The nav div is still the target. It might even make sense to capture clicks that bubble up to the document object. Do you mean something like this: $('*').click($.delegate({ '#nav a.exit': function(){ /* do stuff */ }, '#nav a.open': function(){ /* do other stuff */ } }); ... that looks like a _really_ bad idea. Thanks Hamish Campbell On Feb 21, 9:42 am, hartshorne [EMAIL PROTECTED] wrote: I'm using event delegation (http://www.danwebb.net/2008/2/8/event- delegation-made-easy-in-jquery) to capture events that have bubbled up to the #nav element. It might even make sense to capture clicks that bubble up to the document object. I want to use the .is function to figure out what the user clicked on. Can I pass selector expressions like div div#nav a.exit to the .is function? On Feb 20, 2:18 pm, Hamish Campbell [EMAIL PROTECTED] wrote: Your jQuery is a bit faulty. You've only applied the event to the div called nav, not to the links. Also, you don't need to use event.target - the function will fire with this == the bound element. Try: div id=nav a href=/exit/ class=exitExit/a a href=/open/ class=openOpen/a /div script type=text/javascript charset=utf-8 jQuery(document).ready(function(){ jQuery('#nav a').bind('click', function() { alert(jQuery(this).is('.exit')); return false; });}); /script On Feb 21, 7:10 am, hartshorne [EMAIL PROTECTED] wrote: Hi, I'm new to jQuery, and found something unexpected. With something like this: div id=nav a href=/exit/ class=exitExit/a a href=/open/ class=openOpen/a /div script type=text/javascript charset=utf-8 jQuery('#nav').bind('click', function() { alert(jQuery(event.target).is('#nav .exit')); event.preventDefault();}); /script I expect .is('#nav .exit') to return true when the event is fired from the Exit link, and false otherwise. Instead it always returns true. What am I missing? Thanks!- Hide quoted text - - Show quoted text -
[jQuery] Re: Trigger a toggle when page loads
OK, I think that my problem had to do with the fact that I'm using the livequery plugin to handle rebinding after new rows get created (I have not included this part of my code). I was able to get what I needed using the following code: //deactivate activate click handler var destroy = function() { $(this).unbind('toggle').unbind('click'); }; // the following toggle function changes various things about the image clicked and the table row it is in // this part has always worked fine var init = function() { $(this).toggle(function(e){ var $this = $(this); //alert('deactivating'); $(this).attr(src,images/btnReactivate.gif) $(this).parents('tr:eq(0)').css({background-image:url(images/ deactivated_SlantBar.jpg)}); $(this).parents('tr:eq(0)').find(input[name $='useThisRecord']).val(0); $(this).parents('tr:eq(0)').find('input').css(border- width,0px).attr(readonly,true); $(this).parents('tr:eq(0)').find('input').css({ border- width:0px,color:#909090}).attr(readonly,true); }, function(e) { //alert('reactivating'); $(this).parents('tr:eq(0)').css('background-image', ''); $(this).parents('tr:eq(0)').find('input').css({border- width:1px,color:black}).removeAttr(readonly); $(this).parents('tr:eq(0)').find(input[name $='useThisRecord']).val(1); //alert($(this).parents('tr:eq(0)').find(input[name $='useThisRecord']).val()); $(this).attr(src,images/btnDeactivate.gif) }); }; $(img.active_toggle).livequery(init,destroy); // following is the part that I was struggling with // the function looks at each image when the page loads // checks the associated input field to see if its value is false // and if so, triggers a click (and hence the toggle for that image and row) $(img.active_toggle).each(function(index,obj){ myUseThisRecord = (index+1) + useThisRecord; //alert(myUseThisRecord); if ($('input[name=' + myUseThisRecord + ']').val()==False) {alert(index); $(obj).livequery(function(event) { $(obj).trigger(click); }); } }); Thanks for the help!
[jQuery] IE problems with prepend since 1.2.3?
IE6 and IE7 since upgrading to jQuery 1.2.3 is targeting line 264 in the jquery.js (uncompressed) with the error message, Unexpected call to method or property access. Here's the bit in jQuery it's referencing: prepend: function() { return this.domManip(arguments, true, true, function(elem){ if (this.nodeType == 1) this.insertBefore( elem, this.firstChild ); }); }, Specifically line 264 is claimed to be the culprit: this.insertBefore( elem, this.firstChild ); . Per usual, Firefox, Safari, and Opera work fine. It could well be my code that's triggering my latest battle with IE, but I thought I'd at least ask here. I've spent the last 2-3 hrs or so refactoring, etc. to see if messy code was causing the problem, but no luck. I consistently get this same error from the MS script debugger. Maybe this is something someone else has run into, if so, any help is appreciated. Thanks, jody
[jQuery] Re: Problem with form validation (works in FF, but not in IE)
Hails! Well, I've been using this plugin and it works nice! I think you'd better give the attribute name the same value as the id attribute. I believe IE and Opera selects by name insted of id. On 20 fev, 22:58, Chris Jordan [EMAIL PROTECTED] wrote: Hi folks, This page http://seifactory.com/login.php works in FireFox without problem, but doesn't do anything in IE. Now, I'm only talking about validation here, the form doesn't actually *do* anything just yet. All I was trying to do was get the validation going. This is the first time I've attempted to use Jörn's validation plug-in, and I'm kinda getting the hang of it (or so I thought), but now this isn't working in IE so I'm all stumped. I'd like to figure this out before I try to work on learning anything else (like error message placement ... hints on that would be welcome too, though). Thanks heaps everyone, Chris --http://cjordan.us
[jQuery] Re: $.ajaxFileUpload into an ajax form
I am using this plugin just like that. form ... ... my other form elements p label for=fileToUploadChoose File :/label input id=fileToUpload type=file name=fileToUpload / input type=button id=upload_btn value=Upload! onclick=ajaxFileUpload(); / /p ... other elements, my form is huge :) /form ajaxFileUpload() does not need to be posting your form. It's already creating iframe and posting file over this element. So, you can use like this, i am using with no problem. 2008/2/20, hcvitto [EMAIL PROTECTED]: hi i'm using the ajaxfileupload plugin from this site http://www.phpletter.com/Our-Projects/AjaxFileUpload/ (which works great) in a form with different kind of input file. The form is ajaxed through the $.ajax jquery function. Following the form submitting is a mail with the data from the form. Problem: i use the '$.ajax' and the '$.ajaxFileUpload' on the same form which calls for the same php file, which is now called twice, once per function. So everytime i submit the form two mails are sent, one with the data the other with the file attached. How can i integrate the ajaxfileupload in my form? anyone does know this plugin? Thanks Vitto this is my form submit ajax function: $.ajax({ type: POST, url: curriculumInvio.php, data: myData, success: function(){ myFunction } }); this is the plugin ajax function: $.ajaxFileUpload({ url:'curriculumInvio.php', secureuri:false, fileElementId:'fileToUpload', dataType: 'json', success: function (data, status){ plugin stuff, } }); -- Yılmaz Uğurlu ~ jabber : [EMAIL PROTECTED] ~ http://www.2nci.com ~ İzmir
[jQuery] Using JQuery works with browser, problem with Vista Sidebar Gadget.
Hi, i'm trying to develop vista gadgets, with sliding effects for the RSS feeds, which has images, title, link to the detailed news page. i found that JQuery makes it simple in getting the effects, since m new to JQuery want to know about implementing the same in the Gadget. i tried the samples in the browser and it works great, but when m using the same piece of code in the gadget, like SlideUp on Click event of an Anchor Tag, the div content just flickers and does slide up really. is there any restrictions using JQuery in Sidebar Gadgets. Can anyone HELP me out with this..? and also let me know if there is docs available for using it Gagdets. Thanks, Jagan
[jQuery] Re: IE/Opera problem using ClueTip
Please help me out! i have a project based on this and its delaying...
[jQuery] window resize event causes IE6 IE7 to hang
Hi all, I'm using $(window).resize() to adjust a div height on the fly. I've found that rapidly changing the window size causes IE6 IE7 to hang - I guess because too many events are being fired for IE to cope? Here's my code : function content_resize() { var w = $( window ); var H = w.height(); $( '#content' ).css( {height: H-270} ); } $(document).ready(function() { $( window ).resize( content_resize ); content_resize(); }); I'm using jquery 1.2.2 and the dimensions plugin. I've also tried the wresize plugin which addresses duplicated resize events in IE but both cause the same hang when browser window altered quickly. Anyone else seen this? Are there any workarounds? [Apologies for repost, my first got lost in another thread] Regards Sean sean ronan activepixels office : 01245 399 499 email : [EMAIL PROTECTED] web :activepixels.co.uk Activepixels is a limited company registered in England and Wales. Registered number: 5081009. Registered office: Suite SF8, The Heybridge Business Centre, 110 The Causeway, Maldon, Essex, CM1 3TY.
[jQuery] Request parameters from dynamically added html element are missing on the server side
Hi there, I tried to create input element dynamically using jQuery, in form of text field and file upload. But somehow when I dumped all my request parameters on the server side, I never received these parameters even though I saw the the input elements were created on HTML form. Could someone give me a hint ? I use jsp and java on the server side, jQuery 1.1.4, and jQuery Multiple File Upload Plugin v1.26. This is the snippet of the code : script src=%= themeDisplay.getPathJavaScript() %/jquery/jquery.js type=text/javascript/script script src=%= themeDisplay.getPathJavaScript() %/geco/ jquery.MultiFile.js type=text/javascript/script form action=blabla.jsp method=post enctype=multipart/form-data tr tdinput type=text name=portlet:namespace /portalurl0 id=portlet:namespace /portalurl0 / /td tdinput type=text name=portlet:namespace /profileid0 id=portlet:namespace /profileid0 //td tdinput type=button value=Add onclick=portlet:namespace / addjquery() / input type=button value=Profilvorlage / /td input type=hidden name=counter value=1 id=portlet:namespace /counter / /tr /table /td /tr tr td/td td div id=portlet:namespace /profile /div /td /tr tr tdbAttach CV/Resume/b/td tdinput type=file name=resumefile id=portlet:namespace / my_file_element / /td /tr /form script type=text/javascript $(document).ready(function(){ $('#portlet:namespace /my_file_element').MultiFile({ accept:'txt|doc|rtf', max:7, STRING: { remove:'Remover', selected:'Selecionado: $file', denied:'Invalid file extension $ext!' } }); }); /script script type=text/javascript function portlet:namespace /addjquery(){ var profileurl = document.getElementById(portlet:namespace / portalurl0).value; var profileid = document.getElementById(portlet:namespace / profileid0).value; var id = document.getElementById(portlet:namespace / counter).value; $(#portlet:namespace /profile).append(p id='portlet:namespace / row + id + '+profileurl+nbsp;nbsp;+profileid+input type='hidden' name='profileurl[+id+]' value='+profileurl+' input type='hidden' name='profileid[+id+]' value='+profileid +'nbsp;nbsp;a href='#' onClick='portlet:namespace / removeFormField(\#portlet:namespace /row + id + \); return false;'Remove/ap); id = (id - 1 ) + 2; document.getElementById(portlet:namespace /counter).value = id; } function portlet:namespace /removeFormField(id){ $(id).remove(); } /script
[jQuery] jquery .fadeTo with radio buttons
Hi I'm having a bit of a problem when using .fadeTo on a div containing radio buttons. There appears to be a darkened border forming around the radio buttons that persists after i fade it back to opactiy 1. This problem only occurs when i have my theme set to windows xp. if i set it to windows classic it looks fine... I'm using IE7 to test this. Not sure how it looks in other browsers... Just wondering if anyone else has had this problem and if there is a fix or workaround or something... Cheers Utkarsh Singhania
[jQuery] Re: formatting/defining variable values
What version of jQuery are you using? .val() should return rather than undefined if you find inputs successfully. HOWEVER, there is another problem: Putting ':checked' means that if the boxes are NOT checked, jQuery won't find them so .val() doesn't exist for the object. Remove the ':checked' and try again. Cheers, Hamish On Feb 21, 11:32 am, Robert Hill [EMAIL PROTECTED] wrote: Hello I'm collecting a number of values from various form elements: textfield, radio, checkbox. since some of the fields aren't require on my form, when I POST their values they are returned as 'undefined' is there a way in Jquery that would allow me to set all variables that are undefined with a given value like N/A or even just ? for example, after the form is submitted, I'm using the following code to populate my values: //cancer vars var cancerVal = $(input[name='cancer']:checked).val(); var cancerTypeVal = $(#cancerType).val(); var cancerDateVal = $(#cancerDate).val(); var chemoCanVal = $(input[name='chemoCan']:checked).val(); var radiationCanVal = $(input[name='radiationCan']:checked).val(); var surgeryCanVal = $(input[name='surgeryCan']:checked).val(); var otherCanMoreVal = $(input[name='otherCanMore']:checked).val(); doing something like: var chemoCanVal =; before the submit does not seem to help. Alternately, if there is a way that I can use a function to replace all instances of 'undefined' with another value after the form is submitted, that too would work. thanks in advance! cheers, -robert
[jQuery] Possibly a bug with Form plugin and IE(7)
This works fine in FF, however when run in IE7 the showResponse function will never run. Actually, the ajax-event probably never fires. The beforeSubmit function runs however. $('#container').children('#form2').ajaxSubmit({dataType: 'xml', beforeSubmit: showRequest, success: showResponse}); Changing the line to: $('#form2').ajaxSubmit({dataType: 'xml', beforeSubmit: showRequest, success: showResponse}); ..solves the problem for me. But it should work, right? Any thoughts? -- View this message in context: http://www.nabble.com/Possibly-a-bug-with-Form-plugin-and-IE%287%29-tp15607271s27240p15607271.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: How can I make searching not case-sensitive?
This is nice, but my problem is with the divs in the list. They contain both lower case and upper case, but must be searched as they were exclusively lower case. Is there a way to do something like this: $(div.nume.toLowerCase:contains( + xx +)).parent().addClass(zero); ?? Thanks, Dinu On Feb 21, 9:25 am, andrea varnier [EMAIL PROTECTED] wrote: On Feb 20, 8:55 pm, dinu [EMAIL PROTECTED] wrote: xx=$(form#form1 *).fieldValue()[0]; hi :) have you tried this? xx=$(form#form1 *).fieldValue()[0].toLowerCase;
[jQuery] Having problems is using JQuery Effects in Vista Gadget.
Hi, When trying to add a SlideUp effect it works well in the browser but the same does'nt work with the Vista Sidebar gadget. m curious to know the reason behind the problem. Let me know if u have any solutions. please find the code below: js $(document.body).ready(function() { //debugger; $(a).click(function(){ if ($(div:first).is(:hidden)) { $(div).show(); } else { $(div).slideUp(slow); } }); }); HTML BODY a href=#click here/a div id=one img src=en-US/images/apple.png h2 This is apple /h2 p an apple everyday keeps doctor away/p /div /BODY Your response is greatly valued!! Thanks Regards, Jagan
[jQuery] Re: Taconite and Jquery 1.2.3
Peter, I just updated the demos to use jQuery 1.2.3 and I'm not seeing any problems: http://www.malsup.com/jquery/taconite/#examples The diff between replace and replaceContent boils down to what is being replaced. With replace, the entire element is replaced. With replaceContent only the content of the selected element is replaced (just like jQuery's html function). Mike On Wed, Feb 20, 2008 at 8:20 PM, lvp1138 [EMAIL PROTECTED] wrote: Has anyone been able to use Mike's great Taconite plugin with the latest jquery? When using Jquery 1.2.1, Firebug shows: [taconite] Plugin Version: 3.01 [taconite] [AJAX response] content-type: text/xml; status: 200 OK; has responseXML: true [taconite] type: undefined [taconite] responseXML: [object XMLDocument] [taconite] XML document root: taconite ... [taconite] time to process response: 171ms If I replace Jquery with 1.2.3 and do no change in coding: [taconite] Plugin Version: 3.01 [taconite] [AJAX response] content-type: text/xml; status: 200 OK; has responseXML: true [taconite] type: html [taconite] responseXML: [object XMLDocument] [taconite] jQuery core httpData returned: taconite ... [taconite] httpData: response is not XML (or not valid XML) I've even removed all HTML and left Taconite's replacecontent empty to see if perhaps I had some typo somewhere. But it anyway did the same. Talking about replacecontent, what is the difference between Taconite's replace and replacecontent? I've played with both and sometimes I can make things work with one and sometimes with the other. Peter :)
[jQuery] Re: jquery .fadeTo with radio buttons
I'm having a bit of a problem when using .fadeTo on a div containing radio buttons. There appears to be a darkened border forming around the radio buttons that persists after i fade it back to opactiy 1. This problem only occurs when i have my theme set to windows xp. if i set it to windows classic it looks fine... I'm using IE7 to test this. Not sure how it looks in other browsers... Take a look at this demo page: http://malsup.com/jquery/fadetest.html
[jQuery] Re: blockUI: moving the message that blocks an element to the top
I can't, it's an internal company app. I am going to try and isolate it today. If I can reproduce it in a static page, I will post it. Thanks, -Alan On Feb 20, 6:06 pm, Mike Alsup [EMAIL PROTECTED] wrote: Thanks Mike. You definitely provided a solution that should work. But the following code works if I modify your test page, but not in my page. It moves to the left, but not up. Anyone have ideas how to debug why IE7 is ignoring the top margin? -Alan $.blockUI.defaults.elementMessageCSS = $.extend({}, $.blockUI.defaults.elementMessageCSS); $.extend($.blockUI.defaults.elementMessageCSS, { margin: '-125px 0 0 -125px' }); $('#test').block(Loading, please wait...); Can you post a link?
[jQuery] Re: formatting/defining variable values
Thanks for looking! I posted the source above. cheers, -robert
[jQuery] Re: formatting/defining variable values
Here is the html 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 meta http-equiv=Content-Type content=text/html; charset=ISO-8859-1 / titleForm : Carman Research/title link href=screen.css type=text/css rel=stylesheet media=screen,projection / script type=text/javascript src=jquery.js/script script type=text/javascript src=jquery.form.js/script script type=text/javascript src=jquery.batch.js/script script type=text/javascript $(document).ready( function(){ // this jquery inplementation is based on techniques described by Tavis Davis at http://trevordavis.net $(#moreReferOther).hide(); $(input[name='referOther']).click(function() { //$(input[#formSex]).change(function(){ if ( $(input[name='referOther']:checked).val() == 'Other' ) { $(#moreReferOther).show('slow') ; } else { $(#moreReferOther).hide('slow'); } }); // unstable illness more $(#hideMedical).hide(); $(input[name='unstable']).click(function() { //$(input[#formSex]).change(function(){ if ( $(input[name='unstable']:checked).val() == 'yes' ) { $(#hideMedical).show('slow') ; } else { $(#hideMedical).hide('slow'); } }); // // cancer more $(#hideCancer).hide(); $(input[name='cancer']).click(function() { //$(input[#formSex]).change(function(){ if ( $(input[name='cancer']:checked).val() == 'yes' ) { $(#hideCancer).show('slow') ; } else { $(#hideCancer).hide('slow'); } }); $(#hideOtherCancer).hide(); $(input[name='otherCan']).click(function() { //$(input[#formSex]).change(function(){ if ( $(input[name='otherCan']:checked).val() == 'other' ) { $(#hideOtherCancer).show('slow') ; } else { $(#hideOtherCancer).hide('slow'); } }); // $(#formHideSex).hide(); $(input[name='sex']).click(function() { //$(input[#formSex]).change(function(){ if ( $(input[name='sex']:checked).val() == 'female' ) { $(#formHideSex).show('slow') ; } else { $(#formHideSex).hide('slow'); } }); $(#formSeizureHide).hide(); $(input[name='seizure']).click(function() { if ( $(input[name='seizure']:checked).val() == 'yes' ) { $(#formSeizureHide).show('slow') ; } else { $(#formSeizureHide).hide('slow'); } }); /* $(#formAllergyMedHide).hide(); $(input[name='allergyMed']).click(function() { if ( $(input[name='allergyMed']:checked).val() == 'yes' ) { $(#formAllergyMedHide).show('slow') ; } else { $(#formAllergyMedHide).hide('slow'); } }); */ // JQuery css Styling $(#errorBox).addClass(red); $(#container).addClass(esubStyle); $(#formAllergyMedHide).addClass(fhideBox); $(#formSeizureHide).addClass(fhideBox); $(#formHideSex).addClass(fhideBox); $(#moreReferOther).addClass(fhideBox); $(#hideMedical).addClass(fhideBox); $(#hideCancer).addClass(fhideBox); $(#hideOtherCancer).addClass(ffhideBox); //set variables var referTVVal = ''; var referDirectVal = ''; var referPrintVal = ''; var referNewsVal = ''; var referWebVal = ''; var referOtherMoreVal = ''; /* $('#formHideSex').hide(); $([EMAIL PROTECTED]'sex']).change(function(){ if ([EMAIL PROTECTED]'sex']:checked).val() == 'female') { $(#formHideSex).show('slow'); } else { $(#formHideSex).hide('slow'); } } */ //$([EMAIL PROTECTED]'makechoice']:checked).val() == 0 ? $ (#HideMe).hide('slow') : $(#HideMe).show('slow'); // $(#submit).click(function(){ $(.error).hide(); //$(input[name='sex']).next().text(gender); - change the value of a text var hasError = false; var emailReg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/; var problemVal = $(#problem).val(); var ageVal = $(#age).val(); //var sexVal = $(input[name='sex']:checked).val(); var sexVal = $(input[name='sex']:checked).val(); //var referVal = $(input[name='referral']:checked).val(); //var referVal = $(#referral).val() || []; //var referVal = $(input[name='referral']:checked).fieldValue(); var referTVVal = $(input[name='referTV']:checked).val(); var referDirectVal = $(input[name='referDirect']:checked).val(); var referPrintVal = $(input[name='referPrint']:checked).val(); var referNewsVal = $(input[name='referNews']:checked).val(); var referWebVal = $(input[name='referWeb']:checked).val(); var referOtherVal = $(input[name='referOther']:checked).val(); var referOtherMoreVal = $(#referOtherMore).val(); var moreMedicalVal = $(#moreMedical).val(); //cancer vars var cancerVal
[jQuery] I am looking for the datagrid which supports row/column merging and JSON
Hi All, I am looking for the good js datagrid which supports AJAX column sorting, row/column merging (rowspan/colspan), and JSON. Does anyone know where I can find such datagrid? Thanks, Channa
[jQuery] Re: formatting/defining variable values
I'm using 1.2.2. I see how using checked could cause a problem, but I don't want the values if there are not checked... On Feb 20, 9:29 pm, Hamish Campbell [EMAIL PROTECTED] wrote: What version of jQuery are you using? .val() should return rather than undefined if you find inputs successfully. HOWEVER, there is another problem: Putting ':checked' means that if the boxes are NOT checked, jQuery won't find them so .val() doesn't exist for the object. Remove the ':checked' and try again. Cheers, Hamish On Feb 21, 11:32 am, Robert Hill [EMAIL PROTECTED] wrote: Hello I'm collecting a number of values from various form elements: textfield, radio, checkbox. since some of the fields aren't require on my form, when I POST their values they are returned as 'undefined' is there a way in Jquery that would allow me to set all variables that are undefined with a given value like N/A or even just ? for example, after the form is submitted, I'm using the following code to populate my values: //cancer vars var cancerVal = $(input[name='cancer']:checked).val(); var cancerTypeVal = $(#cancerType).val(); var cancerDateVal = $(#cancerDate).val(); var chemoCanVal = $(input[name='chemoCan']:checked).val(); var radiationCanVal = $(input[name='radiationCan']:checked).val(); var surgeryCanVal = $(input[name='surgeryCan']:checked).val(); var otherCanMoreVal = $(input[name='otherCanMore']:checked).val(); doing something like: var chemoCanVal =; before the submit does not seem to help. Alternately, if there is a way that I can use a function to replace all instances of 'undefined' with another value after the form is submitted, that too would work. thanks in advance! cheers, -robert
[jQuery] form input helper
Hi all! I'm trying to achieve the following effect: When you focus on an input tag, the content of the div named 'help- for-xxx' should appear in the #help-tip element. And, accorgingly when you leave an input it should disappear. Appearing and disappearing means here fadeIn and fadeOut. Of course my solution is bad (fadeIn should wait fadeOut to complete). I know I can attach a callback after event completion, but I don't know how to build a solution from it. thanks Script follows: $('.help').each(function() { var that = $(this) var id = this.id.replace(/help-for-/, '#') $(id).focus(function(){ $('#help-tip').html(that.html()).fadeIn() }) $(id).blur(function() { $('#help-tip').fadeOut() }) })
[jQuery] Re: .is() behaviour
.is() doesn't support complex selectors (in this case the descendant selector). Unfortunately, this is undocumented and very misleading. There are two potential solutions: 1) .is'('.exit') .parents('#nav').length 2) override .is() to work as intended (below is the code I'm currently using) jQuery.fn.is = function( selector ) { if ( !selector ) return false; if ( !/[\s]/.test( selector ) ) { return jQuery.multiFilter( selector, this ).length 0; } var ret = false; var els = jQuery( selector ).get(); jQuery.each(this, function(){ if ( jQuery.inArray( this, els ) != -1 ) { ret = true; return false; } }); return ret; }; On Feb 20, 1:10 pm, hartshorne [EMAIL PROTECTED] wrote: Hi, I'm new to jQuery, and found something unexpected. With something like this: div id=nav a href=/exit/ class=exitExit/a a href=/open/ class=openOpen/a /div script type=text/javascript charset=utf-8 jQuery('#nav').bind('click', function() { alert(jQuery(event.target).is('#nav .exit')); event.preventDefault();}); /script I expect .is('#nav .exit') to return true when the event is fired from the Exit link, and false otherwise. Instead it always returns true. What am I missing? Thanks!
[jQuery] Re: Problems in the overlay created by SimpleModal in IE6/7
I don't know then, what I know is that on my Vista machine, IE7 is being recognized as IE6 and the code above fixed it. Anyway, I think I fixed the problem on IE6 and you were right after all, the code in your first reply fixed, I must have done something wrong before. But now, I'm having a problem with Opera :S If I open the demo page on your site and test it with Opera, it works well, but if I download the basic sample and test it on Opera, it doesn't quite work. The problem is, when you click to show the modal dialog, it shows fine. But after closing it, you will see something odd... Look at the screenshot, it shows what's happening after closing the dialog: http://img408.imageshack.us/my.php?image=operavu1.jpg On Feb 21, 5:30 am, Eric Martin [EMAIL PROTECTED] wrote: Strange...I have IE7 on Vista and it reports 7.0 for $.browser.version... On Feb 20, 7:56 pm, Nazgulled [EMAIL PROTECTED] wrote: After lots and lots of digging and testing I found something that fixed the problem in IE7. The thing was, jQuery has a bug on $.browser.version() and so, IE7 on Vista was being detected as IE6. Because of that the following was being executed: // fix issues with IE and create an iframe if ($.browser.msie ($.browser.version 7)) { this.fixIE(); } Of course, that fix is only for IE6 and if used on IE7, it doesn't fix anything, it breaks it. My workaround for this problem and for now, was to add the following code: var userAgent = navigator.userAgent.toLowerCase(); var browserVersion = { version: (userAgent.match( /.+?(?:rv|it|ra|ie) [\/: ]([\d.]+)/ ) || [])[1] }; $.extend($.browser, browserVersion); This will make the browser detection for IE7 under Vista working. Anyway, I still have the same issue but on IE6 and I don't know how to fix it yet... On Feb 20, 4:40 pm, Eric Martin [EMAIL PROTECTED] wrote: The problem can be solved with some body styles (and I think it only happens in IE6):http://www.ericmmartin.com/projects/simplemodal/#comment-265 body { margin: 0; padding: 0; width: 100%; height: 100%; } -Eric On Feb 20, 4:50 am, Nazgulled [EMAIL PROTECTED] wrote: Hi, I don't know how many of you have used or useSimpleModalto create modal dialogs but I'm having a little issue that's happening in IE6/7. It works fine in Firefox and I don't see any reason to not work on IE. Maye you guys can help me find a workaround. I've created a sample here:http://nazgulled.clok.info/simplemodal/ The problem is in the overlay div create bySimpleModal(I think), you can easily see the problem in IE6/7 if you compare it to Firefox. I've downloaded all the samples onSimpleModalwebsite and tested them locally, the same problem happens. However, if I open the demo page onSimpleModalwebsite with IE6/7, all the examples work fine. And I don't get it because I have the same exact code! Hope someone can help me as this is getting me frustrated and I can't continue the development on my site without this fixed.
[jQuery] Re: .is() behaviour
I'm using event delegation (http://www.danwebb.net/2008/2/8/event- delegation-made-easy-in-jquery) to capture events that have bubbled up to the #nav element. It might even make sense to capture clicks that bubble up to the document object. I want to use the .is function to figure out what the user clicked on. Can I pass selector expressions like div div#nav a.exit to the .is function? You could do: if ( $(div div#nav a.exit).index( e.target ) -1 ) { } This way you could even cache the query in a variable to avoid repeat calls. --John
[jQuery] Re: form input helper
When you focus on an input tag, the content of the div named 'help- for-xxx' should appear in the #help-tip element. And, accorgingly when you leave an input it should disappear. Appearing and disappearing means here fadeIn and fadeOut. Of course my solution is bad (fadeIn should wait fadeOut to complete). I know I can attach a callback after event completion, but I don't know how to build a solution from it. thanks Script follows: $('.help').each(function() { var that = $(this) var id = this.id.replace(/help-for-/, '#') $(id).focus(function(){ $('#help-tip').html(that.html()).fadeIn() }) $(id).blur(function() { $('#help-tip').fadeOut() }) }) Newer versions of jQuery (1.2+) introduced .stop() method which you can use to cancel all queued animations. You could call stop() before your fadeIn so the effect it more fluid. $('#help-tip').html(that.html()).stop().fadeIn() The problem with using a callback after the fadeOut is complete is that you can cause a real bad delayed queue for users who are tabbing quickly through the fields. -Dan
[jQuery] Re: .is() behaviour
Hi hartshorne, You're on the right track with event delegation as it is fundamentally different than binding the event to each link. With event delegation you have 1 event bound to 1 element (div), in binding to each link you have 1 event boud to two links. jQuery('#nav').bind('click', function(evt) { // this is a reference to #nav so we can certify that event.targetoccurred on one of it's children alert(jQuery(evt.target).is('.exit')); // Call this against the event passed in as the first argument (evt) evt.preventDefault(); }); That should do what you're looking for Cheers, -Jonathan On 2/20/08, hartshorne [EMAIL PROTECTED] wrote: Hi, I'm new to jQuery, and found something unexpected. With something like this: div id=nav a href=/exit/ class=exitExit/a a href=/open/ class=openOpen/a /div script type=text/javascript charset=utf-8 jQuery('#nav').bind('click', function() { alert(jQuery(event.target).is('#nav .exit')); event.preventDefault(); }); /script I expect .is('#nav .exit') to return true when the event is fired from the Exit link, and false otherwise. Instead it always returns true. What am I missing? Thanks!
[jQuery] Re: jcarousel - displaying more than 3 images
check out the configuration section of the jcarousel documentation http://sorgalla.com/projects/jcarousel/ (for you question, use the visible property) On Feb 20, 7:44 pm, Richi3f [EMAIL PROTECTED] wrote: Hi, I'm new here and I'm just a beginner. The jcarousel's great! I loved it since the first time I saw it working at game.co.uk. I'm planning to use it for a new site I'm working on, but the displayed images are only 3, is there a way to change it to 6 or 7? Thank you in advance. Best regards, Richi3f PS: I'm using the thickbox example.
[jQuery] Re: What is the easiest way to add events to dynamically added rows?
Dan, I am planning on taking a look at Listen, but I was wondering if the Delegate plugin has the same functionality as Listen. The reason I'm inquiring about Delegate is because I am using the Validation plugin, which requires Delegate. Thanks for your help. Travis On Feb 20, 2:38 pm, Dan G. Switzer, II [EMAIL PROTECTED] wrote: I am dynamically removing and adding rows using AJAX calls. Is it still a better idea to go with Listen? IMO, yes. You won't have the polling overhead like you do with LiveQuery. The $.Listen() plug-in only attaches itself once and then just listens for matching key events on it's children to see if it should trigger off a callback. IMO this is much cleaner solution and it's less likely to introduce any kind of memory leaks (since there's only one event ever attached.) -Dan
[jQuery] Re: bind method to easily create closures with this altered.
I'm not sure what illegal Javascript syntax is. I just tested Jörn's code and it runs without errors, and lets you do this: $(thing).click(myFunc.bind(scope)); Instead of illegal, can we just call it very very risky to extend the prototypes of native JS objects? :) Altering the behavior of native prototypes can lead to new and exciting bugs in other libraries. These are nigh impossible to track down, since they are caused by completely unrelated code. This sorrow is sometimes called action at a distance. If you want to extend the prototype of Function, I won't tell on you. :) Here is a perfectly safe alternative though: function bind(fn, scope) { return function() { fn.apply(scope, arguments) }; } $(thing).click(bind(myFunc, scope)); David On Feb 21, 1:27 am, RobG [EMAIL PROTECTED] wrote: On Feb 20, 9:17 pm, darki777 [EMAIL PROTECTED] wrote: Hi, is there any method to bind and create closures with this altered in jQuery (with chain possibility)?? Need it on various functions. I do not mean Events. Anythink like this: function myFunc() { }.bind(anything); That is illegal javascript syntax, the Function call or apply methods are provided for this: function foo(){} foo.call(anything); or perhaps: var boundFoo = function(){ foo.apply(anything, arguments); } -- Rob
[jQuery] Re: What is the easiest way to add events to dynamically added rows?
Wow - I asked Ariel Flesler (the developer of the Listen plugin) to explain why one would use it instead of LiveQuery. His response was way more cryptic than yours. Thanks for cutting through the haze, Dan! On Feb 20, 2:38 pm, Dan G. Switzer, II [EMAIL PROTECTED] wrote: I am dynamically removing and adding rows using AJAX calls. Is it still a better idea to go with Listen? IMO, yes. You won't have the polling overhead like you do with LiveQuery. The $.Listen() plug-in only attaches itself once and then just listens for matching key events on it's children to see if it should trigger off a callback. IMO this is much cleaner solution and it's less likely to introduce any kind of memory leaks (since there's only one event ever attached.) -Dan
[jQuery] Re: Lazy Load Select elements
Also not a direct answer to your question, but maybe an answer to why you are asking it... My initial guess would be that because you are just using a class as your selector it is having to search through every single element on the page (apparently over 20,000 of them) to find the elements that have that class. That takes a little while. Your form.select selector looks for form elements of which I am sure there are just a few, and then a select element inside of that... again just a few. In other words, the less work your selector has to do, the faster it runs. You could speed this up even more if you gave the element an ID as that is even less parsing that it needs to do as there should only ever be one of a given ID. Hope that helps! Aaron On Feb 20, 9:13 am, Adam Schaible [EMAIL PROTECTED] wrote: Hello everyone, On my page, I have a select element that may contain 20,000+ options. When I ask jQuery for the select element, it loads the set of options with it. For 20,000 it takes about 1 - 1.25 seconds for jQuery to return from $('.boxClass)[0];. When I use standard form.select it takes roughly 300 milliseconds. Is there a way to lazy load the options of a select?
[jQuery] Strange syntax error loading jquery.js
My browser (FF 2.0.0.12) appears to be trying to interpret some of the HTML as part of the javascript file. This bug appears frequently (but not every time) a page is loaded. Details below. I see it with jquery 1.2.1 and 1.2.3 full and minimized. I see it also in IE. I see it even when I comment out the meta tags and other scripts that load after jquery. Has this condition been seen before? Thanks Jack Here is a snippet of the xhtml: !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd; html head meta http-equiv=content-type content=text/html; charset=utf-8 / titleTopicSpaces/title meta name=keywords content= / meta name=description content=Dynamic Knowledge Gardening / link href=/css/rational.css rel=stylesheet type=text/css / script type=text/javascript src=/js/jquery-1.2.3.min.js/script script type=text/javascript src=/js/main-right-simple.js/script script type=text/javascript src=/js/admin.js/script /head body FireBug says syntax error [Break on this error] !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/x... jquery-1.2.3.min (line 1 and here's what it is showing: !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd; html head /* * jQuery 1.2.3 - New Wave Javascript * * Copyright (c) 2008 John Resig (jquery.com) * Dual licensed under the MIT (MIT-LICENSE.txt) * and GPL (GPL-LICENSE.txt) licenses. * * $Date: 2008-02-06 00:21:25 -0500 (Wed, 06 Feb 2008) $ * $Rev: 4663 $ */ (function(){if(window.jQuery)var _jQuery=window.jQuery;var jQuery=window.jQuery=function(selector,context){return new jQuery.prototype.init(selector,context);};if(window.$)var _$=window.$;window.$=jQuery;var quickExpr=/^[^]*((.|\s)+)[^]*$|^#(\w+)$/;var isSimple=/^.[^:#\[\.]*$/;jQuery.fn=jQuery.prototype={init:function(selector,context){selector=selector||document;if(selector.nodeType){this[0]=selector;this.length=1;return this;}else if(typeof selector==string){var match=quickExpr.exec(selector);if(match(match[1]||!context)){if(match[1])selector=jQuery.clean([match[1]],context);else{var elem=document.getElementById(match[3]);if(elem)if(elem.id!=match[3])return jQuery().find(selector);else{this[0]=elem;this.length=1;return this;}else 15selector=[];}}else
[jQuery] [Validate] Validating not happening in IE6 no error removal on keyup
I've got two issues. I recently had to put some form validating on pages for a client and thought they were working fine since I could see them in FF, IE7 and Safari, however upon checking in IE6 I'm seeing that nothing is being checked. I see no errors on my pages, and don't know why it would be happening. Also of note on the pages is that even in the browsers where it does work, when you submit the page and receive error messages they don't disappear when you put good data into the input fields. The pages can be seen a href=http://www.doralbank.com/en/sub-pages/ doral-interested.aspxhere/a and a href=http://www.doralbank.com/ en/sub-pages/doral-contact-us.aspxhere/a
[jQuery] Re: Validating not happening in IE6 no error removal on keyup
Grr here's the urls. Contact Us form: http://www.doralbank.com/en/sub-pages/doral-contact-us.aspx Interested Form: http://www.doralbank.com/en/sub-pages/doral-interested.aspx
[jQuery] Re: What is the easiest way to add events to dynamically added rows?
Travis, I am planning on taking a look at Listen, but I was wondering if the Delegate plugin has the same functionality as Listen. The reason I'm inquiring about Delegate is because I am using the Validation plugin, which requires Delegate. Thanks for your help. It looks like Delegate provides similar functionality (although Listen offers more functionality.) However, if you're only interested in attaching behaviors to elements,with no need to remove events, than Delegate should do the job nicely. -Dan
[jQuery] Re: window resize event causes IE6 IE7 to hang
Hi Sean, I'm guessing what's happening is as you resize the div to the height of the window - 270 it expands the document height which triggers another resize. Do you have a URL to this page? Cheers, -Jonathan On 2/21/08, SeanR [EMAIL PROTECTED] wrote: Hi all, I'm using $(window).resize() to adjust a div height on the fly. I've found that rapidly changing the window size causes IE6 IE7 to hang - I guess because too many events are being fired for IE to cope? Here's my code : function content_resize() { var w = $( window ); var H = w.height(); $( '#content' ).css( {height: H-270} ); } $(document).ready(function() { $( window ).resize( content_resize ); content_resize(); }); I'm using jquery 1.2.2 and the dimensions plugin. I've also tried the wresize plugin which addresses duplicated resize events in IE but both cause the same hang when browser window altered quickly. Anyone else seen this? Are there any workarounds? [Apologies for repost, my first got lost in another thread] Regards Sean sean ronan activepixels office : 01245 399 499 email : [EMAIL PROTECTED] web :activepixels.co.uk Activepixels is a limited company registered in England and Wales. Registered number: 5081009. Registered office: Suite SF8, The Heybridge Business Centre, 110 The Causeway, Maldon, Essex, CM1 3TY.
[jQuery] Re: IE/Opera problem using ClueTip
I want to help. I can't promise when I'm going to get to it, though. I'm really sorry. I have a flood of tasks that I haven't even been able to look at yet. --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com On Feb 21, 2008, at 1:40 AM, fshuja wrote: Please help me out! i have a project based on this and its delaying...
[jQuery] Re: select first item over multiple lists
Hi RG, Try $('ul li:first-child') instead. that should do it. http://docs.jquery.com/Selectors/firstChild Cheers, --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com On Feb 20, 2008, at 7:40 PM, RG wrote: I have a feeling this is easy, but I can't seem to wrap my head around it. I want to match the first item of multiple lists. For example below, I would like a set with the foo 1 and bar 1 items . Can I get this using one match? My tries keep coming back to something like $('ul li:first'), but that only matches foo 1 of course. Thanks for any help! ul lifoo 1/li lifoo 2/li lifoo 3/li /ul ul libar 1/li libar 2/li libar 3/li /ul
[jQuery] Re: What is the easiest way to add events to dynamically added rows?
@whylom Sorry if my reply was cryptic (I don't remember when). The thing is I already answered that question a few times. I'll throw in a few differences, but let me say both are good plugins, they help on similar situations with different approaches. Note that I haven't ever used LiveQuery so I cannot say much, I'll just say what I know, read both documentations if you want a fairer comparation. LiveQuery is easier to use, as in, you don't need much understanding, it just does what it is meant to do. It's more reliable to, as it works for any event and any selector. Also it allows to execute functions when elements are added/removed, sort of like Firefox's Mutation events. It surely has more pros but as I said, I've never used it, so that's all I know. Listen is light, and fast. Is designed to be almost 100% scalable. Meaning it doesn't matter if you register 20 selectors to the same element/event. It should take nearly the same time to evaluate when the event comes. Also, as Dan said, it binds initially and then just listens, this also contributes to scalability. On the other hand, some events cannot be handled because they don't bubble. Luckily blur and focus (which are oftenly needed) can now be handled with Listen. Well, that's it. Thanks Dan for supporting Listen :) Cheers Ariel Flesler On 21 feb, 12:56, whylom [EMAIL PROTECTED] wrote: Wow - I asked Ariel Flesler (the developer of the Listen plugin) to explain why one would use it instead of LiveQuery. His response was way more cryptic than yours. Thanks for cutting through the haze, Dan! On Feb 20, 2:38 pm, Dan G. Switzer, II [EMAIL PROTECTED] wrote: I am dynamically removing and adding rows using AJAX calls. Is it still a better idea to go with Listen? IMO, yes. You won't have the polling overhead like you do with LiveQuery. The $.Listen() plug-in only attaches itself once and then just listens for matching key events on it's children to see if it should trigger off a callback. IMO this is much cleaner solution and it's less likely to introduce any kind of memory leaks (since there's only one event ever attached.) -Dan- Ocultar texto de la cita - - Mostrar texto de la cita -
[jQuery] Re: Validating not happening in IE6 no error removal on keyup
I seem to have fixed the IE6 issue by not using the packed version and instead putting in un-packed and un-minified version. Now I get the proper validation checks in IE6, but the erros still don't go away when someone enters in information. On Feb 21, 10:34 am, scud [EMAIL PROTECTED] wrote: I've got two issues. I recently had to put some form validating on pages for a client and thought they were working fine since I could see them in FF, IE7 and Safari, however upon checking in IE6 I'm seeing that nothing is being checked. I see no errors on my pages, and don't know why it would be happening. Also of note on the pages is that even in the browsers where it does work, when you submit the page and receive error messages they don't disappear when you put good data into the input fields. The pages can be seen a href=http://www.doralbank.com/en/sub-pages/ doral-interested.aspxhere/a and a href=http://www.doralbank.com/ en/sub-pages/doral-contact-us.aspxhere/a
[jQuery] change image src not working in IE6
group, i just ran across an issue in IE6, that works in both Safari and Firefox. I am simply trying to change the source of an image using: $('img#tab2').attr(src,/b_tab2_on.png); img id=tab2 src=/b_tab2_off.png border=0 alt=colors/ I've noticed that in IE, the object is found but the attr array is empty. Has anyone else run across this before in IE? I can't post the page, perhaps an example, but wanted to ping the group to see if anyone has come across this, seems pretty simple. thanks, -- mike
[jQuery] Re: Accessing elements from another frame
Nobody have a suggestion for this?? On Feb 19, 10:52 am, Thierry [EMAIL PROTECTED] wrote: I, Is there an easy way to reproduce the following using only jquery? I am trying to hide and show an element in a specificframefrom anotherframe. This code is actually working but I would prefer using jquery to do it. ... var lLoadingDiv = top.content.document.getElementById('loading_div'); lLoadingDiv.style.display='inline'; ... Where content is the name of my targetframe. I want to use the show() and hide() jquery function instead. Thanks, Thierry
[jQuery] Re: How to keep text from being highlighted when I'm handling the mouse events
We recently dealt with the same problem with IE on the Fluid project. We fixed it by trapping both the ondrag and onselectstart events. Note: these events only need to be trapped in IE and they are not jQuery events so you need to cast the object to a browser DOM object before trapping. Here is our code. Note that domNode is a jQuery object that was set up in an earlier function and get(0) is what casts it to a browser DOM object. if (jQuery.browser.msie) { domNode.get(0).ondrag = function () { return false; }; domNode.get(0).onselectstart = function () { return false; }; } - Eli Cochran user interaction developer ETS, UC Berkeley On Feb 20, 5:23 pm, timothytoe [EMAIL PROTECTED] wrote: Thanks. I got it to work with 2 preventDefaults (the one for IE and the one for the other browsers), but I've not tried IE6 yet, so I may yet need to have your tricks up my sleeve. Thanks. I'll get back here with a final listing of code once I'm sure I'm working on all the A- grade jQuery-supported browsers. On Feb 20, 12:07 pm, Josh Nathanson [EMAIL PROTECTED] wrote: I believe the one for IE is stopPropagation() or something like that. Also, did you try putting return false after all the other code for your mousemove? I seem to recall that helped me in a similar situation. $(#actionSurface).mousemove(function(e){ ... save off current x and y ... ... move shit around return false; --- add this }); -- Josh - Original Message - From: timothytoe [EMAIL PROTECTED] To: jQuery (English) jquery-en@googlegroups.com Sent: Wednesday, February 20, 2008 11:48 AM Subject: [jQuery] Re: How to keep text from being highlighted when I'm handling the mouse events Yeah, so surprise. Doesn't work on IE. Anyone have any ideas for that browser?
[jQuery] Re: Validating not happening in IE6 no error removal on keyup
I fixed the IE6 not-working issue by not using the packed version of the validate.js, so apparently the packed version is busted in IE6. I went with the full text version and almost all seems to be fine. I still have the problem of the fields not being checked as a user enters in information and navigates through the form.
[jQuery] Re: How to keep text from being highlighted when I'm handling the mouse events
Thanks Eli. On Feb 21, 8:46 am, Eli_Cochran [EMAIL PROTECTED] wrote: We recently dealt with the same problem with IE on the Fluid project. We fixed it by trapping both the ondrag and onselectstart events. Note: these events only need to be trapped in IE and they are not jQuery events so you need to cast the object to a browser DOM object before trapping. Here is our code. Note that domNode is a jQuery object that was set up in an earlier function and get(0) is what casts it to a browser DOM object. if (jQuery.browser.msie) { domNode.get(0).ondrag = function () { return false; }; domNode.get(0).onselectstart = function () { return false; }; } - Eli Cochran user interaction developer ETS, UC Berkeley On Feb 20, 5:23 pm, timothytoe [EMAIL PROTECTED] wrote: Thanks. I got it to work with 2 preventDefaults (the one for IE and the one for the other browsers), but I've not tried IE6 yet, so I may yet need to have your tricks up my sleeve. Thanks. I'll get back here with a final listing of code once I'm sure I'm working on all the A- grade jQuery-supported browsers. On Feb 20, 12:07 pm, Josh Nathanson [EMAIL PROTECTED] wrote: I believe the one for IE is stopPropagation() or something like that. Also, did you try putting return false after all the other code for your mousemove? I seem to recall that helped me in a similar situation. $(#actionSurface).mousemove(function(e){ ... save off current x and y ... ... move shit around return false; --- add this }); -- Josh - Original Message - From: timothytoe [EMAIL PROTECTED] To: jQuery (English) jquery-en@googlegroups.com Sent: Wednesday, February 20, 2008 11:48 AM Subject: [jQuery] Re: How to keep text from being highlighted when I'm handling the mouse events Yeah, so surprise. Doesn't work on IE. Anyone have any ideas for that browser?
[jQuery] Re: formatting/defining variable values
oh, I misunderstood what you meant the first time. .val() instead of check should work originally I had wanted to collect all the values into one variable for the checkboxes, but I ran into some problems so I changed over to making a field for each checkbox. On Feb 20, 9:29 pm, Hamish Campbell [EMAIL PROTECTED] wrote: What version of jQuery are you using? .val() should return rather than undefined if you find inputs successfully. HOWEVER, there is another problem: Putting ':checked' means that if the boxes are NOT checked, jQuery won't find them so .val() doesn't exist for the object. Remove the ':checked' and try again. Cheers, Hamish On Feb 21, 11:32 am, Robert Hill [EMAIL PROTECTED] wrote: Hello I'm collecting a number of values from various form elements: textfield, radio, checkbox. since some of the fields aren't require on my form, when I POST their values they are returned as 'undefined' is there a way in Jquery that would allow me to set all variables that are undefined with a given value like N/A or even just ? for example, after the form is submitted, I'm using the following code to populate my values: //cancer vars var cancerVal = $(input[name='cancer']:checked).val(); var cancerTypeVal = $(#cancerType).val(); var cancerDateVal = $(#cancerDate).val(); var chemoCanVal = $(input[name='chemoCan']:checked).val(); var radiationCanVal = $(input[name='radiationCan']:checked).val(); var surgeryCanVal = $(input[name='surgeryCan']:checked).val(); var otherCanMoreVal = $(input[name='otherCanMore']:checked).val(); doing something like: var chemoCanVal =; before the submit does not seem to help. Alternately, if there is a way that I can use a function to replace all instances of 'undefined' with another value after the form is submitted, that too would work. thanks in advance! cheers, -robert
[jQuery] Re: Accessing elements from another frame
This should do it $(#loading_div, top.content.document).show(); $(#loading_div, top.content.document).hide(); See http://docs.jquery.com/Core/jQuery#expressioncontext for more info. - Richard On Thu, Feb 21, 2008 at 11:03 AM, Thierry [EMAIL PROTECTED] wrote: Nobody have a suggestion for this?? On Feb 19, 10:52 am, Thierry [EMAIL PROTECTED] wrote: I, Is there an easy way to reproduce the following using only jquery? I am trying to hide and show an element in a specificframefrom anotherframe. This code is actually working but I would prefer using jquery to do it. ... var lLoadingDiv = top.content.document.getElementById('loading_div'); lLoadingDiv.style.display='inline'; ... Where content is the name of my targetframe. I want to use the show() and hide() jquery function instead. Thanks, Thierry
[jQuery] Re: change image src not working in IE6
I'm not sure what you mean by the attr array is empty. At any rate, here are a couple threads that may help: img src problem in IE6 http://groups.google.com/group/jquery-en/browse_thread/thread/10079cffbb35ede3 Swapping img src in IE shows blank http://groups.google.com/group/jquery-en/browse_thread/thread/f67fe1972c3b022f - Richard On Thu, Feb 21, 2008 at 11:52 AM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: group, i just ran across an issue in IE6, that works in both Safari and Firefox. I am simply trying to change the source of an image using: $('img#tab2').attr(src,/b_tab2_on.png); img id=tab2 src=/b_tab2_off.png border=0 alt=colors/ I've noticed that in IE, the object is found but the attr array is empty. Has anyone else run across this before in IE? I can't post the page, perhaps an example, but wanted to ping the group to see if anyone has come across this, seems pretty simple. thanks, -- mike
[jQuery] Selecting the ancestor of an element
How would I select the ancestor or parent of an element?
[jQuery] Is this bug in jquery???
i am using jquery version 1.2.3. I was trying to attach hover on area inside map. but find that its working ok in FF but not in IE. when i try to set area onmouseover= then it works for both IE n FF. is this the bug?? If IE supports onmouseover event for area tag inside map tag then hover should work. thnx Faraz
[jQuery] Re: fadeOut and IE6
Anyone? Beuller? bump On Feb 18, 11:40 am, George [EMAIL PROTECTED] wrote: I'm currently building a widget which contains multiple deep dives into sections of a website in a limited amount of space and have run into an issue when using thefadeOutfunction with IE6. Per the requirements of this section, the client wants to have the currently selected item fade out and the new item's background fade in at the same time. This is working great in Firefox, IE7 and Safari, but for whatever reason, thefadeOutfunction doesn't seem to fire correctly in IE6. Has anyone run across this before? You can see a copy of the page at the address below. Any help is much appreciated! - George http://216.120.230.80/~rieekan/homeActionTrayV1.html
[jQuery] Re: is there a secret to jQuery with Opera?
I really appreciate that, Ariel - but am having no end of trouble getting .error to work with this! For now, I'm using my clumsy 'if' clause, but will persist with jQuery .error() until I'm winning ;) From my Google searches, it seems I'm not the only one with an image- detection problem in Opera. I've simply made the function unavailable to Opera. Thank goodness it's not all that popular! Cherry On Feb 21, 11:41 am, Ariel Flesler [EMAIL PROTECTED] wrote: What timothyjoe said is right, why don't you join the jpg-# ? The hash (#...) you add to the url is to avoid caching ? if so, you should use a search (?...) instead. That code is for images-off detection right ? What about this: $('img /') .load(function(){ $('#noimages').attr(href, '/styles/gotimages.css'); }) .error(function(){ $('#noimages').attr(href, '/styles/imagefree.css'); }) .attr('href','/images/bgimage.jpg'); I hope it was indeed helpful. Cheers Ariel Flesler On Feb 21, 1:01 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Glad I'm not the only one :) My code - and it *is* a fudge - uses a pretend variable, written into a bit of hidden html. I doesn't work properly with a real variable (in Opera, neither!) and I'm still looking for an un-fudged solution. Here it is: jQuery.imagesOn = function(){ $('img src=' + '/images/bgimage.jpg' + '#' + Math.random() + '/' ).load(function() { $('#noimages').attr(href, '/styles/gotimages.css'); $('.imagecheck').html('On'); }); if ( $('.imagecheck').val() != 'On' ) { $('#noimages').attr(href, '/styles/imagefree.css'); } } So - well, any comment must be a helpful comment ;) Cheers, Cherry On Feb 21, 3:00 am, timothytoe [EMAIL PROTECTED] wrote: Yeah, the first Windows version didn't seem able to run for 5 minutes without crashing violently. I hated it. The JavaScript has gotten so fast in that browser that a nasty bit of statistics code I run takes 35 seconds on Firefox and 20 seconds in Safari, so I've really started to like Safari. :-) As for Opera, I'm having my own problems with it. It's the only browser my code isn't running on right now, and I haven't had time to figure out why. For me, it's not really Opera's fault. After all, IE causes me the most trouble by far, but I try it every couple days to make sure it's still working. Explain to me what you're doing. Doesn't Math.Random() give you a number from 0 to 1? Is that really your code? Do you really have a # in there? If so, why isn't it part of the previous string? On Feb 20, 6:22 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Aha! My good reason(s) were that an earlier beta repeatedly crashed my machine, and I'm fed up with Apple's creeping-startup-takeover strategy. But the current Safari version installed without a hitch; I guess I'll have to either live with the startups, or spend some time killing them ;) Thanks for the heads-up TT! The page looks the same in Safari as in Firefox ie (phew!). So what's up with Opera? On Feb 21, 1:54 am, timothytoe [EMAIL PROTECTED] wrote: Safari for Windows is a pretty good browser now, especially if you want to have a good idea whether you'll run on Mac Safari (and iPhone). Is there a reason you're not testing with it as well? On Feb 20, 3:45 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Admittedly, the function in question is my own home-fudged one. It depends on: $('img src=' + '/images/thelogo.png' + '#' + Math.random() + '/ ' ).load(function() { Firefox and IE (hurrah) behave as required. Opera doesn't register the changed 'variable' (an .html() function), but loads the no-images stylesheet anyway. Do you understand why this might be? As I haven't got a Mac, I tend to trust that Opera will be at least as demanding as Safari. The thought of all Mac and Opera users getting the image-free version by default scares me to death! I haven't found any relevant documentation. I know this group houses some really hot browser experts - so am pleading for insight advice ... Cherry :/- Hide quoted text - - Show quoted text -
[jQuery] Re: is there a secret to jQuery with Opera?
I've simply made the function unavailable to Opera. Thank goodness it's not all that popular! ...and then you complain about accessibility... :-) Ariel Flesler On 21 feb, 17:10, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I really appreciate that, Ariel - but am having no end of trouble getting .error to work with this! For now, I'm using my clumsy 'if' clause, but will persist with jQuery .error() until I'm winning ;) From my Google searches, it seems I'm not the only one with an image- detection problem in Opera. I've simply made the function unavailable to Opera. Thank goodness it's not all that popular! Cherry On Feb 21, 11:41 am, Ariel Flesler [EMAIL PROTECTED] wrote: What timothyjoe said is right, why don't you join the jpg-# ? The hash (#...) you add to the url is to avoid caching ? if so, you should use a search (?...) instead. That code is for images-off detection right ? What about this: $('img /') .load(function(){ $('#noimages').attr(href, '/styles/gotimages.css'); }) .error(function(){ $('#noimages').attr(href, '/styles/imagefree.css'); }) .attr('href','/images/bgimage.jpg'); I hope it was indeed helpful. Cheers Ariel Flesler On Feb 21, 1:01 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Glad I'm not the only one :) My code - and it *is* a fudge - uses a pretend variable, written into a bit of hidden html. I doesn't work properly with a real variable (in Opera, neither!) and I'm still looking for an un-fudged solution. Here it is: jQuery.imagesOn = function(){ $('img src=' + '/images/bgimage.jpg' + '#' + Math.random() + '/' ).load(function() { $('#noimages').attr(href, '/styles/gotimages.css'); $('.imagecheck').html('On'); }); if ( $('.imagecheck').val() != 'On' ) { $('#noimages').attr(href, '/styles/imagefree.css'); } } So - well, any comment must be a helpful comment ;) Cheers, Cherry On Feb 21, 3:00 am, timothytoe [EMAIL PROTECTED] wrote: Yeah, the first Windows version didn't seem able to run for 5 minutes without crashing violently. I hated it. The JavaScript has gotten so fast in that browser that a nasty bit of statistics code I run takes 35 seconds on Firefox and 20 seconds in Safari, so I've really started to like Safari. :-) As for Opera, I'm having my own problems with it. It's the only browser my code isn't running on right now, and I haven't had time to figure out why. For me, it's not really Opera's fault. After all, IE causes me the most trouble by far, but I try it every couple days to make sure it's still working. Explain to me what you're doing. Doesn't Math.Random() give you a number from 0 to 1? Is that really your code? Do you really have a # in there? If so, why isn't it part of the previous string? On Feb 20, 6:22 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Aha! My good reason(s) were that an earlier beta repeatedly crashed my machine, and I'm fed up with Apple's creeping-startup-takeover strategy. But the current Safari version installed without a hitch; I guess I'll have to either live with the startups, or spend some time killing them ;) Thanks for the heads-up TT! The page looks the same in Safari as in Firefox ie (phew!). So what's up with Opera? On Feb 21, 1:54 am, timothytoe [EMAIL PROTECTED] wrote: Safari for Windows is a pretty good browser now, especially if you want to have a good idea whether you'll run on Mac Safari (and iPhone). Is there a reason you're not testing with it as well? On Feb 20, 3:45 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Admittedly, the function in question is my own home-fudged one. It depends on: $('img src=' + '/images/thelogo.png' + '#' + Math.random() + '/ ' ).load(function() { Firefox and IE (hurrah) behave as required. Opera doesn't register the changed 'variable' (an .html() function), but loads the no-images stylesheet anyway. Do you understand why this might be? As I haven't got a Mac, I tend to trust that Opera will be at least as demanding as Safari. The thought of all Mac and Opera users getting the image-free version by default scares me to death! I haven't found any relevant documentation. I know this group houses some really hot browser experts - so am pleading for insight advice ... Cherry :/- Hide quoted text - - Show quoted text -- Ocultar texto de la cita - - Mostrar texto de la cita -
[jQuery] Re: Selecting the ancestor of an element
See http://docs.jquery.com/Traversing/parent#expr http://docs.jquery.com/Traversing/parents#expr - Richard On Thu, Feb 21, 2008 at 12:33 PM, AsymF [EMAIL PROTECTED] wrote: How would I select the ancestor or parent of an element?
[jQuery] Tracking mousemove: Position inside a div
How do I get the position of a mouse within a div when I'm getting events from mousemove? If it helps, I'm already including dimensions.js for the myriad extensions that want it. I understand that I can get pageX or clientX but what I want is X inside that DIV where I have mousemove tracking on.. I want to make sure I'm getting (0,0) rock solid in the upper left corner of that div in all cases.
[jQuery] Re: Tracking mousemove: Position inside a div
Never mind. The answer has to do with jQuery's $().offset() function. I got it. On Feb 21, 12:05 pm, timothytoe [EMAIL PROTECTED] wrote: How do I get the position of a mouse within a div when I'm getting events from mousemove? If it helps, I'm already including dimensions.js for the myriad extensions that want it. I understand that I can get pageX or clientX but what I want is X inside that DIV where I have mousemove tracking on.. I want to make sure I'm getting (0,0) rock solid in the upper left corner of that div in all cases.
[jQuery] Re: IE problems with prepend since 1.2.3?
Please paste in the code that calls the prepend function, the problem is most likely there. Karl Rudd On Thu, Feb 21, 2008 at 2:31 PM, jody [EMAIL PROTECTED] wrote: IE6 and IE7 since upgrading to jQuery 1.2.3 is targeting line 264 in the jquery.js (uncompressed) with the error message, Unexpected call to method or property access. Here's the bit in jQuery it's referencing: prepend: function() { return this.domManip(arguments, true, true, function(elem){ if (this.nodeType == 1) this.insertBefore( elem, this.firstChild ); }); }, Specifically line 264 is claimed to be the culprit: this.insertBefore( elem, this.firstChild ); . Per usual, Firefox, Safari, and Opera work fine. It could well be my code that's triggering my latest battle with IE, but I thought I'd at least ask here. I've spent the last 2-3 hrs or so refactoring, etc. to see if messy code was causing the problem, but no luck. I consistently get this same error from the MS script debugger. Maybe this is something someone else has run into, if so, any help is appreciated. Thanks, jody
[jQuery] how to remove a behavior?
Hi, I have this function ... function defineBehaviors() { $('a.deleteWorksheetItem').click( function() { alert(Executing action); }); } and I notice (at least in PC Firefox) if I call this function twice on a page, clicking the link causes the action to be executed twice -- in the above case, there are two alert boxes. My question is, how can I prevent the action from being defined multiple times or how do I remove any function associated with the action before re-defining it? Thanks, - Dave
[jQuery] random tab and simple content switching
I'm having trouble with a content switcher and I think my issue is understanding how to targeting utilizing 'this' Here's my HTML and script: [code] div id=mainArticle div id=latestArticle class=article h1spantab 1/span/h1 div class=teasercontent/div /div div id=inTheMag class=article h1spantab 1/span/h1 div class=teasercontent/div /div /div $(document).ready(function() { $('#mainArticle .latestArticle .teaser').hide(); $('#mainArticle .latestArticle h1 span').addClass(hidden); $('#mainArticle div').each(function(){ $('h1 span',this).click(function(){ $('#mainArticle h1 span').addClass(hidden); $('h1 span',this).removeClass(hidden); $('#mainArticle .teaser').hide(); $('.teaser',this).slideDown('slow'); }); }); }); [/code] I also want to make which div displays random, so any help on that would be great too.
[jQuery] Re: window resize event causes IE6 IE7 to hang
I've found that rapidly changing the window size causes IE6 IE7 to hang - I guess because too many events are being fired for IE to cope? Exactly. Try using a setTimeout so that the resize only fires every 100ms or so, you can vary it depending on how fluid you want the animation vs how much CPU your code will eat. Let's see... I know it's been discussed on this list before... ...[ search ]...Aha: http://groups.google.com/group/jquery-en/browse_thread/thread/4a00d513c63f5c00 http://groups.google.com/group/jquery-en/browse_thread/thread/3308d5cb71c77456 You can see how I've implemented it in my (beta) Caption Plugin here: http://code.doublerebel.com/jQuery/jquery.caption.beta.js HTH Charles
[jQuery] Re: Port FCK/TinyMCE to jQuery
I've always wanted to port TinyMCE to jQuery -- you can fit _the entire jQuery_ into TinyMCE in _the same amount of code_ as their DOM Manipulation and Effects methods, (I've done the calculations, it might even make TinyMCE smaller!), and I bet it would be faster too. That being said, it unfortunately is not a priority in any of my projects, but the adapter is a great start. It would definitely create a ton more (even accidental) jQuery converts, if jQuery was the base. It would be perfect, now to just find the time... Charles On Feb 21, 10:35 am, Spocke [EMAIL PROTECTED] wrote: TinyMCE has an experimental adapter for jQuery this makes it a bit smaller and replaces most of the core logic like the XHR, element selector, dom functions etc. But even if we replaced those the package is still quite large. The big parts are the UI elements, the DOM Serializer and the overall editor logic so the size gain is not that large but you get petter performance out of it. One thing would be to add TinyMCE as an plugin for jQuery when you enable these adapters as suggested that would be a powerful feature and take the best of both worlds we will take that in to consideration. Some say that TinyMCE is too large I say that you can't make an editor super small and still have the features required to make an XHTML editor that generates decent output across all browsers. Some of the so called small editors I've seen isn't even close to generating correct output on for example IE. Font tags, br elements etc etc. Much of the logic in TinyMCE is there for a reason to make a normalized behavior across all browsers much like jQuery does it with the DOM API. But feel free to checkout the adapter most of the logic is done by Stefan Petre so he really deserves the credit for this one. Feel free to add to it if you want and send in patches. It's available in the tinymce dev package. On Feb 21, 12:45 pm, weepy [EMAIL PROTECTED] wrote: http://batiste.dosimple.ch/blog/posts/2007-09-11-1/rich-text-editor-j... On Feb 21, 9:20 am, Gordon [EMAIL PROTECTED] wrote: Thanks for pointing that out. But what I'm more concerned with is the fact you're downloading TinyMCE, PLUS jQuery, PLUS the plugin so it's lot of stuff being downloaded, and much of the code you actually have downloaded is just duplicated effort. Both jQuery and MCE implement DOM selectors, iterators and manipulators, both implement an XHR wrapper, both implement event models, etc. What I was wondering has anybody taken the MCE code, cut its DOM, XHR, etc out and wired the jQuery ones in in their place? That'd eliminate duplication of effort between the two, and result in a smaller download size. On Feb 20, 5:27 pm, tlphipps [EMAIL PROTECTED] wrote: Regarding using jquery to 'attach' the editor, there is a plugin that I believe does just that:http://groups.google.com/group/jquery-en/browse_thread/thread/d33630d... On Feb 20, 10:33 am, Gordon [EMAIL PROTECTED] wrote: I've been usingTinyMCEto build a CMS that's also being built around jQuery for other functionality, and I got to thinking, a lot of the TinyMCEcode is simply replicating functionality that's already in jQuery (DOM selectors. XHR, etc), so has anybody tried to remove this stuff from the MCE codebase and use the jQuery implementations instead? Additionally, how about using jQuery functionality to attach editors to controls? For example $('textarea').tinyMCE() to attach editors to all elements, or $('#myEditor').tinyMCEto replace just a specific instance. You could use any CSS rule you wanted to determine where an editor should be created in theory. And how about using jQuery UI to implement MCE's inline popup windows? I do know there's WYM, which is built on jQuery, but that's very early on in its development and also appears to have stalled.
[jQuery] Re: Request parameters from dynamically added html element are missing on the server side
Hello Chris, It will be difficult to debug this combination of code without an example page we can view. Can you please provide us with a link? Charles On Feb 21, 2:28 am, chris [EMAIL PROTECTED] wrote: Hi there, I tried to create input element dynamically using jQuery, in form of text field and file upload. But somehow when I dumped all my request parameters on the server side, I never received these parameters even though I saw the the input elements were created on HTML form. Could someone give me a hint ? I use jsp and java on the server side, jQuery 1.1.4, and jQuery Multiple File Upload Plugin v1.26. This is the snippet of the code : script src=%= themeDisplay.getPathJavaScript() %/jquery/jquery.js type=text/javascript/script script src=%= themeDisplay.getPathJavaScript() %/geco/ jquery.MultiFile.js type=text/javascript/script form action=blabla.jsp method=post enctype=multipart/form-data tr tdinput type=text name=portlet:namespace /portalurl0 id=portlet:namespace /portalurl0 / /td tdinput type=text name=portlet:namespace /profileid0 id=portlet:namespace /profileid0 //td tdinput type=button value=Add onclick=portlet:namespace /addjquery() / input type=button value=Profilvorlage / /td input type=hidden name=counter value=1 id=portlet:namespace /counter / /tr /table /td /tr tr td/td td div id=portlet:namespace /profile /div /td /tr tr tdbAttach CV/Resume/b/td tdinput type=file name=resumefile id=portlet:namespace /my_file_element / /td /tr /form script type=text/javascript $(document).ready(function(){ $('#portlet:namespace /my_file_element').MultiFile({ accept:'txt|doc|rtf', max:7, STRING: { remove:'Remover', selected:'Selecionado: $file', denied:'Invalid file extension $ext!' } });}); /script script type=text/javascript function portlet:namespace /addjquery(){ var profileurl = document.getElementById(portlet:namespace /portalurl0).value; var profileid = document.getElementById(portlet:namespace /profileid0).value; var id = document.getElementById(portlet:namespace /counter).value; $(#portlet:namespace /profile).append(p id='portlet:namespace /row + id + '+profileurl+nbsp;nbsp;+profileid+input type='hidden' name='profileurl[+id+]' value='+profileurl+'input type='hidden' name='profileid[+id+]' value='+profileid +'nbsp;nbsp;a href='#' onClick='portlet:namespace /removeFormField(\#portlet:namespace /row + id + \); return false;'Remove/ap); id = (id - 1 ) + 2; document.getElementById(portlet:namespace /counter).value = id; } function portlet:namespace /removeFormField(id){ $(id).remove(); } /script
[jQuery] Re: is there a secret to jQuery with Opera?
I deserve that! I have provided a PHP style switcher, though, so all that's lost is the unobtrusive stylesheet serving with Javascript.. Before I started playing with all this js, I hadn't realised how difficult it is to get everything working as it should do with all the browsers. Knowing less than nothing about how browsers actually work, I have no view on why this might be! Like other developers, I'm under increasing pressure to incorporate more 'action' - meaning, more Javascript Flash - and am starting to feel pretty annoyed that it seems impossible, without sacrificing useability. Which probably brings me back to where I was before, so I'll shut up now!! Cherry ;) On Feb 21, 7:23 pm, Ariel Flesler [EMAIL PROTECTED] wrote: I've simply made the function unavailable to Opera. Thank goodness it's not all that popular! ...and then you complain about accessibility... :-) Ariel Flesler
[jQuery] Re: random tab and simple content switching
update: I'm still looking for the random side of things, but I've got a solution for the switching. However, I'm a little concerned that I'm targeting h1 rather than the span (how do I go back two parents?) $(document).ready(function() { $('#mainArticle #latestArticle .teaser').hide(); $('#mainArticle #latestArticle h1 span').addClass(hidden); $('#mainArticle div h1').click(function(){ var place = $(this).parent().attr(id); $('#mainArticle h1 span').addClass(hidden); $('#' + place + ' h1 span').removeClass(hidden); $('#mainArticle .teaser').hide(); $('#' + place + ' .teaser').slideDown('slow'); }); });
[jQuery] Re: bind method to easily create closures with this altered.
On Feb 22, 1:18 am, whylom [EMAIL PROTECTED] wrote: I'm not sure what illegal Javascript syntax is. It means that it is syntax that is not specified as being correct per the ECMAScript specification and can therefore be expected to throw an error before execution begins. I just tested Jörn's code and it runs without errors, and lets you do this: My reply was to the OP, not Jörn. -- Rob
[jQuery] Re: How to keep text from being highlighted when I'm handling the mouse events
Returning false for onselectstart iseverely/i depressed my frame rate, which is ridiculous. I tried it in code, and I tried it in the html (ondragstart=return false onselectstart=return false). Either way, wham! Any way you can test to see if you were hit? Perhaps you were doing something less demanding than I am? Or on a faster PC? On Feb 21, 8:46 am, Eli_Cochran [EMAIL PROTECTED] wrote: We recently dealt with the same problem with IE on the Fluid project. We fixed it by trapping both the ondrag and onselectstart events. Note: these events only need to be trapped in IE and they are not jQuery events so you need to cast the object to a browser DOM object before trapping. Here is our code. Note that domNode is a jQuery object that was set up in an earlier function and get(0) is what casts it to a browser DOM object. if (jQuery.browser.msie) { domNode.get(0).ondrag = function () { return false; }; domNode.get(0).onselectstart = function () { return false; }; } - Eli Cochran user interaction developer ETS, UC Berkeley On Feb 20, 5:23 pm, timothytoe [EMAIL PROTECTED] wrote: Thanks. I got it to work with 2 preventDefaults (the one for IE and the one for the other browsers), but I've not tried IE6 yet, so I may yet need to have your tricks up my sleeve. Thanks. I'll get back here with a final listing of code once I'm sure I'm working on all the A- grade jQuery-supported browsers. On Feb 20, 12:07 pm, Josh Nathanson [EMAIL PROTECTED] wrote: I believe the one for IE is stopPropagation() or something like that. Also, did you try putting return false after all the other code for your mousemove? I seem to recall that helped me in a similar situation. $(#actionSurface).mousemove(function(e){ ... save off current x and y ... ... move shit around return false; --- add this }); -- Josh - Original Message - From: timothytoe [EMAIL PROTECTED] To: jQuery (English) jquery-en@googlegroups.com Sent: Wednesday, February 20, 2008 11:48 AM Subject: [jQuery] Re: How to keep text from being highlighted when I'm handling the mouse events Yeah, so surprise. Doesn't work on IE. Anyone have any ideas for that browser?
[jQuery] How could I pass an object into an eval statement
For instance, say a function is passed an object and that function is supposed to set an event to fire on a timeout, how would I do it? Even more complicated, how would I do it if I needed to perform the action on a sub-selection of the object passed? If I wanted to do this and I have just id's, then I could do the following: setTimeout($(#' + obj.id + #message').fadeOut('slow', function () {$(this).remove();});, 5000); But what if the object passed doesn't have an id?
[jQuery] jquery and math functions
Is there something special that needs to be done to values selected with jQuery so math functions can work on them? parseInt or something? I am not sure, but all my calculations are getting NaN. For example, I have the following function that always produces NaN: var startmin = $(#timestartmin); var stopmin = $(#timestopmin); var totaltime = startmin - stopmin; $(#totaltime).val(totaltime); } I've tried adding .val to the first two lines, I've tried parseInt to separate temp variables, I just keep on getting NaN even though it is pulling numbers from the two fields. Any ideas? -Vlad
[jQuery] using functions as extensions - why does FF not take it?
has anyone had the following problem before? VERSION 1 =// works in IE and FF myFunction(){ ... } document.onmousedown=myFunction; VERSION 2 =// works in IE but not in FF jQuery.fn.extend({ myFunction: function() { ... } }); $(document).mousedown(function(){ $().myFunction(); });
[jQuery] Re: Accessing elements from another frame
Thanks for the answer, but this does not work. And there is no error generated (in the error console). I am using jquery 1.2.2 Any idea? On Feb 21, 12:57 pm, Richard D. Worth [EMAIL PROTECTED] wrote: This should do it $(#loading_div, top.content.document).show(); $(#loading_div, top.content.document).hide(); See http://docs.jquery.com/Core/jQuery#expressioncontext for more info. - Richard On Thu, Feb 21, 2008 at 11:03 AM, Thierry [EMAIL PROTECTED] wrote: Nobody have a suggestion for this?? On Feb 19, 10:52 am, Thierry [EMAIL PROTECTED] wrote: I, Is there an easy way to reproduce the following using only jquery? I am trying to hide and show an element in a specificframefrom anotherframe. This code is actually working but I would prefer using jquery to do it. ... var lLoadingDiv = top.content.document.getElementById('loading_div'); lLoadingDiv.style.display='inline'; ... Where content is the name of my targetframe. I want to use the show() and hide() jquery function instead. Thanks, Thierry
[jQuery] Re: Grouping within a list
I've come up with a solution to make the nested lists. I'd be happy for any comments or pointers on the code as this is still all a bit new for me and I think that I should be able to avoid the first enumerate through. Thanks ul id=header li id=green class=groupheader ul li class=greengrass/li li class=greentrees/li /ul li id=blue class=groupheader ul li class=bluesky/li li class=bluesea/li /ul li id=yellow class=groupheader ul li class=yellowsun/li li class=yellowbanana/li /ul /ul var savedClass=; var groups=new Array; /* For each list item*/ jQuery(ul#header li).each(function(){ /*Identify each distinct class (or group)*/ if (jQuery(this).attr(class)!=savedClass) { savedClass=jQuery(this).attr(class); /*Create an array of the group/class titles*/ groups.push(savedClass); } }); /*Loop through all class/groups*/ for( var i = 0; i groups.length; i++ ) { /*Create the group header*/ jQuery('ul#header').append('li class=groupheader id=' + groups[i] + ''); /*Add all the group members to the header and wrap them in a nested list**/ jQuery('ul#map_header li.' + groups[i]).appendTo(# + groups[i]).wrapAll(ul/ul); } On Feb 20, 9:10 pm, caroig [EMAIL PROTECTED] wrote: Thanks, I've used it a few time. What I'm not sure about is how to identify the first item in each class, create a ul header for it and then add all the items in the class below that. I can see how I could do it if I had an array of the distinct classes, but I'm not sure with jQuery if there is a quick way of getting hold of this, without enumerating through all items explicitly. On Feb 20, 8:36 pm, tlphipps [EMAIL PROTECTED] wrote: Might want to look at the treeview plugin:http://plugins.jquery.com/project/treeview On Feb 20, 12:11 pm, caroig [EMAIL PROTECTED] wrote: I have an app which is producing a ul something like this:- ul li class=greengrass/li li class=greentrees/li li class=bluesky/li li class=bluesea/li li class=yellowsun/li li class=yellowbanana/li /ul I want to create a group the items by the class and then enable toggling of the group along the lines of:- + green - blue sky sea + yellow I guess my best solution is to create a nested list for each class. I have some javascript that does more or less the same thing, but I'm not sure how to identify each of the classes without iterating through the whole lot in jQuery.
[jQuery] [validate] maxLength for elements that are not required
Hey Jörn, It seems that whenever I define an element as not required:false and set a maxLength the validation plugin wouldn't bother limiting the field to the maxLength, When I switch to required:true - everything works perfectly. Is there a solution to that? Thanks, Yuval Karmi
[jQuery] Tool tip advice
Hey all, the design team here has a grid/table layout, with each image in a cell causing a tooltip style popup. Ok so, no worried so far, BUT, for the last column, the tool tip flips it's orientation so it doesn't display over the page border. So image a 2x4 table, which images in each cell. Each image will have the mouse over event to trigger the tooltip. The tool tip itself has graphical borders with live text, just to make things easier. I'm going to make the assumption that the tooltip doesn't float, or folow the mouse, but rather it's in a fixed position, which is relevent to the cell that has the image. Any recommendations?
[jQuery] Re: preventDefault() not working in FF?
actually, when you drag an image, the browser thinks you want to save it to the desktop or something, so it starts that default action. in IE, this is overridden with the preventDefault() but in FF this does not work. at least not in the functino I use it in. On Feb 20, 5:41 am, Ariel Flesler [EMAIL PROTECTED] wrote: What do you expect e.preventDefault() to do in that case ? The only default behavior I could think of, for mousemove, is the hovering reaction and that, I don't think you can prevent. Cheers Ariel Flesler On 20 feb, 01:43, jquertil [EMAIL PROTECTED] wrote: does anyone know why the preventDefault() would work fine in IE but not in Firefox? I tired placing it elsewhere and putting it in multiple plaves - no luck... Thanks for any pointers! isMouseDown = false; $('#dragger').mousedown(function(e){ isMouseDown = true; $(document).mousemove(function(e){ e.preventDefault(); // this bit for some reason is not taken seriously by Firefox if(isMouseDown == true){ // move things... } });}).mouseup(function(e){ isMouseDown = false; });- Ocultar texto de la cita - - Mostrar texto de la cita -- Hide quoted text - - Show quoted text -
[jQuery] JQuery site is blank for one user
Hi all, I've built a JQuery website, www.constitreaty.com, and tested it successfuly on Win XP Pro and Vista with IE6, IE7, Firefox 2 and Opera 9.25, as well as Mac OSX 10.4.8 with Firefox 2. One user has contacted me, as he cannot view the site on his Win XP Home SP2 PC, with either IE7 or Firefox 2 (both fully updated, with Javascript enabled). He gets a blank page, not even the noscript html. When disabling his firewall (Zone Alarm Pro) and anti-virus software (AVG 7.5), it's just the same (I was suspecting a false positive, as was reported recently regarding some anti-virus software detecting Dean Edwards packed JQuery .js as malware, but it wasn't this). I asked the user to go to http://jquery.com/test/ , but the test suite also resulted in a blank page, apart from the heading. Now I'm out of ideas. Can anyone suggest what might be causing this user to see a blank page instead of my website or the JQuery test suite? regards, Andrew
[jQuery] Re: Taconite and Jquery 1.2.3
Thanks Mike. I'll keep checking. Maybe I'm doing some mistake with the javascript file. I do have another problem that perhaps you know what is causing it. I created this example: http://72.18.207.149/english/taconite-test.html When you click on the form, the form disappears, because the subsequent page has no html, only taconite commands. So to solve the problem, I'm using a replaceContent to again put a copy of the form on the original DIV, which has ID=test: taconite replaceContent select=#window-new Test successful /replaceContent slideToggle select=#window-new value=10 / replaceContent select=#test BR / form method=post action=somecgi.cgi ... form here ... /form /replaceContent /taconite For some reason, the replacecontent is not inserting the HTML, and firebug generates the node cannot be inserted message. Any theories? Also, I appreciate that you take the time to help people with your plugins. You should put a donation button on your site. Your plugins are great. Peter :) On Feb 21, 5:16 am, Mike Alsup [EMAIL PROTECTED] wrote: Peter, I just updated the demos to use jQuery 1.2.3 and I'm not seeing any problems: http://www.malsup.com/jquery/taconite/#examples The diff between replace and replaceContent boils down to what is being replaced. With replace, the entire element is replaced. With replaceContent only the content of the selected element is replaced (just like jQuery's html function). Mike On Wed, Feb 20, 2008 at 8:20 PM, lvp1138 [EMAIL PROTECTED] wrote: Has anyone been able to use Mike's great Taconite plugin with the latest jquery? When using Jquery 1.2.1, Firebug shows: [taconite] Plugin Version: 3.01 [taconite] [AJAX response] content-type: text/xml; status: 200 OK; has responseXML: true [taconite] type: undefined [taconite] responseXML: [object XMLDocument] [taconite] XML document root: taconite ... [taconite] time to process response: 171ms If I replace Jquery with 1.2.3 and do no change in coding: [taconite] Plugin Version: 3.01 [taconite] [AJAX response] content-type: text/xml; status: 200 OK; has responseXML: true [taconite] type: html [taconite] responseXML: [object XMLDocument] [taconite] jQuery core httpData returned: taconite ... [taconite] httpData: response is not XML (or not valid XML) I've even removed all HTML and left Taconite's replacecontent empty to see if perhaps I had some typo somewhere. But it anyway did the same. Talking about replacecontent, what is the difference between Taconite's replace and replacecontent? I've played with both and sometimes I can make things work with one and sometimes with the other. Peter :)
[jQuery] Can't Add a checked=checked Attribute to Input tag
Very simply, I want this function to attach the attribute checked=checked to the input with the id=ext[agree]Y. The following code does not do this and I'm not sure why... $(ext\\[agree\\]Y).attr(checked, checked); Any help or ideas is greatly appreciated. Other ways of doing this would be great as well. I just want to add this upon form submission. Thanks.
[jQuery] Re: Selecting the ancestor of an element
How would I select the parent that ONLY has that child? For instance, the following selects too many parents: $($(childObj).parent().get(0).tagName + ':has(#' + childObj.id + ')') On Feb 21, 2:25 pm, Richard D. Worth [EMAIL PROTECTED] wrote: See http://docs.jquery.com/Traversing/parent#expr http://docs.jquery.com/Traversing/parents#expr - Richard On Thu, Feb 21, 2008 at 12:33 PM, AsymF [EMAIL PROTECTED] wrote: How would I select the ancestor or parent of an element?
[jQuery] xml webservice callback document.domain
I am trying to call a .net webservice with a get and no parameters. It is returning a simple xml doc with a single string element like this: ?xml version=1.0 encoding=utf-8? string xmlns=http://www.mysite.com/; blahblah /string /xml here is the jquery code I am using: $.ajax({ type:GET, dataType: xml, url:$link.attr('href'), contentType: application/x-www-form-urlencoded, data: {useSsl:useSsl}, success: function(data){ var res = $('string',data).text(); $('#' + dest).html(res); }, error: function(data){ ShowErrorMessage(dest); } }); This works great in all browsers EXCEPT on pages where document.domain=mysite.com; is set. It seems if the datatype is set to xml on the pages in question the success callback is never fired in firefox, no js errors show up in firebug either and IE works as expected. If I change the datatype to text and then in the callback make it: var res=$(data).text(); it works wonderful in firefox, but only comes up with a blank string in IE doh! any suggestion on how to make it work? we currently require the document.domain setting because of iframing some 3rd party content. any help is appreciated, this is driving me crazy.
[jQuery] Form submission without reloading modal window
Hello, I am looking for a solution to submit a form and instead of refreshing the whole page just refresh the contents of a div tag. Can anyone point me in the right direction? I tried jframes, but I can't figure out how to get the form to not open a new window. Thanks in advance! Let me know if more information is needed. -- ~Steve http://goodcf.instantspot.com/blog
[jQuery] Div Changer Using Hide And Show
I created this script to hide and show divs on a web page I am working on. It is working properly as far as the effects on the page go. I was just wondering if there is any way I can clean it up or make it simpler. Thanks. $(document).ready(function(){ //THIS HIDES ALL LISTED DIVS ON LOADING OF PAGE $('div.blackbook').hide(); $('div.canvas').hide(); $('div.pencil').hide(); $('div.murals').hide(); $('div.shows').hide(); $('div.tattoos').hide(); $('div.miscellaneous').hide(); $('a#blackbook').click(function() { //HIDE DIVS hide_divs(); //SHOW LISTED DIV $('.blackbook').show('fast'); return false; }); $('a#canvas').click(function() { //HIDE DIVS hide_divs(); //SHOW LISTED DIV $('.canvas').show('fast'); return false; }); $('a#pencil').click(function() { //HIDE DIVS hide_divs(); //SHOW LISTED DIV $('.pencil').show('fast'); return false; }); $('a#murals').click(function() { //HIDE DIVS hide_divs(); //SHOW LISTED DIV $('.murals').show('fast'); return false; }); $('a#shows').click(function() { //HIDE DIVS hide_divs(); //SHOW LISTED DIV $('.shows').show('fast'); return false; }); $('a#tattoos').click(function() { //HIDE DIVS hide_divs(); //SHOW LISTED DIV $('.tattoos').show('fast'); return false; }); $('a#miscellaneous').click(function() { //HIDE DIVS hide_divs(); //SHOW LISTED DIV $('.miscellaneous').show('fast'); return false; }); }); //HIDES ANY VISIBLE DIVS hide_divs = function() { //HIDE ANY VISIBLE DIVS BEFORE CONTINUING if ($('div.main').is(':visible')) { $('div.main').hide('fast'); } if ($('div.blackbook').is(':visible')) { $('div.blackbook').hide('fast'); } if ($('div.canvas').is(':visible')) { $('div.canvas').hide('fast'); } if ($('div.pencil').is(':visible')) { $('div.pencil').hide('fast'); } if ($('div.murals').is(':visible')) { $('div.murals').hide('fast'); } if ($('div.shows').is(':visible')) { $('div.shows').hide('fast'); } if ($('div.tattoos').is(':visible')) { $('div.tattoos').hide('fast'); } if ($('div.miscellaneous').is(':visible')) { $('div.miscellaneous').hide('fast'); } } Do I need to use a div_switch = false somewhere in my script to call it back to null? I'm not sure if I'm posing that question correctly, I'm just concerned about an open loop etc.
[jQuery] before() and after() does not work on unclosed tags?
hello again... why would this work... $('#somediv').before('I am just text').after('I am also just text'); result: I am just textdiv id=somediv.../divI am also just text but this would not? $('#somediv').before('tabletrtd').after('/td/tr/table'); result: tabletrtd/td/tr/tablediv id=somediv.../div does jQuery not like incomplete, i.e. unclosed tags? ::scratching head::
[jQuery] Break out of a for loop.
Hi, I am this script: for (var i=0; i 6; i++) { $('a#chan'+i).click(function(){ for (var j=0; j6; j++) { $('a#chan'+j).removeClass(chSel); } $(this).addClass (chSel); channel = i; }); } and I'm trying to get the value of i when the link is clicked and store it in the variable channel. But when I do it, it stores 6 (the max number) in it. I tried using continue; I tried using i = 7 (to break the loop, it works in Java, I guess not in Javascript). I really have no ideas. Anyone can help me real quick with that? Thanks.
[jQuery] Re: I am looking for the datagrid which supports row/column merging and JSON
tablesorter.com comes to mind. On Feb 21, 6:10 am, Channa L. [EMAIL PROTECTED] wrote: Hi All, I am looking for the good js datagrid which supports AJAX column sorting, row/column merging (rowspan/colspan), and JSON. Does anyone know where I can find such datagrid? Thanks, Channa