Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

timecircles is not a function #137

Open
zinoadidi opened this issue Jan 30, 2018 · 3 comments
Open

timecircles is not a function #137

zinoadidi opened this issue Jan 30, 2018 · 3 comments

Comments

@zinoadidi
Copy link

USing timeCircles with Cordova on init an error occurs:

$(...).TimeCircles is not a function.

<script type="text/javascript" src="app/assets/js/jquery-3.2.1.min.js"></script>
<script type="text/javascript" src="app/assets/timecircles/timeCircles.js"></script>	
<script type="text/javascript" src="app/assets/js/vue.js"></script>

     $(".gameTimer").TimeCircles({
		start: true,
		animation_interval: "smooth",
		circle_bg_color: '#090c0f',
		direction: "Counter-clockwise",
		count_past_zero: false,
		time: {
			Days: { show: false },
			Hours: { show: false },
			Minutes: { show: false },
			Seconds: { show: true, color: '#' + generateColor() }
		}
	});
	/* $(".gameTimer").TimeCircles().addListener(function (unit, value, total) {
		if (total <= 0) submitAnswer('timer');
	}); */

works fine on the desktop browser but this error shows when on a mobile device; *Testing on chrome

@wimbarelds
Copy link
Owner

Can you confirm the files are being loaded?

@zinoadidi
Copy link
Author

yes, they are been uploaded. Attempted to include them twice just to confirm that they are getting there which I was able to establish. like I said, works fine on chrome but doesn't work on mobile devices and also in the app itself when packaged.

@wimbarelds
Copy link
Owner

Are you perhaps loading jQuery twice also? How are you checking that the TimeCircles script was loaded? Also can you check in dev console (using chrome://inspect) whether or not the code works from there?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants