21302 Posts in 5736 Topics by 2603 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 2204 Views |
-
[Solved] Straight up, can't get Jquery working

23 February 2010 at 12:43pm Last edited: 23 February 2010 2:14pm
Hey Guys,
I'm trying to do things the most authodox way possible. So naturally I'm attempting to call the jquery data from the silverstripe library by following the Jquery documentation:
http://doc.silverstripe.org/doku.php?id=jqueryHowever... it's not really doing anything? Does anyone know any simple jquery scripts that I can use to check that it's working? Otherwise, any common issues with getting jquery to work in silverstripe that you know of?
Jackson
-
Re: [Solved] Straight up, can't get Jquery working

23 February 2010 at 2:14pm
Test script:
;(function($) {
$(document).ready(function() {
if (jQuery) {
alert('jQuery is loaded!');
}})
})(jQuery); -
Re: [Solved] Straight up, can't get Jquery working

23 February 2010 at 7:36pm Last edited: 23 February 2010 7:50pm
You can skip the if statement. This should work:
;(function($) {
$(document).ready(function() {
alert('jQuery is loaded!');
})
})(jQuery);If not, there might be a problem with the inclusion of jquery? Mabye multiple versions are being included?
Check your source-code.Edit: Sorry, didn't realize you put a Solved in the title. I thought the script didn't work for you.
| 2204 Views | ||
|
Page:
1
|
Go to Top |


