Browse Source

Use .prop() instead .attr().

tags/2.0.0-beta
Qiang Xue 11 years ago
parent
commit
2db91187db
  1. 4
      framework/yii/assets/yii.js

4
framework/yii/assets/yii.js

@ -47,14 +47,14 @@ yii = (function ($) {
* @return string|undefined the CSRF variable name. Undefined is returned is CSRF validation is not enabled. * @return string|undefined the CSRF variable name. Undefined is returned is CSRF validation is not enabled.
*/ */
getCsrfVar: function() { getCsrfVar: function() {
return $('meta[name=csrf-var]').attr('content'); return $('meta[name=csrf-var]').prop('content');
}, },
/** /**
* @return string|undefined the CSRF token. Undefined is returned is CSRF validation is not enabled. * @return string|undefined the CSRF token. Undefined is returned is CSRF validation is not enabled.
*/ */
getCsrfToken: function() { getCsrfToken: function() {
return $('meta[name=csrf-token]').attr('content'); return $('meta[name=csrf-token]').prop('content');
}, },
initModule: function (module) { initModule: function (module) {

Loading…
Cancel
Save