I am building a Reacts based application, I have several jquery elements on the page, such as the JqueryUI date picker and bootstraps tooltip.
The problem is that these favorites do not work until I reload the page.
This way its, like jQuery scripts, not loaded for the first time.
I looked at the console and do not see any jQuery / javascript related errors.
Any help would be greatly appreciated. here is my index.html page
<!doctype html>
<html class="no-js" lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="description" content="">
<meta name="viewport" content="width=device-width">
<title>ICETEA</title>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<script src="https://code.jquery.com/jquery-2.1.3.min.js"></script>
<script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
<link href="//netdna.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="/css/main.css">
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.2/themes/blitzer/jquery-ui.css">
</head>
<body>
<div id="app"></div>
<script src="/js/main.js"></script>
<script>
$(document).ready(function(){
$('[data-toggle="tooltip"]').tooltip();
});
</script>
<script>
$(function() {
$( "#datepicker" ).datepicker();
$( "#datepicker" ).change(function() {
$( "#datepicker" ).datepicker( "option", "dateFormat", "DD d MM" );
});
});
</script>
</body>
</html>
source
share