$.post and data with $( selector ) does not work since jQuery 1.4

$.post and data with $( selector ) does not work since jQuery 1.4

Hi,

since jQuery 1.4 I've a problem using $( selector ) in data for $.post
My code:


  1. settings = $.extend( {
    attachTo: $( '.top h1' )
    }, settings );
    $.post( url, settings, function( str )
    {
    if ( str.length > 0 )
    {
    settings.attachTo.after( '<div class="message" style="display:none">' + str + '</div>' ).next().slideDown( 'fast' ).wait( 2000 ).slideUp( 'fast', function() {
    $( this ).parents( '.approval_offer' ).remove();
    $( this ).remove();
    } );
    };
    } );

This code works fine with jQuery 1.3.2 on FF 3.5.6 on MacOSX 10.6.2

With jQuery 1.4 or 1.4.1 same machine I get a 
[Exception... "Component returned failure code: 0x80004001 (NS_ERROR_NOT_IMPLEMENTED) [nsIRequest.name]" nsresult: "0x80004001 (NS_ERROR_NOT_IMPLEMENTED)" location: "JS frame :: file:///Applications/Firefox.app/Contents/MacOS/components/nsLoginManager.js :: anonymous :: line 328" data: no]

When I change settings in
  1. settings = $.extend( {
    attachTo:  '.top h1'
    }, settings );

    ...
    $( settings.attachTo ).after( '<div class="message" style="....
it working also fine with jQuery 1.4.*.
I can't find changes in the changelog for jQuery 1.4 that could explain this behavior.

Any ideas?

Thanks for help
    • Topic Participants

    • info