FBJS toggle selected item in list


/ Published in: JavaScript
Save to your folder(s)

Pass this for onclick. Add 'selected_image' id to css.


Copy this code and paste it in your HTML
  1. function showSelected(selected_card) {
  2. if (document.getElementById("selected_image")) {
  3. document.getElementById("selected_image").setId('');
  4. }
  5. selected_card.setId('selected_image');
  6. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.