|
@@ -1,6 +1,7 @@
|
|
|
$('html').css('height','100%');
|
|
|
$('body').css('height','100%');
|
|
|
-$.fn.autoTextarea = function(options) {
|
|
|
+$.fn.autoTextarea = function(options)
|
|
|
+{
|
|
|
var defaults={
|
|
|
maxHeight:null,
|
|
|
minHeight:24
|
|
@@ -23,6 +24,7 @@ $.fn.autoTextarea = function(options) {
|
|
|
});
|
|
|
});
|
|
|
};
|
|
|
+
|
|
|
$('.thumbnail img').picLazyLoad();
|
|
|
var specialId = (function () {
|
|
|
var special_id = $('body').attr('data-special_id');
|
|
@@ -184,14 +186,16 @@ var Vote = function (type) {
|
|
|
};
|
|
|
|
|
|
|
|
|
-var Question = function (obj, handleType) {
|
|
|
+var Question = function (obj, handleType)
|
|
|
+{
|
|
|
this.obj = obj;
|
|
|
this.handleType = handleType;
|
|
|
this.answer = [];
|
|
|
this.getAnswer = function () {
|
|
|
return this.answer;
|
|
|
};
|
|
|
- this.C = function () {
|
|
|
+ this.C = function ()
|
|
|
+ {
|
|
|
var _self = this;
|
|
|
_self.obj.on('change', function () {
|
|
|
switch (_self.handleType) {
|
|
@@ -725,16 +729,21 @@ $('#submit_btn').on('click', function () {
|
|
|
}
|
|
|
|
|
|
var answerDiff = data.datas['answer_diff'];
|
|
|
- if ($('.question_list').length > 0) {
|
|
|
- for (var i = 0; i < answerDiff.length; i++) {
|
|
|
+ if ($('.question_list').length > 0)
|
|
|
+ {
|
|
|
+ for (var i = 0; i < answerDiff.length; i++)
|
|
|
+ {
|
|
|
if (answerDiff[i]['correct']) {
|
|
|
for (var j = 0; j < answerDiff[i]['origin'].length; j++) {
|
|
|
$('.question_options').eq(answerDiff[i]['index']).find('.label').eq(answerDiff[i]['origin'][j]).css('color', 'green');
|
|
|
}
|
|
|
}
|
|
|
- else {
|
|
|
- for (var u = 0; u < answerDiff[i]['origin'].length; u++) {
|
|
|
- for (var g = 0; g < answerDiff[i]['submit'].length; g++) {
|
|
|
+ else
|
|
|
+ {
|
|
|
+ for (var u = 0; u < answerDiff[i]['origin'].length; u++)
|
|
|
+ {
|
|
|
+ for (var g = 0; g < answerDiff[i]['submit'].length; g++)
|
|
|
+ {
|
|
|
if (answerDiff[i]['origin'][u] == answerDiff[i]['submit'][g]) {
|
|
|
$('.question_options').eq(answerDiff[i]['index']).find('.label').eq(answerDiff[i]['origin'][u]).css('color', 'green');
|
|
|
}
|
|
@@ -787,8 +796,8 @@ event($('.like_btn'), 'click', function () {
|
|
|
});
|
|
|
}
|
|
|
else {
|
|
|
- //window.location.protocol + "//" + window.location.host
|
|
|
- url = window.location.protocol + "//" + window.location.host + '/mobile/index.php?act=member_ugc&op=support&client_type=ajax&special_id=' + specialId;
|
|
|
+ var host = window.location.protocol + "//" + window.location.host;
|
|
|
+ url = host + '/mobile/index.php?act=member_ugc&op=support&client_type=ajax&special_id=' + specialId;
|
|
|
ajax(url, function (data) {
|
|
|
$('.loader').hide();
|
|
|
if (data.code !== 200) {
|