P. 1
jquery-docs-with-plugins

jquery-docs-with-plugins

|Views: 267|Likes:
Published by api-3854120

More info:

Published by: api-3854120 on Dec 04, 2009
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

03/18/2014

pdf

text

original

before( content) returns jQuery

Insert content before each of the matched elements.

Example:

Inserts some HTML before all paragraphs.

$("p").before("Hello");

HTML:

I would like to say:

Result:

Hello

I would like to say:

Example:

Inserts an Element before all paragraphs.

$("p").before( $("#foo")[0] );

HTML:

I would like to say:

Hello

Result:

Hello

I would like to say:

Example:

Inserts a jQuery object (similar to an Array of DOM Elements) before all paragraphs.

$("p").before( $("b") );

HTML:

I would like to say:

Hello

Result:

Hello

I would like to say:

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->