[jQuery] Re: One-liner that accelerates JavaScript on IE
I got those results : FF 2.0.0.7 final time (less is better) 941 653 IE6 with SP2 and all updates final time (less is better) 1108 955 So I guess the modded version increase between 20% up to 30% the speed of the selectors. Make your tries but thanks Glen for this try. ps: sorry for my English (french speaking guy) On Oct 15, 12:24 am, Jörn Zaefferer [EMAIL PROTECTED] wrote: Guy Fraser schrieb: Glen Lipka wrote: http://commadot.com/jquery/experiments/speedtest/# I modified a version of jQuery to include that one line and it threw a JS error. Then I tried using the second way with the var doc = document and renamed document everywhere to be doc. No change at all in speed. Having run that test a few times in FF 2.0.0.7 I noticed that the tweaked jQuery (which also had smaller file size) seemed to be faster... The difference in size isn't worth it if you gzip your JavaScript.
[jQuery] Re: Flash and jQuery
or you can use ExternalInterface, which can also be used to communicate between flash and js (both ways - flash to js and js to flash).. dennis. Brian Cherne wrote: A word of caution about using getUrl in flash. If there is any way getUrl can be called before your page has finished loading, it may prevent your page from loading fully in IE. This happened on a large web site I worked on a year ago. We never saw the problem in development because we were sitting on top of the dev servers and everything loaded quickly. But in production, the servers were across the country and the latency delayed loading just enough for a quick-on-the-draw SWF to call getUrl ... and anything after that call would cease to load in IE. The result looked like an intermittent/random web server issue (some css and/or images not loading). But it was the getUrl call. IE interpreted that call as if the user had clicked on a link that took them to another page... regardless of the fact that it was making a call to JavaScript that revealed a DHTML layer. I understand there are a few other alternatives to getUrl... but I'm not familiar with them. On the example project above we ended up with a solution that removed the SWF - JavaScript call altogether. If you're building a web application that requires significant SWF - JavaScript communication you may consider building an Adobe AIR application. They've built AIR so that SWF and JS can talk effortlessly. Cheers, Brian. P.S. We now always use latency/bandwidth throttling during development to expose such issues... look at the application called Charles ... it's a local web proxy that can also be used to throttle your connection... http://www.xk72.com/charles/ http://www.xk72.com/charles/ On 10/5/07, *njsuperfreak* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Sweet! Good Find Brett, and thanks Sam! I think I am definitely going to experiment with this. looks interesting... On Oct 4, 8:19 pm, Brett [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Interesting, I googled up and found an example of this:http://www.quirksmode.org/js/flash_call.html Not jQuery as such in the demo, but any function you write can refer to jQuery. On Oct 5, 8:10 am, Sam Sherlock [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: your flash would need to be wmode=transparent and you'd need to call a javascript function from within flash that in turn calls the grey box function since jquery applies the onclick event to all anchors with a class of greybox you'll need simluar code inside you function that you call from flash. getURL('javascript:callGreyboxFromFlash()'); - S On 04/10/2007, njsuperfreak [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Can Flash communicate with jQuery? I would like to use flash to interact with jQuery like opening up a dialogbox using the greybox.js plugin. How would I go about doing that any ideas? The code is activated by the class=greybox
[jQuery] Client Side HTML filter and DOM readiness
I would like to see if I can move our server side mail tag injection to jQuery on the client side. I guess I am wondering if the logic I am thinking will prevent any premature browser processing before jQuery gets to perform the filtering. When a message is going to be displayed on our system, the server will generate the page and based on the user's options, it may filter the message as it spits out the message body to the browser: div id=msgwin style=margin-left: 1%; margin-right: 1%; @get message.body@ /div The server will filter the mail body removing typical tags considered dangerous and/or related to user tracking (like images). The end result is pure HTML - no special tags like scripts, links, frames, images, etc. Moving this to jQuery, I guess I have to get the data in a mode where none of the special tags are processed. Can I safely presume a initial style=display:none; for DIV id=msgwin will not activate any of the tags? Here is what I did and it seems to work without changing the div tag to make it initiallize hidden. I am doing it programmatically. head script type=text/javascript src=/public/js/jquery.pack.js/ script script type='text/javascript' $(document).ready(function() { var $msg = $(#msgwin); $msg.hide(); $(#msgwin img,link,script,iframe).remove(); $msg.show(); }); /script /head I checked the server logs and firebug and there is no request for the special tags. Is this good enough or is there any other consideration? thanks -- HLS
[jQuery] Re: slideToggle flickers on slideDown in FF but not IE
I DLed interface.js and tried blind and I still have a flicker or popping of the image that is a background in the slidebar div so it's not specific to slide On Oct 13, 4:44 pm, somnamblst [EMAIL PROTECTED] wrote: The flicker or flash of white I am struggling to find a solytion for is only happening when slideToggle slides down, the initial slideDown slideUp do not flicker. Flicker occurs in FF, but not in IE. $(document).ready(function() { initSlideboxes(); function initSlideboxes() { $('#slidebar').slideDown(1000); setTimeout(function() { $('#slidebar').slideUp(3000); }, 5000); $('#slidebar').html($('#hidebar').html()); $('#slidebartrigger').click(function(){$ ('#slidebar').slideToggle(slow); }); }; });- Hide quoted text - - Show quoted text -
[jQuery] Problem with each()
Hi, I'm experiencing a problem with each(): function CalculateDuration() { $(.duration).each(function() { var dur = $(this).html(); dur++; $(this).html(dur); }); } This function should take the value of fields tagged with .duration and augment them by one. Currently it's augmenting them with the number of times it finds .duration (ie.: if I have 5 fields with class duration, it will add 5 instead of 1 to each field). Any suggestions on how to solve this would be more than welcome.
[jQuery] Re: How to bind data to the ajax callback function?
It's so ambagious. I really hope jQuery can provide a *userData* parameter like this: jQuery.get( url, [data], [callback], [userData] ) Then I can achieve my goal with this way: for(var i=0; i2; i++){ $.get(url+i, function(html, userData){ doit(html, userData['tag']); // userData was bound to ajax callback }, {'tag': i}); } Wizzud wrote: var url='http://foo.bar/?param='; for(var i=0; i2; i++){ submitAjax(i); } function submitAjax(i){ $.get(url+i, function(html){ doit(html, i); }); } function doit(html, tag){ alert(tag); } On Oct 13, 11:04 am, arphenlin [EMAIL PROTECTED] wrote: Below is an example to use jQuery.get() to get some html data. I expect that 0, 1 (or 1, 0) are displayed, however, it displayed 2, 2. How can I do? var url='http://foo.bar/?param='; for(var i=0; i2; i++){ $.get(url+i, function(html){ doit(html, i); // bind 'i' to the callback function }); } function doit(html, tag){ alert(tag); }
[jQuery] Re: Jquery Plugin for TinyMCE
Hi, jq-tinyMCE http://dev.jquery.com/wiki/Plugins/tinyMCE gives you a unobtrusive way to tack-on tinyMCE WYSIWYG HTML editing to any form. Simply:$('.classname').tinymce() enjoy. 2007/10/15, wattaka [EMAIL PROTECTED]: Has the TinyMCE plugin been taken down? I have searched all over for it. Thanks -- --- We Ain't Seen Nothin' Yet. 内山 紀明 (noriaki) [EMAIL PROTECTED] http://blog.fulltext-search.biz/
[jQuery] Re: How to apply tabs to content loaded by ajax
Below is the code I am using and the file contents: Menu from where file is being loaded on being clicked: div class=menu_ra href=javascript:loadContent('html/ batala.htm') title=BatalaBatala/a/div Include file and javascript: link href=css/tabs.css rel=stylesheet type=text/css / !--[if lte IE 7] link rel=stylesheet href=css/tabs-ie.css type=text/css media=projection, screen ![endif]-- script src=script/jquery-1.2.1.min.js type=text/javascript / script script src=script/tabs.js type=text/javascript /script script type=text/javascript function loadContent(filename) { $(#contentbox).load(+filename+); $(#contentbox #citytabs ul).tabs(); } /script Content place holder: div id=contentbox/div Dynamically called file contents: div id=citytabs ul lia href=#IntroductionspanIntroduction/span/ a/li lia href=#historyspanhistory/span/a/li lia href=#locationspanlocation/span/a/li lia href=#festivalsspanfestivals/span/a/li lia href=#personalitiesspanpersonalities/span/a/li lia href=#tourismspantourism/span/a/li /ul DIV id=IntroductionH2Introduction/H2 POne of the oldest towns in the province of... and so on... rest of the file. Does this makes any sense? Thanks Guys. On Oct 12, 8:23 pm, Klaus Hartl [EMAIL PROTECTED] wrote: On 12 Okt., 14:47, sukhminder [EMAIL PROTECTED] wrote: Hi All, I am loading an .html file using ajax and then trying to do: $ ('#tabholder ul').tabs(); to apply tabbing but am unable to do it. I am loading content is the div like: div id=showcontent/div and my .html file looks somewhat like: div id=citytabs class=flora ul lia href=tabcontent.htm title=Tab onespanOne/span/a/li lia href=tabcontent2.htm title=Tab twospanTwo/span/a/li lia href=ahah_3.htmlspanThree/span/a/li /ul /div How to get hold of the dynamic content and apply tab style ? ... any help!!! Thanks Sukhminder Looks like you're using the wrong id to set up tabs: tabholder != citytabs --Klaus- Hide quoted text - - Show quoted text -
[jQuery] Re: Permission denied to set property XULElement.selectedIndex
It sounds like you're trying to access restricted resources using Javascript. Assuming you're using Firefox, you can change a setting that would permit scripting access, although it could cause security problems: type about:config in the address bar and hit return Make sure that the setting signed.applets.codebase_principal_support is set to true HTH On Oct 12, 11:21 am, debussy007 [EMAIL PROTECTED] wrote: Hello, whenever I try to display an alert box with some debugging information in my keyup function, I have the following errir in Firebug : [Exception... 'Permission denied to set property XULElement.selectedIndex' when calling method: [nsIAutoCompletePopup::selectedIndex] nsresult: 0x8057001e (NS_ERROR_XPC_JS_THREW_STRING) location: JS frame ::http://localhost.lu.fortis.bank:9080/OwebInteractiveTools-PL-Web/Init... :: anonymous :: line 115 data: no] [Break on this error] alert(resp); Anyone has any idea what causes this kind of error ? Thank you ! -- View this message in context:http://www.nabble.com/Permission-denied-to-set-property-XULElement.se... Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: Flash and jQuery
I originally thought that it was just Flash and JavaScript interaction, in which case you'd use the getUrl('javascript:yourfunc()') ActionScript statement, but it sounds more like you just want your previously working links to continue working the way you remember them. I skimmed the sIFR docs and found the following: http://wiki.novemberborn.net/sifr/FAQ#replacing-links That *might* answer your question, but without a code example of what you're trying to accomplish, I can't be sure. If you are simply trying to use a link to get your show/hide behavior, then the link above still helps you: essentially, you just want to wrap the sIFRed text/element that you want to use for show/hide functionality and then use that instead: span id=showHideThing1a class=sifrMeUgly Text to be Prettified/a/span (script area) sIFR.replace(sifrMe, blah, blah) //I don't use sIFR, correct as necessary $('#showHideThing1').bind('click', function () { myShowHideFunc(this); }); So, you replace the siferMe item and bind your click event to showHideThing1. Pyro On Oct 14, 11:55 am, pixelwizzard [EMAIL PROTECTED] wrote: Hi Guys, Did you figure this out? I have a problem with links that were converted using sIFR and then I need to use them to do a show/hide using jQuery and it looks like Flash is stealing my click event, so the click event never gets called by jquery. Is there any way to get Flash to trigger the event for a specific link? Thanks, -Roman njsuperfreak wrote: Sweet! Good Find Brett, and thanks Sam! I think I am definitely going to experiment with this. looks interesting... On Oct 4, 8:19 pm, Brett [EMAIL PROTECTED] wrote: Interesting, I googled up and found an example of this:http://www.quirksmode.org/js/flash_call.html Not jQuery as such in the demo, but any function you write can refer to jQuery. On Oct 5, 8:10 am, Sam Sherlock [EMAIL PROTECTED] wrote: your flash would need to be wmode=transparent and you'd need to call a javascript function from within flash that in turn calls the grey box function since jquery applies the onclick event to all anchors with a class of greybox you'll need simluar code inside you function that you call from flash. getURL('javascript:callGreyboxFromFlash()'); - S On 04/10/2007, njsuperfreak [EMAIL PROTECTED] wrote: Can Flash communicate with jQuery? I would like to use flash to interact with jQuery like opening up a dialogbox using the greybox.js plugin. How would I go about doing that any ideas? The code is activated by the class=greybox -- View this message in context:http://www.nabble.com/Flash-and-jQuery-tf4569724s27240.html#a13159151 Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Announce: jqPuzzle - Customizable Sliding Puzzles with jQuery
Please ignore this if this is a duplicate post, but it seems that my first one didn't make it... --- Hi all, (First) post, first plugin! http://www.2meter3.de/jqPuzzle/ jqPuzzle lets you easily turn regular images into sliding puzzles. The puzzles are highly customizable (number of rows/cols, hole position, initial appearance, controls, animation speeds) and can be styled individually. See http://www.2meter3.de/jqPuzzle/demos.html for some demos. All you have to do: - Simply add a class name to your image to get a default puzzle, or - Use a css micro format for basic customization, or - Use the jqPuzzle()-method to fully control all features. Next steps: - Add jqPuzzle to the plugin rep. (Which category would be best? Media? Widgets?) - I still have problems with the load event of cached images in some browsers (try reloading the demo page a few times). It seems like I have to check Image.complete continually. - I have an issue with the project page and Opera (9.01). Opera inconsistently ignores a stylesheet rule (#centerpane) on page load/ refresh. Can somebody confirm this? The effect does not happen in my local version, so it might be related to http://groups.google.com/group/jquery-dev/browse_thread/thread/ad7e754c0a10f88a. I highly appreciate any feedback, Ralf
[jQuery] $.ajax() only passes the first parameter
I'm using $.ajax() because the results include some javascript which I need evaluated. (BTW, i'm passing it via POST) Using jQuery.post() works fine, but jQuery.ajax passes only the first parameter regardless of how you pass the data in. For example: var data = [{name: id, value: cd_id}, {name: pronunciation_id, value: pronunciation_id }]; and var data = 'id=' + cd_id + 'pronunciation_id=' + pronunciation_id; Only result in id=15 (the value of 'cd_id') being passed as a post variable. Pronunciation_id is not passed at all. (The JSON notation is the format described by John in response to a bug report http://dev.jquery.com/ticket/1538. Perhaps this should be in the documentation, too? Or updated to be more usable such as simply [{name: value, name: value, etc. }]... but I digress) Perhaps I'm being stupid (I'm quite good at that), because it seems strange that such a basic function would not be working.
[jQuery] JQuery Expand/Collapse Troubleshooting
I'm having a bit of trouble implementing a show/hide bit of JQuery JavaScript and was wondering if anybody had any ideas or advice that may help. On this page http://tinyurl.com/33wksr (my apologies for the missing content and overall clunkiness of the page - its been copied out of the NG CMS that doesn't support web standards just yet for troubleshooting.), I have a JQuery script (found here - http://tinyurl.com/354fk2) that is controlling the visual display of elements within a div id=article/div. This seems to be working as needed in Firefox (PC and Mac) and Safari. The issue I'm running into is that in Internet Explorer 6 and 7, the JQuery script doesn't seem to run or affect the HTML within div id=article/div as it should. At best, I've gotten the behavior to happen sporadically where sometimes the script will work and then is cached in the IE browser and other pages that use this same JQuery script behave properly. Most of the time however, the HTML and page are not altered by the JQuery code. I know there are a ton of other JS calls on this page as well as a lot of elements (non-semantic markup, tons of tables) in the DOM. Could either of these be affecting how/when IE loads the DOM and the JQuery instructions? * Has anybody run into this or something similar? * Does anyone have any ideas about what may be causing the problem? * My understanding was that JQuery attempted to make DOM and JS load timing universal across browsers, are there any cases where this wouldn't happen with IE? On a separate note, due to sites like this being in a CMS, who's templating engine we have little control over, we'd like to abstract this out a bit more and call these two specific JavaScript files (jquery.js and science.js) from one JavaScript file that we can add to. I have an example of a page referencing that here - http://tinyurl.com/2yfg69 This page is using the following JavaScript to add the needed script elements into the DOM - http://tinyurl.com/yoohgv Unfortunately, this only appears to work on Firefox (PC and Mac). In Safari and again IE6 and 7, the behaviors of the added-in scripts do not take affect. With JavaScript not being my strongest skill, I'd really appreciate any help or insight you folks might be able to give. Thanks much!
[jQuery] Newbie question: Create a horizontal slide effect to switch between two divs
I have two divs, both with their own id. If necessary, I can wrap them in a container element. I would like to achieve an effect as on http://www.hugeinc.com/casestudies/ but am not quite sure how to start. Should I hide the later div first? or position it absolutely outside the container div with overflow:none? Can anyone give me a quick push in the direction that I should start looking Thanks
[jQuery] Announce: jqPuzzle - Customizable Sliding Puzzles with jQuery
Hi all, First post, first plugin! http://www.2meter3.de/jqPuzzle/ jqPuzzle lets you easily turn regular images into sliding puzzles. The puzzles are highly customizable (number of rows/cols, hole position, initial appearance, controls, animation speeds) and can be styled individually. See http://www.2meter3.de/jqPuzzle/demos.html for some demos. All you have to do: - Simply add a class name to your image to get a default puzzle, or - Use a css micro format for basic customization, or - Use the jqPuzzle()-method to fully control all features. Next steps: - Add jqPuzzle to the plugin rep. (Which category would be best? Media? Widgets?) - I still have problems with the load event of cached images in some browsers (try reloading the demo page a few times). It seems like I have to check Image.complete continually. - I have an issue with the project page and Opera (9.01). Opera inconsistently ignores a stylesheet rule (#centerpane) on page load/ refresh. Can somebody confirm this? The effect does not happen in my local version, so it might be related to http://groups.google.com/group/jquery-dev/browse_thread/thread/ad7e754c0a10f88a. I highly appreciate any feedback, Ralf
[jQuery] Re: Binding bug ?
Thanks for replying but no, this was happening after I used unbind, in any case, someone answered the ticket I opened, saying that bug was already discovered and should be fixed by now. Thanks again. On Oct 13, 4:17 am, sgrover [EMAIL PROTECTED] wrote: I've seen this in situations where the event handlers may be applied more than once. I got into the habit of doing $(#foo).unbind(click).click(function () {...}); I think the $.one() method is meant for this type of situation though. The docs say it will apply a handler that should only happen once for an element... Shawn Flesler wrote: I lost a couple of hours of my life wondering why would this happen, I was working on jQuery.Listen, and after binding, unbinding, and rebinding, the handler was being triggered twice. I finally came up with a case where that happens, only using jquery's binding methods: $('#foo') .click(function(){}) .mouseover(function(){}) .unbind('click') .click(function(){ alert('click!!'); }); clicking on foo should alert once, but in my PC, it does twice ( FF and IE ).. is this a bug ? I'll open a ticket just in case... Ticket #1798. -http://dev.jquery.com/ticket/1798 Ariel Flesler- Hide quoted text - - Show quoted text -
[jQuery] Announce: jqPuzzle - Customizable Sliding Puzzles with jQuery
Please ignore this if this is a duplicate post, but it seems that my first one didn't make it... --- Hi all, (First) post, first plugin! http://www.2meter3.de/jqPuzzle/ jqPuzzle lets you easily turn regular images into sliding puzzles. The puzzles are highly customizable (number of rows/cols, hole position, initial appearance, controls, animation speeds) and can be styled individually. See http://www.2meter3.de/jqPuzzle/demos.html for some demos. All you have to do: - Simply add a class name to your image to get a default puzzle, or - Use a css micro format for basic customization, or - Use the jqPuzzle()-method to fully control all features. Next steps: - Add jqPuzzle to the plugin rep. (Which category would be best? Media? Widgets?) - I still have problems with the load event of cached images in some browsers (try reloading the demo page a few times). It seems like I have to check Image.complete continually. - I have an issue with the project page and Opera (9.01). Opera inconsistently ignores a stylesheet rule (#centerpane) on page load/ refresh. Can somebody confirm this? The effect does not happen in my local version, so it might be related to http://groups.google.com/group/jquery-dev/browse_thread/thread/ad7e754c0a10f88a. I highly appreciate any feedback, Ralf
[jQuery] .wrap when targeting a frame generates an error in IE
I tested some code in IE7 today and ran into a strange problem with the jQuery .wrap method. I have narrowed it down to this function failing when targeting a frame like this: curContext = $('#mPreviewFrame')[0].contentWindow.document; $('#mydiv',curContext).wrap('div id=myNewOuterDiv/div'); This generates an error Invalid Argument in IE 7, but works fine in FF. To further isolate the problem I changed the 'curContext' to a div on the current page and tested, and that works fine in IE, so it appears to be specifically releated to using a frame as the context. Does anyone know another way this could be written to achieve the same result? Is this a bug? Thanks!! BrookD
[jQuery] Re: Combo with images
I haven't looked at code, but I'm willing to bet this combo is a fake combo - done with divs and some styling. In which case, embedding an image is as simple as including an img tag in the div for the list item. I've written code similar to this type of list where I needed a short list, always open (show all elements), multi select, and some code that would auto select ALL from the list, if nothing was selected. Took about an hour to write up. So, a combo such as this shouldn't be too much tougher, I'd think.. It would make a cool plugin though... :) (hmmm... maybe my next project...) Shawn Andrea - Aosta wrote: at this url http://scbr.com/docs/products/dhtmlxCombo/index.shtml a combo with the image my question: it is possible to create a similar combo with the jquery?
[jQuery] JQuery Expand/Collapse Troubleshooting
Hi All, I'm having a bit of trouble implementing a show/hide bit of JQuery JavaScript and was wondering if anyone had any ideas or advice that may help. On this page http://tinyurl.com/33wksr (my apologies for the missing content and overall clunkiness of the page - its been copied out of the NG CMS that doesn't support web standards just yet for troubleshooting.), I have a JQuery script (found here - http://tinyurl.com/354fk2) that is controlling the visual display of elements within a div id=article/div. This seems to be working as needed in Firefox (PC and Mac) and Safari. The issue I'm running into is that in Internet Explorer 6 and 7, the JQuery script doesn't seem to run or affect the HTML within div id=article/div as it should. At best, I've gotten the behavior to happen sporadically where sometimes the script will work and then is cached in the IE browser and other pages that use this same JQuery script behave properly. Most of the time however, the HTML and page are not altered by the JQuery code. I know there are a ton of other JS calls on this page as well as a lot of elements (non-semantic markup, tons of tables) in the DOM. Could either of these be affecting how/when IE loads the DOM and the JQuery instructions? * Has anyone else run into this or something similar? * Does anyone have any ideas about what may be causing the problem? * My understanding was that JQuery attempted to make DOM and JS load timing universal across browsers, are there any cases where this wouldn't happen with IE? On a separate note, due to sites like this being in a CMS, who's templating engine we have little control over, we'd like to abstract this out a bit more and call these two specific JavaScript files (jquery.js and science.js) from one JavaScript file that we can add to. I have an example of a page referencing that here - http://tinyurl.com/2yfg69 This page is using the following JavaScript to add the needed script elements into the DOM - http://tinyurl.com/yoohgv Unfortunately, this only appears to work on Firefox (PC and Mac). In Safari and again IE6 and 7, the behaviors of the added-in scripts do not take affect. With JavaScript not being my strongest skill, I'd really appreciate any help or insight you folks might be able to give. Thanks much! -- Brian
[jQuery] Re: ANNOUCE: jQuery lightBox plugin
Hi! Thanks for your plugin! Some issues: - Specifying options imageBtnPrev and imageBtnNext seems to alter other options as well. I would prefer to use the default values on the options that I don't use. But it seems as if I have to specify all or none to make it work. - On your How to use page you're still including the 0.2 js and css files - Do I need to alter anything in the CSS file? I've looked at it and it seems as if the IE-fix image needs to be altered. But I'm not sure. Kia Leandro Vieira Pinho wrote: Thanks guys. I´m pretend to do a brainstorming ASAP to discutiss about image and viewport. Questions about resize an image, fix in viewport and so on. In the next version, I pretend add a keyboard navigation suport. Maybe in november or before. Regards On Oct 14, 5:01 am, goldlilys [EMAIL PROTECTED] wrote: Thanks for this plugin, I've been using the thickbox and really wanted something more fancy. This is what I've been looking for. Now updating my site to lightbox all the way. On Oct 13, 3:55 pm, Leandro Vieira Pinho [EMAIL PROTECTED] wrote: ahahah, I have forgotten tha corret URL, sorry. It´shttp://leandrovieira.com/projects/jquery/lightbox/ Regards. On Oct 13, 8:34 am, Erlend Schei [EMAIL PROTECTED] wrote: I have released a new version: 0.3. Applying many suggestions here mentioned. Marvellous! Thanks for considering and implementing our needs and suggestions. You've also gotten rid of the physical url references in the css. That makes this module much easier to implement and maintain! See it:http://localhost/leandrovieira/www/projects/jquery/lightbox/ Hehe, can't see your localhost from here :)http://leandrovieira.com/projects/jquery/lightbox/ Erlend :)
[jQuery] Announce: jqPuzzle - Customizable Sliding Puzzles with jQuery
Hi all, First post, first plugin! http://www.2meter3.de/jqPuzzle/ jqPuzzle lets you easily turn regular images into sliding puzzles. The puzzles are highly customizable (number of rows/cols, hole position, initial appearance, controls, animation speeds) and can be styled individually. See http://www.2meter3.de/jqPuzzle/demos.html for some demos. All you have to do: - Simply add a class name to your image to get a default puzzle, or - Use a css micro format for basic customization, or - Use the jqPuzzle()-method to fully control all features. Next steps: - Add jqPuzzle to the plugin rep. (Which category would be best? Media? Widgets?) - I still have problems with the load event of cached images in some browsers (try reloading the demo page a few times). It seems like I have to check Image.complete continually. - I have an issue with the project page and Opera (9.01). Opera inconsistently ignores a stylesheet rule (#centerpane) on page load/ refresh. Can somebody confirm this? The effect does not happen in my local version, so it might be related to http://groups.google.com/group/jquery-dev/browse_thread/thread/ad7e754c0a10f88a. I highly appreciate any feedback, Ralf
[jQuery] Re: ANNOUCE: jQuery lightBox plugin
I have played around quite heavily with 0.3 now. The code cleanup was great, your code is very easy to follow! As you seem responsive to feedback, here's a few findings: 1) You should get rid of the 0.3-introduced ___just-anything-here.gif consept. Although it's apparently working well, it introduces a lot of http requests on hovering, as the browser will try to fetch ___just- anything-here.gif from the current location on all hover state changes. And browsers don't do too well on negative css cacheing (not founds). Reintroduce the blank gif trick - that gif will be cached. 2) Would you consider the naming of the #jquery-nnn elements? It would be great if they all started with #lightbox. Just seems cleaner. It's really great that you moved the physical paths from the css to the init of the lightbox. When showing the result code to my colleagues I get a lot of wow's! They started requesting a slideshow function... ;) Again, great work! Erlend :)
[jQuery] Re: ANNOUCE: jQuery lightBox plugin
Hi Erlend, Thanks again for your suggestions. The question about the gif track, is that I was avoiding other settings and definition URL in CSS file. I want mantaining all the information about URL in the js file. It stay more flexible. I´m thinking about it. The questions aground #jquery-nnn is related an alternative for the generated code doesn´t conflict with any other. Is too large, I know. Maybe, I contraction for jquery (jq) can be good. A slideshow function? Hu, it´s possible. But, let´s walking in step by step. Regards. On Oct 15, 4:14 am, Erlend Schei [EMAIL PROTECTED] wrote: I have played around quite heavily with 0.3 now. The code cleanup was great, your code is very easy to follow! As you seem responsive to feedback, here's a few findings: 1) You should get rid of the 0.3-introduced ___just-anything-here.gif consept. Although it's apparently working well, it introduces a lot of http requests on hovering, as the browser will try to fetch ___just- anything-here.gif from the current location on all hover state changes. And browsers don't do too well on negative css cacheing (not founds). Reintroduce the blank gif trick - that gif will be cached. 2) Would you consider the naming of the #jquery-nnn elements? It would be great if they all started with #lightbox. Just seems cleaner. It's really great that you moved the physical paths from the css to the init of the lightbox. When showing the result code to my colleagues I get a lot of wow's! They started requesting a slideshow function... ;) Again, great work! Erlend :)
[jQuery] Re: ANNOUCE: jQuery lightBox plugin
Hi Kia, You don´t need to inform all parameters. Just what you want to use. The others default values will be keeped. In your case, you can use: ... $('#gallery a').lightBox({ 'imageBtnPrev' : 'images/image-prev.gif', imageBtnNext' : 'images/image-next.gif' }); ... Remember, the others default values will be keeped. I have changed the How to use section. Thanks :) In this version, 0.3, you don´t need to alter anything in CSS file. Regards. On Oct 15, 5:16 am, Kia Niskavaara [EMAIL PROTECTED] wrote: Hi! Thanks for your plugin! Some issues: - Specifying options imageBtnPrev and imageBtnNext seems to alter other options as well. I would prefer to use the default values on the options that I don't use. But it seems as if I have to specify all or none to make it work. - On your How to use page you're still including the 0.2 js and css files - Do I need to alter anything in the CSS file? I've looked at it and it seems as if the IE-fix image needs to be altered. But I'm not sure. Kia Leandro Vieira Pinho wrote: Thanks guys. I´m pretend to do a brainstorming ASAP to discutiss about image and viewport. Questions about resize an image, fix in viewport and so on. In the next version, I pretend add a keyboard navigation suport. Maybe in november or before. Regards On Oct 14, 5:01 am, goldlilys [EMAIL PROTECTED] wrote: Thanks for this plugin, I've been using the thickbox and really wanted something more fancy. This is what I've been looking for. Now updating my site to lightbox all the way. On Oct 13, 3:55 pm, Leandro Vieira Pinho [EMAIL PROTECTED] wrote: ahahah, I have forgotten tha corret URL, sorry. It´shttp://leandrovieira.com/projects/jquery/lightbox/ Regards. On Oct 13, 8:34 am, Erlend Schei [EMAIL PROTECTED] wrote: I have released a new version: 0.3. Applying many suggestions here mentioned. Marvellous! Thanks for considering and implementing our needs and suggestions. You've also gotten rid of the physical url references in the css. That makes this module much easier to implement and maintain! See it:http://localhost/leandrovieira/www/projects/jquery/lightbox/ Hehe, can't see your localhost from here :)http://leandrovieira.com/projects/jquery/lightbox/ Erlend :)
[jQuery] ajax success arguments
Hi, I'm looking on the doc, but I've a doubt about the ajaxSuccess event. In docs says: The XMLHttpRequest and settings used for that request are passed as arguments to the callback. But in wich form? I think is an object, but can you help me understand how is structured? In my particular case I made a request and I want to know which data was send in the request to perform a particular action.in the ajax success event. Thank you
[jQuery] Re: ANNOUCE: jQuery lightBox plugin
Leandro Vieira Pinho wrote: The question about the gif track, is that I was avoiding other settings and definition URL in CSS file. I want mantaining all the information about URL in the js file. It stay more flexible. I´m thinking about it. Maby you can use the data: URI kitchen to construct your own data: URLs? Like this: logo.src = 'data:image/gif;base64,R0lGODlhDQAOAJEAANno6wBmZgAAACH5BAAA'+ 'LAANAA4AQAIjjI8Iyw3GhACSQecutsFV3nzgNi7SVEbo06lZa66LRib2UQAAOw%3D%3D'; More info: http://diveintogreasemonkey.org/patterns/add-image.html
[jQuery] Re: ANNOUCE: jQuery lightBox plugin
I tried to use $('#gallery a').lightBox({ 'imageBtnPrev' : 'images/image-prev.gif', 'imageBtnNext' : 'images/image-next.gif' }); But the imageLoading-image became empty. I had to put the default image into the configuration to make it visible again. Like this: $('#gallery a').lightBox({ 'imageBtnPrev' : 'images/image-prev.gif', 'imageBtnNext' : 'images/image-next.gif', 'imageLoading' : 'images/image-loading.gif' }); Leandro Vieira Pinho wrote: Hi Kia, You don´t need to inform all parameters. Just what you want to use. The others default values will be keeped.
[jQuery] ajaxForm adding parameters to the success option function
Hi I know that the success function has 2 default parameters but how do I add a custom parameter? 1 - A user clicks a form (with a ID of TOM) button 2 - The loading function gets called which just adds a class to a div with the ID of TOM_output. 3 - Then ajax requests comes back with success and I want to remove the class for the target div How do I access the the target div from with my loaded function?? function button_click(myform){ var button_output = '#' + myform.id + '_output'; var options = { target:button_output, beforeSubmit: loading, success:loaded(responseText, statusText, button_output) }; $(myform).ajaxForm(options); return false; } function loading(formData, jqForm, options){ // get form id var form_id = jqForm[0].id; // add loading class (starts a spinning gif) $(form_id).addClass('spinner'); } function loaded(responseText, statusText,myform){ // remove loading class (stops the spinning gif) $(myform).removeClass('spinner'); } Any help most appreciated Cheers Tom
[jQuery] Re: ajax success arguments
The docs are incorrect. Your ajaxSuccess handler is passed three arguments: 1. The event object 2. The XHR 3. The settings object $().ajaxSuccess (function(ev, xhr, s) { alert('event type: ' + ev.type); alert('status: ' + xhr.status); alert('url: ' + s.url); }); Mike On 10/15/07, Giovanni Battista Lenoci [EMAIL PROTECTED] wrote: Hi, I'm looking on the doc, but I've a doubt about the ajaxSuccess event. In docs says: The XMLHttpRequest and settings used for that request are passed as arguments to the callback. But in wich form? I think is an object, but can you help me understand how is structured? In my particular case I made a request and I want to know which data was send in the request to perform a particular action.in the ajax success event. Thank you
[jQuery] Re: ajax success arguments
On Oct 15, 2:58 pm, Mike Alsup [EMAIL PROTECTED] wrote: The docs are incorrect. Your ajaxSuccess handler is passed three arguments: 1. The event object 2. The XHR 3. The settings object Thank you very much Mike, I was going crazy :-)
[jQuery] Re: ajaxForm adding parameters to the success option function
Tom, Try rewriting that using a closure to capture the button: function button_click(myform){ var button_output = '#' + myform.id + '_output'; var options = { target:button_output, beforeSubmit: loading, success:function(responseText, statusText) { loaded(responseText, statusText, button_output); } }; $(myform).ajaxForm(options); return false; } Mike On 10/15/07, Tom [EMAIL PROTECTED] wrote: Hi I know that the success function has 2 default parameters but how do I add a custom parameter? 1 - A user clicks a form (with a ID of TOM) button 2 - The loading function gets called which just adds a class to a div with the ID of TOM_output. 3 - Then ajax requests comes back with success and I want to remove the class for the target div How do I access the the target div from with my loaded function?? function button_click(myform){ var button_output = '#' + myform.id + '_output'; var options = { target:button_output, beforeSubmit: loading, success:loaded(responseText, statusText, button_output) }; $(myform).ajaxForm(options); return false; } function loading(formData, jqForm, options){ // get form id var form_id = jqForm[0].id; // add loading class (starts a spinning gif) $(form_id).addClass('spinner'); } function loaded(responseText, statusText,myform){ // remove loading class (stops the spinning gif) $(myform).removeClass('spinner'); } Any help most appreciated Cheers Tom
[jQuery] Re: ajaxForm adding parameters to the success option function
Well that was quick, divine intervention is not to be underrated. The javascipt this keep word works for what I need. So I am no longer in a fix but would still like to know how to pass extra parameters to this function On Oct 15, 2:56 pm, Tom [EMAIL PROTECTED] wrote: Hi I know that the success function has 2 default parameters but how do I add a custom parameter? 1 - A user clicks a form (with a ID of TOM) button 2 - The loading function gets called which just adds a class to a div with the ID of TOM_output. 3 - Then ajax requests comes back with success and I want to remove the class for the target div How do I access the the target div from with my loaded function?? function button_click(myform){ var button_output = '#' + myform.id + '_output'; var options = { target:button_output, beforeSubmit: loading, success:loaded(responseText, statusText, button_output) }; $(myform).ajaxForm(options); return false; } function loading(formData, jqForm, options){ // get form id var form_id = jqForm[0].id; // add loading class (starts a spinning gif) $(form_id).addClass('spinner'); } function loaded(responseText, statusText,myform){ // remove loading class (stops the spinning gif) $(myform).removeClass('spinner'); } Any help most appreciated Cheers Tom
[jQuery] Re: [NEWS] Coda-Slider Plugin
That's really nice. Works well in IE7/PC. Looks really nice too, -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Rey Bango Sent: Sunday, October 14, 2007 11:39 PM To: jQuery Discussion Subject: [jQuery] [NEWS] Coda-Slider Plugin Found a jQuery version of the Coda Slider: http://www.ndoherty.com/demos/coda-slider/ I got it from the following blog: http://www.toolsoup.com/slider-or-glider-using-javascript/ Rey...
[jQuery] Re: ajaxForm adding parameters to the success option function
Thanks Mike, I did not see your very quick reply before I got to send my second mail. That answers me questions nicely Cheers Tom On Oct 15, 3:09 pm, Tom [EMAIL PROTECTED] wrote: Well that was quick, divine intervention is not to be underrated. The javascipt this keep word works for what I need. So I am no longer in a fix but would still like to know how to pass extra parameters to this function On Oct 15, 2:56 pm, Tom [EMAIL PROTECTED] wrote: Hi I know that the success function has 2 default parameters but how do I add a custom parameter? 1 - A user clicks a form (with a ID of TOM) button 2 - The loading function gets called which just adds a class to a div with the ID of TOM_output. 3 - Then ajax requests comes back with success and I want to remove the class for the target div How do I access the the target div from with my loaded function?? function button_click(myform){ var button_output = '#' + myform.id + '_output'; var options = { target:button_output, beforeSubmit: loading, success:loaded(responseText, statusText, button_output) }; $(myform).ajaxForm(options); return false; } function loading(formData, jqForm, options){ // get form id var form_id = jqForm[0].id; // add loading class (starts a spinning gif) $(form_id).addClass('spinner'); } function loaded(responseText, statusText,myform){ // remove loading class (stops the spinning gif) $(myform).removeClass('spinner'); } Any help most appreciated Cheers Tom
[jQuery] Re: ajax success arguments
Giovanni Battista Lenoci wrote: Hi, I'm looking on the doc, but I've a doubt about the ajaxSuccess event. In docs says: The XMLHttpRequest and settings used for that request are passed as arguments to the callback. But in wich form? I think is an object, but can you help me understand how is structured? In my particular case I made a request and I want to know which data was send in the request to perform a particular action.in the ajax success event. Thank you Give the success function the data returned by adding a parameter to the function: $.ajax({ success: function(*data*) { // do stuff with data object } }); where data = whatever the url you made the request to returns. In your case if it's xml the url might point to a file that produces the following: data-sent keyold-value/key /data-sent new-data keynew-value/key /new-data Then your success function might look like this: function(data) { if ( $(data-sent,data) !== '' ) { // do stuff } } Sorry for the rough answer, might be able to help more if I know what the server response looks like. Rob
[jQuery] Re: Announce: jqPuzzle - Customizable Sliding Puzzles with jQuery
That's REALLY well done. Plus the demo looks fantastic! -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Ralf Stoltze Sent: Sunday, October 14, 2007 11:25 AM To: jQuery (English) Subject: [jQuery] Announce: jqPuzzle - Customizable Sliding Puzzles with jQuery Hi all, First post, first plugin! http://www.2meter3.de/jqPuzzle/ jqPuzzle lets you easily turn regular images into sliding puzzles. The puzzles are highly customizable (number of rows/cols, hole position, initial appearance, controls, animation speeds) and can be styled individually. See http://www.2meter3.de/jqPuzzle/demos.html for some demos. All you have to do: - Simply add a class name to your image to get a default puzzle, or - Use a css micro format for basic customization, or - Use the jqPuzzle()-method to fully control all features. Next steps: - Add jqPuzzle to the plugin rep. (Which category would be best? Media? Widgets?) - I still have problems with the load event of cached images in some browsers (try reloading the demo page a few times). It seems like I have to check Image.complete continually. - I have an issue with the project page and Opera (9.01). Opera inconsistently ignores a stylesheet rule (#centerpane) on page load/ refresh. Can somebody confirm this? The effect does not happen in my local version, so it might be related to http://groups.google.com/group/jquery-dev/browse_thread/thread/ad7e754c0a10f 88a. I highly appreciate any feedback, Ralf
[jQuery] Re: ajax success arguments
Sorry for the rough answer, might be able to help more if I know what the server response looks like. Rob Thank for your answer Robert, but in my case I want to retrieve the data sent to the request, and not the data receveid. In my case I use the ajaxSuccess event and then the right answer is the one mike has posted. Thank you again :-)
[jQuery] Re: Jquery Plugin for TinyMCE
whoop! Thanks guys. On Oct 14, 5:56 pm, 内山紀明 [EMAIL PROTECTED] wrote: Hi, jq-tinyMCEhttp://dev.jquery.com/wiki/Plugins/tinyMCE gives you a unobtrusive way to tack-on tinyMCE WYSIWYG HTML editing to any form. Simply:$('.classname').tinymce() enjoy. 2007/10/15, wattaka [EMAIL PROTECTED]: Has the TinyMCE plugin been taken down? I have searched all over for it. Thanks -- --- We Ain't Seen Nothin' Yet. 内山 紀明 (noriaki) [EMAIL PROTECTED] http://blog.fulltext-search.biz/
[jQuery] Re: Announce: jqPuzzle - Customizable Sliding Puzzles with jQuery
AMAZING ! i would suggest to add a games or jqMuscles category . it's a very specific and probably seldom use plugin, but it really shows off some powerful javascript muscles ! -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Ralf Stoltze Sent: dimanche 14 octobre 2007 17:25 To: jQuery (English) Subject: [jQuery] Announce: jqPuzzle - Customizable Sliding Puzzles with jQuery Hi all, First post, first plugin! http://www.2meter3.de/jqPuzzle/ jqPuzzle lets you easily turn regular images into sliding puzzles. The puzzles are highly customizable (number of rows/cols, hole position, initial appearance, controls, animation speeds) and can be styled individually. See http://www.2meter3.de/jqPuzzle/demos.html for some demos. All you have to do: - Simply add a class name to your image to get a default puzzle, or - Use a css micro format for basic customization, or - Use the jqPuzzle()-method to fully control all features. Next steps: - Add jqPuzzle to the plugin rep. (Which category would be best? Media? Widgets?) - I still have problems with the load event of cached images in some browsers (try reloading the demo page a few times). It seems like I have to check Image.complete continually. - I have an issue with the project page and Opera (9.01). Opera inconsistently ignores a stylesheet rule (#centerpane) on page load/ refresh. Can somebody confirm this? The effect does not happen in my local version, so it might be related to http://groups.google.com/group/jquery-dev/browse_thread/thread/ad7e754c0a10f 88a. I highly appreciate any feedback, Ralf Ce message Envoi est certifié sans virus connu. Analyse effectuée par AVG. Version: 7.5.488 / Base de données virus: 269.14.10/1070 - Date: 14/10/2007 9:22
[jQuery] Re: ajax success arguments
On Oct 15, 2007, at 9:01 AM, Giovanni Battista Lenoci wrote: On Oct 15, 2:58 pm, Mike Alsup [EMAIL PROTECTED] wrote: The docs are incorrect. Your ajaxSuccess handler is passed three arguments: 1. The event object 2. The XHR 3. The settings object Thank you very much Mike, I was going crazy :-) I just updated the docs to this: The event object, XMLHttpRequest, and settings used for that request are passed as arguments to the callback. Also, just as a reminder, the docs are in wiki format, so everyone is welcome to edit/improve them. :-) --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com
[jQuery] Re: Jquery Plugin for TinyMCE
I´ll need some help on this because I´m getting errors: I saved this from the page as tinymce.js // tiny MCE - //jQuery plugin for accessible, unobtrusive WYSIWYG HTML editing // v .1 // by Alton Crossley // http://www.nogahidebootstrap.com/jtinymce/ $.fn.tinymce = function(options) { return this.each(function() { preString = div class='jqHTML_frame' style='width:+$ (this).css(width)+px;height: + ($(this).css(height)+20) + px;'div; postString = /divdiv class='jqHTML_link' style='float:right' onclick=toogleEditorMode(' + this.id + ');HTML/div/div; $(this).wrap(preString + postString); //alert(this.id + '' + $(this).html() + ''); //alert(this.id + 'Width:' + $(this).css(width) + 'Height:' + $(this).css(height)); }); } And the I tried to inoke tinyMCE by doing this: $(document).ready(function(){ $('#test_textarea').tinymce(); }); I get these errors: 1. $(#test_textarea).tinymce is not a function 2. missing ; before statement is there anything else that I have to do? Is the plugin Jquery 1.2.1 compatible? Thansk
[jQuery] Re: Interface iAutoscroller and DOCTYPE
On 18 sep, 17:06, real [EMAIL PROTECTED] wrote: hm is no one else experiencing this problem? I do, and it's weird. I did not found a solution as my javascript skills are what they are but I guess this should be patched as the feature is really helpful. ++
[jQuery] Re: Using multiple versions of jQuery on the same page
I'll try to be a bit more clear. There's a couple of simple rules. Whenever you include jQuery, it will take anything already in the $ and jQuery variables and back them up so it can install itself in the $ and jQuery variables. When you call noConflict(true), jQuery (the version that is in the $ and jQuery variables - i.e. the last version loaded) will take the backed up library and put it back into the $ and jQuery variables, then return you a pointer to itself. If you're wanting to use two versions of jQuery as well as Prototype on the same page, you'll need to call noConflict twice, and import things in a certain order. I'm not sure how well this will work with script src=... blocks being loaded asynchronously (you'll need to give it a good test) but it should work. script src=prototype.js/script The $ function here will use prototype script src=jQuery114.js/script jQuery loads and puts Prototype into backup variables (called _$). $ is now jQuery scriptjq114 = jQuery.noConflict(true);/script The $ function is now prototype again. To use jQuery, use jq114() instead. This is where you're up to, if i'm understanding you correctly. now you want to load jQuery 1.2.1 script src=jQuery121.js/script Prototype is now backed up in _$ (as it was in $ before) and jQuery 1.2.1 is in $ scriptjq121 = jQuery.noConflict(true);/script Prototype is now back in $ and jQuery 1.2.1 is in jq121. So now, to use Prototype, you use the normal $(...) function. To use jQuery 1.1.4, you use jq114(...) and to use jQuery 1.2.1 you use jq121(...). I've never tried loading three libraries and I'm no jQuery/Prototype/ JS pro but that might work. If not, I doubt I'll be of much use. You might have problems loading plugins if jQuery isn't in a variable called $ or jQuery. I've never tried so that's up to you I'm afraid. If you can't get the code working, your best bet is probably going to be to learn v1.1.4. Or just use 1.2.1 and get the plugin to provide backward compatability with 1.1.4 for your Wordpress plugin. I only jumped on board recently so I've not got much idea of what's different between 1.1 and 1.2. Hope this helps. George. On Oct 13, 11:35 pm, watermelongunn [EMAIL PROTECTED] wrote: Any chance someone could elaborate on what George explained? It sort of makes sense to me, but I'm still a bit lost. What would I do if a page I'm working on already has Prototype and JQuery 1.1.4 (loaded with noConflict()), and I wanted to then add JQuery 1.2.1 and some plugins? Is that even possible or should I just learn how to use 1.1.4 (which is being loaded because of a few Wordpress plugins)? I'm new to JQuery so I've been learning the latest build. Is it very different from 1.1.4? Sorry for the wide variety of questions. Any help or knowledge would be greatly appreciated. -Nicholas On Oct 9, 9:29 am, George [EMAIL PROTECTED] wrote: After looking at the code it seems quite straight-forward. Someone correct me if I've got the wrong end of the stick. Summary: The first version you include will get reinstated, the second version getting blown away. How it works: When you include jQuery, it makes a copy of the window.$ and window.jQuery variables and puts them into _$ and _jQuery (variables inside jQuery itself) respectively. So if there's already a copy of jQuery included on the page (call it v1) and you go include your second copy (call it v2), v1 will get 'backed up' into the _$ and _jQuery variables inside v2 and the second copy you include will go into window.$ and window.jQuery. At this point, if you use the $ function or the jQuery object, you'll be using v2. When you call jQuery.noConflict(true), it will run against v2 because that's what's in window.jQuery and it'll take the variables in _$ and _jQuery (which are v1), put them back into window.$ and window.jQuery, and return you a copy of v2 for you to put into a variable (called jQv2 for example). At this point, window.$ and window.jQuery will be v1 and jQv2 will be v2. So if you want to use v1, you carry on using $(...) or jQuery.whatever(...) and if you want to use v2, you use jQv2('#someId') or jQv2.whatever(...). Hope this makes sense. George. On Oct 4, 12:27 am, Glen Lipka [EMAIL PROTECTED] wrote: We are making a jQuery+stuff script that will go on lots of random pages with unknown libraries. Some of those pages will have jQuery. (Variousversions) If I am including our script last; what is the best way to make sure our script doesn't interfere with any of the existing page, including old versionsof jQuery. Solution #1: We renamed jQuery in our script everywhere to be veryjQuery. Solution #2: ??? Note: Solution #1 solved the problem, but feels invasive. Is there a noconflict() way to do this? Glen
[jQuery] JQuery Expand/Collapse Troubleshooting
Hi All, I'm having a bit of trouble implementing a show/hide bit of JQuery JavaScript and was wondering if anyone had any ideas or advice that may help. On this page http://tinyurl.com/33wksr (my apologies for the missing content and overall clunkiness of the page - its been copied out of the NG CMS that doesn't support web standards just yet for troubleshooting.), I have a JQuery script (found here - http://tinyurl.com/354fk2) that is controlling the visual display of elements within a div id=article/div. This seems to be working as needed in Firefox (PC and Mac) and Safari. The issue I'm running into is that in Internet Explorer 6 and 7, the JQuery script doesn't seem to run or affect the HTML within div id=article/div as it should. At best, I've gotten the behavior to happen sporadically where sometimes the script will work and then is cached in the IE browser and other pages that use this same JQuery script behave properly. Most of the time however, the HTML and page are not altered by the JQuery code. I know there are a ton of other JS calls on this page as well as a lot of elements (non-semantic markup, tons of tables) in the DOM. Could either of these be affecting how/when IE loads the DOM and the JQuery instructions? * Has anyone else run into this or something similar? * Does anyone have any ideas about what may be causing the problem? * My understanding was that JQuery attempted to make DOM and JS load timing universal across browsers, are there any cases where this wouldn't happen with IE? On a separate note, due to sites like this being in a CMS, who's templating engine we have little control over, we'd like to abstract this out a bit more and call these two specific JavaScript files (jquery.js and science.js) from one JavaScript file that we can add to. I have an example of a page referencing that here - http://tinyurl.com/2yfg69 This page is using the following JavaScript to add the needed script elements into the DOM - http://tinyurl.com/yoohgv Unfortunately, this only appears to work on Firefox (PC and Mac). In Safari and again IE6 and 7, the behaviors of the added-in scripts do not take affect. With JavaScript not being my strongest skill, I'd really appreciate any help or insight you folks might be able to give. Thanks much! -- Brian -- View this message in context: http://www.nabble.com/JQuery-Expand-Collapse-Troubleshooting-tf4627462s27240.html#a13212724 Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: Access parent page from ajax generated html
It did work! I will keep digging. Sorry for the premature post. On Oct 14, 6:35 am, Mark [EMAIL PROTECTED] wrote: The example code there doesn't do everything it needs to test this out. I the part between the !-- BEGIN -- and !-- END -- needs to be retrieved by ajax I guess I could put that in and see if it worked with that code. I'll let you know the results... thx again Wizzud On Oct 14, 6:12 am, Wizzud [EMAIL PROTECTED] wrote: Apart from the fact that it's a manual action, what doesn't work with the example code? On Oct 13, 3:23 pm, Mark [EMAIL PROTECTED] wrote: It seems this post was deleted... Why? If I have a main page and a section of it generated by Ajax, how do I access an element in the main page from the section generated by Ajax? Or, in code speak: (how can I make something like this work) html img id=removeMeAfterAjax src=images/fredington.jpg / div id=AjaxHolder !-- BEGIN retrieved via Ajax -- a onClick=$('#removeMeAfterAjax').remove();Remove Fredington/a !-- END retrieved via Ajax -- /div /html
[jQuery] Re: iframe bug document.defaultView.getComputedStyle(elem,null)
Skilip, Thank you for this posting! We ran into the exact problem and your fix killed the bug in minutes. I do hope it makes it into the official jQuery.js release. Bob On Oct 11, 3:41 am, Skilip [EMAIL PROTECTED] wrote: Hi, I found a bug with jQuery version 1.2. It concerns the following error generated by Firebug in Firefox when a iframe is present in a page. document.defaultView.getComputedStyle(elem, null) has no properties I solved it by replacing the following code with the code pasted underneath. old: (line 729) ret = prop == display swap[stack.length-1] != null ? none : document.defaultView.getComputedStyle(elem,null).getPropertyValue(prop) || ; new: ret = prop == display swap[stack.length-1] != null ? none : (document.defaultView.getComputedStyle(elem,null)) ? document.defaultView.getComputedStyle(elem,null).getPropertyValue(prop) : ; Can I report this bug somewhere @ jQuery's website?
[jQuery] draggable and droppable tabs
I am trying to create draggable/droppable tabs. I've got it partly built, but I'd love some community input on this. A working model can be seen here: http://scottnath.com/tabs/draggable_tabs.html Below I will paste the jquery code I'm using. First, here are some issues I'm running into that I really need some help with: 1) tabs can only be moved once 2) moving tabs from left-to-right works, but not vice/versa 3) I'm having trouble figuring out the dragged tabs original index jQuery code: $(document).ready(function(){ bindBehavior(); }); function bindBehavior(){ $(#left_left ul).tabs(); $(#left_right ul).tabs(); $(.draggableItem).Draggable({ revert: true }); $(.tabsList).Droppable({ accept: draggableItem, ondrop: function (drag){ var thisId = $(this).attr(id); // gets the id of the container that the draggable's tab content should end up in var thisParent = $(this).parent().attr(id); // gets the moved tab id by using the href var dragAHref = $(drag).children(a).attr(href); // remove the leading # sign var dragTabId = dragAHref.substring(1); // gets the clickable-tab content var dragAContent = $(drag).children(a).text(); // gets the id of the container that the draggable's tab content resides in var dragParent = $(#+dragTabId).parent().attr(id); // if it didn't move to a new spot, do nothing if(dragParent == thisParent){ return; } // finds the htmlobject that is the dragged LI's corresponding tab var dragTab = $(#+dragTabId).get(0); // gets tab LI index var dragIndex = $(li.draggableItem).index(drag); // next: put content of tab into newly created tab var movedTabContent = $(#+dragTabId).html(); // for some reason, the index seems to come out one too many dragIndex--; // remove the tab from where it came from $(#+dragParent+ ul).tabsRemove(dragIndex); // add this tab to where it was dragged $(#+thisId).tabsAdd('#'+dragTabId, dragAContent); // need to add this class $(#+dragTabId).addClass('tabContent'); // populate the tab-div $(#+dragTabId).html(movedTabContent); bindBehavior(); } }); } Thank you to anyone who can help. I really appreciate it. Scott Nath
[jQuery] Re: Using multiple versions of jQuery on the same page
Actually it does make sense... but its not working, for my case : var jq = jQuery.noConflict(true); throws an arror with firebug - jQuery is not a constructor.
[jQuery] Re: Using multiple versions of jQuery on the same page
A URL would be helpful for debugging. -js On 10/15/07, airslim [EMAIL PROTECTED] wrote: Actually it does make sense... but its not working, for my case : var jq = jQuery.noConflict(true); throws an arror with firebug - jQuery is not a constructor.
[jQuery] Re: $.ajax({datatype:html... does not seem to evaluate scripts?
Hi Well had to change datatype to script , then it was working. But still not working with HTML datatype. Vikas On Oct 14, 8:48 pm, Michael Schwarz [MVP] [EMAIL PROTECTED] wrote: $(#myid).html(bbold/bnbsp;script type=\text/javascript\ defer=\defer\alert(1);/script); Maybe this does help you, not tested. Michael On Oct 14, 10:46 am, Vikas patial [EMAIL PROTECTED] wrote: Hello Im facing the same problem , does anyone have a solution to this problem. Regards Vikas On Oct 4, 5:15 pm, joelarson [EMAIL PROTECTED] wrote: Nevermind everyone, I sorted it out. On Oct 3, 10:18 am, joelarson [EMAIL PROTECTED] wrote: The documentation notes that when using the $.ajax() functions option datatype=html: html: Returns HTML as plain text; includedscripttags are evaluated however, it doesnotappear to me that this is happening. What am I missing? My very simple code is here: - ... $.ajax({type:GET,dataType:html,url:test.htm,success:function(dta) { alert(dta); }}); ... test.htm-- divhello/div scriptlanguage=JavaScript alert(hello?); /script -- I do get my alert with the content from alert(dta), but I never get an alert with hello?. What am I missing?- Hide quoted text - - Show quoted text -
[jQuery] Re: Problem with each()
Hi I dont undrestand what ur trying to do exactly. but from my understanding ur trying to take the html value of duration class ans increment it by 1 and then again put back the html value like... div class=duration1/div div class=duration2/div div class=duration3/div div class=duration4/div So after looping it should be div class=duration2/div div class=duration3/div div class=duration4/div div class=duration5/div Is this what ur trying to do. Ur loop will do exactly what I said. Jan-86 wrote: Hi, I'm experiencing a problem with each(): function CalculateDuration() { $(.duration).each(function() { var dur = $(this).html(); dur++; $(this).html(dur); }); } This function should take the value of fields tagged with .duration and augment them by one. Currently it's augmenting them with the number of times it finds .duration (ie.: if I have 5 fields with class duration, it will add 5 instead of 1 to each field). Any suggestions on how to solve this would be more than welcome. -- View this message in context: http://www.nabble.com/Problem-with-each%28%29-tf4626294s27240.html#a13214326 Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] .clone(true) not working in IE
What my code does is you click on the link and it re orders these divs, here is the part of my code having trouble new_div[x] = $('#hotel_information [EMAIL PROTECTED]:eq(' + div_index + ')').clone(true); then: for(x = 0; x div_length; x++) { $('#hotel_information').append(new_div[x]); } Does anything look wrong in there? It works in FF(actually it works without the clone method) but not fully work in IE 7 or 6. Also the part that is not work is the tabs(using the older version and not the UI version). another thing to mention is that the event do care over if i do not trigger them. say i have 2 div and i click on the tabs in the first one. I then re order when make the first div the last div and the last div the first div. now if i click on the first div tabs, they work because i did not click on them before the reorder but the second tabs do not work because i click on the before the reorder. anyone know what mgiht be cause this from this description(can't give a link right now). -- View this message in context: http://www.nabble.com/.clone%28true%29-not-working-in-IE-tf4628650s27240.html#a13216375 Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: One-liner that accelerates JavaScript on IE
My IE7 was almost identical. FF2 gave 219 293 (which meant that the non-tweaked version was faster) Strange its all over the place. Glen On 10/15/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I got those results : FF 2.0.0.7 final time (less is better) 941 653 IE6 with SP2 and all updates final time (less is better) 1108 955 So I guess the modded version increase between 20% up to 30% the speed of the selectors. Make your tries but thanks Glen for this try. ps: sorry for my English (french speaking guy) On Oct 15, 12:24 am, Jörn Zaefferer [EMAIL PROTECTED] wrote: Guy Fraser schrieb: Glen Lipka wrote: http://commadot.com/jquery/experiments/speedtest/# I modified a version of jQuery to include that one line and it threw a JS error. Then I tried using the second way with the var doc = document and renamed document everywhere to be doc. No change at all in speed. Having run that test a few times in FF 2.0.0.7 I noticed that the tweaked jQuery (which also had smaller file size) seemed to be faster... The difference in size isn't worth it if you gzip your JavaScript.
[jQuery] Re: JQuery Expand/Collapse Troubleshooting
It's hard to follow all the details. Maybe post a simpler example. Trim down the page until all that is left is the problem. No graphics, no excess html. Literally, delete stuff one at a time until you can demonstrate the simplest form of the issue. We are here for you, but you gotta meet us halfway. :) Glen On 10/15/07, briantalbot [EMAIL PROTECTED] wrote: Hi All, I'm having a bit of trouble implementing a show/hide bit of JQuery JavaScript and was wondering if anyone had any ideas or advice that may help. On this page http://tinyurl.com/33wksr (my apologies for the missing content and overall clunkiness of the page - its been copied out of the NG CMS that doesn't support web standards just yet for troubleshooting.), I have a JQuery script (found here - http://tinyurl.com/354fk2) that is controlling the visual display of elements within a div id=article/div. This seems to be working as needed in Firefox (PC and Mac) and Safari. The issue I'm running into is that in Internet Explorer 6 and 7, the JQuery script doesn't seem to run or affect the HTML within div id=article/div as it should. At best, I've gotten the behavior to happen sporadically where sometimes the script will work and then is cached in the IE browser and other pages that use this same JQuery script behave properly. Most of the time however, the HTML and page are not altered by the JQuery code. I know there are a ton of other JS calls on this page as well as a lot of elements (non-semantic markup, tons of tables) in the DOM. Could either of these be affecting how/when IE loads the DOM and the JQuery instructions? * Has anyone else run into this or something similar? * Does anyone have any ideas about what may be causing the problem? * My understanding was that JQuery attempted to make DOM and JS load timing universal across browsers, are there any cases where this wouldn't happen with IE? On a separate note, due to sites like this being in a CMS, who's templating engine we have little control over, we'd like to abstract this out a bit more and call these two specific JavaScript files (jquery.js and science.js) from one JavaScript file that we can add to. I have an example of a page referencing that here - http://tinyurl.com/2yfg69 This page is using the following JavaScript to add the needed script elements into the DOM - http://tinyurl.com/yoohgv Unfortunately, this only appears to work on Firefox (PC and Mac). In Safari and again IE6 and 7, the behaviors of the added-in scripts do not take affect. With JavaScript not being my strongest skill, I'd really appreciate any help or insight you folks might be able to give. Thanks much! -- Brian -- View this message in context: http://www.nabble.com/JQuery-Expand-Collapse-Troubleshooting-tf4627462s27240.html#a13212724 Sent from the jQuery General Discussion mailing list archive at Nabble.com .
[jQuery] Re: Beginner problem: Link is not working (JQuery Cycle Plugin)
anyone? On Oct 12, 3:16 pm, tlob [EMAIL PROTECTED] wrote: Hello I am working with the fantastic JQuery Cycle Plugin. Thank you very much for creating such great librarys! I am almost there But I have a very basic problem. Start/stopping the slideshow is fine with click on thumbnails/pictures/ slideshow. But when you click on the thumbnails, the link is not working. http://siggibucher.com/preview/test.php 1. I dont understand why. Can you explain that? 2. How can I change that? ;-) THX in advance, have a nice weekend tom
[jQuery] Re: [NEWS] Coda-Slider Plugin
Very nice. :) Glen On 10/15/07, Andy Matthews [EMAIL PROTECTED] wrote: That's really nice. Works well in IE7/PC. Looks really nice too, -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Rey Bango Sent: Sunday, October 14, 2007 11:39 PM To: jQuery Discussion Subject: [jQuery] [NEWS] Coda-Slider Plugin Found a jQuery version of the Coda Slider: http://www.ndoherty.com/demos/coda-slider/ I got it from the following blog: http://www.toolsoup.com/slider-or-glider-using-javascript/ Rey...
[jQuery] Re: [NEWS] Coda-Slider Plugin
Although ironically it doesn't work on Safari 2.0 , unlike Panic's version and the software it advertises. When did Safari become the new IE5? Glen Lipka wrote: Very nice. :) Glen On 10/15/07, *Andy Matthews* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: That's really nice. Works well in IE7/PC. Looks really nice too, -Original Message- From: jquery-en@googlegroups.com mailto:jquery-en@googlegroups.com [mailto: jquery-en@googlegroups.com mailto:jquery-en@googlegroups.com] On Behalf Of Rey Bango Sent: Sunday, October 14, 2007 11:39 PM To: jQuery Discussion Subject: [jQuery] [NEWS] Coda-Slider Plugin Found a jQuery version of the Coda Slider: http://www.ndoherty.com/demos/coda-slider/ I got it from the following blog: http://www.toolsoup.com/slider-or-glider-using-javascript/ Rey...
[jQuery] Re: How to bind data to the ajax callback function?
It's not ambiguous at all. Your problem is not with the $.get() but with the code around it. $.get() does exactly what it is intended to do - it fetches a single 'page' (of some sort) and provides you with the mechanism for handling that page when successfully retrieved. You are trying to handle multiple $.get()s in a single loop, with each retrieved 'page' (presumably) being handled differently, and in the process of doing so you're getting the scope of some variables mixed up. That's all. If you really want to minimise it, and you really only have a loop of 2, then ... var url='http://foo.bar/?param='; $.each([0,1],function(i,j){ $.get(url+j, function(html){ alert(j); }); }); On Oct 14, 2:10 pm, arphenlin [EMAIL PROTECTED] wrote: It's so ambagious. I really hope jQuery can provide a *userData* parameter like this: jQuery.get( url, [data], [callback], [userData] ) Then I can achieve my goal with this way: for(var i=0; i2; i++){ $.get(url+i, function(html, userData){ doit(html, userData['tag']); // userData was bound to ajax callback }, {'tag': i}); } Wizzud wrote: var url='http://foo.bar/?param='; for(var i=0; i2; i++){ submitAjax(i); } function submitAjax(i){ $.get(url+i, function(html){ doit(html, i); }); } function doit(html, tag){ alert(tag); } On Oct 13, 11:04 am, arphenlin [EMAIL PROTECTED] wrote: Below is an example to use jQuery.get() to get some html data. I expect that 0, 1 (or 1, 0) are displayed, however, it displayed 2, 2. How can I do? var url='http://foo.bar/?param='; for(var i=0; i2; i++){ $.get(url+i, function(html){ doit(html, i); // bind 'i' to the callback function }); } function doit(html, tag){ alert(tag); } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups jQuery (English) group. To post to this group, send email to jquery-en@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/jquery-en?hl=en -~--~~~~--~~--~--~---
[jQuery] Re: Extremely poor performance of jQuery on AJAX partial page updates
I was only suggesting PasteMonkey because you had a lot of HTML to paste and a large amount of code is hard to read through Groups, Groups fudges the formatting and doesn't do syntax highlighting. Plus, it's a jQuery project :-). The problem is in the HTML, kind of. When you create a DOM element (or set of elements) with plain text HTML jQuery will be forced to run that regex against all of it. There is no way around it, in order to allow jQuery to make sure it's parsing HTML and not a selector, the regex has to find HTML tags or special characters in the text - even if its 1000 words of plaintext and just one br / tag. The problem is that you're trying to load a very large amount of text, and making jQuery figure out that it's HTML. The easiest workaround is as Wizzud suggested - if you tell jQuery that it's HTML by using .html(), you skip the regex. Looking at the jQuery source, using appendTo is fine also*, just don't use $(state.html) - there's no need to make a jQuery object from the HTML, since jQuery can append anything -- text, DOM elements, HTML, etc. *Example: $(parent).append(state.html); If you do need a jQuery object from the HTML, for manipulation or parsing, there are quick ways to do that, too. Let us know how this works out. Charles doublerebel.com On Oct 13, 1:33 pm, koollx [EMAIL PROTECTED] wrote: I can use PasteMonkey but I don't see how it can help in this case - what exactly do you want me to paste in it? The line that takes over 20 seconds to execute is the regexp applied to the HTML that's passed to jQuery constructor. There is no point in editing HTML (I think) because it is automatically generated by the server and is very dynamic. I just pasted one example of it. There is no way to predict all possible combinations of that HTML. The issue I think is in regexp, or IE performance when applying regexp. The regexp is in jquery.js. Are you suggesting that the problem is in the HTML markup I'm trying to insert into the page? On Oct 12, 7:12 pm, polyrhythmic [EMAIL PROTECTED] wrote: Alex, May I recommend to you PasteMonkey? http://pastemonkey.org/ Charles doublerebel.com On Oct 12, 11:42 am, koollx [EMAIL PROTECTED] wrote: I'm trying to use jQuery 1.2.1 to add AJAX functionality to my web application. I am using jQuery Form plugin to submit te form via AJAX and have a server-side algorithm that returns page updates. The server returns a JSON array with HTML elements to be updated and then I loop through that array and process each item. For update, I first remove the existing DOM element, then recreate it using jQuery constructor, and then append it to the parent. It works find in FireFox, but in IE the performance is horrendous. It takes 25 seconds in IE6 and IE7 pretty much hangs. I traced the delay to the following line of code in jQuery init method: var m = quickExpr.exec(selector); So it seems that jQuery is to blame for the performance. Is there something I can do to improve it? Is this a bug/issue that needs to be resolved? I'd like to help fix it but I'm not familiar with jQuery design well enough to know why the regexp is there and how we can simplify/remove it. Here's my update code: var $component = $(state.html); $component.appendTo(parent); And the HTML that takes particularly long is pasted below (it may look like a large page but it isn't. It loads into the browser without jQuery AJAX in less then a second): div id=\JTabbedPane10546001\ style= \position:absolute;left:0px;top:46px;width:884px;height:644px\ tabbedPane=\true\ ul lia href=\#JTabbedPane10546001-tab-0\spanButton Demo/span/a/li lia href=\#JTabbedPane10546001-tab-1\spanSource Code/span/a/li /ul div id=\JTabbedPane10546001-tab-0\ style= \position:absolute;left:2px;top:26px;width:874px;height:585px\div id=\JPanel12136681\ style=\position:absolute;left:2px;top:1px;width: 874px;height:611px;clip:rect(0px 874px 611px 0px)\ class=\ border\ div id=\JPanel14907335\ style= \position:absolute;left:2px;top:2px;width:874px;height: 611px;clip:rect(0px 874px 611px 0px)\ div id=\JTabbedPane30196714\ style= \position:absolute;left:0px;top:0px;width:874px;height:611px\ tabbedPane=\true\ ul lia href=\#JTabbedPane30196714- tab-0\spanButtons/span/a/li lia href=\#JTabbedPane30196714- tab-1\spanRadio Buttons/span/a/li lia href=\#JTabbedPane30196714- tab-2\spanCheck Boxes/span/a/li /ul div id=\JTabbedPane30196714-tab-0\ style= \position:absolute;left:2px;top:26px;width:868px;height:555px\div id=\JPanel5403403\
[jQuery] Is this valid JSON?
[ { ads: true, content_slug: just-some-title } ]
[jQuery] Re: Extremely poor performance of jQuery on AJAX partial page updates
Thanks for your suggestion. I think it may help but it won't completely solve the problem. Let me give a little background on what I'm actually trying to do. In response to an Ajax call the server returns an array of component updates that need to be applied to the page. Updates include DELETE, INSERT, UPDATE. Delete is easy, insert and update is where the performance is bad. For each component the server provides component id in DOM, it's parent id and the HTML markup, which can include nested SCRIPT elements. I've posted my algorithm below: http://pastemonkey.org/paste/47137e93-0d2c-4e13-b8c7-263e404fdb0d Your suggestion may help me with UPDATE - I can do something like $(state.componentId).html(state.html) Calling .html() function on a parent would empty it which is wrong - there may be an update for 1 child out of 3. But how would I do the INSERT? Should I just use DOM's createElement() and appendChild() directly? Or use innerHTML? And would it execute SCRIPT elements? In general, does anybody know why jQuery has that regexp in the constructor - I assume there is a good reason why they are doing it. On Oct 14, 6:59 am, Wizzud [EMAIL PROTECTED] wrote: With no indication of what either the 'parent' HTML structure or the JSON structure is like, is it possible to switch from ... var $component = $(state.html); $component.appendTo(parent); ...to... $(parent).html(state.html); (You wouldn't need to empty parent first - html() does that for you)
[jQuery] Re: JQuery Expand/Collapse Troubleshooting
Hey Glen, Thanks for the feedback. My bad about overbloating things and asking a bit too much (as well as the three repeat posts - it wasn't on purpose) :o) I've simplified the example and it looks like things work in this example - http://brian-talbot.com/inventingroom/ng-jquery-expand/ What that means is that all of the other stuff on the first example is not playing well with JQuery. I'll take your advice and go brick-by- brick through things. Thanks again for the support! -- Brian On Oct 15, 12:31 pm, Glen Lipka [EMAIL PROTECTED] wrote: It's hard to follow all the details. Maybe post a simpler example. Trim down the page until all that is left is the problem. No graphics, no excess html. Literally, delete stuff one at a time until you can demonstrate the simplest form of the issue. We are here for you, but you gotta meet us halfway. :) Glen On 10/15/07, briantalbot [EMAIL PROTECTED] wrote: Hi All, I'm having a bit of trouble implementing a show/hide bit of JQuery JavaScript and was wondering if anyone had any ideas or advice that may help. On this pagehttp://tinyurl.com/33wksr(my apologies for the missing content and overall clunkiness of the page - its been copied out of the NG CMS that doesn't support web standards just yet for troubleshooting.), I have a JQuery script (found here - http://tinyurl.com/354fk2) that is controlling the visual display of elements within a div id=article/div. This seems to be working as needed in Firefox (PC and Mac) and Safari. The issue I'm running into is that in Internet Explorer 6 and 7, the JQuery script doesn't seem to run or affect the HTML within div id=article/div as it should. At best, I've gotten the behavior to happen sporadically where sometimes the script will work and then is cached in the IE browser and other pages that use this same JQuery script behave properly. Most of the time however, the HTML and page are not altered by the JQuery code. I know there are a ton of other JS calls on this page as well as a lot of elements (non-semantic markup, tons of tables) in the DOM. Could either of these be affecting how/when IE loads the DOM and the JQuery instructions? * Has anyone else run into this or something similar? * Does anyone have any ideas about what may be causing the problem? * My understanding was that JQuery attempted to make DOM and JS load timing universal across browsers, are there any cases where this wouldn't happen with IE? On a separate note, due to sites like this being in a CMS, who's templating engine we have little control over, we'd like to abstract this out a bit more and call these two specific JavaScript files (jquery.js and science.js) from one JavaScript file that we can add to. I have an example of a page referencing that here - http://tinyurl.com/2yfg69 This page is using the following JavaScript to add the needed script elements into the DOM -http://tinyurl.com/yoohgv Unfortunately, this only appears to work on Firefox (PC and Mac). In Safari and again IE6 and 7, the behaviors of the added-in scripts do not take affect. With JavaScript not being my strongest skill, I'd really appreciate any help or insight you folks might be able to give. Thanks much! -- Brian -- View this message in context: http://www.nabble.com/JQuery-Expand-Collapse-Troubleshooting-tf462746... Sent from the jQuery General Discussion mailing list archive at Nabble.com .
[jQuery] Re: Extremely poor performance of jQuery on AJAX partial page updates
Thanks for the suggestion. I can try it but I think it won't do the same thing I was doing earlier. Let me give a little background on my algorithm. The server sends a list of changes to the page and the client script has to apply. Changes can be delete, insert and update. The markup sent by the server includes SCRIPT elements, so I need to make sure they are executed. Delete is easy, insert and update is where I see the poor performance of jQuery. I've pasted the function that applies the changes here: http://pastemonkey.org/paste/47137e93-0d2c-4e13-b8c7-263e404fdb0d As for your suggestion, I think I may be able to use it to implement UPDATE to a page element. I think calling .html() would empty the parent before appending the child and that would be wrong - I don't want to remove any children. So the call for update would be $ (state.componentId).html(state.html), right? But I wouldn't be able to use it for INSERT because there is not existing dom element to set HTML content on. In general, does anybody know why jQuery applies that regexp in the constructor before actually creating DOM elements? Can't I just use createElement() DOM function or innerHTML attribute directly? (in this case, would scripts still be executed)? On Oct 14, 6:59 am, Wizzud [EMAIL PROTECTED] wrote: With no indication of what either the 'parent' HTML structure or the JSON structure is like, is it possible to switch from ... var $component = $(state.html); $component.appendTo(parent); ...to... $(parent).html(state.html); (You wouldn't need to empty parent first - html() does that for you) On Oct 13, 9:33 pm, koollx [EMAIL PROTECTED] wrote: I can use PasteMonkey but I don't see how it can help in this case - what exactly do you want me to paste in it? The line that takes over 20 seconds to execute is the regexp applied to the HTML that's passed to jQuery constructor. There is no point in editing HTML (I think) because it is automatically generated by the server and is very dynamic. I just pasted one example of it. There is no way to predict all possible combinations of that HTML. The issue I think is in regexp, or IE performance when applying regexp. The regexp is in jquery.js. Are you suggesting that the problem is in the HTML markup I'm trying to insert into the page? On Oct 12, 7:12 pm, polyrhythmic [EMAIL PROTECTED] wrote: Alex, May I recommend to you PasteMonkey? http://pastemonkey.org/ Charles doublerebel.com On Oct 12, 11:42 am, koollx [EMAIL PROTECTED] wrote: I'm trying to use jQuery 1.2.1 to add AJAX functionality to my web application. I am using jQuery Form plugin to submit te form via AJAX and have a server-side algorithm that returns page updates. The server returns a JSON array with HTML elements to be updated and then I loop through that array and process each item. For update, I first remove the existing DOM element, then recreate it using jQuery constructor, and then append it to the parent. It works find in FireFox, but in IE the performance is horrendous. It takes 25 seconds in IE6 and IE7 pretty much hangs. I traced the delay to the following line of code in jQuery init method: var m = quickExpr.exec(selector); So it seems that jQuery is to blame for the performance. Is there something I can do to improve it? Is this a bug/issue that needs to be resolved? I'd like to help fix it but I'm not familiar with jQuery design well enough to know why the regexp is there and how we can simplify/remove it. Here's my update code: var $component = $(state.html); $component.appendTo(parent); And the HTML that takes particularly long is pasted below (it may look like a large page but it isn't. It loads into the browser without jQuery AJAX in less then a second): div id=\JTabbedPane10546001\ style= \position:absolute;left:0px;top:46px;width:884px;height:644px\ tabbedPane=\true\ ul lia href=\#JTabbedPane10546001-tab-0\spanButton Demo/span/a/li lia href=\#JTabbedPane10546001-tab-1\spanSource Code/span/a/li /ul div id=\JTabbedPane10546001-tab-0\ style= \position:absolute;left:2px;top:26px;width:874px;height:585px\div id=\JPanel12136681\ style=\position:absolute;left:2px;top:1px;width: 874px;height:611px;clip:rect(0px 874px 611px 0px)\ class=\ border\ div id=\JPanel14907335\ style= \position:absolute;left:2px;top:2px;width:874px;height: 611px;clip:rect(0px 874px 611px 0px)\ div id=\JTabbedPane30196714\ style= \position:absolute;left:0px;top:0px;width:874px;height:611px\ tabbedPane=\true\ ul lia href=\#JTabbedPane30196714- tab-0\spanButtons/span/a/li
[jQuery] Re: [NEWS] Coda-Slider Plugin
Yep, its very nice and its already in the plugins page ( http://jquery.com/plugins/project/Coda-Slider). Im waiting to when its become compatible with jquery 1.2 (as the author says in the limitations tab). On 10/15/07, Andy Matthews [EMAIL PROTECTED] wrote: That's really nice. Works well in IE7/PC. Looks really nice too, -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Rey Bango Sent: Sunday, October 14, 2007 11:39 PM To: jQuery Discussion Subject: [jQuery] [NEWS] Coda-Slider Plugin Found a jQuery version of the Coda Slider: http://www.ndoherty.com/demos/coda-slider/ I got it from the following blog: http://www.toolsoup.com/slider-or-glider-using-javascript/ Rey... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups jQuery (English) group. To post to this group, send email to jquery-en@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/jquery-en?hl=en -~--~~~~--~~--~--~---
[jQuery] Re: Extremely poor performance of jQuery on AJAX partial page updates
Thanks for your suggestion. I think it may help but it won't completely solve the problem. Let me give a little background on what I'm actually trying to do. In response to an Ajax call the server returns an array of component updates that need to be applied to the page. Updates include DELETE, INSERT, UPDATE. Delete is easy, insert and update is where the performance is bad. For each component the server provides component id in DOM, it's parent id and the HTML markup, which can include nested SCRIPT elements. I've posted my algorithm below: http://pastemonkey.org/paste/47137e93-0d2c-4e13-b8c7-263e404fdb0d Your suggestion may help me with UPDATE - I can do something like $(state.componentId).html(state.html) Calling .html() function on a parent would empty it which is wrong - there may be an update for 1 child out of 3. But how would I do the INSERT? Should I just use DOM's createElement() and appendChild() directly? Or use innerHTML? And would it execute SCRIPT elements? In general, does anybody know why jQuery has that regexp in the constructor - I assume there is a good reason why they are doing it. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups jQuery (English) group. To post to this group, send email to jquery-en@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/jquery-en?hl=en -~--~~~~--~~--~--~---
[jQuery] Re: Beginner problem: Link is not working (JQuery Cycle Plugin)
Umm... What exactly do you mean by the link is not working? The href points to a non-existent in-page anchor point, but it *is* doing what you're asking, by toggling the slideshow on and off. I'm assuming you want to point the slideshow to the appropriate clicked image, right? In this case, you might want to get the index of the anchor (not sure how), then cycle to the appropriate li (i.e., with the matching index). Purely hypothetical, but that's what I'm seeing. -Toby tlob wrote: anyone? On Oct 12, 3:16 pm, tlob [EMAIL PROTECTED] wrote: Hello I am working with the fantastic JQuery Cycle Plugin. Thank you very much for creating such great librarys! I am almost there But I have a very basic problem. Start/stopping the slideshow is fine with click on thumbnails/pictures/ slideshow. But when you click on the thumbnails, the link is not working. http://siggibucher.com/preview/test.php 1. I dont understand why. Can you explain that? 2. How can I change that? ;-) THX in advance, have a nice weekend tom
[jQuery] Re: How to bind data to the ajax callback function?
Probably when Apple tried to get into the browser business too. -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Wizzud Sent: Monday, October 15, 2007 12:24 PM To: jQuery (English) Subject: [jQuery] Re: How to bind data to the ajax callback function? It's not ambiguous at all. Your problem is not with the $.get() but with the code around it. $.get() does exactly what it is intended to do - it fetches a single 'page' (of some sort) and provides you with the mechanism for handling that page when successfully retrieved. You are trying to handle multiple $.get()s in a single loop, with each retrieved 'page' (presumably) being handled differently, and in the process of doing so you're getting the scope of some variables mixed up. That's all. If you really want to minimise it, and you really only have a loop of 2, then ... var url='http://foo.bar/?param='; $.each([0,1],function(i,j){ $.get(url+j, function(html){ alert(j); }); }); On Oct 14, 2:10 pm, arphenlin [EMAIL PROTECTED] wrote: It's so ambagious. I really hope jQuery can provide a *userData* parameter like this: jQuery.get( url, [data], [callback], [userData] ) Then I can achieve my goal with this way: for(var i=0; i2; i++){ $.get(url+i, function(html, userData){ doit(html, userData['tag']); // userData was bound to ajax callback }, {'tag': i}); } Wizzud wrote: var url='http://foo.bar/?param='; for(var i=0; i2; i++){ submitAjax(i); } function submitAjax(i){ $.get(url+i, function(html){ doit(html, i); }); } function doit(html, tag){ alert(tag); } On Oct 13, 11:04 am, arphenlin [EMAIL PROTECTED] wrote: Below is an example to use jQuery.get() to get some html data. I expect that 0, 1 (or 1, 0) are displayed, however, it displayed 2, 2. How can I do? var url='http://foo.bar/?param='; for(var i=0; i2; i++){ $.get(url+i, function(html){ doit(html, i); // bind 'i' to the callback function }); } function doit(html, tag){ alert(tag); }
[jQuery] Re: [NEWS] Coda-Slider Plugin
It could be that he didn't have Safari 2.0 to work with. I'm sure if you contact him and offer to help him test, he would be very receptive and appreciative of your offer. Rey... Howard Jones wrote: Although ironically it doesn't work on Safari 2.0 , unlike Panic's version and the software it advertises. When did Safari become the new IE5? Glen Lipka wrote: Very nice. :) Glen On 10/15/07, *Andy Matthews* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: That's really nice. Works well in IE7/PC. Looks really nice too, -Original Message- From: jquery-en@googlegroups.com mailto:jquery-en@googlegroups.com [mailto: jquery-en@googlegroups.com mailto:jquery-en@googlegroups.com] On Behalf Of Rey Bango Sent: Sunday, October 14, 2007 11:39 PM To: jQuery Discussion Subject: [jQuery] [NEWS] Coda-Slider Plugin Found a jQuery version of the Coda Slider: http://www.ndoherty.com/demos/coda-slider/ I got it from the following blog: http://www.toolsoup.com/slider-or-glider-using-javascript/ Rey...
[jQuery] Re: Extremely poor performance of jQuery on AJAX partial page updates
I'm just throwing this out here -- haven't tested this for performance and this may be way off base for what you need. So here goes nothing. What if you: 1. Created a hidden div on the page (style=display:none) 2. Have the ajax call return updates as html, with the changes having a new class, such as changed. 3. Appended the new updates to the div: div.html(ajaxResults); 4. Iterate through the changes like this: div.find('.changed').each(function(i){update_element(this);}); What do you think? JK -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of koollx Sent: Monday, October 15, 2007 9:29 AM To: jQuery (English) Subject: [jQuery] Re: Extremely poor performance of jQuery on AJAX partial page updates Thanks for your suggestion. I think it may help but it won't completely solve the problem. Let me give a little background on what I'm actually trying to do. In response to an Ajax call the server returns an array of component updates that need to be applied to the page. Updates include DELETE, INSERT, UPDATE. Delete is easy, insert and update is where the performance is bad. For each component the server provides component id in DOM, it's parent id and the HTML markup, which can include nested SCRIPT elements. I've posted my algorithm below: http://pastemonkey.org/paste/47137e93-0d2c-4e13-b8c7-263e404fdb0d Your suggestion may help me with UPDATE - I can do something like $(state.componentId).html(state.html) Calling .html() function on a parent would empty it which is wrong - there may be an update for 1 child out of 3. But how would I do the INSERT? Should I just use DOM's createElement() and appendChild() directly? Or use innerHTML? And would it execute SCRIPT elements? In general, does anybody know why jQuery has that regexp in the constructor - I assume there is a good reason why they are doing it.
[jQuery] Re: [NEWS] Coda-Slider Plugin
Rey Bango wrote: It could be that he didn't have Safari 2.0 to work with. I'm sure if you contact him and offer to help him test, he would be very receptive and appreciative of your offer. Rey... Sorry, that did sound more bitchy that it should have, didn't it? The second remark (about IE5) wasn't directly related to this plugin, just to the number of things I've come across lately (including my own work) that work in e.g. Firefox but fail quietly in Safari, where it's a pain to debug them. Last I checked, jQuery UI suffered with this even (yep - the download box on the site is still hosed for me). Is there any resource for things to avoid in jQuery (or JS generally) to have a project work with Safari? I guess this is all down to a few DOM objects being implemented differently... Howie (happy to help test on Safari, BTW)
[jQuery] [NEWS] liScroll Plugin
Hi all. http://www.gcmingati.net/wordpress/wp-content/lab/jquery/newsticker/jq-liscroll/scrollanimate.html This is my scrolling news ticker plugin for jQuery. Ciao GC
[jQuery] Re: Ajax tabs detect automatically
well, you're right, the way I use tabs in these pages is not exactly what it was built for. I use it as a Client-side pagination. Works nice that way also. So I got confused when I finally found the reasons of non-working upgrade, and I apologise that you lost your time because of me. There were two problems. First of all I made a mistake :in the UI version, you're supposed to apply the tabs method to the unordered list and forget the old #container. Then I built my page putting the shadetabs (used as pager), after and not before the .tabcontent. if you combine these two things you obtain a very amazing and destroy result. Anyway, thinking about this misadventure, I decided to use a script I found in my go-to-bed-book, the great learning jquery of Karl Swedberg and Jonathan Chaffer, to build both pagination and table sorting. Thanks a lot for your help, and for your great contribution to jQuery.
[jQuery] Re: jquery version of YUI Buttons?
Coming back to this issue, I spent some time today playing around with ext's toolbar with menus example: http://extjs.com/deploy/dev/examples/menu/menus.html. Seems to work really well, but writes everything (including a table!) from javascript rather than working off of existing markup. But if all you need is a button and/or a button with a drop-down menu, it seems like you could do it with a combination of some CSS-button styling and ClickMenu I've started a conversation with the developer about extending his plugin to support this type of menu system. If you could chime-in with your suggestions, I'd appreciate it. Blog comments at: http://p.sohei.org/jquery-plugins/clickmenu/#comments I finally did, suggesting a combination of ClickMenu and this technique: http://www.monc.se/kitchen/59/scalable-css-buttons-using-png-and-background-colors. I played around a little with the idea myself, and it seems like the two primary hurdles are selecting only the top-level links, and positioning the drop-down properly when the link is styled as a button. I didn't get anywhere with it myself, which isn't saying much. But I thought I'd throw it out there in case others might be interested. -- Owen
[jQuery] Re: Ajax tabs detect automatically
last question, it seems that triggerTab() is no more useful. How can I replace it please? thanks
[jQuery] Duplicate IDs
Please forgive me but I'm very new to all this and was just building a page to handle multiple instances of the clueTip 'sticky' effect (example 4 on the demo page). The big problem I get is that I have to use: ul class=uk lia id=sticky class=plot4 href=name1.html rel=name1.htmlThe Estelleemimg src=assets/images/developments/ mannerscourt/estelle/estelle-sm.jpg alt=The Estelle title=The Estelle /The Estelle is a lovely 3 bedroom property with more details to go in here...span/span/em/a/li lia id=sticky class=plot1 href=name2.html rel=name2.htmlThe Estelleemimg src=assets/images/developments/ mannerscourt/estelle/estelle-sm.jpg alt=The Estelle title=The Estelle /The Estelle is a lovely 3 bedroom property with more details to go in here...span/span/em/a/li /ul Obviously duplicate IDs is a no no and only the first item in the list works so how do I get around this? Many thanks in advance.
[jQuery] Get date from table cell
Hi all, I have a html table which is generated with some php scripts. It is a list of events. One of the cells of each row contains a date (in the format dd-mm-). What I want now is to select all the events (rows) which have been done and I want to assign a class to each of such a row. The problem here is of course the selector part. Is this possible with jQuery, and if so, could somebody help me out with the code? Or should this be done with php programming? Thanks! Joey
[jQuery] Is there a way to wrap a table around content with jQuery?
Hello, I'm running into some trouble trying to wrap a table around some content. The table looks like this: table trtdContent/td/tr trtd[image to be wrapped around]/td/tr trtdMore Content/td/tr /table I've been experiementing with the most of the API DOM manipulation functions, but none of them seem to do the trick. I'd like to use something like wrap(), but wrap will inject the content into the first td, rather than the middle one. I tried putting a div in the middle cell to see if jQuery would then consider it the deepest element, but it still adds it to the first td. Any ideas? Thoughts would be much appreciated! Thanks! Chris
[jQuery] Re: Duplicate IDs
Hi chrisandy, No need to apologize. We're glad to help. You can apply a clueTip to anything you want. It doesn't have to reference an ID. For example, if you want to apply it to all links inside ul class=uk, you could do it like this: $('ul.uk a').cluetip({sticky: true}); -- and put in any other options you want in there. Let me know if you have any further questions. --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com On Oct 15, 2007, at 1:30 PM, chrisandy wrote: Please forgive me but I'm very new to all this and was just building a page to handle multiple instances of the clueTip 'sticky' effect (example 4 on the demo page). The big problem I get is that I have to use: ul class=uk lia id=sticky class=plot4 href=name1.html rel=name1.htmlThe Estelleemimg src=assets/images/developments/ mannerscourt/estelle/estelle-sm.jpg alt=The Estelle title=The Estelle /The Estelle is a lovely 3 bedroom property with more details to go in here...span/span/em/a/li lia id=sticky class=plot1 href=name2.html rel=name2.htmlThe Estelleemimg src=assets/images/developments/ mannerscourt/estelle/estelle-sm.jpg alt=The Estelle title=The Estelle /The Estelle is a lovely 3 bedroom property with more details to go in here...span/span/em/a/li /ul Obviously duplicate IDs is a no no and only the first item in the list works so how do I get around this? Many thanks in advance.
[jQuery] Re: queue, dequeue, stop, and the endless mouseovers
Hi although there is many things unclear to me in animations, :animated seems to work right. I suggest the addition of a case around the code in your slideTabs() function : if (!$this.next().is(':animated')) With console.log(), I noticed that over events are being fired far more often than necessary. Using your menu, where button are pretty small, I have normally the over event being fired 2 times when the tab slides up only one time. On mine with bigger buttons its even more. I found it important to reduce the number of events as low as the strict necessary, because cpu/memory use can increase drastically, when doing mad mouse moving, when animation are chained or/and when they run on multiple elements -Olivier var slideTabs = function() { var $this = $(this); console.log('before-'); if (!$this.next().is(':animated')){ resetClose(); console.log($this); console.log('-after'); $this.parent().siblings().children('div.panel_body') .animate({height: 'hide'}, 300, function() { $(this).prev().removeClass('visible'); }); if (idle == false) { $this.next(':hidden').animate({height: 'show'}, 300, function() { $(this).prev().addClass('visible'); }); } } }; Karl Swedberg wrote: Hi everyone, Someone asked me to try to replicate something he saw here: http://www.andrewsellick.com/examples/tabslideV2-mootools/ It looked pretty straightforward, and I was able to reproduce the main effect pretty easily -- except that the Moo tools one looks better because it doesn't try to slide up every tab when the mouse goes quickly over a number of them. You can see the problem with mine here (note, I changed the photo and tab colors to protect the innocent): http://test.learningjquery.com/tabslide/ I know this little problem can be resolved with the hoverIntent plugin, but I'd like to gain a better understanding of the new animation methods in jQuery 1.2, and I thought that one of them would help, but I can't quite get things to work. I tried various combinations of .queue() and .dequeue() and .stop(), but nothing worked right. So here is what I have now. As you can see, I also tried using the new :animated selector, and that almost worked, but not quite (which is why it's commented out now): $(document).ready(function() { var $panelBodies = $('div.panel_body'); $panelBodies.slice(1).hide(); var slideTabs = function() { var $this = $(this); $this.parent().siblings().children('div.panel_body') .animate({height: 'hide'}, 300, function() { $(this).prev().removeClass('visible'); }); // if ($panelBodies.filter(':animated').length 2) { $this.next(':hidden').animate({height: 'show'}, 300, function() { $(this).prev().addClass('visible'); }); // } }; $('div.panel_container h3').mouseover(slideTabs); }); Can anybody help this poor lost boy? thanks, --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com
[jQuery] Re: Is there a way to wrap a table around content with jQuery?
Tricky problem. I found one way, but there MUST be an easier way. Demo: http://www.commadot.com/jquery/wrapTable.php# Maybe try the flydom plugin? Glen On 10/15/07, Chris - Implied By Design [EMAIL PROTECTED] wrote: Hello, I'm running into some trouble trying to wrap a table around some content. The table looks like this: table trtdContent/td/tr trtd[image to be wrapped around]/td/tr trtdMore Content/td/tr /table I've been experiementing with the most of the API DOM manipulation functions, but none of them seem to do the trick. I'd like to use something like wrap(), but wrap will inject the content into the first td, rather than the middle one. I tried putting a div in the middle cell to see if jQuery would then consider it the deepest element, but it still adds it to the first td. Any ideas? Thoughts would be much appreciated! Thanks! Chris
[jQuery] Re: Extremely poor performance of jQuery on AJAX partial page updates
Should I just use DOM's createElement() and appendChild() directly? Or use innerHTML? And would it execute SCRIPT elements? Have you tried my 2nd suggestion yet? I think it would solve the problem: $(parent).append(state.html); In general, does anybody know why jQuery has that regexp in the constructor - I assume there is a good reason why they are doing it. When you call $(foo) (which turns foo into a jQuery object), jQuery has to determine whether foo is a DOM element, css/DOM selector, or HTML. That regexp is testing for an HTML string. However, when you call .append(foo) jQuery knows foo must be an HTML string or DOM element, so there's much less overhead. Thanks, now that I've been staring at jQuery's internal DOM manipulation fn's, I've got some neat changes to make to my SuperFlyDOM plugin. Much appreciated. Charles doublerebel.com
[jQuery] Re: Jquery Plugin for TinyMCE
have you got a copy of previous versions of jQ? Have you tried using the compatibly plugin ? suggestions not sureties. theres a editor being made as part of UI but I guess that might take a while On 15/10/2007, wattaka [EMAIL PROTECTED] wrote: I´ll need some help on this because I´m getting errors: I saved this from the page as tinymce.js // tiny MCE - //jQuery plugin for accessible, unobtrusive WYSIWYG HTML editing // v .1 // by Alton Crossley // http://www.nogahidebootstrap.com/jtinymce/ $.fn.tinymce = function(options) { return this.each(function() { preString = div class='jqHTML_frame' style='width:+$ (this).css(width)+px;height: + ($(this).css(height)+20) + px;'div; postString = /divdiv class='jqHTML_link' style='float:right' onclick=toogleEditorMode(' + this.id + ');HTML/div/div; $(this).wrap(preString + postString); //alert(this.id + '' + $(this).html() + ''); //alert(this.id + 'Width:' + $(this).css(width) + 'Height:' + $(this).css(height)); }); } And the I tried to inoke tinyMCE by doing this: $(document).ready(function(){ $('#test_textarea').tinymce(); }); I get these errors: 1. $(#test_textarea).tinymce is not a function 2. missing ; before statement is there anything else that I have to do? Is the plugin Jquery 1.2.1 compatible? Thansk
[jQuery] Problems with jQuery loaded from JSP
Hi! New to jQuery and have successfully managed to use the ajax functionality from an HTML page. The problem is that I want to use it from a JSP page. The JSP page is identical to the HTML page, but it seems that jQuery stops working from the JSP page. At least all JavaScript evaluation stops working in this page (even if I only have a script inclusion of the jquery.js file. If I remove the link to jQuery then my own scripts start to work in the JSP page. I am completely stomped. What am I doing wrong? Is there something wrong with a header that can create this? I am running JBoss 4.2.1.GA. Has anyone seen the same behavior? -- Magnus
[jQuery] Re: Ajax tabs detect automatically
On 15 Okt., 20:05, zorba [EMAIL PROTECTED] wrote: last question, it seems that triggerTab() is no more useful. How can I replace it please? thanks It has changed to tabsClick() in Tabs 3... Documentation: http://docs.jquery.com/UI/Tabs --Klaus
[jQuery] Re: ANNOUCE: jQuery lightBox plugin
Kia Niskavaara wrote: Maby you can use the data: URI kitchen to construct your own data: URLs? Like this: logo.src = 'data:image/gif;base64,R0lGODlhDQAOAJEAANno6wBmZgAAACH5BAAA'+ 'LAANAA4AQAIjjI8Iyw3GhACSQecutsFV3nzgNi7SVEbo06lZa66LRib2UQAAOw%3D%3D'; More info: http://diveintogreasemonkey.org/patterns/add-image.html Not compatible with all browsers IIRC...
[jQuery] Re: Extremely poor performance of jQuery on AJAX partial page updates
$(parent).append(state.html) did the trick - thanks a ton polyrythmic!
[jQuery] How to suck web content from an iframe to a div
Hoping anyone can help. I use a custom scroll bar jquery plug-in which requires the content to be within a DIV. Some of the content I want to load is from other web sites. I am pretty sure it is possible to load the content into a hidden iframe and then, once it has finished loading, suck the data in the iframe into my div and then apply my scrollbar plugin to the newly fitted div. What's the proper method and plug-ins used to achieve this please? What are some of the pitfalls in doing this, if any? -- View this message in context: http://www.nabble.com/How-to-suck-web-content-from-an-iframe-to-a-div-tf4630767s27240.html#a13223056 Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] creating drop down menus with JQuery?
Hi, Is there a plug-in that allows for menu creatio in JQuery? Specifically, I'm looking for something where when you roll over an arrow graphic, a menu will pop up beneath it. I do not need submenus to pull out over individual menu items. Thanks for any advice, - Dave
[jQuery] Re: creating drop down menus with JQuery?
check out jdMenu http://jdsharp.us/jQuery/plugins/jdMenu/. It's pretty cool. Chris On 10/15/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, Is there a plug-in that allows for menu creatio in JQuery? Specifically, I'm looking for something where when you roll over an arrow graphic, a menu will pop up beneath it. I do not need submenus to pull out over individual menu items. Thanks for any advice, - Dave -- http://cjordan.us
[jQuery] Re: Beginner problem: Link is not working (JQuery Cycle Plugin)
Tom, toggle prevents the default event action so the anchor is not followed when you click it. Mike On 10/12/07, tlob [EMAIL PROTECTED] wrote: Hello I am working with the fantastic JQuery Cycle Plugin. Thank you very much for creating such great librarys! I am almost there But I have a very basic problem. Start/stopping the slideshow is fine with click on thumbnails/pictures/ slideshow. But when you click on the thumbnails, the link is not working. http://siggibucher.com/preview/test.php 1. I dont understand why. Can you explain that? 2. How can I change that? ;-) THX in advance, have a nice weekend tom
[jQuery] Re: How to suck web content from an iframe to a div
Julian, You cannot access the contents of an IFrame which is sourced from a different domain. This is part of the browser's cross-domain security model. Mike On 10/15/07, juliandormon [EMAIL PROTECTED] wrote: Hoping anyone can help. I use a custom scroll bar jquery plug-in which requires the content to be within a DIV. Some of the content I want to load is from other web sites. I am pretty sure it is possible to load the content into a hidden iframe and then, once it has finished loading, suck the data in the iframe into my div and then apply my scrollbar plugin to the newly fitted div. What's the proper method and plug-ins used to achieve this please? What are some of the pitfalls in doing this, if any? -- View this message in context: http://www.nabble.com/How-to-suck-web-content-from-an-iframe-to-a-div-tf4630767s27240.html#a13223056 Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: How to suck web content from an iframe to a div
Thanks Mike, That makes sense. And what if it was the same domain? This is also the case with our new site. I should have been more specific. I apologize. malsup wrote: Julian, You cannot access the contents of an IFrame which is sourced from a different domain. This is part of the browser's cross-domain security model. Mike On 10/15/07, juliandormon [EMAIL PROTECTED] wrote: Hoping anyone can help. I use a custom scroll bar jquery plug-in which requires the content to be within a DIV. Some of the content I want to load is from other web sites. I am pretty sure it is possible to load the content into a hidden iframe and then, once it has finished loading, suck the data in the iframe into my div and then apply my scrollbar plugin to the newly fitted div. What's the proper method and plug-ins used to achieve this please? What are some of the pitfalls in doing this, if any? -- View this message in context: http://www.nabble.com/How-to-suck-web-content-from-an-iframe-to-a-div-tf4630767s27240.html#a13223056 Sent from the jQuery General Discussion mailing list archive at Nabble.com. -- View this message in context: http://www.nabble.com/How-to-suck-web-content-from-an-iframe-to-a-div-tf4630767s27240.html#a13223518 Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: Is there a way to wrap a table around content with jQuery?
What do you think of this? $('img.toWrap').each(function(i) { var img = $(this); var table = $('tabletrtdContent/td/trtrtd\ class=imageHere/td/trtrtd\ More Content/td/tr/table'); table.insertBefore(img); table.find('td.imageHere').append(img); }); JK From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Glen Lipka Sent: Monday, October 15, 2007 2:18 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: Is there a way to wrap a table around content with jQuery? Tricky problem. I found one way, but there MUST be an easier way. Demo: http://www.commadot.com/jquery/wrapTable.php# Maybe try the flydom plugin? Glen On 10/15/07, Chris - Implied By Design [EMAIL PROTECTED] wrote: Hello, I'm running into some trouble trying to wrap a table around some content. The table looks like this: table trtdContent/td/tr trtd[image to be wrapped around]/td/tr trtdMore Content/td/tr /table I've been experiementing with the most of the API DOM manipulation functions, but none of them seem to do the trick. I'd like to use something like wrap(), but wrap will inject the content into the first td, rather than the middle one. I tried putting a div in the middle cell to see if jQuery would then consider it the deepest element, but it still adds it to the first td. Any ideas? Thoughts would be much appreciated! Thanks! Chris
[jQuery] Re: Is there a way to wrap a table around content with jQuery?
An alternative ... $(['table border=1trtdContent/td/tr' ,'trtd/td/tr' ,'trtdMore Content/td/tr' ,'/table'].join('')) .insertAfter('#target').find('td:eq(1)').append($('#target')); On Oct 15, 10:17 pm, Glen Lipka [EMAIL PROTECTED] wrote: Tricky problem. I found one way, but there MUST be an easier way. Demo:http://www.commadot.com/jquery/wrapTable.php# Maybe try the flydom plugin? Glen On 10/15/07, Chris - Implied By Design [EMAIL PROTECTED] wrote: Hello, I'm running into some trouble trying to wrap a table around some content. The table looks like this: table trtdContent/td/tr trtd[image to be wrapped around]/td/tr trtdMore Content/td/tr /table I've been experiementing with the most of the API DOM manipulation functions, but none of them seem to do the trick. I'd like to use something like wrap(), but wrap will inject the content into the first td, rather than the middle one. I tried putting a div in the middle cell to see if jQuery would then consider it the deepest element, but it still adds it to the first td. Any ideas? Thoughts would be much appreciated! Thanks! Chris
[jQuery] Re: Problems with jQuery loaded from JSP
I can't tell you what is wrong without seeing the page (can you post links to the working and broken versions?), but I can tell you this: There is no such thing as a JSP page when we're talking about jQuery, JavaScript, CSS, and other client-side technologies. By the time the page reaches the browser, JSP is long out of the picture. All the browser sees is the resulting HTML/JS/CSS files and their headers. You mentioned that the JSP page is identical to the HTML page - just to double-check, did you do a Save As (Web Page Only) on the JSP page in the browser and diff that saved page with the HTML version? If they are truly identical, then the only thing left is the headers. Compare those with the working version and the problem should be in whatever is different. -Mike From: Iorlas New to jQuery and have successfully managed to use the ajax functionality from an HTML page. The problem is that I want to use it from a JSP page. The JSP page is identical to the HTML page, but it seems that jQuery stops working from the JSP page. At least all JavaScript evaluation stops working in this page (even if I only have a script inclusion of the jquery.js file. If I remove the link to jQuery then my own scripts start to work in the JSP page. I am completely stomped. What am I doing wrong? Is there something wrong with a header that can create this? I am running JBoss 4.2.1.GA. Has anyone seen the same behavior?
[jQuery] Re: Is there a way to wrap a table around content with jQuery?
Thank you all for your responses, I ended up using Jeffrey's suggestion, and it works well. It took me a while to figure out that you couldn't add partial elements with the API. I'm glad that there's a workaround! :) Thanks again, folks!
[jQuery] Unexpected behaviour with interface sortable
I've only just started playing with JQuery the past two days so I've probably missed something. I'm using the interface plugin to create a set of divs sortable by dragging. (I'm using interface rather than UI because as I understand it UI only allows sortable lists). The odd behaviour can bee seen in the example page at http://www.fogcat.co.uk/jquery/gs5.html If you grab the letter A and drag you can only move that item to the top or the bottom, dragging C only allows you to select 1st secod or last (but not all of those with the cursor in the right place). However if I simply remove the line containment:'parent', from the initialisation of the sortable the dragging works fine although it is no longer constrained. see http://www.fogcat.co.uk/jquery/gs5.html. Is this a bug or have I missed something obvious
[jQuery] Re: queue, dequeue, stop, and the endless mouseovers
Olivier, You're right! Thanks a lot for the suggestion. When I tested in Firebug, it didn't look like there were a lot of before logs firing without the after logs, but even having it happen just a few times warrants the extra :animated condition in there. Thanks again for testing and contributing! Much appreciated. --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com On Oct 15, 2007, at 4:29 PM, Olivier Percebois-Garve wrote: Hi although there is many things unclear to me in animations, :animated seems to work right. I suggest the addition of a case around the code in your slideTabs() function : if (!$this.next().is(':animated')) With console.log(), I noticed that over events are being fired far more often than necessary. Using your menu, where button are pretty small, I have normally the over event being fired 2 times when the tab slides up only one time. On mine with bigger buttons its even more. I found it important to reduce the number of events as low as the strict necessary, because cpu/memory use can increase drastically, when doing mad mouse moving, when animation are chained or/and when they run on multiple elements -Olivier var slideTabs = function() { var $this = $(this); console.log('before-'); if (!$this.next().is(':animated')){ resetClose(); console.log($this); console.log('-after'); $this.parent().siblings().children('div.panel_body') .animate({height: 'hide'}, 300, function() { $(this).prev().removeClass('visible'); }); if (idle == false) { $this.next(':hidden').animate({height: 'show'}, 300, function() { $(this).prev().addClass('visible'); }); } } }; Karl Swedberg wrote: Hi everyone, Someone asked me to try to replicate something he saw here: http://www.andrewsellick.com/examples/tabslideV2-mootools/ It looked pretty straightforward, and I was able to reproduce the main effect pretty easily -- except that the Moo tools one looks better because it doesn't try to slide up every tab when the mouse goes quickly over a number of them. You can see the problem with mine here (note, I changed the photo and tab colors to protect the innocent): http://test.learningjquery.com/tabslide/ I know this little problem can be resolved with the hoverIntent plugin, but I'd like to gain a better understanding of the new animation methods in jQuery 1.2, and I thought that one of them would help, but I can't quite get things to work. I tried various combinations of .queue() and .dequeue() and .stop(), but nothing worked right. So here is what I have now. As you can see, I also tried using the new :animated selector, and that almost worked, but not quite (which is why it's commented out now): $(document).ready(function() { var $panelBodies = $('div.panel_body'); $panelBodies.slice(1).hide(); var slideTabs = function() { var $this = $(this); $this.parent().siblings().children('div.panel_body') .animate({height: 'hide'}, 300, function() { $(this).prev().removeClass('visible'); }); // if ($panelBodies.filter(':animated').length 2) { $this.next(':hidden').animate({height: 'show'}, 300, function() { $(this).prev().addClass('visible'); }); // } }; $('div.panel_container h3').mouseover(slideTabs); }); Can anybody help this poor lost boy? thanks, --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com
[jQuery] two subscriptions to the same group
Hi All, This is strange, and I am not sure how it happened, but I think somehow I got 2 different subscriptions to this group, one as rsmolkin and one as pixelwizzard. I went to edit my membership and changed it to only get 1 daily e-mail, yet I am still getting every message posted. Any idea how I can fix this? -Roman