All Questions
49
questions
0
votes
0
answers
31
views
Jquery Tricky object detection
I am calling a variable o from a function getStuff(o) ;
o can be a value --> 12456 or
o is an object of type HTMLTableRowElement (in that case a tr with id="whatever number 123...")
I ...
1
vote
3
answers
40
views
How to include 2 different Variables as Property and Value for a third Variable in Javascript or jQuery
var A = $(this).attr("id") //result is a string
var B = $(this).attr("id") //result is another string from a different id
var C = {
A: B //I want to use A as Property and B as Value
};
when ...
0
votes
0
answers
71
views
How to access and print JavaScript object property values?
I am trying to access the value of object property 'cols' and it throws undefined.
What's wrong with the code?
$(function() {
$('body').dialog(function(input) {
setTimeout(function() {
...
1
vote
0
answers
90
views
Check external links for rel attribute and expand it with "noopener"
I have the following concern:
I select external links via jQuery and give them an attribute target="_ blank". After doing this, I select all elements with target="_ blank". Then I would like to check ...
2
votes
2
answers
93
views
Javascript JQuery Property Scope
I am reading Javascript for Kids by Nick Morgan as a beginner, and I produced the following JavaScript code -
var Car = function(x,y) {
this.x = x;
this.y = y;
}
Car.prototype.draw = ...
1
vote
1
answer
56
views
Unable to access object property of state object in state modification method (TypeError)
I'm working on a text analyzer in jQuery that returns word count, unique word count, average word length, and average sentence length.
I had it working (at least halfway, up to the unique word count ...
0
votes
0
answers
24
views
Accessing Element Object Properties
(function($) {
$.fn.exampleObj = function(options) {
var defaults = [
label: "example",
value: false
];
options = $.extend(defaults, options);
this....
0
votes
1
answer
59
views
Using one function to update an object value used by another function using jquery?
I am writing a quiz app that references an object with values, everything is working well, even though this is beginner code. Specifically, I want the first question to be replaced by the second ...
1
vote
1
answer
36
views
Javascript object property doesn't return correct length
I dynamically clone an element using jQuery and ask an object to return its length, but it returns 1 every time. Please see fiddle:
https://jsfiddle.net/gatzkerob/x5xd2x7q/3/
<span class="count"&...
0
votes
1
answer
82
views
Comparing two objects woth themselves and each other
I am a very new programmer, and im not used to things more complex than a few if else statements or some light DOM traversing.
With the help of stackoverflow I've created a test for an RPG website im ...
0
votes
0
answers
69
views
Access unknown javascript object property by variable
I have a javascript object literal operating as a "class". It has a "settings" object. In that settings object, there's a key called "username" which is also an object that contains two properties: ...
0
votes
2
answers
171
views
how to call to the anonymous array in the objects property jquery?
I use a constructor to create an object
function player(name,state,score,marker,combination) {
this.name = name;
this.state = state;
this.score = score;
this.marker = marker;
this....
0
votes
1
answer
40
views
Convert string in array format to array
I have an object structured like.
{
details[0][test1]: "text1"
details[0][test2]: "text2"
details[0][test3]: "text3"
details[0][test4]: "text4"
}
What I want is to convert the properties ...
1
vote
2
answers
118
views
JavaScript: automatically updating the length property
This is not actually a jQuery question, but jQuery does something I would like to be able to do with other objects.
I notice that jQuery returns the number of elements using the .length property. ...
0
votes
2
answers
49
views
How to extract object properties that are stored in an array in jQuery and place them into another variable
I am trying to extract object properties from an array of objects and store them in a variable that will be added to an HTML object. What is currently happening when I execute this just creating the ...