• Resolved futureyoon

    (@futureyoon)


    Hi

    Is it possible to put jquery and css together in single snippet?
    If so, how would the sample code look like?

    Jquery sample
    jQuery(document).ready(function() {
    // xxxxxx
    });

    CSS sample
    .activity-content {
    margin-top: 10px;
    }

    Please guide me.
    Thank you!

Viewing 1 replies (of 1 total)
  • Plugin Author Shea Bunge

    (@bungeshea)

    It’s absolutely possible! Just need to include both <script> and <style> sections:

    add_action( 'wp_head', function () { ?>
    <script>
    
    jQuery(document).ready(function() {
    // xxxxxx
    });
    
    </script>
    <style>
    
    .activity-content {
    margin-top: 10px;
    }
    
    </style>
    <?php } );

    Let us know if you have any follow-up questions.

Viewing 1 replies (of 1 total)

The topic ‘jquery & css together’ is closed to new replies.