How to select and change data-toggle value in bootstrap

So I’m doing a loop and have the some values wrapped in some bootstrap markup. The issue that I have is that I need the classes for data-toggle to be different for the first div and then for the following divs. So what I want to do is select data-toggle and change the value for it for the first div. How do I select data-toggle? What is it considered??

Am I on the right path?

  <script>
   $(document).ready(function(){
    $('[data-toggle="collapse"], collapsed');   
   });
  </script>



echo   "<div class='panel panel-default'>"; 
		echo  "<div class='panel-heading' role='tab' id='heading$Number'>";
		echo   "<h4 class='panel-title'>";
		echo 	"<a class='CollapsibleLink DarkAccentColorBackground' role='button' data-toggle='collapse' data-parent='#accordion' href='#Collapse$Number' aria-expanded='true' aria-controls='collapseOne'>";
		the_sub_field('question_or_header');echo "</a>";
	       echo 	"</h4>";
		echo    "</div>";	
														
	echo "<div id='Collapse$Number' class='panel-collapse collapse in' role='tabpanel' aria-labelledby='heading$Number'>";
		echo "<div class='panel-body'>";
		the_sub_field('answer_');
		echo "</div>";
		echo "</div>";	
		echo "</div>";	//<!--panel panel-default-->"

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.