Reputation: 57
this is the Lyout code
<!-- Scripts -->
<?php echo $this->headScript()
->prependFile($this->basePath() . '/js/bootstrap.min.js')
->prependFile($this->basePath() . '/js/jquery.min.js')
->prependFile($this->basePath() . '/js/jquery-ui.js')
->prependFile($this->basePath() . '/js/jquery-1.8.3.js')
->prependFile($this->basePath() . '/js/jquery.min.js')
->prependFile($this->basePath() . '/js/respond.min.js', 'text/javascript', array('conditional' => 'lt IE 9',))
->prependFile($this->basePath() . '/js/html5shiv.js', 'text/javascript', array('conditional' => 'lt IE 9',))
So the problem is easy i cant work with dialog and other jquery effects however using the url i can , please where is the problem?
Upvotes: 1
Views: 527
Reputation: 1678
There is some conflicts and compatibility problems between Bootstrap and some other libraries like jQuery UI ... so it is better to use one of them or solve these conflicts between the two libraries on your own. Also you need to include the libraries one time only, the file with the name "min" means that the file is minified (smaller in size) which is more efficient to use.
Upvotes: 0
Reputation: 15053
Probably because you're prepending all the script which means the scripts will be added in reverse order. Try using appendFile:
<!-- Scripts -->
<?php echo $this->headScript()
->appendFile($this->basePath() . '/js/bootstrap.min.js')
->appendFile($this->basePath() . '/js/jquery.min.js')
->appendFile($this->basePath() . '/js/jquery-ui.js')
->appendFile($this->basePath() . '/js/respond.min.js', 'text/javascript', array('conditional' => 'lt IE 9',))
->appendFile($this->basePath() . '/js/html5shiv.js', 'text/javascript', array('conditional' => 'lt IE 9',))
You were also including jquery multiple times.
Upvotes: 4