I've created a biography block for concrete5. I need a script to execute only once on pages that contain this block, I can't figure out how to add the script in. The view.php doesn't make sense because I only want it to execute once per page not once per block. Any Ideas?
Edit:
More specifically, I've created a block that has a picture on the left and a bio on the right. I want this to switch every other block so that it has better definition and an easier to follow page layout. I've written a script that will do this:
$(function(){
jQuery(".bio-block:nth-child(even)").each(function() {
var id = $(this).attr('id');
if (id != null){
jQuery("#"+id+" > .bio-image").before(jQuery("#"+id+" > .bio-text"));
}
});
});
But I need it included once after the page has loaded on each page that has bio blocks. There are multiple pages, one page for each team: marketing, sales, management, etc.