0

I am having a problem with ZendX_JQquery. problem is that jquery loads with

echo $this->jQuery()

and jquery plugin loads with

$echo $this->headScript();

now if i echo out headscript before jquery, i get an error message because plygin depends on jquery. and i have on load function load function loaded with

$jquery->addOnload('some function');

it echos out with jquery before the plugin and get an error message. is there a way to load jquery plugin with jquery method

Noelkd
  • 7,686
  • 2
  • 29
  • 43
S L
  • 14,262
  • 17
  • 77
  • 116

1 Answers1

0

You can add JavaScript files to the JQuery Stack.

<?php
//index.phtml

$plugin = '/public/js/plugins/xyz.js';

// add plugin to Jquery "echO"
echo $this->jQuery()->addJavascriptFile($plugin);
opHASnoNAME
  • 20,224
  • 26
  • 98
  • 143