The following code is my attempt to pop up a message to any user visiting the page (Which is only for IE users).
<script src="jquery.reject.js"></script>
<script>
$(document).ready(function() {
$.reject({
reject: { all: true },
header: 'Internet Explorer is NOT Supported!',
paragraph1: 'You will not be able to blah blah blah.',
paragraph2: 'Please choose one of the browsers below for this to function.',
closeMessage: 'Note: You can still blah blah blah.'
});
return false;
});
</script>
What is wrong with the code? There are no syntax errors, but nothing happens when the page is loaded.
Thank you.
EDIT: Line 4, fixed to what it currently is. Still fails though.
2 Answers 2
I think you have a typo on line 4, you have "$jquery.reject" instead of "$.reject" or "jquery.reject"
EDIT: if someone ever gets here again, there were a couple things wrong with the origin post, first a typo, then a missing reference to jquery and then another missing reference to the CSS for the plugin.
7 Comments
jquery.reject.js is a jQuery plugin. You need to load jQuery first, for example:
<script src='http://code.jquery.com/jquery-1.7.1.min.js'></script>
return false, but apart from that it looks okay (assuming that the plug-in itself advises that particular layout/functions and so forth.