I have this jquery function that is supposed to fire off when i call it. Now it DOES fire off when I call it; however, and unfortunately, it also fires off at OnLoad. How can I stop this from happening?
here is how I call the method:
<telerik:RadListBox ID="RadListType" CssClass="RadListBoxWZMenu" runat="server" OnClientDropped="LocationItem('Type')">
here is the method:
$(function LocationItem(zonetype) {
var NewDialog = $('<div class="droppable"></div>');
NewDialog.dialog({
modal: false,
title: $('<label>' + zonetype + '</label>'),
show: 'clip',
hide: 'clip',
buttons: [
{ text: "Edit", click: function () { EditFields() } },
]
});
return false;
});
I think wrapping it in the $() function means it is called when JQuery loads
Try removing the $() entirely