I have the follow code:
$(document).ready(function() {
$(function detinator() {
$("select#arhpcnDetinator").jCombo("services/detinatori.php", {
initial_text: "Detinator",
selected_value: $("input#arhpcndetinatorID").val()
});
});
});
and everything is working perfect.
When I try to call same function on other event, it's stop working.
$(document).ready(function() {
$(function detinator() {
$("select#arhpcnDetinator").jCombo("services/det.php", {
initial_text: "Detinator",
selected_value: $("input#arhpcndetinatorID").val()
});
$("#imag").click(detinator);
});
});
HTML is:
<img src="Sync.png" id="imag" onclick="ziceva">
Please help me! Thank you in advance.