Relative animation with multiplication
I was trying to use the core animation to reduce a set of elements in size and I think it would be nice to have a token that does multiplication. For example: $(selector).animate({ width : '*=0.8', height : '*=0.8', fontSize : '*=0.8' }, 1000, function() { // callback }); The above code would reduce the object's height, width and font size by 80%. I'm a novice programmer (I still have to learn how to unit test) so I didn't want to fork github, but I put together this code for possible
$('#Test').val(null); IE vs. the rest
Hi guys I have the following case: <input type="text" id="Test" /> <script> $('#Test').val(null); </script> See working example here: http://jquery.nodnod.net/cases/421 In IE (i have tested in IE7), it puts the words null into the textbox in all other browsers it puts nothing into the textbox. Why is this??? Cheers Anthony
Possible jQuery 1.4.2 JSONP bug with executing complete handler twice
While debugging a plug-in tool that I have developed, ajaxMonitor. I found that $.ajax with JSONP was executing the complete handler two times more than once Here is the unit test written in QUnit to verify my results: test("jQuery.ajax() - JSONP, Local [validate completion count]", function() { expect(3); var otherHandlerCount = 0; var completeCount = 0; function validateCompleteCount(){ if ( otherHandlerCount == 1 ) { if(completeCount !== 1) {
Events attached through jQuery(bind) are not triggered from same domain child Iframe?
Hi All, I need to confirm if can we trigger click event of parent window element from an Iframe element using "Trigger" method? I am facing an issue that I am not able to fire click event attached by bind method of jQuery from a child Iframe. While its a strange behavior that when I use javascript "onclick" method to bind click event then that gets triggered from Iframe. Does it mean that jQuery "bind" method restricts the scope of events to only current window? Following is the code which
patch feedback requested: html5 data-* attrs transcend into the $.fn.data() API
In the HTML5 spec, data-* attributes have been added to associate data to elements: http://dev.w3.org/html5/spec/elements.html#embedding-custom-non-visible-data In jQuery, the data() method allows developers to associate data to elements and retrieve it. And now... "with your powers combined..." <div data-patchlocation="github" data-awesome="true" data-testcount="28" /> $( div ).data( 'patchlocation' ) // "github" $( div ).data( 'awesome' ) // true $( div ).data( 'testcount' ) // 28 Proper JSON
Difference between .children() and .find() matched items when using a child selector
I noticed a difference in the behavior of the children() method versus the find() method, if the selector is a 'child selector'. In the example of the child selector documentation (http://api.jquery.com/child-selector/) change the script to: <script> // Child selector gives trouble $("ul.topnav").children("ul.topnav > li").css("border", "3px double red"); // matches $("ul.topnav").find("ul.topnav > li").css("border", "3px double blue"); // doesn't match $("ul.topnav > li", "ul.topnav").css("border",
Missing feedback for the ticket #4638 (the problem reported more than a year ago)
Hello all, I'm working on open-source JavaServer Faces component library and has found a problem with dimensions & Webkit browsers. It has been reported as http://dev.jquery.com/ticket/4638 more than a year ago together with test case & proposed patch (not ideal, but solved the problem for us). The ticket has been updated and assigned quickly, but then left with no feedback. Now, with jQuery 1.4 we are going to remove our modified version of jQuery, but this problem should be resolved. So, can please
Add SVG support verification do jQuery.support
Hi, I found that there is no SVG support checking to jQuery.support. Initially I though it would be a true/false matter, to differentiate between IE and everyone else. This is not true though, as Firefox and Opera have their preferred method of displaying SVG, and WebKit has their own. Firefox likes to display SVG from an <object> tag, Webkit likes better href'ing it in the <img> tag. IE does not support it at all, but can be coerced to it with the svgweb toolkit. This uses yet another, different
slideDown doesn't work fine in IE7. please help
it works fine int all other browser ( including IE6, 8) but not work in IE7. The menu item slided down but it didn't push the next element down Please help thanks <script type="text/javascript"> jQuery(document).ready( function () { jQuery('#menudoc a.menuItem').click( function () { var sub = jQuery(this).next('div'); if (sub != null) { if (sub.is(':hidden')) { sub.slideDown('200'); } else { sub.slideUp('200'); } } } //function ); //click } //function ); </script> <style type="text/css"> #menudoc
How to recover a lost password in jquery bug tracker ?
I cannot log into the bug tracker anymore. I found the url (which is http://dev.jquery.com/reset_password, I could not find any link to this page anywhere, that would be useful !) to recover my password, but it keeps saying "The email and username do not match a known account.", although I am sure I have entered the valid email address at least once (I tried all my email addresses). Anyone could help ?
Attributes filters not always working when using a context
Hello all, I realized attributes filters do not work when a context is passed in some cases : $(span[style*='font-size: x-small'] > strong, context); Simpler selectors work (span[attribute] e.g.), so i came to the conclusion that it is the combination of a complex attribute filter and a context which is (sometimes) buggy. I also verified it is not because of changes in the DOM (the node exists and has the attribute). I am not sure why precisely it does not work in my case, but if it can help, here
Proposal: binding custon xhr.onreadystatechange handler in jQuery 1.4
We're currently looking at upgrading our application from jQuery 1.3 to 1.4 and are running in to an issue with the change in jQuery.ajax to use onreadystatechange directly instead of setInterval. In our code, in ajax beforeSend, we are binding our own onreadystatechange handler to inspect the xhr in readyState=4 to handle the response in advance of success/failure and complete being called: jQuery.ajax($.extend({ beforeSend: function(xhr) { xhr.onreadystatechange =
JQuery Dimensions should have a method to return the scrollbar size
I recently posted this on StackOverflow and thought I could share it. I originally found it on Alexandre Gomes site, but modified it and implemented it for JQuery. It works in Chrome and FF and should work in IE as well, but I cannot test it in all browsers. jQuery.getScrollBarSize = function() { var inner = $('<p></p>').css({ 'width':'100%', 'height':'100%' }); var outer = $('<div></div>').css({ 'position':'absolute', 'width':'100px', 'height':'100px',
Proposal for adding Data Linking to jQuery
Hi Everyone, I am a developer from the Microsoft ASP.NET team. We've put together a proposal for supporting "data linking" in jQuery, and would like your feedback. I describe data linking at a high level in this post, but this feature is described more fully in a wiki entry posted here: http://github.com/nje/jquery-datalink/wikis/jquery-data-linking-proposal We created a prototype of data linking and published it on github here: http://github.com/nje/jquery-datalink The repository includes demo-contacts.html
Cannot Pass All jQuery 1.4.2 Ajax Unit Tests With my Plug-in
I've created a plug-in that duck-punches the jQuery Ajax function. One problem that I cannot locate when running the Ajax unit tests for 1.4.2 It will not pass the two tests Ajax events with context jQuery.ajax context modification Test one has a test: function callback(msg){ return function(){ equals( this, context, "context is preserved on callback " + msg ); }; } The this reference instead of being the <div/> tag becomes an XPC Cross Origin Wrapper. My Source
parseJSON with a string containing only a space
I'm using the jquery-ujs library with a Rails 3 project. Forms with a data-remote attribute get converted into an ajax request using ajax(). In jQuery's internals, the response from the server is passed to parseJSON() which, if the body is a whitespace only string, will raise a parser error. Rendering a response with `head(:ok)` will return a body containing only a single space and thus cause an error. I don't have any trouble making the fix with tests and submitting a pull request, but I'd like
jQuery.ajax triggers success callback on readyState=4,status=0
jQuery.ajax({ url: 'http://somewebsitethatdoesnotexist.com', success: function(){ console.log('yay') }, error: function(){ console.log('boo') } }) will print out 'yay' to the console. This is due to a workaround for opera in http://github.com/jquery/jquery/commit/c3c94823f27ee1e935586d46fd86f055f3a3d97d I'm not sure of the right way to fix it, but the most obvious hack is to: @@ -5158,7 +5158,7 @@ jQuery.extend({ return !xhr.status && location.protocol === "file:" ||
Git 1.4.2-tag build and 1.4.2-downloaded jquery.js file
Hi! I'd like to integrate the jquery qunit test suite into my project, because I made some modifications to the ajax api. I made a build from the 1.4.2 tag and noticed, that the downloaded version of jquery 1.4.2 is not the same as my own build. So now my question why the versions differ and what unit tests I should use for jquery 1.4.2. Chris.
$.delegate - support for multiple bindings
According to the API documentation, $.delegate supports an eventType string containing different events, but there is only one handler parameter. I propose that you add an option to send multiple handlers in one call - something like this: $(".myComponent") .delegate( ".myButton", { click: function(e){ }, hover: function(e) { } } )
basic selector compatablity between jquery 1.4.2 and 1.2.1
I am upgrading the jQuery version of my site from jquery 1.2.1 to 1.4.2. When using a basic id selector with an "empty" name throws a JavaScript error is thrown when using jQuery 1.4.2 but not when using jQuery 1.2.1 (see example and error below). example: $('#').addClass('current'); error: Error: uncaught exception: Syntax error, unrecognized expression: # I realize this is a JavaScript bug that should be re mediated but removing the "bad" line of js code but this has been generated onto hundreds
:not and multiple selectors bug?
Hi, I am trying to write a jQuery selector to give me all anchors tags and submit inputs within a div that are not children of a sub div of a certain class, to apply the button() ui to them... See below: $("#mainDiv a:not(.exclude a), #mainDiv input:submit:not(.exclude input)).button() For some reason this keeps giving me all anchors. If I split the jQuery selector into two separate queries at the comma, the two individual queries work fine. Am I doing something wrong, or is this a bug? Thanks
jQuery Ajax unit tests
I believe there may be some problems with the JSONP remote unit tests. Example: test("jQuery.ajax() - JSONP, Remote", function() { expect(4); var count = 0; function plus(){ if ( ++count == 4 ) start(); } var base = window.location.href.replace(/\?.*$/, "") + '/'; stop(); jQuery.ajax({ url: base + "data/jsonp.php", // the rest of the test The url generated for the jsonp will be ../unit/index.htmldata/test.js I believe it should be: ../unit/index.html/data/test.js It is missing a backslash. This
$("input:checkbox:checked").length not working in IE? Works fine in Firefox.
Hello, I have spent an hour or more on the issue of $("input:checkbox:checked").length on ie8 and cannot think of any idea to overcome this problem. It always gives 0 value on IE8 while Firefox works fine. Is this a bug? I am using jquery-1.4.2.min.js. Please help.
Explain why jquery.className disappears?
I've been loooking at the core because I'm making a couple of extensions that behave like addClass and removeClass. There, I've come across jquery.className, which is defined and used in the core - but it is not a property of jQuery when I ask for it after page load. I can't find where it gets removed! Please could someone explain where, when and why is it removed? Obviously I can call addClass and removeClass from within my extensions (I'd prefer not to have the overhead of the extra .each() calls,
IE: $('<form>') don't works properly
Hi again! I have a new bug for jQuery :p ok, not is good :/ Well, is simple: if you make a <form> in IE, and don't close /> or </form>, this don't will be recognized :S Really, strange. In Chrome, Opera and Firefox works fine. Test: - Work in all: http://jsbin.com/akuye3/8 - Don't work in IE: http://jsbin.com/akuye3/9 What occur: - When you open the test page, will show an alert; - When you click in "CLICK HERE", will post page and show an alert again; In IE, the second case don't occur. See the
Script is not Clean!!!
jQuery 1.4.2 does not validate on JSlint and I don't have the time to sort these out myself. I pride myself on using 100% clean code and I can't finish JSE 8 until this is sorted out. Incidently for all of you who are wandering what's in the next version here's a summary: > More compact - less relient on global objects/values & other JavaScript files. > Regular Expression support in search terms. > Less table layout reliance. > Ajax Data / Settings support. > More future proof (HTML will no longer
problem toggling between two dynamically displayed tag fields on page !!
Hi Guys, feeling gr8 to get introduced to this forum. I had a problem toggling with two fields. I am using "toggle" function in jquery. In this i am able to hide one field , but at the same time i need to display another field. when clicked on that field, again it should hide and another field should be displayed. we can do it if we have static field id . But here i am dynamically creating tags and displaying on page using document.createElement("a"); LIKE THIS. Here in this
Single or double escaping difference.
Hi all, After reading a post in the "Using jQuery" sub forum I started testing a bit, and came to the conclusion that the selecting of nodes using the attribute selector is a bit inconsistent. I made a test showing the inconsistencies here Short version: it turns out that when using find() double escaping finds no nodes, in contrast to using single escaping. This of course also has effect when selecting nodes within a context which uses find(). The documentation clearly states that when selecting
Firefox and (no-attached-Form).submit()
Hi! I found a bug I do not know if it's a mismatch of Firefox or jQuery. Well, is as follows: When you create a <form> via jQuery and uses the method .submit(), nothing happens. To do work, you must attach to the document before. In other browsers everything occurs as expected. One way to work, would by to use the method. Submit () in Firefox and attach (temporarily) the form and run the document, if not attached. var form = $('<form action="" method="post">'); var hidden = $('<input type="hidden"
how to make step or size change?
Is it possible to use the jquery Slider (range slider / dual slider) to have non-linear (non consistent "step" size) values?I need code example..urgent...
jQuery 1.4.2 - Potential IE8 bug setting action attribute on form
I'm trying to set the action on the submit event handler in IE8, and get the error "Object doesn't support this property or method" This doesn't happen in Firefox or Safari. The Form: <form name="product" id="product" action="http://example.com"> <!-- snip form --> </form> The jQuery code with the error in IE8: $('#product').change(function () { changes = true; }).submit(function() { this.action = 'http://example2.com'; }); Also tried this with the same error: $('#product').change(function
":visible" - selector is true for opacity=0
$("#abc").fadeTo(0,0); alert($("#abc").is(':visible')); //return true; but it is not visible!
set attributes on in memory html snippet dont work
Firebug, FF 3.6.6, ubuntu/windows Is it not possible to alter attributes of virtual / in memory html snippets BEFORE they are inserted into the DOM??? try this in firebug console: var html = '<tr> <td> <input class=" text" id="invoice_line_items_attributes_14_name" maxlength="50" name="invoice[line_items_attributes][14][name]" size="25" type="text" value=""></td> </tr>'; console.log( $("input[id$='_name']", html ) ); //none of those works $("input[id$='_name']", html ).val('not beeing set'); $("input[id$='_name']",
is this a bug or am I just rubbish at using jQuery?
I'm trying to use jQuery to change the color scheme of a site and it all seemed to work lovely in FF but failed in IE with the error message "Error: Invalid Argument, Line 4619 character 4 blah blah blah". I think the line in my code, which called jQuery & led to the failure was this: var currentFontSize=$.cookie('fontresizer'); $('html').css('font-size', currentFontSize + 'px'); I found a fix somewhere on the interweb from 2008! (http://www.n8williams.com/devblog/javascript_and_ajax/jquery-dialog-error-in-ie7-runtime-error-invalid-argument)
What happened to jQuery.jquery/version exposure?
I remember being able to check for a particular jQuery version by doing the following: function someFunction(){ if( typeof( jQuery ) == 'undefined' || parseFloat( jQuery.jquery ) < 1.2 ) return; // code that uses jQuery 1.2 or higher } That functionality doesn't appear to work anymore because the jQuery version is not (at least based on my exploration of the object) exposed anymore. I'm not sure if that changed in 1.3 or 1.4, but for many of us developing jQuery add-ons, it's nice to be
data.querySelectorAll('multistatus') works, $('multistatus', data) fails?
The following uses jQuery.ajax() to make a request to a Subversion repository. The response is content type "text/xml" I can traverse the response with, data.querySelectorAll('multistatus'), etc. - but $('multistatus', data) returns zero elements Any idea why $('multistatus', data) fails, while data.querySelectorAll('multistatus') succeeds? May I open a ticket? jQuery(function ($) { jQuery.ajax({ type: 'PROPFIND', url: '/svn', beforeSend: function (xhr) {
what about a $.typeOf(). maybe instead of isArray(), isFunction()..etc?
i was thinking, instead of having a bunch of isFoo() functions, except maybe isPlainObject(), it would be useful to integrate and expose something like this for detecting object types: http://snipplr.com/view/12492/getclass/ syntactically it would get a bit more verbose for reuse, eg jQuery.typeOf([]) == "Array", but it can be abstracted away by isArray() as is currently if it needs to be used in many places. however, $.typeOf() might provide a good foundation and replacement for isFunction isArray,
Is Jquery Script is Inline Script?
Hi All, $(document).ready(function(){ //do some thing }); I want to clarify above the jquery scripts is inline script or function.
Datepicker and Description onchange
I have dates and description. If the date is entered, then the description should autocomplete. Like if 12/25/yyyy is selected, then Christmas should automatically be shown? I tried this, but its not working. Any help? <html> <head> <script type="text/javascript"> $(function() { $('#date').datepicker(); }); $(function() { var availableTags = ["Christmas Day","etc"]; $("#tags").autocomplete({ source: availableTags }); }); $('#date').change( function() { if ($(this).val().substring(0, 5) === '12/25')
dimensions and jquery
What portions of the dimensions plug-in is now part of the jquery core. as far as i know i can use .width(), .height(), and .offset() without include the dimensions plug-in, it there anything else included in the core jquery as of 1.2.3 that was previous only in dimensions? -- View this message in context: http://www.nabble.com/dimensions-and-jquery-tp15332839s27240p15332839.html Sent from the jQuery Dev List mailing list archive at Nabble.com.
Next Page