Commit 535c56f1 by Scott

jQuery shorthand

parent a52aa5ca
......@@ -157,9 +157,9 @@ function qa_favorite_click(elem)
function qa_ajax_post(operation, params, callback)
{
jQuery.extend(params, {qa:'ajax', qa_operation:operation, qa_root:qa_root, qa_request:qa_request});
$.extend(params, {qa:'ajax', qa_operation:operation, qa_root:qa_root, qa_request:qa_request});
jQuery.post(qa_root, params, function(response) {
$.post(qa_root, params, function(response) {
var header='QA_AJAX_RESPONSE';
var headerpos=response.indexOf(header);
......
......@@ -1517,7 +1517,7 @@
// set default state of options
$loadscript = array(
"for (var i = 0; i < {$optVar}.length; i++) {",
"\tjQuery('#'+{$optVar}[i]).click(function() { ".$function."(false); });",
"\t$('#'+{$optVar}[i]).click(function() { ".$function."(false); });",
"}",
"{$function}(true);",
);
......
......@@ -340,13 +340,13 @@
if (isset($qa_content['focusid']))
$qa_content['script_onloads'][] = array(
'jQuery(' . qa_js('#'.$qa_content['focusid']) . ').focus();',
'$(' . qa_js('#'.$qa_content['focusid']) . ').focus();',
);
// JS onloads must come after jQuery is loaded
$script[] = '<script>';
if (isset($qa_content['script_onloads'])) {
$script[] = 'jQuery(window).load(function() {';
$script[] = '$(window).load(function() {';
foreach ($qa_content['script_onloads'] as $scriptonload) {
foreach ((array)$scriptonload as $scriptline)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment