⊗jqPrIn 113 of 113 menu

Practice on working out the jQuery library

Wrap all p paragraphs that contain a b tag in a div tag.

Find all paragraphs p with class www, prepend them with text '!', then add headings h1-h6 to these paragraphs and color these paragraphs and headings red.

Find all p paragraphs and replace them with a div tag with the same content.

Find all checkboxes on the page and disable the even ones found.

Set all unblocked checkboxes to 'checked'.

Given an element #test. Assign the text '!' to its immediate neighbor above, and the text '?' to its immediate neighbor below. Solve the problem in one chain.

Given an element #test. Put the text of the element #test as its immediate neighbors above and below.

Given an element #test. Find the closest paragraph among its neighbors above and assign it the text of the element #test.

Find the second li on the page, add the www class to it, wrap it inside a i tag, and after it, insert li with the text 'hello'.

Find the tenth li on the page, find its parent, get the parent's immediate sibling above, wrap it in <div class="www"></div>.

For each paragraph p, except for paragraphs with class www, add its ordinal number to the end.

Find all the paragraphs p and put a copy of each paragraph before it. Color the copy red and the original paragraph green.

Find the p paragraphs that are directly below the h2 and move each paragraph so that it is directly above the h2.

Find all empty paragraphs p (without text) and insert the text of the immediate neighbor above into them.

For the parent of the b tag, if it is an element with class www or a paragraph p, set the color to red and text size to 30px.

For all empty paragraphs p, put the text of the closest tag h2 at the top.

Given inputs with numbers. Make the inputs become squares of these numbers.

Given an element #test. Put the text of its immediate neighbor above it at the beginning, and the text of its immediate neighbor below it at the end.

Given an element #test. Find its second neighbor above and its second neighbor below. Make the found elements exchange text (the neighbor above takes the text of the neighbor below and vice versa).

Given an element div, select all immediate children of it that are not headings and color them red.

Find all paragraphs p, color them red. Then select paragraphs with class www from the found paragraphs and assign them text '!'.

Find all paragraphs p with class www, color them red. Then choose the first paragraph from the found ones and assign it the text '!', then choose the last one and assign it the text '?'. Solve the problem in one chain.

Find all the paragraphs p, put at the end of each of them the same text that is inside it (that is, the text in the paragraph will be written twice).

Find all paragraphs p, put at the end of each of them its ordinal number in the set.

Given paragraphs with numbers. Put at the end of each of them the number that is stored in it, multiplied by its ordinal number in the set.

Click on a paragraph p to delete its immediate neighbors above and below.

By clicking on a paragraph p, delete all of its neighbors from above up to the first heading h1-h6 (that is, the elements above this heading and the heading itself do not need to be deleted).

Click on paragraph p to remove its nearest lower neighbor with class www.

Click on paragraph p to delete its fifth neighbor from the bottom.

When you click on a paragraph p, delete its fifth neighbor from the bottom, unless it is h2.

When you click on a paragraph p, delete its fifth neighbor from the bottom if that neighbor does not have a b tag inside it.

When you click on a paragraph p, delete its fifth neighbor from the bottom, unless that neighbor is immediately after h2.

Given an element #test, swap this element with its immediate neighbor below.

Given an element #test. After its immediate neighbor below, insert a copy of our element.

Given an element #test, swap this element with its nearest neighbor below with class www.

Find all paragraphs p that, within one parent, lie between one and another h2.

Wrap each paragraph p outside and inside in div.

Find all p paragraphs whose immediate parent is not div and wrap each of them in <div class="www"></div>.

Find all p paragraphs. Remove their parent (make it unwrap) unless that parent is div with class www. Then wrap those paragraphs that had their parent removed in div with class zzz.

Find all parents of the element #test and create an array of CSS classes of these parents.

Find all p paragraphs that have a class attribute, and wrap each of them in a div with the same classes as the found paragraph, and remove the classes of each paragraph along with the class attribute.

Find all paragraphs p from #test, add the text '!' to the end of them, then exclude paragraphs with the class www from the found ones and set the color to red for the remaining ones.

Find all li on the page, then before the second to last one found, insert another li with the text 'item'.

Find all li on the page, then pick the second, third, and fourth from the end of those found and assign them the text '!'.

Find ol with #test and rearrange all li in it in reverse order.

Given an element #test. Find all its neighbors above and all its neighbors below and swap them (that is, everything that comes before the element should come after it and vice versa).

Get all li with class www, make them red, then find among those found those li that have class bbb and delete them. Solve everything in one chain.

Get all li on the page. Make the even ones you get blank and delete the odd ones.

Find all div tags and double their height.

Find the sum of the heights of all div on the page.

For the element #test, find the closest parent with the class www, and add a paragraph with the text '!' to the end of this parent.

When you click on the element #test, find its closest parent with the class www, inside this parent, find all paragraphs and color them red.

Color the first 10 li on the page red.

Color 5-th to 10-th li-th on the page red.

Find the last 10 li on the page, color them red. Then from those found, find the even li and wrap them inside a b tag.

The page contains checkboxes. Count how many of them are checked.

Given 5 checkboxes, make it so that after the user checks two of them, all checkboxes are disabled.

Make all checked checkboxes change their state to unchecked and vice versa.

Given input. Move the contents of the value attribute to the placeholder attribute, and delete the value attribute itself.

Given link. If the href attribute starts with http://, add the target="_blank" attribute to the link.

You are given an input where you can enter a number. Make it so that when you enter a number into this input and lose focus on the page, the checkbox with that number is searched for and becomes checked, while the other checkboxes become unchecked.

Given a select and radio buttons, the number of radios is equal to the number of items in the select. Make it so that when an item in the select is selected, the corresponding radio button is automatically selected (corresponds by sequence number: the first item in the list - the first radio, and so on).

English
AfrikaansAzərbaycanБългарскиবাংলাБеларускаяČeštinaDanskDeutschΕλληνικάEspañolEestiSuomiFrançaisहिन्दीMagyarՀայերենIndonesiaItaliano日本語ქართულიҚазақ한국어КыргызчаLietuviųLatviešuМакедонскиMelayuမြန်မာNederlandsNorskPolskiPortuguêsRomânăРусскийසිංහලSlovenčinaSlovenščinaShqipСрпскиSrpskiSvenskaKiswahiliТоҷикӣไทยTürkmenTürkçeЎзбекOʻzbekTiếng Việt
We use cookies for website operation, analytics, and personalization. Data processing is carried out in accordance with the Privacy Policy.
accept all customize decline