Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Javascript not running when flash is around

Featured Replies

Right. I should've asked this here first rather than get an immature response from (apparently) the most popular web design forum. hmmm.

 

Anyhoo, what I have is a piece of javascript which rotates some addresses in a div on my pages. This works on all pages except for the main page which I am guessing is because of the flash rotator/lightbox which is only on that page.

 

Example can be seen at My link

 

Could anyone help me in solving this problem? Or pointing me in the right direction?

 

TIA

 

I can't see your specific issue right now, probably because there's an error on all pages:

 

"Uncaught TypeError: Property '$' of object [object DOMWindow] is not a function."

This happens here:

 

$.noConflict();
           $(function() {
               $(".newsticker-jcarousellite").jCarouselLite({
                   vertical: true,
                   hoverPause: true,
                   visible: 2,
                   auto: 1000,
                   speed: 1000
               });
           });

Do you really need the jQuery.noConflict()? If the dollar sign in the next line should refer to jQuery you must spell it out: jQuery(function(){...});

  • Author

Apologies. It was something I was trying which I forgot to take out once I realised it did not work. Now taken out.

Give this a try

 

<script type="text/javascript">
	var $j = jQuery.noConflict();
		$j(function() {
			$j(".newsticker-jcarousellite").jCarouselLite({
				vertical: true,
				hoverPause: true,
				visible: 2,
				auto: 1000,
				speed: 1000
			});
		});
	</script>

Mteams's answer should work. The problem is that script.aculo.us also defines a $ function.

  • Author

Thank you mteam! That worked perfectly. In total awe now! It always amazes me how people can actually work this stuff out. I just sit there with a blank expression on my face wondering what the hell I've got myself into. heh. Thanks again!

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.