Menu icon Foundation

My Posts







  • 8
    Replies
  • interchange

    By Craig Adams

    interchange

    Hi everyone, just putting down a few thoughts. I'm used to using the classes hide and show etc to display different content according to each respective screen size, however I've been reading up on interchange and it occurred to me that it's very s... (continued)

    Last Reply by ZainAtif 5 months ago


My Comments

Craig Adams commented on Craig Adams's post about 3 years

Yeah good point, 
 
Many thanks

Craig Adams commented on Craig Adams's post over 5 years

Hi Robin, just been playing around with interchange and I suppose I can see a real benefit, that being cleaner code and separation of content from the main HTML/PHP. Here is an example. As you can see interchange keeps the code in the page quite simple and means I can work on the individual elements for each screen size (small, medium, large) in a separate document.

<?php 

include('includes/header.php'); 

?>


<div data-interchange="[interchange/small_index.php, (small)], [interchange/medium_index.php, (medium)], [interchange/large_index.php, (large)]">
  <div data-alert class="alert-box secondary radius">
    This is the default content.
    <a href="#" class="close">&times;</a>
  </div>
</div>

<?php include('includes/footer.php'); ?>

Posts Followed

No Content

Following

    No Content

Followers

My Posts







My Comments

You commented on Craig Adams's post about 3 years

Yeah good point, 
 
Many thanks

You commented on Craig Adams's post over 5 years

Hi Robin, just been playing around with interchange and I suppose I can see a real benefit, that being cleaner code and separation of content from the main HTML/PHP. Here is an example. As you can see interchange keeps the code in the page quite simple and means I can work on the individual elements for each screen size (small, medium, large) in a separate document.

<?php 

include('includes/header.php'); 

?>


<div data-interchange="[interchange/small_index.php, (small)], [interchange/medium_index.php, (medium)], [interchange/large_index.php, (large)]">
  <div data-alert class="alert-box secondary radius">
    This is the default content.
    <a href="#" class="close">&times;</a>
  </div>
</div>

<?php include('includes/footer.php'); ?>

Posts Followed

No Content

Following

  • No Content

Followers

  • No Content