Title: Enqueue scripts and Styles
Last modified: August 28, 2020

---

# Enqueue scripts and Styles

 *  Resolved [s.mattei](https://wordpress.org/support/users/smattei/)
 * (@smattei)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/enqueue-scripts-and-styles-2/)
 * Hi,
    How to enqueue scripts and styles for specific custom block? Thanks

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [s.mattei](https://wordpress.org/support/users/smattei/)
 * (@smattei)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/enqueue-scripts-and-styles-2/#post-13327321)
 * I try to be more precise:
    I would like to know how to enqueue scripts or css
   for my custom block and get the attribute value in my javascript file. Is possible?
   Thanks
 *  Plugin Author [nK](https://wordpress.org/support/users/nko/)
 * (@nko)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/enqueue-scripts-and-styles-2/#post-13363511)
 * Hey.
 * You may try to add CSS and JS using this method – [https://wordpress.stackexchange.com/questions/328536/load-css-javascript-in-frontend-conditionally-if-block-is-used](https://wordpress.stackexchange.com/questions/328536/load-css-javascript-in-frontend-conditionally-if-block-is-used)
 * You can output values to the block data attributes in the block and use it from
   JS.
 * Regards, nK.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Enqueue scripts and Styles’ is closed to new replies.

 * ![](https://ps.w.org/lazy-blocks/assets/icon-256x256.png?rev=2584676)
 * [Custom Block Builder - Lazy Blocks](https://wordpress.org/plugins/lazy-blocks/)
 * [Support Threads](https://wordpress.org/support/plugin/lazy-blocks/)
 * [Active Topics](https://wordpress.org/support/plugin/lazy-blocks/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/lazy-blocks/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/lazy-blocks/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [nK](https://wordpress.org/support/users/nko/)
 * Last activity: [5 years, 9 months ago](https://wordpress.org/support/topic/enqueue-scripts-and-styles-2/#post-13363511)
 * Status: resolved