I wonder if someone could help me out please. Basically I've created a custom section in the Umbraco back office. When this section is selected a htm page is loaded in.
This HTM page has a clickable link in there but when the link is clicked the scripting that I've chained the event isn't firing i.e. It's just behaving link a normal link.
<p>This is the salesforce loading page</p>
<a id="clickME" href="#">Click Me</a>
<script>
$('#clickME').click(function (e) {
e.preventDefault();
alert("Button Clicked");
}
</script>
Note that the scripts are inline in the view - you should consider to move them you a js-file and add that file to your package.manifest-file so that Umbracos backoffice loads the file.
Custom Tab not firing click event
Hi folks,
I wonder if someone could help me out please. Basically I've created a custom section in the Umbraco back office. When this section is selected a htm page is loaded in.
This HTM page has a clickable link in there but when the link is clicked the scripting that I've chained the event isn't firing i.e. It's just behaving link a normal link.
Could anybody assist please?
Thanks, C
Hi!
It looks like the eventhandler that you are creating should work.... not sure - have you looked at the console-out? Any errors?
I would recommend you to implement a AngularJS-controller and use that for your front end and skit jQuery.
I've blogged about this here: http://www.enkelmedia.se/blogg/2013/11/22/custom-sections-in-umbraco-7-%E2%80%93-part-2-the-views.aspx
Note that the scripts are inline in the view - you should consider to move them you a js-file and add that file to your package.manifest-file so that Umbracos backoffice loads the file.
Hi Markus,
Thanks for your input here and I shall certainly have a look into that link and report back.
Thanks, C
is working on a reply...