AffectiveSlider icon indicating copy to clipboard operation
AffectiveSlider copied to clipboard

fixed jquery selector issue, added more logging

Open mjsobrep opened this issue 5 years ago • 6 comments

This should fix #7 #9 #8 It would be good to have the people who raised the issue check the fix.

mjsobrep avatar Aug 15 '19 18:08 mjsobrep

I have tried these update versions in qualtrics, and the images are not showing up. Any ideas?

Tiradoc avatar Nov 08 '19 01:11 Tiradoc

@Tiradoc Can you give me some more details? It is working for me, but maybe I did something differently than you. How did you set up? What does it look like (screenshot). What is printed in the debug console (F12)?

mjsobrep avatar Nov 08 '19 16:11 mjsobrep

Thanks so much for replying. When making the slider itself there is no problem, but when adding the javascript into the settings for the arousal and pleasure script the actual images do not show up on the slider. screen shots are attached. 1-2-3 is the preview of what we see after the javascript has been saved.

I am a beginner so I am not sure if I am doing something wrong by copying the code and just pasting it in the box for javascript.

the console shows up as: VM2301:5 working to build question: QID1 vendor.9e42780b352e59cdcbbc.js:1 Prototype global SV_1MREu3wNXDy7gq1 $ https://vcupsych.co1.qualtrics.com/jfe/static/dist/c/prototype.b3e1d6615f8802359486.js:1:151 vendor.9e42780b352e59cdcbbc.js:1 Prototype global SV_1MREu3wNXDy7gq1 Selector https://vcupsych.co1.qualtrics.com/jfe/static/dist/c/prototype.b3e1d6615f8802359486.js:1:151 vendor.9e42780b352e59cdcbbc.js:1 SE API Error: TypeError: Cannot read property 'apply' of undefined at i.e (prototype.b3e1d6615f8802359486.js:1) at new i (prototype.b3e1d6615f8802359486.js:1) at S.r.eval (eval at (vendor.9e42780b352e59cdcbbc.js:1), :6:42) at S.r. (jsApi.25e7e46fccfed76a0cec.js:1) at S.r. (vendor.9e42780b352e59cdcbbc.js:1) at S.r. (vendor.9e42780b352e59cdcbbc.js:1) at c (vendor.9e42780b352e59cdcbbc.js:1) at S.r._trigger (vendor.9e42780b352e59cdcbbc.js:1) at S.r.i [as _trigger] (vendor.9e42780b352e59cdcbbc.js:1) at S.r. (jfe.421d9501d5d5bbd2b32a.js:1) ƒ () { var qid = this.questionId; console.log('working to build question: ' + qid); var labels = $(qid).descendants().grep(new Selector('.statement-container')); console.log('… https://vcupsych.co1.qualtrics.com/jfe/static/dist/c/jsApi.25e7e46fccfed76a0cec.js:1:3755 i @ vendor.9e42780b352e59cdcbbc.js:1 VM2305:5 working to build question: QID1 vendor.9e42780b352e59cdcbbc.js:1 Prototype global SV_1MREu3wNXDy7gq1 $ https://vcupsych.co1.qualtrics.com/jfe/static/dist/c/prototype.b3e1d6615f8802359486.js:1:151 vendor.9e42780b352e59cdcbbc.js:1 Prototype global SV_1MREu3wNXDy7gq1 Selector https://vcupsych.co1.qualtrics.com/jfe/static/dist/c/prototype.b3e1d6615f8802359486.js:1:151 vendor.9e42780b352e59cdcbbc.js:1 SE API Error: TypeError: Cannot read property 'apply' of undefined at i.e (prototype.b3e1d6615f8802359486.js:1) at new i (prototype.b3e1d6615f8802359486.js:1) at S.r.eval (eval at (vendor.9e42780b352e59cdcbbc.js:1), :6:42) at S.r. (jsApi.25e7e46fccfed76a0cec.js:1) at S.r. (vendor.9e42780b352e59cdcbbc.js:1) at S.r. (vendor.9e42780b352e59cdcbbc.js:1) at c (vendor.9e42780b352e59cdcbbc.js:1) at S.r._trigger (vendor.9e42780b352e59cdcbbc.js:1) at S.r.i [as _trigger] (vendor.9e42780b352e59cdcbbc.js:1) at S.r. (jfe.421d9501d5d5bbd2b32a.js:1) ƒ () { var qid = this.questionId; console.log('working to build question: ' + qid); var labels = $(qid).descendants().grep(new Selector('.statement-container')); console.log('… https://vcupsych.co1.qualtrics.com/jfe/static/dist/c/jsApi.25e7e46fccfed76a0cec.js:1:3755

On Fri, Nov 8, 2019 at 11:27 AM Michael Sobrepera [email protected] wrote:

@Tiradoc https://github.com/Tiradoc Can you give me some more details? It is working for me, but maybe I did something differently than you. How did you set up? What does it look like (screenshot). What is printed in the debug console (F12)?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/albertobeta/AffectiveSlider/pull/10?email_source=notifications&email_token=ANWYRGB4PWTYTFWTHQO67WDQSWHPXA5CNFSM4IMA4AJKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEDSUBDQ#issuecomment-551895182, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANWYRGDZT5GPRGQ54BDAE5DQSWHPXANCNFSM4IMA4AJA .

-- Camila Tirado B.S. Student of Psychology & PreGraduate School Institute for Inclusion, Inquiry, and Innovation https://icubed.vcu.edu/| Commonwealth iCubed Scholar The Consciousness Lab https://consciousnesslaboratory.org/ | Project Manager La Esperanza Research Lab https://laesperanza.vcu.edu/ | Research Assistant Virginia Commonwealth University Pronouns | She, Her, Hers

Tiradoc avatar Nov 08 '19 23:11 Tiradoc

@Tiradoc that looks like the old code. The offending line is the var labels = $(qid).descendants().grep(new Selector('.statement-container')); It should be:

	var labels =  jQuery.grep($(qid).descendants(),function(n, i) {
    	return (n.className == 'statement-container');
	});

Maybe you copied from the wrong place? Take a look at the files here: https://github.com/mjsobrep/AffectiveSlider/tree/selector-fix/qualtrics

mjsobrep avatar Nov 09 '19 01:11 mjsobrep

I really appreciate all the help! It is now working, It is weird because I thought it was the right place, but I see the issue now and it is fixed. Thank you!!

On Fri, Nov 8, 2019 at 8:00 PM Michael Sobrepera [email protected] wrote:

@Tiradoc https://github.com/Tiradoc that looks like the old code. The offending line is the var labels = $(qid).descendants().grep(new Selector('.statement-container')); It should be:

var labels = jQuery.grep($(qid).descendants(),function(n, i) { return (n.className == 'statement-container'); });

Maybe you copied from the wrong place? Take a look at the files here: https://github.com/mjsobrep/AffectiveSlider/tree/selector-fix/qualtrics

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/albertobeta/AffectiveSlider/pull/10?email_source=notifications&email_token=ANWYRGBRK6DFISJHG26WJILQSYDTDA5CNFSM4IMA4AJKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEDTZKHY#issuecomment-552047903, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANWYRGCLWCYUH6SRML5M5XLQSYDTDANCNFSM4IMA4AJA .

-- Camila Tirado B.S. Student of Psychology & PreGraduate School Institute for Inclusion, Inquiry, and Innovation https://icubed.vcu.edu/| Commonwealth iCubed Scholar The Consciousness Lab https://consciousnesslaboratory.org/ | Project Manager La Esperanza Research Lab https://laesperanza.vcu.edu/ | Research Assistant Virginia Commonwealth University Pronouns | She, Her, Hers

Tiradoc avatar Nov 09 '19 02:11 Tiradoc

@albertobeta any chance of getting this merged in?

mjsobrep avatar Nov 20 '19 20:11 mjsobrep