I'm very new to jquery and javascript in general. I'm trying to add functionality to a page I'm working on. I've got standard jquery UI elements, a "nyroModal" box and a customer date/time picker. I can usually get one item to work, but not all three.
I did some research and have been trying to wrap my head around how to include them proper with noconflict so they'll all live happily. I may be "over" including some things.
any advice?
I did some research and have been trying to wrap my head around how to include them proper with noconflict so they'll all live happily. I may be "over" including some things.
any advice?
Code:
<link type="text/css" href="css/redmond/jquery-ui-1.8.16.custom.css" rel="Stylesheet" />
<link rel="stylesheet" href="css/nyroModal.css" type="text/css" media="screen" />
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript" src="javascript/jquery.nyroModal.custom.js"></script>
<script type="text/javascript">
var $j = $.noConflict(true);
$j(function() {
$j('.nyroModal').nyroModal({
callbacks: {
afterClose: function() {
parent.window.location.reload();
}
}
});
});
</script>
<script type="text/javascript" src="javascript/jquery-ui-1.8.16.custom.min.js"></script>
<script type="text/javascript" src="javascript/jquery-ui-timepicker-addon.js"></script>
<script type="text/javascript">
var $tpick = $.noConflict(true);
</script>
<script>
<!-- For the Target Run Time Box -->
$tpick(function() {
$tpick('#example1').datetimepicker({
dateFormat: 'yy-mm-dd',
timeFormat: 'hh:mm:ss'
});
});
</script>
<script>
<!-- For the run duration slider -->
$tpick(function() {
$tpick('#length-slider').slider({
range: "min",
value:1,
min:1,
max:120,
slide: function(event, ui) {
$tpick("#duration").val(ui.value);
}
});
$tpick("#duration").val($tpick("#length-slider").slider("value"));
});
</script>