You need to sign in to do that
Don't have an account?
Rishav
how to use jQuery
// i am trying to use the jquery in visualforce but it's not working .
i tried both method by using the static resource and by using the CDN file also but no one is working
can anyone tell where i am doing the mistake?
<apex:page >
<apex:includeScript value="{!URLFOR($Resource.jqueryui,'jqueryui/js/jquery-1.10.2.js')}"/>
<apex:includeScript value="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"/>
<head>
<script>
J$ = jQuery.noConflict();
J$(document).ready(function(){
alert("hello jQuery");
)};
</script>
</head>
<apex:pageBlock >
hello
</apex:pageBlock>
</apex:page>
// i am trying to use the jquery in visualforce but it's not working .
i tried both method by using the static resource and by using the CDN file also but no one is working
can anyone tell where i am doing the emistake?
i tried both method by using the static resource and by using the CDN file also but no one is working
can anyone tell where i am doing the mistake?
<apex:page >
<apex:includeScript value="{!URLFOR($Resource.jqueryui,'jqueryui/js/jquery-1.10.2.js')}"/>
<apex:includeScript value="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"/>
<head>
<script>
J$ = jQuery.noConflict();
J$(document).ready(function(){
alert("hello jQuery");
)};
</script>
</head>
<apex:pageBlock >
hello
</apex:pageBlock>
</apex:page>
// i am trying to use the jquery in visualforce but it's not working .
i tried both method by using the static resource and by using the CDN file also but no one is working
can anyone tell where i am doing the emistake?
there is a small syntax error in closing braces of the document ready function... try the below and it should work now..
All Answers
there is a small syntax error in closing braces of the document ready function... try the below and it should work now..
Thanks for your help.
suggest me where should i write the javascript program so that it can catch my syntax errors.
It becomes very hard to catch the javascript error in visualforce editor.
Thanks
Rishav