Questions tagged [jquery-context]

16 questions
11
votes
1 answer

jQuery .closest default context

The documentation for jquery's closest says the following: .closest( selector [, context ] ) ... context Type: Element A DOM element within which a matching element may be found. If no context is passed in then the context of the jQuery…
James Montagne
  • 77,516
  • 14
  • 110
  • 130
6
votes
1 answer

getContext error using chartjs

I am following this tutorial [chart.js][1] and I get this error and this line var ctx = $("#myChart").get(0).getContext("2d"); where $("#myChart") stands for
throws this error Uncaught TypeError:…
user1611830
  • 4,749
  • 10
  • 52
  • 89
2
votes
4 answers

jQuery context slows down search

Possible Duplicate: Performance of jQuery selector with context In the jQuery DOCS it says By default, selectors perform their searches within the DOM starting at the document root. However, an alternate context can be given for the search…
Jack
  • 10,943
  • 13
  • 50
  • 65
1
vote
2 answers

What is the second argument in this jquery select statement?

I have seen it here. What is meant by tbl in the following statement? What does it imply? var rows = $('tr', tbl);
Solace
  • 8,612
  • 22
  • 95
  • 183
1
vote
0 answers

Jquery Context undefined

I am trying to implement the jquery context in my website and it keeps telling me that $.contextMenu is undefined. My Code as follows:
keith Spiteri
  • 259
  • 1
  • 6
  • 22
1
vote
1 answer

I want to get all content of a div using jquery

I want to get all content of a div using jquery.
Muhammad Shahzad
  • 9,340
  • 21
  • 86
  • 130
1
vote
3 answers

Set datePicker to think it's a day in the future

By default, if we say {minDate: 4} in the options, the minimum selected date will be four days from Today. Is it possible to change the date() to be set in the future? so, say we have a second date picker but we want the second date to assume that…
Philll_t
  • 4,267
  • 5
  • 45
  • 59
0
votes
1 answer

Using custom context menu for cytoscape.js nodes

I am trying to use this context menu javascript library but can't seem to get it to trigger when a node is right clicked. I tried implementing the basic demo and that works, so I have the necessary js on the page. I added it to the left click of a…
Tophat Gordon
  • 699
  • 2
  • 9
  • 22
0
votes
2 answers

J-Query Context Menu updating via Knockout call

We are implementing a rather complex single page application and decided to use the "Jquery-context-menu" toolbox. However, we have a fundamental question, and after two days of searching, and reading stuff on the web we are somewhat out of…
0
votes
1 answer

Conflict with twitter bloodhound with jQuery Validation plugin

I'm using twitter's bloodhound suggestion engine, following is the code snippet I'm using // instantiate the bloodhound suggestion engine var searchData = new Bloodhound({ datumTokenizer: function (d) { return…
Mahesh.D
  • 1,691
  • 2
  • 23
  • 49
0
votes
0 answers

Why is my jquery object changing context?

I am comparing on mousedown event two elements but they are false because of the context property: console.log(this, opt.selectedNode); [circle, prevObject: x.fn.x.init[1], context: undefined, jquery: "2.0.3", constructor: function, init:…
shuji
  • 7,369
  • 7
  • 34
  • 49
0
votes
1 answer

Please explain context for the offset function in this jQuery code

I'm trying to set up some cool effects with jQuery waypoints. But I'm not very good with javascript/jQuery. I'm more familiar with PHP. The waypoint code provides a trigger events based on page scrolling. In the code below, I've used their "sticky"…
Buttle Butkus
  • 9,206
  • 13
  • 79
  • 120
0
votes
3 answers

Using _self so I always can have object context

What is the proper way to use _self to always have access to an object? Is using _self ok, or is it bad practice? I want a good way to get at myObject's attributes and methods, even from functions that aren't called in myObject's context. There are…
Don P
  • 60,113
  • 114
  • 300
  • 432
0
votes
1 answer

Calling jQuery's ready() with plugin context

My plugin allows you to specify a callback in its options. The plugin may run before the DOM is ready, but I need to make sure the callback only runs once the DOM is ready, so I'm wrapping the callback.call() within a $( document ).ready()…
Tom Auger
  • 19,421
  • 22
  • 81
  • 104
0
votes
1 answer

jquery bind context mismatch

I've got a HTML menu option, which I bind a click handler in jQuery: var xyz = { getMainContainerSelector: function () { return '.container#main'; }, bindMenuOptions: function () { $('#menu_outcome_list').bind('click',…
ducin
  • 25,621
  • 41
  • 157
  • 256
1
2