I have the following code:
<script type="text/javascript">
$(function () {
$('#js-news').ticker({
speed: 0.10,
htmlFeed: false,
fadeInSpeed: 600,
titleText: 'DASHBOARD ALERTS',
direction: 'ltr',
displayType: 'reveal',
controls: false
});
});
</script>
I would like to alter it such that it only fires if #js-news is present. In older IE V10 browsers I am getting the error: "Element does not exist in DOM", and the relevant pages do not have the js-news element. Newer browser seem to cope, but not IE7,8,9.
Thoughts on code alteration appreciated.
Thanks.