nl_tokens: On Template changes recall plugins .
pl_tokens: function initDynamic ( ) { // bootstrap popover $ ( 'a[data-toggle=popover]' ) . popover ( ) . click ( function ( e ) { e . preventDefault ( ) ; } ) ; var version = $ ( '#version strong' ) . html ( ) ; $ ( '#sidenav li' ) . removeClass ( 'is-new' ) ; if ( apiProject . template . withCompare ) { $ ( '#sidenav li[data-version=\'' + version + '\']' ) . each ( function ( ) { var group = $ ( this ) . data ( 'group' ) ; var name = $ ( this ) . <mask> ( 'name' ) ; var length = $ ( '#sidenav li[data-group=\'' + group + '\'][data-name=\'' + name + '\']' ) . length ; var index = $ ( '#sidenav li[data-group=\'' + group + '\'][data-name=\'' + name + '\']' ) . index ( $ ( this ) ) ; if ( length === 1 || index === ( length - 1 ) ) $ ( this ) . addClass ( 'is-new' ) ; } ) ; } // tabs $ ( '.nav-tabs-examples a' ) . click ( function ( e ) { e . preventDefault ( ) ; $ ( this ) . tab ( 'show' ) ; } ) ; $ ( '.nav-tabs-examples' ) . find ( 'a:first' ) . tab ( 'show' ) ; // sample request switch $ ( '.sample-request-switch' ) . click ( function ( e ) { var name = '.' + $ ( this ) . attr ( 'name' ) + '-fields' ; $ ( name ) . addClass ( 'hide' ) ; $ ( this ) . parent ( ) . next ( name ) . removeClass ( 'hide' ) ; } ) ; // init modules sampleRequest . initDynamic ( ) ; }