Andy6350
asked on
Uncaught TypeError: undefined is not a function
Hi,
I have a website which has a few carousels on the home page. For some reason the site is now throwing JQuery errors. Nothing has been changed on the site recently and i can't seem to find the issue. I have deactivated all plugins and updated everything which still did not have any effect.
Here is a link to the site http://www.boatinland.co.uk/
I would appreciate it if someone could shine some light on the issue.
Thanks,
Andrew
I have a website which has a few carousels on the home page. For some reason the site is now throwing JQuery errors. Nothing has been changed on the site recently and i can't seem to find the issue. I have deactivated all plugins and updated everything which still did not have any effect.
Here is a link to the site http://www.boatinland.co.uk/
I would appreciate it if someone could shine some light on the issue.
Thanks,
Andrew
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Actually, i didn't clear my cache ;) my bad. The carousel works now just issues with the nextgen gallery.
Looks ok to me, those 3 sections are now scrolling thru.
ASKER
The three sections are scrolling nicely yes. The featured content gallery on the home page was broken too and the gallery on the boat pages http://www.boatinland.co.uk/amf-crestliner-boats-cruisader-2455
Just trying to fix the featured content gallery and work my way through. The console on the home page is saying the images cant be loaded :/
Just trying to fix the featured content gallery and work my way through. The console on the home page is saying the images cant be loaded :/
Well it's looking for the images in the root folder, are they there, more likely in the uploads directory.
ASKER
I can't work out why it's all of a sudden looking in the root dir and also how to get the correct path.
This is the code of the page called
<div id="featured">
<script type="text/javascript">
function startGallery() {
var myGallery = new gallery($('myGallery'), {
timed: true
});
}
window.addEvent('domready' ,startGall ery);
</script>
<style type="text/css">
.jdGallery .slideInfoZone
{
height: <?php echo get_option('gallery-info') ; ?>px;
}
</style>
<div id="myGallery">
<?php
$imgthumb = get_option('gallery-use-th umb-image' ) ? "thumbnailimg" : "articleimg";
$wordquantity = get_option('gallery-rss-wo rd-quantit y') ? get_option('gallery-rss-wo rd-quantit y') : 100;
if (get_option('gallery-way') == 'new') {//new way
$arr = split(",",get_option('gall ery-items- pages'));
if (get_option('gallery-rando mize-pages '))
{
shuffle($arr);
}
foreach ($arr as $post_or_page_id)
{
get_a_post($post_or_page_i d); ?>
<div class="imageElement">
<h2><?php the_title() ?></h2>
<?php
if(get_option('gallery-use -featured- content')) {?>
<p><?php $key="featuredtext"; echo get_post_meta($post->ID, $key, true); ?></p>
<?php
} else {
?>
<p><?php the_content_rss('', 0, '', $wordquantity); ?></p>
<?php
}
?>
<a href="<?php the_permalink() ?>" title="Read More" class="open"></a>
<img src="<?php $key="articleimg"; echo get_post_meta($post->ID, $key, true); ?>" alt="<?php $key="alttext"; echo get_post_meta($post->ID, $key, true); ?>" class="full" />
<img src="<?php $key=$imgthumb; echo get_post_meta($post->ID, $key, true); ?>" alt="<?php $key="alttext"; echo get_post_meta($post->ID, $key, true); ?>" class="thumbnail" />
</div>
<?php
} ?>
</div>
<?php
}
else { ?>
<?php $temp_query = $wp_query; ?>
<?php query_posts('category_name =' . get_option('gallery-catego ry') . '&showposts=' . get_option('gallery-items' )); ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="imageElement">
<h2><?php the_title() ?></h2>
<?php
if(get_option('gallery-use -featured- content')) {?>
<p><?php $key="featuredtext"; echo get_post_meta($post->ID, $key, true); ?></p>
<?php
} else {
?>
<p><?php the_content_rss('', 0, '', $wordquantity); ?></p>
<?php
}
?>
<a href="<?php the_permalink() ?>" title="Read More" class="open"></a>
<img src="<?php $key="articleimg"; echo get_post_meta($post->ID, $key, true); ?>" alt="<?php $key="alttext"; echo get_post_meta($post->ID, $key, true); ?>" class="full" />
<img src="<?php $key=$imgthumb; echo get_post_meta($post->ID, $key, true); ?>" alt="<?php $key="alttext"; echo get_post_meta($post->ID, $key, true); ?>" class="thumbnail" />
</div>
<?php endwhile; else: ?>
<?php endif; ?>
<?php $wp_query = $temp_query; ?>
</div>
<?php
}?>
</div>
This is the code of the page called
<div id="featured">
<script type="text/javascript">
function startGallery() {
var myGallery = new gallery($('myGallery'), {
timed: true
});
}
window.addEvent('domready'
</script>
<style type="text/css">
.jdGallery .slideInfoZone
{
height: <?php echo get_option('gallery-info')
}
</style>
<div id="myGallery">
<?php
$imgthumb = get_option('gallery-use-th
$wordquantity = get_option('gallery-rss-wo
if (get_option('gallery-way')
$arr = split(",",get_option('gall
if (get_option('gallery-rando
{
shuffle($arr);
}
foreach ($arr as $post_or_page_id)
{
get_a_post($post_or_page_i
<div class="imageElement">
<h2><?php the_title() ?></h2>
<?php
if(get_option('gallery-use
<p><?php $key="featuredtext"; echo get_post_meta($post->ID, $key, true); ?></p>
<?php
} else {
?>
<p><?php the_content_rss('', 0, '', $wordquantity); ?></p>
<?php
}
?>
<a href="<?php the_permalink() ?>" title="Read More" class="open"></a>
<img src="<?php $key="articleimg"; echo get_post_meta($post->ID, $key, true); ?>" alt="<?php $key="alttext"; echo get_post_meta($post->ID, $key, true); ?>" class="full" />
<img src="<?php $key=$imgthumb; echo get_post_meta($post->ID, $key, true); ?>" alt="<?php $key="alttext"; echo get_post_meta($post->ID, $key, true); ?>" class="thumbnail" />
</div>
<?php
} ?>
</div>
<?php
}
else { ?>
<?php $temp_query = $wp_query; ?>
<?php query_posts('category_name
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="imageElement">
<h2><?php the_title() ?></h2>
<?php
if(get_option('gallery-use
<p><?php $key="featuredtext"; echo get_post_meta($post->ID, $key, true); ?></p>
<?php
} else {
?>
<p><?php the_content_rss('', 0, '', $wordquantity); ?></p>
<?php
}
?>
<a href="<?php the_permalink() ?>" title="Read More" class="open"></a>
<img src="<?php $key="articleimg"; echo get_post_meta($post->ID, $key, true); ?>" alt="<?php $key="alttext"; echo get_post_meta($post->ID, $key, true); ?>" class="full" />
<img src="<?php $key=$imgthumb; echo get_post_meta($post->ID, $key, true); ?>" alt="<?php $key="alttext"; echo get_post_meta($post->ID, $key, true); ?>" class="thumbnail" />
</div>
<?php endwhile; else: ?>
<?php endif; ?>
<?php $wp_query = $temp_query; ?>
</div>
<?php
}?>
</div>
ASKER
Ok so i've realised that the file path is missing this part /wp-content/files_mf/ i don't know if this is an issue with magic fields plugin but it seems all setup correctly.
I even tried replacing....
<img src="<?php $key="articleimg"; echo get_post_meta($post->ID, $key, true); ?>" alt="<?php $key="alttext"; echo get_post_meta($post->ID, $key, true); ?>" class="full" />
with....
<img src="/wp-content/files_mf/ <?php $key="articleimg"; echo get_post_meta($post->ID, $key, true); ?>" alt="<?php $key="alttext"; echo get_post_meta($post->ID, $key, true); ?>" class="full" />
This did not work.
Hope this makes sense?
Andrew
I even tried replacing....
<img src="<?php $key="articleimg"; echo get_post_meta($post->ID, $key, true); ?>" alt="<?php $key="alttext"; echo get_post_meta($post->ID, $key, true); ?>" class="full" />
with....
<img src="/wp-content/files_mf/
This did not work.
Hope this makes sense?
Andrew
ASKER
Hi,
Any ideas why this isn't working, not sure if to just change the gallery.
Thanks,
Andrew
Any ideas why this isn't working, not sure if to just change the gallery.
Thanks,
Andrew
ASKER
Thanks for that, it's seemed to have cleared the error in the console, however the carousels are still not working. I can't see what could of effected this. I assumed it was the JQuery error in the console.
Any ideas?
Thanks,
Andrew