Reputation: 73
I want to add jReject - jQuery Browser Rejection into my Joomla website. I just try out with adding JS files to my template folder and it doesnt work for me.
jReject - jQuery Browser Rejection
How can I add browser compatibility warning to my web site. Any suggestions
I have added jquery.reject.js
and jquery.reject.css
into my template(gantry)
I have put <head></head>
tags in my index.php and inside the those tags, added the following:
<link rel="stylesheet" type="text/css" href="jquery.reject.css" />
<script type="text/javascript" src="templates/gantry/js/jquery.reject.min.js"></script>
<script language="javascript" type="text/javascript">
$(document).ready(function{
$.reject({
reject: {
safari: true, // Apple Safari
chrome: true, // Google Chrome
firefox: true, // Mozilla Firefox
msie: true, // Microsoft Internet Explorer
opera: true, // Opera
konqueror: true, // Konqueror (Linux)
unknown: true // Everything else
}
}); // Customized Browsers
return false;
});
</script>
Upvotes: 2
Views: 1578
Reputation: 8543
remember that Joomla is shipped with Mootools.
As you might know, both Mootools and jQuery share dollar sign $
as shorthand for their functions, so remember to call jQuery.noConflict()
or you're going to have some errors.
Since you want to display the popup only on some pages, you should create a module (maybe in an hidden position) and assign it to homepage only.
Please be aware that some text editor will strip away your javascript, so the best thing to do is to write plain text without any editors.
Hope this helps.
Upvotes: 1