Skip to content

Commit

Permalink
Script defer
Browse files Browse the repository at this point in the history
  • Loading branch information
lloc committed Oct 8, 2024
1 parent cd5e842 commit 866b3da
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion MslsSelect.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,16 @@ public static function init(): self {
* @return void
*/
public static function enqueue_scripts(): void {
wp_enqueue_script( 'mslsselect', plugins_url( '/js/mslsselect.min.js', __FILE__ ), [], self::VERSION, true );
wp_enqueue_script(
'mslsselect',
plugins_url( '/js/mslsselect.min.js', __FILE__ ),
array(),
self::VERSION,
array(
'in_footer' => true,
'strategy' => 'defer',
)
);
}

/**
Expand Down

0 comments on commit 866b3da

Please sign in to comment.