+ Start a Discussion

jquery call function

I am trying to call my jquery function but I can not figure out how it works within VF Page. This code works fine on my website but within VF it does not behave.

I need to call my galleria function to load a theme (Styling) and to start a slideshow (run).


    var j$ = jQuery.noConflict();
    (document).ready(function($) {


Nothing is called. The styling does not change and my gallery is not displayed. Any ideas of what Im doing wrong?

Saurabh DhobleSaurabh Dhoble

(A) Make sure you have included the correct jquery files in your page :-


<apex:page >
    <apex:includeScript value="//ajax.googleapis.com/ajax/libs/jqueryui/1.8.23/jquery-ui.min.js"></apex:includeScript>
    <apex:stylesheet value="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery.ui.base.css" />
    <apex:stylesheet value="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery.ui.theme.css" />    


(B) Check the ID of the "galleria" container - I'm pretty sure the ID would have changed. Look at this post on how to reference objects in jquery.