Announcement

  •  » Engine
  •  » [resolved] and jQuery again...

#1 2012-12-25 12:01:59

EvilKant
Member
Russia
1970-01-01
98

[resolved] and jQuery again...

I'm doing plugin with datapicker in separate page: (adult content!) http://avesantana.ru/index.php?/calendar .
But I already using jquery in my template in footer.tpl and something breaks(category menu from left part must moving to header menu, you can see that on other pages). Datapicker and all jquery scripts from plugin working correctly, but jquery scripts from footer.tpl ignored.
I was look in other plugins (rv_tscroller) and found only

Code:

$template->func_combine_script( array(
      'id'=> 'jquery',
      'load'=> 'footer',
      'path'=> 'themes/default/js/jquery.min.js',
    ), $template->smarty);

Lightbox plugin have only line

Code:

$template->func_combine_script(array('id'=>'core.scripts', 'path'=>'themes/default/js/scripts.js'));

That are the same or not?

But that codes don't help me. I was try add line {combine_script id="jquery" load='footer' path="themes/default/js/jquery.min.js"} to footer.tpl, but that don't help too.

I thought I knew how to include jquery correctly, but I was wrong.

Offline

 

#2 2012-12-25 12:14:42

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

Re: [resolved] and jQuery again...

you should use Firefox developper console and Firebug

first of all jQuery is well included, in the header

Code:

<script type="text/javascript" src="_data/combined/xaf0eb.js"></script>

(this value might change)

you don't need to explicitely include jquery, the system detect it when needed

your problem is with tiptip

Code:

[12:10:04,453] TypeError: $(...).tipTip is not a function @ http://avesantana.ru/index.php?/calendar:202

you use this function without including tiptip.js


and about your two codes, no it's not the same, tscroller uses jquery, lightbox use piwigo specific scripts (don't know why)

Offline

 

#3 2012-12-25 12:15:43

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

Re: [resolved] and jQuery again...

you can take a look I my plugins if you want, I always declare my script at the begining of templte files, never declare jquery, it always work

Offline

 

#4 2012-12-25 12:24:10

EvilKant
Member
Russia
1970-01-01
98

Re: [resolved] and jQuery again...

Thx for fast answer. I change line with including tiptip and now all work.

Offline

 
  •  » Engine
  •  » [resolved] and jQuery again...

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact