X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=src%2Fjquery%2Fjquery.js;h=3edc3033354fa27c408a18c71bb12f13c9c364db;hb=eff56887b164b489bb792f87770b7ba69e8f54df;hp=98825c3378637b89839d8240c7fb7188e5a7451c;hpb=e2d3c4341908aa2a36023c91a8a684d10e93339a;p=jquery.git diff --git a/src/jquery/jquery.js b/src/jquery/jquery.js index 98825c3..3edc303 100644 --- a/src/jquery/jquery.js +++ b/src/jquery/jquery.js @@ -466,6 +466,17 @@ jQuery.fn = jQuery.prototype = { * @example $("p").css("color"); * @before

Test Paragraph.

* @result red + * @desc Retrieves the color style of the first paragraph + * + * @example $("p").css("fontWeight"); + * @before

Test Paragraph.

+ * @result bold + * @desc Retrieves the font-weight style of the first paragraph. + * Note that for all style properties with a dash (like 'font-weight'), you have to + * write it in camelCase. In other words: Every time you have a '-' in a + * property, remove it and replace the next character with an uppercase + * representation of itself. Eg. fontWeight, fontSize, fontFamily, borderWidth, + * borderStyle, borderBottomWidth etc. * * @test ok( $('#foo').css("display") == 'block', 'Check for css property "display"'); * @@ -502,6 +513,8 @@ jQuery.fn = jQuery.prototype = { * @example $("p").css("color","red"); * @before

Test Paragraph.

* @result

Test Paragraph.

+ * @desc Changes the color of all paragraphs to red + * * * @test ok( $('#foo').is(':visible'), 'Modifying CSS display: Assert element is visible'); * @test $('#foo').css('display', 'none'); @@ -562,11 +575,16 @@ jQuery.fn = jQuery.prototype = { * @example $("p").wrap("
"); * @before

Test Paragraph.

* @result

Test Paragraph.

+ * + * @test var defaultText = 'Try them out:' + * var result = $('#first').wrap('
').text(); + * ok( defaultText == result, 'Check for simple wrapping' ); + * ok( $('#first').parent().parent().is('.red'), 'Check if wrapper div has class "red"' ); * * @test var defaultText = 'Try them out:' - * @test var result = $('#first').wrap('
xxyy
').text() + * var result = $('#first').wrap('
xxyy
').text() * ok( 'xx' + defaultText + 'yy' == result, 'Check for wrapping' ); - * @test ok( $('#first').parent().parent().is('.red'), 'Check if wrapper div has class "red"' ); + * ok( $('#first').parent().parent().is('.red'), 'Check if wrapper div has class "red"' ); * * @name wrap * @type jQuery @@ -1964,7 +1982,8 @@ jQuery.extend({ * @example $.map( [0,1,2], function(i){ * return [ i, i + 1 ]; * }); - * @result [0, 1, 1, 2, 2, 3] * + * @result [0, 1, 1, 2, 2, 3] + * * @name $.map * @type Array * @param Array array The Array to translate.