TitanFrameworkOptionSelect::init_select_script PHP Method

init_select_script() public method

Initialize the select2 field
Since: 1.9.3
public init_select_script ( ) : void
return void
    public function init_select_script()
    {
        if (!self::$firstLoad) {
            return;
        }
        self::$firstLoad = false;
        ?>
		<script>
		jQuery( document ).ready( function () {
			'use strict';

			/**
			 * Select2
			 * @see https://select2.github.io/
			 */
			if ( jQuery().select2 ) {
				jQuery( 'select.tf-select, [class*="tf-select"] select' ).select2();
			}
		});
		</script>
		<?php 
    }