I converted a project from v8 to v9 and the jquery features that I had written into the events have stopped working. Do they need to be written differently in v9?
Most likely yes, because ScriptCase8 uses jQuery v1.8.2 and ScriptCase9 uses jQuery v3.1.1.
I was putting the script tag in the OnAppInit Event:
echo ‘<script src="/jquery.jeditable.js" type=“text/javascript” charset=“utf-8”></script>
<script type=“text/javascript” src="…/segment.js"></script>
<link rel=“stylesheet” type=“text/css” href="…/segment.css" />
<style>
.bidButton{
background-color:rgba(245,245,245,1.00);
border:solid 1px rgba(0,0,0,1.00);
outline:0;
padding:5px;
border-radius:3px;
cursor:pointer;
}
.active{
background-color:rgba(5,8,154,1.00);
color:rgba(255,255,255,1.00);
}
</style>
<style>
.bidTierButton{
background-color:rgba(245,245,245,1.00);
border:solid 1px rgba(0,0,0,1.00);
outline:0;
padding:5px;
border-radius:3px;
cursor:pointer;
}
.active{
background-color:rgba(5,8,154,1.00);
color:rgba(255,255,255,1.00);
}
</style>
<script type=“text/javascript” charset=“utf-8”>
$(".jqEdit").live(“click”,function(event) {
event.preventDefault();
$(this).editable("/jeditable/saveFeePick.php", {
id : ‘id’,
tooltip : “Click to edit…”,
submitdata: { _method: “POST” },
cssclass : “editable”
});
});
</script>
<script type=“text/javascript”>
jQuery(function($){
$(document).on(“click”,".bidButton",function(){
var pin = $(this).data(“pin”)
var table = $(this).data(“table”)
var bid = $(this).data(“bid”)
var data = table+"-"+pin+"-Bid"+bid
$("[data-pin="+pin+"]").removeClass(“active”)
$(this).addClass(“active”)
$.post("/jeditable/saveFeePick.php",
{
id:data,
value: “test”
},
“”)
});
$(document).on(“click”,".bidTierButton",function(){
var pin = $(this).data(“pin”)
var table = $(this).data(“table”)
var tier = $(this).data(“bidtier”)
var data = table+"-"+pin+"-Tier"+tier
$("[data-pin="+pin+"]").removeClass(“active”)
$(this).addClass(“active”)
$.post("/jeditable/saveFeePick.php",
{
id:data,
value: “test”
},
“”)
});
});// jQuery function
</script>’;