I have a click function in jQuery and it never seems to execute. I need another pair of eyes:
The ASP button:
<asp:Button ID="btnSubmit" runat="server" Text="Transfer" CssClass="btnSubmit" Enabled="false" />
The Javascript/jQuery
$(".btnSubmit").click(function () {
var count = ticks.length;
var x;
for (var i = 0; i < count; i++) {
if (ticks[i].Symbol == pair) {
x = $(".txtAmount").val() * ticks[i].Ask;
if (x != null || x != 0) {
$(".txtResult").val() = "=" + x;
}
}
}
});
Seems as if there is an issue with Umbraco if someone could clarify why this might be I would be greatful.
For now my solution involved doing the following:
Replacing
<asp:Button ID="MyButton" Text="Transfer"></asp:Button>with<input type="submit" value="Transfer" onclick="calculate()" />Using simple javascript event over the the jquery event. I can get the jquery to work outside of umbraco.
I replaced asp:Button because I do not need a postback on click, and the input field can do the same job for me.