You need to sign in to do that
Don't have an account?
Amanda Byrne- Carolina Tiger Rescue
iquery .append will not execute in div
I've been staring and comparing it with successul code for several hours, and I'm stumped- why won't ?
I've tried it inside functions, adding an alert so I'd know the function was called, I've tried cutting down the string to something really short that was just plain text and that's not it.
I tried putting it into a request from the controller, and that DID work,but it seems silly to call the controller when I don't need anything from it, but it does make me think it is an order of operations thing. But I'm not a programmer, and the things I've tried to issue some kind of refresh/get/run haven't worked
<script>
$j=jQuery.noConflict();
$j("#preTourQuizButton").append(
"<a class=\"btnOrange\" href=\""
+ "https://www.getfeedback.com/r/" +surveyid + "?CnP_PaaS_EVT__Event_attendee_session__c.id=" + attendeeJsId + "&attendeePageId=" + attendeeJsId + "®istrantPageId=" + registrantJsId + "&eventPageId=" + eventJsId
+ "\">"
+"What do you Know about Wildcats?"
+ "</a>"
);
</script>
In page:
<div class="detail" id="preTourQuizButton">
<!--preTour Quiz Button will populate here-->
</div>
I've tried it inside functions, adding an alert so I'd know the function was called, I've tried cutting down the string to something really short that was just plain text and that's not it.
I tried putting it into a request from the controller, and that DID work,but it seems silly to call the controller when I don't need anything from it, but it does make me think it is an order of operations thing. But I'm not a programmer, and the things I've tried to issue some kind of refresh/get/run haven't worked
<script>
$j=jQuery.noConflict();
$j("#preTourQuizButton").append(
"<a class=\"btnOrange\" href=\""
+ "https://www.getfeedback.com/r/" +surveyid + "?CnP_PaaS_EVT__Event_attendee_session__c.id=" + attendeeJsId + "&attendeePageId=" + attendeeJsId + "®istrantPageId=" + registrantJsId + "&eventPageId=" + eventJsId
+ "\">"
+"What do you Know about Wildcats?"
+ "</a>"
);
</script>
In page:
<div class="detail" id="preTourQuizButton">
<!--preTour Quiz Button will populate here-->
</div>
Terence_Chiu
Hi Carolina, I'm not sure if you have moved the order of the script and the div tags. Have you tried placing the script tag after the div tag like the following: