Jump to content

Albeld

Members
  • Content count

    6
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Albeld

  • Rank
    Newbie
  1. How to add Search function to this?

    nobody can help?
  2. How to add Search function to this?

    Yes, it is. I got more into it and managed it to filter my div's. Now I need to get it filtered from what is in the class and not from the text. Something like 'get elements from class'. Here my current code: $(document).ready(function(){ $("#myInput").on("keyup", function() { var value = $(this).val().toLowerCase(); $("#container div").filter(function() { $(this).toggle($(this).text().toLowerCase().indexOf(value) > -1) }); }); }); This is how it filters from the text (p, a, etc.)
  3. Hi everyone, I've found this Filter Elements and need a simple search function for this. Could anyone help me? I got a script already from another example but couldn't get it working. function myFunction() { var input, filter, ul, li, a, i; input = document.getElementById("myInput"); filter = input.value.toUpperCase(); ul = document.getElementById("myUL"); li = ul.getElementsByTagName("li"); for (i = 0; i < li.length; i++) { a = li[i].getElementsByTagName("a")[0]; if (a.innerHTML.toUpperCase().indexOf(filter) > -1) { li[i].style.display = ""; } else { li[i].style.display = "none"; } } } Thanks in advance!
  4. How to get smooth filtering to this?

    So, there is no simple way to have them like slide in from the right or fade in, right after they get the class "show"?
  5. Thank you, W3Schools!

    +1
  6. Hi everyone, I've found this Filter Elements Tutorial and couldn't manage it yet, to have transitions when changing the classes. Can anyone help me with this? Thanks in advance, this would really help me!
×