I am trying to register javascript in my opinion and I seem to have a problem. On my main page below:
@(
Html.Telerik().ScriptRegistrar()
.OnDocumentReady(@<text>
$('#feedback-link').click(function(e) {
e.preventDefault();
$('#FeedbackWindow').data('tWindow').center().open();
});
</text>)
)
In my opinion, I need specific javascript, so I:
@(Html.Telerik().ScriptRegistrar().OnDocumentReady(
@<text>
$('#contactlist').change(function() {
alert('Selected id' + $(this).val());
});
</text>)
)
Unfortunately, this causes my javascript view to be declared both in the MVC view and on my main page when rendering the last page. How can I get this to register only the script once?
source
share