En cours

DOM. finding last in ordered list and add span style to list element

The need is, to find the last list element within a navigation tree and color it in red. The navigation tree can have different numbers of list elements, means it grows or shrink dynamicly.

The website wich is displaying the navigation tree is using following JavaScript libary files:

/js/prototype/[url removed, login to view]">

/js/prototype/[url removed, login to view]">

/js/scriptaculous/[url removed, login to view]">

/js/scriptaculous/[url removed, login to view]">

/js/scriptaculous/[url removed, login to view]">

/js/scriptaculous/[url removed, login to view]">

/js/scriptaculous/[url removed, login to view]">

/js/jq/[url removed, login to view]">

/js/jq/[url removed, login to view]">

It is not possible to use additionaly libs like [url removed, login to view]

Also it is not possible to replace [url removed, login to view] by another version.

So you have to deal with the mentioned files.

Programming a custom Function would be the only way to make it work.

Following HTML shows the navigation tree:

<ol class="head_cat_list">

<a href="#" class="head_list"><span>E-Shop</span></a>

<li><span id="red"> <a href="#"> New Arrival </a></span> </li>

<li><span id="red"> <a href="#"> Bags </a></span> </li>

<li><span id="red"> <a href="#"> Shoes </a></span> </li>

<li><span id="red"> <a href="#"> Accessoires </a></span> </li>

<li><span id="red"> <a href="#"> Clothing </a></span> </li>

<li><span id="red"> <a href="#" class="current"> Sale </a></span>

<ul class="subcategory">

<li> <a href="#"> Bags </a> </li>

<li> <a href="#"> Shoes </a> </li>

<li> <a href="#"> Clothing </a> </li>

<li> <a href="#"> Sale </a> </li>

</ul>

</li>

</ol>

<span> Sale </span><br>

<ol class="head_cat_list">

<li><span id="salered"> <a href="#"> Accessoires 2 </a></span> </li>

<li><span id="salered"> <a href="#"> Clothing 2 </a></span> </li>

<li><span id="salered"> <a href="#"> Sale </a></span> </li>

</ol>

In this list the word "Sale" within ID "red" should be coloured in red. The second word Sale within class "subcategory"

and no other string containing "Sale" should be affected or rather being coloured in red.

Compétences : Javascript

Voir plus : tree red, tree javascript jquery, tree jquery, prototype validation, programming style, min tree, elements programming style, dom programming, span programming, x js, treeview, span, ol, last, jq, dragdrop, dom, custom shoes, coloured, clothing prototype, javascript controls, controls javascript, word find function, effects javascript, dom javascript

Concernant l'employeur :
( 18 commentaires ) Munich, Germany

N° du projet : #2345406

Décerné à :

AndreiMk

In fact, it is only one line of code. Award your project to me and I send it right away. And yes, I have tested it before bidding.

30 $ USD en 0 jours
(45 Commentaires)
6.4

3 freelance ont fait une offre moyenne de 30 $ pour ce travail

glonius

I can do this right now!

30 $ USD en 1 jour
(1 Commentaire)
1.0
adelnobel

It's already done, check your PMB for sample. In PURE javascript code or jQuery; for jQuery code its a one line only; for javascript it shouldn't take many as well; actually I already have a tested, working code

30 $ USD en 0 jours
(0 Commentaires)
0.0