694 posts
  • Has been part of the Envato Community for over 5 years
  • Has referred 10+ members
  • Has sold $5,000+ on Envato Market
  • Has been a beta tester for an Envato feature
+4 more
HaziqMir says

Hello everyone! I am in the midst of coding a nav menu which has the general struture like this:

<div class="navMenu">
   <ul class="leftMenu">
        <li>
             <a href="#"></a>
        </li>
        <li>
             <a href="#"></a>
        </li>
         ...
   </ul>
</div>

Now, I am trying to duplicate the anchor link and put the duplicate of each one in its respective <li /> parent. But I have not been able so far to do this. Can you guys help, please? Hope you understand my problem.

Thnx in advance
-Haziq

659 posts
  • Has been part of the Envato Community for over 6 years
  • Has referred 50+ members
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
+2 more
luckykind says

What’s the general structure SUPPOSE to look like?

use pre tags… they work better than code tags…

1182 posts
  • Has been part of the Envato Community for over 5 years
  • Has referred 1+ members
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
campolar says
What’s the general structure SUPPOSE to look like? use pre tags… they work better than code tags…
Here’s what i can figure out from his code tags (in pre tags):
<div class="navMenu">
    <ul class="leftMenu">
        <li> <a href="#"></a> </li>
        <li> <a href="#"></a> </li>
        <li> ... </li>
    </ul>
</div> 
1182 posts
  • Has been part of the Envato Community for over 5 years
  • Has referred 1+ members
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
campolar says
Now, I am trying to duplicate the anchor link and put the duplicate of each one in its respective <li /> parent. But I have not been able so far to do this. Can you guys help, please? Hope you understand my problem. Thnx in advance
-Haziq

And to answer you, i don’t understand you. You want to duplicate an anchor tag (which is already inside an li and then put it in its “respective” li… I’m getting mixed up :|

659 posts
  • Has been part of the Envato Community for over 6 years
  • Has referred 50+ members
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
+2 more
luckykind says

Sorry… What I meant was, what is the end result suppose to look like…

I too am confused at were the new anchor tags should be placed…

1799 posts
  • Has referred 1+ members
  • Has sold $5,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 10+ items on Envato Market
+4 more
BroOf says

I also don’t understand. You want to put a copy of your link into the li item like this:

<li>The link</li>

or like this:

<li title="The link"></li>
694 posts
  • Has been part of the Envato Community for over 5 years
  • Has referred 10+ members
  • Has sold $5,000+ on Envato Market
  • Has been a beta tester for an Envato feature
+4 more
HaziqMir says

I want to make a copy of each anchor tag and put it in its parent element i.e. li tags. I just want to add an extra hover class to the duplicate anchor tag. Got it?

1182 posts
  • Has been part of the Envato Community for over 5 years
  • Has referred 1+ members
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
campolar says

Ah i get it. You’re trying to have the same thing written twice (while HTML has it only once?)?

659 posts
  • Has been part of the Envato Community for over 6 years
  • Has referred 50+ members
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
+2 more
luckykind says
I want to make a copy of each anchor tag and put it in its parent element i.e. li tags. I just want to add an extra hover class to the duplicate anchor tag. Got it?

No… you said the same thing the first time and nobody understood what you’re talking about…

Is it hard to give an example of the end result of the HTML you’re trying to produce after the Jquery script executes?

1182 posts
  • Has been part of the Envato Community for over 5 years
  • Has referred 1+ members
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
campolar says
I want to make a copy of each anchor tag and put it in its parent element i.e. li tags. I just want to add an extra hover class to the duplicate anchor tag. Got it?

No… you said the same thing the first time and nobody understood what you’re talking about…

Is it hard to give an example of the end result of the HTML you’re trying to produce after the Jquery script executes?
Well according to my thinking, he means something like this:
<li><a href="#">parent</a></li>
<li class="sub"><a href="#">duplicate</a></li>

Helpful Information

  • Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
  • Open a support ticket if you would like specific help with your account, deposits or purchases.
  • Item Support by authors is optional and may vary. Please see the Support tab on each item page.

Most of all, enjoy your time here. Thank you for being a valued Envato community member.

Post Reply

Format your entry with some basic HTML. Read the Full Details, or here is a refresher:

<strong></strong> to make things bold
<em></em> to emphasize
<ul><li> or <ol><li> to make lists
<h3> or <h4> to make headings
<pre></pre> for code blocks
<code></code> for a few words of code
<a></a> for links
<img> to paste in an image (it'll need to be hosted somewhere else though)
<blockquote></blockquote> to quote somebody

:grin: :shocked: :cry: Complete List of Smiley Codes

by
by
by
by
by
by