Way to break jQuery
Hey guys, wanted to let you know how I accidently broke jQuery: <blockquote>var fn = function(selector) { selector = selector || '.myClassName'; jQuery(selector).addClass('someClass'); } jQuery(document).ready(fn); </blockquote> I wanted to create a function, fn, that could take a selector but when none were supplied it would affect (in this case) all elements with "myClassName" as a class. What happens is that when you call jQuery(document).ready(fn), the ready() function supplies $ or jQuery
How can I get a version newer than 1.2.1?
Just checked out from SVN. It is still 1.2.1 Nightlies link is broken (someone submitted a bug already) Browsing the svn source on the web is also not showing anything newer than 1.2.1. I really want to try 1.2.2 because I think we're having some of the IE issues that have been fixed. I downloaded and built it myself, but it is still 1.2.1. Something is out of date (the docs, or the links to svn, or something?) Please help. - mike
Resizables lib and examples links broken
<div>the links to the resizable plugin seem broken:</div> <div> <a href="http://dev.jquery.com/view/trunk/themes/flora/flora.all.css">http://dev.jquery.com/view/trunk/themes/flora/flora.all.css</a> <a href="http://dev.jquery.com/view/trunk/plugins/dimensions/jquery.dimensions.js%22"> http://dev.jquery.com/view/trunk/plugins/dimensions/jquery.dimensions.js"</a></div> <div><a href="http://dev.jquery.com/view/trunk/plugins/ui/ui.mouse.js%22">http://dev.jquery.com/view/trunk/plugins/ui/ui.mouse.js"</a></div>
jquery utility functions consistency
I have really been enjoying using jQuery, so thanks to all the devs here. I have one main complaint- consistency in the api across utitlity functions. When I use the utility functions, or their core equivalents, I have to remember which comes first, the array element or the index. $.each(arr, function( index, element ){}) $.map(arr, function( element, index ){}) The natural way is to always put the element first for any iterating function. This should also be true of any methods like filter. Also,
Can we add something akin to this...?
It would be nice to have something akin to this in the static portion of jQuery. I know I can do a plugin (and I may) but it would be really nice to have this functionality in the core. I use a variation of this code snippet to define custom events that any code can listen to. Its really handy, small and makes various interfaces quite clean. Gabriel pubSub: {}, publish: function(eventName) { if(!jQuery.pubSub[eventName]) jQuery.pubSub[eventName] = []; }, subscribe:
case sensitivity in find() vs children()
I was using jQuery to parse XML (actually a text string returned from an XMLHttpRequest) and found some odd behaviour when dealing with elements that weren't all lowercase. Basically find() seems to only select lowercase elements, regardless of whether the selector string is lowercase or not, while children() selects elements with no case sensitivity. Here's an example that should illustrate the problem: ------ var s = document.createElement("script"); s.setAttribute("type", "text/javascript"); s.addEventListener("load",
anyone installed FF3 yet?
There are a couple bugs written up on FF3 and I understand it has just been released as beta. Has anyone installed it? If so, can someone do me a favor and test out the jquery SVN unit testing on it? I'm curious to know where we stand since 1.2.2 is around the corner. I'd do it but I'm afraid to install it since I've had issues with multiple FF versions on one machine and I still need FF2. Thanks, David
New jQuery Plugin - wcAutoSuggest
Folks, After reviewing some existing auto-suggest plug-in, I decided to write one that was simple, quaranteed to work on all browsers by basically using resuable native HTML controls to do the job of a Suggestion Box with native support of scrolling of large list. It would be great to get some initial comments on this plug-in we plan to put into beta testing next week. Here is the link with example usage, source code. http://beta.winserver.com/public/test/wcAutoSuggestTest.wct Of course, anyone is
Question about comma separated selector...
Greetings, Karl Swedberg suggested I pass on an inquiry I made on the jquery-en group to this one... The original inquiry was: ---- I have a general inquiry for the core dev guys... I noticed today while running a selector that comma separated selectors build their results by order of the selector and not by order they appear within the originating DOM. What I mean is, if I am running a selector that has say two different classes and I want nodes for both (ie. div.classOne and div.classTwo) I might
Auto-Suggestion Plugin
I wrote a simple auto-suggestion box using a <INPUT> and <SELECT> tags where the keyup <INPUT> actions call ajax to fill in the select box. In general, it works very nicely, however it has other considerations that was missing. So I looked for other plugins and found three of them at the JQuery web site, but I they all seem to be incomplete in some key considerations as well, and quite frankly, compared to my simple version, much larger in code. But even then, if it worked, that would be ok. It would
JQuery-Wiki documentation pages extensions
Hi, I am curious about how the JQuery-Wiki documentation pages are done. I can see that there are APIHeader, APIEntry .. kind of tags in the wiki text. Are these extensions? Is it possible (and where) to get the source for these? -- Konrad
What exactly does the width() function get?
Hi, I just found that the value returned by the width function in JQuery is different from the one returned by yui. Here is my testcase //////////////////////////////////////// <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http:// www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en-US"> <head> <title>Tempate</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <style type="text/css"> table { table-layout: fixed; border-collapse:
possible bug with [value*=text]
Hey guys, I was testing out some selectors and came across a possible bug. When I have a input form like: <input type="text" id="noName" name="" value="No Name Attribute"/> And try to select it with: $("[value*='no']") I get an error at line 1473: (type == "*=" || type == "~=") && z.indexOf(m[5]) >= 0) ^ not ) I have a test page up at <a href="http://benjaminsterling.com/articles/jQuery-%20Select%20what%20you%20want%20-%20part%201.htm">http://benjaminsterling.com/articles/jQuery-%20Select%20what%20you%20want%20-%20part%201.htm</a><br
Orange Template
Hey, Ok, there's a new template engine in town. It's simple and good. Yay! download it https://sourceforge.net/project/showfiles.php?group_id=210374&package_id=253247&release_id=556093 and try it out. there is a simple example of how the code works (in a php rendition) here: http://projektorange.com/template_example/ It supports * simple string replacement * repeating objects (lists of items with attributes) * a named cycle for repeating objects (think alternating colors.. as many as you want!) *
Fade
Hello, I have 2 divs: <div id="parent"> <div id="child"> </div> </div> I need to create a function using JQuery that when called does the following: 1. Centers child inside parent 2. Fades in child How can I do this? Thanks, Miguel
New event functionality
I created a branch today to finally implement some ideas I've had to implement "special events". Basically I've made "ready" a first class event and the hooks for doing so allow us to create other special events. I've already implemented the following events: mouseenter, mouseleave and mousewheel. All of these events, including ready, can be implemented via the bind/unbind API. <div><br class="webkit-block-placeholder"></div><div>$(...).bind("ready", fn);</div><div>$(...).unbind("ready", fn);</div><div>$(...).bind("mousewheel",
jQuery at ColdFusion United Conference
I have been chosen to speak of jQuery CF integration at the conference this summer. Anyone who has ideas they would like to share is welcome to toss them my way. ( sosensible@gmail.com ) I have ideas but the collective group has more than any individual. :)
jQuery & Vista Sidebar Gadget
Hi. I am new to jQuery and I am trying to create a Vista Sidebar Gadget. I am able to get the gadget to work in IE but when I create the actual gadget and install it on Vista, the jQuery features do not work. I am using Jörn's Accordion which doesn't work in the Gadget. I have then used basic jQuery to create an accordion which also does not work. Can anyone tell me if jQuery just doens't work in Vista Sidebar Gadgets? If it should work, what am I missing? Any help would be greatly appreciated. Thank
alert(); not working when called from jQuery objects in IE7
Hey everyone, First of: I love jQuery, just started working with it and it really has awesome powers. My problem however is the following. when I check in IE7 a lot seems to be broken, most probably because of me. To check what is going on at what stage I had littered my code with alert() calls to check what is happening at what point. These alerts don't seem to work in IE7. Then I just removed all my code and kept the following: $(document).ready(function(){ alert("hello world!") }); Does anybody
JS noob
I'm new to JS and especially jQuery so go easy on me. I'm trying to use the following code snippet(found in AJAX section od jQuery demo page) in a page to "pop-up" a create message dialog... <a href="createMessage.php?height=380&width=320&modal=true" class="thickbox" title="New Mail Message">New Message</a> It works beautifully in Firefox and Safari, but not in IE 6.0.2900.xxx or IE 7.0.5.xxx What happens: The screen is grayed out like it is supposed to be, a broken image link appears centered...probably
Speed of .load in IE6
There's a very noticeable difference in the speed of loading (using the .load method) a large chunk of html using .load between version 1.1.3.1 and 1.2.1. Believe it or not, in IE6, 1.1.3.1 is very much faster. But, of course, IE7 and FF are actually faster in 1.2.1. <sigh> Any ideas on this one?
Bug : animating width/height of bordered objects in Opera
Came across this problem whereby width/height animation in Opera, of an object that has a border, causes 'jumps' in the object size before resizing. Demo and fix : http://www.wizzud.com/tester/operabug.html This occurs because the borders are being included in the starting width and height when initialising the animation. The problem is located in fx.cur(), when curCSS() is used to get the width/height values. I can only find this problem in Opera (tried IE6, IE7, FF1.5, FF2, Safari 2, Safari 3beta).
Poking the bear
Any guestimate as to when jQuery UI 1.1 will be available? <br clear="all"> -- lift, the secure, simple, powerful web framework <a href="http://liftweb.net">http://liftweb.net</a> Collaborative Task Management <a href="http://much4.us">http://much4.us</a>
Plugin Website Sends Account Password in Plain text
The plugin website sends account password in plain text. I HATE THAT!!! Especially when you don't notify me ahead of time when I enter my password (at least then I could pick a password that doesn't matter anywhere else). PLEASE CHANGE THIS!!!! Is there a better place to post this request?
Docs XML build problem
I am trying to create an XML document similar to the one that is found on the http://visualjquery.com/index.xml where it is basically an XML document of all the methods in jQuery. But when I downloaded the code from the repository and ran the ant file all the XML documents that were generated had a blank <doc/> element in the xml file. Is there something in the process that I am missing?
jQuery FX Dev
I've been working on a plugin for Rails to replace the native Prototype/scriptaculous implementations with jQuery. In the process, I made some updates to the fx plugins. Specifically, I rewrote the drop plugin to work a little better and added a plugin for slide. Is there a way to get involved with the development of the fx library? I'd like to add the functionality of the existing interface collection. You can checkout some of the effects here: http://ennerchi.com/projects/jrails
Error in droppable.js
Hi guys , I am using the droppables.js on my site and this js file was directly linked to teh jquery. Today I found a bug in teh droppable.js file.For some resons its giving a helperSize.width javascript error on the browser and also has forced teh functionality to not work. You can also this error on teh following page http://docs.jquery.com/UI/Droppables Just try to drag and drop the element. Any idea on why this has come up and what needs to be done to resolve this.
The className of a dialog bug.
Hi All, The last version from the SVN, file ui.dialog.js, line 65. ~~~~~~~~~~~ .addClass('ui-dialog') ~~~~~~~~~~~ It looks we missed the old className here, maybe we should use ~~~~~~~~~~~~ .addClass('ui-dialog').addClass(uiDialogContent.attr('className')) ~~~~~~~~~~~~ instead of it to resolve this bug. Thanks for your great works, please fix it as soon as possible.
Position issue in ui.dialog.js and how to resolve it.
Hi Guys, In the last version of file ui.dialog.js from SVN, there is a bug. ~~~~~~~~~~~~~~~~~~~~~~~~ line 112~134 var wnd = $(window), doc = $(document), top = doc.scrollTop(), left = doc.scrollLeft(); switch (options.position) { case 'center': top += (wnd.height() / 2) - (uiDialog.height() / 2); left += (wnd.width() / 2) - (uiDialog.width() / 2); break; case 'top': top
:not() selector bug, can't post on Trac
I can't post this on Trac because it's freaking out on me. I registered an account and logged in, but when I tried to post the bug I was logged out. So I tried logging in again and it keeps taking me back to the register page. This happened numerous times. So I'll post the bug here and hopefully someone can file it for me: I was trying to write a selector to select all children of a certain element, with the exception of one. The problem is that it only returns the children that come BEFORE the first
jQuery.extend(true,{foo:"bar"},{foo:null}); //throws an exception
<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; ">Hi,<DIV>When running my unit tests in the jQuery testing harness (a few days old from svn) I found that </DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>jQuery.extend(true,{foo:"bar"},{foo:null});</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>will throw an exception with the message:</DIV><DIV> TypeError: Cannot read property "nodeType" from null</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>I
In the .ready() can not hide a element??
I have a lot operation in .ready ,and almost in the end , I want to use $('#element').hide() to hide a element,but I find it is no effect at all, more confuse is ,when a add a alert('abc') before the $('#element').hide() sentence , it work well.Can someone tell me more about this.Thanks for any tips.
$.ajax and charset
Hello, Would it be possible to set the charset in ajax ? For instance to retrieve a js script that is using a different encoding ... It seems there is no option for the time being, but I maybe wrong. Do you have an idea ? Cheers, Sylvain
jQuery Array Help
Hi, I have been using jQuery for a while now, and i find it truly amazing. I ran into a problem while using arrays, The code i have works in IE6 AND FIREFOX but not on IE7. Any help would be appreciated. I am looking for a way to find out if a text exists in an array. if($("input.statuschk:checked").length > 0) { var statusArr = new Array() $("input.statuschk:checked").each(function(){ statusArr.push($(this).val()); }); $("#defectsTable1 td.status").each(function(){ if(statusArr.indexOf($(this).find("select").val())
runtest/testrunner.js doesnt clearly report test results with uncaught exceptions
<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; ">Hi Dev Team,<DIV>I'm using the same test harness to add unit tests to my project and I noticed that if a particular test fails to do an uncaught exception I might not get a very clear signal in my unit test results. For example the current test function is:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>function test(name, fn){</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">
Filtering IMG tags
I am wondering is this is possible with jQuery or it might be too late in what we are attempting to prevent. Currently in our web mail client application, the server will parse/ filter the html output, filtering out any malicious JS/HTML, including <IMG>. So the client will never see any of this. I was exploring moving this filtering to a jQuery client-side script. I did this and it seems to work: <script type="text/javascript" src="/public/js/jquery.pack.js"></ script> <script type='text/javascript'>
RegExp performance in IE
Hi All, I am not sure if this is the right place to post, please excuse me it's not Bumpped into one problem when I tried to generate around 5000 select options using jQuery in IE, it simply freezes, I was able to isolate the problem down a regular expression used for picking up the html tags, (the particular regular expression had to deal with around 100K of text, and it appears to be a killer for IE). /^[^<]*(<(.|\s)+>)[^>]*$/ The culprit was in fact in (.|\s) and the way IE handles it, some googling
prop with function() for value
I was making a demo for when attr is passed a function and noticed in jQuery.prop() it has this line of code: value = value.call(elem, [index]); Was it intended this would pass back an array of length one? Or should it instead doing an apply or be: value = value.call(elem, index); I can make a ticket and patch if you like but I wanted to make sure it was not intended first. David
More elegant code
Hi, I've just wrote this piece of code. It works but i think it could be written better. I will explain a little bit the code: clicking a on <a> child of the <ul> in the <div> with id "precollection" will remove from all the link the class sel and then reassign it only to clicked link. Then I need another loop with the each function because i want to have a numeric identifier of the link i clicked. $(document).ready(function() { $('#pre-collection ul a').click(function(){ $('#pre-collection ul
.height() function reloads flash elements
Hey all, In development of my site, I find that when I call .height() on a specific element, the flash elements on the site reload, once I take that one height call, everything returns to normal. Here's the code: if ($(window).height() + $(window).scrollTop() < e.pageY+16 + $ ('#login_helper').height()) { $('#login_helper').css({top: e.pageY - $ ('#login_helper').height()}); } The first height() call on #login_helper is at fault. The window.height() call works fine. Hopefully
Next Page