Skip to content

Check if select2 script is loaded or not #64

@alvinkonda

Description

@alvinkonda

Since im not good in JS im asking here for a bit of help. So how can i load the following code on all pages.

jQuery.fn.select2.defaults.set( "theme", "bootstrap" );

without causing this issue.

theme.js?ver=4.7.3:15 Uncaught TypeError: Cannot read property 'defaults' of undefined

what if statement should i add to my code to check if select2 script is loaded or not because select2 script is loading only on my checkout page

Thanks in advance
Alvin

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions