Answers for "make condition if # value is available in url jquery"

0

check if url contains string

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script type="text/javascript">
  $(document).ready(function() {
    if (window.location.href.indexOf("franky") > -1) {
      alert("your url contains the name franky");
    }
  });
</script>
Posted by: Guest on June-01-2020

Code answers related to "make condition if # value is available in url jquery"

Code answers related to "Javascript"

Browse Popular Code Answers by Language