these are my js files of my project:
tablequerywrapper.js
gauge.min.js
Functions.js
colortip-1.0-jquery.js
ObjectivesFunctions.js
jquery.bxslider.js
in: Functions.js
, I have:
$('li div[id^="objective_option_conversion_points_"]').click(function () {
alert('3');
}
$('#sortedPixels tbody').sortable({
items: '> tr',
forcePlaceholderSize: true,
placeholder: 'must-have-class',
start: function (event, ui) {
// Build a placeholder cell that spans all the cells in the row
var cellCount = 0;
$('td, th', ui.helper).each(function () {
// For each TD or TH try and get it's colspan attribute, and add that or 1 to the total
var colspan = 1;
var colspanAttr = $(this).attr('colspan');
if (colspanAttr > 1) {
colspan = colspanAttr;
}
cellCount += colspan;
});
// Add the placeholder UI - note that this is the item's content, so TD rather thanTR
ui.placeholder.html('<td colspan="' + cellCount + '"> </td>');
}
}).disableSelection();
I ran it and got:
Uncaught TypeError: Object #<Object> has no method 'sortable'
I read that this error is because I need JQUERY UI
, so I added:
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
and the error is gone. but when I pressed a div that has an id = "objective_option_conversion_points_1", nothing is happened.
so I tried:
$('li div[id^="objective_option_conversion_points_"]').on('click', function () {
alert('3');
}
but nothing is happened.
so I tried:
$('li div[id^="objective_option_conversion_points_"]').live('click', function () {
alert('3');
}
but then I got another error:
Uncaught TypeError: Object [object Object] has no method 'live'
how can I solve it please?
p.s.
in my jsfiddle, it works:
http://jsfiddle.net/alonshmiel/adpFV/7/
any help appreciated!