function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Amanda Byrne- Carolina Tiger RescueAmanda 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 + "&registrantPageId=" + 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_ChiuTerence_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:
 
<div class="detail" id="preTourQuizButton"> 
            <!--preTour Quiz Button will populate here--> 
</div>


<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 + "&registrantPageId=" + registrantJsId + "&eventPageId=" + eventJsId 
             + "\">"                                                          
             +"What do you Know about Wildcats?" 
             + "</a>"                                                                                                                  
          );
</script>