Jump to content

ARTSPEAKNYC

Circle Member
  • Posts

    2
  • Joined

  • Last visited

Reputation Activity

  1. Like
    ARTSPEAKNYC reacted to colin.irwin in How do I create hide/show text on a page, like you see with FAQs?   
    Here's a slightly more concise solution, using jQuery.
    The idea is to use a Markdown block to hold your questions and answers. It should be the only Markdown block on the page.
    The Markdown will look something like the following (The + at the start of each question is a cue for the user to know they can expand the entry).
    + This is a first question ----------------- This is the first line of an answer to the question above. This is a second line of the answer. * Bullet points * Can be used too + This is a second question ----------------- This is a one line answer to the question above.
    Questions should be styled as H2.
    Then put the following code into your page's injection point:
    <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> <script> $(document).ready(function(){ $('.markdown-block .sqs-block-content h2').css('cursor','pointer'); $(".markdown-block .sqs-block-content h2").nextUntil("h2").slideToggle(); $(".markdown-block .sqs-block-content h2").click(function() {$(this).nextUntil("h2").slideToggle();}); }); </script>
    The first can be omitted if you already have a link to jQuery in your sitewide code injection point.
    The second script tells the mouse cursor to become a pointer when over the Markdown H2s - this is to tell the user it's clickable. Then, when an H2 is clicked it toggles the visibility of all content between the clicked H2 and the next H2 / the end of the markdown block.
    See it in action here - http://www.silvabokis.com/idea-testing/
  2. Like
    ARTSPEAKNYC reacted to tuanphan in Version 7.1 help needed- different logos on different pages   
    @basakatac you can insert this code to Page Settings > Advanced > Header
    <script> window.onload = function() { document.querySelectorAll('.header-title-logo img')[0].src = 'https://truyencv.com/images/no_avatar.jpg'; }; </script> Repalce https:///.jpg with new logo image url.
  3. Like
    ARTSPEAKNYC reacted to jtruong212 in Code Block: How can I autoplay a video?   
    Has anyone been able to solve this yet for 7.0? I have tried many things and always get some videos that will play and some that won't randomly
×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.