• Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.


    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

JavaScript CSS to JAVASCRIPT

dibrony

New Coder
Hi,

Anyone can help in writing the below code in JavaScript ?
I have it in CSS and it is working perfectly, the idea behind is to add the necessary items dynamically according to specific conditions:

HTML:
  <ul class="w3-ul w3-card-4" id="liste">
    <li class="w3-bar">
      <img src="my_image.png" class="w3-bar-item w3-circle w3-small" style="width:85px">
      <span onclick="go_to('my_value')">
        <div class="w3-bar-item">
          <span class="w3-large">Value_1</span><br>
          <span>Value_2</span>
        </div>
      </span>
    </li>
  </ul>

Thank you
 
Last edited by a moderator:

Top