Jump to content

KyleKeigan

Member
  • Posts

    18
  • Joined

  • Last visited

Posts posted by KyleKeigan

  1. @tuanphan

    I solved this using another thread: 

     

     

    I changed this code:

    In Settings > Advanced > Code Injection > FOOTER.  (slight difference and I don't necessarily think this is where the problem was)

     

    <script>
    
      $( ( ) => {
      
        $( 'body' ).prepend ( '<div class="cursor cursor-dot" style="left: 0px; top: 0px;">' );
      
        $( window ).mousemove ( function ( e ) {
        
          $( '.cursor' ).css ( {
          
            left: e.pageX,
            top: e.pageY
            
            } );
            
          } );
          
        $( window ).mousemove ( function ( e ) {
        
          $( 'a' ).on ( 'mouseenter', function ( ) {
            
            $( '.cursor' ).addClass ( 'active' );
            
            } );
            
          } );
          
        $( window ).mousemove ( function ( e ) {
        
          $( 'a' ).on ( 'mouseleave', function ( ) {
          
            $( '.cursor' ).removeClass ( 'active' );
            
            } );
            
          } );
          
        } );
        
      </script>

     

    And in Design > Custom CSS added:

     

    * {
        cursor: none !important;
    }

     

  2. @tuanphan
    
    Design > Cusom CSS
    
    @media ( hover: none ) {
    
      .cursor {
      
        display: none !important;
        
        }
      }
    
    * {
    
      cursor: none;
      
      }
    
    .cursor {
    
      --size: 10px;
      
      height: var( --size );
      width: var( --size );
      
      border-radius: 50%;
      pointer-events: none;
      position: absolute;
      transform: translate( -50%, -50% );
      z-index: 99999999999;
      
      }
    
    .cursor.cursor-dot {
    
      background: #ed4c00; /* This defines the color of the cursor */
      mix-blend-mode: screen; /* Delete this line if you dont want the circle to invert */
      transition: width 0.6s, height 0.6s, background-color 0.6s;
      transition-timing-function: ease-out;
      
      }
    
    .cursor-dot.active {
    
      --size: 50px;
      
      background-color: #ed4c00;
      
      }

     

     

     

    In Settings > Advanced > Code Injection > HEADER. 

    <script src="//ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>

     

     

    In Settings > Advanced > Code Injection > FOOTER. 

     

    <script>
    
      $( ( ) => {
      
        $( 'body' ).prepend ( '<div class="cursor cursor-dot" style="left: 0px; top: 0px;">' );
      
        $( window ).mousemove ( function ( e ) {
        
          $( '.cursor' ).css ( {
          
            left: e.pageX,
            top: e.pageY
            
            } );
            
          } );
          
        $( window ).mousemove ( function ( e ) {
        
          $( 'a, input.button' ).on ( 'mouseenter', function ( ) {
            
            $( '.cursor' ).addClass ( 'active' );
            
            } );
            
          } );
          
        $( window ).mousemove ( function ( e ) {
        
          $( 'a, input.button' ).on ( 'mouseleave', function ( ) {
          
            $( '.cursor' ).removeClass ( 'active' );
            
            } );
            
          } );
          
        } );
        
      </script>
  3. @tuanphan Hi! I've uploaded the following code to create a multi-button section on this page: https://sunfish-turbot-cxel.squarespace.com/artwork

    Is there a way to make the background of the button black when you're actively on the page that corresponds to the button?

    Code: .multi-button {
      display: flex;
      flex-wrap: wrap;
      gap: 15px;
      &.center {
        justify-content: center;
      }
      &.right {
        justify-content: flex-end;
      }
      .sqs-edit-mode-active .fluid-engine & .sqs-block-button-container {
        width: unset;
      }
    }

     

    Thank you!!!
    Kyle

  4. @tuanphan Hi! Same issue as @TJC123 I successfully used the above code for a custom cursor on my site but the pointer cursor is appearing over most of my links. It doesn't appear when hovering over the logo and social icons but I think those are the only spots. 

    I played around with adding this code but it changes it back to the arrow instead:

    .header-nav *, nav.header-menu-nav-list * {
    cursor: default !important;
      }

     

    Website URL: https://sunfish-turbot-cxel.squarespace.com/

    Thank you!!!

×
×
  • 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.