Jquery not working on Firefox and IE
I have a HTML page with jquery. But it does not output in Firefox and IE. It shows result in chrome. I am not find that where is mistake..
<script type="text/javascript" src="D:\Sanjeev_data\My other Folder and Files\HTML Work\Jquery\Effects-03-04-18\script\jquery-1.11.3.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("#before").click(function(){
$("p").before(function(n){
return "<div> This p elemenet has index "+n+"</div>";
});
});
});
body>
<div>
<p>This is first paragraph</p>
<p>This is second paragraph</p>
<button id="before">Click here to insert Text</button>
</div>
</body>
I add my code above. Kindly guide me, where i make mistake.