| @@ -10,13 +10,11 @@ | ||
| 10 | 10 | pd.async = true; |
| 11 | 11 | pd.src = w.crowdsignal_shortcode_options.script_url; |
| 12 | 12 | s = d.getElementsByTagName( c )[ 0 ]; |
| 13 | 13 | s.parentNode.insertBefore( pd, s ); |
| 14 | + } else if ( typeof w.jQuery !== 'undefined' ) { | |
| 15 | + // In environments where jQuery is present, dispatch with jQuery. | |
| 16 | + w.jQuery( d.body ).trigger( 'pd-script-load' ); | |
| 14 | 17 | } else { |
| 15 | - // In environments where jQuery is present, dispatch with jQuery. | |
| 16 | - if ( typeof w.jQuery !== 'undefined' ) { | |
| 17 | - w.jQuery( d.body ).trigger( 'pd-script-load' ); | |
| 18 | - } else { | |
| 19 | - d.body.dispatchEvent( new Event( 'pd-script-load' ) ); | |
| 20 | - } | |
| 18 | + d.body.dispatchEvent( new Event( 'pd-script-load' ) ); | |
| 21 | 19 | } |
| 22 | 20 | } )( window, document, 'script', 'pd-polldaddy-loader' ); |