@Adrian.S For the record, you're not really in the process of learning javascript, you seem to be in the process of simply learning how to use the jQuery library... anyways, the answer you're looking for is: $(".post-reaction.pull-right.fav").attr("href", "your-new-link-here");
Oh wait, you don't want to change the href attr, you want to change the html inside of it
You're question's code isn't clear enough. Which is the element that needs to change?
Add an ID to the element that you want to change, then do $("#myElement").html(parseInt($(#myElement).html()) + 1);
@GGB667 Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
I'm using node.js for the first time. I wanted to run a tiny example to check syntax but I guess I'm using it wrong. I tried: node -e function isUndefined(x) { var u; return x === u; }; isUndefined(y);
But I get unexpected end of input.
I need double quotes around that?
Seems to work.
node -e "console.log(typeof x === 'undefined');" gives true.
node -e "var x; function isUndefined(x) { typeof x === 'undefined' }; console.log(isUndefined(x));" //gives undefined
You're not returning anything from isUndefined() so its return value is implicitly undefined. Use return to return a value. I don't know about the reference error, though. You're going to have to post the full error message.
node -e "var x; function isUndefined(y) { return typeof y === 'undefined' }; console.log(isUndefined(x)); x = 1; console.log(isUndefined(x));" //YEA!!!
Yea, undefined does need to be in quotes.
user1596138
> JavaNoober I wish there was more to me than what currently is. Living is no longer about enjoying the trip, but a survival race. I simply feel outdated.
@GGB line breaks in commands aren't acceptable. They end the argument. You can't even use the filename "file with spaces" without escaping or using quotes in cmd or bash or any other terminal afaik
user1596138
It's not Node. It's your command arguments. The delimiter is whitespace
@GarrettKadillak Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
My code is very basic
HTML:
<div class="blog cf">
<div class="left_article_content">
<img width="100" height="100" src="http://placehold.it/100x100" alt="test">
</div>
<div class="right_article_content">
<h1>Test Header</h1>
<p>
This is a test Thi...
monners, I'm asking why chrome ignores the system file preferences to open the text file inside itself. I'd understand if it was a PDF cause there's a plugin for that.
Hi this is a simple question. I was wondering is there any different when you declare something like this. Thanks
selectedData[key](val)
and
selectedData[key] = val
Question from three.js beginner. What should I look for when I want to make the 3D model of person to be more chubby? I tried mesh.scale but it resizes whole object I would like to resize just on few parts on y axes. and please.. mc donalds isnt way to go..
It does everything, though it does have a steep learning curve
Took me a while to get practical with it, so don't be too discouraged
You can make animated videos using blender, which would ultimately be a lot easier (and better looking) than if you tried to do the same using three.js