Home
Q&A
Education
Technology
Credit
General
Health
Insurance
Questions
Ask a Question
how to call function in jquery from javascript
Home
Education
how to call function in jquery from javascript
asked
Feb 21, 2022
in
Education
by
JackTerrance
$(document).ready(function(){ alert("funciton"); $(function(){ $.fn.gotof(){ alert("I am calling form jquery"); } }); });
function dofunc(){ gotof(); } how do i call gotof() that is present in jquery and below is the code written over jsfiddle JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)
javascriptjquery
1
Answer
0
votes
answered
Feb 21, 2022
by
JackTerrance
There are a few errors in your code. Fixed it should look like this: $.fn.gotof = function() { // has to be defined as a function, does not need to be inside a nested document ready function alert("I am calling form jquery"); }; $(document).ready(function() { alert("function is ready to use now"); }); function dofunc() { $.fn.gotof(); // can call it using $.fn.gotof(), but it should really be called properly via a selector $('div').gotof(); }
http://jsfiddle.net/pSJL4/8/
Related questions
0
votes
Q: how to call function in jquery from javascript
$(document).ready(function(){ alert("funciton"); $(function(){ $.fn.gotof(){ alert("I am ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked
Feb 19, 2022
in
Education
by
JackTerrance
javascriptjquery
0
votes
Q: how to call function in jquery from javascript
$(document).ready(function(){ alert("funciton"); $(function(){ $.fn.gotof(){ alert("I am ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked
Feb 19, 2022
in
Education
by
JackTerrance
javascriptjquery
0
votes
Q: How to get calculate with dates in js/jQuery
I've a datepicker, using jQuery. But I want to substract 5 days from the date that is selected ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked
Feb 16, 2022
in
Education
by
JackTerrance
javascriptjquery
0
votes
Q: How to get calculate with dates in js/jQuery
I've a datepicker, using jQuery. But I want to substract 5 days from the date that is selected ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked
Feb 15, 2022
in
Education
by
JackTerrance
javascriptjquery
0
votes
Q: Jquery Datatables Colvis fires preDrawCallback and DrawCallback twice on column item click
Please refer to my test case https://jsfiddle.net/1c3Lmace/13/ This is my code $(document).ready( ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked
Jul 20, 2022
in
Education
by
JackTerrance
javascriptjquery
0
votes
Q: Jquery steps customization
So now I'm trying to customize Jquery steps by adding a score for each question's option. But the ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked
Apr 7, 2022
in
Education
by
JackTerrance
javascriptjquery
0
votes
Q: Automatically showing 1 part of jquery accordion on page load instead of initially hiding all parts
I have the following Javascript code which controls an accordion type set of divs. The set of divs is ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked
Feb 26, 2022
in
Education
by
JackTerrance
javascriptjquery
0
votes
Q: JQuery UI dialog shows without any styles applied
I used the example from here http://jqueryui.com/demos/dialog/#animated to create a dialog box. The ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked
Feb 26, 2022
in
Education
by
JackTerrance
javascriptjquery
0
votes
Q: jquery .hover() error
In the following code, I am attempting to act upon the li element being hovered over. HTML: foo ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked
Feb 26, 2022
in
Education
by
JackTerrance
javascriptjquery
0
votes
Q: Reason to use older versions of jQuery? [closed]
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked
Feb 23, 2022
in
Education
by
JackTerrance
javascriptjquery
0
votes
Q: Reason to use older versions of jQuery? [closed]
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked
Feb 23, 2022
in
Education
by
JackTerrance
javascriptjquery
0
votes
Q: Reason to use older versions of jQuery? [closed]
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked
Feb 23, 2022
in
Education
by
JackTerrance
javascriptjquery
0
votes
Q: How to set attachment compulsory for Imagebutton in javascript
I have a field as Image. I want to set it compulsory on button click event in javascript. Hereis ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked
Jul 14, 2022
in
Education
by
JackTerrance
javascriptjquery
0
votes
Q: How do I use Javascript to locate by X-Y Coordinates in my browser?
I'm trying to make it so when a user scrolls down a page, click a link, do whatever it is they ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked
Mar 12, 2022
in
Education
by
JackTerrance
javascriptjquery
0
votes
Q: JavaScript Loop Inside Loop Issue
I have loop inside loop like this: var len = bolumlerUnique.length; function bolumleriGonder() { for (i ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked
May 27, 2022
in
Education
by
JackTerrance
javascriptjquery
...