Question about event delegation in jQuery 1.3
<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi all,<div>I have a question about the proposed event delegation in jQuery 1.3. I don't think it was discussed before, but if it was, my apologies in advance.</div><div>Perhaps it's my dumb nature, but when using Jörn's plugin, I found that I kept running into an issue of how I expected it to work, and how it actually worked.</div><div>My expectation was that it would bubble like normal events
Firefox CPU hog when closing page
Hi, I would like to know why my Firefox browser stops responding when I am trying to close my web page that is using jquery-1.2.6.js I have tested the same web page in Opera without experiencing the same problem. Firefox asked me continuously if I would like to terminate the javascript when closing the page, and I would like to know why it cannot just close it, without having firefox prompting me to terminate the running javascript. What can I do to prevent this from happening if I would like to
Event fix() minor improvement
Hi, I was wondering if it is worth to move this long line of the fix() method: var props = "altKey attrChange ......wheelDelta which".split(" "), out of the method itself, as a property of jQuery.event, initialized only once at load time, like this: props: "altKey attrChange ...... wheelDelta which".split(" "), Then in the fix() method change the declaration for "props" to point to that property: var originalEvent = event, props = this.props; This will slice out some extra millisecond for every event
Tickets feedback
Hi, I have a bunch of tickets that are almost ready to be closed. I need some feedback, and more testing in some cases: [http://dev.jquery.com/ticket/3054] That ticket is actually true, did that happen all the time ? [http://dev.jquery.com/ticket/2997] There's a cool patch, but it breaks some tests, I'm not sure why. [http://dev.jquery.com/ticket/2652] The patch fixes that, but... do we want to support the situation ? [http://dev.jquery.com/ticket/2968] What do you think ? I'd go for the short approach.
Dimensions on Opera 9.5
Hi Just wanted to let you know that we have 2 failing tests on Opera 9.5. One for width and one for height. -- Ariel Flesler http://flesler.blogspot.com
jQuery.browser.version fallback
This seems feasible. --John ---------- Forwarded message ---------- From: Óscar Toledo G. <uno@biyubi.com> Date: Tue, Jul 22, 2008 at 11:14 AM Subject: jQuery enhancement To: jeresig@gmail.com John Resig: Hi, I noted that on jQuery, when it calculates jQuery.browser.version and not matches Mozilla, MSIE, Opera or Webkit, it puts the undefined value. That would of no harm, but Digg.com (on digg.js) uses this value as version.split('.'), so non-recognized browsers trigger a JS error, my suggestion
Any plugins use .domManip?
Hi Everyone - I'm working on that method and I think some improvements could be make if the API was tweaked a little bit - are any plugins using it? I'd rather not change it if code will break. Thanks! --John
Extending selector engine extendibility
<div dir="ltr">I have been doing a lot of work and experimentation with the selector engine lately. One of the things I have been working on is a CSS selector. One of the problems I ran across was not being able to add new subselector types. Like attributes being matched in [attr=val] I wanted to match {cssAttr=val} but could not accomplish this with expand jQuery.parse and jQuery.expr alone. The roadblock is in jQuery.filter, after the jQuery.parse's are executed, then if m still exists, a series
Regression setting special form attributes with IE6
Hi all, I think there's a regression with 1.2.6 and setting form attributes as "action","methos" etc when there's an input with the attribute name Here is a simple test case that fire an error in IE6: <html xmlns="http://www.w3.org/1999/xhtml"> <head> <script type="text/javascript" src="jquery-1.2.6.js"></script> <script type="text/javascript"> $(function(){ $("form").attr("action","url2"); }); </script> <title>Test form attribute</title> </head> <body> <form action="url"> <input name="action" value="input">
Problem with slide effects in IE6/IE7 (jQuery 1.2.6)
I'm running into an issue with the slide effects when used on a list (ul or ol). A slideUp or slideDown behaves as expected in Firefox and Safari, but does not in IE6/IE7. In IE, the slide goes towards the center rather than towards the top or bottom, essentially performing a slide in both directions, which is not the expected behavior. I'm thinking it may have something to do with the slide happening on list items and some strange quirk of IE. The same behavior can be observed with the animated
Square collisions function
I am implementing a sort of grid, similar to the one you can find in the iGoogle page, where you can move panel around and do your stuff. Since I am new with jQuery UI, I probably wasted my time doing something that was just there and easily implementable. Anyway, I have created a function that is capable to understand collisions between a node A, and a node B, basing its computations on squares objects. A square object is an object that will contain top, left, width, and jeight keys. e.g. var div
Relator object proposal
Hi everybody. Yesterday I was developing a really weird script, and I was missing a better way to cache informations, generic object related. The jQuery.cache object is something "id dedicated". Accordingly, it is not able to cache entire results, nodes, binded function, because of its simple hashtable nature, based on string keys. For this reason, I have created an object, called Relator, that is capable to "cache once" every kind of variable, included undefined, null, booleans, functions, constructors,
Can't unbind click event for anchor
I am trying to turn an active link to an inactive one. However, clicking on the link now gives two alerts. Any input is appreciated. <html> <head> <script language="javascript" src="jquery.js"></script> <style type="text/css"> .lnk { TEXT-DECORATION: underline; cursor: pointer; } .noLnk { TEXT-DECORATION: none; cursor: default; } </style>
JS Memory & performance profiling
<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi all,<div>This isn't a jQuery specific question, but hopefully you guys won't mind indulging me, as I think others on the list might benefit from the answer.</div><div> </div><div>So, the question is, is there a way to profile Javascript memory and/or CPU usage in the different browsers (at least FF and IE) to see what effects the different libraries, methods, etc have on performance on
Jquery popup change
Hi! and thanks to this wonderful group! I have this jquery that i was looking for that when clicked away (outside the popup) it hides the popup. i just want that it should also have a link inside the popup to close it as well! jQuery(document).ready(function(){ jQuery(".button").bind("click", function(e) { jQuery("#bubble").css({ top:jQuery(this).offset().top-jQuery("#bubble").height()-2 }).show(); e.stopPropagation(); // Stops the following click function from being executed jQuery(document).one("click",
javasript deprecation
Hi, Just dropping a line about the preventBubble() being deprecated reported by firefox's error console: ---cut--- Event=click, use of preventBubble() is deprecated. Use W3C standard stopPropagation() instead. file:///F:/DesignerSite/script/jquery-1.2.6.js Line 2345 ---cut--- Keep it up with this great library ! Cheers
Implementation of DOMContentLoaded failing when no assets
This is only an IE problem. The "onload" event always fire before the "ready()" method in IE when there are no assets (images/objects/styles) in the page. I already new the implementation of IEContentLoaded in jQuery was not complete, but I was told that the "onload" fall back will always be a last resort solution so there would not have been problems, the correct firing would have taken care of anyway. I need to setup some more test to show the exact problem, then I will submit the needed patch
non-html elements
Hi, I posted this message to the user mailing list a while ago but got no response. Not sure if that's because no-one knew the answer or if its just a silly question. Hopefully someone here can enlighten me. Are you supposed to be able to use jquery to search for non-html elements? I've got a web-app that is sending out xrefs (basically placeholders for snippets of html) which are recursively expanded by jquery using the following function. function expand_refs (context) { $("xref",context||document).each(function
ZendFramework View Helper: jQuery CDN?
Hello jQuery Team, in the light of a possible View Helper for the Zend Framework (http:// framework.zend.com) I came accross the problem of the dispersity of all the jquery plugins and dependencies. It seems there is no CDN for a larger portion of the jQuery plugins, their stylesheet, image and library requirements. This affects the possibility of jQuery to be aid as a rapid development library in a Framework. I wrote a blog article on this and would appreciate your input on this topic: http://www.whitewashing.de/blog/articles/47
Removing script!!
Hi all, i want to find a way to remove all the functions and variables that the external script defines and loaded. i try this jQuery('script[src*=test.js]').remove(); But it only remove the element from the DOM.
.offset() improvements needed
The APE library recently released some information on library compatibility of .offset() methods and speed: http://dhtmlkitchen.com/ape/example/dom/compare/ The test suite used: http://dhtmlkitchen.com/ape/test/tests/dom/position-f-test.html To start, we need to investigate the relative positioning issues in Firefox 2 and Safari 3. I know that we've looked at performance issues in the past - but are there any additional thoughts? --John
jQuery.MultiFile Plugin and FF3?
Hi there I keep on getting the following error 'setting a property that has only a getter' when using the Mutlifile Plugin. In another thread I read the plugin was not tested for FireFox 3 some month ago but now Firefox is out in the wild it seems to be a good idea to take a look. Greets and thanks! red PS: It was mentioned here: <http://groups.google.com/group/jquery-dev/ browse_thread/thread/765c73e41b34f924/280ebb66b961c7ca>
map method ... and concat.apply
Hello. I don't think it requires a ticket, because I guess it is only some "dust to remove" and nothing else. I have spotted an interesting line inside jQuery 1.2.6 map method: return ret.concat.apply( [], ret ); Since map seems to be widely used, I wonder if return ret is everything we need at the end of that method, that revisited in a quick and "less chars" version could be something like: map: function( elems, callback ) { for( var ret = [], i = 0, length = elems.length, value; i < length; value
XMLHttpRequest request charset with Firefox 3
I've found a bug caused by a change in the Firefox 3 XMLHttpRequest behaviour According to the big yellow note in http://developer.mozilla.org/en/docs/XMLHttpRequest#Basic_Usage: "Versions of Firefox prior to version 3 always send the request using UTF-8 encoding. When sending a Document, Firefox 3 sends it using the encoding specified by data.inputEncoding (where data is a non-null object given to send()). If not present, it is treated as UTF-8." This implies that, when sending data in the XHR request,
Chili 2.2 supports local line numbers
I've just released version 2.2 of Chili, the jQuery Code Highlighter. (http://code.google.com/p/jquery-chili-js/) It now supports local line numbers too, which means that you can turn on line numbers on a PRE by PRE basis. Apart from the necessary start from an offset other than 1, I've implemented a feature that I call "automatic segmentation". If you add a class like "ln-123-some-name" to a bunch of PRE elements, Chili will add sequential line numbers to them, meaning that the first PRE will start
JSONP not triggering proper ajax events
Hi all, I have a button that triggers a jsonp call, and ajaxStart and ajaxComplete events aren't being triggered properly. It looks like jQuery.active gets incremented properly the first time ajaxStart is triggered, but is never decremented afterwords, so other ajaxStart and ajaxComplete events aren't triggered on subsequent jsonp calls. I put some console.log() calls into the jquery lib and it also looks like this temp function is never called: window[ jsonp ] = function(tmp){ data = tmp; success();
Future Animations and Units of Measurement
So the current coding convention across popular javascript libraries is to specify animations in terms of total milliseconds, but now that jquery has gone ahead and included dimensions.js as part of the core, perhaps its time to revise this concept. To create consistent animations, with complete control and accuracy, it would make more sense to use a derived unit, something like pixels per second, than a unit of time (ms). For two <div> elements to animate with a consistent speed they have to have
cannot post "+" to server
in my js: function testSubmit(){ newPostData("1+2"); } function newPostData(cmd){ $.post("/servlet/test","cmd="+cmd); } in my servlet: String data = getRequest().getParameter("cmd"); System.out.println(data); and we got "1 2" but not "1+2" as it should be. Is this a bug?
Plugin development: $.fn.pluginName vs $.pluginName
Hi all, I've been wondering about something for a while now and hopefully other jquery developers can shed their light of ideas on it as well. When creating plugins, there are generally 2 places where people plug into the jquery library. $.pluginName = { /* plugin code */ } and $.fn.pluginName = { /* plugin code */ } While there's quite a difference, I've noticed that people inject into the latter without any thought and thereby 'polute' the jquery prototype, which is duplicated on each $(myJQueryQuery)
text box validation based on radio button value
Hi I need to validate fields based on radio button ,In the following code I need to validate the routing number textbox only if the "Check" Radio button is selected I have defined the rules but it is not working . If you have any suggestion please let me know Thanks in advance. ----------------------Custom method --------------------------- $.validator.addMethod("isvalidbankroutingnumber", function(value) { var rtnArray = value.split(""); var firstPart = 3*(parseInt(rtnArray[0]) + parseInt(rtnArray[3])
cannot post "+" to server
in my demo.js: function postData(cmd){ $.ajax({ type: "POST", url: "variable.cmd", data: "cmd=" + cmd, success: function(msg){ } }); } function testSubmit(){ postData("1+2"); } in my servlet: String data = getRequest().getParameter("cmd"); System.out.println(data) OUTPUT is : 1 2 which means "+" is replaced by a space..
Long live to jQuery.isFunction
Ugh... I was making a "pretty dumping" script based on sniffing (no jQuery). I met the situation where IE reports functions like alert or confirm as objects, with no call, apply, or length. Sniffing them out was HARD and closed my Maxthon, 8 times, until I worked around this. Now I do understand the reason for such an ugly piece of code at $.isFunction. IE6 couldn't be bitchier. My apologies to John if I ever distrusted the sanity of this function :) Cheers -- Ariel Flesler http://flesler.blogspot.com
Plugin development: $.fn.pluginName vs $.pluginName
Hi all, I've been wondering about something for a while now and hopefully other jquery developers can shed their light of ideas on it as well. When creating plugins, there are generally 2 places where people plug into the jquery library. $.pluginName = { /* plugin code */ } and $.fn.pluginName = { /* plugin code */ } While there's quite a difference, I've noticed that people inject into the latter without any thought and thereby 'polute' the jquery prototype, which is duplicated on each $(myJQueryQuery)
Plugin development: $.fn.pluginName vs $.pluginName
Hi all, I've been wondering about something for a while now and hopefully other jquery developers can shed their light of ideas on it as well. When creating plugins, there are generally 2 places where people plug into the jquery library. $.pluginName = { /* plugin code */ } and $.fn.pluginName = { /* plugin code */ } While there's quite a difference, I've noticed that people inject into the latter without any thought and thereby 'polute' the jquery prototype, which is duplicated on each $(myJQueryQuery)
Plugin development: $.fn.pluginName vs $.pluginName
Hi all, I've been wondering about something for a while now and hopefully other jquery developers can shed their light of ideas on it as well. When creating plugins, there are generally 2 places where people plug into the jquery library. $.pluginName = { /* plugin code */ } and $.fn.pluginName = { /* plugin code */ } While there's quite a difference, I've noticed that people inject into the latter without any thought and thereby 'polute' the jquery prototype, which is duplicated on each $(myJQueryQuery)
trim on IE7 ticket
Hi I'd appreciate some help on this ticket: http://dev.jquery.com/ticket/2690 It works well on my IE 7, so there's not much I can do. Can you please test on your IE7's and post whether it works or not ? -- Ariel Flesler http://flesler.blogspot.com/
JSONML Array to DOM - jQuery.ml
Hi everybody. Recently, I have introduced jQuery ( + jQuery UI ) as default JS framework into company team I am working with. While I was creating some new component / plugin for our CMS, I though about introducing an enhanced JSONML Array parser to quickly create DOM content in a "fast and standard" way. I wonder if I am missing some information about jQuery DOM creation, so here I am to ask you if there is a better way to obtain the same result, or if this proposal could be interesting for everybody.
Unable to use selectors on the root element
I was using the jQuery() to create a DOM element using HTML, then tried to use a selector on the new DOM element and noticed that the selection did not recognize the root element... is that supposed to be that way? For example: $tempForm = $('<form><input type="submit" value="Go!"></form>'); $('form', $tempForm).submit(function(){ alert('I was here'); return false; }); Does nothing. But if you make it so the form is not the root element (eg '<div><form><input type="submit" value="Go!"></form></div>')
Python like lambda - $.lambda
Hello again, everybody. I wonder if a "python like" lambda function could be interesting for anybody. In some piece of my code, I am using them, already, and as you can see its implementation is really simple, because It does not require more than 3 lines (in core): $.extend({ lambda:function(lambda){ var text = lambda.split(":"); return new Function(text.shift(), "return " + text.join(":")); } }); So, it is really easy to maintain, and it could be useful to quickly delegate some task, such: ["a","b","c"].map($.lambda("v:v.toUpperCase()"))
Browser version ticket
Hi, I really want to close these 2 tickets: http://dev.jquery.com/ticket/2661 http://dev.jquery.com/ticket/2784 But for that, I need some collaboration to verify this change won't break existent code. I prepared 2 pages, one with the original jQuery, and the other with a modified version. Original: http://flesler.webs.com/UA/ Modified: http://flesler.webs.com/UA/modified.html All you need to do is access both with all the browsers you have (supported by jQuery) and make sure the notified version
Next Page