JQuery
code is written as below and it is not working on web server. What may be the problem?
Code
$(document).ready(function(){
function loadData(page){
document.getElementById('catebox').style.display = 'none';
$.ajax
({
type: "POST",
url: "webcate.php",
data: "page="+page,
success: function(msg)
{
$("#container").ajaxComplete(function(event, request, settings)
{
$("#container").html(msg);
});
}
});
}
loadData(1);
});
Included File
Following file is included.
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
Problem
The code runs on local
but does not work on server. Normal javascript
works fine. But jquery
does not work on web server.
Any solution would be appreciated.
You use Protocols
http://...
in your page to replace it with a url ofhttps://...
.
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>