Linked Questions

23 questions linked to/from What does $(function() {} ); do?
1 vote
4 answers
3k views

I am using the flot library for producing plots. The examples given on the website all have their javascript code written like this: <script> $(function() { ... ... ... plot ... }); ...
LZOO's user avatar
  • 123
0 votes
1 answer
1k views

Why is this simple global variable not working inside a function var test_1 = "None"; $(function(){ console.log(test_1) }) I am getting the result Undefined
1 vote
3 answers
276 views

Possible Duplicate: What does $(function() {} ); do? what exactly does the following syntax mean? $(function() {..} as in $(function () { $(".add_folder").click(function () { Does it means ...
Elad Benda's user avatar
-6 votes
4 answers
160 views

Saw this syntax in a code example: <script> $(function () { function fun1(event) { ... } function fun2(event) { ... } }); </script> Question is what the $(...
Xin's user avatar
  • 575
0 votes
1 answer
123 views

My Shopify store uses Ajax call's to add products to the cart and jQuery to update the front-end. I recently installed infinite-ajax-scroll but this brought some issues. The store gets "ajaxified" by ...
narzero's user avatar
  • 2,309
0 votes
2 answers
96 views

I find the following code in an html document: <script type="text/javascript"> $(function () { ... }); I cannot see any intrinsic events like onload = and would like to know how ...
skvery's user avatar
  • 356
0 votes
0 answers
32 views

Not very fluent in JavaScript or jQuery for front-end dev. Let's say I have this code: $("#foo").click(function (event) { console.log("single click"); return false; }); $(&...
0 votes
0 answers
26 views

I'm sorry if this is a stupid question, but I really don't know :( Consider the code below: function myTogglerFunc() { $("h1").toggleClass("fave"); } $(function () { $("#...
PanPan's user avatar
  • 165
0 votes
1 answer
3k views

I'm pretty new to web programming. Looking for a jQuery function I found something like: jQuery(function($) { $('#EleId1').click(function () { //do stuff } $('#EleId2').click(...
genespos's user avatar
  • 3,321
0 votes
1 answer
2k views

In Chrome console: $('.table-responsive').width(); //working $('.table-responsive')[0].scrollWidth; //working In code while rendering HTML: $('.table-responsive').width(); //working $('.table-...
zarpio's user avatar
  • 7,368
2 votes
3 answers
801 views

I have the following Jquery function: $( document ).ready(function() { $(function() { $('select[name="CPUmenu"]').change(function(e) { let socket = $(this).val(); $...
-2 votes
4 answers
300 views

What is the difference between $(function() { $(".some").click(function() { ... }); }); and $(".some").click(function() { ... }); I know from here that $(function() is ...
Hele's user avatar
  • 1,588
0 votes
2 answers
330 views

I'm very new to jQuery, but from what I've read, this doesn't make sense to me. Here is my code: $(function() { function grid() { $("#main").hide(); } }); <html> ...
0 votes
1 answer
457 views

Using Ruby on Rails for my framework. I have written code to create a chessboard. My HTML elements that I have being created by JavaScript disappear when I first navigate to the page with the ...
0 votes
1 answer
203 views

I feel like I've only ever seen this here on SO, but I can't seem to find any documentation on it. The code I am talking about is stuff like this: $(function foo(){ alert('foo'); }); Is there ...
lbstr's user avatar
  • 2,842

15 30 50 per page
1
2