Problem with javascripts

Gast


rumen

Sure, thanks a lot! You have the whole package on you mail.

Gast

clear the cache?
use non-browser tools like ccleaner

try other jquery versions?

do you use library admin?

is it possible to zip the mp3-player-module and post it here?

rumen

All done (I think) as described, the  jqCollapse start working properly, but the sliding panel and the player - no......

Gast

#5
Quote from: nibz on September 27, 2014, 11:43:56 PM
It looks to me you are loading jQuery twice.

only twice? i count four

1.  <script type="text/javascript" src="jquery-1.4.1.min.js"></script>
2.  register_frontend_modfiles('jquery');
3.  <script src="<?php echo TEMPLATE_DIR; ?>/jquery-1.7.2.min.js" type="text/javascript"></script>
4.  <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js" ></script>

use only one jquery (if you dont use libraryadmin)
change the loading order

1. your css (templates & additional css if needed)
2. the block with register_frontend_modfiles
3. additional javascripts for modules (if not loading by modules)

<?php

if (!defined('WB_PATH')) die(header('Location: ../../index.php'));

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="EN" lang="EN" dir="ltr">
<head>
<title><?php page_title(); ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=<?php 
if(defined('DEFAULT_CHARSET')) { echo DEFAULT_CHARSET; } else 
{ echo 
'utf-8'; }?>
" />
<meta http-equiv="imagetoolbar" content="no" />
<meta name="description" content="<?php page_description(); ?>" />
<meta name="keywords" content="<?php page_keywords(); ?>" />
<link rel="stylesheet" type="text/css" href="<?php echo TEMPLATE_DIR?>/styles/layout.css" media="screen" />

<?php
// this allows to include the optional module files (frontend.css, frontend.js) into the head section
if(function_exists('register_frontend_modfiles')) {
  
register_frontend_modfiles('css');
  
register_frontend_modfiles('jquery');
  
register_frontend_modfiles('js');
?>

<script type="text/javascript" src="jquery.slidepanel.setup.js"></script>
<script type="text/javascript" src="jquery.cycle.min.js"></script>
<script type="text/javascript" src="jquery.cycle.setup.js"></script>

</head>


i use jQuery v1.11.0 and jQuery Migrate v1.2.1

Only if you use jquery 1.11.0
rename the jquery-min.js in the include/jquery-folder  to the used version in this file ( like jquery-min_183.js) and put the jQuery v1.11.0 this folder and jQuery Migrate v1.2.1 into your template folder
rename the jQuery v1.11.0.js to jquery-min.js
and call the migrate.js in a extra call like
<script src="<?php echo TEMPLATE_DIR?>/js/jQuery Migrate v1.2.1.js" type="text/javascript"></script>
behind the block with register_frontend_modfiles and before you call other js-file like jquery.slidepanel.setup.js

if jQuery v1.11.0 doesnt work for your modules, you have only to rename the jquery-files in the include/jquery-Folder

rumen

The site is on my localhost (xampp) so I can't give you a link. What I can do is to send you the template if this can help.

When I skip:

<!-- <script type="text/javascript" src="jquery-1.4.1.min.js"></script> -->

Nothing happens....

By the way I try to install MP3 player which works properly on other site ... nothing again it is dewplayer (very good one)

nibz

Quote from: rumen on September 27, 2014, 11:14:10 PM

<script type="text/javascript" src="jquery-1.4.1.min.js"></script>

<?php
// this allows to include the optional module files (frontend.css, frontend.js) into the head section
if(function_exists('register_frontend_modfiles')) {
  
register_frontend_modfiles('jquery');
?>




It looks to me you are loading jQuery twice.

nibz

Hi rumen,

Could you post or PM a link to the website.
Because that would speed up troubleshooting!

Kind regards,

Robin

rumen

Most of the javasripts doesn't start .... I have CaptionSlider that works properly. But I have a form which is sliding panel and doesn't work at all. I installed jqCollapse and when I put Title and Content - the title appears on the screen but when you click nothing happens.

Here is the code of the header of the template:

<?php

if (!defined('WB_PATH')) die(header('Location: ../../index.php'));

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="EN" lang="EN" dir="ltr">
<head>
<title><?php page_title(); ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=<?php 
if(defined('DEFAULT_CHARSET')) { echo DEFAULT_CHARSET; } else 
{ echo 
'utf-8'; }?>
" />
<meta http-equiv="imagetoolbar" content="no" />
<meta name="description" content="<?php page_description(); ?>" />
<meta name="keywords" content="<?php page_keywords(); ?>" />
<link rel="stylesheet" type="text/css" href="<?php echo TEMPLATE_DIR?>/styles/layout.css" media="screen" />
<!-- <link rel="stylesheet" href="styles/layout.css" type="text/css" /> -->
<script type="text/javascript" src="jquery-1.4.1.min.js"></script>
<script type="text/javascript" src="jquery.slidepanel.setup.js"></script>
<script type="text/javascript" src="jquery.cycle.min.js"></script>
<script type="text/javascript" src="jquery.cycle.setup.js"></script>
<script src="<?php echo TEMPLATE_DIR?>/jquery-1.7.2.min.js" type="text/javascript"></script>

<?php
// this allows to include the optional module files (frontend.css, frontend.js) into the head section
if(function_exists('register_frontend_modfiles')) {
  
register_frontend_modfiles('css');
  
register_frontend_modfiles('jquery');
  
register_frontend_modfiles('js');
?>


<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js" ></script>

</head>


What can be wrong? Any Idea?