Remove hardcoded javascript files from page--front.tpl.php.

Comments

gtsopour’s picture

  1. Remove the following javascript files from page--front.tpl.php:
  2. <script src="misc/jquery.js" type="text/javascript"></script>
    <script src="<?php print drupal_get_path('theme', 'bluemasters') . '/js/bluemasters.js'?>" type="text/javascript"></script>
    
  3. There is no need to load again jquery.js. It is already loaded...
  4. Add the following code inside template.php
  5. /**
     * Add javascript files for front-page jquery slideshow.
     */
    if (drupal_is_front_page()) {
    drupal_add_js(drupal_get_path('theme', 'bluemasters') . '/js/bluemasters.js');
    }
    
  6. Make the following change to bluemasters.js javascript file
  7. Replace the following code

    $(document).ready(				  
    function() {
    .
    .
    .
    

    with this code

    jQuery(document).ready(function($) {
    .
    .
    .
    
gtsopour’s picture

I am working on this issue.
Will fillow a comprehensive patch file with all appropriate changes.

gtsopour’s picture

Status: Active » Fixed

Done and committed

skounis’s picture

Status: Fixed » Closed (fixed)