<script> jQuery(document).ready(function(){ jQuery(".tabmenu li").click(function(){ var current_tab = jQuery(this).attr("class"); var res = current_tab.replace(" active_tab",""); if(res == 'tabmenu-8') { } }); }); </script>
I have a script, which is written above. What I want is, I want to include a js file on satisfying the if condition. How can I do that? I tried different methods I found while searching in google, but nothing helped me.
This is the script I want to add there
<script type='text/javascript' src='//code.jquery.com/jquery-1.9.1.js'></script>