http://stackoverflow.com/q/29283660
has answer: http://stackoverflow.com/a/29296916
accepted answer: http://stackoverflow.com/a/29296916
answer count: 1
has title: touching a modified file using touch and watch with grunt
type: AnsweredQuestion
tagged with: watch
has body: The title may be contradictory but let say i have a software (s1) WYSIWYG but this software is not really WYSIWYW (what you see is what you write), when editing the source file and saving, the software is not updating the result frame. However if another software (s2) is touching the file, s1's result frame is updated and now what you see is what you get (some kind of trick ye..). I am using grunt-contrib-watch to watch a certain set of files, let say it is s2 in my scenario. When I edit a being-watched file in s1, i want the watcher to execute a task that touches this file as well so s1 is showing the result. this is basically the code i want : module.exports = function (grunt) { grunt.initConfig({ touch: { src: "the being-saved '.cf' file" // how can I reference this file ? }, watch: { files: ['**/*.cf'], tasks: ['touch'] } }); grunt.loadNpmTasks('grunt-touch'); grunt.loadNpmTasks('grunt-contrib-watch'); }; when i edit and save a .cf file I want the watcher to execute the touch task touching the .cf file that has just been saved. How can I do that ?
type: Question
tagged with: javascript
tagged with: gruntjs
tagged with: touch
score: 0

http://stackoverflow.com/comment/137520170
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29291020
has text: Are you sure this problem is in any way related to PHP?
score: 0

http://stackoverflow.com/comment/46878782
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29344672
has text: In the `lineFunction` try getting rid of the `x` and `y` before the `function (d)`

http://stackoverflow.com/comment/53632781
score: 0
type: Comment
comment on: http://stackoverflow.com/a/32886796
has text: Doesn't affect the answer, are you sure? An end tag for a line break? It's an error! Now most browsers handle this error in a similar way, so you may not see much difference, but that doesn't mean it's not an error! And the problem is, I see so many people do that these days, and I'm afraid they're all copying each other.
type: AnswerComment

http://stackoverflow.com/q/29241779
has comment: http://stackoverflow.com/comment/46690370
has comment: http://stackoverflow.com/comment/46689936
score: 0
answer count: 2
has title: Redirect page when form submits
has answer: http://stackoverflow.com/a/29241903
has comment: http://stackoverflow.com/comment/46689658
has comment: http://stackoverflow.com/comment/46690320
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46689638
has comment: http://stackoverflow.com/comment/46690341
tagged with: http://stackoverflow.com/tag/html
has body: How do I redirect page after the form submit in below situation. &lt;form action="URL" method="post" id="myForm"&gt; &lt;input type="text" name="name"&gt; &lt;input type="submit"&gt; &lt;/form&gt; So when above form submits, do below. The problem is that I can't add events on the form. &lt;script&gt; setTimeout(function(){ window.parent.location="/thank-you/"; },1000); &lt;/script&gt;
has comment: http://stackoverflow.com/comment/46690128
has answer: http://stackoverflow.com/a/29242167
tagged with: forms
type: Question
has comment: http://stackoverflow.com/comment/46689999
tagged with: javascript

http://stackoverflow.com/comment/46787085
type: AnswerComment
has text: Yes it is because service are singleton. API documentation is a good place to start https://docs.angularjs.org/guide/services.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29293509

http://stackoverflow.com/q/29333017
has comment: http://stackoverflow.com/comment/46855025
has answer: http://stackoverflow.com/a/29335934
accepted answer: http://stackoverflow.com/a/29335934
has comment: http://stackoverflow.com/comment/128133721
has comment: http://stackoverflow.com/comment/126968202
has answer: http://stackoverflow.com/a/67248634
linked to: http://stackoverflow.com/q/208105
has comment: http://stackoverflow.com/comment/116805223
has answer: http://stackoverflow.com/a/44829966
has answer: http://stackoverflow.com/a/56965946
has comment: http://stackoverflow.com/comment/106500008
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/128119493
has comment: http://stackoverflow.com/comment/46855028
has answer: http://stackoverflow.com/a/72773591
possible better answer: http://stackoverflow.com/a/35120903
has answer: http://stackoverflow.com/a/37955717
has answer: http://stackoverflow.com/a/68473908
has comment: http://stackoverflow.com/comment/128262586
downvote count: 1
type: Question
tagged with: ecmascript-6
has answer: http://stackoverflow.com/a/76974329
has answer: http://stackoverflow.com/a/35120903
has comment: http://stackoverflow.com/comment/46855157
has comment: http://stackoverflow.com/comment/73024863
has answer: http://stackoverflow.com/a/77140785
tagged with: javascript
score: 164
answer count: 11
has answer: http://stackoverflow.com/a/70145826
has comment: http://stackoverflow.com/comment/73024074
has comment: http://stackoverflow.com/comment/46856091
has comment: http://stackoverflow.com/comment/73024883
has comment: http://stackoverflow.com/comment/46855080
has title: ECMAScript 6 class destructor
favorite count: 0
upvote count: 165
linked to: http://stackoverflow.com/q/22566307
has body: I know ECMAScript 6 has constructors but is there such a thing as destructors for ECMAScript 6? For example if I register some of my object's methods as event listeners in the constructor, I want to remove them when my object is deleted. One solution is to have a convention of creating a destructor method for every class that needs this kind of behaviour and manually call it. This will remove the references to the event handlers, hence my object will truly be ready for garbage collection. Otherwise it'll stay in memory because of those methods. But I was hoping if ECMAScript 6 has something native that will be called right before the object is garbage collected. If there is no such mechanism, what is a pattern/convention for such problems?

http://stackoverflow.com/a/29346801
downvote count: 0
has comment: http://stackoverflow.com/comment/46879874
type: Answer
has comment: http://stackoverflow.com/comment/46879990
score: 3
upvote count: 3
has body: It's because you're adding to the string #imgAvatar so the numbers will be converted to strings as well, and it's really read as "#imgAvatar" + "1" + "1". Use parentheses to create a block where the numbers can be added up before they are added to the string var loopVar = 1; alert( '#imgAvatar' + ( (+loopVar) + 1 ) ); Whenever the addition operator is used with a string, all other values will be converted to strings as well FIDDLE
answers question: http://stackoverflow.com/q/29346771
has comment: http://stackoverflow.com/comment/46879955

http://stackoverflow.com/a/29276444
answers question: http://stackoverflow.com/q/29275362
type: Answer
has body: Try out below Code, which copies data from textbox to TextArea: $("#textArea").append("\n * " + $("#textBox").val()); Working Demo
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29275362

http://stackoverflow.com/a/29294711
upvote count: 4
downvote count: 0
has comment: http://stackoverflow.com/comment/46785548
score: 4
has comment: http://stackoverflow.com/comment/46785470
type: AcceptedAnswer
has body: Angular relies on a thing called the "digest cycle" to pick up any changes. The thing that triggers that digest cycle is calling $scope.$digest() or $scope.$apply(). For most of the built-in Angular directives, they already trigger a digest cycle for you. A watch listener function, for example, that gets executed if the watched expression changes, is executed during the digest cycle when a change is detected. However, for anything not part of Angular, such as a jQuery event occurring, you need to "tell" Angular about it. Which means calling $scope.$apply() yourself.
accepted answer of: http://stackoverflow.com/q/29294606
answers question: http://stackoverflow.com/q/29294606
has comment: http://stackoverflow.com/comment/46785398
type: Answer

http://stackoverflow.com/a/29238572
type: Answer
answers question: http://stackoverflow.com/q/29237407
has body: Apparently, I had my script out of the Content Template, moved it in with the existing code and it works !
score: 0

http://stackoverflow.com/comment/46831757
comment on: http://stackoverflow.com/a/29320107
has text: Please read my question. It will not do anything fine. In this scene tooltip of its parent div will execute.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/29353990
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has comment: http://stackoverflow.com/comment/46893352
type: UnansweredQuestion
upvote count: 1
tagged with: css
has body: I have a FAQ page with about 30 questions in a click on question to expand answer kind of format. All of them have anchor tags because we want to be able to direct users to that specific question. The first ten questions work fine. When I click on the link to the question (Eg: www.faqs.com#Question5), question 5 lines up at the top of the page. However, the last 10 questions do not come to the top. The page scrolls to the bottom and stops. I can see that the page is trying to push the question to the top but because of the lack of white space below it is unable to do so. I do not want to add extra white space at the bottom but is there a way to make all the anchor tags work in a way that it pushes the questions to the top? I hope the scenario is clear. Unfortunately I am not allowed to point to the page or I would have. Any help is much appreciated :)
has comment: http://stackoverflow.com/comment/46893110
has comment: http://stackoverflow.com/comment/46893058
answer count: 0
score: 1
has comment: http://stackoverflow.com/comment/46898574
has title: FAQ anchor tags do not push questions to the top due to lack of space at the bottom
type: Question
downvote count: 0
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/46899083
type: AnswerComment
comment on: http://stackoverflow.com/a/29351080
type: Comment
score: 0
has text: @KenFyrstenberg, your fiddle runs in FF36. It's "In-Development" for Internet Explorer (or whatever they want to call it next): https://status.modern.ie/svgforeignobjectelement. The fiddle does not run in current Chrome, although it does run in older Chromes (fex, v27) As to Chrome, I keep seeing posts about "bugs related to foreignObject" so I'm not sure if your fiddle doesn't currently work in Chrome because they aren't supporting foreignObject or because they can't get it to work.

http://stackoverflow.com/a/29240712
type: Answer
accepted answer of: http://stackoverflow.com/q/29240675
upvote count: 4
answers question: http://stackoverflow.com/q/29240675
type: AcceptedAnswer
downvote count: 0
score: 4
has body: $('a[data-toggle=tab]').click(function(){ alert(this.id); }); Tab One Tab Two Tab Three

http://stackoverflow.com/comment/46699500
has text: Sure thing. There's lots of other ways to show an element, such as $( "#box" ).slideDown(3000); Check out http://api.jquery.com/category/effects/ for a list. If you feel my answer was helpful, you may wish to click the check and accept it.
type: AnswerComment
comment on: http://stackoverflow.com/a/29247050
score: 0
type: Comment

http://stackoverflow.com/comment/46732030
has text: @Grundy sorry i didnt drop everything in there just the code around it, it would have to be called, I can try and whip up a fiddle with it working
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29264525

http://stackoverflow.com/q/29253095
has title: How to change client side validation message?
has comment: http://stackoverflow.com/comment/46711811
has comment: http://stackoverflow.com/comment/46713053
has body: I have a datetime field in my model which should be validated: [DateValidation(ErrorMessage = "AccDate should be greater or equal to the current date")] public DateTime? AccDate { get; set; } DateValidation is a hand made class: public class DateValidation : ValidationAttribute, IClientValidatable { public DateValidation() { } protected override ValidationResult IsValid(object value, ValidationContext validationContext) { if (validationContext.ObjectInstance is OrderModel) { var model = validationContext.ObjectInstance as OrderModel; if (model.EndDate == null &amp;&amp; model.AccDate.HasValue) { if (model.RecDate.HasValue &amp;&amp; model.AccDate.Value &lt; model.RecDate.Value) { var errorMessage = "AccDate should be greater than the RecDate"; return new ValidationResult(errorMessage); } if (model.AccDate.Value &lt; DateTime.Now) { var errorMessage = "AccDate should be greater or equal to the current date"; return new ValidationResult(errorMessage); } } } return ValidationResult.Success; } public IEnumerable&lt;ModelClientValidationRule&gt; GetClientValidationRules(ModelMetadata metadata, ControllerContext context) { var rule = new ModelClientValidationRule(); rule.ErrorMessage = FormatErrorMessage(metadata.GetDisplayName()); rule.ValidationType = "datevalidator"; yield return rule; } } And also I have a datevalidator.js file: $.validator.unobtrusive.adapters.add("datevalidator", [], function (values) { values.rules['datevalidator'] = { }; values.messages['datevalidator'] = values.message; }); $.validator.addMethod("datevalidator", function (value, element, params) { if (element.id == "AccDate") { if (value) { var nowDate = new Date($.now()); var accDate = new Date(value); var recDate = new Date($("#RecDate").val()); if (accDate &lt;= recDate) { return false; } if (accDate &lt; nowDate) { return false; } return true; } } }); By itself everything is working. Validation prevent me from doing unaceptable action BUT, I have an issue. My error message which I receive is …
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46709786
linked to: http://stackoverflow.com/q/26542509
tagged with: asp.net-mvc
has comment: http://stackoverflow.com/comment/46712189
tagged with: javascript
type: Question
score: 0
has comment: http://stackoverflow.com/comment/46712637
tagged with: validation
tagged with: jquery
tagged with: unobtrusive-validation
has comment: http://stackoverflow.com/comment/46710681
has comment: http://stackoverflow.com/comment/46711991
has comment: http://stackoverflow.com/comment/46710906

http://stackoverflow.com/comment/46741250
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29270060
score: 0
has text: You can achieve this with help of jQuery check this [fiddle](http://jsfiddle.net/8cxw4joe/)

http://stackoverflow.com/a/29252499
answers question: http://stackoverflow.com/q/29251589
accepted answer of: http://stackoverflow.com/q/29251589
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 2
upvote count: 2
has body: When you just change $el.dblclick to $el.click it will also handled with $(document).click(submitChanges); event. So $el.click handler should return false to stop further event processing. $el.click(function (e) { // &lt;---------- click tempVal = $el.html(); $edittextbox.val(tempVal).insertBefore(this).bind('keypress', function (e) { var code = (e.keyCode ? e.keyCode : e.which); if (code == 13) { submitChanges(); } }).select(); $el.hide(); $(document).click(submitChanges); return false; // &lt;------------------------ stop further event handling }); http://jsfiddle.net/zvm8a7cr/

send
type: Tag
tags question: http://stackoverflow.com/q/29331243
tags question: http://stackoverflow.com/q/29231606
tag name: send

http://stackoverflow.com/comment/46898803
type: QuestionComment
has text: @KevinBrown Unfortunately, CSS2Pdf is glitchy (it chokes on Google Maps and glitches with FusionCharts), but otherwise, it's what I'm looking for. If you wish to submit this as an answer, I'll accept it, since it does technically what I asked for :)
score: 0
comment on: http://stackoverflow.com/q/29267729
type: Comment

http://stackoverflow.com/a/29276938
type: Answer
answers question: http://stackoverflow.com/q/29244620
score: 0
has body: Try like this $("#txtId").html(data.customerId); $("#txtName").html(data.customerName); $("#txtDob").html(data.customerDob);

http://stackoverflow.com/comment/46664198
comment on: http://stackoverflow.com/q/29227624
score: 0
type: QuestionComment
type: Comment
has text: @RoryMcCrossan, its just a stnadard select. But the `hyphens(-)` are dynamically appended while building the select menu. user can not select any value using keyboard.

http://stackoverflow.com/comment/46821370
comment on: http://stackoverflow.com/q/29314190
score: 0
type: Comment
type: QuestionComment
has text: @Fratyr It's not an issue, i think you must read/understand about the concept of using controllers

http://stackoverflow.com/q/29336147
has comment: http://stackoverflow.com/comment/46860676
tagged with: reactjs
tagged with: react-native
has title: Using require('react-native') as this["require"]('react-native') doesn't work
tagged with: javascript
upvote count: 1
favorite count: 0
type: UnansweredQuestion
has body: I am trying to write React Native code in ScalaJs and this brings multiple limitations, one of them is that ScalaJs generates requirements in the following form: this.React = this["require"]("react-native"); When I run the app, I get import errors for the react-native and the BatchedBridge modules. If I change the line above to: this.React = this.require("react-native"); Then it works! I tried this in the Hello World app and saw the same results. The diff I get between the 2 bundle files is: < __d('AwesomeProject/index.ios',[],function(global, require, requireDynamic, requireLazy, module, exports) { /** --- > __d('AwesomeProject/index.ios',["react-native/Libraries/react-native/react-native"],function(global, require, requireDynamic, requireLazy, module, exports) { /** 943c943 < var React = this["require"]('react-native'); --- > var React = this.require('react-native/Libraries/react-native/react-native'); After this diff, there are also tons of code added to the version that works (some imports done by the preprocessor?) Is there a way to have the packager also work with the first line?
answer count: 0
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/46862215
has comment: http://stackoverflow.com/comment/46860935
type: Question

http://stackoverflow.com/comment/46902717
type: AnswerComment
type: Comment
score: 0
has text: To narrow down where the problem is, try sending these simple examples, without the CURL. Then you ought to be able to tell if the problem is in your JavaScript, or your CURL session. I tested this example before I posted it and it worked just fine. If you find the problem is in your CURL session, post another question about it.
comment on: http://stackoverflow.com/a/29358989

http://stackoverflow.com/q/29372729
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29373333
has title: Is it possible to use relative paths for directive templateUrls in AngularJS when bundling with Browserify?
score: 3
downvote count: 0
has body: I'm working on a web application using AngularJS, with Browserify to bundle my JS files into a single bundle for use in the page. Currently my structure is something like this: app |-index.html |-index.js |-bundle.js |-components |-module1 |-index.js |-module1.directive.js |-module1.html Because the bundled javascript file ends up in the app folder, my directives end up looking something like this: module.exports = angular.module('module1.directive', []) .directive('moduleDirective', function() { return { restrict: 'E', templateUrl: './components/module1/module1.html' ); }); This works well enough in general, but the path could potentially get rather long if the project gets complex enough after more developers get involved and it's somewhat harder to move directives around when they're defined this way (changing the templateUrl path is an extra step that's relatively easy to forget). What I'd like to know is, is there a way for me to use a relative path in the templateUrl so that Browserify will be able to resolve it correctly when bundling the files? EDIT: If it helps, I could make this work if I could find a way to get the ORIGINAL file path for the script that's being bundled inside the module itself, but I don't know if Browserify supports that.
type: Question
tagged with: javascript
upvote count: 3
tagged with: browserify
answer count: 1
favorite count: 0
tagged with: angularjs

http://stackoverflow.com/comment/46946050
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29365247
score: 0
has text: @Grundy, Ah because of the `crossOrigin`. But I don't use external images in my project(all included in the project), it's just that the structure of the object is weird when the block codes is inside the `onload` but outside it works...

http://stackoverflow.com/q/29262805
favorite count: 0
has answer: http://stackoverflow.com/a/61755959
upvote count: 5
has title: Verify an element is not existing using webdriver and selenium
type: UnansweredQuestion
downvote count: 1
has body: I'm using WebdriverIO and selenium-standalone to write automated tests that will verify that various parts of our user interface are working. I need to verify that an element is not present on the page. For example, our system allows staff to track various types of resources that we are referring clients to. If a staff member accidentally adds the wrong resource, they can delete it, and I want to verify that the resource was actually deleted and is not present on the page. WebdriverIO has an .isExisting() property, but no way to check if something is not existing (or not visible/present). I could also use Chai assertions to figure this out, but haven't delved into that world yet. Here's a snippet of my code: it('I can delete a resource from a need', function() { return driver .moveToObject('span.ccx-tasklist-task') // Hover mouse over resource .click('div.referral-controls a.btn.dropdown-standalone') // Click Resource drop-down .click('div.referral-controls.ccx-dropdown-menu-selected li &gt; a') // Delete Resource .pause(2000); // Need to Verify that resource was deleted here Any advice? Let me know if you need more information.
tagged with: chai
tagged with: selenium
has answer: http://stackoverflow.com/a/30370079
has comment: http://stackoverflow.com/comment/46728487
type: Question
has comment: http://stackoverflow.com/comment/46729013
tagged with: javascript
score: 4
has answer: http://stackoverflow.com/a/29264454
tagged with: webdriver-io
has answer: http://stackoverflow.com/a/29282926
tagged with: automated-tests
answer count: 4

http://stackoverflow.com/comment/46876640
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29345184
type: Comment
has text: Hi, thanks for the reply. You are right. I just have one question: I couldnt print the value in alert for each item. I am using this code: $('.response_is_accepted').each(function(i, obj) { alert($(this).val()); }); It is iterating 3 times and thats what i want, but its not just showing the val.

http://stackoverflow.com/comment/46869399
comment on: http://stackoverflow.com/q/29341069
has text: Can't you `explode('|', $tbl);` to have an array and then do `foreach($array as $tbl) { }`?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29253506
type: Answer
accepted answer of: http://stackoverflow.com/q/29253474
has body: If you use a LinkedHashMap, the order will be kept (i.e., by default, the keys will always be iterated in the same order they were inserted into the Map).
upvote count: 4
has comment: http://stackoverflow.com/comment/46710639
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29253474
downvote count: 0
score: 4

http://stackoverflow.com/a/29222653
has comment: http://stackoverflow.com/comment/46654303
upvote count: 5
has body: I would assume this would depend on the player you are using for video. I would check the documentation which refers to that video player. A simple Google search got me these results: https://www.google.com/search?q=detect+if+full+screen+video+jquery&amp;ie=utf-8&amp;oe=utf-8 // Entering fullscreen mode $('video#my-video').bind('webkitfullscreenchange mozfullscreenchange fullscreenchange', function(e) { var state = document.fullScreen || document.mozFullScreen || document.webkitIsFullScreen; var event = state ? 'FullscreenOn' : 'FullscreenOff'; // Now do something interesting //alert('Event: ' + event); if (event == "FullscreenOn"){ //do something when fullscreen on } });
type: Answer
has comment: http://stackoverflow.com/comment/46654281
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29222476
score: 5
answers question: http://stackoverflow.com/q/29222476
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46654127
has comment: http://stackoverflow.com/comment/46655078
has comment: http://stackoverflow.com/comment/46698129

http://stackoverflow.com/q/29270488
tagged with: pointers
has title: Javascript: Passing Address of Array Element into Function
score: 0
answer count: 3
has body: In FORTRAN and C++, the address of a specific array element can be passed into a function. For example, in the main routine, WA1 is a work array of size 25 and offset is an integer variable that indicates the offset from the 0-index. Say offset is presently 6. The declaration of the sub-routine might look like the following: void Array_Manip1(double* WorkArray1){ . . . When the sub-routine is called in the main program, the call might look like this: Array_Manip1(&amp;WA1[offset]); By doing this, I can index WorkArray1 within the sub-routine starting at the 0-index, but knowing it is actually WA1[6]. e.g. - for (int i = 0; i &lt; 19; ++i) WorkArray1[i] = whatever computation is required. To do this in Javascript, I suppose the full array could be passed in to the sub-routine, plus one more variable to hold the offset. And then within the sub-routine, the offset would have to be added to the array index value. e. g. - for (int i = 0; i &lt; 19; ++i){ WorkArray1[offset + i] = whatever computation is required. But now I am passing one more variable into the sub-routine, and have to add the offset to the array index each time through the loop. Is there a better way to do this in Javascript? Is there a way to imitate C++'s ability to pass the address of a specific array element into a function?
has answer: http://stackoverflow.com/a/29273290
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46758528
has answer: http://stackoverflow.com/a/29272946
has answer: http://stackoverflow.com/a/29270981
type: Question
tagged with: function
tagged with: arrays
tagged with: javascript

http://stackoverflow.com/q/29363128
linked to: http://stackoverflow.com/q/21626137
tagged with: objective-c
type: UnansweredQuestion
tagged with: webview
has title: Evaluate Javascript in WebView iOS
has body: I am displaying the WebPage in my UIWebView. I want to detect a button click on that page. code for that button in HTML file with Java Script is as follow: document.getElementById("fileUploadSection").innerHTML = ' '; Problem: How can I detect the button is clicked & my native method is called? Thanks in advance
has comment: http://stackoverflow.com/comment/47003436
type: Question
tagged with: iphone
tagged with: ios
answer count: 1
has answer: http://stackoverflow.com/a/31465061
tagged with: javascript
score: 0

http://stackoverflow.com/a/29301757
score: 0
has comment: http://stackoverflow.com/comment/46799323
type: Answer
has body: Yes, the issue is your indentation. This should be correct: doctype html html(lang="en") head title= title link(rel="stylesheet", href="css/bootstrap.css", type="text/css") link(rel="stylesheet", href="css/main.css", type="text/css") body(style="background-image:url(/images/background.jpg)") div(class="container", id="visualization") script. var options = {}; var data = new vis.DataSet(options); var container = document.getElementById('visualization'); new vis.Timeline(container, data, options); You can also simplify div(class="container", id="visualization") to #visualization.container
answers question: http://stackoverflow.com/q/29301568

http://stackoverflow.com/comment/46887343
has text: What? You already have your variable(s) assigned! The array!
score: 1
type: QuestionComment
comment on: http://stackoverflow.com/q/29350737
type: Comment

http://stackoverflow.com/comment/46769256
comment on: http://stackoverflow.com/q/29285651
type: Comment
type: QuestionComment
score: 0
has text: @AustinMullins, no i can't , sorry , i donwloaded the file like like 2 months ago , and it was part of the bootstrap 3.2 , i have the files locally , but i guess its not enuf proof .

http://stackoverflow.com/q/29362556
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46912552
has comment: http://stackoverflow.com/comment/46909274
score: 3
has comment: http://stackoverflow.com/comment/46928199
has comment: http://stackoverflow.com/comment/46927638
upvote count: 3
has comment: http://stackoverflow.com/comment/46926264
has comment: http://stackoverflow.com/comment/46925188
has answer: http://stackoverflow.com/a/61195897
type: Question
has body: I am using a third party lib with the following custom attribute directive: angular.directive('snapDrawer', function () { 'use strict'; return { restrict: 'AE', ... So if the attribute "snap-drawer" is found in an HTML element the directive implementation has a match and fires, for example: &lt;div snap-drawer&gt;&lt;/div&gt; I am using Angular 1.3 which has an "AllOrNothing" approach to ng-attr where if the value conditional is undefined then the attribute does not render like so: &lt;div ng-attr-snap-drawer="{{data.addSnapDrawer}}"&gt;&lt;/div&gt; 100% fact this works, the value of data.addSnapDrawer in my controller is undefined and the snap-drawer attr does not render in the DOM I have verified that Angular 1.3 does this AllOrNothing approach with ng-attr here: What is the best way to conditionally apply attributes in Angular? (take a look at Mathew Foscarini's answer) BUT what does render in the DOM is: &lt;div ng-attr-snap-drawer="{{data.addSnapDrawer}}" class="snap-drawer snap-drawer-left" style=""&gt;&lt;/div&gt; So, unbelievably, the angular.directive('snapDrawer') is matching to "ng-attr-snap-drawer". How can this be, I am really shocked that AngularJS, in all its glory, has a bug like this. I cannot find anything online. I cannot set snap-drawer="false" I need it to not appear in the DOM, which I achieved by upgrading from Angular 1.2 to 1.3.
has comment: http://stackoverflow.com/comment/46931657
linked to: http://stackoverflow.com/q/15696416
has comment: http://stackoverflow.com/comment/46910287
answer count: 1
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/46927725
has title: Custom Attribute Directive being matched to ng-attr-myCustomAttribute
has comment: http://stackoverflow.com/comment/46926057

http://stackoverflow.com/q/29253916
type: Question
tagged with: angular-ngmodel
upvote count: 2
has body: I have question about ng-model in ng-repeat. I prepared example. https://jsfiddle.net/0ff3btv2/1/ Basicaly I can create ng-model in input and delete its value by clicking button like this: &lt;ul ng-controller="deleteCtrl"&gt; &lt;li&gt; &lt;input type="text" ng-model="valueModel" placeholder="enter value" /&gt; &lt;input type="button" ng-click="deleteValue()" value="Delete" /&gt; &lt;/li&gt; &lt;/ul&gt; However when use ng-repeat and do the same, value can't be deleted. &lt;ul ng-controller="deleteRepeatCtrl"&gt; &lt;li ng-repeat="element in data"&gt; &lt;input type="text" ng-model="element.valueModel" placeholder="{{element.firstName}}" /&gt; &lt;input type="button" ng-click="deleteRepeatValue()" value="Delete"/&gt; &lt;/li&gt; &lt;/ul&gt; Can you explain?
has answer: http://stackoverflow.com/a/29254039
answer count: 2
has answer: http://stackoverflow.com/a/29253968
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: angularjs
tagged with: angularjs-ng-repeat
score: 2
type: UnansweredQuestion
has title: Delete ng-model input value in ng-model

http://stackoverflow.com/comment/46666845
comment on: http://stackoverflow.com/a/29226779
type: Comment
has text: I don't know how to change
score: 0
type: AnswerComment

http://stackoverflow.com/a/29311060
answers question: http://stackoverflow.com/q/29310996
score: 0
has body: You've missed few bits please see demo below angular.module("app", []).controller("myCtrl", myCtrl); function myCtrl($scope) { $scope.people = [{ name: "My domain" }, { name: "Cobranza" }, { name: "contact_base_esp" }, { name: "Domain 1" }, { name: "Domain dos" }, { name: "Este es un template" }, { name: "Contact base esp" }]; $scope.selected = $scope.people[0]; }
type: Answer

http://stackoverflow.com/a/29263109
has comment: http://stackoverflow.com/comment/46729110
has comment: http://stackoverflow.com/comment/46782903
has body: Basically, I think what you want to do is bind the input to a "new entry" scope variable, and then push the value of that variable to your array when the user clicks "Push To". Here's what I mean: In controller: $scope.changeMyArray = function() { $scope.myArray.push($scope.newEntry); $scope.newEntry = ""; } In HTML: &lt;input ng-model="newEntry"&gt; But actually: Really what you want is a way to edit the contents of an array via text, and have updates to that array from elsewhere also update the text. This is actually pretty simple since browsers come with a JSON library. I implemented it by starting with a known pair of objects: $scope.myArray = []; $scope.myArrayString = "[]"; That way you can update the string via ngModel: &lt;input ng-model="myArrayString"&gt; Watch for changes on this model to update the actual array: $scope.$watch("myArrayString", function() { $scope.myArray = JSON.parse($scope.myArrayString); }); Then update the string in the changeMyArray function: $scope.changeMyArray = function() { $scope.myArray.push("b"); // Or whatever you would like to add here $scope.myArrayString = JSON.stringify($scope.myArray); } Experiment in my fork of the Fiddle. What's going on? The variable $scope.myArray is an object, and any object in Javascript can be converted to a string (most complex objects end up as the unhelpful "[object Object]"). Arrays will actually display their contents when converted to a string, so binding an array to HTML via {{myArray}} is pretty straightforward. However, the reverse conversion is not as simple. In general, a text input can't be bound to an array in a two-way fashion as we'd like. The solution, then, is to use an intermediary variable to hold the string value, and use $scope.$watch to keep the two values in sync.
has comment: http://stackoverflow.com/comment/46760053
has comment: http://stackoverflow.com/comment/46730385
type: Answer
upvote count: 4
has comment: http://stackoverflow.com/comment/46782673
downvote count: 0
has comment: http://stackoverflow.com/comment/46728317
has comment: http://stackoverflow.com/comment/46729386
answers question: http://stackoverflow.com/q/29262843
has comment: http://stackoverflow.com/comment/46729171
score: 4
accepted answer of: http://stackoverflow.com/q/29262843
has comment: http://stackoverflow.com/comment/46730228
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46764029
has comment: http://stackoverflow.com/comment/46728577

http://stackoverflow.com/q/29240002
score: 5
linked to: http://stackoverflow.com/q/596216
upvote count: 5
has title: Why does 4294967295 >> 24 == -1 in Javascript?
tagged with: javascript
answer count: 2
has answer: http://stackoverflow.com/a/29240162
downvote count: 0
has comment: http://stackoverflow.com/comment/46686210
favorite count: 0
has body: I am calculating luminosity in Javascript using: luminosity = (5036060 * backgroundColor.red + 9886846 * backgroundColor.green + 1920103 * backgroundColor.blue) &gt;&gt; 24; For the case where the color is white, ie all 3 RGB values are 255, I am getting a result of -1. I tested explicitly and in Javascript the value "4294967295 >> 24" is -1. Why?
possible better answer: http://stackoverflow.com/a/29240162
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29240077
type: Question
accepted answer: http://stackoverflow.com/a/29240077

http://stackoverflow.com/q/29340921
upvote count: 1
favorite count: 0
has body: I have a strange problem. I use AngularJS and HighChart, when I try to define a click event by hightchart: point: { events: { click: function () { $scope.currentRunId = XXX; $scope.showDetailModal(); } } } And in function showDetailModal I define: $scope.showDetailModal = function (){ $scope.$apply(function(){ console.log($scope.currentRunId); }); $("#detailModal").modal('show'); } I find that although the console can log the value of $scope.currentRunId correctly, the binding value in the html sometimes can be updated, sometimes can't: {{currentRunId}} the value in the h4 tag sometimes is correct sometimes is null sometime is a cached value.. Can some one help?
tagged with: angularjs
downvote count: 0
type: UnansweredQuestion
score: 1
has title: AngularJS $apply sometimes doesn't trigger to update $scope values in the html tag within {{}}, when using the click event in hightchart.
has answer: http://stackoverflow.com/a/29341019
type: Question
tagged with: highcharts
answer count: 1
tagged with: javascript

http://stackoverflow.com/q/29343373
upvote count: 1
type: Question
linked to: http://stackoverflow.com/q/15181417
tagged with: javascript
tagged with: jquery
downvote count: 0
tagged with: asp.net
favorite count: 0
tagged with: ajax
type: UnansweredQuestion
has body: Hi i have the same problem with this ticket but the only difference that the textbox is inside gridview that is not visible in pageload, it only visible when particular condition will be met. How to make only some text in a text-box read-only while allowing the rest to be edited ive tried the code below but it doesnt run correctly any help will be well appreciated thank you so much! $(document).ready(function () { var GVMaintainReceiptMaster = document.getElementById('&lt;%= gvData.ClientID%&gt;'); alert("test"); for (var rowId = 1; rowId &lt; GVMaintainReceiptMaster.rows.length; rowId++) { var txtbx = GVMaintainReceiptMaster.rows[rowId].cells[0].children[0]; var readOnlyLength = $(txtbx).val().length; $(txtbx).on('keypress, keydown', function (event) { if ((event.which != 37 &amp;&amp; (event.which != 39)) &amp;&amp; ((this.selectionStart &lt; readOnlyLength) || ((this.selectionStart == readOnlyLength) &amp;&amp; (event.which == 8)))) { return false; } }); alert(txtbx.value); }
answer count: 0
score: 1
has title: How to make first 3 letter of text in a text-box read-only inside of dynamic gridview asp.net

http://stackoverflow.com/comment/46793257
type: QuestionComment
score: 1
has text: If my comment did not work, how come you accepted an answer that uses my comments?
comment on: http://stackoverflow.com/q/29298609
type: Comment

http://stackoverflow.com/q/29238293
upvote count: 2
tagged with: local-storage
tagged with: css
type: AnsweredQuestion
score: 2
tagged with: cookies
has body: I found some nifty JavaScript that inverts the colors on my website and I found a way to persist the state using localStorage. Here is what the persisting logic looks like: var isNight = localStorage['night'] || false; if (isNight) { // $html is shorthand for my jQuery selected &lt;html&gt; tag $html.addClass('night'); else { $html.removeClass('night'); } // further down I have code that adjusts `localStorage` everytime my button is clicked, inverting the colors This works, however it looks very clunky as you can clearly see the CSS change every time you refresh the page. Is there a way to make the CSS stay how it was last changed? What I'm thinking I have to do is manually edit the CSS file through JavaScript so that when the page loads it is already in there, but I'm not sure how to approach this.
has title: Persisting CSS state using JavaScript's `window.cookie`
accepted answer: http://stackoverflow.com/a/29238462
type: Question
tagged with: javascript
tagged with: jquery
answer count: 1
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/29238462

http://stackoverflow.com/comment/46950575
has text: @Andrei V , yes it has. nodeName="IMG". However, proved code cannot change src: $(."file_source").attr("src", "D:\1.png");
score: 0
comment on: http://stackoverflow.com/q/29369506
type: QuestionComment
type: Comment

http://stackoverflow.com/q/29314252
has answer: http://stackoverflow.com/a/29314409
answer count: 1
has comment: http://stackoverflow.com/comment/46821504
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46822005
has body: I'm using TweenMax script to add styles to a div on scrolling. I want to have different styles on different page resolutions. So, I added an if condition as a solution. How can I use a variable to avoid adding extra codes inside the if condition?! I added $direction and only direction as a variable, but, it seems that it doesn't work. if (($(window).width() &lt;= 900) &amp;&amp; ($(window).width() &gt;= 409)) { var $direction = 'left'; } else { var $direction = 'top'; } $(".softwares").children(".row").each(function(a) { $(this).delay(150 * a).fadeIn(0, function() { TweenMax.to($(this), .3, { $direction: 45 * a, opacity: 1, ease: Back.easeOut }) }) }); I looked upon lot's of questions in stackoverflow, and I used [] to come to a solution, but I could not make it work. I don't want the code to be like: (the extra code which I want to avoid) $(".softwares").children(".row").each(function(a) { if (($(window).width() &lt;= 900) &amp;&amp; ($(window).width() &gt;= 409)) { // opacity: 1, ease: Back.easeOut are extra codes in both conditions var options = {left: 45 * a, opacity: 1, ease: Back.easeOut}; } else { var options = {top: 45 * a, opacity: 1, ease: Back.easeOut}; } $(this).delay(150 * a).fadeIn(0, function() { TweenMax.to($(this), .3, options) // use options object here }) });
tagged with: jquery
tagged with: gsap
linked to: http://stackoverflow.com/q/11508463
type: Question
tagged with: css
has title: how to make a working variable for object key in jquery to avoid extra codes
score: 0

http://stackoverflow.com/q/29336660
has answer: http://stackoverflow.com/a/29336705
type: Question
has comment: http://stackoverflow.com/comment/46861451
has title: Execute JavaScript in window.open() generated window
has body: My problems seem to be the following: I have this code: function openNew(theImage){ var theHTML = " EditWindow Crop it! "; var editWindow = window.open("","","width=1000 height=800 titlebar=0"); editWindow.document.write(theHTML); } which opens a new window with the "theHTML"-Strings content. And as you can see, it also adds the script "windowScript.js" to the new window. windowScript.js: window.onload = function(){ document.getElementById("cropMe").addEventListener("click",removeImg); alert("it began"); } function removeImg(){ var imgTAG = document.getElementById("removeable"); var imgURL = imgTAG.getAttribute("src"); if(imgTAG.parentNode) imgTAG.parentNode.removeChild; } but this script is never executed. If I check the script via the inspector of chrome, it tells me it's there and it even detects if there are errors in it, but it does not get executed whatsoever. Is there a workaround to get the script running in the new window, without injecting it via editWindow.document.write(); ? Thank you in advance for your support!
tagged with: javascript
score: 0
answer count: 2
tagged with: window.open
has answer: http://stackoverflow.com/a/39399061
accepted answer: http://stackoverflow.com/a/29336705
possible better answer: http://stackoverflow.com/a/39399061
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46861864

http://stackoverflow.com/q/29243938
has comment: http://stackoverflow.com/comment/46694505
tagged with: image
has title: Output image attributes to console using Javascript?
score: 0
answer count: 2
tagged with: console
has comment: http://stackoverflow.com/comment/46693774
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29244333
has answer: http://stackoverflow.com/a/29244496
tagged with: attributes
has body: How can I output image attributes to console using Javascript (src, alt, width, height)? I have managed to get "src" and "alt" to spit out, but am a bit dumbfounded with width/height. Any help would be greatly appreciated. Attribute Reporter Log Attributes
type: Question
tagged with: javascript

http://stackoverflow.com/q/29263253
type: UnansweredQuestion
score: 3
answer count: 0
upvote count: 3
tagged with: google-chrome-devtools
type: Question
tagged with: reactjs
has comment: http://stackoverflow.com/comment/46732355
downvote count: 0
tagged with: javascript
has title: How to debug order of events in React component
has comment: http://stackoverflow.com/comment/46775973
tagged with: keyboard-events
has body: I have the following React component in which I'm trying to re-implement my own syntax highlighting and autocomplete features to build a text editor*. When I don't use the chrome debugger, both onInput and onKeydDown events fire, but when I place a debugger breakpoint on the onInput (which fires first), the onInput event appears to never fire. Why? And What can I do about it? // Box containing my forula (which consists of text, transformed into many &lt;span&gt;s); var SyntaxBox = React.createClass({ //basically a custom eventing system _emitChangeEvent: function(){ console.log('changeEvent'); // &lt;-- this will always log. But if a place a chrome breakPoint here, and then step through, the onInput event is never fired. var node = this.refs.formulaEditor.getDOMNode(); var formula = node.textContent; //this is the concat of just the content of all child elements. see https://developer.mozilla.org/en-US/docs/Web/API/Node.textContent if(this.props.onChange &amp;&amp; formula !== this.props.formula){ this.props.onChange({ target: { value: formula.replace(/\u00a0/g, " ") //strip out and replace &amp;nbsp (unicode 00a0) with normal spaces } //this value gets sent to listeners in the parent component }); } }, _captureNavigation: function(event){ console.log('keyDown'); // &lt;-- this is always logged unless a breakpoint is placed in the console.log above in _emitChangeEvent. Why? And is there a workaround? }, render: function() { return ( &lt;div&gt; &lt;div&gt; &lt;code onInput={this._emitChangeEvent} onKeyDown={this._captureNavigation} contentEditable ref='formulaEditor' dangerouslySetInnerHTML={{__html: this.state.html}}&gt; &lt;/code&gt; &lt;/div&gt; &lt;/div&gt; ); }, componentWillReceiveProps: function(nextProps){ var formulaString = nextProps.formula; var formattedHTML = highlighter.colorise(formulaString); //external helper function that does syntax highlighting by taking a string and returning styles span tags this.setState({html: formattedHTML}); } }); *I haven'…
favorite count: 0

javascript
tags question: http://stackoverflow.com/q/29308063
tags question: http://stackoverflow.com/q/29262639
tags question: http://stackoverflow.com/q/29245901
tags question: http://stackoverflow.com/q/29246384
tags question: http://stackoverflow.com/q/29340413
tags question: http://stackoverflow.com/q/29269184
tags question: http://stackoverflow.com/q/29327396
tags question: http://stackoverflow.com/q/29249132
tags question: http://stackoverflow.com/q/29230804
tags question: http://stackoverflow.com/q/29348679
tags question: http://stackoverflow.com/q/29365884
tags question: http://stackoverflow.com/q/29284248
tags question: http://stackoverflow.com/q/29322857
tags question: http://stackoverflow.com/q/29256329
tags question: http://stackoverflow.com/q/29336147
tags question: http://stackoverflow.com/q/29253095
tags question: http://stackoverflow.com/q/29249478
tags question: http://stackoverflow.com/q/29321063
tags question: http://stackoverflow.com/q/29346882
tags question: http://stackoverflow.com/q/29301631
tags question: http://stackoverflow.com/q/29307640
tags question: http://stackoverflow.com/q/29360340
tags question: http://stackoverflow.com/q/29326596
tags question: http://stackoverflow.com/q/29291222
tags question: http://stackoverflow.com/q/29232208
tags question: http://stackoverflow.com/q/29323544
tags question: http://stackoverflow.com/q/29244878
tags question: http://stackoverflow.com/q/29220255
tags question: http://stackoverflow.com/q/29276766
tags question: http://stackoverflow.com/q/29249127
tags question: http://stackoverflow.com/q/29355524
tags question: http://stackoverflow.com/q/29327859
tags question: http://stackoverflow.com/q/29369324
tags question: http://stackoverflow.com/q/29328929
tags question: http://stackoverflow.com/q/29330815
tags question: http://stackoverflow.com/q/29299994
tags question: http://stackoverflow.com/q/29276627
tags question: http://stackoverflow.com/q/29299277
tags question: http://stackoverflow.com/q/29331261
tags question: http://stackoverflow.com/q/29267441
tags question: http://stackoverflow.com/q/29286573
tags question: http://stackoverflow.com/q/29242820
tags question: http://stackoverflow.com/q/29340496
tags question: http://stackoverflow.com/q/29226412
tags question: http://stackoverflow.com/q/29276164
tags question: http://stackoverflow.com/q/29288681
tags question: http://stackoverflow.com/q/29231800
tags question: http://stackoverflow.com/q/29228842
tags question: http://stackoverflow.com/q/29243575
tags question: http://stackoverflow.com/q/29339437
tags question: http://stackoverflow.com/q/29299632
tags question: http://stackoverflow.com/q/29319433
tags question: http://stackoverflow.com/q/29250889
tags question: http://stackoverflow.com/q/29312008
tags question: http://stackoverflow.com/q/29335930
tags question: http://stackoverflow.com/q/29347202
tags question: http://stackoverflow.com/q/29234515
tags question: http://stackoverflow.com/q/29276670
tags question: http://stackoverflow.com/q/29339047
tags question: http://stackoverflow.com/q/29260145
tags question: http://stackoverflow.com/q/29255490
tags question: http://stackoverflow.com/q/29233787
tags question: http://stackoverflow.com/q/29263616
tags question: http://stackoverflow.com/q/29228104
tags question: http://stackoverflow.com/q/29355864
tags question: http://stackoverflow.com/q/29255871
tags question: http://stackoverflow.com/q/29286310
tags question: http://stackoverflow.com/q/29232230
tags question: http://stackoverflow.com/q/29344518
tags question: http://stackoverflow.com/q/29271072
tags question: http://stackoverflow.com/q/29227784
tags question: http://stackoverflow.com/q/29267231
tags question: http://stackoverflow.com/q/29262038
tags question: http://stackoverflow.com/q/29321194
tags question: http://stackoverflow.com/q/29340266
tags question: http://stackoverflow.com/q/29243347
tags question: http://stackoverflow.com/q/29366060
tags question: http://stackoverflow.com/q/29316534
tags question: http://stackoverflow.com/q/29247300
tags question: http://stackoverflow.com/q/29334959

http://stackoverflow.com/comment/46897272
comment on: http://stackoverflow.com/a/29236779
score: 0
type: AnswerComment
has text: I checked that I have all the permissions.
type: Comment

http://stackoverflow.com/a/29344058
has comment: http://stackoverflow.com/comment/76879053
type: Answer
score: 6
has body: Edit: function! ESLintArgs() let rules = findfile('.eslintrules', '.;') return rules != '' ? '--rulesdir ' . shellescape(fnamemodify(rules, ':p:h')) : '' endfunction autocmd FileType javascript let b:syntastic_javascript_eslint_args = ESLintArgs() This tries to find a file named .eslintrules and sets --ruledir to its base directory.
downvote count: 0
has comment: http://stackoverflow.com/comment/46875436
upvote count: 6
answers question: http://stackoverflow.com/q/29228575

http://stackoverflow.com/a/29271157
has body: https://jsfiddle.net/kmracozg/3/ I made a change in your jQuery. I added a click handler on the li element. To accomplish scrolling to the particular part of the page you will need to give each div or section an id and link to that particular id, like so: Contact ... ... ... Let me know if you need more clarity!
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29271072

http://stackoverflow.com/q/29254367
has answer: http://stackoverflow.com/a/29627538
has answer: http://stackoverflow.com/a/29627307
has title: Finding the UUID of the device - UniqueDeviceID plugin
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/37444591
has body: Trying to retrieve the Unique device ID of the Device . Using the plugin - UniqueDeviceID When tring to run the following code var exec = require('cordova/exec'); module.exports = { get: function(success, fail) { cordova.exec(success, fail, 'UniqueDeviceID', 'get', []); } }; ` I am getting the following error- "Uncaught ReferenceError: module is not defined" This is indeed defined in cordova.js How do i fix this issue. Thanks in advance
tagged with: cordova
has comment: http://stackoverflow.com/comment/46756811
tagged with: uuid
has comment: http://stackoverflow.com/comment/46759937
upvote count: 2
type: Question
has comment: http://stackoverflow.com/comment/46715655
tagged with: javascript
answer count: 3
score: 2
downvote count: 0
tagged with: phonegap-plugins
favorite count: 0

http://stackoverflow.com/q/29275263
downvote count: 0
has answer: http://stackoverflow.com/a/29275405
tagged with: javascript
possible better answer: http://stackoverflow.com/a/29275323
has comment: http://stackoverflow.com/comment/46749531
has title: AngularJS execute controller function in directive template
favorite count: 0
tagged with: angularjs
upvote count: 2
accepted answer: http://stackoverflow.com/a/29275405
has body: I made a custom directive with AngularJS, and in the template I called a function in controller, but it didn't work. thanks for your help :) myapp.controller("myCtrl", function($scpoe){ $scope.myfunction= function(){ alert("123"); }; }); myapp.directive("ngSelectbox", function(){ return { restrict: "E", scope: { items: "=", myfunction: "&" }, template: " " + " " + " {{item.TYPE}} " + " " + " " }; });
tagged with: directive
score: 2
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/29275323
answer count: 2

http://stackoverflow.com/a/29361177
has comment: http://stackoverflow.com/comment/46906281
has comment: http://stackoverflow.com/comment/46906259
has body: $(document).on('click', '.divClassSelector', function(){ var numberDiv = $(this).attr("numberDiv"); alert(numberDiv); }); or $('body').on('click', '.divClassSelector', function () {...}) you forgot $ var numberDiv = (this).attr("numberDiv"); to var numberDiv = $(this).attr("numberDiv");
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/46906429
has comment: http://stackoverflow.com/comment/46906940
answers question: http://stackoverflow.com/q/29361140

http://stackoverflow.com/comment/46791666
comment on: http://stackoverflow.com/a/29281929
has text: The problem was inside JQuery each loop.... by returning true inside each loop, it doesnt exit ShowPerson function by returning false value. instead it just exits each function and returns false.... always!
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/29319006
tagged with: angular-google-maps
tagged with: google-maps
linked to: http://stackoverflow.com/q/27308371
downvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
has title: Angular-google-maps passing information from info window to parent scope
tagged with: angularjs
has body: Is this possible? Having poured over the documentation, there are extremely few, if any, work arounds to call functions outside of the scope of the marker. My hope is to add some ng-click features, but given that the div inside the infowindow is ng-non-bindable, it prevents implementing any directives. If there isn't a work around, does anyone know if I can use the standard javascript google maps package inside an angular application and support it with jquery? P.S. If anybody has figured out a way to stylize the info window, please let me know. That has been frustrating. My goal is to do something like: {{name}} {{address}} Where confirmAppointment() would take the the appointment information and post a resource request to the server. All help is appreciated. Thanks.
type: UnansweredQuestion
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/46831587
has answer: http://stackoverflow.com/a/32077834
type: Question

http://stackoverflow.com/comment/46716303
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/29256797
has text: @m is that all present in a single line?
type: Comment

http://stackoverflow.com/a/29277579
answers question: http://stackoverflow.com/q/29277232
has comment: http://stackoverflow.com/comment/46753933
has body: Try to add this CSS .carousel-inner { position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%; }
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29277232
type: Answer

internet-explorer-9
tag name: internet-explorer-9
tags question: http://stackoverflow.com/q/29283910
type: Tag

http://stackoverflow.com/comment/46811319
score: 1
comment on: http://stackoverflow.com/q/29308600
type: Comment
type: QuestionComment
has text: @jaumard Well, duh, that's why it's happening. Renaming `length` to `myLength` returns the actual value. I hadn't actually thought about renaming that! I have to remind myself of always using better words for my names. You can post your comment as an answer if you want. I think it might be useful in the remote chance someone finds themselves in this situation. Haha, thanks for pointing that out!

http://stackoverflow.com/a/29307011
answers question: http://stackoverflow.com/q/29306358
accepted answer of: http://stackoverflow.com/q/29306358
type: AcceptedAnswer
type: Answer
score: 0
has body: In Scenario 1, the user of your plugin has both made an element editable, and also made clicking on it navigate away from the current page. That doesn't make much sense, but it's their business. In this situation they can't realistically expect your plugin to run. In Scenario 2, you need to process the click event before it's handled elsewhere. Removing or suppressing existing handlers is not a good idea: it may make other parts of the page fail, and is annoying to your users in any case. Instead, you can make your handler run in the event capture phase like this: editableElement.addEventLister("click", myHandler, true); // note the "true" Now your handler will run before all handlers added using JQuery (and most handlers that people add via any means), which run in the event bubble phase. Note that this technique only works in modern browsers (i.e., not IE &lt; 9). For reference: What is event bubbling and capturing?

http://stackoverflow.com/comment/46819009
comment on: http://stackoverflow.com/a/29312803
has text: Try typing 123456, it will not print 6
type: AnswerComment
type: Comment
score: 1

http://stackoverflow.com/a/29234922
has body: Use !important before ;. See: http://jsfiddle.net/ahfo9cfc/1/ - JS works
has comment: http://stackoverflow.com/comment/46677246
has comment: http://stackoverflow.com/comment/46676170
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29234747

http://stackoverflow.com/comment/46845299
has text: Actually I fixed that in my code only after my post. It still doesnt work @Drakes
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29327365
score: 0

http://stackoverflow.com/a/29296448
has comment: http://stackoverflow.com/comment/46788362
has comment: http://stackoverflow.com/comment/46788424
answers question: http://stackoverflow.com/q/29296325
has body: Use the color property in css I added the line at figure.effect-lexi:hover h2, figure.effect-lexi:hover p { color: red; opacity: 1; -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); } Here is a demo
score: -1
downvote count: 1
type: Answer
upvote count: 0

http://stackoverflow.com/a/29263753
answers question: http://stackoverflow.com/q/29260296
type: Answer
score: 8
has body: Pseudo-elements like :before and :after are handled by CSS, not the DOM. Because of this, you need to take a different approach. What you can do is find the CSS rule responsible for this pseudo-element, and change that. You do this using CSSOM, which is a rather different API, even though you first get access to it from the DOM. Unlike the DOM, CSS rules don't have ids or class names that can be searched for cleanly and quickly, so we have to search through the list of stylesheets and style rules. This can be expensive, so if it's possible to search for it only once, I strongly recommend doing that. Here's a quick-and-dirty way to do that: function getRuleWithSelector(selector) { var numSheets = document.styleSheets.length, numRules, sheetIndex, ruleIndex; // Search through the style sheets. for (sheetIndex = 0; sheetIndex < numSheets; sheetIndex += 1) { numRules = document.styleSheets[sheetIndex].cssRules.length; for (ruleIndex = 0; ruleIndex < numRules; ruleIndex += 1) { if (document.styleSheets[sheetIndex].cssRules[ruleIndex].selectorText === selector) { return document.styleSheets[sheetIndex].cssRules[ruleIndex]; } } } // If we get this far, then the rule doesn't exist. // So the return value is undefined. } var afterSlidingTagRule = getRuleWithSelector('.slidingTag li::after'); console.debug(afterSlidingTagRule); window.addEventListener('DOMContentLoaded', function() { afterSlidingTagRule.style.fontSize = "10px"; }, false); .slidingTag { color: blue; } .slidingTag li { color: green; } .slidingTag li:after { content: "World"; font-size: 32px; } Hello World Once you've got the rule you need, the rest is very similar to working with getComputedStyle(), or with a DOM element's style attribute. The snippet above does it in a DOMContentLoaded event handler, but you should be able to do it at any point once things have loaded. There are a few caveats to be considered with this approach: When you change a CSS rule, that change gets reflected in every element that the r…
downvote count: 0
upvote count: 8

http://stackoverflow.com/q/29259222
has comment: http://stackoverflow.com/comment/46721270
upvote count: 3
has answer: http://stackoverflow.com/a/29261236
has comment: http://stackoverflow.com/comment/46722448
has body: I've built an Angular SPA. Some of my head code looks like this: &lt;!--title--&gt; &lt;title ng-bind="$root.title"&gt;&lt;/title&gt; &lt;!--web--&gt; &lt;meta name="application-name" content="{{$root.site.name}}"&gt; &lt;meta name="description" content="{{$root.page.description}}"&gt; &lt;!--facebook--&gt; &lt;meta property="og:type" content="website"&gt; &lt;meta property="og:title" content="{{$root.page.title}}"&gt; &lt;meta property="og:url" content="{{$root.site.url}}"&gt; &lt;meta property="og:image" content="{{$root.site.url}}/framework/img/brand/facebook.jpg"&gt; &lt;meta property="og:description" content="{{$root.page.description}}"&gt; &lt;!--twitter--&gt; &lt;meta name="twitter:card" content="summary"&gt; &lt;meta name="twitter:title" content="{{$root.page.title}}"&gt; &lt;meta name="twitter:url" content="{{$root.site.url}}"&gt; &lt;meta name="twitter:image" content="{{$root.site.url}}/framework/img/brand/social.jpg"&gt; &lt;meta name="twitter:description" content="{{$root.page.description}}"&gt; &lt;!--routing--&gt; &lt;base href="/"&gt; &lt;meta name="fragment" content="!"&gt; For the purpose of SEO I've set my app to recognise requests with the escaped fragment ?_escaped_fragment_=. When these requests come through, it serves a prerendered version of the page. Does every search bot use the escaped fragment? For example, if I post a link to a page of my SPA on Facebook, will it fetch the prerendered version of the page, or the unrendered version? Facebook should hopefully go to the page, see the fragment meta tag and understand it's an ajax application, then revisit the page with the escaped fragment to receive prerendered content.
has comment: http://stackoverflow.com/comment/46721055
type: Question
accepted answer: http://stackoverflow.com/a/29261236
tagged with: javascript
has title: Do all search bots use escaped fragment?
has comment: http://stackoverflow.com/comment/46721091
has comment: http://stackoverflow.com/comment/46724561
has comment: http://stackoverflow.com/comment/46722855
answer count: 1
tagged with: seo
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/46742051
tagged with: angularjs
tagged with: facebook
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46720798
type: AnsweredQuestion
score: 3

http://stackoverflow.com/comment/46753149
type: AnswerComment
has text: @Arun Suprrisingly, I get 'undefined is not a function' on `.is()`.
score: 0
comment on: http://stackoverflow.com/a/29277140
type: Comment

http://stackoverflow.com/q/29277519
tagged with: javascript
has title: How to get restaurant list from google map by just entering city/town name?
score: 0
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
downvote count: 1
has body: Cannot understand difference between Google Map and Google Places API. Just implemented simple google map code .... JS //City--tested by multiple code ways function getCity() { var x = document.getElementById("home_city_select").value; var xx=$("#home_city_select").val(); //alert(xx); } $(function() { $("#home_city_select").change(function() { alert( $('option:selected', this).text() ); }); }); Here I have to give latitude longitude manually.But this not the correct method.And no one knows latitude and longitude of every cities. But how to write the javascript so that while selecting city name such as "Mumbai" from drop down the map changes and shows restaurant symbols on the map. How to get restaurant names in a list, finds within the selected city. Search by food names. Ultimately what the correct codes needed to implement the above required features?Please provide the codes.
favorite count: 0
has answer: http://stackoverflow.com/a/29277712
accepted answer: http://stackoverflow.com/a/29277712
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29277686
has answer: http://stackoverflow.com/a/29277686
type: Question
answer count: 2
tagged with: google-maps

http://stackoverflow.com/a/29332945
score: 2
answers question: http://stackoverflow.com/q/29323456
has body: With a typical multi process rails setup polling ist your best option. There also 2 alternatives. Websockets and Server Sent Events which can be used with multithreaded or evented (NIO) deploys. In both cases there is long open connection between the browser client and the servier, through which the server can publish updates, the client subscribes to. Server Sent Events are actually pretty easy in rails. Checkout Mini-chat with Rails and Server-Sent Events See also this answer about different types of concurrency models
upvote count: 2
downvote count: 0
type: Answer

http://stackoverflow.com/comment/63186850
type: Comment
type: AnswerComment
has text: @alecxe awesome just tried it, incredibly easy to setup. Pretty much just copied and pasted your code :) thanks
comment on: http://stackoverflow.com/a/29382990
score: 0

http://stackoverflow.com/comment/46841160
comment on: http://stackoverflow.com/q/29323881
score: 0
type: QuestionComment
has text: try this the above fiddle looks broken with spell mistake . http://jsfiddle.net/supercool/LkqTU/23416/
type: Comment

http://stackoverflow.com/comment/46710578
type: AnswerComment
type: Comment
has text: They are protocols nothing more, they're still dependent on what the browser supports and while most "modern" browser will support async loading of script and css some do not. HTML5 provides `async` and `defer` attributes for this very reason. See [Deep dive into the murky waters of script loading](http://www.html5rocks.com/en/tutorials/speed/script-loading/). Just because we use HTML5 doesn't mean this isn't still an issue.
comment on: http://stackoverflow.com/a/29247655
score: 0

http://stackoverflow.com/comment/46757802
comment on: http://stackoverflow.com/q/29279984
type: Comment
type: QuestionComment
score: 6
has text: Please post your code here so it is preserved for future SO visitors.

http://stackoverflow.com/comment/46675592
has text: @Terry: just click on the left side of the div (in a new fiddle from my comment above) until a new row appears. Click on the left side of the second row or the right side of the first one. New element is added to the wrong row.
comment on: http://stackoverflow.com/a/29234455
score: 1
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/46654008
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29222476
has text: The video is not on autoplay. The poster and overlay content serve as an intro to the website, therefore the video is not forced on the user. If the user decides to watch the video via a custom play button, then the video will be played fullscreen. If they decide to exit then they will return to the sites initial state and can continue to navigate the homepage. I simply need to detect when they exit the video, so that I can return things to the initial state.
score: 0

http://stackoverflow.com/comment/46805203
has text: Everything after the (commented out) `console.log` seems not relevant to your question. Please make sure you provide the actual code that actually shows the result -- nothng more. Even your title focuses on the wrong thing.
comment on: http://stackoverflow.com/q/29305341
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46754018
type: AnswerComment
has text: For the container bag only, you will need to put the margin in minus within animate tag. I have edited the answer. see above please. Thanks
type: Comment
comment on: http://stackoverflow.com/a/29275110
score: 1

http://stackoverflow.com/q/29339311
has comment: http://stackoverflow.com/comment/46866189
accepted answer: http://stackoverflow.com/a/29339352
type: AnsweredQuestion
downvote count: 0
tagged with: loops
type: Question
score: 5
has comment: http://stackoverflow.com/comment/46866153
tagged with: arrays
tagged with: javascript
has body: Here in this script cars[i] is used as a condition how is does the program identify weather the condition is true or false and the program stops correctly after it enters the 4th variable in the array ? So the question is : how the program identifies the condition and how is cars[i] a condition. var cars = ["BMW", "Volvo", "Saab", "Ford"]; var i = 0; var text = ""; for (;cars[i];) { text += cars[i] + "&lt;br&gt;"; i++; }
tagged with: while-loop
tagged with: for-loop
answer count: 1
favorite count: 0
upvote count: 5
has title: Javascript ' Array ' and ' Loop ' how can " variable[i] " be a CONDITION
has answer: http://stackoverflow.com/a/29339352

http://stackoverflow.com/a/40952448
type: Answer
upvote count: 14
score: 13
downvote count: 1
has body: The THREE.JS raycaster documentation actually gives all the relevant information that is laid out in these answers as well as all the missing points that may be difficult to get your head around. var raycaster = new THREE.Raycaster(); var mouse = new THREE.Vector2(); function onMouseMove( event ) { // calculate mouse position in normalized device coordinates // (-1 to +1) for both components mouse.x = ( event.clientX / window.innerWidth ) * 2 - 1; mouse.y = - ( event.clientY / window.innerHeight ) * 2 + 1; } function render() { // update the picking ray with the camera and mouse position raycaster.setFromCamera( mouse, camera ); // calculate objects intersecting the picking ray var intersects = raycaster.intersectObjects( scene.children ); for ( var i = 0; i &lt; intersects.length; i++ ) { intersects[ i ].object.material.color.set( 0xff0000 ); } renderer.render( scene, camera ); } window.addEventListener( 'mousemove', onMouseMove, false ); window.requestAnimationFrame(render);` Hope it helps.
answers question: http://stackoverflow.com/q/29366109

http://stackoverflow.com/a/29329461
answers question: http://stackoverflow.com/q/29329367
has body: The error is correct. You're adding the string 'email' to test and then trying to run it as a function. You need to make a small change to your code to call the method using that string: var add_field = function(field, type) { fields[field] = this[type]; } DEMO
accepted answer of: http://stackoverflow.com/q/29329367
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46848772
type: Answer
score: 2
upvote count: 2

http://stackoverflow.com/q/29228015
has title: What is the purpose of escaping these characters? [From Javascript & JQuery book]
tagged with: escaping
score: 0
has answer: http://stackoverflow.com/a/29228115
has comment: http://stackoverflow.com/comment/46662937
answer count: 1
has body: From the Events chapter in the JavaScript and jQuery book by Jon Duckett. Here's the code: var msg = ' close X '; msg += ' System Maintenance '; msg += 'Our servers are being updated between 3 and 4 a.m. '; msg += 'During this time, there may be minor disruptions to service. '; var elNote = document.createElement('div'); elNote.setAttribute('id', 'note'); elNote.innerHTML = msg; document.body.appendChild(elNote); function dismissNote() { document.body.removeChild(elNote); } var elClose = document.getElementById('close'); elClose.addEventListener('click', dismissNote, false); I'm just interested in the beginning bit. Why is \"header\" and \"close\" escaped, while href="#" isn't? I ran the code without escaping, and it still works.
tagged with: javascript
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29228115
type: Question

http://stackoverflow.com/comment/46733761
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29265581
type: AnswerComment
has text: Oops you are correct. I guess I should learn to read more...

http://stackoverflow.com/a/29256875
answers question: http://stackoverflow.com/q/29249675
type: AcceptedAnswer
has body: Yeoman generated Gruntfile uses grunt-usemin for minification. Grunt usemin uses annotations inside html for identifying the files it needs to work upon. Change your following code in index.html with this. Just take the main.js out of the build annotations.
downvote count: 0
type: Answer
score: 1
has comment: http://stackoverflow.com/comment/46746157
upvote count: 1
accepted answer of: http://stackoverflow.com/q/29249675
has comment: http://stackoverflow.com/comment/46734221

http://stackoverflow.com/comment/46866199
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29328029
has text: Yes. Skipping to the next available casper.test.begin block

http://stackoverflow.com/a/29309306
has body: HTML: structure (which boxes are within other boxes) CSS: styling (setting widths, borders, animations) JS: interaction (add click listeners, send JSONs over http://, etc) Target your HTML &lt;div&gt; tag or whatever with DOM selectors: CSS: .someDivClass { width: 80% } #someDivID { left: 0%, right: 20% } JS: var element = document.querySelector(".someDivClass") or var element = document.querySelector("#myID") then element.setAttribute("style", "width:80%"); or element.addEventListener("click", function (e) { alert('hello') }); for example Only one element can have a unique ID id="myDivID", where as many elements can have the same class="myDivClass" defined in their &lt;div&gt; tag (div is the most basic DOM element, and most every DOM element is a div with additional, baked in functionality by default) Good luck!
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29308820

http://stackoverflow.com/comment/46714977
has text: Just added it as an answer for others reference.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29255501
score: 0

http://stackoverflow.com/a/29244284
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46694566
accepted answer of: http://stackoverflow.com/q/29243461
type: Answer
answers question: http://stackoverflow.com/q/29243461
has body: you're really supposed to ask questions in the context of an issue you're having with your existing code and functionality.. not a design feature or tutorial based question. With that said, I'm going to provide an answer and code sample to this because I like to introduce developers (and more particular, DBAs) to bitwise operations. As we can represent state better this way.. That is not to say that my following code is best practice or optimal. var buttons = document.querySelectorAll("button[data-bit"); var sections = document.querySelectorAll("section[data-bit]"); var menuvalue = 0; //0 displays nothing var clrBtn = document.querySelector("button#none"); clrBtn.addEventListener("click", function() { menuvalue = 0; setDisplay(); }); for(var i = 0, max = buttons.length; i < max ; i++) { buttons[i].addEventListener("click", changeValue.bind(null, Math.pow(2, i))); } function changeValue(value) { console.log(value); menuvalue ^= value; //XOR operation assignment (http://msdn.microsoft.com/en-us/library/ie/06f6ta51(v=vs.94).aspx) console.log(menuvalue); setDisplay(); } function setDisplay() { for (var i = 0, max = sections.length; i < max; i++) { console.log("section: %o, menuvalue: %o, result: %o", Math.pow(2, i), menuvalue, (Math.pow(2, i) & menuvalue)); sections[i].style.display = (Math.pow(2, i) & menuvalue) > 0 ? "block" : "none"; } } section { display:none; background-color:whitesmoke; border:0.1em outset whitesmoke; line-height:1.25em; padding:2em; } section[data-bit] { display:none; } button.check { border:0.1em inset whitesmoke; background-color:whitesmoke; } None Menu Item 1 Menu Item 2 Menu Item 3 Menu Item 4 Menu Item 5 This is either the default value, displaying no menu items.. or you could hide this and display nothing! This is the contents of Menu Item 1 This is the contents of Menu Item 2 This is the contents of Menu Item 3 This is the contents of Menu Item 4 This is the contents of Menu Item 5 JsFiddle: Here Handling Combinations: Here
has comment: http://stackoverflow.com/comment/46694493
score: 0
has comment: http://stackoverflow.com/comment/46815826

http://stackoverflow.com/q/29267736
tagged with: javascript
answer count: 1
downvote count: 0
tagged with: text-files
favorite count: 0
linked to: http://stackoverflow.com/q/21213397
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29273395
tagged with: http://stackoverflow.com/tag/html
has title: edit txt file with javascript or html5
score: 1
tagged with: file
upvote count: 1
has body: Please I need help to edit a txt file in client side, I can't find a good method. I need update the data automatic, without confirmation, like it: Update Please help me.
type: Question
has comment: http://stackoverflow.com/comment/46736991

http://stackoverflow.com/comment/51937675
score: 4
has text: Fixed in [tag:firefox] `41`, stable release will be shipped in September 2015.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29242346

http://stackoverflow.com/a/29297070
score: 0
has comment: http://stackoverflow.com/comment/46789688
has body: Here is an easy solution using JQuery UI: add an id to your h2: Dark Chocolate Smoothie change the color of the text using an JQuery UI animation: var timeOffset = 2500; var changeTime = 2500; function changeImage() { if (red) { $("#yourText").animate({ "color": "#fff" }, changeTime, function () { setTimeout(function () { changeImage(); }, timeOffset); }); } else { $("#yourText").animate({ "color": "#f00" }, changeTime, function () { setTimeout(function () { changeImage(); }, timeOffset); }); } red = !red; } setTimeout(function(){changeImage();}, timeOffset); working fiddle NOTE: the set times are not perfect, you might need to experiment a little to figure out the right timing
type: Answer
answers question: http://stackoverflow.com/q/29296325
has comment: http://stackoverflow.com/comment/46789590

http://stackoverflow.com/comment/61184028
comment on: http://stackoverflow.com/a/29329004
type: AnswerComment
score: 1
has text: A bit verbose on the answer, you can combine MultipleValueField and MultipleIntField into one object, but it worked great!
type: Comment

http://stackoverflow.com/comment/47080508
score: 0
type: Comment
has text: We found something which works with galaxy tab stylus S Pen. When touch the screen with S Pen and check the js touch event, we found that radiusX and radiusY are 0, but when you touch it with palm or finger their values are > 0. This can help you
type: AnswerComment
comment on: http://stackoverflow.com/a/29235293

http://stackoverflow.com/q/29285897
linked to: http://stackoverflow.com/q/2933737
has comment: http://stackoverflow.com/comment/46769369
tagged with: object
has answer: http://stackoverflow.com/a/60765759
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/62328579
upvote count: 1298
has title: Difference between ( for... in ) and ( for... of ) statements?
score: 1297
type: Question
has answer: http://stackoverflow.com/a/76256581
has answer: http://stackoverflow.com/a/41910537
has answer: http://stackoverflow.com/a/74639253
tagged with: for-loop
has answer: http://stackoverflow.com/a/48266691
has body: I know what is a for... in loop (it iterates over the keys), but I have heard about for... of for the first time (it iterates over values). I am confused about for... of loop. var arr = [3, 5, 7]; arr.foo = "hello"; for (var i in arr) { console.log(i); // logs "0", "1", "2", "foo" } for (var i of arr) { console.log(i); // logs "3", "5", "7" // it doesn't log "3", "5", "7", "hello" } I understand that for... of iterates over property values. Then why doesn't it log "3", "5", "7", "hello" instead of "3", "5", "7"? Unlike for... in loop, which iterates over each key ("0", "1", "2", "foo") and also iterates over the foo key, the for... of does not iterate over the value of foo property, i.e., "hello". Why it is like that? Here I console for... of loop. It should log "3", "5", "7","hello" but it logs "3", "5", "7". Why? Example Link
has comment: http://stackoverflow.com/comment/46770070
tagged with: arrays
has answer: http://stackoverflow.com/a/77093350
tagged with: javascript
has comment: http://stackoverflow.com/comment/86170545
has answer: http://stackoverflow.com/a/70109009
has comment: http://stackoverflow.com/comment/123552683
has answer: http://stackoverflow.com/a/70271104
has comment: http://stackoverflow.com/comment/46769411
has answer: http://stackoverflow.com/a/50015996
has answer: http://stackoverflow.com/a/76076134
has answer: http://stackoverflow.com/a/51178368
has answer: http://stackoverflow.com/a/59398970
linked to: http://stackoverflow.com/q/500504
answer count: 21
downvote count: 1
has answer: http://stackoverflow.com/a/53704055
has answer: http://stackoverflow.com/a/73214699
accepted answer: http://stackoverflow.com/a/29286412
has answer: http://stackoverflow.com/a/69939148
favorite count: 0
possible better answer: http://stackoverflow.com/a/41910537
has answer: http://stackoverflow.com/a/54247184
has answer: http://stackoverflow.com/a/50905660
has answer: http://stackoverflow.com/a/52854849
has answer: http://stackoverflow.com/a/29286412
has answer: http://stackoverflow.com/a/42472446

http://stackoverflow.com/a/29248932
answers question: http://stackoverflow.com/q/29248828
upvote count: 1
downvote count: 0
type: Answer
has body: You can either use parseInt() in your serviceFilter or multiply the string value by one, to convert it to integer. First option: &lt;script&gt; angular.module('calculate', []) .filter('serviceFilter', function( ){ return function(amount){ var chargeInt; if(angular.isUndefined(amount)){ charge = '0'; }else{ if(isNaN(amount)){ charge = 'Invalid Data !!!'; }else{ if(amount &lt; 1000){ charge = '200'; }else{ charge = '500'; } } } chargeInt = parseInt(charge); if (isNaN(chargeInt)) return charge; else return chargeInt; }; }); &lt;/script&gt; Second option: &lt;div ng-app="calculate"&gt; Amount: &lt;input type='text' data-ng-model='amount' name = 'amount' placeholder = 'Enter amount' &gt; Charge: &lt;input type='text' name = 'charge' ng-bind="charge" value="" &gt; Total: &lt;input type='text' value= " {{(amount)+ 1 * (amount | serviceFilter)}}" name = 'total' &gt; &lt;/div&gt;
score: 1

http://stackoverflow.com/comment/46771444
score: 2
comment on: http://stackoverflow.com/q/29287065
type: QuestionComment
has text: Your mistake is comparing strings instead of numbers...
type: Comment

http://stackoverflow.com/a/29239298
accepted answer of: http://stackoverflow.com/q/29239123
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46689470
has comment: http://stackoverflow.com/comment/46688097
type: Answer
has body: function createMarker(latlng, name, address, venueId, nameId) { // this is what you change to update the infowindow var html = "&lt;a href='http://www.quakerquest.org/meeting_place_details/index.php?VenueID="+venueId+"&amp;nameID="+nameId+"'&gt;" + name + "&lt;/a&gt;" var marker = new google.maps.Marker({ map: map, position: latlng }); google.maps.event.addListener(marker, 'click', function() { infoWindow.setContent(html); infoWindow.open(map, marker); }); markers.push(marker); } Now I'm assuming you want the link to be dynamic and come from the xml data, so you would have to add that parameter to createMarker() and then dynamically change the href attribute.
has comment: http://stackoverflow.com/comment/46687104
has comment: http://stackoverflow.com/comment/46688046
answers question: http://stackoverflow.com/q/29239123
has comment: http://stackoverflow.com/comment/46687995
has comment: http://stackoverflow.com/comment/46688317
score: 0

http://stackoverflow.com/q/29327338
has body: I can't figure out how to translate the following AppleScript into JXA (JavaScript for Automation under Mac OS X Yosemite) : tell application id "com.omnigroup.OmniGraffle6" tell canvas of front window make new line at end of graphics with properties {point list:L, draws shadow:false} end tell end tell Here is what I've tried but this fails while executing the last line with error "AppleEvent handler failed" : app = Application('OmniGraffle') pt1 = app.Point({x:1,y:2}) pt2 = app.Point({x:1,y:2}) L = [] L.push(pt1) L.push(pt2) line = app.Line({pointList:L}) app.documents[0].canvases[0].lines.push(line) Can anyone help ? Thanks, Aurelien
has answer: http://stackoverflow.com/a/34497700
type: UnansweredQuestion
has title: JXA & OmniGraffle
tagged with: applescript
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/32973154
tagged with: javascript
score: 0
tagged with: javascript-automation
tagged with: osx-yosemite

http://stackoverflow.com/q/29334264
has comment: http://stackoverflow.com/comment/46857363
type: Question
has body: I have a silly fiddle that I am stuck with, I am trying to take the beginning number and double it every time the x2 button is hit. Instead of this behavior I am getting [object HTML ParagraphElement] returned instead. I am re-learning JavaScript so I am trying to work with just JavaScript, no frameworks etc... var inputVal = document.getElementById("input").value; var inputEl = document.getElementById("input"); var doubleButton = function () { var sum = 0; Number(input); sum = input + input; inputEl.value = input; inputEl.innerText = input; } var boom = function () { alert("BOOM!!!!! Dont you know you should never press the big red button") } document.getElementById("btnAdd").addEventListener("click", doubleButton, false); document.getElementById("btnRed").addEventListener("click", boom, false); Enter a number and click the x2 button to have it doubled 5 x2 BIG RED BUTTON here is the link to my actual fiddle http://jsfiddle.net/jpb4815/uynfc1ky/16/ Why is my code returning object and not the number, I thought that I had taken care of that with the number function by converting the input from a string to a number. I have tried a variety of different settings in fiddler the onload, no wrap in body. I have changed the code a multitude of times. I could do it in jQuery but I really want just plain vanilla JavaScript.
tagged with: javascript
has answer: http://stackoverflow.com/a/29334441
has comment: http://stackoverflow.com/comment/46857477
answer count: 2
accepted answer: http://stackoverflow.com/a/29334459
linked to: http://stackoverflow.com/q/7114956
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46857292
possible better answer: http://stackoverflow.com/a/29334441
type: AnsweredQuestion
has title: Why am I getting [object HTML ParagraphElement] Returned instead of my number
has comment: http://stackoverflow.com/comment/46857594
score: 0
has answer: http://stackoverflow.com/a/29334459

http://stackoverflow.com/a/29338394
answers question: http://stackoverflow.com/q/29336995
type: Answer
downvote count: 0
score: 1
has body: Here's a cleaned up version of the idea in your answer (derived from my comments). Here's a partial list of the improvements: Turned it into a function so all code is scoped local Declared all variables used with var Made it generic with passed in arguments for code reuse Avoided stack build-up of actual recursion Put some repeated references into local variables Used Array.slice trick to make array copy Since a script tag can only have a src= or .innerHTML (not both), made it into an if/else Combine some common code into one place Switched to .textContent from .innerHTML since all we want is text Code: function insertHtmlAndExecutescripts(elem, html, cls) { elem.innerHTML = html; // make actual array of all ajax-script tags var scripts = Array.prototype.slice.call(elem.getElementsByClassName(cls), 0); var i = 0; function loadScripts() { if (i &lt; scripts.length) { var cloneScript = document.createElement('script'); var tag = scripts[i++]; if (tag.src) { cloneScript.src = tag.src; // * For external scripts, wait 'till they load cloneScript.onload = function () { loadScripts(); } document.body.appendChild(cloneScript); } else if (tag.innerHTML) { cloneScript.textContent = tag.textContent; document.body.appendChild(cloneScript); // avoid stack build-up of actual recursion setTimeout(function() { loadScripts(); }, 0); } // remove the original embedded script tag (this is likely not necessary) tag.parentNode.removeChild(tag); } } loadScripts(); }
has comment: http://stackoverflow.com/comment/46864936
upvote count: 1
has comment: http://stackoverflow.com/comment/46864849
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29336995
has comment: http://stackoverflow.com/comment/46864957
has comment: http://stackoverflow.com/comment/46864877

http://stackoverflow.com/q/29339046
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/29339234
tagged with: jquery
has body: I have a div which has two text's that is Text1 and Text2. When the site loads Text1 should fade out and Text2 should be shown. something like modal popup with auto close. Welome to my site Company Name I have google for 3 hours can anybody suggest me how to implement or any plugin is available to achieve this ? I am using bootstrap. Also I need to make it work upto IE 7 Update : i have come with a small solution http://codepen.io/anon/pen/RNdYqbm once he issue is fixed will will be adding css animation to it. I need a help where once first text disappears second text should stay? Could any body fix this.
has comment: http://stackoverflow.com/comment/46870894
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
upvote count: 0
has comment: http://stackoverflow.com/comment/46865905
type: Question
has title: Animated text fade in fade out
score: -2
has comment: http://stackoverflow.com/comment/46865729
accepted answer: http://stackoverflow.com/a/29339234
linked to: http://stackoverflow.com/q/12233376
downvote count: 2

http://stackoverflow.com/comment/46677123
type: AnswerComment
comment on: http://stackoverflow.com/a/29235223
type: Comment
has text: Because you are telling `momentjs` that a date the looks like `2015-01-01 12:00:00` is of format `YY-MM-DD HH:mm:ss`, and `momentjs` tries to parse it as such. You can imagine that it reads `2015` as `20` (because it only expects a two digit year), and when it expects only a two digit year, it expects that those two digits are the last two digits and automatically prepends the first two digits of the current century - ergo, the `20` from `2015` becomes `2020`. Let's be clear, this is not a bug in `momentjs` logic, you told it what to expect, and then you gave it something else.
score: 1

http://stackoverflow.com/comment/46766308
type: Comment
comment on: http://stackoverflow.com/a/29284144
has text: Yes you can loop through stylesheets and look at the CSSRule and try to match the rule you are looking for. It is possible, but not the ideal solution.
score: 0
type: AnswerComment

http://stackoverflow.com/q/29292864
favorite count: 0
type: UnansweredQuestion
downvote count: 2
has body: I need to find a solution for the following problem: I need to create a button that on click will make at once one visible block to hide and another hidden block to be visible. Any suggestion? Thank you in advance, Cheers Valter
tagged with: css
has answer: http://stackoverflow.com/a/29292900
linked to: http://stackoverflow.com/q/21070101
has comment: http://stackoverflow.com/comment/46782243
type: Question
upvote count: 0
score: -2
answer count: 1
tagged with: javascript
tagged with: jquery
has title: how to make a button on click to hide and show to boxes at once
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46782268

http://stackoverflow.com/a/29256530
accepted answer of: http://stackoverflow.com/q/29239826
score: 1
has body: To get values from other columns to be included in your custom sort you must create a custom data source sorting plug-in. The below will return the values from column 0 and 1 as a date+time string, ie 1/2/2015 10:02:03 : $.fn.dataTable.ext.order['order-time-date-sort'] = function(settings, col) { return this.api().row({order:'index'} ).nodes().map(function (tr, i) { return $('td:eq(0)', tr).text()+' '+$('td:eq(1)', tr).text(); }); } Then set the above order-date-time-sort as orderDateType for the time column : var table = $('#example').DataTable({ columnDefs : [ { type: 'time-date-sort', orderDataType: "order-time-date-sort", targets: [1] } ] }); Now the time can be sorted with respect of the date too, using simple Date.parse() : jQuery.fn.dataTableExt.oSort['time-date-sort-pre'] = function(value) { return Date.parse(value); }; jQuery.fn.dataTableExt.oSort['time-date-sort-asc'] = function(a,b) { return a-b; }; jQuery.fn.dataTableExt.oSort['time-date-sort-desc'] = function(a,b) { return b-a; }; demo -> http://jsfiddle.net/4toLj9yn/ Note: If you have problems with performance, it could happend with a huge table, you should "cache" the result of order-time-date-sort (simply store the result in a variable). You could also consider using a completely diffrent approach - orthogonal data.
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/29239826
type: Answer
upvote count: 1

http://stackoverflow.com/comment/46699251
has text: alright! this works! i'll accept answer in 10 minutes
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29247012

http://stackoverflow.com/comment/46720543
comment on: http://stackoverflow.com/q/29258575
type: Comment
type: QuestionComment
has text: `http://path.com/` serves your index.html, correct? What exactly happens when you request the index.html directly?
score: 0

http://stackoverflow.com/q/29255709
has answer: http://stackoverflow.com/a/29645828
answer count: 1
accepted answer: http://stackoverflow.com/a/29645828
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/46715421
tagged with: angularjs
has comment: http://stackoverflow.com/comment/46757667
has title: Reload directive method after POST in Angular JS
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46787868
upvote count: 1
has comment: http://stackoverflow.com/comment/46759362
type: Question
has body: I'm developing an opensource app that uses AngularJS as part of the frontend, due to the way that I want it to work (it's paranoid, deleting and adding content from the dom for protection) I've run into a problem that I can't seem to be able to figure out. The main content of the site is loaded through a service that gathers data from a REST API and populates a directive, the same directive calls a template and renders out the content. The issue is that when you add new content and the POST is successful I'm not able to tell the directive to reload the content, since the POST call comes from a controller in a different $scope. I've tried with $watch, $apply, $push and lately I've been thinking about $resource but I don't think it's the solution. The code is the following: Directive: .directive("itemList", function ($timeout) { return { restrict: 'A', template: "&lt;ng-include src='getTemplateUrl()'/&gt;", replace: true, controllerAs: 'items', controller: function ($http, $scope, sikreAPIservice) { $scope.getItems = function (categoryId) { sikreAPIservice.getItemsbyCategory(categoryId) .success(function (data, status) { $scope.category_name = data.category_name; $scope.category_id = data.category_id; $scope.items = data.items; $scope.lockedItem = false; $timeout(function () { $scope.lockedItem = true; $.notify("View time expired. Locking...", "info"); $scope.getTemplateUrl(); }, itemTimeout); }) .error(function (data, status) { $.notify("Couldn't get the item data", "error"); }); }; $scope.getAllItems = function () { sikreAPIservice.getItems() .success(function (data) { $scope.category_name = data.category_name; $scope.category_id = data.category_id; $scope.items = data.items; $scope.lockedItem = false; $timeout(function () { $scope.lockedItem = true; $.notify("View time expired. Locking...", "info"); $scope.getTemplateUrl(); }, itemTimeout); }) .error(function (data, status) { $.notify("Couldn't get the item data", "error"); }); }; $scope.getTemplateUrl = function (…
tagged with: angularjs-directive
score: 1
tagged with: angularjs-scope
downvote count: 0

http://stackoverflow.com/q/29260145
type: Question
score: -2
tagged with: php
has comment: http://stackoverflow.com/comment/46722517
downvote count: 2
tagged with: forms
has answer: http://stackoverflow.com/a/29260284
answer count: 1
has title: Javascript is not not working due to unknown reason
has comment: http://stackoverflow.com/comment/46722645
has body: I am using a custom optin form. Here is the code Fill This Out and See Your Timeshare Report First Name: Last Name: Email Address: Phone Number: Alternate Phone: Resort Name: Amount Owed? $: If Paid Off Leave Zero, Else Put Amount I'm Considering To Sell It Buy It Rent It Cancel Mortgage End Ownership Give It Back <img src="captcha_code_file.php?rand=<?php echo rand(); ?>" id='captchaimg'> Enter the code above here : Can't read the image? click here to refresh Ensure all fields are completed and correct, allowing you more benefits, while preventing abuse of our data. I want to add a popup javascript to show success message when someone submits the form , I am using this code for it $('form').on('submit',function(){ alert('submitted'); }); But due to unknown reason , this code is not working , Here is the page url http://timesharesgroup.com/sell/index.html P.S My goal is to show a success message to the user when he submits the form , I thought javascript was an easy method but if You can comeup with a better alternative , I shall be really grateful Currently the form works like this: User submits Page refreshes for him I get an email with the submitted data **********UPDATE*****************
tagged with: javascript
tagged with: jquery
type: AnsweredQuestion
upvote count: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46722574
accepted answer: http://stackoverflow.com/a/29260284
has comment: http://stackoverflow.com/comment/46722572
favorite count: 0

http://stackoverflow.com/comment/81601989
comment on: http://stackoverflow.com/a/29286412
type: Comment
score: 196
has text: A mnemonic: 'o'f -> not 'o'bjects, 'i'n -> not 'i'terables
type: AnswerComment

http://stackoverflow.com/a/29362765
upvote count: 2
answers question: http://stackoverflow.com/q/29362701
has body: https://jsfiddle.net/5qv2e2jm/ Try adding this
downvote count: 0
has comment: http://stackoverflow.com/comment/46951167
has comment: http://stackoverflow.com/comment/46911634
has comment: http://stackoverflow.com/comment/46924873
type: Answer
has comment: http://stackoverflow.com/comment/46941029
score: 2

http://stackoverflow.com/q/29337580
has body: I meet some difficulties. The task was to enable play button after the Nickname has been entered as same as the placeholder (For example, I set the placeholder as Lianzheng, the button will only enabled when I entered Lianzheng in the form. The following code are my HTML and Javascript code. It's not working. So I want to figure out what goes wrong. HTML: &lt;p&gt; &lt;input id= "play" class="button" disabled="disabled" type="submit" value="play" onkeyup="myFunction() onclick="play()"&gt; &lt;/p&gt; Javascript: function myFunction() { var x = document.getElementById('name').value; document.addEventListener('keydown',function(e) { name.textcontent = 'keydown:' + e.keycode; }); document.addEventListener('keyup', function(e) { name.textContent = 'keyup:' +e.keyCode; }); if (name == 'Lianzheng') { alert("!!"); document.getElementById("name").disabled = false; } else { document.getElementById("name").disabled = true; }
accepted answer: http://stackoverflow.com/a/29338072
type: Question
has answer: http://stackoverflow.com/a/29337890
has answer: http://stackoverflow.com/a/29337940
score: 0
tagged with: javascript
possible better answer: http://stackoverflow.com/a/29337940
has title: enable button after nickname has been entered
has answer: http://stackoverflow.com/a/29337710
has comment: http://stackoverflow.com/comment/46863766
has answer: http://stackoverflow.com/a/29338072
answer count: 5
has comment: http://stackoverflow.com/comment/46863662
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29337902
has comment: http://stackoverflow.com/comment/46863616

http://stackoverflow.com/q/29326473
type: AnsweredQuestion
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/29326608
accepted answer: http://stackoverflow.com/a/29326608
type: Question
tagged with: javascript
has body: I currently have a system which allows users to add different ticket types. I want each ticket property to have a unique name so that when the form is submitted I can tell the tickets apart. Right now, there is a button to add more tickets to the page if the user needs more than one. I have tried to get it to append the ticket number to the html name attribute but it's not working. It is successfully creating more ticket divs but its using the same name attribute. Can anyone help with this? HTML Ticket * More tickets javascript var counter = 0; function moreTickets() { counter++; var newFields = document.getElementById('ticket').cloneNode(true); newFields.id = ''; newFields.style.display = 'block'; var newField = newFields.childNodes; for (var i = 0; i < newField.length; i++) { var theName = newField[i].name if (theName) newField[i].name = theName + counter; } var insertHere = document.getElementById('tickets'); insertHere.parentNode.insertBefore(newFields, insertHere); }
possible better answer: http://stackoverflow.com/a/29327402
answer count: 2
upvote count: 1
has answer: http://stackoverflow.com/a/29327402
has title: HTML name attributes not changing using javascript
favorite count: 0
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/137520563
has text: @NicoHaase well, this question was posted 9 years ago. I know that too now, but I also did not want to leave out PHP as my fundamentals and get the question rejected at the time for not having all information in it. Technically, I could, with the knowledge I have now, construct a convoluted PHP method of doing this.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29291020

http://stackoverflow.com/comment/46855412
type: Comment
comment on: http://stackoverflow.com/a/29331438
score: 1
type: AnswerComment
has text: ok, another thing to check is duplicate state transitions, this happened in our large app: ui-router transitionend into a child state and before rendering the child state it would redo the transition again. We traced this to missing paramters where ui-router compared "undefined" to "empty string". We now log in $stateChangeStart and $stateChangeSuccess to console to detect such double transitions and add the missing params as emtpy string in $state.go() / ui-sref. The symptom was very similar as you describe yours.

http://stackoverflow.com/q/29302188
has comment: http://stackoverflow.com/comment/46799822
has answer: http://stackoverflow.com/a/29302342
has body: There's been similar questions on how to fire scroll events (mid-scroll) on mobile/tablet. I've used the code provided below but I've yet to get this to work in chrome emulator. $('body').on({ 'touchmove': function(e) { console.log($(this).scrollTop()); // Replace this with your code. } }); touchstart will log when I scroll with the touch sensor but not touchmove. What am I missing?
has title: jQuery touchmove not registering in chrome emulator
type: UnansweredQuestion
tagged with: touchstart
tagged with: google-chrome
downvote count: 1
tagged with: touchmove
type: Question
has comment: http://stackoverflow.com/comment/46799886
has comment: http://stackoverflow.com/comment/46799988
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/46799146
upvote count: 1
has answer: http://stackoverflow.com/a/47187815
tagged with: javascript
tagged with: jquery
favorite count: 0

http://stackoverflow.com/q/29356457
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46897874
has comment: http://stackoverflow.com/comment/46898467
tagged with: http://stackoverflow.com/tag/html
has body: Is there a way to show 2 Divs with the same id and class onClick with Jquery, cant solve this. (Div1/Class targetDiv) Html: Option 1 //With this Option 2 Option 3 Option 4 Lorum Ipsum 1 //Show this Lorum Ipsum 1 Second //And this Lorum Ipsum 2 Lorum Ipsum 3 Lorum Ipsum 4 Jquery: $('.showSingle').on('click', function () { $(this).addClass('selected').siblings().removeClass('selected'); $('.targetDiv').hide(); $('#div' + $(this).data('target')).show(); }); $('.showSingle').first().click(); Fiddle: https://jsfiddle.net/XwN2L/5709/ Thank you so much for your Help!
tagged with: css
has comment: http://stackoverflow.com/comment/46898406
tagged with: onclick
score: 0
type: UnansweredQuestion
has title: Show 2 Divs withs same ID and Class onClick
type: Question
has comment: http://stackoverflow.com/comment/46897898
has answer: http://stackoverflow.com/a/29358052
answer count: 1

http://stackoverflow.com/comment/46868635
score: 0
type: Comment
has text: $ not defined error though i think thats not an issue since the value display when doing alert(testsplit)
comment on: http://stackoverflow.com/a/29339965
type: AnswerComment

http://stackoverflow.com/comment/46828744
has text: @Roamer-1888: In all honesty, I do give a * about linters. They try to give advice without understanding my code.
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/29293745
type: Comment

http://stackoverflow.com/comment/46927059
type: QuestionComment
has text: I am little close now ng-change is happening when i change dropdown and click somewhere in the form , its not changing when i change the dropdown value any help please...
comment on: http://stackoverflow.com/q/29355946
type: Comment
score: 0

http://stackoverflow.com/a/29274472
has body: It's Javacript syntax to check if the variable is truthy or falsy. It's similar to saying if (variable is true) { /* Do something */} In Javascript, these are falsy values. false 0 (zero) "" (empty string) null undefined NaN (Not-a-Number) All other values are truthy, including "0" (zero as string), "false" (false as a string), empty functions, empty arrays, and empty objects.
answers question: http://stackoverflow.com/q/29274374
type: Answer
score: 2
upvote count: 2
downvote count: 0

http://stackoverflow.com/q/29292283
has comment: http://stackoverflow.com/comment/46781398
has title: unexpected behavior of ng-repeat
type: Question
has comment: http://stackoverflow.com/comment/46785404
tagged with: javascript
has comment: http://stackoverflow.com/comment/46781462
answer count: 1
downvote count: 0
has body: I have an Angular(1.2.1) app with an ng-repeat that looks like: &lt;div ng-repeat="item in list | filter:filterList | orderBy:orderList" my-dir&gt; where filterList looks something like: $scope.filterList = function(x){ if (Service.active()){ //tells me whether I need to filter by this field at all if (x.field != Service.field()) { console.log('FALSE:' + x.id) return false; } } else {...} //other clauses like above return true; } and orderList looks something like: $scope.orderList = function(x){ return (x.value); } The unexpected behavior I'm seeing is that, when Service.foo() and/or Service.field( ) change, I expect the contents of my list to change. And indeed they do - the items matching the new value appear at the top of my list, ordered by value, as expected. However, the items that were on the list previously and should have been removed instead remain on the list, in the same, correct, value-sorted order, below the items that should be in the list. To clarify: If Service.field() == 'a' and the list contains objects: field = 'a' value='3' field = 'a' value='2' field = 'a' value='1' and then 'Service.field()' changes to 'b', I expect to see field = 'b' value='3' field = 'b' value='2' field = 'b' value='1' //nothing else but instead I see: field = 'b' value='3' field = 'b' value='2' field = 'b' value='1' field = 'a' value='3' field = 'a' value='2' field = 'a' value='1' would assume it was an issue with changes in the service not being applied to the scope - but a) I've made sure to update the scope; and b) if that was the case, the list would be: field = 'a' value='3' field = 'b' value='3' field = 'a' value='2' field = 'b' value='2' field = 'a' value='1' field = 'b' value='1' because orderList only doesn't look at field, only value. What on Earth could cause this? Update: I forgot to mention that the console.log() statement in the filter function does print for the items I don't expect to be in the list - so the filter function is returning false, yet the items…
score: 1
has answer: http://stackoverflow.com/a/29292445
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46783572
upvote count: 1

http://stackoverflow.com/a/29242324
answers question: http://stackoverflow.com/q/29242074
upvote count: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/46690934
type: Answer
has body: You are attempting to hide a child with the class .navbar-default of your nav, when you are actually wanting to target the nav itself: &lt;nav class="navbar-default"&gt; This is targeted as: nav.navbar-default not: nav .navbar-default That one space character is extremely important here.
score: 3

http://stackoverflow.com/comment/46717749
score: 0
type: AnswerComment
type: Comment
has text: Comments are not for extended discussion; this conversation has been [moved to chat](http://chat.stackoverflow.com/rooms/73775/discussion-on-answer-by-benjamin-ray-only-one-value-is-equal-to-and-selected-in).
comment on: http://stackoverflow.com/a/29255237

http://stackoverflow.com/q/29329814
tagged with: model
tagged with: three.js
tagged with: load
has body: I have a problem where i load a model like that: var Beech; var loader = new THREE.JSONLoader(); loader.load( "./models/trees/Beech/Beech.json", function( geometry, materials ) { Beech = addMorphTree(geometry,materials,0.5); }); and using it like this : function addMorphTree(geometry,material,scale){ mat=new THREE.MeshFaceMaterial( material ); mat.side=THREE.DoubleSide; Tree = new THREE.Mesh( geometry,mat); Tree.scale.set(scale,scale,scale); //Tree.position.set(x,y,z); Tree.rotation.x = Math.PI/2; //scene.add( Tree ); return Tree;} My question is how can i use this variable to create copies of the model instead of loading it every time? When i try to use scene.add(Beech); outside the loader the model doesn't show up. I have seen other similar questions but all the answers where to use the scene.add inside the loader.
has title: How to load a model once and store it to a variable?
type: AnsweredQuestion
tagged with: javascript
type: Question
score: 0
has answer: http://stackoverflow.com/a/29330019
answer count: 1
linked to: http://stackoverflow.com/q/18942539
accepted answer: http://stackoverflow.com/a/29330019

http://stackoverflow.com/a/29261319
score: -1
has comment: http://stackoverflow.com/comment/46725407
answers question: http://stackoverflow.com/q/29261016
downvote count: 1
type: Answer
upvote count: 0
has body: If you include jQuery in your project before AngularJS, Angular will use jQuery instead of jqLite for the angular.element function. This means you should be able to use jQuery's selectors for finding / referencing DOM elements.
has comment: http://stackoverflow.com/comment/46725500

http://stackoverflow.com/q/29269831
type: UnansweredQuestion
tagged with: mysql
type: Question
tagged with: javascript
score: 0
has body: I'm trying to create a dynamic number of notification feed on the menu. When there is a new added data in one of my SQL table, it will change the number on the notification bar automatically, without refreshing the page. Here's the html: &lt;li&gt; &lt;a href="categories.php"&gt; Categories &lt;span class="badge" id="badg"&gt;&lt;/span&gt; &lt;/a&gt; &lt;/li&gt; And here is the script that I've used: $(document).ready(function() { var arr = &lt;?php include("array.php"); ?&gt;; /* e.g. ["1","2","3"] */ var size = arr.length; document.getElementById('badg').innerHTML = size; }); The number of arrays are showing, but doesn't change automatically when there is a new data. It will only change when the page are refreshed by the user. How can I do it automatically?
has comment: http://stackoverflow.com/comment/46740972
has answer: http://stackoverflow.com/a/29270046
has answer: http://stackoverflow.com/a/29270222
tagged with: http://stackoverflow.com/tag/html
tagged with: php
has answer: http://stackoverflow.com/a/29273775
answer count: 4
has title: Change automatically content of span based from number of rows from mysql using Javascript
has answer: http://stackoverflow.com/a/29273765

http://stackoverflow.com/comment/46759787
comment on: http://stackoverflow.com/a/29280901
type: AnswerComment
score: 0
type: Comment
has text: PERFECT THIS IS EXACTLY WHAT I WANTED! I cant upvote yet though :(

http://stackoverflow.com/a/29285660
has comment: http://stackoverflow.com/comment/46769241
has comment: http://stackoverflow.com/comment/46771156
has comment: http://stackoverflow.com/comment/46802452
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: That problem was killing me! It's actually not only just arrays. Just make it a habit to return at the end of your controllers. EDIT: to be more specific. It's angular calls the function as a Constructor using the new keyword. Constructor behaviour is specified as specified in This SO Post
score: 1
answers question: http://stackoverflow.com/q/29236009
upvote count: 1
accepted answer of: http://stackoverflow.com/q/29236009

http://stackoverflow.com/a/29286983
accepted answer of: http://stackoverflow.com/q/29286763
has body: Based on Parsing Twitter Usernames, Hashtags and URLs with JavaScript: String.prototype.parseURL = function() { return this.replace(/[A-Za-z]+:\/\/[A-Za-z0-9-_]+\.[A-Za-z0-9-_:%&amp;~\?\/.=]+/g, function(url) { return url.link(url); }); }; String.prototype.parseUsername = function() { return this.replace(/[@]+[A-Za-z0-9-_]+/g, function(u) { var username = u.replace("@",""); return u.link("http://twitter.com/"+username); }); }; String.prototype.parseHashtag = function() { return this.replace(/[#]+[A-Za-z0-9-_]+/g, function(t) { var tag = t.replace("#","%23"); return t.link("http://search.twitter.com/search?q="+tag); }); }; String.prototype.parseTweet = function() { return this.parseURL().parseUsername().parseHashtag(); }; Which can be called like: var str = "blah blah blah blah http://example.com blah blah #something blah blah https://example.com blah blah @person" str.parseTweet(); // or: // str.parseURL // str.parseUsername // str.parseHashtag See this jsBin
downvote count: 0
score: 1
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46771661
answers question: http://stackoverflow.com/q/29286763
type: Answer

http://stackoverflow.com/q/29333255
tagged with: variables
has comment: http://stackoverflow.com/comment/46855422
favorite count: 0
has comment: http://stackoverflow.com/comment/46855471
has comment: http://stackoverflow.com/comment/46855405
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
upvote count: 0
type: Question
has body: I am trying to create a simple page that takes a user inputted variable, and adds it to a pre set variable. Then, I would like it to display the answer at the bottom of the page. The only command I can find is document.write, and that makes a whole blank page besides the answer. Can you please help me find an alternative command to the document.write? Here is the code so far: &lt;!DOCTYPE html&gt; &lt;html&gt; &lt;body&gt; &lt;script&gt; var y = 0; var z = 10; var x = z; &lt;/script&gt; &lt;p&gt; Add Numbers: &lt;/p&gt; &lt;input type="text" name="inpt1" id="usap1"/&gt; &lt;br/&gt; &lt;br/&gt; &lt;input type="button" value="Submit" onclick="add()"/&gt; &lt;script&gt; function add() { var z = 9 var y = document.getElementById('usap1').value var x = z; var z = ( Number(x) + Number(y) ); document.write(z) } &lt;/script&gt; &lt;/body&gt;
tagged with: javascript
score: -1
has answer: http://stackoverflow.com/a/29333317
tagged with: document.write
downvote count: 1
answer count: 1
has title: Displaying variables in javascript

http://stackoverflow.com/a/29368375
answers question: http://stackoverflow.com/q/29368253
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/29368253
upvote count: 1
has body: Wouldn't it be just array1.sort(function(a, b) { return b.endDateInMs - a.endDateInMs; }); FIDDLE
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/comment/46682945
has text: How can I resolve this issue so that I would not encounter this any more?
type: Comment
comment on: http://stackoverflow.com/q/29238137
type: QuestionComment
score: 0

http://stackoverflow.com/comment/46748726
comment on: http://stackoverflow.com/q/29260246
type: Comment
type: QuestionComment
has text: okéy, can you jute try to integrate phonertc in any worklight application this the link to the library https://github.com/alongubkin/phonertc you can find the necessary library in /src/android/com/dooble/phonertc/ and the jar phonertc/libs/android/ , thanks alot for your help
score: 0

http://stackoverflow.com/comment/46895461
type: AnswerComment
comment on: http://stackoverflow.com/a/29349870
has text: you don't **have** to use `.done()` per se. But in the above code, result of #3 depends on the execution of #2. And #3 will execute before #2 which is not expected behavior (at least as per the code above). But otherwise $elem.data('id', '1') works, just that the execution of the code is not in happening as expected
score: 0
type: Comment

http://stackoverflow.com/comment/46740594
score: 0
type: Comment
has text: Sarom, I believe the code I posted works, see this jsfiddle: http://jsfiddle.net/wxzsjLcL/4/ However, I would really like that dropdown to be formatted in rows and columns with the top border as well. I need to achieve the same visual effect as the hovers show, whichever method I can. I also need to know how this can be done for separate boxes.
type: AnswerComment
comment on: http://stackoverflow.com/a/29268589

http://stackoverflow.com/q/29228227
tagged with: jquery
upvote count: 3
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29228392
has body: I have the following Problem: Text Text Text Second Text Text Text How can i change or manipulate the Text after the break-Tag ? I cant change the HTML itself and it has to be done via JavaScript containing jQuery. After manipulating it should look like this: Text Text Text blablabla Anybody got a solution to this? Thanks in advance
has title: Manipulation H1 Tag
favorite count: 0
has answer: http://stackoverflow.com/a/29228295
accepted answer: http://stackoverflow.com/a/29228295
type: AnsweredQuestion
score: 3
downvote count: 0
possible better answer: http://stackoverflow.com/a/29228392
type: Question
answer count: 2
tagged with: javascript

http://stackoverflow.com/comment/46911217
type: Comment
has text: Hm, doesn't seem to show up anywhere in SeaMonkey... (Or, at least, can't find where!)
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/29363748

http://stackoverflow.com/q/29331261
type: AnsweredQuestion
score: 16
has comment: http://stackoverflow.com/comment/46851736
type: Question
tagged with: javascript
has title: Disable radio button in bootstrap 3?
has answer: http://stackoverflow.com/a/47516879
has answer: http://stackoverflow.com/a/29331323
has body: How can I disable Bootstrap 3 radio buttons? If I start with the BS3 example and add disabled="disabled" to each input element, there are no changes in appearance or behavior: Radio 1 (preselected) Radio 2 Radio 3 Demo: JSFiddle. I guess this is because the disabled attribute is only applied to the now-invisible button and not the clickable text label, but I don't see anything in the BS3 docs about this.
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/39586227
has answer: http://stackoverflow.com/a/39261455
tagged with: twitter-bootstrap
possible better answer: http://stackoverflow.com/a/36999029
answer count: 5
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/36999029
accepted answer: http://stackoverflow.com/a/29331323
upvote count: 16

http://stackoverflow.com/q/29331177
has answer: http://stackoverflow.com/a/29331384
has title: Google Maps API event listener priority
type: Question
tagged with: google-maps
tagged with: javascript
has comment: http://stackoverflow.com/comment/46851630
has body: I have a map which has a google.maps.event.addListener set on the map object for click events to place a marker on the map. Now I want to add a context menu to the markers, so am creating a custom overlay in the floatPane. Again google.maps.event.addListener is used to add a rightclick event to each marker to position and display the menu. Once the menu is displayed I want it to be cleared by either a menu item being selected, escape being pressed, or a click on the map. The menu has a div for each items using jQuery .on to attach a click handler to them, whilst when the menu is displayed a keydown handler is attached to the document using .on to check for escape being pressed. These work as desired but I am unable to find a satisfactory solution to detecting a click on the map. If I use google.maps.event.addListener on the map object to cancel the menu it works, but also registers with the listener to add a marker and event.stopPropagation() does not affect this. i.e. Cancelling the menu also adds a marker. I believe the Google API triggers the handlers in the order they were added with no way to change the priority. I have also tried using a jQuery .on handler on the div to which the map is attached. But if I use click or mouseup event it is triggered by the right click which adds the menu. i.e. The menu flashes on screen as it appears but immediately closes. A mousedown event avoids this problem, but obviously still triggers the Google API handler to add a marker. It also registers the click to drag the map to scroll it, which the Google API does not and would be the preferred behaviour. So it seems to me there are only two solutions to this problem. One would be to cancel any handlers on the map when the menu is displayed, then re-add them once it closes. This seems unnecessarily excessive though. The other is to make wrap the content of the handlers in a conditional statement to detect whether the menu is open. This could be either by using a global variable as…
tagged with: google-maps-api-3
score: 0
answer count: 1
type: UnansweredQuestion

http://stackoverflow.com/a/29304087
has body: Your base page with multiple maps, and an external JS file: Untitled Document Note the array which serves as an accessible bin for all maps. Also notice the window listener for "load." The external JS file contents: function addToAllMaps(){ if(maps!=undefined){ for (var i in maps){ var map = maps[i]; var circle=new google.maps.Circle({ map:map, center:new google.maps.LatLng(40.266323, -73.996579), radius:1000000, fillColor:"red", border:0, strokeWeight:0 }); } } } window.addEventListener("load", addToAllMaps); Note how it references the maps array and applies the red circle to each in a loop. Also note the window listener for load. By using this event we can add multiple events, in the order the events were defined, in this case, the order in which scripts were loaded.
type: Answer
accepted answer of: http://stackoverflow.com/q/29302570
answers question: http://stackoverflow.com/q/29302570
upvote count: 1
score: 1
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/29220467
upvote count: 109
linked to: http://stackoverflow.com/q/28889493
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/30164325
favorite count: 0
has answer: http://stackoverflow.com/a/29226671
answer count: 5
tagged with: timezone
tagged with: momentjs
has body: I use the Moment.js and Moment-Timezone frameworks, and have a Moment.js date object which is explicitly in UTC timezone. How can I convert that to the current timezone of the browser? var testDateUtc = moment.tz("2015-01-30 10:00:00", "UTC"); var localDate = ??? So it would be fine if I could find out the users local time zone; or alternatively I'd like to convert the date object into another data object which just uses the "local timezone", no matter what that actually is.
has title: How to convert Moment.js date to users local timezone?
has answer: http://stackoverflow.com/a/67086529
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/47713540
has answer: http://stackoverflow.com/a/34209746
tagged with: date
score: 109
type: Question

http://stackoverflow.com/q/29251586
tagged with: javascript
has comment: http://stackoverflow.com/comment/46707054
answer count: 2
tagged with: jquery
has body: I am cloning a div which includes a datepicker. I have fixed the datepicker when cloned using: // Re-initialize the datepicker $(".datepicker").each(function() { // Remove the class $(this).removeAttr('id').removeClass('hasDatepicker'); // Re-initialize the datepicker $(this).datepicker({ dateFormat: 'yy-mm-dd', changeMonth: true, changeYear: true, yearRange: "-150:+0" }); }); Every change on that datepicker, it computes for the age and outputs the value to the age field. However, the reiteration cannot change the value of the field to the computed age. I cannot catch the datepickers ID because everytime it is cloned, the value of id is random so I used a class. for (var counts = 1; counts <= 20; counts++) { (function(counts) { $(".datepicker").each(function() { $(".co_birthdate" + counts).on("change", function() { var today = new Date(); var birthDate = new Date($(this).val()); var age = today.getFullYear() - birthDate.getFullYear(); var m = today.getMonth() - birthDate.getMonth(); if (m < 0 || (m === 0 && today.getDate() < birthDate.getDate())) { age--; } if (age <= 0) { alert("Age value is invalid."); } else { // Display age $("#co_age" + counts).val(age); } }); }); })(counts); } Here is the HTML: Birthdate: Age:
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29252826
tagged with: datepicker
has answer: http://stackoverflow.com/a/29254484
score: 0
has comment: http://stackoverflow.com/comment/46707077
type: Question
tagged with: clone
has title: Age Does not Output in the Field

http://stackoverflow.com/q/29308600
accepted answer: http://stackoverflow.com/a/29308814
favorite count: 0
possible better answer: http://stackoverflow.com/a/29308732
has comment: http://stackoverflow.com/comment/46811099
tagged with: node.js
type: AnsweredQuestion
score: 3
has comment: http://stackoverflow.com/comment/46811319
has comment: http://stackoverflow.com/comment/46811481
upvote count: 3
has comment: http://stackoverflow.com/comment/46811148
tagged with: forms
has title: I can't find out why req.param('length') is returning 0
type: Question
has body: I'm using Sails.js (which is based on Express), and I'm sending a form input named length which has a value of '1000', like so: 1000 Server side, I have done some tests, and this is what I get req.param('length'); // returns 0 req.params.length; // returns 0 req.params.all() // returns { length: '1000' } I've also checked in the network tab of the developer's console, and I see the POST request being made, with a param of length = "1000". Either I'm missing something very obvious or this is a weird glitch. Why is this happening and how can I get the value of length instead of getting "0"? Thanks.
has answer: http://stackoverflow.com/a/29308814
tagged with: sails.js
tagged with: javascript
tagged with: express
has answer: http://stackoverflow.com/a/29308732
answer count: 2
downvote count: 0

http://stackoverflow.com/a/29305880
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46806322
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29305838
upvote count: 3
has body: The "name" attributes of input elements in a form are used to populate properties on the form DOM node. Your name, "style", overrides the "style" property of the form, which means that jQuery can no longer access the native style object. It needs to do that in order to hide the form. Note that you can still do this with CSS. $(document).ready(function() { $('form').addClass("hidden"); }); CSS: .hidden { display: none; } Those old habits of implicitly trampling over namespaces dates from the early days of browser technology. It's hard to imagine anyone thinking it's a good idea nowadays, at least without there being some qualified sub-space (like form.fields or something).
has comment: http://stackoverflow.com/comment/46806239
type: Answer
score: 3
answers question: http://stackoverflow.com/q/29305838

http://stackoverflow.com/q/29297380
has comment: http://stackoverflow.com/comment/46790146
has comment: http://stackoverflow.com/comment/46790517
has comment: http://stackoverflow.com/comment/46790161
possible better answer: http://stackoverflow.com/a/29299969
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29299969
type: Question
has title: Servlet Response to Javascript in plain text shown on browser
has body: I have my servlet sending the following response to a JS ajax call: response.setContentType("text/plain"); PrintWriter out = response.getWriter(); out.print("start"); out.close(); and the call from the web page has the following code: function update() { var xmlhttp = new XMLHttpRequest(); var id = '${user.id}'; var height = (window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight); height = height-40; var params = "action=update&amp;id=" + id + "&amp;height=" + height; xmlhttp.open("POST", "/Anabasis/UserControl", true); xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); xmlhttp.setRequestHeader("Content-length", params.length); xmlhttp.onreadystatechange = function() { if (xmlhttp.readyState == 4 &amp;&amp; xmlhttp.status == 200) { var answer = xmlhttp.responseText; if(answer=="start"){ window.location.href = "/project/page1.jsp"; } else { window.location.href = "/project/page2.jsp"; } } }; xmlhttp.send(params); } setTimeout(update, 10000); If start is send back by the Servlet, the browser should be redirected to another page. This may be done without the user's doing anything since the JS request is send every 10 seconds. Now the result is that I do not get the answer to page but just a black page with the text: "start" Can anyone tell me what to add in order to asure that the answer gets back to the JS function?
tagged with: javascript
tagged with: servlets
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/45076257
accepted answer: http://stackoverflow.com/a/45076257

http://stackoverflow.com/comment/46915473
type: Comment
type: QuestionComment
has text: could you tried to do `ng-model="$parent.files"`
comment on: http://stackoverflow.com/q/29356989
score: 0

http://stackoverflow.com/comment/46834658
type: QuestionComment
has text: @Oriol thank you for giving me the right term :)
comment on: http://stackoverflow.com/q/29321656
score: 0
type: Comment

http://stackoverflow.com/comment/46888112
type: QuestionComment
has text: Change your `document.write` to `alert` and you will get your answer.
type: Comment
comment on: http://stackoverflow.com/q/29351347
score: 1

http://stackoverflow.com/comment/46753006
type: Comment
has text: Then you either suppress an error message with a `try`-`catch` block or an `on('error', ...)` without handling it in a way that it informs you that the express server (?) will be started. Or you do a check if you can start it which does not succeed and you don't start it as of that. Not matter what the reason is, its only you that can find out why. I would suggest to add some logging into your app. So that you can detect which steps are executed and which are not.
type: QuestionComment
comment on: http://stackoverflow.com/q/29276996
score: 0

http://stackoverflow.com/comment/46879266
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/29345650
type: Comment
has text: The hyphenate trick doesn't do the trick in this situation, I have edited the question much to clarify the problem, I hope it helps

http://stackoverflow.com/a/29349141
score: 0
type: Answer
has body: Problably this is because you are directly accessing the type and ie8 doesn't support computed properties. Can you check using proper Ember getters? var type = self.controller.get('model.type'); this.controller.get('model').get('store').unloadAll(type); this.controller.get('model').get('store').fetchAll(type); You can also try access controllers like this: var type = self.get('controller.model.type'); this.get('controller.model.store').unloadAll(type); this.get('controller.model.store').get('store').fetchAll(type);
answers question: http://stackoverflow.com/q/29346698

http://stackoverflow.com/q/29305324
score: -2
has body: sorry for the question but i have problem with FadeIn() (and so with Jquery): I have: with a form, i start a function in javascript, and in this function i would like to put this code: $('#Ipo').hide().fadeIn(5000); $('#Time').hide().fadeIn(5000); but doesn't work :( Thanks
has answer: http://stackoverflow.com/a/29315747
has comment: http://stackoverflow.com/comment/46816914
upvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
has title: FadeIn() div in function Javascript?
has comment: http://stackoverflow.com/comment/46805301
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46817042
has comment: http://stackoverflow.com/comment/46808592
has comment: http://stackoverflow.com/comment/46805075
has comment: http://stackoverflow.com/comment/46805072
has comment: http://stackoverflow.com/comment/46815511
has comment: http://stackoverflow.com/comment/46817096
downvote count: 2
has comment: http://stackoverflow.com/comment/46807688
type: Question

http://stackoverflow.com/a/29301046
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29300660
has body: Try something like this: Template.archive.helpers({ shortExcerpt: function(text) { if(text.length&gt;120){ var a = text.slice(0,120); return a+'...'; } return text; } }) &lt;template name="archive"&gt; {{# each itens }} {{ shortExcerpt text }} {{/each}} &lt;/template&gt;

http://stackoverflow.com/q/29226714
has comment: http://stackoverflow.com/comment/46661711
answer count: 1
tagged with: jsp
type: UnansweredQuestion
has title: using two versions of jquery in the same page returns 'Undefined is not a function'
type: Question
linked to: http://stackoverflow.com/q/1566595
has answer: http://stackoverflow.com/a/29227452
has body: I tried using jQuery_1_9_1 and jQuery_1_4_2 in the same page But when trying to open popups in my page I am getting Undefined type Err 'Undefined is not a function' at this point jQuery_1_9_1.fn.track=function(){ jQuery_1_9_1(this).each(function(){ return new Track(jQuery_1_9_1(this)); Also I am using Mootools in my page . Could anyone pls help why I am getting this error. Edit I have given 1.4.2 in my template file and in one of the commonly used JSP
has comment: http://stackoverflow.com/comment/46660922
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46660873
has comment: http://stackoverflow.com/comment/46661113
score: 0
has comment: http://stackoverflow.com/comment/46660725

http://stackoverflow.com/comment/46672059
comment on: http://stackoverflow.com/q/29232691
score: 0
type: QuestionComment
has text: Can you provide me with a sample json and a sample table row? I am displaying about 10.000 rows in a custom multi colum select box and I think I can modify my code for your needs.
type: Comment

http://stackoverflow.com/comment/46736209
comment on: http://stackoverflow.com/q/29266726
has text: How is the PHP coming into the page.... ? are this two files called separately ? -- in this case it will never work.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29254341
has body: It's because $ has a special meaning in regular expressions, which replace uses. See this question for more details: link
downvote count: 0
type: Answer
score: 2
answers question: http://stackoverflow.com/q/29254168
upvote count: 2

asp.net
tags question: http://stackoverflow.com/q/29372149
tags question: http://stackoverflow.com/q/29336247
tags question: http://stackoverflow.com/q/29241771
tags question: http://stackoverflow.com/q/29356848
tags question: http://stackoverflow.com/q/29294405
tags question: http://stackoverflow.com/q/29239496
tags question: http://stackoverflow.com/q/29343708
tags question: http://stackoverflow.com/q/29317358
tags question: http://stackoverflow.com/q/29243168
tags question: http://stackoverflow.com/q/29329018
tags question: http://stackoverflow.com/q/29354813
tags question: http://stackoverflow.com/q/29236137
tags question: http://stackoverflow.com/q/29314271
tags question: http://stackoverflow.com/q/29281129
tags question: http://stackoverflow.com/q/29365451
tags question: http://stackoverflow.com/q/29342649
tags question: http://stackoverflow.com/q/29253102
tags question: http://stackoverflow.com/q/29230254
tags question: http://stackoverflow.com/q/29237407
tags question: http://stackoverflow.com/q/29359761
tags question: http://stackoverflow.com/q/29292230
tags question: http://stackoverflow.com/q/29266036
tags question: http://stackoverflow.com/q/29365935
tags question: http://stackoverflow.com/q/29293348
tags question: http://stackoverflow.com/q/29284122
tags question: http://stackoverflow.com/q/29259764
tags question: http://stackoverflow.com/q/29371607
tags question: http://stackoverflow.com/q/29305900
tags question: http://stackoverflow.com/q/29346882
tags question: http://stackoverflow.com/q/29348970
tags question: http://stackoverflow.com/q/29365947
tags question: http://stackoverflow.com/q/29269208
tags question: http://stackoverflow.com/q/29274689
tags question: http://stackoverflow.com/q/29262866
tags question: http://stackoverflow.com/q/29276147
tags question: http://stackoverflow.com/q/29256359
tags question: http://stackoverflow.com/q/29331795
tags question: http://stackoverflow.com/q/29316459
tags question: http://stackoverflow.com/q/29291311
tags question: http://stackoverflow.com/q/29297426
tags question: http://stackoverflow.com/q/29298273
tags question: http://stackoverflow.com/q/29338759
tags question: http://stackoverflow.com/q/29279545
tags question: http://stackoverflow.com/q/29343373
type: Tag
tags question: http://stackoverflow.com/q/29257678
tags question: http://stackoverflow.com/q/29353970
tags question: http://stackoverflow.com/q/29287025
tags question: http://stackoverflow.com/q/29274416
tags question: http://stackoverflow.com/q/29319193
tags question: http://stackoverflow.com/q/29341425
tags question: http://stackoverflow.com/q/29221661
tags question: http://stackoverflow.com/q/29340405
tags question: http://stackoverflow.com/q/29301924
tags question: http://stackoverflow.com/q/29315807
tags question: http://stackoverflow.com/q/29291265
tags question: http://stackoverflow.com/q/29323432
tags question: http://stackoverflow.com/q/29280287
tags question: http://stackoverflow.com/q/29296661
tags question: http://stackoverflow.com/q/29340933
tags question: http://stackoverflow.com/q/29340891
tags question: http://stackoverflow.com/q/29308352
tags question: http://stackoverflow.com/q/29283632
tags question: http://stackoverflow.com/q/29305853
tags question: http://stackoverflow.com/q/29367803
tags question: http://stackoverflow.com/q/29363167
tags question: http://stackoverflow.com/q/29288087
tags question: http://stackoverflow.com/q/29295755
tags question: http://stackoverflow.com/q/29297826
tags question: http://stackoverflow.com/q/29299867
tags question: http://stackoverflow.com/q/29288114
tags question: http://stackoverflow.com/q/29356005
tags question: http://stackoverflow.com/q/29230233
tags question: http://stackoverflow.com/q/29299301
tags question: http://stackoverflow.com/q/29346288
tag name: asp.net
tags question: http://stackoverflow.com/q/29365677
tags question: http://stackoverflow.com/q/29261984
tags question: http://stackoverflow.com/q/29242548
tags question: http://stackoverflow.com/q/29364398

http://stackoverflow.com/a/29227630
has body: It has nothing to do with Angular, the reason it happens is because objects and arrays are passed by reference in JavaScript. you could use slice() to clone the array. $scope.array1_copy = $scope.array1[$scope.index].slice(); Read more here: http://orizens.com/wp/topics/javascript-arrays-passing-by-reference-or-by-value/
accepted answer of: http://stackoverflow.com/q/29227577
type: AcceptedAnswer
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29227577

http://stackoverflow.com/q/29314823
tagged with: phantomjs
has answer: http://stackoverflow.com/a/29315400
has body: I am in the process of writing a site scraper to grab some specific content from an ajax site with no actual links, only clickable text. I've only been using javascript for about a week now and am using CasperJS as it will cut out a lot of work. The problem I am finding is that I'm writing multiple functions which all do the same thing, just search for different links depending on the page it's on. So I have: function getLinks() { var links = document.querySelectorAll('div.AjaxLink h3'); return Array.prototype.map.call(links, function(link) { return link.innerText; }); } Its run via: casper.then(function() { var myLinks = this.evaulate(getLinks); /* ... link manipulation code code ... */ }); This works fine. I obviously don't want to have half a dozen functions which simply have a different query string. So what I want to do is: function getLinks(findText) { var links = document.querySelectorAll(findText); return Array.prototype.map.call(links, function(link) { return link.innerText; }); } Then I am trying to run it via: casper.then(function() { var myLinks = getLinks('div.AjaxLink h3'); /* ... link manipulation code code ... */ }); The findText variable is passed in properly but it appears the query selector always returns an empty NodeList. What am I doing wrong? Is document an empty document created inside that function?
has title: CasperJS querySelectorAll(variable) in function returns no results
upvote count: 4
downvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29315400
type: AnsweredQuestion
tagged with: selectors-api
favorite count: 0
tagged with: casperjs
type: Question
answer count: 1
score: 4

http://stackoverflow.com/comment/46856156
score: 0
type: Comment
has text: @Matteo Where is the typ0?
type: AnswerComment
comment on: http://stackoverflow.com/a/29333173

http://stackoverflow.com/q/29362087
has answer: http://stackoverflow.com/a/29362311
has comment: http://stackoverflow.com/comment/46907959
has comment: http://stackoverflow.com/comment/46907968
has title: validate an australian phone number
linked to: http://stackoverflow.com/q/11528017
tagged with: javascript
has comment: http://stackoverflow.com/comment/46907948
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/29362251
has body: I have been attempting to validate an australian phone number using javascript however it has been accepting everything. It needs to be 10 numbers long beginning with 0 accepting spaces: 02 4345 2334 and together 0243452334. I think the regex might be wrong or the code itself function PhoneNumberVal(form){ var phoneFormat= /^0[0-8]{2})\)?[ ]?([0-9]{4})[ ]?([0-9]{4})$/; var phoneLength = document.getElementById('phone').value.length; if(phoneFormat.test(phoneLength)) { return true; } else { alert("Not a valid phone number"); return false; } }
tagged with: regex
has answer: http://stackoverflow.com/a/29362276
type: UnansweredQuestion
type: Question

http://stackoverflow.com/a/29327620
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29327494
has body: If data can be an array of objects and sometimes an object itself without wrapping array you can still use $.each loop to handle both situations uniformly: just turn single object into array of one object and use $.each like you always use for array of multiple objects: data = [].concat(data); $.each(data, function() { // Do stuff with each object in the array }); If data is an array then [].concat will produce new similar array, otherwise if data is an object you will get [data]. Or you could also do it like this: data = data instanceof Array ? data : [data];
type: Answer
downvote count: 0
score: 3
has comment: http://stackoverflow.com/comment/46845189
answers question: http://stackoverflow.com/q/29327494
upvote count: 3

http://stackoverflow.com/comment/46679768
has text: Thanks man, but Parse still puts "too many recursive calls" error. After almost 4 hours I will just do workaround for this, because it's seems as a Parse issue
comment on: http://stackoverflow.com/a/29236130
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/29469309
has body: If you cannot find a preexisting solution then you would have to plugin your own for the platforms you require. There seems to be an NFC plugin which can form a starting point on how to build such a thing. You could use the seek-for-Android project as base to build your own API. In the simplest form you could just decide to make a port: basically copying the API into Cordoba. Note that all this may not be easy. Good luck.
score: 0
answers question: http://stackoverflow.com/q/29298275
type: Answer

http://stackoverflow.com/comment/46919018
has text: **Thank you**! I will read more about selections and understand my errors! This array reducing functions looks interesting - I will play a little bit with it.
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29368386
score: 0

http://stackoverflow.com/q/29361232
score: 4
favorite count: 0
tagged with: promise
tagged with: web-worker
upvote count: 4
type: AnsweredQuestion
type: Question
has body: For earlier browser versions, Promise is undefined in web workers. So I am using a polyfill Promise by importScripts('Promise.js'), if Promise is undefined. But still I get an undefined object in return. var promise; if(typeof Promise === undefined) { self.importScripts('./Promise.js').Promise; } promise = new Promise(function (resolve, reject) { var url = ajaxArgs.url || '', data = ajaxArgs.data || {}, type = ajaxArgs.method || 'GET', isGet = type === 'GET', request = new XMLHttpRequest(); ........ } How can I make this work for web workers?
has answer: http://stackoverflow.com/a/29361472
accepted answer: http://stackoverflow.com/a/29361472
has title: importScripts returns undefined in the web workers
answer count: 1
downvote count: 0
tagged with: javascript

http://stackoverflow.com/q/29340270
favorite count: 0
has comment: http://stackoverflow.com/comment/46867967
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
upvote count: 2
has answer: http://stackoverflow.com/a/29340693
downvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/29340314
has body: I have multiple div with same class. When a user taps on one div i have a slidetoggle() in that i have two buttons "accept" and "reject". Now when the user clicks on the accept or rejects i want that specific div to change colour to green or red based on accept or reject. But when i try to assign the colour all the div change colour. Is there anyway to change the colour of the specific div. $(document).on("pagecreate","#one1",function(){ $("div.comp2").on("tap",function(){ $("#panel").slideToggle("slow", function(){ $("#accept").on("click",function(){ $("div.comp2").css("background-color","#22bb45"); }); }); }); });
score: 1
has answer: http://stackoverflow.com/a/29340314
has comment: http://stackoverflow.com/comment/46868387
answer count: 2
has title: CSS for specific div with multiple div having same class
possible better answer: http://stackoverflow.com/a/29340693
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/29293929
type: Question
has title: Automated Design patterns c++
tagged with: javascript
tagged with: visual-studio-2010
has answer: http://stackoverflow.com/a/29294725
answer count: 1
downvote count: 0
favorite count: 0
type: UnansweredQuestion
has body: Is there a way to automate the creation of Design pattern classes in C++? Like an application or a script which takes some inputs and finally throws me a specific design pattern structure with .cpp and .h classes. I am not sure if I am being ambitious about getting one but something close to this would also do for me. I can modify it according to my requirement. Any help on this is appreciated. Thanks.
tagged with: unix
tagged with: c++
score: 1
tagged with: java
upvote count: 1

http://stackoverflow.com/comment/46739925
comment on: http://stackoverflow.com/q/29269276
score: 0
has text: http://jsfiddle.net/arunpjohny/13jujdtd/2/ - you have not shared the gameover function - can you create a simple demo of the problem
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46898472
score: 0
has text: this code snippet also has kendo-ui, which has it's own unique syntax issues....
comment on: http://stackoverflow.com/q/29355946
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29221864
type: Answer
upvote count: 2
answers question: http://stackoverflow.com/q/29219582
score: 2
has comment: http://stackoverflow.com/comment/46664183
downvote count: 0
has body: You could do something like this: run the jquery css command once for each image and apply it to an invisible div: HTML Project 1 Project 2 Project 3 JS $(document).ready(function() { console.log("ready!"); // preload all images into invisible preloadbox div $('.home-slider li a').each(function() { var src = $(this).attr('data-src'); $('#preloadbox').css('background-image', 'url(images/' + src + ')'); console.log(src + ' preloaded'); }); var tmp_src; $('.home-slider li').mouseover(function() { var src = $(this).find('a').attr('data-src'); console.log('src: ' + src); $('.content-area').css('background-image', 'url(images/' + src + ')'); tmp_src = src; }); $('.home-slider li').mouseout(function() { console.log('src: ' + tmp_src); $('.content-area').css('background-image', 'url(images/' + tmp_src + ')'); }); }); This approach won't slow down the rendering of the page since it runs once the DOM is ready. Also: in your existing code be careful because tmp_src may not yet be defined on mouseout.

http://stackoverflow.com/comment/46827573
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29317866
has text: So basically you want to get the dataURI from the file?

http://stackoverflow.com/a/29349054
has body: You access those arrays using: jsonOutput.red; jsonOutput.orange;
score: 1
has comment: http://stackoverflow.com/comment/46884123
has comment: http://stackoverflow.com/comment/46883808
answers question: http://stackoverflow.com/q/29349014
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/46884098
upvote count: 1

http://stackoverflow.com/a/29299698
answers question: http://stackoverflow.com/q/29299567
upvote count: 29
has comment: http://stackoverflow.com/comment/62215486
downvote count: 1
score: 28
has comment: http://stackoverflow.com/comment/46797185
has body: You can install all or part of Eclipse WTP in to your current Eclipse. To install just JSDT open 'Help > Install New Software...'. In "Work with" choose your main Eclipse site (http://download.eclipse.org/releases/luna for Eclipse Luna). Expand the 'Web, XML, Java EE and OSGi Enterprise Development' section and select 'JavaScript Development Tools' Click Next> to proceed with the install.
has comment: http://stackoverflow.com/comment/46796267
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/62187171
accepted answer of: http://stackoverflow.com/q/29299567
has comment: http://stackoverflow.com/comment/62196760
type: Answer

http://stackoverflow.com/comment/46720289
has text: @JLRishe assign is equivalent to Object.assign or _.assign
type: QuestionComment
comment on: http://stackoverflow.com/q/29248034
type: Comment
score: 0

http://stackoverflow.com/a/29258699
has body: function calculate() { var myBox1 = document.getElementById('box1').value; var myBox2 = document.getElementById('box2').value; var myBox3 = document.getElementById('box3').value; var result = document.getElementById('result'); var divide = (document.getElementById('changeValue').checked ? 35 : 25); var myResult = myBox1 * myBox2 * myBox3 / divide; result.value = myResult.toFixed(2) + ' eggs'; }
type: Answer
has comment: http://stackoverflow.com/comment/46721461
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/46722256
has comment: http://stackoverflow.com/comment/46722366
accepted answer of: http://stackoverflow.com/q/29258534
has comment: http://stackoverflow.com/comment/46722811
answers question: http://stackoverflow.com/q/29258534
upvote count: 2
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46722668

http://stackoverflow.com/comment/46867361
has text: see when i click on delete page will be refreshed and class will be added of thats fine but it will be removed once page refresh...i want that class to be added even after page load
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29339810
type: Comment

http://stackoverflow.com/comment/46792920
type: Comment
comment on: http://stackoverflow.com/a/29296616
score: 0
has text: Does exactly the same as my function; still loading the `audio` resource. I don't know what happens with `load()`...
type: AnswerComment

http://stackoverflow.com/comment/46725899
score: 0
type: Comment
has text: I'm not sure, but they're going to be the same regardless of the platform of your server. The link you provided lists one for Facebook. I'd recommend investigating that elsewhere.
comment on: http://stackoverflow.com/a/29261899
type: AnswerComment

http://stackoverflow.com/a/29311590
score: 1
answers question: http://stackoverflow.com/q/29262495
type: AcceptedAnswer
downvote count: 0
type: Answer
upvote count: 1
has body: Turns out that jenkins requires preemptive authentication, which means that all I ended up doing, was adding the 'beforeSend' option to the ajax call. $.ajax({ type: "POST", beforeSend: function (xhr){ xhr.setRequestHeader('Authorization', "Basic " + btoa("USERNAME" + ":" + "APITOKEN")); }, url: "Jenkins-Job-Url/build?token=TOKEN" });
accepted answer of: http://stackoverflow.com/q/29262495

http://stackoverflow.com/a/29351884
has body: This looks wrong: expirationDate.oldValue = newValue Instead you should be using the proper setValue() method on the datefield expirationDate.setValue(newValue);
has comment: http://stackoverflow.com/comment/46889175
has comment: http://stackoverflow.com/comment/46890518
has comment: http://stackoverflow.com/comment/46889110
score: 0
has comment: http://stackoverflow.com/comment/46889303
type: Answer
has comment: http://stackoverflow.com/comment/46890872
answers question: http://stackoverflow.com/q/29351723

http://stackoverflow.com/comment/46770857
comment on: http://stackoverflow.com/a/29243497
score: 0
type: AnswerComment
has text: Your goal is still unclear... do you need the link to change color, as it does when a user clicks?
type: Comment

http://stackoverflow.com/q/29219893
has answer: http://stackoverflow.com/a/29220313
downvote count: 3
type: Question
accepted answer: http://stackoverflow.com/a/29220313
upvote count: 0
answer count: 1
tagged with: javascript
has title: How to grab parts of URL and paste it somewhere on the page
favorite count: 0
score: -3
has comment: http://stackoverflow.com/comment/46648910
has body: I need a javascript (preferably) for my mediawiki website that will grab the end of the url, for example from http://aionpowerbook.com/powerbook/125004192 I would like it to grab the ID 125004192 and then add it somewhere on the same page like this &lt;a id="various3" href="http://aionpowerbook.com/view.php?item=placed_id"&gt; the begging would be static and the ID would be added after '?item=', which would result in: &lt;a id="various3" href="http://aionpowerbook.com/view.php?item=125004192"&gt; Is this even possible? Update: I had to edit your suggestions a little bit but at the end it worked &lt;a id="various3" /&gt; &lt;script type="text/javascript"&gt; var itemid = document.URL.split("/").slice(-1)[0]; var a = document.getElementById('various3'); if (a) { a.href = "http://aionpowerbook.com/view.php?item=" + itemid;; } &lt;/script&gt; Thank you.
tagged with: mediawiki
type: AnsweredQuestion

http://stackoverflow.com/a/29282339
downvote count: 2
has body: Here are two vanilla javascript options: A.: Iterate over the object's keys and delete those having a falsey value. var obj = { propA: true, propB: true, propC: false, propD: true, }; Object.keys(obj).forEach(key =&gt; { if (!obj[key]) delete obj[key]; }); console.log(obj); See Object.keys() and Array.prototype.forEach() B.: Iterate over the object's keys and add truthy values to a new object. var obj = { propA: true, propB: true, propC: false, propD: true, }; var filteredObj = Object.keys(obj).reduce((p, c) =&gt; { if (obj[c]) p[c] = obj[c]; return p; }, {}); console.log(filteredObj); See Object.keys() and Array.prototype.reduce()
type: Answer
upvote count: 39
answers question: http://stackoverflow.com/q/29282273
score: 37

http://stackoverflow.com/q/29361122
has comment: http://stackoverflow.com/comment/46941448
possible better answer: http://stackoverflow.com/a/29361344
has answer: http://stackoverflow.com/a/29361344
type: Question
tagged with: highcharts
tagged with: javascript
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/46913998
has answer: http://stackoverflow.com/a/29387376
accepted answer: http://stackoverflow.com/a/29387376
has title: How to remove the white outline/border on Highcharts 3D on setData?
tagged with: css
type: AnsweredQuestion
has body: I am loading a column chart in 3D with Highcharts. On the inital load, the chart works perfectly. When I use setData() to change the series, the chart gains an odd white outline around its edges. Before: After: I tried a few fixes such as using edgeColor and edgeWidth, although they made no difference. Note: If I hover over one of the columns, the outline is instantly removed on that particular item until setData() occurs again. How can I remove this white outline from the chart?

jenkins
tags question: http://stackoverflow.com/q/29230249
tag name: jenkins
tags question: http://stackoverflow.com/q/29266167
tags question: http://stackoverflow.com/q/29262495
tags question: http://stackoverflow.com/q/29371356
type: Tag

http://stackoverflow.com/a/29359461
has comment: http://stackoverflow.com/comment/46903265
type: Answer
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/29359402
has body: You are using the dot "." instead of comma "," among the very first two elements in myArray. You should use comma there as below. var myArray = ['One does not simply click the acorn','acorn spices all the rage with Martha Stewart', 'Once more into the acorn tree my friends','Acornbook launches as first acorn based social media'];
upvote count: 2

http://stackoverflow.com/q/29284516
tagged with: arrays
downvote count: 0
tagged with: javascript
tagged with: meteor
favorite count: 0
has comment: http://stackoverflow.com/comment/46767666
has title: MongoDB $pull not working
has comment: http://stackoverflow.com/comment/46767723
has comment: http://stackoverflow.com/comment/46767805
type: UnansweredQuestion
upvote count: 1
has answer: http://stackoverflow.com/a/29285242
score: 1
has comment: http://stackoverflow.com/comment/46767422
has body: I am building a Meteor app and I have Contests/Entries collections. When someone enters the contest, their user_id is pushed into the Contest.entered_users array with $addToSet. Here is the code: entryInsert: function(entryAttributes) { check(Meteor.userId(), String); check(entryAttributes, { contest_id: String }); var user = Meteor.user(); var entry = _.extend(entryAttributes, { user_id: user._id, user_name: user.profile.name, submitted: new Date(), submitted_day: moment().format('MMM D') }); var currentContest = Contests.findOne(entryAttributes.contest_id); // Check to make sure that the person has not already entered the giveaway if (currentContest.entered_users.indexOf(entry.user_id) !== -1) { throw new Meteor.Error('invalid', "You have already entered the giveaway"); } else { Contests.update( currentContest._id, { $addToSet: {entered_users: entry.user_id}, $inc: {entries: 1}} ); } // Create entry in order to get the entry id var entryId = Entries.insert(entry, function(err) { if (err) { alert(err.reason); } }); return { _id: entryId } } I want to remove a persons user_id from the Contest.entered_users array when an entry is removed. I am trying to use $pull but it doesn't appear to be working... When I remove an entry, the entry.user_id is still in the contest.entered_users array. Here is the relevant code: 'click .entry-delete': function(e, tmpl) { e.preventDefault(); var currentEntry = this; var currentEntryId = this._id; var contestId = Contests.findOne(currentEntry.contest_id); // Update the contest by removing the entry's useer_id from entered_users Meteor.call('contestRemoveEntry', contestId, currentEntry, function(error) { if (error) { alert(error.reason); } }); Meteor.call('entryRemove', currentEntryId, function(error) { if(error) { alert(error.reason); } }); } Here is the contestRemoveEntry method: contestRemoveEntry: function(contestId, currentEntry) { Contests.update({ _id: contestId }, { $pull: { entered_users: currentEntry.user_id } } ); } Any idea…
type: Question
tagged with: mongodb
has comment: http://stackoverflow.com/comment/46767508
answer count: 1

http://stackoverflow.com/q/29241898
has answer: http://stackoverflow.com/a/29241973
type: AnsweredQuestion
type: Question
accepted answer: http://stackoverflow.com/a/29241973
has title: Can't identify source code for validation message
has comment: http://stackoverflow.com/comment/46689823
tagged with: javascript
tagged with: jquery
has body: I'm using a free Bootstrap theme. It has a contact form that automatically validates the email field and produces a corresponding tooltip error message. I want to disable this validation but I can't identify it in the source code. Live example: Link Code: &lt;input type="email" title="Please enter a valid email address" placeholder="Enter email" id="email" name="email" class="form-control"&gt; To reproduce: Go to link. Click "CONTACT US" link or scroll to page bottom. Input "x" into the email field. Click submit button. What I've tried: I've searched all documents for the terms "email" and the provided error message. "email" led me to a modernizr document that has "prebaked" email validation. I removed the appropriate code to no avail. Searching for the provided error message yielded no results. I've also reviewed the console via Firebug when submitting the form but nothing seems to be occurring. How can I identify the required source code in order to disable it?
score: 0
tagged with: validation
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: email
has comment: http://stackoverflow.com/comment/46690299

http://stackoverflow.com/q/29364260
has title: Extract Property value from NodeList
type: Question
has comment: http://stackoverflow.com/comment/46911746
score: 0
has answer: http://stackoverflow.com/a/29364582
has body: Inside a javascript function Im accessing a text box with a value of 'c29TMlzE4vmFlJHieICpso_u04oa'. Below is the javascript function i'm using. function test(){ var txt = document.getElementsByName("consumerKey"); alert(txt.item[0].getPropertyValue); } The alert shows as 'undefined'. In console I'm getting below as NodeList value of the txt. NodeList[input#consumerKey property value ="c29TMlzE4vmFlJHieICpso_u04oa" attribute value = "null"] How can I extract 'c29TMlzE4vmFlJHieICpso_u04oa' from the nodelist. Thanks
answer count: 1
accepted answer: http://stackoverflow.com/a/29364582
type: AnsweredQuestion
tagged with: javascript

http://stackoverflow.com/comment/46713825
type: QuestionComment
comment on: http://stackoverflow.com/q/29254989
score: 0
type: Comment
has text: wordSearch is from the class=wordSearch patrick

http://stackoverflow.com/q/29281070
has title: How not to display / filter out special characters? (CSS or Javascript)
possible better answer: http://stackoverflow.com/a/29281356
score: 0
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29281406
tagged with: hide
tagged with: special-characters
type: Question
has body: I'm getting HTML content from a JSON file. The JSON file returns attributes name and description. The name is clean data, like "Cheese burger". But the description looks like this ["Mozarella","Pepperoni","Cheese","Beef","Ketchup"]. Is it possible to tell CSS not to display the special characters: [", Is it possible to filter out the special characters with javascript / AngularJS?
tagged with: javascript
answer count: 3
has answer: http://stackoverflow.com/a/29281356
has answer: http://stackoverflow.com/a/29281169
tagged with: css
has answer: http://stackoverflow.com/a/29281406
tagged with: angularjs

recursion
type: Tag
tags question: http://stackoverflow.com/q/29341039
tags question: http://stackoverflow.com/q/29218317
tags question: http://stackoverflow.com/q/29371863
tags question: http://stackoverflow.com/q/29269701
tag name: recursion
tags question: http://stackoverflow.com/q/29254570
tags question: http://stackoverflow.com/q/29312432
tags question: http://stackoverflow.com/q/29273090
tags question: http://stackoverflow.com/q/29272002

http://stackoverflow.com/comment/46769613
type: Comment
comment on: http://stackoverflow.com/a/29284443
score: 0
type: AnswerComment
has text: @Roamer-1888: Hm, I think it's just the same idea as in your answer - only simpler and shorter.

http://stackoverflow.com/q/29242727
has title: How to make text rotate inside a div upon page refresh without using jQuery?
answer count: 1
downvote count: 0
tagged with: jquery
has body: I have a div : This text rotates upon page refresh I am trying to figure out how to make the text rotate inside the div upon page refresh; however, I don't want use any sort of jquery plug in to do achieve it. If i have the following jQuery code: jQuery.fn.rotate = function(degrees) { $(div).css({'-webkit-transform' : 'rotate('+ degrees +'deg)', '-moz-transform' : 'rotate('+ degrees +'deg)', '-ms-transform' : 'rotate('+ degrees +'deg)', 'transform' : 'rotate('+ degrees +'deg)'}); return $(this); }; How can I specify inside the jquery that it is the text I want to rotate and not the div. I am trying to accomplish this without the use of tags.
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46691507
tagged with: css
score: 1
has answer: http://stackoverflow.com/a/29243032
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/46691470
tagged with: javascript
has comment: http://stackoverflow.com/comment/46691966

http://stackoverflow.com/q/29260117
has comment: http://stackoverflow.com/comment/46722693
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46725060
type: Question
has comment: http://stackoverflow.com/comment/46742667
duplicate of: http://stackoverflow.com/q/14028959
has comment: http://stackoverflow.com/comment/46722474
tagged with: dom
score: 0
has comment: http://stackoverflow.com/comment/46722849
tagged with: canvas
has body: I am a kind of newbie to the canvas. I am trying to hard code a html page to display different diagrams. For this I am having a html page like this: and the login.js like: currentPage={}; currentPage.init = function() { WL.Logger.debug("report :: init"); }; currentPage.displaychart=function(){ WL.Logger.debug("payment :: loadGenReportPage"); pagesHistory.push(path + "pages/chart.html"); $("#pagePort").load(path + "pages/chart.html"); loadSQLRecords(); }; function loadSQLRecords(){ var ctx = $('#myCanvas').get(0).getContext('2d'); // Box1-ESPS P1 ctx.beginPath(); ctx.lineWidth = "1"; ctx.strokeStyle = "black"; ctx.rect(5, 5, 100, 100); ctx.stroke(); } and the chart.html page is: But, I am getting an error that TypeError: $(...).get(...) is undefined. Can anyone please let me know my mistake here?
tagged with: javascript
linked to: http://stackoverflow.com/q/14028959
has comment: http://stackoverflow.com/comment/46742645
has comment: http://stackoverflow.com/comment/46724755
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46722497
has title: TypeError: $(...).get(...) is undefined

http://stackoverflow.com/q/29223121
tagged with: datepicker
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29223930
has comment: http://stackoverflow.com/comment/46656098
upvote count: 1
accepted answer: http://stackoverflow.com/a/29223930
type: Question
tagged with: angularjs-directive
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46655167
score: 1
has comment: http://stackoverflow.com/comment/46655401
has title: injecting angular ui bootstrap into app.js, but the datepicker is not showing in view
has body: I'm trying to configure a datepicker using the angular-ui-bootstrap plugin. I've downloaded and installed everything ok, but now the datepicker isn't showing in my view. I'm not getting any errors - it just doesn't render out in the view. I'm new to angular so a little lost. Here is my code: app.js - I'm injecting the datepicker here. angular.module('MyApp', ['ngResource', 'mgcrea.ngStrap', 'stripe', 'ui.router','ui.bootstrap', 'ui.bootstrap.datepicker', 'ngAnimate']) .config(['$locationProvider', '$stateProvider', '$urlRouterProvider', function($locationProvider, $stateProvider, stripeProvider, $urlRouterProvider){ $locationProvider.html5Mode(true); $stateProvider // route to show our basic form (/form) .state('form', { url: '/', templateUrl: 'views/home.html', controller: 'formController' }) blah blah Then the controller: angular.module('MyApp') .controller('formController', ['$scope', 'Appointment', function($scope, Appointment) { //for the date picker directives $scope.dateTimeNow = function() { $scope.date = new Date(); }; $scope.dateTimeNow(); $scope.toggleMinDate = function() { $scope.minDate = $scope.minDate ? null : new Date(); }; $scope.maxDate = new Date('2014-06-22'); $scope.toggleMinDate(); $scope.dateOptions = { startingDay: 1, showWeeks: false }; // Disable weekend selection $scope.disabled = function(calendarDate, mode) { return mode === 'day' && ( calendarDate.getDay() === 0 || calendarDate.getDay() === 6 ); }; $scope.hourStep = 1; $scope.minuteStep = 15; $scope.timeOptions = { hourStep: [1, 2, 3], minuteStep: [1, 5, 10, 15, 25, 30] }; $scope.showMeridian = true; $scope.timeToggleMode = function() { $scope.showMeridian = !$scope.showMeridian; }; $scope.resetHours = function() { $scope.date.setHours(1); }; }]); index.html html for datepicker: I'm also including 1) the stylesheet 2) the datepicker.js 3) all of bootstrap etc. in the index.html What could i have missed?
downvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/46655692

scrypt
tags question: http://stackoverflow.com/q/29268935
tag name: scrypt
type: Tag

http://stackoverflow.com/comment/46814405
score: 1
comment on: http://stackoverflow.com/a/29282888
type: AnswerComment
has text: There's no "make a filter that follows this hand-drawn curve", no. You could make a UI that enabled multiple notch filters, and use the getFrequencyResponse() method on BiquadFilterNode to figure out what the curve should look like.
type: Comment

http://stackoverflow.com/q/29328686
accepted answer: http://stackoverflow.com/a/29346918
score: 3
tagged with: javascript
downvote count: 0
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/29346918
tagged with: node.js
tagged with: generator
tagged with: telnet
type: AnsweredQuestion
tagged with: frp
upvote count: 3
has body: I'm using a nodejs telnet implementation which uses an event to provide notification each time data is received from a telnet client, which can be subscribed as follows: client.on('data', [callback]); I'm also using a generator runner (generator-runner on npm) to execute workflows. The problem I'm having is that yielding values in this way requires something more like a promise: a single delegate passed on to process a single value. How would I go about writing a function which could be placed in the generator yield statements, and could be repeated every time I want to yield more input? I've tried using Baconjs for this, but I don't think there's a way to block waiting for a single value on a stream, at least I can't find such a method. I'm open to any advice. My only real requirement is that I be able to place my workflows in a flat block of code without chaining promises. Here's the code I've got mocked up, which simply doesn't work: var requirejs = require('requirejs'); requirejs(['telnet', 'baconjs', 'colourise', 'lodash', 'generator-runner'], function(Telnet, Bacon, Colourise, _, Async) { var configureClient = client =&gt; { client.do.transmit_binary(); }; Telnet.createServer(client =&gt; { var session = { connectedAt: Date.now(), user: { } }, write = _.compose(_.bind(client.write, client), Colourise.encode), readStream = Bacon.fromBinder(function (sink) { client.on('data', function (data) { sink({ client : client, data : data, session : session }); })}), read = () =&gt; readStream.take(1).toPromise(); configureClient(client); write("%xxWelcome!\r\n") Async(function*(){ write("Username: "); var user = yield read(); console.write("Username entered: " + user); write("Password: "); var password = yield read(); console.write("Password entered: " + password); }); }).listen(8100); });
type: Question
has title: Preparing a function to repeatedly use in a generator runner

http://stackoverflow.com/comment/46688083
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29240985
has text: What is your problem?

http://stackoverflow.com/comment/46802751
type: Comment
type: QuestionComment
has text: Are you sure that the element is visible? Take a screenshot with `casper.capture()`
score: 0
comment on: http://stackoverflow.com/q/29300622

http://stackoverflow.com/a/29354061
accepted answer of: http://stackoverflow.com/q/29311884
has comment: http://stackoverflow.com/comment/46930537
has comment: http://stackoverflow.com/comment/46934945
has comment: http://stackoverflow.com/comment/46919462
score: 4
has comment: http://stackoverflow.com/comment/46938790
has comment: http://stackoverflow.com/comment/46942081
upvote count: 4
has body: Android doesn't have a native PDF viewer in its browser, so it doesn't really know what to do with that PDF link, which means you'll need to download it yourself. One solution would be to use Cordova's File and File Transfer plugins. Here's a complete working example from scratch that downloads a PDF that I've parked on a server and allows the user to open it in a reader app, you can test this as follows. Open a command prompt in the directory where you keep your source code and: Create a Cordova project and move into the project directory. At the command prompt, type: cordova create hello com.example.hello HelloWorld cd hello In the www directory inside the project directory, replace the entire contents of the www/index.html file with: Hello World Download PDF In the project directory, at the command prompt, type cordova plugin add org.apache.cordova.file-transfer to add the File Transfer plugin. In the project directory, at the command prompt, type cordova plugin add org.apache.cordova.file to add the File plugin. In the project directory, at the command prompt, type cordova plugin add https://github.com/pwlin/cordova-plugin-file-opener2 to add the File Opener plugin. In the project directory, at the command prompt, type cordova run android to build and deploy the app to the emulator or your device. In the emulator or on the device, wait until you see the Got deviceready alert and dismiss it; the plugins are now available for use. In the emulator or on the device, click the Download PDF button. You should see a "Download complete" dialog. Dismiss the dialog, and you should get another asking you to select the app to use to open the PDF file.
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46929752
downvote count: 0
has comment: http://stackoverflow.com/comment/46934710
answers question: http://stackoverflow.com/q/29311884
type: Answer
has comment: http://stackoverflow.com/comment/46926443
has comment: http://stackoverflow.com/comment/46894948

http://stackoverflow.com/a/39165137
has comment: http://stackoverflow.com/comment/96896412
has comment: http://stackoverflow.com/comment/96861272
has comment: http://stackoverflow.com/comment/94606348
downvote count: 0
has comment: http://stackoverflow.com/comment/134075915
type: Answer
has comment: http://stackoverflow.com/comment/94259865
has comment: http://stackoverflow.com/comment/109449303
has comment: http://stackoverflow.com/comment/117270021
has comment: http://stackoverflow.com/comment/96379244
upvote count: 194
has comment: http://stackoverflow.com/comment/109486894
score: 194
has comment: http://stackoverflow.com/comment/74525686
answers question: http://stackoverflow.com/q/29321742
has comment: http://stackoverflow.com/comment/109450290
has body: Here's the helper I use: (updated to work for React <16 and 16+) function FindReact(dom, traverseUp = 0) { const key = Object.keys(dom).find(key=>{ return key.startsWith("__reactFiber$") // react 17+ || key.startsWith("__reactInternalInstance$"); // react <17 }); const domFiber = dom[key]; if (domFiber == null) return null; // react <16 if (domFiber._currentElement) { let compFiber = domFiber._currentElement._owner; for (let i = 0; i < traverseUp; i++) { compFiber = compFiber._currentElement._owner; } return compFiber._instance; } // react 16+ const GetCompFiber = fiber=>{ //return fiber._debugOwner; // this also works, but is __DEV__ only let parentFiber = fiber.return; while (typeof parentFiber.type == "string") { parentFiber = parentFiber.return; } return parentFiber; }; let compFiber = GetCompFiber(domFiber); for (let i = 0; i < traverseUp; i++) { compFiber = GetCompFiber(compFiber); } return compFiber.stateNode; } Usage: const someElement = document.getElementById("someElement"); const myComp = FindReact(someElement); myComp.setState({test1: test2}); Note: This version is longer than the other answers, because it contains code to traverse-up from the component directly wrapping the dom-node. (without this code, the FindReact function would fail for some common cases, as seen below) Bypassing in-between components Let's say the component you want to find (MyComp) looks like this: class MyComp extends Component { render() { return ( Element actually rendered to dom-tree. ); } } In this case, calling FindReact(target) will (by default) return the InBetweenComp instance instead, since it's the first component ancestor of the dom-element. To resolve this, increase the traverseUp argument until you find the component you wanted: const target = document.getElementById("target"); const myComp = FindReact(target, 1); // provide traverse-up distance here For more details on traversing the React component tree, see here. Function components Function components don't have …
has comment: http://stackoverflow.com/comment/67109899

http://stackoverflow.com/a/29240848
has comment: http://stackoverflow.com/comment/46690233
type: Answer
has body: You need to use arc() function and understand its working Syntax of arc function is arc(x, y, radius, startAngle, endAngle, counterClockwise); Working Demo for your scenario : var canvas = document.getElementById('myCanvas'); var context = canvas.getContext('2d'); function draw(radius,color){ var x = canvas.width / 2; var y = canvas.height / 2; var radius = radius; var startAngle =0; var endAngle = 2 * Math.PI; var counterClockwise = false; context.beginPath(); context.arc(x, y, radius, startAngle, endAngle, counterClockwise); context.lineWidth = 15; // line color context.strokeStyle = color; context.stroke(); } draw(75,"yellow"); draw(65,"red"); draw(55,"green"); &lt;canvas id="myCanvas" width="578" height="250"&gt;&lt;/canvas&gt;
upvote count: 1
has comment: http://stackoverflow.com/comment/46690179
score: 1
answers question: http://stackoverflow.com/q/29240391
downvote count: 0

http://stackoverflow.com/comment/46847281
type: Comment
has text: I dont know this plugin, do you have access to the ajax call .js?
comment on: http://stackoverflow.com/a/29328596
score: 0
type: AnswerComment

http://stackoverflow.com/comment/46816828
has text: Increase the quality of your question(s) by providing a descriptive title and a proper explanation of the issue. A future reader will have a hard tim trying to identify whether they have the same problem as you, because you don't actually describe the problem. All you are saying is "my code doesn't". Guess what? Most people that ask a question here have code that doesn't work.
comment on: http://stackoverflow.com/q/29311401
score: 1
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/46716362
has text: are look aheads and look behinds supported in javascript?
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29256853

http://stackoverflow.com/tag/html
tags question: http://stackoverflow.com/q/29335410
tags question: http://stackoverflow.com/q/29294707
tags question: http://stackoverflow.com/q/29298705
tags question: http://stackoverflow.com/q/29246640
tags question: http://stackoverflow.com/q/29332892
tags question: http://stackoverflow.com/q/29292395
tags question: http://stackoverflow.com/q/29311643
tags question: http://stackoverflow.com/q/29251545
tags question: http://stackoverflow.com/q/29236739
tags question: http://stackoverflow.com/q/29326356
tags question: http://stackoverflow.com/q/29306931
tags question: http://stackoverflow.com/q/29330786
tags question: http://stackoverflow.com/q/29238549
tags question: http://stackoverflow.com/q/29348087
tags question: http://stackoverflow.com/q/29297664
tags question: http://stackoverflow.com/q/29255649
tags question: http://stackoverflow.com/q/29309495
tags question: http://stackoverflow.com/q/29218849
tags question: http://stackoverflow.com/q/29257331
tags question: http://stackoverflow.com/q/29371931
tags question: http://stackoverflow.com/q/29360463
tags question: http://stackoverflow.com/q/29317741
tags question: http://stackoverflow.com/q/29266988
tags question: http://stackoverflow.com/q/29234200
tags question: http://stackoverflow.com/q/29343925
tags question: http://stackoverflow.com/q/29227457
tags question: http://stackoverflow.com/q/29250667
tags question: http://stackoverflow.com/q/29230219
tags question: http://stackoverflow.com/q/29309804
tags question: http://stackoverflow.com/q/29272414
tags question: http://stackoverflow.com/q/29235608
tags question: http://stackoverflow.com/q/29321589
tags question: http://stackoverflow.com/q/29339921
tags question: http://stackoverflow.com/q/29367025
tags question: http://stackoverflow.com/q/29318678
tags question: http://stackoverflow.com/q/29329520
tags question: http://stackoverflow.com/q/29243553
tags question: http://stackoverflow.com/q/29343276
tags question: http://stackoverflow.com/q/29287481
tags question: http://stackoverflow.com/q/29335256
tags question: http://stackoverflow.com/q/29277681
tags question: http://stackoverflow.com/q/29233117
tags question: http://stackoverflow.com/q/29270637
tags question: http://stackoverflow.com/q/29231777
tags question: http://stackoverflow.com/q/29295946
tags question: http://stackoverflow.com/q/29266768
tags question: http://stackoverflow.com/q/29362694
tags question: http://stackoverflow.com/q/29317100
tags question: http://stackoverflow.com/q/29334744
tags question: http://stackoverflow.com/q/29280590
tags question: http://stackoverflow.com/q/29333197
tags question: http://stackoverflow.com/q/29248617
tags question: http://stackoverflow.com/q/29270598
tags question: http://stackoverflow.com/q/29262597
tags question: http://stackoverflow.com/q/29319431
tags question: http://stackoverflow.com/q/29333753
tags question: http://stackoverflow.com/q/29347460
tags question: http://stackoverflow.com/q/29353032
tags question: http://stackoverflow.com/q/29365369
tags question: http://stackoverflow.com/q/29237106
tags question: http://stackoverflow.com/q/29218645
tags question: http://stackoverflow.com/q/29290677
tags question: http://stackoverflow.com/q/29346271
tags question: http://stackoverflow.com/q/29249913
tags question: http://stackoverflow.com/q/29291747
tags question: http://stackoverflow.com/q/29288671
tags question: http://stackoverflow.com/q/29271138
tags question: http://stackoverflow.com/q/29259866
tags question: http://stackoverflow.com/q/29255899
tags question: http://stackoverflow.com/q/29220657
tags question: http://stackoverflow.com/q/29253831
tags question: http://stackoverflow.com/q/29230518
tags question: http://stackoverflow.com/q/29257579
tags question: http://stackoverflow.com/q/29227926
tags question: http://stackoverflow.com/q/29263655
tags question: http://stackoverflow.com/q/29306149
tags question: http://stackoverflow.com/q/29240420
tags question: http://stackoverflow.com/q/29317198
tags question: http://stackoverflow.com/q/29257452
tags question: http://stackoverflow.com/q/29366773

http://stackoverflow.com/q/29270637
has body: I am trying to setup a wizard-style theme on one of my pages for building a profile, and I want to be able to toggle the class of the pill nav on bootstrap by clicking next, although I am not entirely sure how to do so. My nav for the tabs layout is like this: aaa bbb ccc ddd My buttons look something like this, and they work, but they don't toggle the "active" class on the corresponding nav-pills: Next Is there a way I an target the nav-pills to toggle the active class?
tagged with: javascript
has answer: http://stackoverflow.com/a/47628021
answer count: 1
downvote count: 0
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has title: Button Click in Bootstrap, how to toggle class of nav?
tagged with: twitter-bootstrap
score: 1
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/46742760

http://stackoverflow.com/comment/46806655
has text: @Quentin that example doesn't make use of Range
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29305889

http://stackoverflow.com/a/29551926
type: Answer
score: 0
answers question: http://stackoverflow.com/q/29275912
has body: You should be able to get most of what you want with params. Params additions would be: NetworkInterfaces: [{DeviceIndex:0, SubnetId: 'subnet-12345', AssociatePublicIpAddress:true, Groups: ['sg-12345']}], KeyName: 'MyKey' The only thing you can't really get with the ec2-runInstances is tag creation. That would come from a second api call within the first function, like so: params = {Resources: [data['instanceId']], Tags: [ {Key: 'Name', Value: 'SomeName-' + data['instanceId']}, {Key: 'Project', Value: 'My Project'}, {Key: 'SubProject', Value: 'SpotInstanceAuto'}, {Key: 'Creator', Value: 'Jason Nichols'}, ... ]}; ec2.createTags(params, function(err) { console.log("Tagging instance", err ? "failure" : "success"); ... });

http://stackoverflow.com/q/29310064
downvote count: 0
tagged with: html5-audio
answer count: 0
type: Question
score: 1
tagged with: javascript
has body: i created an script that plays an audio file in your browser and analyse the frequency. With this frequency data it creates a graphic based on the data. It works fine in Google Chrome [Desktop] but in the Google Chrome on Android the analyzer.getByteFrequencyData() function returns a Uint8Array but all the data is set to 0. I don't understand why, because its the same code in the same browser. And if i am trying to debug this website with the chrome usb debugging the console show me no errors and the analyzer obj exists. Here is my code: var player = null; window.onload = function(){ player = document.getElementById("audio"); player.volume = 0.2; player.children[0].src = "music.mp3"; player.load(); player.addEventListener("canplay", function(){player.play();}); context = new AudioContext(); analyser = context.createAnalyser(); canvas = document.getElementById('analyser_render'); ctx = canvas.getContext('2d'); ctx.canvas.width = window.innerWidth; ctx.canvas.height = window.innerHeight; source = context.createMediaElementSource(player); source.connect(analyser); analyser.connect(context.destination); frameLooper(); } function frameLooper(){ fbc_array = new Uint8Array(analyser.frequencyBinCount); analyser.getByteFrequencyData(fbc_array); ctx.clearRect(0, 0, canvas.width, canvas.height); for (var i = 0; i &lt; window.innerWidth/3; i++) { var grd = ctx.createLinearGradient(i*3,0,i*3,window.innerHeight+100); grd.addColorStop(0,"#00f"); grd.addColorStop(1,"#f00"); ctx.fillStyle = grd; ctx.fillRect(i * 3, canvas.height, 2, fbc_array[i] *-2); } window.requestAnimationFrame(frameLooper); } Live Demo (This example have additionally an file picker) Have someone the same problem or is there an mistake in my code ?
tagged with: api
upvote count: 1
has comment: http://stackoverflow.com/comment/56555821
favorite count: 0
type: UnansweredQuestion
has title: JavaScript Audio API bug in Google Chrome [mobile]

http://stackoverflow.com/a/29335143
answers question: http://stackoverflow.com/q/29334959
score: 0
type: AcceptedAnswer
has body: If your question is why Liabilities and Preferred Stock are being concatenated as strings then it's because you are missing the type attributes on your &lt;input /&gt; tags. If those values are supposed to be numbers then use type="number" like in the first example here.
type: Answer
accepted answer of: http://stackoverflow.com/q/29334959

http://stackoverflow.com/q/29313688
has title: Submitting Form and getting data from fields/radio/checkbox/textareas using javascript
tagged with: http://stackoverflow.com/tag/html
tagged with: checkbox
score: 0
answer count: 2
tagged with: forms
has answer: http://stackoverflow.com/a/29313721
has answer: http://stackoverflow.com/a/29313803
tagged with: javascript
type: UnansweredQuestion
has body: I have created a form and I am looking to get the data the user entered. The javascript I have so far pulls in all the data. But also pulls both radio buttons although only one is checked. Q1 How do I restrict the loop to not pull in both radio buttons but only the selected one? Q2 How do I get if the check box is checked or not? Q3 How do I get the data from a textarea? Thanks in Advance, JS var myNodeList = document.getElementsByName('cf'); var myArray = []; // empty Array for (var i = 0; i < myNodeList.length; i++) { var self = myNodeList[i]; myArray.push(self); } console.log(myArray) HTML Contact Me Name: Email: Phone: Status: Client Partner Vendor Send me your newsletter Sales Support Message: Send Reset
tagged with: radio-button
type: Question

http://stackoverflow.com/q/29243168
tagged with: jquery
tagged with: ajax
score: 0
linked to: http://stackoverflow.com/q/9178911
answer count: 1
has body: Usually all combo box will be display top to bottom, But i want to know how display bottom to top approach. I am using telerik asp.net AJAX UI controls. Or suggest me some other way to show. Thanks
tagged with: asp.net
has comment: http://stackoverflow.com/comment/46696393
has answer: http://stackoverflow.com/a/29245944
type: UnansweredQuestion
tagged with: telerik
type: Question
has title: Any one know how to create combo box bottom to top in asp.net telerik asp.net AJAX UI
tagged with: javascript

http://stackoverflow.com/q/29225834
type: Question
has title: Where are variables in a closure stored - stack or heap?
answer count: 1
has body: Like the following codes: var foo = function() { var a = 1; // closure var return function() { // closure fun console.log(a); } }; var bar = foo(); When foo exits(or say, returns), we know that the variable a will not be destroyed and remains in memory(that's why closure works). So my problem is where does the the variable a store, stack or heap?
downvote count: 0
tagged with: javascript
tagged with: heap-memory
has answer: http://stackoverflow.com/a/29226388
favorite count: 0
accepted answer: http://stackoverflow.com/a/29226388
score: 31
type: AnsweredQuestion
upvote count: 31
tagged with: closures
tagged with: stack-memory
linked to: http://stackoverflow.com/q/26061856

http://stackoverflow.com/q/29258072
has body: I have the following code: var t = 13; function check() { if ((t &gt;= 12) &amp;&amp; (t &lt; 20)) { alert(true); } } Which I want to convert to switch statement. I have tried this: function test() { switch (t) { case (t &gt;= 12) &amp;&amp; (t &lt;= 20): alert("&gt; 12"); break; } } But it doesn't work.I get no errors via the console.Any Ideas? Actually this question came after comparison with Pascal where i can do this: case t of 12..19://code end; which is equal to if (t&gt;=12) and (t&lt;=19) then //code
score: 0
has answer: http://stackoverflow.com/a/29258166
answer count: 2
has comment: http://stackoverflow.com/comment/46718646
duplicate of: http://stackoverflow.com/q/3463833
favorite count: 0
has comment: http://stackoverflow.com/comment/46718615
duplicate of: http://stackoverflow.com/q/5619832
has answer: http://stackoverflow.com/a/29258219
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/3463833
accepted answer: http://stackoverflow.com/a/29258219
possible better answer: http://stackoverflow.com/a/29258166
has comment: http://stackoverflow.com/comment/46718668
upvote count: 1
downvote count: 1
tagged with: switch-statement
type: Question
has comment: http://stackoverflow.com/comment/46718836
has title: convert if((t >= 12) && (t<20)){} to switch
tagged with: if-statement
linked to: http://stackoverflow.com/q/5619832
tagged with: javascript
has comment: http://stackoverflow.com/comment/46718808

http://stackoverflow.com/comment/46851873
comment on: http://stackoverflow.com/a/29331306
type: Comment
score: 0
has text: Thanks for an answer. I tried your code, but now the alert says "undefined" instead of showing url
type: AnswerComment

http://stackoverflow.com/a/29363393
answers question: http://stackoverflow.com/q/29362600
downvote count: 0
score: 1
type: Answer
upvote count: 1
has body: you can use the angular $window. just like sms said in previous answer for redirection. Another way is through Routing - ngRoute or ui-router

http://stackoverflow.com/q/29368857
tagged with: viewport
has title: executing script only when script is in viewport
tagged with: jquery
type: Question
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46919326
score: 0
answer count: 1
has body: How could I execute a JavaScript, on a page, only when the script itself it is in the browser viewport, meaning: imagine I have a script at the bottom of the page and I would like that script to load only when the user scroll the page all the way to the end. I have found some stuff if you want to load images, but not for scripts: http://luis-almeida.github.io/unveil/ Any Idea if that's possible at all? cheers
has answer: http://stackoverflow.com/a/29369132
tagged with: javascript
type: UnansweredQuestion

http://stackoverflow.com/q/29239835
linked to: http://stackoverflow.com/q/218384
answer count: 1
tagged with: javascript
duplicate of: http://stackoverflow.com/q/218384
score: 0
tagged with: android
tagged with: sqlite
has answer: http://stackoverflow.com/a/29240085
has title: Exception while inserting data into SQLite storage in android
type: AnsweredQuestion
tagged with: java
has body: Hey i am trying to insert data into sqLite on button OnClick but getting the following exception: Logcat: 03-24 17:54:14.773: D/AndroidRuntime(1579): --------- beginning of crash 03-24 17:54:14.774: E/AndroidRuntime(1579): FATAL EXCEPTION: main 03-24 17:54:14.774: E/AndroidRuntime(1579): Process: com.snappy.stevekamau.cosmeticsapp, PID: 1579 03-24 17:54:14.774: E/AndroidRuntime(1579): java.lang.IllegalStateException: Could not execute method of the activity 03-24 17:54:14.774: E/AndroidRuntime(1579): at android.view.View$1.onClick(View.java:4007) 03-24 17:54:14.774: E/AndroidRuntime(1579): at android.view.View.performClick(View.java:4756) 03-24 17:54:14.774: E/AndroidRuntime(1579): at android.view.View$PerformClick.run(View.java:19749) 03-24 17:54:14.774: E/AndroidRuntime(1579): at android.os.Handler.handleCallback(Handler.java:739) 03-24 17:54:14.774: E/AndroidRuntime(1579): at android.os.Handler.dispatchMessage(Handler.java:95) 03-24 17:54:14.774: E/AndroidRuntime(1579): at android.os.Looper.loop(Looper.java:135) 03-24 17:54:14.774: E/AndroidRuntime(1579): at android.app.ActivityThread.main(ActivityThread.java:5221) 03-24 17:54:14.774: E/AndroidRuntime(1579): at java.lang.reflect.Method.invoke(Native Method) 03-24 17:54:14.774: E/AndroidRuntime(1579): at java.lang.reflect.Method.invoke(Method.java:372) 03-24 17:54:14.774: E/AndroidRuntime(1579): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899) 03-24 17:54:14.774: E/AndroidRuntime(1579): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694) 03-24 17:54:14.774: E/AndroidRuntime(1579): Caused by: java.lang.reflect.InvocationTargetException 03-24 17:54:14.774: E/AndroidRuntime(1579): at java.lang.reflect.Method.invoke(Native Method) 03-24 17:54:14.774: E/AndroidRuntime(1579): at java.lang.reflect.Method.invoke(Method.java:372) 03-24 17:54:14.774: E/AndroidRuntime(1579): at android.view.View$1.onClick(View.java:4002) 03-24 17:54:14.774: E/AndroidRuntime(1579): ... 10 more 03-…
type: Question
accepted answer: http://stackoverflow.com/a/29240085

http://stackoverflow.com/comment/46727269
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29262429
score: 0
has text: @StephenP yeah, that's true. should I delete my question? That solves.

http://stackoverflow.com/a/29232623
upvote count: 3
score: 3
has comment: http://stackoverflow.com/comment/115081021
downvote count: 0
has body: You can create a lookup dictionary, to hold the parents, and reference those as you iterate all the entries. var dictionary = {}; for (var i = 0; i &lt; data.length; i++) { dictionary[data[i].id] = data[i]; } for (var i = 0; i &lt; data.length; i++) { if (data[i].parentid) { var parent = dictionary[data[i].parentid]; if (parent) { if (!parent.children) { parent.children = []; } parent.children.push(data[i]); } } } JSFiddle: http://jsfiddle.net/TrueBlueAussie/y22ctL8o/1/ Which results in a structure like this: [{ "text": "glossary", "id": "599", "parentid": "-1", "children": [{ "text": "title", "id": "600", "parentid": "599", "children": [{ "text": "", "id": "601", "parentid": "600" }] }, { "text": "GlossDiv", "id": "602", "parentid": "599", "children": [{ "text": "GlossList", "id": "603", "parentid": "602", "children": [{ "text": "GlossEntry", "id": "604", "parentid": "603", "children": [{ "text": "GlossTerm", "id": "605", "parentid": "604", "children": [{ "text": "Standard Generalized Markup Language", "id": "606", "parentid": "605" }] }, { "text": "GlossSee", "id": "607", "parentid": "604", "children": [{ "text": "markup", "id": "608", "parentid": "607" }] }, { "text": "SortAs", "id": "609", "parentid": "604", "children": [{ "text": "SGML", "id": "610", "parentid": "609" }] }, { "text": "GlossDef", "id": "611", "parentid": "604", "children": [{ "text": "para", "id": "612", "parentid": "611", "children": [{ "text": "", "id": "613", "parentid": "612" }] }, { "text": "GlossSeeAlso", "id": "614", "parentid": "611", "children": [{ "text": "", "id": "615", "parentid": "614" }, { "text": "XML", "id": "616", "parentid": "614" }] }] }, { "text": "ID", "id": "617", "parentid": "604", "children": [{ "text": "SGML", "id": "618", "parentid": "617" }] }, { "text": "Acronym", "id": "619", "parentid": "604", "children": [{ "text": "SGML", "id": "620", "parentid": "619" }] }, { "text": "Abbrev", "id": "621", "parentid": "604", "children": [{ "text": "ISO 8879:1986", "id": "622", "…
has comment: http://stackoverflow.com/comment/115268790
answers question: http://stackoverflow.com/q/29232324
type: Answer

http://stackoverflow.com/q/29323788
has answer: http://stackoverflow.com/a/29323874
type: Question
accepted answer: http://stackoverflow.com/a/29323874
type: AnsweredQuestion
answer count: 2
possible better answer: http://stackoverflow.com/a/29323865
upvote count: 1
has comment: http://stackoverflow.com/comment/46838556
tagged with: javascript
favorite count: 0
has body: So I have this php file where form is located. &lt;head&gt; &lt;script src="js/create_competition.js" type="text/javascript"&gt;&lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;form id='create-competition' action='create_competition_action.php' method='post' accept-charset='UTF-8'&gt; &lt;div id="main"&gt; &lt;input type="button" id="addButton" value="Add" class="bt" /&gt; &lt;/div&gt; &lt;input type='submit' id='submit' name='Submit' value='Submit' /&gt; &lt;/body&gt; And when you press the add button a field is created on the page. When you press it again, another field is created and so on. And when a field is created a variable in create_competition.js gets bigger by 1. Now when lets say there is 3 field created and after that submit button is pressed I want to pass that variable (which is 3 at the moment) to create_competition_action.php so I could use the knowledge of how many fields was created there. But I have no idea how I can do that. I tried using this in create_competition.js $('#submit').click(function(){ alert(nrFields); // to see if works window.location.href = "create_competition_action.php?var=" + nrFields; }) Alert worked, after pressing submit I got an alert of how many fields was created but window.location.href did not. But other then that I have not found any good solutions on how to do it.
has title: Passing javascript variable to next php page
downvote count: 0
has answer: http://stackoverflow.com/a/29323865
score: 1
tagged with: php

http://stackoverflow.com/comment/50552715
type: Comment
has text: Hello, sorry to revive an old post, but would appreciate some help! Where do i get the client_identification_sequence? I don't understand how to obtain this! I've uploaded the certs to QB admin. Thank you
comment on: http://stackoverflow.com/a/29510299
type: AnswerComment
score: 0

http://stackoverflow.com/q/29234187
answer count: 1
has answer: http://stackoverflow.com/a/29264164
favorite count: 0
upvote count: 2
type: UnansweredQuestion
score: 2
tagged with: skrollr
has title: Skrollr. change content in fixed div
type: Question
has body: I wonder how to achieve this effect on http://www.squarespace.com. What I mean is: you scroll down and at one point the image of computer monitor stays at fixed position after that, the images keep changing while you scroll. How can you control content and change CSS using Javascript? It should be on window scroll event: window.onscroll = function () { // but I don't know what to use here } At smaller browser width, the above elements become a carousel, but I am not interested in that.
downvote count: 0
tagged with: javascript

http://stackoverflow.com/q/29341069
tagged with: php
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29341253
score: 1
has answer: http://stackoverflow.com/a/29341253
accepted answer: http://stackoverflow.com/a/29341202
has comment: http://stackoverflow.com/comment/46869399
tagged with: post
type: Question
tagged with: javascript
has title: Splitting AJAX POST variables
tagged with: jquery
tagged with: ajax
answer count: 2
downvote count: 0
has answer: http://stackoverflow.com/a/29341202
favorite count: 0
has body: I have written a script to post AJAX variables whenever a checkbox is clicked. When multiple checkboxes are selected the variables are stored in an array and seperated by a pipe. I need each variable to be passed separately into my php function so I can run separate queries. My JavaScript $(document).on("change", ".tbl_list", function () { var tbls = new Array(); $("input:checkbox[name='tbl[]']:checked").each(function () { tbls.push($(this).val()); }); var tbl = tbls.join('|'); var db = window.sessionStorage.getItem("db"); alert(db); $.ajax({ type: "POST", url: "ajax2.php", data: { tbl: tbl, db: db }, success: function (html) { console.log(html); $("#tblField").html(html).show(); } }); }); Output when multiple tables are selected tbl:db|event My PHP function function tblProperties() { if (isset ( $_POST ['tbl'] )) { $tbl = $_POST ['tbl']; $db = $_POST ['db']; $link = mysqli_connect ( 'localhost', 'root', '', $db ); $qry = "DESCRIBE $tbl"; $result = mysqli_query ( $link, $qry ); I know I would need to store these variables somehow and then do a for each to generate separate queries but i'm not sure how to do it.
has comment: http://stackoverflow.com/comment/46869400
has comment: http://stackoverflow.com/comment/46869407
upvote count: 1

http://stackoverflow.com/q/29346516
score: 1
has title: how to apply multiple format to a number in d3 json
type: Question
has comment: http://stackoverflow.com/comment/46879769
tagged with: javascript
has answer: http://stackoverflow.com/a/29347438
upvote count: 1
has body: I'm trying to get something like 12,345.6 so d3 has format function if I use d3.format(".1f") I would get 12345.6 but if I use d3.format("0,000") I would get 12,345.600000000000
answer count: 1
favorite count: 0
tagged with: d3.js
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46880025
downvote count: 0

http://stackoverflow.com/comment/46778986
score: 0
type: QuestionComment
has text: yes - i think this issue is related to the UI-router states - I'm using nested states and I think that's causing the problem, but not sure how
type: Comment
comment on: http://stackoverflow.com/q/29288531

http://stackoverflow.com/comment/46835818
type: QuestionComment
comment on: http://stackoverflow.com/q/29321542
score: 0
has text: culd you describe more precisely your issue ?
type: Comment

http://stackoverflow.com/comment/46698163
score: 0
has text: that is the actual code used. Jquery saves me a lot of javascript code.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29246373

http://stackoverflow.com/a/37335764
type: Answer
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/29261733
has comment: http://stackoverflow.com/comment/73204491
downvote count: 0
has body: This node express middleware will analyze a bunch of different user agent strings and give you just a "bot==true" or "desktop==true" way to determine. I haven't used it and the readme sounds like it was just a trial project so I don't know how maintained it will be going forward, but it will detect all sorts of bots. https://github.com/rguerreiro/express-device

http://stackoverflow.com/comment/48353041
comment on: http://stackoverflow.com/q/29346849
score: 0
type: Comment
type: QuestionComment
has text: Since you are connecting from the debugger to the debugged, it will probably not be able to connect early enough?

http://stackoverflow.com/comment/46866231
type: QuestionComment
comment on: http://stackoverflow.com/q/29334909
has text: I could call the service and wait for answer in controller using ng-click and when i'll have it i could change icons with ng-class...but I'm curious why isn't working this way.
score: 0
type: Comment

http://stackoverflow.com/comment/46785817
score: 0
comment on: http://stackoverflow.com/q/29261089
type: Comment
type: QuestionComment
has text: @wdberkeley Also, how is my syntax wrong? I've seen those examples and have followed their convention. What specifically is wrong?

http://stackoverflow.com/q/29238841
accepted answer: http://stackoverflow.com/a/29238907
type: Question
score: 3
tagged with: javascript
has comment: http://stackoverflow.com/comment/46683884
has body: I'm trying to make calls to RESTful API of Amazon but it seems it was a bad starting or something! I've got this message: <ItemLookupErrorResponse xmlns="http://ecs.amazonaws.com/doc/2013-08-01/"> <Code>InvalidParameterValue Value 2015-3-24T18:38:26Z for parameter Timestamp is invalid. Reason: Must be in ISO8601 format. 77d4ca11-4f95-42d2-b85a-a4042abded80 </ItemLookupErrorResponse> This is the code in JavaScript: var today = new Date(); var day = today.getDate(); var month = today.getMonth()+1; var year = today.getFullYear(); var hours = today.getHours() < 10 ? "0"+today.getHours() : today.getHours(); var seconds = today.getSeconds() < 10 ? "0"+today.getSeconds() : today.getSeconds(); var mins = today.getMinutes() < 10 ? "0"+today.getMinutes() : today.getMinutes(); var time = encodeURIComponent(year+"-"+month+"-"+day+"T"+hours+":"+mins+":"+seconds+"Z"); var messageToEncrypt ="GET\nwebservices.amazon.com\n\ /onca/xml\nAWSAccessKeyId=ACCESSID&ItemId=0679722769&&SignatureMethod=HmacSHA256&SignatureVersion=2&Operation=ItemLookup&ResponseGroup=ItemAttributes%2COffers%2CImages%2CReviews&Service=AWSECommerceService&Timestamp="+time+"&Version=2013-08-01"; var sig = CryptoJS.HmacSHA256(messageToEncrypt, "SECRET KEY"); var request = "http://webservices.amazon.com/onca/xml?Service=AWSECommerceService&AWSAccessKeyId=AccessID&Operation=ItemLookup&ItemId=0976925524&ResponseGroup=SalesRank&Version=2013-08-01&Timestamp="+time+"&Signature="+sig; function GET(url) { var oFrame = document.getElementById("MyAjaxFrame"); if (!oFrame) { oFrame = document.createElement("iframe"); oFrame.style.display = "none"; oFrame.id = "MyAjaxFrame"; document.body.appendChild(oFrame); } oFrame.src = url; } GET(request); Is there something wrong here? Thanks.
has title: parameter Timestamp is invalid. Reason: Must be in ISO8601 format in JavaScript
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/46683860
has answer: http://stackoverflow.com/a/29238907
favorite count: 0
tagged with: rest
has comment: http://stackoverflow.com/comment/46684318
type: AnsweredQuestion
upvote count: 3

http://stackoverflow.com/comment/46859748
type: Comment
type: QuestionComment
has text: you need to read more tutorials in javascript loops
comment on: http://stackoverflow.com/q/29335689
score: 2

http://stackoverflow.com/comment/46893287
type: Comment
has text: possible duplicate of [Change total input value according to dynamic radio input attribute values with jQuery](http://stackoverflow.com/questions/28993670/change-total-input-value-according-to-dynamic-radio-input-attribute-values-with) (since there's a jQuery tag)
comment on: http://stackoverflow.com/q/29354108
score: 0
type: QuestionComment

http://stackoverflow.com/q/29337966
accepted answer: http://stackoverflow.com/a/30610323
linked to: http://stackoverflow.com/q/28782656
downvote count: 0
tagged with: javascript
favorite count: 0
answer count: 3
tagged with: browserify
has body: I have an ES6 class which I am trying to export as a module, however I am getting an error SyntaxError: Unexpected reserved word Car.js class Car { constructor(make) { this.make = make; this.currentSpeed = 25; } printCurrentSpeed(){ console.log(this.make + ' is going ' + this.currentSpeed + ' mph.'); } } module.exports = Car; I am trying to use the Car module like this main.js var Car = require("./models/Car"); let must = new Car('Mustang'); console.log(must.printCurrentSpeed()); I am using browserify with babelify to transform to ES6 browserify -t babelify main.js -o public/scripts/bundle.js", Am I exporting the Car module correctly, or am I doing something wrong?
type: AnsweredQuestion
tagged with: babeljs
upvote count: 1
has answer: http://stackoverflow.com/a/30610323
has title: Trying to export a class as a module ES6 babel
type: Question
possible better answer: http://stackoverflow.com/a/30609997
has answer: http://stackoverflow.com/a/29345593
has answer: http://stackoverflow.com/a/30609997
score: 1
tagged with: ecmascript-6
has comment: http://stackoverflow.com/comment/46866950

http://stackoverflow.com/q/29368852
has title: Jquery keep Alive / Any client side interaction?
answer count: 1
has body: I have used a few of the jquery keepalive session plugins with out problem. I have been asked for something a bit different. We have some forms (built before I started here) that are fairly large and users work in them for a while. The page is never refreshed, so they click save and the session is expired and redirect to the login page. I suggested one of these plugin, that just prompt the user a few minutes before the session expires which would make an ajax call to keep the session alive. However, they said, will what if they dont see the prompt and miss it all together and logs them out. They would like me to check Has the user had any interaction with the page in the last 5 minutes. If Yes=Ajax call to keep alive the session, and reset timer. if No, continue to wait until we get within 2 minutes of session time out and prompt user. They are trying to avoid the prompt. Is there anyway with JS/Jquery to know if the page has had any client side interaction?
accepted answer: http://stackoverflow.com/a/29369301
type: AnsweredQuestion
type: Question
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46919686
has answer: http://stackoverflow.com/a/29369301
score: 0

http://stackoverflow.com/a/52265114
has comment: http://stackoverflow.com/comment/124540575
score: 12
has body: You can use the onchange method on your select element. var changedText = document.getElementById('changed'); function listQ(){ changedText.textContent = this.value; } document.getElementById("list").onchange = listQ; For this HTML One Two Three Four Your value Here is a Fiddle forked from Jonathan, and here is MDN documentation for the change event.
upvote count: 12
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/124513353
answers question: http://stackoverflow.com/q/29269948

http://stackoverflow.com/q/29337617
has comment: http://stackoverflow.com/comment/46863552
answer count: 0
tagged with: event-listener
has comment: http://stackoverflow.com/comment/46863908
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/46863420
score: 0
tagged with: onchange
has title: Function when Elements className change
tagged with: function
has body: I am trying to change the background image of a section based on whatever slide has a particular classname. I have an unordered list that is genereated with a loop http://exampleimg1.jpg http://exampleimg2.jpg http://exampleimg3.jpg I also have some javascript to change the background image of the section the unorderd list is contained in. The url for the background image depends on which div has the class name cycle-slide-active var cycleSlide = $('.cycle-slideshow').find('.cycle-slide'); for (i = 0; i < cycleSlide.length; i++) { if (cycleSlide.eq(i).hasClass('cycle-slide-active')){ var apimglink = $('.tes-image-links').children('li').eq(i).text(); apimglink = apimglink.replace("http://localhost", ""); $('.ap-testimonial').css('background-image', 'url(' + apimglink + ')'); console.log(apimglink); } //End If }; //End For The above code gives me the right background image for whatever slide is first loaded, but after the slide changes nothing else happens. I need help Executing the above code whenever cycleSlide.className for any cycleSlide element is changed. Thank you all in advanced.
tagged with: jquery
type: UnansweredQuestion

http://stackoverflow.com/comment/46685482
type: QuestionComment
type: Comment
has text: It's mainly because, the browser couldn't parse the script `test2.js` by the time it executes the next statement. That's why you see the counter is same. But when you debug, the browser would execute the statements sequentially and would fetch the file when you have breakpoint in the counter statements.
score: 0
comment on: http://stackoverflow.com/q/29238965

http://stackoverflow.com/q/29353356
tagged with: google-visualization
tagged with: javascript
answer count: 1
downvote count: 0
favorite count: 0
has body: How can I tell the data from a Google Visualization Query that Column C is a string? I can't find anywhere in the documentation options that shows me how to designate certain columns as strings or numbers. It thinks column C is a number and ads another column in the column chart, when it's actually suppose to be set as a string. Do I set it in query options or in the options for the column chart? I added my code and pictures of the dashboard and datasheet. Thanks! Brandon Summative Assessment Data
type: UnansweredQuestion
score: 1
upvote count: 1
has title: How can I set the value of column C as a string in my Google Visualization Query?
has answer: http://stackoverflow.com/a/29879479
type: Question

http://stackoverflow.com/comment/46752486
type: Comment
has text: Hmm, im not quite sure how else I would rearrange the structure, because I want the new page to load, after the pagetransition in over: var pageTransitionStart = new TimelineMax({ onComplete: DIS.loadPage, onCompleteParams: [url, $this] });
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29276013

http://stackoverflow.com/a/29278291
downvote count: 0
has comment: http://stackoverflow.com/comment/46754589
type: Answer
upvote count: 3
answers question: http://stackoverflow.com/q/29277982
score: 3

http://stackoverflow.com/q/29362583
tagged with: javascript
tagged with: gulp
score: 4
has comment: http://stackoverflow.com/comment/47132038
favorite count: 0
has title: "Possible EventEmitter memory leak detected" with Gulp + Watchify + Factor bundle
tagged with: browserify
tagged with: factor-bundle
has comment: http://stackoverflow.com/comment/47163166
type: AnsweredQuestion
tagged with: watchify
type: Question
has answer: http://stackoverflow.com/a/29496029
upvote count: 4
accepted answer: http://stackoverflow.com/a/29496029
has comment: http://stackoverflow.com/comment/47126277
has comment: http://stackoverflow.com/comment/47145141
answer count: 1
downvote count: 0
has body: I am using gulp, browserify, watchify and factor bundle to build several javascript files in development. Everything works fine, excepts after some time I start seeing this warning: Trace at Browserify.addListener (events.js:179:15) at f (/Users/benoit/git/figure/web/node_modules/factor-bundle/index.js:55:7) at Browserify.plugin (/Users/benoit/git/figure/web/node_modules/browserify/index.js:345:9) at Browserify.bundle (/Users/benoit/git/figure/web/gulpfile.js:46:13) at Browserify.emit (events.js:107:17) at null._onTimeout (/Users/benoit/git/figure/web/node_modules/watchify/index.js:126:15) at Timer.listOnTimeout (timers.js:110:15) (node) warning: possible EventEmitter memory leak detected. 11 finish listeners added. Use emitter.setMaxListeners() to increase limit. Trace at ConcatStream.addListener (events.js:179:15) at ConcatStream.once (events.js:204:8) at Labeled.Readable.pipe (/Users/benoit/git/figure/web/node_modules/factor-bundle/node_modules/labeled-stream-splicer/node_modules/stream-splicer/node_modules/readable-stream/lib/_stream_readable.js:612:8) at /Users/benoit/git/figure/web/node_modules/factor-bundle/index.js:73:43 at Array.reduce (native) at Transform._flush (/Users/benoit/git/figure/web/node_modules/factor-bundle/index.js:65:35) at Transform.&lt;anonymous&gt; (/Users/benoit/git/figure/web/node_modules/factor-bundle/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:135:12) at Transform.g (events.js:199:16) at Transform.emit (events.js:129:20) at finishMaybe (/Users/benoit/git/figure/web/node_modules/factor-bundle/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:371:12) at endWritable (/Users/benoit/git/figure/web/node_modules/factor-bundle/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:378:3) at Transform.Writable.end (/Users/benoit/git/figure/web/node_modules/factor-bundle/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:356:5) (node) warning: po…

http://stackoverflow.com/q/29298866
upvote count: 5
has answer: http://stackoverflow.com/a/29303608
has body: I m actually developping an application and I need to get some informations from my database : I have a traitement model in which I got a user, The traitement model has start date and an end date, both in Date format, so mongodb can use ISODate() What I need is to get all the "traitements" by user for a datedifference, but in hours format. For example, if the traitement started the 24/02/2015 08:00:00 and ended the 24/02/2015 at 10:00:00, I need to get "2" hours. Here's what I have actually : @TraitementNettoyage.aggregate([ {$group: {'_id': {user: '$user'}, time: {'$subtract': ['$dateSortie', '$dateEntre']}}}, {$sort: {_id: 1}} ]).exec((err, res)=&gt; console.log res ) This request doesn't work and tells me that $subtract is an unknown group operator. EDIT : I can use $subtract but I dont know how to group on it. Can you help me ? Here's my new code without group : Traitement.aggregate([ {$project: {total: {$subtract: ['$dateSortie', '$dateEntre']}}}, {$sort: {_id: 1}} ]).exec((err, res)=&gt; console.log res ) The last part is to group it by user attribute and I dont know how to make it work :-/ EDIT 2 : A document of what I need: [{ "_id": { "user": { "_id": "5512a66db54f879c2887411f", "userLastname": "Toto", "userFirstname": "Toto" }, "total": 17824 } }, { "_id": { "user": { "_id": "551408741ad3b66c19978e9a", "userLastname": "Foo", "userFirstname": "Foo" }, "total": 939 } }] And heres a simple "traitement" document : {"_id" : ObjectId("55153711eba735e4311f92a0"), "dateEntre" : ISODate("2015-03-27T10:55:13.069Z"), "dateSortie" : ISODate("2015-03-27T10:55:18.018Z"), "user" : ObjectId("5512a66db54f879c2887411f"), "__v" : 0 } What I really need is : SUM of all the (dateSortie-dateEntre) grouped by user . THanks for advance
type: AnsweredQuestion
downvote count: 0
tagged with: coffeescript
type: Question
tagged with: mongodb
score: 5
answer count: 1
tagged with: mongoose
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29303608
has title: Mongodb, group by datediff and getting hour
favorite count: 0

http://stackoverflow.com/a/29238113
type: AcceptedAnswer
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29237674
has comment: http://stackoverflow.com/comment/46703972
accepted answer of: http://stackoverflow.com/q/29237674
has body: You can access the iframe contents using jquery's .contents() method. If you have an iframe with id "myframe" then, you can do: $('#myframe').contents().find('something') // or event bind events $('#myframe').contents().find('button').on('click', function(){ }); Assuming that you have content inside iframe &lt;iframe name="manname" id="manname" frameborder="0" width="300" height="21" scrolling="no" src="./get_manager.php"&gt;&lt;/iframe&gt; $(function(){ var selectInframe = $('#manname').contents().find('#starter_manname'); selectInframe.on('change', function(){ var new_val = $(this).val(); $('#starter_manname').val(starter_manname); }); }); without jquery you can you contentDocument var selectInframe = document.getElementById('manname'); var selectInframeDocument = selectInframe.contentDocument; // selectInframeDocument is the document form your iframe // you can do selectInframeDocument.getElementByTagName('..') etc to access elements and bind Hope you get it.

http://stackoverflow.com/q/29252014
linked to: http://stackoverflow.com/q/12983869
has title: How to redirect to same page but to a different div/view in IBM Worklight?
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: ibm-mobilefirst
type: AnsweredQuestion
score: 1
upvote count: 1
type: Question
has body: Initially Testing by user name only not the password. After successful login it gives login successful alert but cannot redirect to particular div or view(from mobile navigation IBM Worklight) on the same html page(YummyjQueryMobile145.html). Tested codes like: //#login > login button id //#home > redirected div/view id $(function(){ $("#login").click(function(){ $("#home").load("YummyjQueryMobile145.html", function(){ alert("loaded!"); }); }); }); JS file function Login() { //alert("Login"); var invocationLogin={ adapter:"SQL_ADAPTER_Yummy", procedure:"procedureLogin", parameters:[] }; var optionsLogin={ onSuccess:succLogin, onFailure:failLogin }; WL.Client.invokeProcedure(invocationLogin,optionsLogin); } function succLogin(result) { //alert("succLogin"); var LUname=$("#LUname").val(); var LPass=$("#LPass").val(); var flag=0; var n; var i, resultSet = result.invocationResult.resultSet; //alert(result.invocationResult.resultSet); namesArray = []; for (i = 0; i < resultSet.length; i++) { namesArray[i] = resultSet[i].NAME; } //alert (JSON.stringify(namesArray)); for (i = 0; i < resultSet.length; i++) { n = LUname.localeCompare(namesArray[i]); if(n==0) flag=1; } if(flag==1) { alert("Login Successful"); //Here the Redirect code/same html page to a particular div or view //clicking login button if success then redirect to home div/view } else alert("Try Again!!!"); } function failLogin(result) { alert(result+"try again Login"); } HTML .... .... Log In .... ....
downvote count: 0
tagged with: javascript
tagged with: jquery
answer count: 1
has answer: http://stackoverflow.com/a/29252079
accepted answer: http://stackoverflow.com/a/29252079

http://stackoverflow.com/a/76559315
answers question: http://stackoverflow.com/q/29237809
type: Answer
has body: Just wrap the if statement in an infinite loop: while (true) { // Code to repeatedly run } Edit: Haven’t tested, but it might freeze your tab.
score: 0

http://stackoverflow.com/a/29283376
score: 0
has comment: http://stackoverflow.com/comment/46766901
has comment: http://stackoverflow.com/comment/46764569
has comment: http://stackoverflow.com/comment/46788317
type: Answer
answers question: http://stackoverflow.com/q/29283063
has body: I make inheritance in javascript like this : var c_Parent = function () { }; var c_Child = function () { c_Parent .call(this); }; c_Child.prototype = new c_Parent(); c_Child.prototype.constructor = c_Child; So in you case : function Person(name, age) { this.name = name; this.age = age; } Person.prototype.grow = function () { this.age++; console.log('Person grows, new age ' + this.age); }; function Worker(name, age, position) { this.position = position; Person.call(this, name, age); } Worker.prototype = new Person(); Worker.prototype.constructor = Worker; Worker.prototype.promote = function () { console.log('Worker ' + this.name + ' became Senior ' + this.position); }; Worker.prototype.grow = function () { this.promote(); Person.prototype.grow.call(this); }; var workerObj = new Worker('Ben', 39, 'engineer'); workerObj.grow();

http://stackoverflow.com/q/29348734
tagged with: javascript
tagged with: ajax
has comment: http://stackoverflow.com/comment/46883501
score: 0
has comment: http://stackoverflow.com/comment/46883094
has title: Checking for bad data in ajax response
type: UnansweredQuestion
has body: I am getting sometimes bad response data or undefined or null or empty string as response. I am checking whether my response is of json before proceeding with further data manipulation. function response(oResponse, xhr) { var ct = xhr.getResponseHeader("content-type") || ""; if (ct.indexOf('json') &gt; -1) { // ... } } I want to check whether the response is valid before proceeding. I want to check for invalid responses like "null", "undefined", "emptry string" too along with checking whether the response is json before manipulating the data.
type: Question
linked to: http://stackoverflow.com/q/7662620
has answer: http://stackoverflow.com/a/29349254
answer count: 1
has comment: http://stackoverflow.com/comment/46883999

http://stackoverflow.com/comment/46829810
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29318910
type: AnswerComment
has text: Also html div is on the redirected page

http://stackoverflow.com/comment/46827075
score: 0
type: AnswerComment
type: Comment
has text: Just a note, this approach will not work when controller is instantiated using $controller.
comment on: http://stackoverflow.com/a/29301788

http://stackoverflow.com/a/29330145
type: Answer
score: 1
has body: Something like this $.ajax({ type: 'get', url: 'http://jsbin.com/zinefu/1.json', dataType: 'json' }).done(function(data){ data = _.groupBy(data,'matchday'); $.each(data, function(index, day){ var matchdatediv = $(' '); var h1 = $(' ').html(day[0].matchday); matchdatediv.append(h1); $.each(day,function(index2, game){ var div = $(' '); var h4 = $(' ').html(game.homeTeam); div.append(h4); matchdatediv.append(div); }); $('#fixtures').append(matchdatediv); }); }); I iterated through the data and created a sample of how to iterate through each game object. The structure that you see in the demo is like this match date 1 home team for game 1 home team for game 2 .... match date 2 home team for game 4 home team for game 5 .... ........ Here is a demo Hope this helps.
upvote count: 1
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46850474
answers question: http://stackoverflow.com/q/29329847
accepted answer of: http://stackoverflow.com/q/29329847

http://stackoverflow.com/a/29241927
downvote count: 0
type: AcceptedAnswer
has body: Your script might actually work. The problem is that profs is a NodeList. It doesn't have a forEach function. Use this: var profs = document.querySelectorAll('.profile'); Array.prototype.forEach.call(profs, function( val, i ){ val.style.opacity = 0; }); It is always a good idea to register to page.error and remote.message to catch those errors. Another idea would be to employ the resource.requested event handler to abort all the resources that you don't want loaded. It uses the underlying onResourceRequested PhantomJS function. casper.on("resource.requested", function(requestData, networkRequest){ if (requestData.url.indexOf("mydomain") === -1) { // abort all resources that are not on my domain networkRequest.abort(); } }); If your page handles unloaded resources well, then this should be a viable option.
accepted answer of: http://stackoverflow.com/q/29241165
answers question: http://stackoverflow.com/q/29241165
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/comment/46654003
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29222415
score: 0
has text: @nathanhayfield If I used javascript would I still need to use ajax and jquery? Sorry, I know these are really basic questions, I just don't have much experience haha

http://stackoverflow.com/a/65088051
upvote count: 40
has comment: http://stackoverflow.com/comment/117499822
downvote count: 0
answers question: http://stackoverflow.com/q/29323982
type: Answer
has body: For me npm was broken, probably because I ran it with sudo at some point. I needed to fix brew, upgrade/update brew uninstall node sudo chown -R $(whoami) /usr/local/* brew cleanup brew install node
has comment: http://stackoverflow.com/comment/124472538
score: 40

http://stackoverflow.com/q/29295598
type: AnsweredQuestion
has body: I want to update a JSON object though my app using the PUT method. I am attempting to partially simulate the operation of a form submission. This call is synchronous, as after the PUT, a 200 should be returned. However, when I try the code below, sendAJAX does not include the object's content, the PUT request has content-length: 0. A submission through the form has all of the correct settings - content-type, x-requested-with, etc. I'm not quite sure why the code below doesn't function as I'm expecting. I've also tried setting var 'data' as a string of json formatted parameters. That also results in a PUT request of content-length: 0. What am I doing wrong here? casper.then(function() { this.evaluate(function() { var element = document.querySelectorAll("h6"); for (var i = 0; i &lt; element.length; i++) { if (element[i].innerHTML == "Special Tag") { var appid = element[i].parentNode.parentNode.getAttribute("app-id"); var wsurl = "https://appurl.net"+appid; var data = new Object(); data.user_id = "xxxxx-xxxx-xxxx-xxxx-xxxx"; data.name = "Name"; data.description = "blahr blahr blahr"; data.amount = "-9000000"; data.start = 1409900400000; data.finish = 1412492400000; data.seq = 0; data.locked = false; data.paused = false; data.contributed_amount = 0; data.created = 1409920472782; data.modified = 1426538857339; data.color = "#E37368"; data.archived = false; data.target_amount = null; data.uuid = "xxxx-xxxxx-xxxxx-xxxxxx"; data.aprox_daily_contribution = 0; return JSON.parse(__utils__.sendAJAX(wsurl, "PUT", data, false, { contentType: "application/json"}));
tagged with: casperjs
type: Question
has comment: http://stackoverflow.com/comment/46787694
has title: Why doesn't CasperJS' sendAJAX function send any content for PUT requests?
answer count: 1
tagged with: put
has answer: http://stackoverflow.com/a/29297387
score: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/46789233
accepted answer: http://stackoverflow.com/a/29297387

http://stackoverflow.com/comment/46908176
type: Comment
has text: Do you still need `.show()` if you're updating the CSS directly?
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/29362201

http://stackoverflow.com/q/29345404
favorite count: 0
tagged with: css
has answer: http://stackoverflow.com/a/29345576
has comment: http://stackoverflow.com/comment/46878058
downvote count: 0
type: UnansweredQuestion
has body: I am searching for a jQuery-solution for my fixed header. If the user scrolls down, the header shall shrink in the same way the scrolling position is until a minimum height is reached. Example: scrolling position: 0 div height: 250px scrolling position: 85 div height: 165px (=250px-85) scrolling position: 435 div height: 100px (=minimum height) Here is the quick fiddle. body { height: 1000px; } .header { position: fixed; background-color: lightblue; height: 250px; width: 100%; } &lt;div class="header"&gt;&lt;/div&gt; Here is the solution for me: fiddle
score: 1
has comment: http://stackoverflow.com/comment/46876889
has title: Dynamic resize a div while scrolling using jQuery
type: Question
upvote count: 1
answer count: 1
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/29226388
upvote count: 43
accepted answer of: http://stackoverflow.com/q/29225834
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/136536933
answers question: http://stackoverflow.com/q/29225834
type: Answer
has comment: http://stackoverflow.com/comment/99040078
has body: A closure is just an evolution of the concept of the stack. The stack is used to separate/isolate scope when functions are called. When a function returns the stack frame (activation record) is popped off the call stack thus freeing the used memory allowing the next function call to reuse that RAM for its stack frame. What a closure does is that instead of actually freeing that stack frame, if there's any object/variable in that stack frame that's referenced by anything else then it keeps that stack frame for future use. Most languages implement this by implementing the stack as a linked list or hash table instead of a flat array. That way, the stack can be re-ordered at runtime and is not constrained by physical memory layout. So. With this in mind, the answer is that variables in a closure are stored in the stack and heap. Depending on your point of view. From the point of view of the language, it's definitely the stack. Since that's what closures are in theory - a modified stack. From the point of view of the machine language or underlying C/assembly code, the idea of a linked-list stack is nonsense. Therefore the higher level language must be using the heap to implement its "stack". So the variable is in the stack but that stack is probably located in the heap. This of course depends on the implementation of your programming language. But the above description is valid for most javascript interpreters (certainly all the ones I've seen).
has comment: http://stackoverflow.com/comment/46660208
score: 43

http://stackoverflow.com/a/29330150
answers question: http://stackoverflow.com/q/29330117
upvote count: 2
has comment: http://stackoverflow.com/comment/46849779
downvote count: 0
has body: That happens because document.write just writes the text you specify in body; it's not required for any element to be loaded to be able to document.write, but document.getElementById() searches for the element in DOM, which isn't created immediately when you begin executing your script, so your script is trying to access your element with id menu2 before it is loaded. To be able to use document.getElementById(), you should wait for the DOM to load, by placing all your methods accessing DOM to: window.onload=function(){ }
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/46849754

http://stackoverflow.com/q/29313960
upvote count: 1
downvote count: 1
type: Question
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29314143
linked to: http://stackoverflow.com/q/18491828
tagged with: javascript
has body: I have wrote for the given data of code,but unable to combined for the one array of objects into another array of objects like as given below. var data=[{x:10,y:30},{a:50,b:40}] var data1=[{x1:10,y1:30},{a1:50,b1:40}] function fctnCombind(){ for(var i in data){ for(var j in data1){ data[i].children=data1[j] //console.log(data[i].children) data[i].push(data[i].children) } return data; } } And final output is given below: [{x:10,y:30,c:[x1:10,y1:30]},{a:50,b:40,d:[a1:50,b1:40]}]
has answer: http://stackoverflow.com/a/29314143
has comment: http://stackoverflow.com/comment/46821009
has answer: http://stackoverflow.com/a/29314053
score: 0
answer count: 2
has title: How to combined array of objects one to another array using javascript
tagged with: arrays
favorite count: 0
linked to: http://stackoverflow.com/q/171251
accepted answer: http://stackoverflow.com/a/29314053

http://stackoverflow.com/q/29234915
has answer: http://stackoverflow.com/a/29235395
has comment: http://stackoverflow.com/comment/46676419
type: Question
answer count: 1
tagged with: javascript
tagged with: jquery
has title: Jquery selectbox strong tag help required
score: 0
linked to: http://stackoverflow.com/q/4951623
has body: I am using Jquery NiceSelect Plugin for my select boxes but I want a little change in it i.e. I want to use the strong or b tag in options but this plugin automatically converts html into &lt;label class="nice_label"&gt;Some Text Etc&lt;/label&gt; and into this &lt;p class="top"&gt;Some Text Etc&lt;/p&gt; but I want to exclude the conversion of strong tag or bold tag so that it would work like this &lt;label class="nice_label"&gt;Some Text &lt;strong&gt;Etc&lt;/strong&gt;&lt;/label&gt; Here is my JS (function ( $ ) { $.fn.niceselect = function() { return this.each(function(index,value) { /*SET VARIABLES ============================*/ var name = $(this).attr('name') var select = $(this); var num = index; var multi = false; var multix = ''; var type= 'radio'; var required = ''; var classes = ''; var selected = ''; var placeholder = 'Select'; if(select.attr('multiple') !== undefined) { multi = true; multix = '[]'; type= 'checkbox'; } if($(this).attr('class') !== undefined) { var classes = $(this).attr('class'); } if(select.find('[value="placeholder"]').length &gt; 0) { placeholder = select.find('[value="placeholder"]').html(); } if(typeof( select.attr('required') ) != 'undefined') { required = 'required'; } /*WRAP SELECT IN DIV -------------------------*/ select.wrap('&lt;div class="select_style '+classes+'"/&gt;'); $('&lt;span class="selectcon"&gt;&amp;nbsp;&lt;/span&gt;').insertBefore(select); /*CREATE PLACEHOLDER + OPTION BOX --------------------------------------------*/ $('&lt;div class="niceselect '+name+'" data-multi="'+multi+'"&gt;&lt;p class="top"&gt;'+placeholder+'&lt;/p&gt;&lt;div class="value_wrapper"&gt;&lt;/div&gt;&lt;/div&gt;').insertBefore(this) /*CREATE OPTGROUP BOXES --------------------------------------------*/ if(select.find('optgroup').length &gt; 0) { select.find('optgroup').each(function(key, opt){ select.siblings('.niceselect').children('.value_wrapper').append('&lt;div class="opt opt'+key+'"&gt;&lt;span class="optTitle"&gt;'+$(opt).attr('label…
has comment: http://stackoverflow.com/comment/46676111
type: UnansweredQuestion

http://stackoverflow.com/a/29252241
has comment: http://stackoverflow.com/comment/46708373
type: Answer
answers question: http://stackoverflow.com/q/29252021
has comment: http://stackoverflow.com/comment/46709724
has comment: http://stackoverflow.com/comment/46715856
has comment: http://stackoverflow.com/comment/46708554
has comment: http://stackoverflow.com/comment/46708449
has comment: http://stackoverflow.com/comment/46709239
has body: You haven't mentioned the exact issue which you are facing. However, I think there should be some problem with this line of code. parseInt(price.value) += parseInt(50); parseInt() is a function and you cannot assign values to it. It should be some thing like this price.value = parseInt(price.value) + parseInt(50); Also price.value is not a proper reference because you are assigning document.getElementById("price").value; to it. So you should be using price instead of price.value
score: 0

http://stackoverflow.com/q/29238127
upvote count: 1
tagged with: php
type: Question
has comment: http://stackoverflow.com/comment/46682509
has body: I need a script that can show results form my database dynamically. I found a method here: http://openenergymonitor.org/emon/node/107 My question is how to alter the code so that it will show all results instead of only one? And is it possible to display all results on load and then add newly added lines afterwards? I tried the following on the client.php: Client example Output: Henter data. And this is what I tried on the api.php page: $result = mysql_query("SELECT * FROM $tableName ORDER BY id DESC"); while($row = mysql_fetch_assoc($result)){ echo json_encode($row); } Now it won't show anything. What am I doing wrong? Thank you!
has title: How to alter AJAX load
downvote count: 0
tagged with: javascript
score: 1
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/46682685
has comment: http://stackoverflow.com/comment/46682894
answer count: 0
type: UnansweredQuestion

http://stackoverflow.com/a/69579603
score: 2
answers question: http://stackoverflow.com/q/29362396
has body: Similar question as Jasmine expect(resultCode).toBe(200 or 409) We can use expect().toContain() like this: expect([200,409]).toContain(resultCode); or not to contain: expect([200,409]).not.toContain(resultCode);
downvote count: 0
upvote count: 2
type: Answer

http://stackoverflow.com/a/29253521
answers question: http://stackoverflow.com/q/29253380
type: Answer
has body: It is due to Prototype Inheritance, every Array, Function,etc meets upto the Object as an grand Parent/Ultimate parent of every thing a = []; b = function(){} a instanceof Object // true b instanceof Object // true
score: 0

http://stackoverflow.com/q/29279048
tagged with: angularjs
has body: I am using justgage-angular to display my gauge data, how do i parse my php encoded json data to my gauge using angularjs. HTML Instead of "value" having a static data, i would like to parse my encoded JSON data.
has answer: http://stackoverflow.com/a/29279252
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29279252
type: Question
tagged with: http://stackoverflow.com/tag/json
score: 0
has title: Connect justgage-angular to encoded json data?
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/46808871
type: Comment
comment on: http://stackoverflow.com/q/29307293
type: QuestionComment
score: 0
has text: Pretty straightforward. Loop over all the `tr` children of the table. For each `tr`, loop over all its `td` children, appending `innerText + '\t'` for each one to a string variable. At the end of each row append `'\n'`. What exactly are you having trouble with? What did your failed attempts look like?

http://stackoverflow.com/q/29291083
downvote count: 1
has comment: http://stackoverflow.com/comment/46779139
type: Question
accepted answer: http://stackoverflow.com/a/29291361
tagged with: arrays
tagged with: javascript
score: -1
answer count: 2
upvote count: 0
has comment: http://stackoverflow.com/comment/46779258
has body: Hey I need some help here with my array. I can see that with document.getElementById that it catches my values, but I want the value to be a background style in a div. I know it looks very messed with and a inside of that but I'm really lost and I can't get it to work. I need to make a element for every item in the array and give them of them the value as a background-color. If what I'm asking doesn't make sense, I'm sorry as it's very late ;-) var noteColors = [ { name: "red", value: "#FF396D" }, { name: "green", value: "#C6DD2A" }, { name: "blue", value: "#55C7F0" }, { name: "purple", value: "#F64FC2" }, { name: "yellow", value: "#F6DC2C" }]; The end result should be like this
has title: Creating elements using values from an Array
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/29291361
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29291391
tagged with: css
has comment: http://stackoverflow.com/comment/46779149
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29291391
has comment: http://stackoverflow.com/comment/46779252

http://stackoverflow.com/comment/46667858
type: Comment
comment on: http://stackoverflow.com/q/29229790
score: 0
type: QuestionComment
has text: Why do you need to POST?

http://stackoverflow.com/comment/46805284
type: QuestionComment
score: 0
has text: @T.J.Crowder, in the link above you can see that P has already defined it's jQuery elements, than he tries to apply a method to them. Cannot see any difference. The only difference from your answer and the already answered one is `.attr` -vs- `.click` (If I'm not missing something crucial here.)
comment on: http://stackoverflow.com/q/29304909
type: Comment

http://stackoverflow.com/q/29265743
has answer: http://stackoverflow.com/a/29311864
favorite count: 0
tagged with: electron
upvote count: 2
linked to: http://stackoverflow.com/q/5597060
tagged with: node.js
score: 2
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29311864
type: Question
answer count: 1
downvote count: 0
tagged with: javascript
has body: Let's say I want to have a key event only on my compiled application with atom shell. var app = require('app'); var BrowserWindow = require('browser-window'); require('crash-reporter').start(); app.on('ready', function() { win = new BrowserWindow({ fullscreen: true, frame: false }); win.hide(); win.loadUrl("http://localhost:3000"); win.webContents.on('did-finish-load', function() { win.show(); win.focus(); }); process.on('uncaughtException', app.quit); }); How could I bind a keyboard event on the web browser? Eg, win.on('keypress', 'left-arrow', function() { win.webContents.goBack(); });
has title: key events in atom shell

http://stackoverflow.com/q/29242912
has title: Is there a way to detect iOS safari while filtering out iOS Chrome, Firefox and other browsers?
has answer: http://stackoverflow.com/a/29243491
has comment: http://stackoverflow.com/comment/46691945
answer count: 1
favorite count: 0
has body: So for those who worked on iOS web applications probably know that due to Apple's policy, Chrome and other mobile browsers on iOS use a very ancient javascript engine. This is why we need to disable some of the rendering for Chrome and other none-safari browsers for iOS. I had been reading this question and there is no useful answer there. Here are some of my approaches (failed): Use is_iOS = navigator.userAgent.match(/(iPad|iPhone|iPod)/g) to detect if the browser is on iOS. And then use: is_FF = navigator.userAgent.match(/(firefox)/g) and is_Chrome = navigator.userAgent.match(/(chrome)/g) to kill off those firefox and chrome browsers. I then realized all the browsers share identical user agent string with iOS safari. So I imagine the method should be running a javascript function that only Safari can run and then determine if the browser is Safari.
has comment: http://stackoverflow.com/comment/46691876
type: UnansweredQuestion
score: 1
upvote count: 1
type: Question
linked to: http://stackoverflow.com/q/3007480
tagged with: ios
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/46691927

http://stackoverflow.com/q/29336554
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/47124539
type: Question
has body: I have one thing to achieve using ExtJS v4.2 - to have auto-complete feature working with following code: var combo = { xtype: 'combobox', editable: false, displayField: 'type', queryMode: 'local', store: 'MyStore', valueField: 'value' } What it does is it features auto-complete with editable is set to false and queryMode is local - it works perfectly on previous version of ExtJS 4.2. However, I recently updated to ExtJS 4.2 which is more stable but auto-complete does not work with the above code, I need to have this feature working since I already have done much coding with the newer version. Also, when I try to set typeahead to true with editable to false I got this on my console: If typeAhead is enabled the combo must be editable: true -- please change one of those settings. I don't have this error on the previous version of Ext4.2... Please help me on this. Any help would be greatly appreciated.
accepted answer: http://stackoverflow.com/a/29482026
tagged with: javascript
has comment: http://stackoverflow.com/comment/46952022
tagged with: extjs
answer count: 2
downvote count: 0
favorite count: 0
has title: Extjs Non-editable Combobox Autocomplete
tagged with: extjs4
has answer: http://stackoverflow.com/a/29482026
possible better answer: http://stackoverflow.com/a/29387478
has answer: http://stackoverflow.com/a/29387478
tagged with: combobox
type: AnsweredQuestion

http://stackoverflow.com/a/29353121
has comment: http://stackoverflow.com/comment/46900470
upvote count: 6
answers question: http://stackoverflow.com/q/29352976
has body: From the MDN docs on DocumentFragment Various other methods can take a document fragment as an argument (e.g., any Node interface methods such as Node.appendChild and Node.insertBefore), in which case the children of the fragment are appended or inserted, not the fragment itself. foo = fooTemplate.content.cloneNode(true) copies the document fragment to foo. main.appendChild(foo) moves the contents of the foo document fragment into main. foo remains a document fragment, and all the nodes have moved so it's empty. If you want to keep a reference to the DOM nodes after appending them, you need to store the childNodes, but if you just reference the nodeList, it'll be empty, so you'll need to convert it to an Array: var nodes = Array.prototype.slice.call(foo.childNodes); console.log(nodes); main.appendChild(foo); console.log(nodes);
has comment: http://stackoverflow.com/comment/46909571
score: 6
has comment: http://stackoverflow.com/comment/46897087
has comment: http://stackoverflow.com/comment/46896470
has comment: http://stackoverflow.com/comment/50505531
has comment: http://stackoverflow.com/comment/46921104
downvote count: 0
type: Answer

http://stackoverflow.com/comment/46743195
type: QuestionComment
comment on: http://stackoverflow.com/q/29253740
score: 0
type: Comment
has text: @Hardeep Randhawa: Please stop adding random bold formatting to posts. It is not an improvement, rather a waste of people's time - anyone approving your edits is equally mistaken.

http://stackoverflow.com/a/29298110
has comment: http://stackoverflow.com/comment/46792698
score: 0
upvote count: 1
type: AcceptedAnswer
downvote count: 1
has comment: http://stackoverflow.com/comment/46792787
type: Answer
accepted answer of: http://stackoverflow.com/q/29297369
has body: That depends what you want to do within your backend. If you actually want to make calls to the Graph API, you need to pass the Access Token generated during the Login process to your backend. The Access Token contains everything necessary to make calls for the specific user E.g. /me?fields={field_list}&amp;access_token={access_token} The username field is deprecated anyway.
answers question: http://stackoverflow.com/q/29297369

http://stackoverflow.com/comment/46802812
comment on: http://stackoverflow.com/q/29303393
type: Comment
type: QuestionComment
has text: yes, you have the sencha ecosystem to deal with, you need to be familiar with how it works. Its difficult to debug your code without being able to replicate the issues, could you create a fiddle at fiddle.sencha.com ?
score: 0

http://stackoverflow.com/q/29274516
answer count: 1
has answer: http://stackoverflow.com/a/29274678
type: UnansweredQuestion
tagged with: node.js
score: 0
type: Question
has title: Node.js Multi-page Crawler
tagged with: javascript
has body: I try to crawl into website pages. here my sample code , i used stackoverflow just for test i dont want crawl stackoverflow. i this code i want get every link in page and push in an array after that go to every link and search for Node (it's just test.) var request = require('request'); var cheerio = require('cheerio'); var pages = 20; var counter = 1; while(counter&lt;=pages){ var siteUrl = "http://stackoverflow.com/unanswered/tagged/?page="+counter+"&amp;tab=votes"; var queue = []; request(siteUrl, function(error, response, html){ if(!error){ var $ = cheerio.load(html); // Extract All links in page links = $('a'); $(links).each(function(i, link){ queue.push("http://stackoverflow.com"+$(link).attr('href')); }); } // Search For Node.js on every question. queue.each(function(i,linkItem){ request(linkItem, function(error, response, html){ var page = cheerio.load(html); var ser = page.match(/node/i); if (ser &amp; ser.lenght &gt; 0){ console.log(page); } }); }) }) counter ++; } when i run this code its just show frist page link and show me error each has no method i will be happy if tell where i am wrong or even my code its right solution.

http://stackoverflow.com/comment/46791635
comment on: http://stackoverflow.com/q/29295428
type: Comment
type: QuestionComment
has text: My program runs a lot slower than it does with multiple router.get() functions. I don't know the reason for this.
score: 0

quickblox
tags question: http://stackoverflow.com/q/29369995
type: Tag
tag name: quickblox

http://stackoverflow.com/q/29286802
score: 2
has comment: http://stackoverflow.com/comment/46801314
type: Question
has comment: http://stackoverflow.com/comment/46772615
tagged with: canvas
downvote count: 0
tagged with: javascript
has title: Collision error
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
answer count: 0
upvote count: 2
type: UnansweredQuestion
has body: So I have been just playing around with the HTML canvas element and I have come across a slight problem. When player(1) lands on player2, player2 shrinks then lands on top of player(1). I am not sure how this is happening and have looked around for help but just can't seem to get it working. Any help is appreciated :) Battle
tagged with: collision

http://stackoverflow.com/q/29284858
type: Question
has title: Set image data into input file tag
downvote count: 0
tagged with: javascript
tagged with: jquery
has body: I have a string code in a javascript variable that i get from cropit plugin (plugin to crop images). Is there any way to set this info into an input file tag to send it then by ajax to php? This is the code i have in javascript and how i get it from the image: var imageData = $('.image-editor').cropit('export'); this variable is something like this: http://encargaya.com/imagefile.txt
has answer: http://stackoverflow.com/a/29284926
tagged with: ajax
answer count: 1
favorite count: 0
upvote count: 2
tagged with: input
type: AnsweredQuestion
score: 2
tagged with: image
accepted answer: http://stackoverflow.com/a/29284926

http://stackoverflow.com/q/29262429
type: AnsweredQuestion
score: 2
has comment: http://stackoverflow.com/comment/46727269
has answer: http://stackoverflow.com/a/29262510
type: Question
accepted answer: http://stackoverflow.com/a/29262510
tagged with: javascript
has comment: http://stackoverflow.com/comment/46726842
answer count: 2
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/1962168
downvote count: 0
tagged with: web
has comment: http://stackoverflow.com/comment/46727118
favorite count: 0
upvote count: 2
has body: Lot's of solutions here on stackoverflow show how to focus the cursor at the end of an input text but they don't show how to focus visually the end of a input text - the overflow of an input text. Ex: Most of the solutions are focus at the end but show the start of the text: But via javascript, I want to focus the end: Edit: Not duplicate because dir="rtl" doesn't solve it. I want to fill the field left to write, but when click on it I want to scroll to the end of the input text. @ibiza's answer solved the problem.
possible better answer: http://stackoverflow.com/a/29262778
has answer: http://stackoverflow.com/a/29262778
has title: focus html in the end of a input text (not only cursor)
has comment: http://stackoverflow.com/comment/46726853

http://stackoverflow.com/comment/47039865
type: QuestionComment
comment on: http://stackoverflow.com/q/29350787
score: 0
has text: If you're already using Jquery UI, why not just add a modal window to the onSubmit with a submission success / failure message?
type: Comment

http://stackoverflow.com/q/29256262
has title: Splitting out xml result into dropdownlist
type: Question
answer count: 2
downvote count: 0
accepted answer: http://stackoverflow.com/a/29256486
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29256429
tagged with: http://stackoverflow.com/tag/xml
favorite count: 0
has body: Hope someone can help - I'm new to js/jQuery so I'm hoping it's something really simple I'm missing here. I'm trying to populate a dropdownlist with the xml result from below. The parseXML function works great and the result.push(valueid + "," + value) leaves me with the following: 1,Service 2,Breakdown How do I get this into a dropdownlist please? Using the below, I get the error "Object doesn't support property or method 'split'" Many thanks leddy function testFunction() { var jobresults = "&lt;resultset morerecords='0'&gt; " + "&lt;result&gt; " + "&lt;itt_jobtypeid&gt;1&lt;/itt_jobtypeid&gt; " + "&lt;itt_name&gt;Service&lt;/itt_name&gt; " + "&lt;/result&gt; " + "&lt;result&gt; " + "&lt;itt_jobtypeid&gt;2&lt;/itt_jobtypeid&gt; " + "&lt;itt_name&gt;Breakdown&lt;/itt_name&gt; " + "&lt;/result&gt; " + "&lt;/resultset&gt; "; var xml = parseXML(jobresults); var jobid = xml.getElementsByTagName("itt_jobtypeid"); var jobname = xml.getElementsByTagName("itt_name"); var result = []; for (var i = 0; i &lt; jobid.length; i++) { var valueid = jobid[i].childNodes[0].nodeValue; var value = jobname[i].childNodes[0].nodeValue; // add longitude value to "result" array result.push(valueid + "," + value); } var jobtype = $("#ddlJobType"); $.each(result, function () { var arr = result.split(','); for (var i = 0; i &lt; arr.length; i++) { jobtype.append($("&lt;option /&gt;").val(arr[0]).text(arr[1])); } }); } function parseXML(text) { if (window.DOMParser) { parser = new DOMParser(); doc = parser.parseFromString(text, "text/xml"); } else { // Internet Explorer doc = new ActiveXObject("Microsoft.XMLDOM"); doc.async = "false"; doc.loadXML(text); } return doc; }
possible better answer: http://stackoverflow.com/a/29256429
upvote count: 1
has answer: http://stackoverflow.com/a/29256486
type: AnsweredQuestion
score: 1

http://stackoverflow.com/q/29256094
has comment: http://stackoverflow.com/comment/46790042
has comment: http://stackoverflow.com/comment/46789818
accepted answer: http://stackoverflow.com/a/29298517
has comment: http://stackoverflow.com/comment/46761696
has comment: http://stackoverflow.com/comment/46749924
has title: Highstock charts give "Uncaught TypeError: Cannot read property 'addPoint' of undefined" error
upvote count: 1
has comment: http://stackoverflow.com/comment/46758984
has comment: http://stackoverflow.com/comment/46765714
answer count: 1
tagged with: charts
has comment: http://stackoverflow.com/comment/46751315
tagged with: highcharts
tagged with: javascript
has answer: http://stackoverflow.com/a/29298517
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46791861
downvote count: 0
has comment: http://stackoverflow.com/comment/46788871
has body: I am using the highstock charts library for a set of 4 charts. I used the options object and literal notation as described HERE. The 4 charts have the same set of options by default (the renderCharts() function in the code bellow is responsible for that) and there is a charts type picker (the setChatType() function ) with the help of which the user can change the chart type. See all togheter HERE. Can anyone please tell me the cause of and solution for this error in the console: "Uncaught TypeError: Cannot read property 'addPoint' of undefined"? Thank you! /* ============ CHARTS OPTIONS BEGIN ============ */ var options = { chart : { zoomType: 'x', events : { load : function () { // set up the updating of the chart each second var series = this.series[0]; setInterval(function () { var x = (new Date()).getTime(); var y = Math.round(Math.random() * 100); series.addPoint([x, y]); }, 1000); } } }, rangeSelector: { buttons: [{ count: 1, type: 'minute', text: '1M' }, { count: 5, type: 'minute', text: '5M' }, { type: 'all', text: 'All' }], inputEnabled: false, selected: 0 }, title : { text: null }, exporting: { enabled: false }, // Disable navigator navigator : { enabled : false }, series : [{ name : '', data : (function () { // generate an array of random data var data = [], time = (new Date()).getTime(), i; for (i = -999; i &lt;= 0; i = i + 1) { data.push([ time + i * 1000, Math.round(Math.random() * 100) ]); } return data; }()) }] } /* ============ CHARTS OPTIONS END ============ */ /* ============ DRAW CHARTS BEGIN ============ */ function renderCharts(){ $('div.chart-container').each(function(){ var chartId = $(this).attr('id'); var chartIdParts = chartId.split('-'); var chartIdentifier = chartIdParts[1]; //Set chart options dinamically var chartId = "chart" + chartIdentifier; var chart = $('#' + chartId); var renderTo = "chartcontainer-" + chartIdentifier; //Render Charts for each aech container options.chart.renderTo = renderTo; options.chart.type = 'line'; var char…
score: 1
favorite count: 0
type: Question

http://stackoverflow.com/q/29342540
has comment: http://stackoverflow.com/comment/46872289
has title: Unwanted JSON Response
tagged with: php
has answer: http://stackoverflow.com/a/29343419
has comment: http://stackoverflow.com/comment/46872283
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46872341
tagged with: http://stackoverflow.com/tag/json
type: Question
has body: I'm using this small JSON function with a database. This produces this in the browser, which I don't want/need. {"users":[{"Title":"Anyway","ArtistNumber":"2","TrackTime":"167","Composer":"John Glaze","Lyricist":"Kellee Maize","FileLocation":"public/Anyway.mp3","rated":"0","scores":"[0,0,0,0,0]","free":"0"},{"Title":"One Way Heartbeats","ArtistNumber":"4","TrackTime":"187","Composer":"Bill Bobs","Lyricist":"Michael McEachern","FileLocation":"public/OneWayHeartbeats.mp3","rated":"0","scores":"[0,0,0,0,0]","free":"0"},{"Title":"Parallel Me","ArtistNumber":"3","TrackTime":"192","Composer":"Quite Revolution","Lyricist":"Quite Revolution","FileLocation":"private/ParallelMe.mp3","rated":"0","scores":"[0,0,0,0,0]","free":"1"},{"Title":"Poisoned Oxygen","ArtistNumber":"3","TrackTime":"177","Composer":"Quite Revolution","Lyricist":"Quite Revolution","FileLocation":"public/PoisonedOxygen.mp3","rated":"0","scores":"[0,0,0,0,0]","free":"0"},{"Title":"Xmas Prison Blues","ArtistNumber":"1","TrackTime":"192","Composer":"Steve Perry","Lyricist":"Steve Perry","FileLocation":"private/XmasPrisonBlues.wma","rated":"0","scores":"[0,0,0,0,0]","free":"1"}]} Any ideas on how to hide it or remove it from coming up? Thanks This is the Database.php: <?php $Hostserver = "localhost"; $databUser = "ee2800"; $databPass = "secret"; $databDatabase = "ee2800"; $database = new mysqli ($Hostserver, $databUser, $databPass, $databDatabase); if ($database) { mysqli_select_db($database, "ee2800"); //echo ("Successfully connected to database!"); } else { die ("Error: Failed to connect to the database."); } $var = array(); $sql = "SELECT * FROM songs"; $result = mysqli_query($database, $sql); while ($obj = mysqli_fetch_object($result)) { $var[] = $obj; } echo '{"users":' . json_encode($var) . '}'; ?> Using jQuery 1.10.2 The songlist element is found here <?php // The system queries the database to obtain a result set containing no more than 10 artists // if ($result = $database->query( "SELECT * FROM `artis…
has comment: http://stackoverflow.com/comment/46873463
has comment: http://stackoverflow.com/comment/46871788
tagged with: javascript
has comment: http://stackoverflow.com/comment/46873925
score: 0
has comment: http://stackoverflow.com/comment/46872746
has comment: http://stackoverflow.com/comment/46872745
answer count: 1

http://stackoverflow.com/comment/46893152
comment on: http://stackoverflow.com/q/29354009
has text: i have tried using item `+=` but this didnt work all i got was `[object Object]`
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29340938
has body: It looks like you are running it by double clicking on html file. So it will run in browser with file protocol. You have to run it from server like http://localhost/myhtml.html. I have tried code in my system, it's working with server. Plus you have syntax error in below line $(data).find('a:contains(" + fileExt + ")').each(function () { replace above with this $(data).find("a:contains(" + fileExt + ")").each(function () { I'm on ubuntu system, and with chrome browser, you do not need to replace location. because it is returning relative path to location. UPDATE Your final code should look like this
type: Answer
upvote count: 3
score: 3
answers question: http://stackoverflow.com/q/29340664
downvote count: 0

http://stackoverflow.com/comment/46923791
type: QuestionComment
has text: why don't you use jquery validation http://jqueryvalidation.org/ its not that hard.
comment on: http://stackoverflow.com/q/29370764
score: 0
type: Comment

http://stackoverflow.com/comment/46647839
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29218960
has text: It's not about me and/or you :-) the *code* is the object. Anyway, I withdraw my down-vote as you've already updated the answer.
type: AnswerComment

http://stackoverflow.com/comment/124835299
comment on: http://stackoverflow.com/a/70615822
score: 0
type: AnswerComment
has text: "red" is encoded in the last significant bits?
type: Comment

http://stackoverflow.com/q/29291578
has comment: http://stackoverflow.com/comment/46900234
accepted answer: http://stackoverflow.com/a/29503352
has title: Difficulty using HTML import for javascript dependencies with polymer on Firefox & Safari
tagged with: javascript
has comment: http://stackoverflow.com/comment/47021529
score: 3
downvote count: 0
has body: I'm building a Polymer application and having difficulty importing javascript dependencies. I've reviewed this question, but the solution isn't working for me - the lodash javascript doesn't load via HTML Import. Use of lodash is just an example, the problem exists for any library I try to import this way. The following test code works fine in chrome, but not in firefox or safari (unless I vulcanize it, which I shouldn't need to do). index.html Test Page NOTE 1: WebComponentsReady fires after HTMLImportsLoaded (see here) NOTE 2: I've tried webcomponentsjs 0.5.5 too test-component.html Click Me! lodash.html The ordered output from the safari console: Web Components Ready! test-component component ready! ReferenceError: Can't find variable: _ Reducing the complexity still gives the same problem: index.html (simpler version) Test Page I can click on the component at any time after page load and the error still occurs - lodash.js is never available to it. I'm sure there's something obvious I'm missing here, but I'm struggling to resolve it.
favorite count: 0
has comment: http://stackoverflow.com/comment/46962441
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/31959740
has answer: http://stackoverflow.com/a/31959740
upvote count: 3
has comment: http://stackoverflow.com/comment/46933987
has answer: http://stackoverflow.com/a/29503352
linked to: http://stackoverflow.com/q/25819898
type: Question
tagged with: polymer
answer count: 2

http://stackoverflow.com/comment/66825857
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/38286807
has text: doc and behavior are getting better now

http://stackoverflow.com/comment/46955175
type: QuestionComment
comment on: http://stackoverflow.com/q/29351560
score: 0
has text: Are you getting any errors?
type: Comment

http://stackoverflow.com/comment/46898200
has text: Do you have any errors when you check the console?
type: QuestionComment
comment on: http://stackoverflow.com/q/29356642
score: 0
type: Comment

http://stackoverflow.com/comment/46856138
type: AnswerComment
has text: This worked for getting the green border after an image was clicked. I still need to remove that border if another image is clicked but I can't seem to figure out what I should do
comment on: http://stackoverflow.com/a/29333528
type: Comment
score: 0

json-rpc
tag name: json-rpc
type: Tag
tags question: http://stackoverflow.com/q/29274407

http://stackoverflow.com/comment/46836964
comment on: http://stackoverflow.com/a/29322290
has text: You're welcome. For pass-by-reference there is a question with some good answers here at SO. See [this question](http://stackoverflow.com/questions/7744611/pass-variables-by-reference-in-javascript).
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/29252928
has answer: http://stackoverflow.com/a/29253370
score: -1
type: Question
has body: Please review my code. I tried a lot but I couldn't find the problem. How do I prevent such errors in the future? &lt;script&gt; var tbox= document.getElementById('tbox'); var selector= document.getElementById('selector'); function change(tothis){ tbox.style.color=tothis; } function appear(){ selector.style.visibility='visible'; tbox.focus(); } function disappear(){ selector.style.visibility='hidden'; } setTimeout(disappear,500); &lt;/script&gt;
has title: Getting the 'cannot read property style of null'
tagged with: javascript
has comment: http://stackoverflow.com/comment/46709389
answer count: 1
downvote count: 1
favorite count: 0
upvote count: 0
type: UnansweredQuestion

http://stackoverflow.com/a/29360849
score: 0
answers question: http://stackoverflow.com/q/29360634
type: Answer
has body: You need to use innerHTML. That will retrieve the div blocks from the object you created. elem_IS.innerHTML = imagesTabsArray[IS_i.innerHTML];

http://stackoverflow.com/comment/46784092
comment on: http://stackoverflow.com/a/29293962
score: 0
type: AnswerComment
has text: You should explain the reason why.
type: Comment

http://stackoverflow.com/a/29348007
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/29347909
has comment: http://stackoverflow.com/comment/46881863
upvote count: 1
has body: Set `body height, because max-height works only if the parent element has a height body{height: 100vh} #myDiv { position: fixed; top: 100px; left: 50%; width: auto; height: auto; background: red; display: inline-block; padding: 10px; max-height: 30%; } DEMO
type: Answer

http://stackoverflow.com/comment/46711329
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29250008
has text: In that case you should implement http handler and that handler can accept the byte array from the file from the httpcontext

http://stackoverflow.com/q/29348501
tagged with: .htaccess
has answer: http://stackoverflow.com/a/29351373
has body: Please advice how to make the following redirect: www.siteA.com/directory/keep-all-those-urls/ → www.siteB.com/directory/keep-all-those-urls/ But at same time do not redirect other directories: www.siteA.com/ → www.siteA.com/ (no redirect here)
tagged with: directory
type: UnansweredQuestion
score: 0
tagged with: http-redirect
has answer: http://stackoverflow.com/a/29348667
has comment: http://stackoverflow.com/comment/46882804
has title: How to make redirect from from specific category to another website
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/46882937
tagged with: url
tagged with: javascript

http://stackoverflow.com/q/29356681
has answer: http://stackoverflow.com/a/29400350
answer count: 1
tagged with: javascript
has body: Going off of @Paolo Bergantino answer to this previous SO question , I've been trying to dynamically add forms to my formset. But, the newly added form seems to be somehow "linked" to the previous one. So, clicking a checkbox on the new form influences the old one. Additionally, once I submit, only one form is displayed in the post. What happened to all the other newly added ones? addAnother.js function cloneMore(selector, type) { var newElement = $(selector).clone(true); var total = $('#id_' + type + '-TOTAL_FORMS').val(); newElement.find(':input').each(function() { var name = $(this).attr('name').replace('-' + (total-1) + '-','-' + total + '-'); var id = 'id_' + name; if ($(this).attr('type') != 'hidden') { $(this).val(''); } $(this).attr({'name': name, 'id': id}).removeAttr('checked'); }); newElement.find('label').each(function() { var newFor = $(this).attr('for').replace('-' + (total-1) + '-','-' + total + '-'); $(this).attr('for', newFor); }); total++; $('#id_' + type + '-TOTAL_FORMS').val(total); $(selector).after(newElement); } template.html {% load crispy_forms_tags %} {{ dataset_form.media }} {% crispy dataset_form %} {% crispy facility_form %} {% crispy contact_form %} {{ author_formset.management_form }} {% for form in author_formset.forms %} {{ form.as_table }} {% endfor %} {% crispy terms_form %} Cancel $('#add_more').click(function() { cloneMore('div.table:last', 'service'); });
tagged with: ajax
linked to: http://stackoverflow.com/q/501719
type: UnansweredQuestion
tagged with: django
tagged with: django-forms
type: Question
score: 0
has title: Javascript to add/delete a form in a django formset

http://stackoverflow.com/q/29229790
has body: I have the following code: app.post('/pepe/query/', function(req, res) { var query = "SELECT * FROM mutations"; if (req.body.start.length !== 0) { //From an HTML form query = query + " WHERE pos&gt;=" + req.body.start; } app.get('/pepe/query/:number', function(req2, res2) { var pages = 10 * req.param2("number") - 10; query2 = query + " LIMIT " + pages + ", 10"; if (req.body.output == 1) { pool.query(query2, function select(error, results, fields) { res.render('index.html',{data:results, error:null}); }); } else if (req.body.output == 2) { query2 = "SELECT count(*) FROM (" + query + ") AS table1"; pool.query(query2, function select(error, results, fields) { res.send(results); }); } }); }); However, this approach does not work, cause I send information from a form via POST to /pepe/query, but it does not work. My aim would be to go to /pepe/query/3 for example, and go to page 3 (results 21-30).
has comment: http://stackoverflow.com/comment/46667714
type: Question
has answer: http://stackoverflow.com/a/29230972
has comment: http://stackoverflow.com/comment/46668257
has comment: http://stackoverflow.com/comment/46668127
score: 0
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/46667858
tagged with: express
has title: Pagination approach in NodeJS Express
has comment: http://stackoverflow.com/comment/46667252
accepted answer: http://stackoverflow.com/a/29230972
has comment: http://stackoverflow.com/comment/46667820
has comment: http://stackoverflow.com/comment/46667782
tagged with: node.js
type: AnsweredQuestion

http://stackoverflow.com/comment/46740622
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29269709
has text: Use something like `$.ajax( /* ... */ ).done(function() { $('.gifs').gifplayer(); /* ... */ });`
score: 0

http://stackoverflow.com/a/29375097
has body: In PHP you echo data in json format json_encode(array('a'=&gt;$result_a,'b'=&gt;$result_b, 'c'=&gt;$result_c )); So if you want to use the json as an object directly in the ajax success function, you need tell the ajax call "You are expecting a json object coming bakc!"; So you should modified js code to this: $.ajax({ type: "POST", url: "http://mywebsite.com/data.php", data: dataString3, cache: false, dataType : "json", // &lt;------here, auto parse json for you error: function(){}, success: function(data){ alert (data.a); alert (data.b); alert (data.c); } }); Or in the success function, manually parse json before use; $.ajax({ type: "POST", url: "http://mywebsite.com/data.php", data: dataString3, cache: false error: function(){}, success: function(data){ var obj = jQuery.parseJSON(data); // &lt;---- here, manual parse alert (obj.a); alert (obj.b); alert (obj.c); } });
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29245967

http://stackoverflow.com/a/29265581
answers question: http://stackoverflow.com/q/29264911
has body: Checkout LiveReload.js. Allows you to write javascript and changes are updated in realtime without refreshing the page using the LiveReload protocol.
upvote count: 1
has comment: http://stackoverflow.com/comment/46734200
type: Answer
has comment: http://stackoverflow.com/comment/46733448
has comment: http://stackoverflow.com/comment/46733789
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/46733761

http://stackoverflow.com/comment/46700702
comment on: http://stackoverflow.com/q/29247911
type: Comment
type: QuestionComment
has text: function() {window.location = TDN.Variables.BaseURL + 'uploads/js/jsfiles.zip';}.function(){ jQuery.post(TDN.Variables.BaseURL + "includes/pages/recursiveRmdir/js", null, null); }
score: 0

http://stackoverflow.com/comment/46859073
type: QuestionComment
has text: How/where do you access `dict`?
score: 0
type: Comment
comment on: http://stackoverflow.com/q/29335048

http://stackoverflow.com/a/29372581
accepted answer of: http://stackoverflow.com/q/29371959
type: AcceptedAnswer
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29371959
has body: I just figured it out... All I have to do is populate each and every one of those referenced fields: Portfolio .findById(req.params.portfolio_id) .populate("bonds.USA.treasury.securities.info") .populate("bonds.USA.municipal.securities.info") .populate("bonds.USA.corporate.securities.info") .populate("bonds.international.developed.securities.info") .populate("bonds.international.emergent.securities.info") .populate("stocks.USA.largeCaps.securities.info") .populate("stocks.USA.mediumCaps.securities.info") .populate("stocks.USA.smallCaps.securities.info") .populate("stocks.international.developed.securities.info") .populate("stocks.international.emergent.securities.info") .exec(function (err, portfolio) { if (err) { return res.status(404).json("Portfolio not found."); } res.render('portfolios/show.ejs', { portfolio: portfolio }); });

http://stackoverflow.com/q/29245716
answer count: 0
has comment: http://stackoverflow.com/comment/46698736
has comment: http://stackoverflow.com/comment/46697303
type: UnansweredQuestion
has body: I have managed to get the websocket connection working, and am receiving data from ping_block and blocks_sub. However, I am having difficulty calculating the difference between the current date and block date received from blockchain.info's api. Can anyone help with the code for calculating how much time has elapsed since the most recent block? Also, how do I keep the connection open so that it updates the innerHTML object? Any advice would be appreciated. Thanks. var wsUri = "wss://ws.blockchain.info/inv"; var output; function init() { output = document.getElementById("output"); initWebSocket(); } function initWebSocket() { // init blockchain websocket (activity, blocks) var blockchain = new WebSocket('wss://ws.blockchain.info/inv'); blockchain.onerror = function (error){ console.log('connection.onerror',error); }; blockchain.onopen = function () { writeToScreen("Connection to blockchain.info succesful."); blockchain.send( JSON.stringify( {"op":"ping_block"} ) ); blockchain.send( JSON.stringify( {"op":"blocks_sub"} ) ); // subscribe to new blocks }; blockchain.onmessage = function (message) { var response = JSON.parse(message.data); var date = new Date(0); date.setUTCSeconds( response.x.time ); if( response.op == "utx") { var amount = 0; for(var i=0;i<response.x.out.length;i++) amount += response.x.out[i].value; // amount is in satoshi // 1 BTC = 100,000,000 Satoshi ([url='https://en.bitcoin.it/wiki/activity)']https://en.bitcoin.it/wiki/activity)[/url] response.amount = amount / 100000000; response.type = TYPE_TRANSACTION; response.index = index++; response.date = date; } else if( response.op == "block" ) { response.type = TYPE_BLOCK; response.date = date; } if( DEBUG ) console.log( response.op, response ); response.date = date; writeToScreen('Most recent block found on: ' + response.date); }; } function writeToScreen(message) { var pre = document.createElement("p"); pre.innerHTML = message; output.appendChild(pre); } // constants var TYPE_TRANSACTION = "transactio…
type: Question
has title: How do I calculate how much time has passed since the most recent block (via blockchain.info's api)?
tagged with: javascript
score: 0
tagged with: bitcoin
tagged with: blockchain

http://stackoverflow.com/q/29239826
tagged with: datatables
answer count: 1
tagged with: datatable
favorite count: 0
accepted answer: http://stackoverflow.com/a/29256530
upvote count: 1
has body: I have a jQuery datatable with date and time columns: Date Time Note 1/2/2015 10:02:03 Test 1/4/2915 02:12:32 Test 1/3/2015 02:05:03 Test 3/2/2015 11:02:03 Test 1/4/2015 01:02:13 Test I want to implement a sort for time. When sorting on time, we first need to sort on date, then time: Date Time Note 1/2/2015 10:02:03 Test 1/3/2015 02:05:03 Test 1/4/2015 01:02:13 Test 1/4/2915 02:12:32 Test 3/2/2015 11:02:03 Test I have the following code: //jQuery datatable code { mData: 'date', sTitle: 'Date', sClass: "dtDate" }, { mData: 'time', sTitle: 'Time', sClass: "dtTime", sType: "time-date-sort"}, { mData: 'notes', sTitle: 'Notes' }, // More code... jQuery.fn.dataTableExt.oSort['time-date-sort-asc'] = function(startTime, endTime) { //Date and time sorts go here return sortedVal; }; jQuery.fn.dataTableExt.oSort['time-date-sort-desc'] = function (startTime, endTime) { //Date and time sorts go here return sortedVal; }; I am able to sort on the time using this, but how would I first sort on date? I am trying to figure out how to get a reference of the date value in the table row (associated with the time value in that row). For example, how to I grab the date object 1/2/2015 for the row where time is 10:02:03? It does not appear as if I can add custom parameters to the oSort function. Do I use jQuery.fn.dataTableExt.oSort or is jQuery.fn.dataTableExt.afnSortData a better option for this?
type: AnsweredQuestion
score: 1
type: Question
has answer: http://stackoverflow.com/a/29256530
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: sorting
has title: jQuery Datatables: Sort on one column when clicking on another.

http://stackoverflow.com/comment/46838843
type: Comment
type: QuestionComment
has text: Maybe changing `this.tickIntervalId` to `self.tickIntervalId` is enough. `this` has many different meanings in JS' many scopes.
score: 0
comment on: http://stackoverflow.com/q/29323476

http://stackoverflow.com/q/29251628
has answer: http://stackoverflow.com/a/29251713
score: 0
answer count: 1
tagged with: jquery
has title: Image becomes scrollabe with the page
has comment: http://stackoverflow.com/comment/46707939
has body: I have the code like this for serving the image from 3rd party system: var bbimagebannerfile = ""; document.write("&lt;a href=\"%%__REDIRECT%%\" target=\"_blank\"&gt;&lt;img src=\"" + bbimagebannerfile + "\" border=\"0\" /&gt;&lt;/a&gt;"); This image is positioned at the bottom of the page. What i am trying to do is make this image scroll along with the page once user reaches its position and when the user scrolls upwards then this image becomes static again. Can anyone help me with that ?
accepted answer: http://stackoverflow.com/a/29251713
tagged with: css
type: AnsweredQuestion
tagged with: scroll
type: Question
tagged with: javascript

http://stackoverflow.com/comment/46862362
type: Comment
comment on: http://stackoverflow.com/q/29336995
type: QuestionComment
has text: Do you mean the fact that I'm accessing each DOM elements with `[0]`? Well, even if I loop normally, how could I not rely on that? Because whenever I remove an element from the list, the list "updates" and I can't use nothing but the `0` index to access the elements that remain in the list. I'm doing it this way because I couldn't find another one, but any advice on this is great. How could I do it differently? Perhaps turning the list into a "regular" array? Or going backwards but using the actual index, maybe?
score: 0

http://stackoverflow.com/a/29377099
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/47009921
has body: Yes, this is possible, but you're definitely not going into the right direction. I suggest learning how to make a simple REST API Node app to get started. This tutorial is a good starting point. I suggest using Express as it simplifies the task of handling POST/GET requests. Here is starter code that does what you want. index.html Note how I used /data instead of localhost:3000/index.html in the part. This is generally known as a REST api. form This is my form First name: Last name: app.js var app = require('express')(); var bodyParser = require('body-parser'); var path = require('path'); app.use(bodyParser.urlencoded({ extended: true })); app.use(bodyParser.json()); app.get('/', function(req, res) { res.sendFile(path.join(__dirname, 'index.html')); }); app.post('/data', function(req, res) { console.log(req.body.firstname); console.log(req.body.lastname); // Add these values to your MySQL database here }); app.listen(3000); File structure app.js index.html Commands to run npm install express npm install body-parser node app.js Then simply go to localhost:3000 in your browser.
downvote count: 0
answers question: http://stackoverflow.com/q/29371471
type: Answer

http://stackoverflow.com/comment/46771278
score: 0
type: Comment
has text: The zero isn't the problem at all.
comment on: http://stackoverflow.com/a/29286958
type: AnswerComment

jquery
tags question: http://stackoverflow.com/q/29327908
tags question: http://stackoverflow.com/q/29347467
tags question: http://stackoverflow.com/q/29287023
tags question: http://stackoverflow.com/q/29336178
tags question: http://stackoverflow.com/q/29282765
tags question: http://stackoverflow.com/q/29304807
tags question: http://stackoverflow.com/q/29344988
tags question: http://stackoverflow.com/q/29307968
tags question: http://stackoverflow.com/q/29246564
tags question: http://stackoverflow.com/q/29334694
tags question: http://stackoverflow.com/q/29323577
tags question: http://stackoverflow.com/q/29264106
tags question: http://stackoverflow.com/q/29257286
tags question: http://stackoverflow.com/q/29335048
tags question: http://stackoverflow.com/q/29323530
tags question: http://stackoverflow.com/q/29233454
tags question: http://stackoverflow.com/q/29237328
tags question: http://stackoverflow.com/q/29296325
tags question: http://stackoverflow.com/q/29328835
tags question: http://stackoverflow.com/q/29240452
tags question: http://stackoverflow.com/q/29289445
tags question: http://stackoverflow.com/q/29372642
tags question: http://stackoverflow.com/q/29226714
tags question: http://stackoverflow.com/q/29246331
tags question: http://stackoverflow.com/q/29256737
tags question: http://stackoverflow.com/q/29306151
tags question: http://stackoverflow.com/q/29352730
tags question: http://stackoverflow.com/q/29242258
tags question: http://stackoverflow.com/q/29312969
tags question: http://stackoverflow.com/q/29323645
tags question: http://stackoverflow.com/q/29279581
tags question: http://stackoverflow.com/q/29245374
tags question: http://stackoverflow.com/q/29369725
tags question: http://stackoverflow.com/q/29326912
tags question: http://stackoverflow.com/q/29222150
tags question: http://stackoverflow.com/q/29372928
tags question: http://stackoverflow.com/q/29342882
tags question: http://stackoverflow.com/q/29311545
tags question: http://stackoverflow.com/q/29282385
tags question: http://stackoverflow.com/q/29313207
tags question: http://stackoverflow.com/q/29267829
tags question: http://stackoverflow.com/q/29315474
tags question: http://stackoverflow.com/q/29245853
tags question: http://stackoverflow.com/q/29368685
tags question: http://stackoverflow.com/q/29258172
tags question: http://stackoverflow.com/q/29276056
tags question: http://stackoverflow.com/q/29259706
tags question: http://stackoverflow.com/q/29249991
tags question: http://stackoverflow.com/q/29300705
tags question: http://stackoverflow.com/q/29278830
tags question: http://stackoverflow.com/q/29221831
tags question: http://stackoverflow.com/q/29248851
tags question: http://stackoverflow.com/q/29317665
tags question: http://stackoverflow.com/q/29273158
tags question: http://stackoverflow.com/q/29367484
tags question: http://stackoverflow.com/q/29222279
tags question: http://stackoverflow.com/q/29263898
tags question: http://stackoverflow.com/q/29362299
tags question: http://stackoverflow.com/q/29282626
tags question: http://stackoverflow.com/q/29332148
tags question: http://stackoverflow.com/q/29252840
tags question: http://stackoverflow.com/q/29338823
tags question: http://stackoverflow.com/q/29348205
tags question: http://stackoverflow.com/q/29353725
tags question: http://stackoverflow.com/q/29266330
tags question: http://stackoverflow.com/q/29255653
tags question: http://stackoverflow.com/q/29226881
tags question: http://stackoverflow.com/q/29345635
tags question: http://stackoverflow.com/q/29369093
tags question: http://stackoverflow.com/q/29297677
tags question: http://stackoverflow.com/q/29297585
tags question: http://stackoverflow.com/q/29235938
tags question: http://stackoverflow.com/q/29338790
tags question: http://stackoverflow.com/q/29219905
tags question: http://stackoverflow.com/q/29254673
tags question: http://stackoverflow.com/q/29281663
tags question: http://stackoverflow.com/q/29358364
tags question: http://stackoverflow.com/q/29223023
tags question: http://stackoverflow.com/q/29227864
tags question: http://stackoverflow.com/q/29338424

http://stackoverflow.com/comment/46788265
type: Comment
comment on: http://stackoverflow.com/q/29296325
has text: how you are changing image same you can change text-color also.
score: 0
type: QuestionComment

http://stackoverflow.com/q/29305326
type: Question
tagged with: canvas
has comment: http://stackoverflow.com/comment/46805442
tagged with: javascript
score: 0
accepted answer: http://stackoverflow.com/a/29307246
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/46811896
has title: HTML5 canvas createPattern API
has body: I have code like: &lt;body&gt; &lt;canvas id="main" width=400 height=300&gt;&lt;/canvas&gt; &lt;script&gt; var windowToCanvas = function(canvas, x, y) { var bbox = canvas.getBoundingClientRect(); return { x: (x - bbox.left) * (canvas.width / bbox.width), y: (y - bbox.top) * (canvas.height / bbox.height) }; }; image = new Image(); image.src = "redball.png"; image.onload = function (e) { var canvas = document.getElementById('main'), context = canvas.getContext('2d'); var pattern = context.createPattern(image, "repeat"); function draw(loc) { context.clearRect(0, 0, canvas.width, canvas.height); context.fillStyle = pattern; context.beginPath(); context.moveTo(loc.x, loc.y); context.lineTo(loc.x + 300, loc.y + 60); context.lineTo(loc.x + 70, loc.y + 200); context.closePath(); context.fill(); } canvas.onmousemove = function(e) { var event = e || window.event, x = event.x || event.clientX, y = event.y || event.clientY, loc = windowToCanvas(canvas, x, y); draw(loc); }; } &lt;/script&gt; &lt;/body&gt; I call createPattern API, use a background image to fill a Triangle, but when mouse move, the background image also move, I only want the background image at fixed position, how Can I fix this?
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29307246

http://stackoverflow.com/a/29281929
has comment: http://stackoverflow.com/comment/46762237
answers question: http://stackoverflow.com/q/29281663
has comment: http://stackoverflow.com/comment/46762073
has comment: http://stackoverflow.com/comment/46761730
type: AcceptedAnswer
has body: With this code $($scope.personIgnoreList).each(function (i, p) { if (p == person) { return false; } }); return true; you always return true, because returning from $.each is not the same as returning from function (it will just break the loop). Correct approach would be using something like this: $scope.ShowPerson = function (person) { return !$scope.personIgnoreList.some(function(p) { return p === person; }); } Demo: http://plnkr.co/edit/yGy8x2k25Dkpu6hLj4eu?p=preview
has comment: http://stackoverflow.com/comment/46762495
upvote count: 3
has comment: http://stackoverflow.com/comment/46762018
type: Answer
has comment: http://stackoverflow.com/comment/46761882
downvote count: 0
has comment: http://stackoverflow.com/comment/46762371
has comment: http://stackoverflow.com/comment/46791666
has comment: http://stackoverflow.com/comment/46761958
score: 3
accepted answer of: http://stackoverflow.com/q/29281663

http://stackoverflow.com/comment/70325350
comment on: http://stackoverflow.com/a/29371628
type: AnswerComment
has text: The realIndex property has now been added! https://github.com/nolimits4web/Swiper/pull/1697
score: 3
type: Comment

http://stackoverflow.com/comment/46918000
type: Comment
type: QuestionComment
has text: In above code curr_date is today's date(03/31/2015), so when add 6months to this date Iam getting 2015/09/31 , this is wrong date, because 32 day is not there.
comment on: http://stackoverflow.com/q/29367852
score: 0

http://stackoverflow.com/q/29248279
tagged with: function
tagged with: arrays
tagged with: closures
tagged with: javascript
tagged with: callback
has title: javascript callback function selection
score: 0
has answer: http://stackoverflow.com/a/29248517
has answer: http://stackoverflow.com/a/29248475
possible better answer: http://stackoverflow.com/a/29248366
has body: So basically i need to use the each function that i implemented in the filter function so that the filter function return only item in myArray that is greater than 2. i m totally stuck. var myArray = [1, 2, 3, 4, 5]; function each(collection, callback) { for (var i = 0; i &lt; collection.length; i++) { callback(collection[i]); } } function filter(collection, test) { var returnAr = []; for (var i = 0; i &lt; collection.length; i++) { if (test(collection[i])) { returnAr.push(collection[i]) } } //instead of using "for(var i = 0; i &lt; collection.length; i++)" // how can i use the each function i implemented above? return returnAr; } filter(myArray, function(n) { return n &gt; 2; }
accepted answer: http://stackoverflow.com/a/29249267
answer count: 4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29249267
type: Question
has answer: http://stackoverflow.com/a/29248366

carousel
tags question: http://stackoverflow.com/q/29242559
tag name: carousel
type: Tag
tags question: http://stackoverflow.com/q/29219735
tags question: http://stackoverflow.com/q/29234135

http://stackoverflow.com/comment/46708791
comment on: http://stackoverflow.com/q/29252326
type: Comment
type: QuestionComment
has text: The **entire** web...must have taken years!
score: 1

http://stackoverflow.com/a/29308928
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/29308685
answers question: http://stackoverflow.com/q/29308685
upvote count: 1
type: AcceptedAnswer
has body: You're using the same now that you started off with 10 seconds earlier. A Date object keeps the time it was given. It doesn't automatically change as time passes. You need to instantiate a new now: function getElapsedTime() { setTimeout(function () { var now = new Date(); var reS = now.getSeconds(); var reM = now.getMinutes(); var reH = now.getHours(); var elapS = reS - stS; var elapM = reM - stM; var elapH = reH - stH; if (elapM &lt; 0) { reM = reM + 60; elapM = reM - stM; } if (elapS &lt; 0) { reS = reS + 60; elapS = reS - stS; } alert(elapS); alert(elapM); alert(elapH); }, 10000); } Note that you can calculate time spans more cleanly if you treat dates as numbers: var start = +new Date(); function getElapsedTime() { setTimeout(function () { var elapsed = +new Date() - start; var elapS = Math.floor(elapsed / 1000) % 60; var elapM = Math.floor(elapsed / 60000) % 60; var elapH = Math.floor(elapsed / 3600000) % 24; alert(elapS); alert(elapM); alert(elapH); }, 10000); } getElapsedTime();
type: Answer

http://stackoverflow.com/comment/46759393
type: QuestionComment
comment on: http://stackoverflow.com/q/29271508
score: 0
has text: Is this not the same question than your other https://stackoverflow.com/questions/29268178/creating-a-small-custom-modal-window-under-the-day-slot-in-full-calendar-io ?
type: Comment

http://stackoverflow.com/q/29254588
type: Question
has title: How to restrict event stopPropagation upto an ancestor element?
answer count: 1
has comment: http://stackoverflow.com/comment/46712752
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29273642
score: 0
has body: Is it possible to stop propagation upto a certain ancestor-element! However we can do it- by adding the event.stopPropagation() in the parent itself, for that event, but that might block certain cases.
type: UnansweredQuestion

http://stackoverflow.com/comment/46685452
score: 0
comment on: http://stackoverflow.com/q/29239186
type: Comment
type: QuestionComment
has text: Change `$(this).off('mouseleave');` to `divContent = $("#content").html();` You unsubscibe from the even and then never subscribe again, which provokes certain artefacts.

http://stackoverflow.com/q/29340773
has comment: http://stackoverflow.com/comment/46869197
upvote count: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29340895
has answer: http://stackoverflow.com/a/29340842
type: Question
accepted answer: http://stackoverflow.com/a/29340841
has comment: http://stackoverflow.com/comment/46868898
has title: Run AJAX script
downvote count: 0
tagged with: javascript
possible better answer: http://stackoverflow.com/a/29340842
favorite count: 0
tagged with: ajax
has answer: http://stackoverflow.com/a/29340916
score: 1
answer count: 4
has answer: http://stackoverflow.com/a/29340841
has body: I have the ajax, which runs when the user writes something ind input id=2 HTML: &lt;input id="2" type="text" onkeyup="posttitulo(this.value)" /&gt; SCRIPT: function posttitulo(value){ $.post("getdata/posttitulo.php",{partialStates:value}); } The code works perfectly.. The problem is that I have the javascript function which onclick copies value of another input id=1, in this case id=2 has the value without typing and function posttitulo(value) doesn't work.. So I need Ajax to be executed if: 1) User writes something onkeyup="posttitulo(this.value); 2) the value of id=1 is copied to id=2.. Hope that I explained the problem.. Thanks in advance

http://stackoverflow.com/q/29253502
has comment: http://stackoverflow.com/comment/46713253
score: 1
tagged with: codeigniter
has comment: http://stackoverflow.com/comment/46713581
upvote count: 1
has comment: http://stackoverflow.com/comment/46710340
type: Question
has body: I have this code: &lt;a href="#"&gt; &lt;i class="icon-heart" id="icon_heart" value="20"&gt;&lt;/i&gt; &lt;/a&gt; var some_value = $("#icon_heart").attr("value"); $('[id=id_heart]').click(function() { $.ajax({ url: "&lt;?=base_url(); ?&gt;controller/save", type: "post", data: { some_value: some_value }, success: function(dat){ alert(dat); }, error: function (xhr, ajaxOptions, thrownError) { alert(xhr.status); alert(thrownError); } }); }); PHP: function save() { $post = $this-&gt;input-&gt;post(); $some_value = $post['some_value']; $dtl['some_field'] = $some_value; $dtl['date_insert'] = date('Y-m-d H:m:s'); $this-&gt;db-&gt;insert('resep_like',array_filter($dtl)); $this-&gt;db-&gt;set('is_like', 'is_like+1',FALSE); $this-&gt;db-&gt;where('some_field', $some_value); $this-&gt;db-&gt;update('some_table'); echo "success"; } The insert and update queries is success, but the AJAX response returns error: status code 500 internal server error. Why can that be? It's successful but the result is error, and the echo from PHP is not displayed. How can i handle the response if it success but the AJAX response show error
has title: AJAX error status code 500 internal server error
has comment: http://stackoverflow.com/comment/46711386
has comment: http://stackoverflow.com/comment/46710839
has comment: http://stackoverflow.com/comment/46712362
has answer: http://stackoverflow.com/a/29282631
tagged with: javascript
tagged with: jquery
tagged with: ajax
has comment: http://stackoverflow.com/comment/46711786
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/46710480
has comment: http://stackoverflow.com/comment/46762611
favorite count: 0
has comment: http://stackoverflow.com/comment/46711141
has comment: http://stackoverflow.com/comment/46710671
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46716043
has comment: http://stackoverflow.com/comment/46710400
tagged with: php
has comment: http://stackoverflow.com/comment/46710701
has comment: http://stackoverflow.com/comment/46712201

http://stackoverflow.com/a/29261885
has comment: http://stackoverflow.com/comment/46734976
type: Answer
has body: IMHO, you can follow the steps ` 1. On sorting by a column, hyperlink column set the field name in a hidden field. On clicking the filter button, post the hidden field and its direction In controller, validate the sort string and direction along with the value for any malicious inputs Pass these to the data access layer Filter and sort the data Refresh grid ` I would strongly suggest you to use server side paging and sorting because you will lower data transfer between db and application. Few lines of JavaScript or some plugin should help you. The sorting information can be passed to the server via a json string in the post method. It can take the format as var sort data=[{ Field:"username ", Direction:"asc" }] This way, you can send all sorted field data to your server side code to do processing. Wherein, you will deserialize these data and use while forming the SQL query or in EF
answers question: http://stackoverflow.com/q/29261650
score: 0

http://stackoverflow.com/comment/46827473
score: 0
has text: what do you see in the console? any errors?
type: Comment
comment on: http://stackoverflow.com/q/29317812
type: QuestionComment

http://stackoverflow.com/comment/46681889
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29237414
has text: That wasn't meant as a copy-and-paste code sample. It was meant as a understand-the-concept code sample. It is *four lines*. I trust you can make the necessary changes.

http://stackoverflow.com/q/29221345
tagged with: asterisk
type: Question
has answer: http://stackoverflow.com/a/29234366
accepted answer: http://stackoverflow.com/a/29234366
tagged with: javascript
tagged with: sipml
upvote count: 1
has title: Asterisk goes mute in android but works on PC
answer count: 1
favorite count: 0
has body: I have an asterisk for web(calls in the website only) working, on PC, but when I run the same client on my android 5 no sound, at least not in my android, it does send voice to PC, but just cant reproduce the incomming voice. Everthing seems to be just fine with my asterisk, it shows in call: servidor-asterisk*CLI&gt; core show channels Channel Location State Application(Data) SIP/002670-0000003d (None) Up AppDial((Outgoing Line)) SIP/000001-0000003c 002670@from-internal Up Dial(SIP/002670,60) 2 active channels 1 active call 31 calls processed But in eclipse console i receive code 405 from android: "__tsip_transport_ws_onmessage", source: http://IP/videoNodeJs/scripts/sip_api.js (1) "recv=OPTIONS sip:000001@df7jal23ls0d.invalid;rtcweb-breaker=no;transport=ws SIP/2.0 "Not implemented", source: http://IP/videoNodeJs/scripts/sip_api.js (1) "SEND: SIP/2.0 405 Method Not Allowed Any suggestions? UPDATE: SIPML5 Client: &lt;audio id="audio-remote"/&gt; var opcoes_chamada = { audio_remote: document.getElementById('audio-remote'), screencast_window_id: 0x00000000, // entire desktop bandwidth: { audio:undefined, video:undefined }, video_size: { minWidth:undefined, minHeight:undefined, maxWidth:undefined, maxHeight:undefined }, events_listener: { events: '*', listener: sipEventsListener }, sip_caps: [ { name: '+g.oma.sip-im' }, { name: 'language', value: '\"en,fr\"' } ] }; To make a call: callSession = sipStack.newSession('call-audio', opcoes_chamada); callSession.call(sip_id_d); To answere a call: e.newSession.setConfiguration(opcoes_chamada); e.newSession.accept(); 405 Method Not Allowed The method specified in the Request-Line is understood, but not allowed for the address identified by the Request-URI. The response MUST include an Allow header field containing a list of valid methods for the indicated address. Some interpretation of this, any chance that everthing is fine but the audio TAG is the problem in the mobile client? If not, what is the 'address identified by the …
tagged with: android
type: AnsweredQuestion
downvote count: 0
score: 1

http://stackoverflow.com/q/29342326
type: Question
tagged with: reactjs
upvote count: 9
has answer: http://stackoverflow.com/a/29404172
tagged with: javascript
possible better answer: http://stackoverflow.com/a/45061793
has answer: http://stackoverflow.com/a/45061793
accepted answer: http://stackoverflow.com/a/29404172
answer count: 3
downvote count: 0
favorite count: 0
has title: React component view does not get update
score: 9
has answer: http://stackoverflow.com/a/73739944
has body: I have a React component that manage multiple accordion in a list, but when i update a children, on React dev tools, it was showing the updated text but on the view/ui, it doesnt update. Please advice. var AccordionComponent = React.createClass({ getInitialState: function() { var self = this; var accordions = this.props.children.map(function(accordion, i) { return clone(accordion, { onClick: self.handleClick, key: i }); }); return { accordions: accordions } }, handleClick: function(i) { var accordions = this.state.accordions; accordions = accordions.map(function(accordion) { if (!accordion.props.open &amp;&amp; accordion.props.index === i) { accordion.props.open = true; } else { accordion.props.open = false; } return accordion; }); this.setState({ accordions: accordions }); }, componentWillReceiveProps: function(nextProps) { var accordions = this.state.accordions.map(function(accordion, i) { var newProp = nextProps.children[i].props; accordion.props = assign(accordion.props, { title: newProp.title, children: newProp.children }); return accordion; }); this.setState({ accordions: accordions }); }, render: function() { return ( &lt;div&gt; {this.state.accordions} &lt;/div&gt; ); } Edit: The component did trigger componentWillReceiveProps event, but it still never get updated. Thanks
tagged with: node.js
type: AnsweredQuestion

http://stackoverflow.com/a/29359747
score: 0
has body: There is no automatic API for this. You are going to have to draw a polygon either dynamically when the user clicks, or pre-draw all the U.S. State polygons in advance and hidden, then dynamically make the proper one visible when the user clicks. As for making polygons in the shape of at least U.S. states, several persons have posted pre-defined polygon lists. One is here in StackOverflow: Geographical boundaries of states/provinces -&gt; Google Maps Polygon However, if you are looking at world-wide regions, states, and provinces, I doubt you will find pre-defined lists of them all. You may well have to create your own polygons by manually drawing on a Google Map or Google Earth, then export the polygon's lat/lng waypoints.
type: Answer
answers question: http://stackoverflow.com/q/29340919

http://stackoverflow.com/comment/47026001
type: Comment
has text: Yep, local storage seems like the way to go.
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/29331586

http://stackoverflow.com/q/29275395
score: 2
upvote count: 2
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46750128
has answer: http://stackoverflow.com/a/29278544
has answer: http://stackoverflow.com/a/29276013
type: Question
has comment: http://stackoverflow.com/comment/46750270
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: ajax
has comment: http://stackoverflow.com/comment/46750520
has title: Is my jQuery load request being called twice?
has body: I have this website: http://wearewebstars.dk/poc/index.html If you click the top menu, then it makes an Ajax request to another page. And if you click again, a new request to another page and so on... However, it seems, that If I click the top navigation once, then it loads the new page, and then if I click on another link in the top navigation, then it seems that it loads the page twice or something? I cant quite figure out why it does this? If you start by clicking "Omgivelserne", and after that click "Skriv dig op", then the page "Skriv dig op", seems to be loading twice, judging from the fade transitions? My JS for the Ajax and Transitions (Edited to only show relevant code): var DIS = DIS || {}; // create a timeline var tl = new TimelineMax(); (function($, DIS, window) { var graphic = $("div.page-transition"); DIS.PageTransitionStart = { start: function(url) { $this = $(this); var pageTransitionStart = new TimelineMax({ onComplete: DIS.loadPage, onCompleteParams: [url, $this] }); pageTransitionStart.add(TweenMax.set($("body"), { className: "animating" })); pageTransitionStart.to(graphic, 0.3, { css: { scale: 50, opacity: 0.5, force3D: true }, ease: Power1.easeOut }); pageTransitionStart.to(graphic, 0.5, { css: { scale: 130, opacity: 1, force3D: true }, ease: Power1.easeOut }); //tl.add(pageTransitionStart); }, toggleSelectedClass: function(el) { $("#mainmenu").find("a").removeClass("selected"); el.addClass("selected"); } }; DIS.PageTransitionEnd = { end: function(el, url) { var pageTransitionEnd = new TimelineMax(); pageTransitionEnd.add(TweenMax.to(el, 0.3, { css: { scale: 1, opacity: 1 }, ease: Power4.easeOut })); pageTransitionEnd.add(TweenMax.to(el, 0.1, { onComplete: function() { TweenMax.set($("body"), { className: "" }); // then only replace with blue div with new height and width } })); //tl.add(pageTransitionEnd); } }; DIS.TopNavigation = function() { $(".nav a").click(function(event) { event.preventDefault(); $url = $(this).attr("href"); DIS.PageTrans…
favorite count: 0

http://stackoverflow.com/comment/46758357
score: 0
comment on: http://stackoverflow.com/q/29280221
type: QuestionComment
type: Comment
has text: I don't think they're exclusively linked tbh - I see what you mean but don't think it works like that

http://stackoverflow.com/q/29236301
answer count: 3
has comment: http://stackoverflow.com/comment/46679045
has answer: http://stackoverflow.com/a/29236457
favorite count: 0
has answer: http://stackoverflow.com/a/29258304
has comment: http://stackoverflow.com/comment/46678957
has answer: http://stackoverflow.com/a/29236689
upvote count: 1
possible better answer: http://stackoverflow.com/a/29236689
type: AnsweredQuestion
has title: Javascript button click causing multiple Post
score: 1
accepted answer: http://stackoverflow.com/a/29258304
type: Question
has comment: http://stackoverflow.com/comment/46679396
downvote count: 0
tagged with: javascript
tagged with: jquery
has body: I have the following script which is rendering a partial view inside a dialog box: $(function () { $('#addressLookupBtn').click(function () { $('#dialog').dialog({ title: 'Address Lookup Tool', modal: true, width: '1200', height: 'auto', resizable: false, show: { effect: "fade", duration: 2000 }, hide: { effect: "fade", duration: 1000 }, open: function (event, ui) { //Load the AddressLookup action which will return //the partial view: _AddressLookup $(this).load("@Url.Action("AddressLookup", new { evpId = Model.EvpId })"); } }).dialog('open'); }); }); The problem is, when I submit the partial view, there are 2 POSTS being made to the server, I think the submit for the partial view is also being bound to the $('#addressLookupBtn').click. Can anyone see where I'm going wrong? more info Partial view @using (Ajax.BeginForm(new AjaxOptions { UpdateTargetId = "updatearea" })) { &lt;div id="updatearea" class="form-group"&gt; &lt;div style="width:300px; display:block; float:left;"&gt; @Html.TextBox("PostCode", null, new { @class = "form-control" }) &lt;/div&gt; &lt;div id="NewAddressLine"&gt; &lt;input type="submit" value="Lookup Postcode" class="btn btn-default" /&gt; &lt;/div&gt; &lt;/div&gt; }

http://stackoverflow.com/a/29288278
has body: You can put it in a string, kind of like escaping it. The close tag doesn't seem to work, so you could concatenate two strings, and use constants to make it slightly easier to read: &lt;% const string OPEN = "&lt;%="; const string CLOSE = "%" + "&gt;"; %&gt; legendTemplate : "&lt;ul class=\"&lt;%=OPEN%&gt;name.toLowerCase()&lt;%=CLOSE%&gt;-legend... Or do it in javascript instead, but this would make it more difficult to see in the source HTML: var OPEN = "&lt;" + "%" + "="; var CLOSE = "%" + "&gt;"; legendTemplate: "&lt;ul class=\"" + OPEN + "name.toLowerCase()" + CLOSE + "-legend... " Another option would be to use a different representation for one of the characters, maybe for percent. You could do \045 or another representation (EDIT: Don't use \045, use \x25 or \u0025 instead - looks like octal is getting phased out of javascript): legendTemplate = "&lt;ul class=\"&lt;\x25=name.toLowerCase()\x25&gt;-legend... " Or probably the better answer, if you're not using any server code in this particular piece of javascript, just move it out to a .js file.
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/46775441
answers question: http://stackoverflow.com/q/29288114
upvote count: 1
has comment: http://stackoverflow.com/comment/46774295
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29288114
type: Answer

http://stackoverflow.com/comment/102333632
comment on: http://stackoverflow.com/q/29324556
score: 0
has text: @Marcus this question is years older but ‍♂️
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46784131
type: AnswerComment
has text: I'm using localhost, btw. I'm not sure if that detail is going to be helpful or not...
type: Comment
comment on: http://stackoverflow.com/a/29293722
score: 0

http://stackoverflow.com/q/29344979
score: 0
answer count: 3
possible better answer: http://stackoverflow.com/a/29345046
tagged with: jquery
tagged with: ajax
tagged with: http://stackoverflow.com/tag/html
has body: I am injecting HTMl code into the dom using Ajax. It does this sucessfully but my jQuery selector does not work for this HTML input So if i do the following in my Jquery it does not get recognized... $("input[id*='cb_Compare']").click(function () However if i assign the input with an onclick function in my server side code thatworks. What is this sorcery?
accepted answer: http://stackoverflow.com/a/29345023
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/203198
duplicate of: http://stackoverflow.com/q/203198
has answer: http://stackoverflow.com/a/29345023
type: Question
has answer: http://stackoverflow.com/a/29345035
has title: jQuery selectors does not recognize ny dynamically created HTML input function
tagged with: javascript
has answer: http://stackoverflow.com/a/29345046
has comment: http://stackoverflow.com/comment/46876053

http://stackoverflow.com/a/29339314
has comment: http://stackoverflow.com/comment/46866381
downvote count: 0
answers question: http://stackoverflow.com/q/29339293
has body: Add below in your css file:- [ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak { display: none !important; }
upvote count: 8
type: Answer
has comment: http://stackoverflow.com/comment/46866203
score: 8

http://stackoverflow.com/q/29234072
accepted answer: http://stackoverflow.com/a/29234229
type: Question
score: 1
has body: I have this defer kind of loading script at the bottom of my page. It loads scripts ok, but old jquery onload event is now missing. var dfLoadStatus = 0; var dfLoadFiles = [ ["//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"], ["//netdna.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js", "/js/jquery.unveil.js", "/scripts/js/jquery.cookie.js"] ]; function downloadJSAtOnload() { if (!dfLoadFiles.length) return; var dfGroup = dfLoadFiles.shift(); dfLoadStatus = 0; for (var i = 0; i &lt; dfGroup.length; i++) { dfLoadStatus++; var element = document.createElement('script'); element.src = dfGroup[i]; element.onload = element.onreadystatechange = function() { if (!this.readyState || this.readyState == 'complete') { dfLoadStatus--; if (dfLoadStatus==0) downloadJSAtOnload(); } }; document.body.appendChild(element); } } if (window.addEventListener) window.addEventListener("load", downloadJSAtOnload, false); else if (window.attachEvent) window.attachEvent("onload", downloadJSAtOnload); else window.onload = downloadJSAtOnload; Before moving to this defer loading, I used to use lot of these kind of scripts after jquery loaded: $(document).ready(function() { $("img").unveil(200); }); How do I create replacement function/event for that jquery function, that detects when all those scripts are loaded, or at least jquery has been loaded?
has comment: http://stackoverflow.com/comment/46682129
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
has title: replacement for $(document).ready(function() after defer loading jquery
favorite count: 0
tagged with: deferred
has answer: http://stackoverflow.com/a/29234229
linked to: http://stackoverflow.com/q/26124199
type: AnsweredQuestion
upvote count: 1

http://stackoverflow.com/comment/46776611
has text: possible duplicate of [Angularjs pass function from Controller to Directive (or call controller function from directive) - with parameters](http://stackoverflow.com/questions/28666374/angularjs-pass-function-from-controller-to-directive-or-call-controller-functio)
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29289400

http://stackoverflow.com/comment/46860025
score: 0
has text: @DrewKennedy so it is all possible to do with JavaScript? What would be the advantages of having a database? Would it be for security reasons like Mitch mentioned?
type: QuestionComment
comment on: http://stackoverflow.com/q/29335812
type: Comment

http://stackoverflow.com/comment/46923746
score: 3
comment on: http://stackoverflow.com/a/29371185
has text: @ikaros45 It doesn't make sense in this very simplistic case, but it could make sense if the object contained other stuff and that _might_ be what OP is trying to get at.
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/46762797
score: 0
type: Comment
has text: What did you expect the output to be? downloadUrl is only used for non-Google files. If it's a Google doc, you'll be using one of the exportLinks.
type: QuestionComment
comment on: http://stackoverflow.com/q/29276660

http://stackoverflow.com/comment/47592143
has text: @Andrus: I posted the first version of the corresponding wiki article [here](https://github.com/free-jqgrid/jqGrid/wiki/Enhancement-of-formatter:%22actions%22).
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29344749
type: Comment

http://stackoverflow.com/a/29358348
accepted answer of: http://stackoverflow.com/q/29267729
type: Answer
score: 2
upvote count: 2
has body: cloudformatter.com/CSS2Pdf is Javascript that walks the browser DOM, extracts it and cleans it up abit and sends to a remote server for formatting. The remotes server uses XSL to convert the XML obtained from the DOM to XSL FO and onto PDF (or any other supported format). As you are now looking for Fusioncharts and Google maps, post a question in the Stackoverflow group css-to-pdf. The team and I would be happy to examine. We know Fusioncharts pretty well, surprised we did not test that one. Google Maps is a whole different animal usually killed from cross-site scripting but we can look at it.
answers question: http://stackoverflow.com/q/29267729
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/29223471
score: 6
has comment: http://stackoverflow.com/comment/47421432
has answer: http://stackoverflow.com/a/29230648
tagged with: node.js
accepted answer: http://stackoverflow.com/a/29230648
type: AnsweredQuestion
downvote count: 0
has answer: http://stackoverflow.com/a/40242834
has answer: http://stackoverflow.com/a/29223656
type: Question
upvote count: 6
possible better answer: http://stackoverflow.com/a/29223656
tagged with: javascript
has answer: http://stackoverflow.com/a/68110717
has title: Set gulp tasks depending on NODE_ENV
has answer: http://stackoverflow.com/a/29223680
has body: Is there a way to specify a gulp task depending on the NODE_ENV that is set? For example in my package.json file, I have something like: "scripts": { "start": "gulp" } And I have multiple gulp tasks gulp.task('development', function () { // run dev related tasks like watch }); gulp.task('production', function () { // run prod related tasks }); If I set NODE_ENV=production npm start, can I specify to only run gulp production? Or is there a better way to do this?
tagged with: gulp
favorite count: 0
answer count: 5

http://stackoverflow.com/q/29326176
tagged with: redis
tagged with: node.js
has answer: http://stackoverflow.com/a/29326893
type: AnsweredQuestion
score: 1
upvote count: 1
type: Question
has body: I am building a node.js application and have a set of attributes that I need to look up on every action (they are associated with permissions). I am using a mysql database as my persistant storage. I was initially going to use redis to store these attributes as they don't change that much and so can be loaded from the mysql database when the application is started and refreshed if they ever change. The point being that I need the lookup to be quick as possible since it happens often, but the data doesn't need to persist so redis instead of mysql. As I was thinking about this today, it occurred to me that I could maybe use a global associative array to store this data. I am always going to be looking things up by the same key and always getting the full list of attributes. I figure that when I start the application on the server, it can just load the data into an array attached to the "global" object in node rather than sticking it into redis so I can reduce the complexity of the app stack. Plus I'm assuming that the javascript array would be a faster lookup as well since it's less overhead. Am I missing something? Is there something about the way either redis or the global object in node works that would make the former faster? I anticipate the most likely situation would be 100's of keys but there could be situations where I could have 10000's. That still doesn't seem too big in the grand scheme of things though.
has title: node.js global array vs redis
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29326893
tagged with: arrays
answer count: 1
downvote count: 0
favorite count: 0

http://stackoverflow.com/q/29280548
downvote count: 0
favorite count: 0
tagged with: ajax
has title: Javascript: Variable scope and usage order
has comment: http://stackoverflow.com/comment/46759304
has answer: http://stackoverflow.com/a/29281573
has comment: http://stackoverflow.com/comment/46759110
has comment: http://stackoverflow.com/comment/46758969
has comment: http://stackoverflow.com/comment/46765329
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46760993
score: 1
upvote count: 1
has body: I came across a peculiar issue when trying to make an ajax call and isolate the actions of the function to itself. Here is the code snippet $(document).on('click', 'input.action', function(event) { var self = this; $.ajax({ url:'http://date.jsontest.com/', method:'GET', cache:false, dataType:'json', success:self.process, error:function(){self.process(false);} }); self.process = function(data) { if (data) { alert(data.time); } else { alert("Operation Failed!"); } } }); &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"&gt;&lt;/script&gt; &lt;div class="container"&gt; &lt;input type="button" value="Get Time" class="action"/&gt; &lt;/div&gt; Let me briefly explain what I am trying to do, on click of the button, I wish to receive some data from the server and display the data. I am using a process function to process the received data. In case of an error I reuse the process function in a different way to display the error message. I simply use the self variable to contain all the elements within the parent function. I fully understand the following: What I know I do not have to use the self to contain the process function because another method will not have access to it Because the process method in the snippet above is declared after the ajax call for the program as far as it is concerned the process function is undefined. I clearly know how to fix it. Experiment: Click on the Get Time button Wait for as long as you want but see no result, which is expected because of the process function is declared after the ajax call Click on the Get Time button again It works now! Some time (which is probably not your time :P) is displayed now!! What I wish to know: What just happened? why does it work the second time and everytime after? Remember this only works for ajax calls, if it were the case that the assignment is retained in the function after calling it once, then this should work in every situation but it does not. Here is an experiment t…
type: Question
has comment: http://stackoverflow.com/comment/46759561
has comment: http://stackoverflow.com/comment/46760685
accepted answer: http://stackoverflow.com/a/29281573
has comment: http://stackoverflow.com/comment/46765253
tagged with: javascript
possible better answer: http://stackoverflow.com/a/29280693
answer count: 2
has answer: http://stackoverflow.com/a/29280693

http://stackoverflow.com/comment/46824947
comment on: http://stackoverflow.com/q/29316340
has text: @D4V1D, No errors in the console.
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/46774967
type: AnswerComment
has text: Yes, the passing formdata to controller as a model.
comment on: http://stackoverflow.com/a/29288451
type: Comment
score: 1

typeof
tags question: http://stackoverflow.com/q/29360290
tags question: http://stackoverflow.com/q/29306151
tag name: typeof
type: Tag

http://stackoverflow.com/comment/46860658
comment on: http://stackoverflow.com/a/29333607
has text: Thanks I am seeing that, I was more curious how to convert the integer 582235852866076672 to string the '582235852866076672', the data is coming in as an integer and I have to convert it to a string, I cannot just add quotes I have to convert it
type: AnswerComment
type: Comment
score: 1

http://stackoverflow.com/comment/67723562
score: 0
type: Comment
has text: Besides the tricks mentioned, perhaps you could permutate the fieldname (always attaching someRandomHash <input name="cardno5aCvG... <input name="cardno8FHV48... - filtering (normalizing) that when processing the returned form values (there'll always be just one (cardno.*)-value in the form, easily regExp-able...)
type: AnswerComment
comment on: http://stackoverflow.com/a/30792252

ckeditor
tags question: http://stackoverflow.com/q/29297936
tags question: http://stackoverflow.com/q/29323367
tags question: http://stackoverflow.com/q/29281327
tag name: ckeditor
tags question: http://stackoverflow.com/q/29259879
tags question: http://stackoverflow.com/q/29325523
tags question: http://stackoverflow.com/q/29328835
type: Tag

http://stackoverflow.com/comment/46948885
type: Comment
comment on: http://stackoverflow.com/a/29355856
has text: Yes, I edited my post with foreign column changes. Please see above.
score: 0
type: AnswerComment

http://stackoverflow.com/q/29304925
has comment: http://stackoverflow.com/comment/46892265
type: Question
score: 0
has title: Using store.js to pass variables from one page to the next keeping the variable type intact
tagged with: javascript
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46887602
tagged with: local-storage
has comment: http://stackoverflow.com/comment/46887582
has body: I have an input form which I am using to collect some information (graphics parameters), which is then used to define how the graphics on the next page will be rendered. The problem that I am having is that I am using store.js, which is supposed to work around the need for JSON.stringify and JSON.parse, but the variables that I am getting back are still strings. Here is some of the code from the form: FORM Opacity Settings must be in the range 0 to 1. Maximum Opacity = Minimum Opacity = Here is the input test code: Test Code Verifying input data The alert tells me that mxO is a string. the graphics page is expecting this value to be a number. I'd appreciate if anyone can tell me what I'm doing wrong...

http://stackoverflow.com/a/29328225
has comment: http://stackoverflow.com/comment/46846822
has comment: http://stackoverflow.com/comment/46847059
answers question: http://stackoverflow.com/q/29328182
has comment: http://stackoverflow.com/comment/46846734
type: Answer
has comment: http://stackoverflow.com/comment/46847090
has comment: http://stackoverflow.com/comment/46847045
accepted answer of: http://stackoverflow.com/q/29328182
upvote count: 1
has comment: http://stackoverflow.com/comment/46847001
has body: You need to read stored object and remove item by its key from inner basket object: // Read and parse entire stored object var basket = JSON.parse(localStorage.getItem("basket")); // Delete specific item from the basket, key might be "iMac", etc. delete basket[key]; // Save new basket localStorage.setItem("basket", JSON.stringify(basket)); UPD. The real problem lays in the remove function. You need to set new localStorage object after every button click: removeButtons[i].addEventListener("click", function (e) { delete jsonBasket[e.currentTarget.dataset.name]; localStorage.setItem("basket", JSON.stringify(jsonBasket)); });
score: 1
has comment: http://stackoverflow.com/comment/46847185
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/29328344
tagged with: image
accepted answer: http://stackoverflow.com/a/29328472
favorite count: 0
has comment: http://stackoverflow.com/comment/46855827
possible better answer: http://stackoverflow.com/a/29337507
has title: I need help switching background images with jQuery
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29337507
has answer: http://stackoverflow.com/a/29328472
has body: I have an unordered list of img url's that are generated with from a custom post type in wordpress. I have a slider and am using the number of slides to determine which Image url I want as the background for my element. Sample of generated list: http://img-url1 http://img-url2 http://img-url3 Sample of my jQuery $('.cycle-slideshow').find('.cycle-slide').each(function(i){ if ( $(this).hasClass('cycle-slide-active') ){ var apimglink = $('.tes-image-links').children('li').eq(i).text(); $('.ap-testimonial.img-back').css("background" , "'url('"+apimglink+"') !important'" ); } }); When I use console.log() it spits out the right text that is in the tag, but I can't seem to get this to work.
score: 1
tagged with: wordpress
tagged with: loops
upvote count: 1
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/46846575
downvote count: 0
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/29346721
tagged with: cordova
has comment: http://stackoverflow.com/comment/46879492
upvote count: 5
has body: I'm trying to get data from import.io servers but till now I got nothing. But when I use another api from another server with same code I get the data. Can you tell me what I'm doing wrong. This is working code, the problem is that I got nothing from import.io servers. but when I use another url from another service like kimonolabs I get data from this same code. Sorry my bad english. I got this response code: 200 This is my code. document.addEventListener('deviceready', onDeviceReady, false); function onDeviceReady() { //console.log('device is ready'); $.ajax({ type: 'GET', url: 'https://api.import.io/store/data/6847842b-a779-46ba-874a-d1cfdcef2e3e/_query?input/webpage/url=http%3A%2F%2Fwww.girabola.com%2F%3Fp%3Djogos%26epoca%3D62%26jornada%3D1&_user=779609bc-1bfe-4bb3-aa45-465a3fc31d9a&_apikey=MY API KEY', dataType: 'jsonp', success: function(data) { console.log(data); //The log dont show me nothing. var output = ''; //output += ' '; output += ' '; output += ' Equipa Técnica '; console.log(data); $(data.results).each(function(index, value) { output += ' ' + this.casa + ' '; }); output += ' '; $('#um').append(output).listview().listview('refresh'); } }); }
type: AnsweredQuestion
downvote count: 0
has comment: http://stackoverflow.com/comment/47043824
type: Question
accepted answer: http://stackoverflow.com/a/29450919
score: 5
has title: How can I get data from my import.io api servers
tagged with: javascript
tagged with: jquery
tagged with: import.io
has answer: http://stackoverflow.com/a/29450919
has comment: http://stackoverflow.com/comment/46879363
has comment: http://stackoverflow.com/comment/46879297
answer count: 1
favorite count: 0

http://stackoverflow.com/comment/46790042
comment on: http://stackoverflow.com/q/29256094
has text: And my suggestion resolves that issue: http://jsfiddle.net/vz17omm5/4/
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/46666443
comment on: http://stackoverflow.com/q/29229115
score: 0
type: QuestionComment
has text: Is the calendarId correct?
type: Comment

http://stackoverflow.com/q/29233139
has body: I'm trying to create a small mobile game using Matter.js. I'm testing a few things with their mobile demo, found here: https://github.com/liabru/matter-js/blob/master/demo/js/DemoMobile.js I can't figure out how to hide this green dragging trail that is shown when I drag an object. I tried to do the following: World.add(_world, MouseConstraint.create(_engine, { render: { visible: false, lineWidth: 0, strokeStyle: 'rgba(0,0,0,0)' } })); But that didn't work. Any ideas?
tagged with: javascript
tagged with: matter.js
score: 0
has answer: http://stackoverflow.com/a/30682720
answer count: 1
type: UnansweredQuestion
has title: Hiding green constraint drag trail in Matter.js
type: Question

http://stackoverflow.com/comment/46817284
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29311678
has text: it would be : $(document).ready(function () { setTimeout(function() { $("#theImage").css({'display':'block', 'border':'1px solid red'}); }, 5000); }); http://jsfiddle.net/utrgnu8n/
type: Comment

http://stackoverflow.com/q/29247623
linked to: http://stackoverflow.com/q/11996257
has answer: http://stackoverflow.com/a/29247746
tagged with: image
type: Question
tagged with: html-table
tagged with: arrays
answer count: 1
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html
type: UnansweredQuestion
has title: Displaying an image in a table from Javascript
has body: I'm a student and what I'm trying to do here is to build a table from Javascript using arrays stored in the Javascript. The table works well enough but I can't seem to integrate the Images into the table. No matter what I try the ImgArray remains undefined. Could any of you point me in the right direction of getting this to work? var pet = [{ species: 'fruit bat', name: 'bats', colour: 'grey', size: 'small', food: 'apples', limb: "wings", img: "0" }, { species: 'goat', name: 'bastard', colour: 'off white', size: 'goat-sized', food: 'clothing', limb: "hooves", img: "1" }, { species: 'butterfly', name: 'flutterby', colour: 'rainbow', size: 'petite', food: 'nectar', limb: "wings", img: "2" }, { species: 'buzzard', name: 'Buzz', colour: 'molted black and white', size: 'bigish', food: 'carrion', limb: "wings", img: "3" }, { species: 'pixie', name: 'petty', colour: 'blue', size: 'tiny', food: 'souls', limb: "wings", img: "4" }, { species: 'tortoise', name: 'Tank', colour: 'Green', size: 'smoothbacked', food: 'lettuce', limb: "legs", img: "5" }]; //array for holding images for the pet array imgArray = []; imgArray[1] = new Image(); imgArray[1].src = "resources/bat.gif"; //source of the image imgArray[2] = new Image(); imgArray[2].src = "resources/goatVec01.png"; imgArray[3] = new Image(); imgArray[3].src = "resources/butterfly.gif"; imgArray[4] = new Image(); imgArray[4].src = "resources/buzzard01.png"; imgArray[5] = new Image(); imgArray[5].src = "resources/breezie01.png"; imgArray[6] = new Image(); imgArray[6].src = "resources/turtle.gif"; var len = imgArray.length; function display() { //added a for loop var i; for (i = 0; i < len; ++i) { var pic = document.write(imgArray[i].outerHTML); } } function makeTr(pet, attrName) { var html = '', i; html += " "; for (i = 0; i < pet.length; ++i) { if (attrName = "img") { document.getElementById("pic".outerHTML) html += " " + display() + " "; } else { html += " " + pet[i][attrName] + " "; } html += " "; return html; } } function b…

http://stackoverflow.com/comment/46838272
has text: I'm sorry, but doesn't help me much, can you clarify a bit more?
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29323673
score: 0

http://stackoverflow.com/comment/46845170
type: AnswerComment
has text: @SaiAshwin: No, the attribute order doesn't matter. Check that you don't have double class attributes, that one almost got me.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29327506

http://stackoverflow.com/q/29267150
has comment: http://stackoverflow.com/comment/46735932
has comment: http://stackoverflow.com/comment/46736068
tagged with: javascript
has comment: http://stackoverflow.com/comment/46736131
has comment: http://stackoverflow.com/comment/46736183
type: Question
has comment: http://stackoverflow.com/comment/46736025
has comment: http://stackoverflow.com/comment/46736527
tagged with: jquery
has comment: http://stackoverflow.com/comment/46740270
has comment: http://stackoverflow.com/comment/46736496
has body: am trying to Rename an image when uploading it. I have a text field with id of newName now I would like to pass it into FormData ( ) and over write it on the file name in the PHP file Here is the the code I have &lt;input type="text" id="newName" /&gt; $(document).ready(function (e) { var newName = $("#newName").val(); $('#imageUploadForm').on('submit',(function(e) { e.preventDefault(); var formData = new FormData(this); $.ajax({ type:'POST', url: $(this).attr('action'), data:formData, cache:false, contentType: false, processData: false, success:function(data){ console.log("success"); console.log(data); }, error: function(data){ console.log("error"); console.log(data); } }); })); $("#ImageBrowse").on("change", function() { $("#imageUploadForm").submit(); }); }); Can you please let me know how to do it?
tagged with: php
has comment: http://stackoverflow.com/comment/46736245
answer count: 0
has comment: http://stackoverflow.com/comment/46736128
type: UnansweredQuestion
has title: Issue on Renaming Image File On Upload Using
score: 0

http://stackoverflow.com/a/29307836
downvote count: 0
score: 4
answers question: http://stackoverflow.com/q/29307587
type: Answer
has body: Just for the record, another thing that'll work is var header = "ATO"; JavaScript won't pay attention to the HTML entity notation, but when that stuff is added to the document the HTML parser will.
upvote count: 4

http://stackoverflow.com/a/29302689
type: Answer
has comment: http://stackoverflow.com/comment/46800635
downvote count: 0
score: 1
upvote count: 1
has body: Do you mean something like this? $(".update").on("click", function(){ var new_val = $(this).text(); $("#type").val(new_val); });
answers question: http://stackoverflow.com/q/29302394

http://stackoverflow.com/comment/46879211
type: Comment
type: QuestionComment
has text: You can select the `script` elements using DOM APIs and change the attributes using `setAttribute` method. Replacing entire contents of the document just for replacing value of an attribute is a terrible idea!
score: 0
comment on: http://stackoverflow.com/q/29346470

http://stackoverflow.com/comment/46779254
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29291088
has text: That should be a `scroll` event, shouldn't it?

http://stackoverflow.com/comment/46691353
comment on: http://stackoverflow.com/q/29242640
type: Comment
type: QuestionComment
score: 0
has text: It's not global because you are accessing the local variable `opts` passed in as a parameter.

http://stackoverflow.com/comment/62476725
type: AnswerComment
type: Comment
score: 0
has text: I don't think it's possible to use `pointer-events: none` and allowing the `not-allowed` cursor to be shown on hover. At least, I wasn't able to do it without some JS magic.
comment on: http://stackoverflow.com/a/36999029

http://stackoverflow.com/a/29324474
type: Answer
answers question: http://stackoverflow.com/q/29324136
has body: actually i find a solution, it' s look .... amateurism but it s work function initialize() { var mapOptions = { zoom: 14, center: new google.maps.LatLng(43.7101728,7.2619532) } var map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions); var image = 'image/abi06map.png'; var image2 = 'image/garbage3.png'; var Abi = new google.maps.Marker({ position: new google.maps.LatLng(43.7101728,7.2619532), map: map, icon: image }); var Container1 = new google.maps.Marker({ position: new google.maps.LatLng(43.301728,7.2219532), map: map, icon: image2 }); var Container2 = new google.maps.Marker({ position: new google.maps.LatLng(43.301728,7.2219532), map: map, icon: image2 }); var Container3 = new google.maps.Marker({ position: new google.maps.LatLng(43.301728,7.2219532), map: map, icon: image2 }); var Container4 = new google.maps.Marker({ position: new google.maps.LatLng(43.301728,7.2219532), map: map, icon: image2 }); var Container5 = new google.maps.Marker({ position: new google.maps.LatLng(43.301728,7.2219532), map: map, icon: image2 }); var Container6 = new google.maps.Marker({ position: new google.maps.LatLng(43.301728,7.2219532), map: map, icon: image2 }); var Container7 = new google.maps.Marker({ position: new google.maps.LatLng(43.301728,7.2219532), map: map, icon: image2 }); var Container8 = new google.maps.Marker({ position: new google.maps.LatLng(43.301728,7.2219532), map: map, icon: image2 }); var Container9 = new google.maps.Marker({ position: new google.maps.LatLng(43.301728,7.2219532), map: map, icon: image2 }); var Container10 = new google.maps.Marker({ position: new google.maps.LatLng(43.301728,7.2219532), map: map, icon: image2 }); var Cannes = new google.maps.Marker({ position: new google.maps.LatLng(43.301728,7.2219532), map: map, icon: image1 }); } google.maps.event.addDomListener(window, 'load', initialize);
score: 0

http://stackoverflow.com/comment/46773388
type: Comment
type: QuestionComment
has text: Wherever you want. Why?
score: 0
comment on: http://stackoverflow.com/q/29268279

http://stackoverflow.com/q/29352996
upvote count: 2
duplicate of: http://stackoverflow.com/q/15356300
has comment: http://stackoverflow.com/comment/46891358
type: UnansweredQuestion
score: 2
has body: How to allow only one checkbox to be checked at the time in a form by clicking button submit using pure Javascript? I know I should use radio buttons, but I am required to do using checkboxes and I have no idea how.
answer count: 0
downvote count: 0
tagged with: javascript
favorite count: 0
has title: Only one checkbox is checked at the time
linked to: http://stackoverflow.com/q/15356300
type: Question
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46891443

http://stackoverflow.com/comment/46856977
comment on: http://stackoverflow.com/a/29333782
has text: Too broad, please elaborate your answer
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/46879044
type: QuestionComment
score: 0
has text: Not entirely clear what the hide/show rules are
type: Comment
comment on: http://stackoverflow.com/q/29342882

http://stackoverflow.com/comment/46749570
type: QuestionComment
has text: @FrancescoE. I knew that. What I meant was what it was doing in `option` OP now clarified it through his edit
score: 1
comment on: http://stackoverflow.com/q/29275089
type: Comment

http://stackoverflow.com/q/29280392
has comment: http://stackoverflow.com/comment/46801717
has answer: http://stackoverflow.com/a/29280417
has comment: http://stackoverflow.com/comment/46759305
has body: If I have an array in JavaScript, say: var a = [1, 2, 3]; var b = ["Praveen", "Kumar", "Stack", "Overflow"]; If I get the lengths of the above arrays by: a.length; b.length; I get the correct values. i.e., a.length; // 3 b.length; // 4 But, if I create another array, where I set my indices like: c = []; c[5] = "Five"; c[10] = "Ten"; And then if I query the length, it shows me 11. c.length // 11 Is this wrong? Or is this way JavaScript interprets arrays? Please guide.
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29280597
has comment: http://stackoverflow.com/comment/46758723
upvote count: 3
linked to: http://stackoverflow.com/q/24038939
has comment: http://stackoverflow.com/comment/46758648
has comment: http://stackoverflow.com/comment/46801725
possible better answer: http://stackoverflow.com/a/29280597
type: Question
has answer: http://stackoverflow.com/a/29280646
has title: Wrong representation of JavaScript Array Length
score: 3
accepted answer: http://stackoverflow.com/a/29280417
tagged with: javascript
answer count: 3
tagged with: arrays
downvote count: 0
favorite count: 0

http://stackoverflow.com/a/29359956
type: Answer
has body: You need to use event delegation to support dynamically added elements also you need to initialize the plugin again once the div is refreshed function getURLParameter(name) { return decodeURIComponent((new RegExp('[?|&amp;]' + name + '=' + '([^&amp;;]+?)(&amp;|#|;|$)').exec(location.search) || [, ""])[1].replace(/\+/g, '%20')) || null } tournamentid = getURLParameter('id'); $(document).ready(function () { $(document).on('click', "button#submit", function () { $.ajax({ type: "POST", url: "test.php?page=tourneys&amp;id=" + tournamentid + "&amp;action=teams&amp;submit=true", //process to mail data: $('#swapteams').serialize(), success: function (msg) { createNoty('The teams has been updated!', 'success'); // Refresh the div after submission and pass a callback which will initialize the plugins $("#refresh").load("test.php?page=tourneys&amp;id=" + tournamentid + "&amp;action=teams #refresh", createEditable); }, error: function (xhr, status, error) { var err = eval("(" + xhr.responseText + ")"); alert(err.Message); } }); return false; }); }); // the plugins and jQuery variables within the refresh div $(document).ready(createEditable); function createEditable() { $('a[id^="teamname"]').editable({ ajaxOptions: { type: 'post' } }); } $(document).ready(function () { //use event delegation $(document).on('change', 'select[id="swap"]', function () { $("#saveprogress").show("fade"); }); });
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29359776
answers question: http://stackoverflow.com/q/29359776

http://stackoverflow.com/q/29238721
type: Question
answer count: 2
tagged with: google-maps
tagged with: google-maps-markers
tagged with: javascript
tagged with: google-maps-api-3
score: 0
has answer: http://stackoverflow.com/a/29239525
favorite count: 0
has body: I have more than 1000 markers at 3 different location in my Map. I read Lat and Long from a text file and render it in Google maps and create circle over them on the basis of country name. And count the number of markers in those circle. Now what i am not able to do is? (1) I have to print the text of count on those circle (How to do without using Cluster ?) (2) When i zoom out circle overlaps . So whenever circle overlaps it should combine the 2 radius of these two circles and should make one big circle covering the markers of the two smaller (smaller 2 will now disappear resulting on total of marker on the bigger one only). My full code to do this (http://prntscr.com/6kt30w) is : $.ajax({ type: 'GET', url: './App_Start/TextFile/latLongList3.txt', dataType: 'text', }).success(function (data) { var s2 = data.replace(/^.*$/, " ").replace(/\r\n/g, " "); var array = s2.split(/[ ]+/g); var test = [].concat.apply([], array.map(function (array) { return array.split(/\s+/); })) var col1 = []; var col2 = []; var col3 = []; var j = 0; for (var i = 0; i &lt;= test.length - 3; i = i + 3) { col1[j] = test[i]; col2[j] = test[i + 1]; col3[j] = test[i + 2]; var myLatlng = new google.maps.LatLng(col3[j], col2[j]); marker = new google.maps.Marker( { position: myLatlng, map: map, title: 'Hello World! ' + col1[j] }); markers.push(marker); if (j &gt; 0) { LatLong[j] = myLatlng; } j++; } }) } google.maps.event.addDomListener(window, 'load', initialize); &lt;/script&gt; I don't want to use MarkerClusterer because it is very small. Yes it's true that it will do the 2 tasks i want to accomplish but the problem i feel with it is when i have markers all over the country then MarkerClusterer just hovers over a very little part of the country whereas i want the circle to hover over all country wherever i have marker and it should have text on it. So if there is any alternative to make the size of cluster such that it cover all the markers in the entire country(because my 1 country is full of m…
type: UnansweredQuestion
has title: How to add text on circle and how to combine circle when zoom out different cicle
upvote count: 1
downvote count: 1
has answer: http://stackoverflow.com/a/29239988
tagged with: markerclusterer

http://stackoverflow.com/comment/46705630
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29249127
has text: Hi mins, I tried to append some value to `formdata` object like this ` var name = $("#fileName").val(); var formData = new FormData(this); formData.append("fileNewName", name); console.log(formData);` but it didn't work!

http://stackoverflow.com/comment/46739523
has text: @bstras21: It sounds like you added the element and then tried to add an event handler using a selector to locate the element. That would also find all previous elements that you added the same way and add another handler to them. By binding the event handler directly to the element you bind it to that element only.
comment on: http://stackoverflow.com/a/29268888
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/46870524
score: 0
comment on: http://stackoverflow.com/q/29341687
type: Comment
type: QuestionComment
has text: I do get `outerHTML: "hi"` when doing `console.log($(' hi ').find('a'));`.

http://stackoverflow.com/comment/46970327
comment on: http://stackoverflow.com/q/29357344
score: 0
type: QuestionComment
type: Comment
has text: Do a bit of research on web scraping with php and try something, then when you get stuck, we may be able to help.

http://stackoverflow.com/comment/46934833
type: Comment
comment on: http://stackoverflow.com/a/29356645
has text: Then you should be able to work with a self signed certificate. You then just need people to accept it when the warning pops up
type: AnswerComment
score: 0

http://stackoverflow.com/q/29290563
tagged with: socket.io
score: 9
type: Question
upvote count: 9
accepted answer: http://stackoverflow.com/a/35265202
has answer: http://stackoverflow.com/a/34563103
has title: Socket.io client ignoring port when namespace used [Bug?]
tagged with: javascript
answer count: 3
has answer: http://stackoverflow.com/a/35265202
has body: I have a simple node.js app with socket.io (1.3.5), taken from socket.io examples: // Setup basic express server var express = require('express'); var app = express(); var server = require('http').createServer(app); var io = require('socket.io')(server); var port = process.env.PORT || 3000; server.listen(port, function () { console.log('Server listening at port %d', port); }); // Routing app.use(express.static(__dirname + '/public')); io.of('/admin').on('connection', function(socket){ //handle conection on /admin namespace }); io.of('/user').on('connection', function(socket){ //handle conection on /user namespace }); Now in my front-end I connect to these specific namespaces like so (again, taken from the example): var admin_socket = io('/admin'); var user_socket = io('/user'); The app is running on port 3000 and the website is opened using URL localhost:3000. When doing that I am getting CORS errors, it seems like Socket.io on client side is not auto-detecting the port number as soon as I start using namespaces (in firefox dev tools I can see requests going to localhost/ rather than localhost:3000/). If on my server-side I don't use namespaces: io.on('connection', function(socket){ //handle general conection }); And on front-end I connect this way: var socket = io(); Everything works fine, port auto-discovery works and in firefox dev tools I can see connections being made to localhost:3000/. Alternatively, if I still use namespaces on my back-end, and on front end I connect like so: var admin_socket = io('localhost:3000/admin'); var user_socket = io(':3000/user'); //I can skip localhost Again everything works (and indeed in firefox dev tools I can see network requests going to localhost:3000/). How come the port auto-discovery is not working with namespaces? Is there a way to get it to work? Am I missing something here? Thanks. See my answer below for a fix...
downvote count: 0
tagged with: websocket
possible better answer: http://stackoverflow.com/a/34064455
favorite count: 0
has comment: http://stackoverflow.com/comment/55370585
tagged with: node.js
has comment: http://stackoverflow.com/comment/47121332
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/51122888
has answer: http://stackoverflow.com/a/34064455

http://stackoverflow.com/comment/46923416
type: AnswerComment
comment on: http://stackoverflow.com/a/29371061
type: Comment
has text: @Scopestyle the data will be set, but will not appear in the DOM. You need to use `data()` to both set *and* get the value, and it will work fine.
score: 1

http://stackoverflow.com/a/29371101
upvote count: 2
answers question: http://stackoverflow.com/q/29370859
has body: innerHTML is a property of the Element interface (part of standard DOM API). Is isn't anything specific to jQuery. But you're trying to reach it from the output of the jQuery() method, which is a jQuery object, not an Element. In short, if you decide to use jQuery, stick to jQuery: $('#sr').html(result); If you prefer vanilla JavaScript, stick to it as well: document.getElementById("sr").innerHTML = result;
score: 2
downvote count: 0
type: Answer

http://stackoverflow.com/comment/46826071
type: QuestionComment
has text: I'd suggest adding this as an issue on the Github tracker and see if anything comes of it, since this is going to be a very common complaint.
score: 3
comment on: http://stackoverflow.com/q/29313244
type: Comment

http://stackoverflow.com/q/29263163
tagged with: ajax
score: 0
answer count: 2
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46728898
has comment: http://stackoverflow.com/comment/46734762
has comment: http://stackoverflow.com/comment/46728626
has title: jQuery: fetch JSON request response and display it under current html page
linked to: http://stackoverflow.com/q/2067472
has comment: http://stackoverflow.com/comment/46731522
has answer: http://stackoverflow.com/a/29266691
accepted answer: http://stackoverflow.com/a/29266691
has comment: http://stackoverflow.com/comment/46728784
possible better answer: http://stackoverflow.com/a/29263676
type: AnsweredQuestion
type: Question
has body: I am implementing something like this: There is a JSON-based web service on a remote server. Its method can be called by simply putting specially structured URLs like this: http://root-url/ws/service-name?request={json-string} The {json-string} portion contains parameters to call the method, and the response will be displayed in the browser. And what I am trying to do is: Implement a form on a html page, and when the user fills in the information and submits it, the response will be shown like an embedded page below the form. I tried using the &lt;object&gt; tag and it reports error: failed to parse json request. Is there anyway I can do this with jQuery/javascript? Thanks in advance. Edit: Basic structure of my page: &lt;form&gt; ... &lt;/form&gt; &lt;div id="responseContainer"&gt; &lt;/div&gt; I have jQuery Code that generates a valid URL (stored in a javascript variable) string with the data from the form as parameters in it. What I want to do is to load the response page in the current html page (inside "responseContainer") with the URL. I have tried the following methods: $.ajax(): jQuery.ajax({ url: link //where the url is stored }).done(function( data ) { if ( console &amp;&amp; console.log ) { console.log( "Sample of data:", data.slice( 0, 100 ) ); } jQuery('#responseContainer').html(data); }); And $.get(): $.get(link, function(data) { $('#responseContainer').html(data); }); But neither worked, both reported the same error in the console: "XMLHttpRequest cannot load: ... No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8080' is therefore not allowed access."
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46728854
has answer: http://stackoverflow.com/a/29263676

http://stackoverflow.com/comment/46693967
type: QuestionComment
type: Comment
has text: It's `document.getElementById()`. Please open the browser's error console and fix the errors you see there before doing anything else. (And you probably want to add `.value` at the end there if you want the value of the input element and not the element itself.)
score: 2
comment on: http://stackoverflow.com/q/29243418

http://stackoverflow.com/q/29227356
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46661840
answer count: 3
has body: I'm populating a list radio buttons like below. &lt;td&gt; @if (ViewBag.myList as System.Collections.IEnumerable != null) { foreach (var aType in new SelectList(ViewBag.myList as System.Collections.IEnumerable, "Value", "Text", new { TabIndex = 0 })) { @Html.RadioButton("rdoMyList", aType.Value) @Html.Label(aType.Text) } } &lt;/td&gt; I get the value of the selected radio button in jQuery like below. var selectedValue = $.trim($("[id^='rdoMyList']:checked").val()); What I can't seem to figure out is getting the display text of the selected radio button.
tagged with: asp.net-mvc-4
has answer: http://stackoverflow.com/a/29227451
has comment: http://stackoverflow.com/comment/46661858
has answer: http://stackoverflow.com/a/29227373
has title: Getting the display text of the selected radio button in jQuery
accepted answer: http://stackoverflow.com/a/29227373
type: AnsweredQuestion
type: Question
score: 0
possible better answer: http://stackoverflow.com/a/29227451
has answer: http://stackoverflow.com/a/29227426

http://stackoverflow.com/q/29311337
has title: Adding Google Maps Search Bar with Autocomplete
type: Question
has body: Below are all the Javascript functions I am using for my website. Basically the load function is calling and dealing with data from a PHP database, so I have a map being created and worked on from there. However, I am trying to add a search bar to the map, and currently it refreshes the map when selecting a constraint and the search box disappears from the top left corner of the map. The only way it can be seen again is by refreshing the page. It is able to pull up autocomplete suggestions, and puts a marker on said location, and constraints can be chosen that change the map and places more marker on there. But then the search box disappears and the map location also changes within the map when a constraint is picked. Is there anyway to incorporate the search box in the map to put a marker on a specified location, and keep that view on that location there even when data is passed from PHP to put more markers on the map? Should I be combining the load and initialize function? Help would be greatly appreciated from this first time poster! &lt;script type="text/javascript" src="https://maps.googleapis.com/maps/api/js? v=3.exp&amp;signed_in=true&amp;libraries=places"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; var customIcons = { restaurant: { icon: 'http://labs.google.com/ridefinder/images/mm_20_blue.png' }, bar: { icon: 'http://labs.google.com/ridefinder/images/mm_20_red.png' } }; function load() { var markers = []; var map = new google.maps.Map(document.getElementById("map"), { center: new google.maps.LatLng(39.166531, -86.528549), zoom: 19, mapTypeId: 'roadmap' }); var passtypevalue = document.forms[0].passes.value; var distancevalue = document.forms[0].distance.value; var freevalue = document.forms[0].free.checked; var metersvalue = document.forms[0].meters.checked; var garagevalue = document.forms[0].garage.checked; var campuspassvalue = document.forms[0].campuspass.checked; var residentpassvalue = document.forms[0].residentpass.checked; var infoWindo…
tagged with: google-maps-api-3
score: 0
tagged with: google-maps
tagged with: google-maps-markers
has comment: http://stackoverflow.com/comment/46820000
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46835650
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46900099

http://stackoverflow.com/q/29291256
tagged with: crossfilter
downvote count: 0
tagged with: javascript
has title: How can make filters apply to dimensions in several crossfilter instances?
favorite count: 0
answer count: 0
type: UnansweredQuestion
upvote count: 1
has body: I'm using some very simplified data to illustrate the idea here.. Suppose my data set is: var data = [{type:"cat",row:1, col:1, speed:15}, {type:"cat",row:1, col:2, speed:10}, {type:"cat",row:2, col:1, speed:3}, {type:"cat",row:2, col:2, speed:17}, {type:"dog",row:1, col:1, speed:25}, {type:"dog",row:1, col:2, speed:30}, {type:"dog",row:2, col:1, speed:16}, {type:"dog",row:2, col:2, speed:10}] I have several dimensions on this data, for example var ndx = crossfilter(data); var mainDim = ndx.dimension(function (d) { return [+d.row, +d.col]; }); var mainGroup = mainDim.group().reduceSum(function (d) { return +d.speed; }); var rowDim = ndx.dimension(function (d) { return d.row; }); var rowGroup = rowDim.group(); There are several DC.JS charts build using this data set. Now the issue is, I wanted a way to generate charts dynamically, for example generating a heatMap for each type. I couldn't figure out a way to do this with only a single crossfilter instance, so instead I created filtered data sets with their own crossfiter instances, dimensions, groups etc. // Get list of unique types var types = []; data.forEach( function(d) { if( types.indexOf(d.type ) == -1 ) types.push(d.type); }); // Create new dataset for each type var filteredData = {}; function checkType(elem, type){ return elem.type == type; } types.forEach(function(type){ filteredData[type] = data.filter(function(elem){ return checkType(elem,type); }); }); var crossfilters = {}; var dims = {}; var grps = {}; types.forEach(function(type){ // Create crossfilter for each type crossfilters[type] = crossfilter(filteredData[type]); // Create dimensions &amp; for each type dims[type] = crossfilters[type].dimension(function (d) { return [+d.row, +d.col]; }); grps[type] = dims[type].group().reduceSum(function (d) { return +d.speed; }); }); I would still like the users interactions with the charts to propagate filters between the different crossfilter instances. Is there a way to achieve this dynamically? jsfiddle with…
score: 1
tagged with: dc.js
type: Question

http://stackoverflow.com/comment/46791859
comment on: http://stackoverflow.com/a/29298300
type: Comment
has text: k..bt now i m changing the sequence also still not getting count
score: 0
type: AnswerComment

http://stackoverflow.com/a/29265303
has comment: http://stackoverflow.com/comment/46733581
score: -1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46733227
accepted answer of: http://stackoverflow.com/q/29262774
answers question: http://stackoverflow.com/q/29262774
type: Answer
upvote count: 0
has body: You used 'null' as a string. You should do it without the quotes. Also, you can and the conditions, instead of or. if($scope.processRating.inherentRiskRatingKey === null &amp;&amp; $scope.processRating.finalOutcomeInherentRiskRatingKey === null &amp;&amp; $scope.processRating.controlEffectivenessRatingComputeKey === null) { $scope.showEditdisForm = false; }
has comment: http://stackoverflow.com/comment/46732961
has comment: http://stackoverflow.com/comment/46734696
downvote count: 1

http://stackoverflow.com/a/29248962
has body: Create your array var ids=[];global outside button event, as whenever you click button it is creating new empty array. It will fix your problem.
answers question: http://stackoverflow.com/q/29248812
downvote count: 0
score: 1
type: Answer
upvote count: 1

http://stackoverflow.com/comment/119092434
type: Comment
comment on: http://stackoverflow.com/a/29269515
score: 1
has text: What might be confusing is that in most cases "resolve" only means means "**fulfill** or match state of another promise". E.g. for a non-thenable value, `Promise.resolve(..)` or `new Promise((resolve, _) => {resolve(..)})` only ever create a fulfilled promise, but never a rejected one. However, for the unusual case of a non-promise thenable, it could reject or fulfill (i.e. settle). Therefore "settle or match state of another promise" is actually correct.
type: AnswerComment

http://stackoverflow.com/q/29266886
has comment: http://stackoverflow.com/comment/46736150
downvote count: 0
has body: When submitting forms, I ran across problems in getting POST data in my server-side PHP script. I narrowed it down to a little bit of JQuery/JavaScript that loads JSON data via AJAX into a DataTable. The form is as follows: Username And then the script: $("#lookupForm").submit(function (e) { e.preventDefault(); $.ajax({ type: 'POST', url: './scripts/lookup.php', dataType: 'json', success: function(s) { LUUTable.fnClearTable(); for(var i = 0; i < s.length; i++) { LUUTable.fnAddData([ s[i][0], s[i][1], s[i][2], s[i][3], s[i][4], s[i][5], s[i][6], s[i][7] ]); } }, error: function(e) { if (e.responseText != '') { console.log("Error: " + e.responseText); } else { console.log("Warning: No data to return."); } } }); }); Whenever that code snippet is run, the PHP does not get POST data, however once I comment the script out, POST data is sent to the server. The problem, however, is that this code snippet is where I handle the JSON data returned by the server. What could be the reason for this causing data not to POST, and how might I either further troubleshoot or mitigate this issue? Much appreciated!
tagged with: javascript
tagged with: jquery
tagged with: ajax
has comment: http://stackoverflow.com/comment/46735561
type: AnsweredQuestion
score: 1
favorite count: 0
possible better answer: http://stackoverflow.com/a/29267328
type: Question
has answer: http://stackoverflow.com/a/29267316
answer count: 2
has title: PHP Post Data with AJAX and DataTables
has answer: http://stackoverflow.com/a/29267328
upvote count: 1
tagged with: php
has comment: http://stackoverflow.com/comment/46735856
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/46735647
accepted answer: http://stackoverflow.com/a/29267316

http://stackoverflow.com/q/29355582
score: 7
type: Question
has title: WebGL multiple Shaders
tagged with: webgl
has comment: http://stackoverflow.com/comment/46905907
upvote count: 7
answer count: 1
tagged with: javascript
favorite count: 0
has body: I have read a previous StackOverflow post regarding this issue and am still having issues in getting two different shader sets to work correctly in one WebGL program. Below is a skeleton framework of the code. I have two separate sets of shaders, with different variable names to prevent cross-contamination. I create two initShader() functions, one for each set of shaders, and then call the initBuffers() and the draw() functions. The result is that only the second shader takes effect and only the item draw with this shader is shown, despite the shaders being separately identified and called within drawscene(). Any suggestions for how to fix this issue will be appreciated. Declare: vertexShaderA Declare: fragmentShaderA Declare: vertexShaderB (use distinct variable names to that of vertexShaderA) Declare: fragmentShaderB (use distinct variable names to that of fragmentShaderA) // main script initShadersA(){ … gl.useProgram(shaderProgramA); … } initShadersB(){ … gl.useProgram(shaderProgramB); … } … setMatrixUniformsA(); setMatrixUniformsB(); function initBuffers(){ … } function drawScene(){ … gl.bindBuffer(gl.ARRAY_BUFFER, vertexPositionBuffer); gl.vertexAttribPointer(shaderProgramA.vertexPositionAttributeA, vertexPositionBuffer.itemSize, gl.FLOAT, false, 0, 0); … gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, vertexIndexBuffer); gl.uniform1i(shaderProgramA.samplerUniform, 0); setMatrixUniformsA(); gl.drawElements(gl.TRIANGLES, vertexIndexBuffer.numItems, gl.UNSIGNED_SHORT, 0); … gl.bindBuffer(gl.ARRAY_BUFFER, vertexPositionBuffer); gl.vertexAttribPointer(shaderProgramB.vertexPositionAttributeB, vertexPositionBuffer.itemSize, gl.FLOAT, false, 0, 0); … gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, vertexIndexBuffer); gl.uniform1i(shaderProgramB.samplerUniform, 0); setMatrixUniformsB(); gl.drawElements(gl.TRIANGLES, vertexIndexBuffer.numItems, gl.UNSIGNED_SHORT, 0); } function draw() { requestAnimFrame(draw); animate(); drawScene(); } function animate() { … } function webGLStart() { in…
has answer: http://stackoverflow.com/a/29358007
accepted answer: http://stackoverflow.com/a/29358007
type: AnsweredQuestion
downvote count: 0

http://stackoverflow.com/comment/46937896
has text: @KevinBrown IIRC, the PDF shows the chart fine, but on the application, the chart is black, like it got highlighted. Clicking elsewhere clears the color. Anyway, got the answer, accepted and up-voted. I'll see about submitting a more detailed report. If those issues can be cleared up, this would fit the bill perfectly!
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29267729
score: 0

http://stackoverflow.com/q/29279855
has comment: http://stackoverflow.com/comment/46757687
has comment: http://stackoverflow.com/comment/46757999
type: AnsweredQuestion
score: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/46761003
possible better answer: http://stackoverflow.com/a/65999370
has answer: http://stackoverflow.com/a/65999370
type: Question
tagged with: javascript
tagged with: jquery
has title: Jquery remove element
has body: I am basically trying to print the value of a button in the div with list class if the button is selected. Also remove the same value wwhen it is deselected. I am able to print the value successfully but not able to remove it. Could somebody please help me out with it. var buttonSelect = $(".btn").click(function() { if ($(this).hasClass('active')){ $(".list").append(this.value + " ") } else { $(".list").remove(this.value) } });
upvote count: 3
has answer: http://stackoverflow.com/a/29279944
answer count: 3
accepted answer: http://stackoverflow.com/a/29279944
has comment: http://stackoverflow.com/comment/46760872
favorite count: 0
has comment: http://stackoverflow.com/comment/46759678
has answer: http://stackoverflow.com/a/29280152

http://stackoverflow.com/comment/46874978
comment on: http://stackoverflow.com/a/29280200
score: 0
type: AnswerComment
type: Comment
has text: Hi, my bad - changed 'drawOrdersChart' to 'drawChart'. Can you try once again?

http://stackoverflow.com/comment/46806834
has text: I have update my question. please now see my question.
score: 0
type: Comment
comment on: http://stackoverflow.com/q/29306053
type: QuestionComment

http://stackoverflow.com/q/29248410
upvote count: 3
type: Question
tagged with: polymer
has answer: http://stackoverflow.com/a/29268627
tagged with: javascript
tagged with: meteor-blaze
linked to: http://stackoverflow.com/q/26921593
linked to: http://stackoverflow.com/q/21815713
answer count: 1
downvote count: 0
has body: In Polymer, alone, without combining with Meteor, you can pass an object to a polymer web component by simply passing it to an attribute. I've been successful at doing this. Here we're passing "state" from the iteration directly into the custom polymer web component called state-card. However, in my project, I am combining Polymer and Meteor. Polymer's templates and Meteor's blaze templates can't be mixed ... so, this is blaze with just a custom Polymer web component. I could not pass the "state" object in Meteor with blaze #each loop in a meteor template. As a work-a-round I found I could only pass the individual properties as text strings like so ... {{#each states}} {{/each}} to accomplish the above, here is a snippet from the custom Polymer web component with an attribute like so ... ... What I "really" want to do is just pass in the object directly to the polymer web component like so ... but, sadly this just won't work {{#each states}} {{/each}} Ideally, I should be able to accept the object with an attribute like so ... ... This SO question/answer is "very" similar to my issue, but, the answer didn't work because I have the Meteor blaze template complication ... Similar SO question/answer I "really" don't want to stick with my work-a-round ... even though it works. I've read elsewhere on SO that in a blaze #each iteration you can access the object literal like so ... {{#each humans}} {{this}} {{/each}} But, I couldn't make this work. I would be very appreciative of any help and guidance. I understand what I'm trying to do, combine Polymer and Meteor is somewhat problematic, but, I've seen it done and I've made a lot of progress. I'm just stumbling at this point. Thanks!!!
tagged with: meteor
favorite count: 0
accepted answer: http://stackoverflow.com/a/29268627
type: AnsweredQuestion
score: 3
has title: Polymer + Meteor, in blaze #each loop, unable to pass object to Polymer web component

http://stackoverflow.com/comment/46736245
has text: Again, why not `PHP`? Much simpler I guess...
score: 0
comment on: http://stackoverflow.com/q/29267150
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46652567
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29218879
has text: @Sparky Well.. you are right, my mistake.
score: 0

http://stackoverflow.com/a/29253083
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/46710253
answers question: http://stackoverflow.com/q/29253050
has comment: http://stackoverflow.com/comment/46710279
has body: You forgot && False
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/46710122

http://stackoverflow.com/comment/46917879
type: Comment
type: QuestionComment
has text: yeah $("header").addClass("scrolled") works when the page is initially loaded but when i scroll up and down the page again it shows the old larger header....which means it is removing 'scrolled' again?
score: 0
comment on: http://stackoverflow.com/q/29367803

http://stackoverflow.com/q/29243280
has answer: http://stackoverflow.com/a/29244025
tagged with: css
accepted answer: http://stackoverflow.com/a/29244025
type: AnsweredQuestion
type: Question
tagged with: width
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
has body: I am trying to dynamically change the width of a div using a slider. I get the element ID by using a click function. I then pass this ID into a variable. I use this variable to determine which element ID i am adjusting Everything works fine except for the last line. Nothing happens and no errors. Just to clarify a little more, in the JS fiddle when you drag it will update the selected element. How do i bring that element into the slider to adjust its width? I have tried getting the id attribute of the element and storing it in a global variable and then calling that variable in the slider and updating its CSS. JSFiddle UPDATE: Solved! I should have added a class onto the selected element instead of trying to store it in a variable. var divHolder // holds element from click function $('#changeWidth').slider({ value: 0, slide: function(event, slider) { var theSliderValue = slider.value + "%"; alert(divHolder); // Returns the div id i wanted $("#divHolder").css("width", theSliderValue); } });
has comment: http://stackoverflow.com/comment/46692762
has title: Changing div width using JQuery UI slider
has comment: http://stackoverflow.com/comment/46692540

http://stackoverflow.com/a/29309363
downvote count: 0
answers question: http://stackoverflow.com/q/29307168
type: Answer
has body: Add them to a container element with its position set to relative (preferably create a rule, not an inline style like in this example): &lt;div id="container" style="position:relative"&gt;&lt;/div&gt; Then add canvases with their position set to absolute and left/top to 0: var canvas = document.createElement("canvas"); canvas.width = 500; canvas.height = 400; canvas.style.cssText = "position:absolute;left:0;top:0"; // add to container document.getElementById("container").appendChild(canvas); The first canvas added will be at the bottom, the last on top. You can use z-indexes but it's better just to create and add canvases in the order you want, knowing first is bottom etc. (imo). Demo: var canvas = document.createElement("canvas"); canvas.width = 500; canvas.height = 400; canvas.style.cssText = "position:absolute;left:0;top:0"; var ctx = canvas.getContext("2d"); ctx.font = "80px sans-serif"; ctx.fillText("BOTTOM", 10, 120); // add to element document.getElementById("container").appendChild(canvas); // SECOOND CANVAS var canvas2 = document.createElement("canvas"); canvas2.width = 500; canvas2.height = 400; canvas2.style.cssText = "position:absolute;left:0;top:0"; var ctx2 = canvas2.getContext("2d"); ctx2.font = "80px sans-serif"; ctx2.fillStyle = "blue"; ctx2.fillText("TOP", 16, 120); // add to element document.getElementById("container").appendChild(canvas2); #container {position:relative} &lt;div id="container"&gt;&lt;/div&gt;
upvote count: 1
score: 1
accepted answer of: http://stackoverflow.com/q/29307168
type: AcceptedAnswer

http://stackoverflow.com/comment/46831843
type: Comment
has text: possible duplicate of [How can I stop a video with Javascript in Youtube?](http://stackoverflow.com/questions/1094397/how-can-i-stop-a-video-with-javascript-in-youtube)
comment on: http://stackoverflow.com/q/29320174
score: 0
type: QuestionComment

http://stackoverflow.com/a/29291340
type: Answer
downvote count: 0
score: 1
upvote count: 1
type: AcceptedAnswer
has body: [I'm posting our problem and solution in this initial post as an FYI. If you have an official statement from Microsoft or a representative organization about this issue, I'll mark that as an answer. Otherwise, this post will serve as the answer]. Solution: 1) We set AutoPostBack to false for the RadioButtonList control. 2) In the PreRender event for the page, we manually add the new doPostBack function to each List item in the radio button list by looping through the list items in the RadioButtonList. 3) The code is as follows: for (int i = 0; i &lt; rbList.Items.Count; i++) { rbList.Items[i].Attributes.Add("onclick", "javascript:setTimeout('__doPostBack(\\'rbList$" + i + "\\',\\'\\')', 0)"); } 4) The code in the onclick event function call matches the structure of what ASP.Net 3.5 + C# automatically generate. After this fix, both radio buttons had onclick events functions and original functionality was restored.
answers question: http://stackoverflow.com/q/29291265
accepted answer of: http://stackoverflow.com/q/29291265

http://stackoverflow.com/q/29319433
accepted answer: http://stackoverflow.com/a/29320306
has title: Using ajax to download a file
type: AnsweredQuestion
score: 1
tagged with: file
linked to: http://stackoverflow.com/q/4545311
upvote count: 1
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/29320306
has body: I have a javascript file that uses ajax and passes an array of ids to a rails controller action. The controller then maps these to model objects and generates a file containing some of their data. My problem lies in downloading this file. Before, I was saving the needed objects in the database first, and then the controller could just format as .ics, call the same action, then the file would be downloaded. Now everything is more dynamic, and I'm having trouble rendering the file now that I have to pass in params. Is there a way to do this? I've tried render :layout =&gt; false, :text =&gt; @calendar.to_ical and send_data @calendar.to_ical, :type=&gt; 'text/ics' and render :text =&gt; @calendar.to_ical All of which complete successfully, but no file is ever downloaded. Any help would be appreciated! Thank you!
answer count: 1
downvote count: 0
favorite count: 0
tagged with: ajax
tagged with: download
linked to: http://stackoverflow.com/q/15859254
tagged with: ruby-on-rails

http://stackoverflow.com/comment/46833875
type: QuestionComment
has text: Please, try to solve the problem yourself first.
score: 3
comment on: http://stackoverflow.com/q/29321295
type: Comment

http://stackoverflow.com/comment/46647274
type: QuestionComment
has text: You're also specifying a datatype of JSON and you're not returning JSON.
comment on: http://stackoverflow.com/q/29219013
score: 1
type: Comment

http://stackoverflow.com/a/29309697
accepted answer of: http://stackoverflow.com/q/29243130
upvote count: 1
has body: I could after few days understand where do these files be loaded from. When you map a css to a set of less files, you have two solutions : with a .map file this method is generic and the .map file is referenced from within the css file (at the end). The advantage is that you can remove the .map file easily forcing the browser's css inspector to display the references as is in the css file. the .map file is directly concatenated within the css file The references to the less files are directly inserted at the end of the css file. The use of a .map file is then no longer needed. More details following these links devtools : https://developer.chrome.com/devtools less : http://en.wikipedia.org/wiki/Less_(stylesheet_language)
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/29243130
type: Answer
score: 1

http://stackoverflow.com/a/29242328
has body: Since I don't have any idea of what the contents of "BrandRepository" is, this is a general answer. If you're set on populating it using jquery and json, this is an example: &lt;script type="text/javascript"&gt; $(function() { //only call when the DOM is ready alert('DOM is ready!'); $.getJSON("/MyController/GetBrands/", function(result) { alert('The controller action got hit successfully'); var options = $("#brands"); options.html(''); //clears the current options alert('The result was: ' + JSON.stringify(result)); $.each(result, function(i, item) { options.append('&lt;option id="' + item.Id + '"&gt;' + item.Name '&lt;/option&gt;'); }); }); }); &lt;/script&gt; This assumes that brands is composed of Id and Name in valid json.
upvote count: 1
has comment: http://stackoverflow.com/comment/46810630
answers question: http://stackoverflow.com/q/29241773
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/46810545
type: Answer

node.js
tags question: http://stackoverflow.com/q/29258984
tags question: http://stackoverflow.com/q/29347240
tags question: http://stackoverflow.com/q/29326211
tags question: http://stackoverflow.com/q/29249641
tags question: http://stackoverflow.com/q/29341510
tags question: http://stackoverflow.com/q/29227306
tags question: http://stackoverflow.com/q/29229289
tags question: http://stackoverflow.com/q/29289197
tags question: http://stackoverflow.com/q/29261854
tags question: http://stackoverflow.com/q/29229790
tags question: http://stackoverflow.com/q/29345234
tags question: http://stackoverflow.com/q/29355484
tags question: http://stackoverflow.com/q/29336272
tags question: http://stackoverflow.com/q/29274902
tags question: http://stackoverflow.com/q/29223130
tags question: http://stackoverflow.com/q/29276796
tags question: http://stackoverflow.com/q/29233339
tags question: http://stackoverflow.com/q/29308824
tags question: http://stackoverflow.com/q/29316589
tags question: http://stackoverflow.com/q/29221739
tags question: http://stackoverflow.com/q/29234256
tags question: http://stackoverflow.com/q/29350022
tags question: http://stackoverflow.com/q/29318012
tags question: http://stackoverflow.com/q/29240801
tags question: http://stackoverflow.com/q/29274516
tags question: http://stackoverflow.com/q/29309436
tags question: http://stackoverflow.com/q/29262551
tags question: http://stackoverflow.com/q/29245552
tags question: http://stackoverflow.com/q/29341648
tags question: http://stackoverflow.com/q/29263969
tags question: http://stackoverflow.com/q/29268790
tags question: http://stackoverflow.com/q/29244236
tags question: http://stackoverflow.com/q/29311283
tags question: http://stackoverflow.com/q/29342518
tags question: http://stackoverflow.com/q/29289917
tags question: http://stackoverflow.com/q/29327996
tags question: http://stackoverflow.com/q/29308600
tags question: http://stackoverflow.com/q/29305430
tags question: http://stackoverflow.com/q/29334865
tags question: http://stackoverflow.com/q/29318175
tags question: http://stackoverflow.com/q/29328678
tags question: http://stackoverflow.com/q/29263429
tags question: http://stackoverflow.com/q/29313564
tags question: http://stackoverflow.com/q/29298799
tags question: http://stackoverflow.com/q/29361416
tags question: http://stackoverflow.com/q/29327025
tags question: http://stackoverflow.com/q/29258440
tags question: http://stackoverflow.com/q/29220520
tags question: http://stackoverflow.com/q/29320363
tags question: http://stackoverflow.com/q/29249696
tags question: http://stackoverflow.com/q/29360623
tags question: http://stackoverflow.com/q/29361709
tags question: http://stackoverflow.com/q/29265247
tags question: http://stackoverflow.com/q/29258853
tags question: http://stackoverflow.com/q/29287829
tags question: http://stackoverflow.com/q/29314248
tags question: http://stackoverflow.com/q/29342326
tags question: http://stackoverflow.com/q/29255582
tags question: http://stackoverflow.com/q/29272165
tags question: http://stackoverflow.com/q/29311760
tags question: http://stackoverflow.com/q/29222929
tags question: http://stackoverflow.com/q/29349791
tags question: http://stackoverflow.com/q/29244386
tags question: http://stackoverflow.com/q/29220255
tags question: http://stackoverflow.com/q/29295428
tags question: http://stackoverflow.com/q/29223471
tags question: http://stackoverflow.com/q/29340266
tags question: http://stackoverflow.com/q/29277252
tags question: http://stackoverflow.com/q/29238155
tags question: http://stackoverflow.com/q/29271717
tags question: http://stackoverflow.com/q/29348925
tags question: http://stackoverflow.com/q/29269915
tags question: http://stackoverflow.com/q/29236759
tags question: http://stackoverflow.com/q/29295404
tags question: http://stackoverflow.com/q/29322904
tags question: http://stackoverflow.com/q/29269905
tags question: http://stackoverflow.com/q/29243759
tags question: http://stackoverflow.com/q/29313207
tags question: http://stackoverflow.com/q/29319435
tags question: http://stackoverflow.com/q/29353353

http://stackoverflow.com/comment/46647063
has text: @Gokul: Look at [the demo](http://www.ok-soft-gmbh.com/jqGrid/Gokul.htm). It uses your code with just another position of `navGrid` and it do displays the navigator bar.
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29218644

http://stackoverflow.com/a/29290819
accepted answer of: http://stackoverflow.com/q/29290646
has comment: http://stackoverflow.com/comment/46778830
upvote count: 3
has body: As we discussed, the issue is with escaping and sanitizing data. If you used prepared statements, it will handle it for you. let's have a look at how that would work: Prepare the statement: $stmt = $mysqli-&gt;prepare("INSERT INTO user_saved_data (user_html_css_code, dd_id, actual_html) values (?,?,?)"); Bind your parameters: $stmt-&gt;bind_param('sis', $htmlCssToSave, $userId, $actualHtml); Then execute your statement: $stmt-&gt;execute(); Then you should be good to go. The prepared statement should handle the data sanitization for you now. Resouces: mysqli prepare mysqli bind_param mysqli execute
has comment: http://stackoverflow.com/comment/46778725
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46783252
type: Answer
answers question: http://stackoverflow.com/q/29290646
score: 3
downvote count: 0

http://stackoverflow.com/comment/46693440
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/29243699
has text: you could make the border of the actual input trasparent with a .before with the "i will" part, and wrap it in a div with border

http://stackoverflow.com/a/29364076
has body: Change this line $subcategory = Subcategory::find()-&gt;all(); to $subcategory = Subcategory::find()-&gt;asArray()-&gt;all(); this will give the resultset in array format and then you can pass it as json. Then in your ajax success, parse the Json result. var result = $.parseJSON(data); for(var i=0; i&lt;result.length; i++){ alert(result[i].subcategory_id); }
has comment: http://stackoverflow.com/comment/46911534
has comment: http://stackoverflow.com/comment/46911685
type: Answer
upvote count: 3
accepted answer of: http://stackoverflow.com/q/29364003
downvote count: 0
has comment: http://stackoverflow.com/comment/46913485
has comment: http://stackoverflow.com/comment/46912907
has comment: http://stackoverflow.com/comment/46912756
has comment: http://stackoverflow.com/comment/46912570
answers question: http://stackoverflow.com/q/29364003
has comment: http://stackoverflow.com/comment/46911399
score: 3
type: AcceptedAnswer

http://stackoverflow.com/a/29264185
score: 0
type: Answer
has body: this in demo will refer to the window object, since the function seems to be a member of the global variable (window), therefor whenever you're calling demo( or caller, since this function just calls demo), the global num variable will be incremented. The num variable in caller however is a local variable and overrides the global variable within the caller function, but since you're never performing any calculations on this variable; it will always remain 0.
answers question: http://stackoverflow.com/q/29264031

http://stackoverflow.com/comment/46778149
score: 0
type: AnswerComment
has text: @ScottSelby are you using ng-repeter ? if yes please see that demo http://jsbin.com/saduju/3/edit
type: Comment
comment on: http://stackoverflow.com/a/29290328

http://stackoverflow.com/q/29365451
possible better answer: http://stackoverflow.com/a/29365584
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/29365547
tagged with: jquery
tagged with: asp.net
favorite count: 0
accepted answer: http://stackoverflow.com/a/29365547
tagged with: http://stackoverflow.com/tag/html
tagged with: input
has body: How can I use the 'id' to only apply the disabled/enabled button if a check box is clicked to ONLY the second button, as I need it to toggle on and off depending on if a checkbox is clicked or not. Where as the first button will always be on http://jsfiddle.net/BPhZe/2122/ Button should be enabled if at least one checkbox is checked Option 1 Option 2 Option 3 Option 4 var checkboxes = $("input[type='checkbox']"), submitButt = $("input[type='submit']"); checkboxes.click(function() { submitButt.attr("disabled", !checkboxes.is(":checked")); });
type: AnsweredQuestion
has title: Only apply disabled to one input button
upvote count: 1
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/29365584
tagged with: javascript

http://stackoverflow.com/comment/46875161
type: Comment
has text: Unrecoverable Syntax Error on `if($('#hiddenTables')val() == ""){` ??
comment on: http://stackoverflow.com/a/29344096
type: AnswerComment
score: 0

http://stackoverflow.com/comment/46763941
type: QuestionComment
comment on: http://stackoverflow.com/q/29282765
score: 0
has text: read d3.csv(file, function(data) { }) might work, if you are able to write file locally
type: Comment

http://stackoverflow.com/q/29300544
has title: How to split the array of objects one by one in javascript
has comment: http://stackoverflow.com/comment/46795779
has comment: http://stackoverflow.com/comment/46795864
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/29300617
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46795796
downvote count: 6
score: -5
upvote count: 1
type: Question
has body: How to split the array of objects one by one return objects in javascript,if it is possible or not.My given sample data is var data=[{a:10,b:20},{c:10,d:30},{e:30,f:40}] And finally split the data like given {a:10,b:20} {c:10,d:30} {e:30,f:40}
has comment: http://stackoverflow.com/comment/46795802
has comment: http://stackoverflow.com/comment/46795859
tagged with: javascript

http://stackoverflow.com/comment/46739902
score: 0
type: Comment
type: QuestionComment
has text: Use `document.getElementById("message").innerText` instead of `document.getElementById("message").innerHTML`: https://developer.chrome.com/extensions/xhr. Also do you implement Cross-Domain XHRs in Content scripts?
comment on: http://stackoverflow.com/q/29267773

http://stackoverflow.com/comment/46792291
comment on: http://stackoverflow.com/q/29297906
type: Comment
type: QuestionComment
has text: no i'm not, I just tried similar snippet that worked on fiddle (without the `createFactory`)
score: 0

http://stackoverflow.com/a/29257567
type: Answer
has comment: http://stackoverflow.com/comment/46717691
answers question: http://stackoverflow.com/q/29254989
score: 0
has body: use a Jquery plug-in for filter and search in a table like jQuery.FilterTable jQuery.FilterTable

http://stackoverflow.com/a/29308527
has body: You need to wait till the image is loaded before you query for its height and width. Code snippet follows, $(document).ready(function() { /* Just added this part */ $('.item').each(function() { var $this = $(this), $img = $this.find('img'); $img.load(function(){ var w = $this.find('img').width(); var h = $this.find('img').height(); alert("width: " + w + " &amp; height: " + h); $this.width(w).height(h) }); ; }); }); /* Just added this part */ &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"&gt;&lt;/script&gt; &lt;div class="item" style="width: 0px; height: 0px;"&gt; &lt;img src="http://dummyimage.com/190x100/000/fff.png " alt="" /&gt; &lt;/div&gt; Jquery ready function fires after the dom is ready and not after making sure the image is loaded.https://api.jquery.com/ready/.
has comment: http://stackoverflow.com/comment/46811150
type: Answer
accepted answer of: http://stackoverflow.com/q/29304695
answers question: http://stackoverflow.com/q/29304695
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/46810976
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/29224656
upvote count: 1
has comment: http://stackoverflow.com/comment/46658946
has title: Grunt UnCSS doesn't work for me
has body: I'm trying to use "uncss" with grunt, i do all the process, i followed this guide but got no success, the page doesn't show anything, here are my files, i don't know what happens. Maybe someone with more experience in this can help. Also would like to know if when using many frameworks it's recommended to use this method to mash the js files up and minify them? How safe is to use uncss? i've run it file by file but it erases things that are used by the page... what are the limitations of uncss?
has comment: http://stackoverflow.com/comment/46658776
downvote count: 0
answer count: 0
tagged with: javascript
type: UnansweredQuestion
tagged with: gruntjs
type: Question
tagged with: uncss
tagged with: minify
score: 1
has comment: http://stackoverflow.com/comment/46658966
favorite count: 0

http://stackoverflow.com/comment/97128877
score: 2
has text: A perfect opportunity for applying the word "renege" was wasted when selecting these terms.
type: QuestionComment
comment on: http://stackoverflow.com/q/29268569
type: Comment

angularjs
tags question: http://stackoverflow.com/q/29265701
tags question: http://stackoverflow.com/q/29266916
tags question: http://stackoverflow.com/q/29246298
tags question: http://stackoverflow.com/q/29240529
tags question: http://stackoverflow.com/q/29318898
tags question: http://stackoverflow.com/q/29273740
tags question: http://stackoverflow.com/q/29259080
tags question: http://stackoverflow.com/q/29286176
tags question: http://stackoverflow.com/q/29222526
tags question: http://stackoverflow.com/q/29342055
tags question: http://stackoverflow.com/q/29283416
tags question: http://stackoverflow.com/q/29221255
tags question: http://stackoverflow.com/q/29328092
tags question: http://stackoverflow.com/q/29277410
tags question: http://stackoverflow.com/q/29243737
tags question: http://stackoverflow.com/q/29316453
tags question: http://stackoverflow.com/q/29358259
tags question: http://stackoverflow.com/q/29267856
tags question: http://stackoverflow.com/q/29363590
tags question: http://stackoverflow.com/q/29258771
tags question: http://stackoverflow.com/q/29308287
tags question: http://stackoverflow.com/q/29316681
tags question: http://stackoverflow.com/q/29335032
tags question: http://stackoverflow.com/q/29344361
tags question: http://stackoverflow.com/q/29241522
tags question: http://stackoverflow.com/q/29243854
tags question: http://stackoverflow.com/q/29306053
tags question: http://stackoverflow.com/q/29364250
tags question: http://stackoverflow.com/q/29297840
tags question: http://stackoverflow.com/q/29256282
tags question: http://stackoverflow.com/q/29321660
tags question: http://stackoverflow.com/q/29241885
tags question: http://stackoverflow.com/q/29334108
tags question: http://stackoverflow.com/q/29329048
tags question: http://stackoverflow.com/q/29314695
tags question: http://stackoverflow.com/q/29313769
tags question: http://stackoverflow.com/q/29278138
tags question: http://stackoverflow.com/q/29265310
tags question: http://stackoverflow.com/q/29327539
tags question: http://stackoverflow.com/q/29262548
tags question: http://stackoverflow.com/q/29334909
tags question: http://stackoverflow.com/q/29255501
tags question: http://stackoverflow.com/q/29298849
tags question: http://stackoverflow.com/q/29371590
tags question: http://stackoverflow.com/q/29234179
tags question: http://stackoverflow.com/q/29305105
tags question: http://stackoverflow.com/q/29226595
tags question: http://stackoverflow.com/q/29282292
tags question: http://stackoverflow.com/q/29262547
tags question: http://stackoverflow.com/q/29295826
tags question: http://stackoverflow.com/q/29220837
tags question: http://stackoverflow.com/q/29317438
tags question: http://stackoverflow.com/q/29326111
tags question: http://stackoverflow.com/q/29256283
tags question: http://stackoverflow.com/q/29339767
tags question: http://stackoverflow.com/q/29296010
tags question: http://stackoverflow.com/q/29336477
tags question: http://stackoverflow.com/q/29234544
tags question: http://stackoverflow.com/q/29315904
tags question: http://stackoverflow.com/q/29331811
tags question: http://stackoverflow.com/q/29343592
tags question: http://stackoverflow.com/q/29233995
tags question: http://stackoverflow.com/q/29333646
tags question: http://stackoverflow.com/q/29338082
tags question: http://stackoverflow.com/q/29364957
tags question: http://stackoverflow.com/q/29330989
tags question: http://stackoverflow.com/q/29301493
tags question: http://stackoverflow.com/q/29266113
tags question: http://stackoverflow.com/q/29264546
tags question: http://stackoverflow.com/q/29333997
tags question: http://stackoverflow.com/q/29274620
tags question: http://stackoverflow.com/q/29346070
tags question: http://stackoverflow.com/q/29331983
tags question: http://stackoverflow.com/q/29280317
type: Tag
tags question: http://stackoverflow.com/q/29255709
tags question: http://stackoverflow.com/q/29248828
tags question: http://stackoverflow.com/q/29262153
tags question: http://stackoverflow.com/q/29271715
tags question: http://stackoverflow.com/q/29226805

http://stackoverflow.com/q/29266419
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29266843
has comment: http://stackoverflow.com/comment/46734970
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/29266576
answer count: 4
has answer: http://stackoverflow.com/a/29266576
favorite count: 0
upvote count: 1
tagged with: css
has comment: http://stackoverflow.com/comment/46734812
has answer: http://stackoverflow.com/a/29266843
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46734899
has title: Menu Popping up and down HTML
score: 1
has answer: http://stackoverflow.com/a/29267459
type: Question
has body: [I can't use JQuery, if you wanted to know.] I'm trying to make my Menu come up and down. (Duh) I don't know how else to explain it, I want so if you put your cursor near the top of the screen, the menu will slide down from the top, (like an animation), and it will go back up when you move your cursor away from the top of the screen. Code: body { background-color: #eeeeee; } Rounded { padding: 17px 17px; padding-top: 50px; background: #dddddd; border-radius: 25px; } Header { font-style: arial; font-size: 20px; font-weight: 3px; font-size-adjust: bottom; color: #ededed; } Black { color: 000000; } Backer { } Bod { padding 15px 15px; padding-left: 150px; } Games-rade ---------------------------------- Main | About | Buy ---------------------------------- Hello. Any Suggestions?
downvote count: 0
has answer: http://stackoverflow.com/a/29266825
has comment: http://stackoverflow.com/comment/46734794

http://stackoverflow.com/comment/46731522
type: Comment
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/29263163
has text: The url you have up above is an API, you call it with a request passing in yours variables in a url string. So like in ajax you query the url and add the data to it which will give you the response which you can work with. Ajax will help you do this.

http://stackoverflow.com/comment/133554598
comment on: http://stackoverflow.com/a/29269515
score: 0
type: AnswerComment
has text: hi @Bergi +1. "*resolving a promise with a "plain" value means fulfilling it*" - That case is when it resolves to something other than a promise object, right?
type: Comment

http://stackoverflow.com/q/29279805
answer count: 5
has answer: http://stackoverflow.com/a/29280457
has answer: http://stackoverflow.com/a/61539822
upvote count: 3
accepted answer: http://stackoverflow.com/a/29280457
tagged with: keydown
has body: I have this Plunkr, This contains a div, on which I bind a keydown event. On pressing right or left arrow, the div should start moving. This works, in all browsers, but when the key is pressed and hold, the first keydown event is fired immediately (div once moves), and it waits for a time gap, and then it continues to move. So this means the keydown event is once fired, then the browser waits to detect if there is a subsequent keyUp event as well, then after a short time (when there is no keyup), it continues to fires keydown events. (to see the problem, focus on window, press right arrow and hold, div should move once 5px, then wait, and then again continue to move) Question: Is there a way around, so I can just keep the key pressed, and div should immediately start moving, without waiting to detect subsequent keyup (once)? $(function() { $(window).keydown(function(e) { console.log(e.keyCode) if (e.keyCode == 39) move(5, 'left', $('.mover')) else if (e.keyCode == 37) move(-5, 'left', $('.mover')) }) }) function move(offset, direction, target) { console.log($(target)) $(target).css(direction, (parseInt($(target).css(direction)) + offset) + 'px') } .mover { height: 50px; width: 50px; display: inline-block; background: black; position: absolute; left: 0; } &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"&gt;&lt;/script&gt; &lt;div class='mover'&gt;&lt;/div&gt;
type: AnsweredQuestion
score: 3
has answer: http://stackoverflow.com/a/58924326
has title: KeyDown doesn't continuously fire when pressed and hold
possible better answer: http://stackoverflow.com/a/29280056
type: Question
has answer: http://stackoverflow.com/a/29280116
has answer: http://stackoverflow.com/a/29280056
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: jquery-events

http://stackoverflow.com/q/29340306
downvote count: 1
type: Question
has body: Good morning peoples. I just want to show higher resolutions images on hover of lower resolutions images. I want to make a rule or any type of function that can do this work dynamically, I mean I cannot just put on every image a hover effect and changing the src every where. I have an idea if it would be useful, I can put all small resolutions images in a folder called images/small, and all large images in folder called images/large, so can we just make a function that can change just change "images/SMALL" to "images/LARGE" Any suggestion would be appreciated Thanks in advance
has comment: http://stackoverflow.com/comment/46868124
tagged with: javascript
has comment: http://stackoverflow.com/comment/46868309
tagged with: jquery
tagged with: image
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/46868016
has answer: http://stackoverflow.com/a/29340811
favorite count: 0
has comment: http://stackoverflow.com/comment/46868002
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has title: Show higher resolution images on hover
upvote count: 1
has answer: http://stackoverflow.com/a/29343007

http://stackoverflow.com/a/29363399
has comment: http://stackoverflow.com/comment/46910329
score: 0
answers question: http://stackoverflow.com/q/29363292
type: Answer
has body: You could try encoding it as a JSON structure: $encodedResponse = json_encode($response); $objResponse-&gt;script("bootbox.alert('$encodedResponse +users are associated...')" );
has comment: http://stackoverflow.com/comment/46913585

http://stackoverflow.com/a/29272815
accepted answer of: http://stackoverflow.com/q/29272596
has body: Try below code - NOTE - you need not to use document.ready multiple times. Use it once and put all your script code inside it. $(document).ready(function() { //set initial code when page loads //set state1 selected $('.state').val('state1'); //get class value for selected state and use it to select city var city = $('.state option:selected').attr('class'); //Hide other cities list not of selected state $('.cities').hide(); //Show cities list of selected state $('#' + city).show(); //manipulate value of city select $('.cities').val('city_1_in_state1'); //Add state select box listener $('.state').change(function() { //get the class attribute of option selected in state select element var city = $(this).find('option:selected').attr('class'); //Hide other cities list not of selected state $('.cities').hide(); //Show cities list of selected state $('#' + city).show(); //set non blank option to select $('#' +city).find('option:not(:empty):first').prop('selected',true); }); }); JSFiddle Demo
score: 0
answers question: http://stackoverflow.com/q/29272596
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46745784
has comment: http://stackoverflow.com/comment/46745687
type: Answer
has comment: http://stackoverflow.com/comment/46746084
has comment: http://stackoverflow.com/comment/46745962
has comment: http://stackoverflow.com/comment/46746348

http://stackoverflow.com/comment/46904658
score: 0
type: Comment
has text: Or just a misunderstanding of how `Array.prototype.sortOn` and `Array.prototype.push` work.
type: QuestionComment
comment on: http://stackoverflow.com/q/29360321

http://stackoverflow.com/q/29296363
tagged with: javascript
tagged with: controller
has body: I'm curious how to add another button in the fancybox that does something. here is the code http://plnkr.co/edit/fHTfBpfHGspOO3BTlgYA?p=preview that shows 3 fancyboxes with dynamical content. However I'm having an issue with buttons - don't know how to make any actions with ng-click="doSomething() inside the button as html code for fancybox is generated outside of the controller scope (if I understand it properly) and can't be reached from the original controller. Here is the code of 4 files: app.js var app = angular.module('plunker', []); app.controller('appController', ['$scope', function ControllerZero($scope) { $scope.items = [{ 'name': 'First Item', 'description': 'first description' }, { 'name': 'Second item', 'description': 'second description' }, { 'name': 'Third Item', 'description': 'third description' }]; } ]); app.directive('fancybox', function ($compile, $http) { return { restrict: 'A', controller: function($scope) { $scope.openFancybox = function (url) { $http.get(url).then(function(response) { if (response.status == 200) { var template = angular.element(response.data); var compiledTemplate = $compile(template); compiledTemplate($scope); $.fancybox.open({ content: template, type: 'html' }); } }); }; } }; }); index.html AngularJS Fancybox {{ item.name }} Click here style.css /* Put your css in here */ li {list-style-type: none; border: 1px solid #efefef; width:200px; margin-bottom:10px; padding:10px;} li div {display: inline-block; width:90px; color: grey;} li div.name {color: black; font-weight: bold;} template.html {{item.description}} close this fancybox and write something into console open the fancybox with the Second Item
score: 0
answer count: 1
tagged with: jquery
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/29297432
tagged with: fancybox
type: AnsweredQuestion
has title: jquery fancybox + angularJS: fancybox button action issue
has answer: http://stackoverflow.com/a/29297432
type: Question

http://stackoverflow.com/a/29294985
has comment: http://stackoverflow.com/comment/46875280
score: 1
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46868532
has comment: http://stackoverflow.com/comment/46786100
has comment: http://stackoverflow.com/comment/46786631
type: Answer
has comment: http://stackoverflow.com/comment/46786539
has comment: http://stackoverflow.com/comment/46906984
has comment: http://stackoverflow.com/comment/46874155
has comment: http://stackoverflow.com/comment/46905979
has body: Try something like this: Markup <rect width="300" height="100" id="select1" /> Red Green Blue Script $('.btn').on('click', function () { var pathToSet = localStorage.getItem('lastColor'); localStorage.setItem('UndoColor', $("#select1").css("fill")); selectedPath.css({ fill: $(this).attr('data-color') }); localStorage.setItem('RedoColor', $("#select1").css("fill")); }); $("#btnUndo").click(function () { var pathToSet = localStorage.getItem('UndoColor'); selectedPath.css({ fill: pathToSet }); }); $("#btnRedo").click(function () { var pathToSet = localStorage.getItem('RedoColor'); selectedPath.css({ fill: pathToSet }); }); DEMO
accepted answer of: http://stackoverflow.com/q/29294094
has comment: http://stackoverflow.com/comment/46905962
upvote count: 1
answers question: http://stackoverflow.com/q/29294094

http://stackoverflow.com/q/29250950
has comment: http://stackoverflow.com/comment/46725505
has answer: http://stackoverflow.com/a/29342582
type: Question
has comment: http://stackoverflow.com/comment/47376560
upvote count: 120
has comment: http://stackoverflow.com/comment/46749794
tagged with: javascript
has answer: http://stackoverflow.com/a/29251356
score: 119
has comment: http://stackoverflow.com/comment/46706010
has comment: http://stackoverflow.com/comment/46965139
answer count: 7
has body: Why is this line valid in javascript ? var a = 0[0]; After that, a is undefined.
has answer: http://stackoverflow.com/a/29251025
accepted answer: http://stackoverflow.com/a/29251025
favorite count: 0
has title: Why is 0[0] syntactically valid?
has answer: http://stackoverflow.com/a/29251082
downvote count: 1
possible better answer: http://stackoverflow.com/a/29251356
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29387803
has answer: http://stackoverflow.com/a/29251097
has comment: http://stackoverflow.com/comment/53119429
has answer: http://stackoverflow.com/a/29257392

http://stackoverflow.com/a/29318478
has comment: http://stackoverflow.com/comment/46830062
accepted answer of: http://stackoverflow.com/q/29318153
upvote count: 1
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29318153
type: Answer
downvote count: 0
score: 1
has body: does this really make impossible to a potential attacker to access the keys You can compress it and/or obfuscate it but this process is always reversable as long as your application requires the plain keys. all the code I write which I would like to not be "open source" unless I decide to do so With choosing JavaScript as your language and the browser as your platform you already decided to go open source. You obtain the copyright for your code, so you're left with putting in a proper license header and the knowledge that companies that make money wouldnt dare to "just rip" your code. People just interested in how you accomplished something would'nt go through the hassle of reversing the compression and/or obfuscation. EDIT: Non public API keys are usually bound to a specified referrer domain. To prevent your key from being used on unauthorized sites, only allow referrals from domains you administer.

http://stackoverflow.com/a/29262403
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29255490
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29255490
upvote count: 2
type: Answer
score: 2
has body: Use the addRecords: true config option to your second and subsequent load params if you want to aggregate the records. See: http://docs.sencha.com/extjs/4.2.2/#!/api/Ext.data.Store-method-load But if you want to send both loading sequences as one request, you will have to modify your server's API to accept multiple IDs.

http://stackoverflow.com/a/29330412
upvote count: 4
accepted answer of: http://stackoverflow.com/q/29302247
type: AcceptedAnswer
downvote count: 0
score: 4
type: Answer
answers question: http://stackoverflow.com/q/29302247
has body: p2.js and Pixi.js have different coordinate systems, which makes the solution a bit complex. The "up" direction in p2.js is along the positive Y axis and in Pixi it's along negative Y. To get around this, one solution is to apply a negative scale to the Pixi stage to flip it upside down: stage.scale.y = -1; You need to add a p2.Body for each sprite. To transfer position and rotation data from Pixi.js sprites to p2.js bodies, do this: body.position[0] = sprite.position.x; body.position[1] = sprite.position.y; body.angle = sprite.rotation; To track overlaps you need to add contact listeners: world.on('beginContact', function(evt){ // evt.bodyA and evt.bodyB started overlapping! }); world.on('endContact', function(evt){ // evt.bodyA and evt.bodyB are not overlapping any more. }); See this example: http://jsfiddle.net/18shpxq8/2/

http://stackoverflow.com/a/29286412
score: 855
has comment: http://stackoverflow.com/comment/134970565
has comment: http://stackoverflow.com/comment/81601989
has comment: http://stackoverflow.com/comment/139202023
has comment: http://stackoverflow.com/comment/111369362
has comment: http://stackoverflow.com/comment/109251531
downvote count: 10
has comment: http://stackoverflow.com/comment/134269903
has comment: http://stackoverflow.com/comment/100158745
has body: for in loops over enumerable property names of an object. for of (new in ES6) does use an object-specific iterator and loops over the values generated by that. In your example, the array iterator does yield all the values in the array (ignoring non-index properties).
has comment: http://stackoverflow.com/comment/136025415
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/129368751
has comment: http://stackoverflow.com/comment/134269463
has comment: http://stackoverflow.com/comment/134324861
has comment: http://stackoverflow.com/comment/108264698
has comment: http://stackoverflow.com/comment/134970417
has comment: http://stackoverflow.com/comment/120713595
answers question: http://stackoverflow.com/q/29285897
has comment: http://stackoverflow.com/comment/86008263
accepted answer of: http://stackoverflow.com/q/29285897
has comment: http://stackoverflow.com/comment/128584668
has comment: http://stackoverflow.com/comment/122700228
upvote count: 865
type: Answer
has comment: http://stackoverflow.com/comment/77297786
has comment: http://stackoverflow.com/comment/120713733
has comment: http://stackoverflow.com/comment/136387262

http://stackoverflow.com/q/29321232
has comment: http://stackoverflow.com/comment/46833809
has comment: http://stackoverflow.com/comment/46833747
has comment: http://stackoverflow.com/comment/46833823
type: Question
has comment: http://stackoverflow.com/comment/46833748
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/46833764
has title: How to obscure telephone number from database
has body: How would you obscure a telephone number that is retrieved from a database? I'd like users to be able to click a button and the telephone number appears. So far it's hidden from the user until they click the button, but you can see the number fine in the source code. Is there anyway to hide/muddle the number up (perhaps inject some characters?) on page load and clicking the button removes these characters?
has comment: http://stackoverflow.com/comment/46833882
answer count: 0
has comment: http://stackoverflow.com/comment/46833938
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46834966
has comment: http://stackoverflow.com/comment/46834299

http://stackoverflow.com/comment/46883970
has text: You could use the `.length` property for count the number of selected values. Just like this: `$('input[name="regionHome[]"]:checked').length`. You can see it working here: http://jsfiddle.net/gbtceq2m/3/
comment on: http://stackoverflow.com/a/29292165
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/47695237
score: 1
type: AnswerComment
type: Comment
has text: Sorry, I meant his first suggestion (his answer, not his comment). Parts Of Speech (POS) are grammatical features that may or may not be of interest to you. It's the tokenization that you need (turning a string into a list of words).
comment on: http://stackoverflow.com/a/29324966

http://stackoverflow.com/a/29279758
upvote count: 1
type: AcceptedAnswer
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/29279706
score: 1
accepted answer of: http://stackoverflow.com/q/29279706
has comment: http://stackoverflow.com/comment/46757489
has body: var d = new Date(); d.setDate(27); d.setMonth(3); d.setYear(2015); console.log(d);
has comment: http://stackoverflow.com/comment/46759021

http://stackoverflow.com/a/29280995
has body: If you set each entry's value to i in the loop, you'll get what I believe you're looking for: var maps = [ ["Text A1", "Text A2", "Text A3"], ["Text B1", "Text B2", "Text B3"], ["Text C1", "Text C2", "Text C3"], ["Text D1", "Text D2", "Text D3"], ["Text E1", "Text E2", "Text E3"], ["Text F1", "Text F2", "Text F3"] ]; var map = document.getElementById("complaintType"); for (i = 0; i < maps.length; i++) { var Entry = document.createElement("option"); Entry.text = maps[i][0]; Entry.value = i; map.add(Entry, null); } var tag = document.getElementById('tag'); map.onchange = function() { tag.innerHTML = maps[this.value][1]; } Select One Link | Link
type: Answer
answers question: http://stackoverflow.com/q/29280766
score: 0

http://stackoverflow.com/q/29351871
has comment: http://stackoverflow.com/comment/46889093
has comment: http://stackoverflow.com/comment/46889328
tagged with: javascript
tagged with: jquery
score: 0
answer count: 3
has comment: http://stackoverflow.com/comment/46889176
has body: OK, I am going to preface this with the warning that my code skills are really rudimentary--I've cobbled together what I can, but my lack of experience with Javascript is keeping me from implementing this final thing. I have my page set up: http://excitable.media/reddit.php It is almost doing what I want. The arrows are changing on click with the CSS. The Big number is being called from an SQL Database, in a table named votes that has only one column--count. What I want to happen now is that when someone clicks the up arrow, the count entry is increased by one and the vote count on the page is updated. I know I need AJAX/JQuery to do this, but once again, even the syntax is difficult for me. Here is the page code right now: Reddit reddit <?php include '../php/config.php'; $con; $dbhandle; $selected; if($vote) echo $vote[0]; ?> Registering an account with Reddit [paragraph text omitted] <div="down"> Can anyone help me with this rudimentary coding project? I have another php file called 'insert.php' that connects to the database and then says: $update=mysql_query("UPDATE 'votes' SET 'count'='count'+1)"); if(mysql_query($update)){ return "success!"; } else { return "failed!"; } The reddit.js file is totally empty right now, it's where I am expecting to place the code to make this work. It's also worth mentioning that I don't care about the down arrow at all. I don't want it to function. I only want the up arrow to work. I don't care if people click it more than once from the same IP.
has comment: http://stackoverflow.com/comment/46889063
tagged with: ajax
has answer: http://stackoverflow.com/a/29352107
type: UnansweredQuestion
tagged with: php
has title: Implementing Ajax/Jquery
has answer: http://stackoverflow.com/a/29352072
tagged with: mysql
type: Question
has answer: http://stackoverflow.com/a/29614271

http://stackoverflow.com/a/29351819
has comment: http://stackoverflow.com/comment/46889040
has comment: http://stackoverflow.com/comment/46888898
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/29351559
downvote count: 0
score: 1
has body: It looks like you don't quite understand Object syntax in Javascript; in order for my answer to make the most sense, you may wish to read up a little on them. Now that you understand Objects more, it should become quite clear that what you want looks something like: var results = []; for (var i = 0, len = data.length; i &lt; len; i++) { var resp = data[i]; results.push({ 'coordinates':resp['source']['coordinates'], 'name':resp.name, 'population':resp.population }); } For bonus points, you could include a JS framework like jQuery and just uase a map function.
has comment: http://stackoverflow.com/comment/46888960

css
tags question: http://stackoverflow.com/q/29274030
tags question: http://stackoverflow.com/q/29338725
tags question: http://stackoverflow.com/q/29274826
tags question: http://stackoverflow.com/q/29362098
tags question: http://stackoverflow.com/q/29371122
tags question: http://stackoverflow.com/q/29312589
tags question: http://stackoverflow.com/q/29347909
tags question: http://stackoverflow.com/q/29219582
tags question: http://stackoverflow.com/q/29360760
tags question: http://stackoverflow.com/q/29333863
tags question: http://stackoverflow.com/q/29340306
tags question: http://stackoverflow.com/q/29286328
tags question: http://stackoverflow.com/q/29275691
tags question: http://stackoverflow.com/q/29354661
tags question: http://stackoverflow.com/q/29246830
tags question: http://stackoverflow.com/q/29277920
tags question: http://stackoverflow.com/q/29314408
tags question: http://stackoverflow.com/q/29271720
tags question: http://stackoverflow.com/q/29369577
tags question: http://stackoverflow.com/q/29353037
tags question: http://stackoverflow.com/q/29273550
tags question: http://stackoverflow.com/q/29344464
tags question: http://stackoverflow.com/q/29293933
tags question: http://stackoverflow.com/q/29219194
tags question: http://stackoverflow.com/q/29330572
tags question: http://stackoverflow.com/q/29341938
tags question: http://stackoverflow.com/q/29294026
tags question: http://stackoverflow.com/q/29263521
tags question: http://stackoverflow.com/q/29352890
tags question: http://stackoverflow.com/q/29252960
tags question: http://stackoverflow.com/q/29259945
tags question: http://stackoverflow.com/q/29276031
tags question: http://stackoverflow.com/q/29332084
tags question: http://stackoverflow.com/q/29327908
tags question: http://stackoverflow.com/q/29334556
tags question: http://stackoverflow.com/q/29314252
tags question: http://stackoverflow.com/q/29365429
tags question: http://stackoverflow.com/q/29321342
tags question: http://stackoverflow.com/q/29295027
tags question: http://stackoverflow.com/q/29277232
tags question: http://stackoverflow.com/q/29250742
tags question: http://stackoverflow.com/q/29268341
tags question: http://stackoverflow.com/q/29297333
tags question: http://stackoverflow.com/q/29296011
tags question: http://stackoverflow.com/q/29271393
tags question: http://stackoverflow.com/q/29362173
tags question: http://stackoverflow.com/q/29302332
tags question: http://stackoverflow.com/q/29266990
tags question: http://stackoverflow.com/q/29264225
tags question: http://stackoverflow.com/q/29357535
tags question: http://stackoverflow.com/q/29218554
tags question: http://stackoverflow.com/q/29313808
tags question: http://stackoverflow.com/q/29365935
tags question: http://stackoverflow.com/q/29343728
tags question: http://stackoverflow.com/q/29311643
tags question: http://stackoverflow.com/q/29326356
tags question: http://stackoverflow.com/q/29277344
tags question: http://stackoverflow.com/q/29297664
tags question: http://stackoverflow.com/q/29309495
tags question: http://stackoverflow.com/q/29257331
tags question: http://stackoverflow.com/q/29371931
tags question: http://stackoverflow.com/q/29306622
tags question: http://stackoverflow.com/q/29267014
tags question: http://stackoverflow.com/q/29250667
tags question: http://stackoverflow.com/q/29306584
tags question: http://stackoverflow.com/q/29235608
tags question: http://stackoverflow.com/q/29312176
tags question: http://stackoverflow.com/q/29343276
tags question: http://stackoverflow.com/q/29320110
tags question: http://stackoverflow.com/q/29277681
tags question: http://stackoverflow.com/q/29270637
tags question: http://stackoverflow.com/q/29333197
tags question: http://stackoverflow.com/q/29262597
tags question: http://stackoverflow.com/q/29333753
tags question: http://stackoverflow.com/q/29353032
tags question: http://stackoverflow.com/q/29218645
tags question: http://stackoverflow.com/q/29289629
tags question: http://stackoverflow.com/q/29281750
tags question: http://stackoverflow.com/q/29289169
tags question: http://stackoverflow.com/q/29364402

http://stackoverflow.com/q/29304120
tagged with: jquery
upvote count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/29304166
accepted answer: http://stackoverflow.com/a/29304166
type: AnsweredQuestion
downvote count: 0
score: 1
possible better answer: http://stackoverflow.com/a/29304227
has answer: http://stackoverflow.com/a/29304227
type: Question
answer count: 2
has title: JQUERY - Change SRC back to original after not hover
has body: I have a script that I am trying to use to change the src attr for an icon. The icon that I am loading is a different color and it is intended to notify the user of the link associated with the icon. I have the src changing to the second icon on hover. However, when the user moves the mouse from the icon, it does not revert back to the original icon and stays in the second state. I have written code to try to get it to return back, but this seems to cause the original code not to work. (so it doesn't do anything with the second block added). Any help with this would be very much appreciated. Here is the code: JS $socialBlue1.hover(function () { $(this).attr("src", "../icons/socialBlue1.png"); }); $socialBlue1.not().hover(function () { $(this).attr("src", "../icons/socDark1.png"); });
tagged with: javascript

http://stackoverflow.com/q/29286737
has title: get caret position relative to visible start of line
score: 2
has answer: http://stackoverflow.com/a/51117151
downvote count: 0
tagged with: javascript
type: UnansweredQuestion
has body: I know I can use the following line to get the offset of the caret (cursor position) relative to the current element: offset = window.getSelection().getRangeAt(0).startOffset; But sometimes the element will contain a lot of text, and the text will wrap. How can I find the offset relative to the nearest wrap (if any)? For instance, given the following text which is all in one element: abcdefghjiklmnopqrstuvwxyz test Suppose it is automatically line-wrapped as follows: abcdefghjiklmnopqrstuvwxyz test ^cursor before this 't' If the cursor is between the "s" and "t" in test, the above code will assign a value of 30 (26 characters on 1st line, plus space, plus t,e, and s.) to offset. But I want it to return 3 in this case: relative to the apparent start of the line, the cursor is only offset 3 ('t', 'e', and 's' come before the cursor.) How can I accomplish this in plain, cross-platform javascript? Update: In case there is an easier way to accomplish what I am trying to do, here it is. I have a table of elements that I am individually turning into content editable blocks. When the down arrow is released and I see that the arrow was moved to the end of the TD, I move the focus (and the content editable) to the next cell down. However, I also need to position the cursor so it is below where it previously was on the previous line. I'm using a monospaced font, so just using the same offset as the previous apparent start of line would be sufficient. Setting the entire table to be contentEditable doesn't work, because the behavior of the arrow keys isn't what I want. For instance, when I press down at the bottom of the field, it moves the cursor to the start of the next field to the right, which makes no sense to me.
type: Question
favorite count: 0
has comment: http://stackoverflow.com/comment/46771947
tagged with: contenteditable
upvote count: 2
answer count: 1
has comment: http://stackoverflow.com/comment/47023325
tagged with: getselection

http://stackoverflow.com/comment/86360132
type: QuestionComment
comment on: http://stackoverflow.com/q/29311154
has text: disposable webmail systems like Inbucket will also help to solve this scenario. You can fetch email by using it's REST API - https://github.com/jhillyerd/inbucket/wiki/REST-API
score: 0
type: Comment

http://stackoverflow.com/q/29370799
tagged with: sinon
has comment: http://stackoverflow.com/comment/46923988
score: 0
tagged with: unit-testing
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46923999
has body: I'm trying to use sinon.spy to check if the play function is being called for a component. The problem is that the spy counter is not updating, even though I've confirmed that my component's function is indeed being called. I've tracked it down to the use of Javascript's call function: handleDone: function(e) { for (var i = 0; i &lt; this.components.length; i++) { if (this.components[i].element === e.target) { if (this.components[i].hasOwnProperty("play")) { // This won't trigger the spy. this.components[i]["play"].call(this.components[i].element); } break; } } } A similar thing happens when swapping call for apply. [UPDATED] Here is the relevant test: var page = document.getElementById("page"), demo = document.getElementById("demo"), playSpy; suiteSetup(function() { playSpy = sinon.spy(demo, "play"); }); suiteTeardown(function() { demo.play.restore(); }); suite("done", function() { test("rise-component-done fired from element with play property", function() { assert(playSpy.notCalled); //true demo.sendDone(); assert(playSpy.calledOnce); //false }); }); And the play and sendDone functions in the demo component: play: function() { console.log("play"); }, sendDone: function() { this.dispatchEvent(new CustomEvent("rise-component-done", { "bubbles": true })); } The page component is registered to listen for this event: this.addEventListener("rise-component-done", this.handleDone); Anyone know of a workaround? Thx.
has answer: http://stackoverflow.com/a/29376017
type: Question
has comment: http://stackoverflow.com/comment/46923016
answer count: 1
tagged with: javascript
has title: Sinon Spy not working with Javascript call or apply
accepted answer: http://stackoverflow.com/a/29376017

http://stackoverflow.com/comment/46815696
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/29310952
has text: you defined your angular script as an IIFE, but never invoked it with `()` at the end. either unwrap it, or invoke it. http://en.wikipedia.org/wiki/Immediately-invoked_function_expression
type: Comment

http://stackoverflow.com/comment/46893491
type: QuestionComment
type: Comment
score: 0
has text: so you are typing one entry at a time into the textbox?
comment on: http://stackoverflow.com/q/29354005

http://stackoverflow.com/q/29270835
has title: mysql query insert record in multiple table in single query at a time
has answer: http://stackoverflow.com/a/29270869
upvote count: 0
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
score: -3
answer count: 2
tagged with: oracle-database
linked to: http://stackoverflow.com/q/3860280
favorite count: 0
has body: How to insert data in different tables using MySql database? like i want to insert cid=1,cname=sahil,bid=12345,amount=12000 customer cid,cname bankb bid,cid,amount
type: Question
has answer: http://stackoverflow.com/a/29271597
tagged with: java
downvote count: 3
tagged with: mysql

http://stackoverflow.com/comment/46896564
comment on: http://stackoverflow.com/q/29352217
score: 0
has text: how? i tried a couple of things, might not be doing it right.
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29299053
tagged with: javascript
score: 0
has title: How to get current link in InnAppBrowser Cordova
upvote count: 1
downvote count: 1
tagged with: url
favorite count: 0
tagged with: cordova
type: AnsweredQuestion
type: Question
has body: Hi i'm working in Xcode v6.1, Cordova v3.7 , jquerymobile v1.4.5 I have a list in which i have urls of external sites. on clicking any site it will open innappbrowser, i want to navigate in innappbrowser page. for instance i am in index page and after clicking or registeration page how can i get the current url from InnAppBrowser. I know the innAppBrowser exit event but couldnt find current url. here the code function innAppInit(_url) { try { app.Log('browser news link=' + _url); if (_url == null) { _url = 'http://apache.org'; } var ref = window.open(encodeURI(_url), '_blank', 'location=no'); console.Dir(ref); ref.addEventListener('loadstart', function(event) { $('.ui-loader').hide(); }); ref.addEventListener('exit', function(event) { alert('exit'); console.Dir(this); // **how to get current url here;** }); } catch (e) { console.log(e); } }
has answer: http://stackoverflow.com/a/29299232
answer count: 1
accepted answer: http://stackoverflow.com/a/29299232

http://stackoverflow.com/a/29261873
score: 2
has body: Make sure the filename and template name you provide in index.html are the same - it's case sensitive -> rename your html file to HtmlPage1.html. You can set the template file in data-ng-include, like so &lt;div data-ng-include="'HtmlPage1.html'"&gt;&lt;/div&gt; Here's a working example: http://jsbin.com/casoza/1/edit
upvote count: 2
answers question: http://stackoverflow.com/q/29261721
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29261721
type: Answer

http://stackoverflow.com/a/29258136
score: 3
upvote count: 3
type: AcceptedAnswer
downvote count: 0
has body: $("#fieldA").keyup(function() { if ($("#fieldA").val().length &gt; 0) { $("#fieldB").attr('disabled', 'disabled'); $("#fieldC").attr('disabled', 'disabled'); } else { $('#fieldB').removeAttr('disabled'); $('#fieldC').removeAttr('disabled'); } }); $("#fieldB").keyup(function() { if ($("#fieldB").val().length &gt; 0) { $("#fieldA").attr('disabled', 'disabled'); $("#fieldC").attr('disabled', 'disabled'); } else { $('#fieldA').removeAttr('disabled'); $('#fieldC').removeAttr('disabled'); } }); $("#fieldC").keyup(function() { if ($("#fieldC").val().length &gt; 0) { $("#fieldB").attr('disabled', 'disabled'); $("#fieldA").attr('disabled', 'disabled'); } else { $('#fieldB').removeAttr('disabled'); $('#fieldA').removeAttr('disabled'); } }); &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt; &lt;input type='text' id='fieldA' /&gt; &lt;input type='text' id='fieldB' /&gt; &lt;input type='text' id='fieldC' /&gt;
answers question: http://stackoverflow.com/q/29253431
type: Answer
accepted answer of: http://stackoverflow.com/q/29253431

http://stackoverflow.com/q/29240801
has answer: http://stackoverflow.com/a/29279753
tagged with: javascript
score: 0
tagged with: user-interface
answer count: 1
tagged with: backbone.js
type: UnansweredQuestion
has title: Raphael JS events not firing
has body: I have a Raphael.js icon that I am trying to attach a click even listener to. When I fire the function automatically ( using closure brackets () ) the console log is successful. However, I cannot fire the event with no automatic execution of the function. Is there an known bug/issue with transforms that puts the rendered path elsewhere on the page? I've poured through comments here, if anyone has seen a similar issue please post. var paper3 = Raphael($("#mail").get(0), 175, 75); var iconPath3 = paper3.path(iconPath); iconPath3.transform("s1.3, t0,5"); iconPath3.attr("fill","fff"); iconPath3.click(function(e) { console.log("Test"); });
tagged with: node.js
has comment: http://stackoverflow.com/comment/46688565
tagged with: raphael
type: Question

angularjs-directive
tags question: http://stackoverflow.com/q/29265706
tag name: angularjs-directive
tags question: http://stackoverflow.com/q/29244790
tags question: http://stackoverflow.com/q/29334166
tags question: http://stackoverflow.com/q/29287550
tags question: http://stackoverflow.com/q/29306325
tags question: http://stackoverflow.com/q/29365713
tags question: http://stackoverflow.com/q/29339293
tags question: http://stackoverflow.com/q/29227104
tags question: http://stackoverflow.com/q/29365222
tags question: http://stackoverflow.com/q/29336453
tags question: http://stackoverflow.com/q/29348764
tags question: http://stackoverflow.com/q/29312586
tags question: http://stackoverflow.com/q/29343592
tags question: http://stackoverflow.com/q/29370922
tags question: http://stackoverflow.com/q/29274525
tags question: http://stackoverflow.com/q/29267624
tags question: http://stackoverflow.com/q/29348640
tags question: http://stackoverflow.com/q/29340263
tags question: http://stackoverflow.com/q/29257958
tags question: http://stackoverflow.com/q/29274129
tags question: http://stackoverflow.com/q/29329017
tags question: http://stackoverflow.com/q/29265310
tags question: http://stackoverflow.com/q/29234544
tags question: http://stackoverflow.com/q/29364957
tags question: http://stackoverflow.com/q/29260040
type: Tag
tags question: http://stackoverflow.com/q/29255709
tags question: http://stackoverflow.com/q/29322103
tags question: http://stackoverflow.com/q/29342587
tags question: http://stackoverflow.com/q/29254359
tags question: http://stackoverflow.com/q/29357821
tags question: http://stackoverflow.com/q/29238039
tags question: http://stackoverflow.com/q/29219770
tags question: http://stackoverflow.com/q/29336340
tags question: http://stackoverflow.com/q/29289400
tags question: http://stackoverflow.com/q/29372659
tags question: http://stackoverflow.com/q/29370511
tags question: http://stackoverflow.com/q/29223121

http://stackoverflow.com/comment/84071743
comment on: http://stackoverflow.com/a/29304811
score: 0
type: Comment
type: AnswerComment
has text: thanks Bergi,it will be helpful for me also.can you provide an example

http://stackoverflow.com/a/29249761
type: Answer
has body: You can try this too On change event of select with id lender_field_code, get the selected item and read it's val with .val() $('.lender_field_code').change(function() { $('#select_val').append($('.lender_field_code :selected').val()); });
answers question: http://stackoverflow.com/q/29249612
score: 0

http://stackoverflow.com/q/29282782
has comment: http://stackoverflow.com/comment/46763492
has body: I have a JavaScript string like dog=1,cat=2,horse=3. The names and values can be anything. I want to remove dog and whatever value is associated with it from the string. So in this example I would end up with cat=2,horse=3. There may not be a entry for dog in the string, and it could be anywhere within the string, e.g. cat=22,dog=17,horse=3 which would end up as cat=22,horse=3. The names and values will just be alphanumeric with no special characters like quotes and equals signs within them. What is the best way of going about this in JavaScript?
has answer: http://stackoverflow.com/a/29283113
possible better answer: http://stackoverflow.com/a/29283113
has comment: http://stackoverflow.com/comment/46763645
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46763451
has comment: http://stackoverflow.com/comment/46763741
has comment: http://stackoverflow.com/comment/46763795
has answer: http://stackoverflow.com/a/29283147
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/46763576
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/46763356
accepted answer: http://stackoverflow.com/a/29283147
has title: Remove value from name-value pair string in JavaScript

http://stackoverflow.com/comment/46806121
type: Comment
type: QuestionComment
has text: @FelixKling That makes sense. How can I change this so that this becomes the global variable?
comment on: http://stackoverflow.com/q/29305347
score: 0

windows-phone-8
tags question: http://stackoverflow.com/q/29269637
tags question: http://stackoverflow.com/q/29259104
tags question: http://stackoverflow.com/q/29352208
tag name: windows-phone-8
type: Tag
tags question: http://stackoverflow.com/q/29369866

http://stackoverflow.com/comment/46894334
type: AnswerComment
type: Comment
has text: It's not necessary to pass anything to `commonFunctionToUpdateDD` explicitly. If the handler is attached with `....on('keyup', commonFunctionToUpdateDD)`, and the handler is written `function commonFunctionToUpdateDD(e) {...}`, then the two would-be parameters can both be derived from `e`.
comment on: http://stackoverflow.com/a/29346885
score: 0

http://stackoverflow.com/comment/46766981
has text: When I chose one of options, I would like to get from only ID. How i can do this?
score: 0
comment on: http://stackoverflow.com/q/29284563
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46736655
comment on: http://stackoverflow.com/q/29267297
score: 0
type: QuestionComment
has text: @JonathanKuhn Looking forward to get your help.Thanks
type: Comment

http://stackoverflow.com/a/29306810
upvote count: 0
has body: I'd imagine you can attach en event listener to the slider to see if you are mousing over... For example, Using jQuery... $("#slider").mouseenter(function(){ // halt the fullpage JS and the }) $("#slider").mouseleave(function(){ // resume the fullpage JS and the }) Maybe this will point you in the direction, but is there any documentation regarding adding a slider with fullpage.js?
score: -1
has comment: http://stackoverflow.com/comment/46808124
has comment: http://stackoverflow.com/comment/46808204
type: Answer
downvote count: 1
answers question: http://stackoverflow.com/q/29306622

http://stackoverflow.com/q/29235732
downvote count: 0
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/46808057
has body: I am trying to draw a polyline on CesiumJs globe.This polyline actually makes a circle. Here is currentLine is an array. like [x1,y1,z1,x2,y2,z2....] Whenever the length is greater than 549 or in other sense when the points in the polyline exceeds 183 the cesium modules gives the error: An error occurred while rendering. Rendering has stopped. TypeError: Cannot read property 'x' of undefined TypeError: Cannot read property 'x' of undefined at Function.i.subtract (/include/Cesium-1.7.1/Build/Cesium/Workers/createGeometry.js:73:6359) at Function.v.createGeometry (/include/Cesium-1.7.1/Build/Cesium/Workers/createPolylineGeometry.js:60:28125) at n (include/Cesium-1.7.1/Build/Cesium/Workers/createPolylineGeometry.js:60:29743) at a (include/Cesium-1.7.1/Build/Cesium/Workers/createGeometry.js:76:31234) at DedicatedWorkerGlobalScope. (include/Cesium-1.7.1/Build/Cesium/Workers/createGeometry.js:76:30500) This is the code var newLine=viewer.entities.add({ id:lineId, name : getModelName(id), polyline:{ positions : Cesium.Cartesian3.fromDegreesArrayHeights(currentLine), material : new Cesium.Color() } }); Kindly help me how to solve this problem :) Thanks I was wondering if there are any duplicates so i removed all the duplicates but then the array was no more of the multiple of 3 and it was not accepted as a valid polyline :/
tagged with: google-earth-plugin
answer count: 0
has comment: http://stackoverflow.com/comment/46868859
type: UnansweredQuestion
upvote count: 1
tagged with: maps
type: Question
score: 1
tagged with: cesiumjs
has title: cesiumjs polyline length issue

http://stackoverflow.com/a/29234091
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46675440
has body: If you're using Angular you could try console.dir(angular.copy(x));. This will print a copy of the object when it's logged so that it doesn't later display any mutations that occurred. See this JSFiddle. Alternatively you could do console.log(JSON.stringify(x, null, 2));
has comment: http://stackoverflow.com/comment/46675806
type: Answer
accepted answer of: http://stackoverflow.com/q/29233540
answers question: http://stackoverflow.com/q/29233540
upvote count: 1
has comment: http://stackoverflow.com/comment/46675236
score: 1

http://stackoverflow.com/comment/46816072
has text: won't work without `ng-model` http://jsfiddle.net/5DMjt/1006/ See docs
comment on: http://stackoverflow.com/q/29310996
score: 2
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46883751
type: AnswerComment
comment on: http://stackoverflow.com/a/29348808
has text: thanks, and how i can do for get the correct rol, or in what order cand i put that?
type: Comment
score: 0

http://stackoverflow.com/q/29286924
has comment: http://stackoverflow.com/comment/46771194
linked to: http://stackoverflow.com/q/1642447
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29287182
favorite count: 0
has body: I have a web page where users can upload pdfs. When users have uploaded for instance 3 pdfs, then three textarea and buttons are generated so that they can submit titles for the pdfs. My problem is I do not know how to get access to the text in the textarea of these dynamically generated texareas as i hope to also assign those titles to the uploaded pdfs. When any of the button are pressed, my submitTitle() function has no idea which button was pressed, and I do not know how to figure this one out. I have a scope problem and don't know how to sort this. Please can someone advise? Here is my code thus far: function completeHandler(event){ // convert JSON text to a JSON object var jsonObject = JSON.parse(event.target.responseText); _("status").innerHTML = jsonObject.succeed[0].name; // Creating a form dynamically. // Allow user to copy/paste the title of the pdf. var succeedList = jsonObject.succeed; console.log(succeedList); for( i=0; i&lt;succeedList.length; i++){ var div_forTextArea = document.createElement("DIV"); div_forTextArea.setAttribute('class', 'dyn_div'); var heading = document.createElement("h6"); heading.innerHTML = jsonObject.succeed[i].name; div_forTextArea.appendChild(heading); var textarea = document.createElement("TEXTAREA"); var txtarea_id = 'txt_'+i; textarea.innerHTML="Enter title of pdf here..."; textarea.setAttribute('id', 'txtArea_'+i); div_forTextArea.appendChild(textarea); console.log(textarea); var subm_btn = document.createElement("INPUT"); subm_btn.setAttribute('type','submit'); subm_btn.setAttribute('id', 'btn_'+i); subm_btn.setAttribute('value', "submit title"); subm_btn.setAttribute('onclick', 'submitTitle()'); console.log(subm_btn); div_forTextArea.appendChild(subm_btn); document.getElementById('out_box').appendChild(div_forTextArea); } } function submitTitle(){ //????? }
upvote count: 1
type: AnsweredQuestion
has title: How to access the text content of textarea that was generated dynamically with javascript?
score: 1
has comment: http://stackoverflow.com/comment/46771545
type: Question
answer count: 2
downvote count: 0
linked to: http://stackoverflow.com/q/4825295
tagged with: javascript
possible better answer: http://stackoverflow.com/a/29287182
has answer: http://stackoverflow.com/a/29287258
accepted answer: http://stackoverflow.com/a/29287258

http://stackoverflow.com/comment/46850317
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29330354
type: AnswerComment
has text: I just got it.. no width and height on the div element! Thank you!!

http://stackoverflow.com/a/29344784
answers question: http://stackoverflow.com/q/29344696
score: -1
has body: you can achieve this by floating images to left div#inner-wrapper img { float: left; } long story short your problem is not about javascript as you mentioned. you can achieve what you want with different css tricks
downvote count: 1
type: Answer
upvote count: 0

http://stackoverflow.com/q/29338259
has title: how can you integrate GoSquared analytics with Telescope
has comment: http://stackoverflow.com/comment/47308084
has comment: http://stackoverflow.com/comment/47377558
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47308057
tagged with: analytics
has comment: http://stackoverflow.com/comment/47336171
answer count: 0
has comment: http://stackoverflow.com/comment/47377584
tagged with: telescope
tagged with: meteor
type: Question
has body: I've set up a basic telescope server. All is working very nicely. I'd like to integrate with my GoSquared analytics, but all attempts have failed the "Check Integration" step of GoSquared. What I've tried: I've tried adding the script to both the Footer Code and Extra Code sections of the Telescope settings. Neither passed GoSquared's test. Since the code is compressed/mangled it's tough to tell if it even gets injected at all or what the problem might be. I've also tried setting the Meteor setting "goSquaredId" to my ID. I think Meteor has support for this even though it's not in the Telescope settings. But this did not work either. I've attempted doing some of my own tests with other code, but the giant block of opaque mangled JS that Meteor produces definitely makes it a challenge. Is there an easier way?
score: 0
has comment: http://stackoverflow.com/comment/47272049

http://stackoverflow.com/comment/46989378
type: Comment
type: QuestionComment
has text: When **the whole browser crashes** and not just your Javascript program, the bug is in the browser, not (just) in your code. You should report it to the developers of your browser. When you want a workaround until it is fixed, please post **which web browser** you are using.
comment on: http://stackoverflow.com/q/29352106
score: 0

http://stackoverflow.com/q/29312598
answer count: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/29313170
tagged with: http://stackoverflow.com/tag/html
has body: Here is my project: http://jsfiddle.net/p42q12cm/1/ /* HERE IS MY CODE FOR lazy-load --&gt; */ function load(img) { img.fadeOut(0, function() { img.fadeIn(1000); }); } $('.lazyload-thumbnail').lazyload({load: load}); $('.lazyload-youtube').lazyload({trigger: 'mouseover'}); /* FOR VIDEOS --&gt; */ var figure = $("figure"); var vid = $("video"); var cover = $(".img-cover"); $(figure).hover(function() { $(cover).addClass("img-hide"); }, function() { $(cover).removeClass("img-hide"); } ); [].forEach.call(vid, function (item) { item.addEventListener('mouseover', hoverVideo, false); item.addEventListener('mouseout', hideVideo, false); }); function hoverVideo(e) { this.play(); } function hideVideo(e) { this.pause(); } I need to stop playing video on mouseout, and play it again on hover. Theare is a problem with Lazy-load-any and html comments that it uses. jQuery cant see code with it, i guess. Also, this video playing not cause of hover -> video autoplay
tagged with: video
accepted answer: http://stackoverflow.com/a/29313170
type: Question
has title: Stop playing HTML5 video on mouseout (lazy-load)
type: AnsweredQuestion
tagged with: javascript
score: 0

http://stackoverflow.com/q/29360042
favorite count: 0
has answer: http://stackoverflow.com/a/29361141
tagged with: d3.js
has answer: http://stackoverflow.com/a/30466759
type: AnsweredQuestion
has title: How to create stacked row chart with one row with dc.js?
has answer: http://stackoverflow.com/a/30409903
tagged with: dc.js
type: Question
score: 9
tagged with: crossfilter
upvote count: 9
downvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/30466759
answer count: 3
has body: On the DC.js github, Stock Market Selection Strategy by Lon Riesberg is listed as an example of using the dc.js library. Lon was able to create a stacked row chart and display it as a single row. I'd like to be able to accomplish the same thing. I've only been able to figure out how create a row chart, as shown in my codepen, and below. HTML &lt;script src="https://rawgit.com/mbostock/d3/master/d3.js" charset="utf-8"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="https://rawgithub.com/NickQiZhu/dc.js/master/web/js/crossfilter.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="https://rawgit.com/dc-js/dc.js/master/dc.js" &gt;&lt;/script&gt; &lt;div id="rowChart"&gt;&lt;/div&gt; Javascript items = [ {Id: "01", Name: "Red", Price: "1.00", Quantity: "1",TimeStamp:111}, {Id: "02", Name: "White", Price: "10.00", Quantity: "1",TimeStamp:222}, {Id: "04", Name: "Blue", Price: "9.50", Quantity: "10",TimeStamp:434}, {Id: "03", Name: "Red", Price: "9.00", Quantity: "2",TimeStamp:545}, {Id: "06", Name: "Red", Price: "100.00", Quantity: "2",TimeStamp:676}, {Id: "05",Name: "Blue", Price: "1.20", Quantity: "2",TimeStamp:777} ]; var ndx = crossfilter(items); var Dim = ndx.dimension(function (d) {return d.Name;}) var RowBarChart1 = dc.rowChart("#rowChart") RowBarChart1 .width(250).height(500) .margins({top: 20, left: 15, right: 10, bottom: 20}) .dimension(Dim) .group(Dim.group().reduceCount()) .elasticX(true) .label(function (d) {return d.key + " " + d.value;}) .ordering(function(d) { return -d.value }) .xAxis().tickFormat(function(v){return v}).ticks(3); dc.renderAll(); How would I make this a stacked row chart where each section is 'Red','White,' or 'Blue' and is displayed in one row? My goal is to have a working example that I can build off of. The answer thus far has helped, but I still haven't been able to build this.
possible better answer: http://stackoverflow.com/a/29361141

http://stackoverflow.com/comment/46826322
type: Comment
has text: It won't work if the animation is not complete (for example - click quickly on boxes 1,2,1)
type: AnswerComment
comment on: http://stackoverflow.com/a/29317036
score: 0

http://stackoverflow.com/comment/46795372
score: 0
type: Comment
type: QuestionComment
has text: I need I way to wait until I'll receive tha **JSON** object from Token
comment on: http://stackoverflow.com/q/29297873

http://stackoverflow.com/q/29363067
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
upvote count: 6
has comment: http://stackoverflow.com/comment/46909902
has answer: http://stackoverflow.com/a/49916847
has comment: http://stackoverflow.com/comment/46909739
has body: I am creating a table row dynamically. Each row is having onclick event. When I click on that table row I want to pass row object to a function but my problem is, while passing that object, I am getting [object object] string. So I am not able to use that object in function. Please give some solution thanks in advance. This is my code: var row; $.each(mydata, function(i,data){ row+=' data.name data.age ; }); $("#myTable").append(row);
score: 6
has comment: http://stackoverflow.com/comment/46910020
has comment: http://stackoverflow.com/comment/46910107
type: Question
has answer: http://stackoverflow.com/a/37204656
tagged with: javascript
has title: how to pass object in inline onclick event in dynamically creating elements
answer count: 3
has comment: http://stackoverflow.com/comment/46909877
has answer: http://stackoverflow.com/a/29363142
downvote count: 0

http://stackoverflow.com/q/29240901
has answer: http://stackoverflow.com/a/29244467
tagged with: gridview
has comment: http://stackoverflow.com/comment/46720297
type: AnsweredQuestion
downvote count: 0
has comment: http://stackoverflow.com/comment/46689591
score: 1
type: Question
tagged with: arrays
tagged with: javascript
has title: ExtJS Grid not refreshing after store update
has answer: http://stackoverflow.com/a/29259070
tagged with: extjs
accepted answer: http://stackoverflow.com/a/29259070
has answer: http://stackoverflow.com/a/29248369
has comment: http://stackoverflow.com/comment/46689561
answer count: 3
upvote count: 1
possible better answer: http://stackoverflow.com/a/29244467
has body: I have a grid and a store. The store gets populated with some data - country - while the rest is empty. Once I receive more inputs I fill up the store with the inputs. Assume that I have only 1 country in the store after the initial load. Store: feedTheGrid = new Ext.data.JsonStore({ autoDestroy : true, autoSave : false, autoLoad : true, idProperty: 'country', root: 'root', totalProperty : 'totalcount', fields : ['country', 'towns'], proxy : new Ext.data.HttpProxy(new Ext.data.Connection({ url : "country/searchCountries.action", method : 'POST', timeout : 300000 })) }); So the user inputs towns. I save a town in the array towns using push(): listeners: { 'change': function() { if (feedTheGrid.getAt(0).towns === undefined) { feedTheGrid.getAt(0).towns = []; } feedTheGrid.getAt(0).towns.push(this.getValue()); gridMonster.getView().refresh(); } } I want the grid to update every time a new town is put in. This is part of the column model I use for gridMonster: { header: "Town 1", width: 150, dataIndex: 'towns', renderer: function(val) { if (val[0] != undefined) { return val[0]; } }, sortable: true}, { header: "Town 2", width: 150, dataIndex: 'towns', renderer: function(val) { if (val[1] != undefined) { return val[1]; } }, sortable: true}, { header: "Town 3", width: 150, dataIndex: 'towns', renderer: function(val) { if (val[2] != undefined) { return val[2]; } }, sortable: true} The issue is that after a town is put in the grid never refreshes. Some things I noticed so far: The store gets updated with the new value when I check through Firebug. Also it seems the val that is given in renderer is always empty String, even after I push the new value into the array and refresh the grid view. I am using ExtJS 3.3.1 I know its old so I am open to solutions that would work for 4.0+ and I can try to apply it to 3.3.1. EDIT: Found the issue Very subtle problem, spent hours trying to find what is the problem only to find out I was looking in the wrong place. The issue was in this l…
favorite count: 0
has comment: http://stackoverflow.com/comment/46690885

http://stackoverflow.com/a/29312803
has body: Here is a relatively short approach: Just add an event listener for the input event (or keyup/keydown), and then use some regex. In the example directly below, all whitespace is initially removed using .replace(/\s/g, ''), and then .replace(/(\d{5})/g, '$1 ') essentially adds a space after every 5th character. The reason all the whitespace is removed is so that there is always a space between every 5th character (even if you go back and edit previous characters). document.getElementById('target').addEventListener('input', function (e) { e.target.value = e.target.value.replace(/\s/g, '').replace(/(\d{5})/g, '$1 ').trim(); }); &lt;input id="target" type="text"/&gt; It seems like the only caveat with the approach above is that the caret's position is lost when editing previous characters. If you want to prevent this, retrieve the caret's current position by accessing the selectionEnd property and then set the caret's position after the regex formatting has been applied. document.getElementById('target').addEventListener('input', function (e) { var target = e.target, position = target.selectionEnd, length = target.value.length; target.value = target.value.replace(/\s/g, '').replace(/(\d{5})/g, '$1 ').trim(); target.selectionEnd = position += ((target.value.charAt(position - 1) === ' ' &amp;&amp; target.value.charAt(length - 1) === ' ' &amp;&amp; length !== target.value.length) ? 1 : 0); }); &lt;input id="target" type="text"/&gt; You will notice that there is a slight issue when the character after the caret is a space (because the space wasn't accounted for when initially retrieving the caret's position to begin with). To fix this, the position is manually incremented if the succeeding character is a space (assuming a space was actually added - which is determined by comparing the length before and after replacing the characters).
has comment: http://stackoverflow.com/comment/46820817
score: 10
upvote count: 10
has comment: http://stackoverflow.com/comment/46820804
answers question: http://stackoverflow.com/q/29312719
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29312719
has comment: http://stackoverflow.com/comment/46860672
has comment: http://stackoverflow.com/comment/46819578
has comment: http://stackoverflow.com/comment/46819041
type: Answer
has comment: http://stackoverflow.com/comment/46819009
has comment: http://stackoverflow.com/comment/46834530
has comment: http://stackoverflow.com/comment/46836706

http://stackoverflow.com/comment/126968202
comment on: http://stackoverflow.com/q/29333017
score: 0
has text: @Quasimodo'sclone if you had reference counting, why would you need garbage collection?
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46767329
type: Comment
has text: Oh I see, I've updated my answer another time to give you an idea of a solution. Do you want to avoid having two times the same picture or it's not a problem?
type: AnswerComment
comment on: http://stackoverflow.com/a/29277963
score: 0

http://stackoverflow.com/comment/46865956
comment on: http://stackoverflow.com/q/29339142
score: 0
type: Comment
type: QuestionComment
has text: Can you post the error message? Thanks!

http://stackoverflow.com/a/29257314
accepted answer of: http://stackoverflow.com/q/29247978
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: chrome.storage.local is just a key:value store. It doesn't provide any way to use a URL to access the values. If you need to store an image in a place where a URL can reference it, you can do one of two things: If you want to keep it in chrome.storage, and just make a temporary URL (which will be lost when you close the app), you can read the data into an ArrayBuffer, and construct a Blob object from it. You can get a URL from a Blob, but it just represents a handle to an object in memory, so don't expect that you can save that URL and use it forever. The memory will be reclaimed when the app is closed, and old Blob URLs won't be valid next time. If you want it stored somewhere permanently, so that you can save the URL and use it in the future, then you can use the File API to write it to the filesystem. File objects have a .toURL method that will give you back a usable URL. That URL will point to an actual file, and it will be valid even after you restart the app (and until you choose to delete the file.)
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/29247978

http://stackoverflow.com/a/29339398
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/46867097
has comment: http://stackoverflow.com/comment/46866991
answers question: http://stackoverflow.com/q/29339214
has body: you can try: options = jQuery(this).attr('data-settings'); if this doen't work try to debug it with: console.log(jQuery(this)); and you will be able to trace the problem
has comment: http://stackoverflow.com/comment/46866893
has comment: http://stackoverflow.com/comment/46867936
has comment: http://stackoverflow.com/comment/46866925
has comment: http://stackoverflow.com/comment/46868208

http://stackoverflow.com/comment/46741334
comment on: http://stackoverflow.com/q/29270059
score: 0
type: Comment
has text: @RobG - yup, left my quotes out. Should read `top: '+='+math`. Also, the OP left out `()` in `Math.round(Math.random * 5);`. Should be `Math.round(Math.random() * 5);`
type: QuestionComment

http://stackoverflow.com/comment/46707054
score: 0
type: Comment
type: QuestionComment
has text: And the question.....?
comment on: http://stackoverflow.com/q/29251586

http://stackoverflow.com/a/29245062
has comment: http://stackoverflow.com/comment/46695970
has body: There are 3 separate problems here. The main anchors href: Imagine you have this Go to section one Go to section two this is section one this is section two When you click the anchors, the document will move to the respective "id". So if you are in the same page, you don't need to add "host.com/#section_one". But you could do it. Check this link https://docs.djangoproject.com/en/1.7/#the-view-layer It will take you straight to that id : the-view-layer If you check the source code, you'll find an element with that id right on top where it landed: If you were on that page already, a simple The view Layer would be sufficient to take you there. The forward slash: The forward slash before the # works because there is a url rewriting of some sort.. The same way that, if you have your_host.com/index.php you can reach the same page by simply writing your_host.com/ this works with index pages Now if that page has a section_one, you could go straight to it by using your_host.com/index.php#section_one or your_host.com/#section_one You could even put that in an anchor href on an external page Go to my host index page, on section one Now lets add something after the # https://docs.djangoproject.com/en/1.7/#the-view-layer/fsdfdgd/fsdgdf Notice that it goes to the same page, even after adding those extra bits after the #. The server cannot read anything after the hash, so it loads the correct page, but this time, the browser wont take you to that section, since there's is no id named "the-view-layer/fsdfdgd/fsdgdf" So the problem with the forward slash is simple - either you use a index.php or you have to use url rewriting or a framework that does that for you by naming the urls eg: youhost.com/users/list/ The secondary anchors href: So sections will have id's like section_one/slide_one I made this really quick and you might have to tweak it if you have some sort of js slider plugin, but you get the point: 1-1 1-2 2-1 2-2 1.1 1.2 2.1 2.2 This example only uses css, so if you need …
upvote count: 3
answers question: http://stackoverflow.com/q/29222634
has comment: http://stackoverflow.com/comment/46727612
type: Answer
score: 3
downvote count: 0

http://stackoverflow.com/comment/46693062
type: QuestionComment
comment on: http://stackoverflow.com/q/29241536
score: 0
type: Comment
has text: There is a button, and the button state would still allow submission because $scope.formname.$invalid, and $scope.formname.$valid will not be correct when in the broken condition.

http://stackoverflow.com/comment/55153988
type: AnswerComment
has text: what is a matcherFn or matcher?
type: Comment
comment on: http://stackoverflow.com/a/29322081
score: 3

http://stackoverflow.com/comment/46885428
type: QuestionComment
type: Comment
has text: I'm sorry for the confusion, it does delete consistently 20 images even though the query returns 1000 objects. http://imgur.com/NiEOiNB I'm a complete n00b in javascript (no experience at all in fact, I just need it for this project). What do you mean with before or afterDelete hooks?
score: 0
comment on: http://stackoverflow.com/q/29344120

http://stackoverflow.com/a/29286721
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/46771001
has body: If you are using jQuery, you could just do $('#target').change();. So: $(document).ready(function () { $('#target').change(); });
downvote count: 0
has comment: http://stackoverflow.com/comment/46770898
has comment: http://stackoverflow.com/comment/46771227
answers question: http://stackoverflow.com/q/29286651
type: Answer

http://stackoverflow.com/a/29344288
has comment: http://stackoverflow.com/comment/46906572
score: 0
has body: It sounds like you can make your getMethod issue only one server call. .factory("getService", function () { var getAll; return { getMethod: function () { if (!getAll) { getAll = localResource.getAll(); } return getAll; }; }; });
answers question: http://stackoverflow.com/q/29343592
type: Answer

http://stackoverflow.com/comment/46918856
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29368415
has text: @RoryMcCrossan I removed and run it but not get the result.

http://stackoverflow.com/a/29268577
type: Answer
has comment: http://stackoverflow.com/comment/46740736
has comment: http://stackoverflow.com/comment/46739799
has comment: http://stackoverflow.com/comment/46770154
answers question: http://stackoverflow.com/q/29265720
has comment: http://stackoverflow.com/comment/46770215
has comment: http://stackoverflow.com/comment/46770636
has comment: http://stackoverflow.com/comment/46769136
has comment: http://stackoverflow.com/comment/46771065
score: 0
has body: Im doing it that way now .theme(@theme) {&amp;{.compile(@theme);}} usage: .theme(main) // will compile all mixins in .compile() for given theme inside the compiler mixin I do this .compile(@theme) {&amp;{ @base-color: 'theme-@{theme}-base-color'; .another-module(@@base-color); }} In that way I have seperated the compiling proccess completely form the assigning of themes. works like charm here. Sure it's a lot of typing to reassign all the colors, but god bless multiedit. And you just do it once for each module so who cares after all. Hope this helps someone else
has comment: http://stackoverflow.com/comment/46739509

http://stackoverflow.com/a/29453573
answers question: http://stackoverflow.com/q/29337663
has body: I never got the Lunr plugin working, but I think I've come up with a better, simpler solution. What I ended up doing instead is a simple HTML form that does a custom search of my website on DuckDuckGo -- though I'm sure you could easily adjust this to work on whatever search engine you prefer. <!-- DuckDuckGo has a variety of parameters you can set to customize the look and feel of the search results page. See <https://duckduckgo.com/params> for a full list. For example, this will set the page to use DuckDuckGo's dark theme. --> Go
score: 0
type: Answer

http://stackoverflow.com/a/69191297
score: 0
answers question: http://stackoverflow.com/q/29299632
type: Answer
has body: According to Francisco Valles answer i created a bundle to easily include it your web-project: https://github.com/geraphl/javascript-html-to-rtf-browser Then you can convert html to microsofts rtf format by adding var htmlToRtfLocal = new window.htmlToRtf(); var rtfContent = htmlToRtfLocal.convertHtmlToRtf(htmlContent); to you javascript.

http://stackoverflow.com/q/29285808
has answer: http://stackoverflow.com/a/29286424
has comment: http://stackoverflow.com/comment/46769378
has comment: http://stackoverflow.com/comment/46769430
has comment: http://stackoverflow.com/comment/46769282
type: Question
has answer: http://stackoverflow.com/a/29285858
tagged with: javascript
has answer: http://stackoverflow.com/a/41518143
tagged with: jquery
score: 0
has body: I've been facing some problems in my website. I have a lot of js files in my web server, but the bootstrap.js file does not work. Here is the link to the ressource and it also blocks AddThis sharing tools. I have no Idea how this is happening! here are the main js which I'm using: And here is the website link Thanks for your time!
answer count: 3
linked to: http://stackoverflow.com/q/9313612
has comment: http://stackoverflow.com/comment/46769421
tagged with: twitter-bootstrap
type: UnansweredQuestion
has title: Bootstrap Javascript not working on live website
has comment: http://stackoverflow.com/comment/46769116
has comment: http://stackoverflow.com/comment/46769148
has comment: http://stackoverflow.com/comment/46769192

http://stackoverflow.com/q/29370007
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46921733
has answer: http://stackoverflow.com/a/60506040
answer count: 2
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/29370095
possible better answer: http://stackoverflow.com/a/60506040
favorite count: 0
has title: regex look-behind: Invalid regular expression: /(?<=\.)\S+$/: Invalid group
tagged with: regex
has body: I have the following regexp (?&lt;=\.)\S+$ used to extract the extension (whatever comes after the last dot) of a string. regex101.com seems to accept my regexp: the string extension is correctly matched. As soon as I move it into a javascript script and try to test it against a string I get this error: Invalid regular expression: /(?&lt;=\.)\S+$/: Invalid group I get the same error also with regex101 auto generated code: var re = /(?&lt;=\.)\S+$/; var str = 'test.txt'; var m; if ((m = re.exec(str)) !== null) { if (m.index === re.lastIndex) { re.lastIndex++; } // View your result using the m-variable. // eg m[0] etc. } see fiddle HERE Any hint?
upvote count: 2
accepted answer: http://stackoverflow.com/a/29370095
type: Question
score: 2

http://stackoverflow.com/comment/46857701
comment on: http://stackoverflow.com/a/29334459
has text: thanks for explaining why my solution was not working, I need tho think more my mark up.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/29261087
has body: I'm not too experienced with JS but couldn't you just offset the pin so it sits on the correct spot?
type: Answer
answers question: http://stackoverflow.com/q/29261031
has comment: http://stackoverflow.com/comment/46887161
score: 0

http://stackoverflow.com/q/29351262
has comment: http://stackoverflow.com/comment/46888205
tagged with: underscore.js
tagged with: http://stackoverflow.com/tag/json
type: Question
has comment: http://stackoverflow.com/comment/46888583
tagged with: arrays
tagged with: javascript
has comment: http://stackoverflow.com/comment/46887901
score: 0
has body: In JavaScript, I have the following array of json objects and I would like to change those ticked with 'false' to 'true'. I am currently using the _.map() function in Underscore.js, is there a more efficient way of selecting the 'false' elements and only modify them? var arrOfJson = [ {"name" : "Tom", "ticked" : false}, {"name" : "John", "ticked" : true}, {"name" : "Patrick", "ticked" : false}, {"name" : "Dave", "ticked" : true} ]; _.map(arrOfJson, function(entry){ entry.ticked = false; return entry; });
has title: More efficient way of modifying selected elements in an array of json using Underscore.js
answer count: 1
has answer: http://stackoverflow.com/a/29355534
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46888553

http://stackoverflow.com/comment/46716327
type: Comment
type: QuestionComment
has text: Hi there - we need a wider picture of the problem. So far, it seems that original data should be properly normalised.
comment on: http://stackoverflow.com/q/29256700
score: 0

http://stackoverflow.com/q/29283507
tagged with: jquery
favorite count: 0
answer count: 3
has comment: http://stackoverflow.com/comment/46764947
has title: Check if element can be scrolled to the left or right
tagged with: css
has body: I would like to display indicators for a certain div to show that it can be scrolled right or left depending on its state. To do so I would need to know if element can be scrolled to respective positions, e.g. if there is content to be seen on the right show indicator and after scrolling show another indicator on the left to indicate that users can now scroll there as well. I have a simple setup like this one: https://jsfiddle.net/udv8u596/ (You can scroll horizontally, scrollbar is hidden intentionally) HTML: &lt;div class="scroll-container"&gt; &lt;div class="scroll-content"&gt; Scroll Me Horizontally Scroll Me Horizontally Scroll Me Horizontally Scroll Me Horizontally Scroll Me Horizontally Scroll Me Horizontally Scroll Me Horizontally &lt;/div&gt; &lt;/div&gt; CSS: .scroll-container { width: 80%; margin: 0 auto; background: cyan; overflow-y: hidden; height: 36px; } .scroll-content { padding: 10px 0; height: 50px; white-space: nowrap; overflow-x: scroll; overflow-y: hidden; }
has comment: http://stackoverflow.com/comment/46765033
upvote count: 2
has answer: http://stackoverflow.com/a/29283826
has comment: http://stackoverflow.com/comment/46765284
has answer: http://stackoverflow.com/a/29284142
possible better answer: http://stackoverflow.com/a/29284361
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29284361
has comment: http://stackoverflow.com/comment/46764827
type: Question
score: 2
accepted answer: http://stackoverflow.com/a/29284142
downvote count: 0
tagged with: javascript

http://stackoverflow.com/a/29291481
upvote count: 1
type: AcceptedAnswer
has body: Those aren't multiple statements, they're just elements of an array. You can simply add to the array in the $.each() loop: function goMap3(data) { var sublayers = []; $.each(data, function(i, attr_value) { sublayers.push({ sql: "SELECT cartodb_id, the_geom_webmercator FROM mytable where attribute='" + attr_value + "'", cartocss: "#location_fusion_table {marker-fill:#1d5492;marker-width:5;marker-line-width: 0.3;marker-line-color:#fff;marker-allow-overlap: true;" }); }); var layerSource = { user_name: 'me', type: 'cartodb', sublayers: sublayers }; cartodb.createLayer(map_object, layerSource, options) .addTo(map_object); } Then you can call geoMap3(data) from the AJAX success function.
type: Answer
answers question: http://stackoverflow.com/q/29291394
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/46780325
accepted answer of: http://stackoverflow.com/q/29291394
has comment: http://stackoverflow.com/comment/46780381

http://stackoverflow.com/a/29289814
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46788613
accepted answer of: http://stackoverflow.com/q/29289579
type: Answer
answers question: http://stackoverflow.com/q/29289579
score: 0
has body: I think the actual issue is that the original tablesorter (v2.0.5) does not perform an alphanumeric sort. I made a fork of tablesorter with lots of improvements. It does perform an alphanumeric sort. I created a demo from the HTML you provided, but it didn't have R100 or R70 in it, so I added them... $(function () { $("#BrokerTable").tablesorter({ sortList: [[1,0]], theme: 'blue' }); });
has comment: http://stackoverflow.com/comment/46809667

http://stackoverflow.com/q/29266240
answer count: 1
downvote count: 0
tagged with: jquery
favorite count: 0
tagged with: ajax
type: UnansweredQuestion
score: 1
has body: Read before posting as duplicate. I'm currently making a website that simulates the stock market. Every second, it makes an ajax request to http://dev.markitondemand.com/Api/v2/Quote/jsonp to update stock prices. I use http GET and a jsonp request, through jquery (standard random callback). Most of the time, it works. Sometimes, however, it stops working and I get error 101 net::ERR_CONNECTION_RESET, and, after a while, starts working again. This is different from some other issues, because it works most of the time. I am using google chrome on this, though.
upvote count: 1
tagged with: google-chrome
type: Question
tagged with: jsonp
has answer: http://stackoverflow.com/a/29266313
tagged with: javascript
has comment: http://stackoverflow.com/comment/139978527
has title: Random net::ERR_CONNECTION_RESET issues

http://stackoverflow.com/comment/46720798
has text: No. Not yet. At least not that is confirmed.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29259222
score: 0

http://stackoverflow.com/comment/46887037
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29350319
type: AnswerComment
has text: That's why I pointed you to Node.replaceChild() which is native JS. The rest should be easy to follow.

http://stackoverflow.com/comment/46888898
has text: Actually the native JavaScript `Aarray` object already has a `.map` method.
type: AnswerComment
type: Comment
score: 2
comment on: http://stackoverflow.com/a/29351819

http://stackoverflow.com/a/29350001
type: Answer
has comment: http://stackoverflow.com/comment/46885766
downvote count: 0
score: 1
has body: In your context iterate with each in jquery $('.full-text-panel').each(function() { if($(this).find('a.body-button').length &gt; 0){ $(this).css("background", "red"); } else{ $(this).css("background", "blue"); } });
upvote count: 1
accepted answer of: http://stackoverflow.com/q/29349689
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29349689

http://stackoverflow.com/comment/47089752
type: Comment
comment on: http://stackoverflow.com/a/29312874
has text: The documentation is a killer!
score: 0
type: AnswerComment

http://stackoverflow.com/a/29234455
type: Answer
has comment: http://stackoverflow.com/comment/46675104
has comment: http://stackoverflow.com/comment/46706499
has body: You can track the position of the cursor (because the cursor will not be immediately over any .child element, so binding the click event to it is useless), and then retrieve a list of .child elements that are to the left of this coordinate. Get the last .child element that satisfy this criterea, append new element behind it. Also, you should use .on() for the click event binding for .child, because newly added elements will not have the click event registered (because with your existing code, you are binding the click event at runtime, where newly added elements are not present on the page). $('.child').on('click', function(e) { e.stopImmediatePropagation(); $(".debug").removeClass("debug"); $(this).toggleClass("debug"); }) $("#parent").click(function(e) { e.stopImmediatePropagation(); $(".debug").removeClass("debug"); $(this).toggleClass("debug"); // Get mouse position along x-axis var xPos = e.pageX, yPos = e.pageY; // Get x-axis offset of child // Return array of child elements that is to the left of mouseclick // and get the last child, append new element after it var $prevChild = $('.child').filter(function() { return ($(this).offset().left < xPos && $(this).offset().top < yPos) }), $content = $('New child'); // Additional logic from @AlexanderGladysh if ($prevChild.length > 0) { $content.insertAfter($prevChild.last()); } else { $(this).prepend($content); } }) See fiddle here: http://jsfiddle.net/teddyrised/1bgun0k0/9/
has comment: http://stackoverflow.com/comment/46674975
has comment: http://stackoverflow.com/comment/46675524
has comment: http://stackoverflow.com/comment/46675592
score: 0
upvote count: 1
downvote count: 1
answers question: http://stackoverflow.com/q/29234297
has comment: http://stackoverflow.com/comment/46675428
has comment: http://stackoverflow.com/comment/46702768

http://stackoverflow.com/a/29304386
answers question: http://stackoverflow.com/q/29303630
score: 1
has body: Use this html: and this javascript $('.item').on('click', function(){ var index = $("#wrapper > .container").index($(this).parent()), maxIndex = $('#wrapper > .container').length, nextIndex = (index + 1) < maxIndex ? (index + 1) : 0; $(this).appendTo($('#wrapper > .container').eq(nextIndex)); }); in your fiddle to move boxes between any number of containers You may also add Box3, Box4 (with class .container) etc. into the "#wrapper div", you may do it dynamycally
upvote count: 1
has comment: http://stackoverflow.com/comment/46803752
type: Answer
has comment: http://stackoverflow.com/comment/46804017
downvote count: 0

http://stackoverflow.com/q/29360334
tagged with: http://stackoverflow.com/tag/pdf
has answer: http://stackoverflow.com/a/29360350
type: UnansweredQuestion
type: Question
answer count: 1
tagged with: javascript
has body: How do I add blank spaces inbetween character? I'm using a PDF/AcroField; See the routing field, I'd like to make "12345" into "1 2 3 4 5". Javascript is allowed to validate forms, so maybe I can use that?
has title: Automatically add blank space inbetween characters
linked to: http://stackoverflow.com/q/6056401
score: 0
tagged with: acrofields

http://stackoverflow.com/comment/140049469
has text: This answer is genius, I could't get my mind to think for a solution. BookMarked
type: Comment
comment on: http://stackoverflow.com/a/42373631
score: 0
type: AnswerComment

http://stackoverflow.com/comment/46808495
type: Comment
has text: Looks to me like you need something similar to a db connector for a config file.
type: QuestionComment
comment on: http://stackoverflow.com/q/29306705
score: 0

http://stackoverflow.com/q/29220362
has title: Creating a helper function to create an associative array not sure where my logic is wrong
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29220776
has comment: http://stackoverflow.com/comment/46649773
has comment: http://stackoverflow.com/comment/46649722
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/29220555
has body: I am looping over a large data set that is constructed as follows: {Date: "5.10.13", Activity: "1", Date: "7/17/14", Device: "mobile", Gender: "female", Time"8:07 PM"}, {Date: "5.10.13", Activity: "1", Date: "7/17/14", Device: "mobile", Gender: "female", Time: "10:07 PM"}, {Date: "5.10.13", Activity: "1", Date: "7/17/14", Device: "mobile", Gender: "female", Time: "11:07 PM"}, For each day, I am trying to create an associative array with that day's total stats per hour. I have this code, which is working but is verbose to keep typing over and over. the "key" is an hour of the day in military time. I am looping over the data and creating a key for each hour(if its not there) and then adding up the activity stats if I have multiple activity records in that hour. if(key in dayHours){ dayHours[key].Activity = dayHours[key].Activity + d.Activity }else{ dayHours[key] = {Activity: d.Activity } I created this helper function to take over the task, since I have to build up many keys and totals. function lookUp(array, value, key, level){ value = Number(value); level = String(level); if(key in array){ array[key].level = array[key].level + value }else{ array[key] = {level : value} } }; I tried calling the function with this lookUp(dayHours, d.Time, key, Activity) unfortunately it doesn't work and says that Activity is undefined. I don't understand why it comes back undefined. Also, I am somewhat new to programming so if there is a better method that I should be investigating please point me in the right direction. THANKS!!!
tagged with: javascript
score: 0

http://stackoverflow.com/comment/47003436
type: QuestionComment
comment on: http://stackoverflow.com/q/29363128
has text: This answer provides an undocumented way to do it: http://stackoverflow.com/a/21648391/458205
score: 0
type: Comment

http://stackoverflow.com/comment/46894384
comment on: http://stackoverflow.com/q/29353772
has text: Why exactly do you want to restrict it? They can get your HTML a multitude of ways.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29269172
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46739960
has comment: http://stackoverflow.com/comment/46739753
type: Answer
answers question: http://stackoverflow.com/q/29269039
upvote count: 1
score: 1
has body: It's really not very easy to use a structure like this in Javascript: house.prototype.buy.makeOffer=function(){ //how can id be printed? console.log( 'id = ' + this.???? ) } The issue is that when you call that method on an instance of house like this: var h = new house(1); h.buy.makeOffer(); the this value in the makeOffer() method will point to the buy object in the prototype (which is your buy method) and it will NOT point to your house object. That's just how method calls work in Javascript (this points to the object which had the method) which renders these nested methods when there's actual instance data that you want to reference via this very impractical. The usual solution is to not implement the nesting. Just integrate the names without an extra layer of objects like this: house.prototype.buyMakeOffer=function(){ //how can id be printed? console.log( 'id = ' + this.???? ) } var h = new house(1); h.buyMakeOffer();
accepted answer of: http://stackoverflow.com/q/29269039

http://stackoverflow.com/comment/46715362
type: QuestionComment
has text: is the first string in the url? or just treated as a string?
score: 0
comment on: http://stackoverflow.com/q/29256253
type: Comment

http://stackoverflow.com/a/29345429
downvote count: 1
answers question: http://stackoverflow.com/q/29345248
has comment: http://stackoverflow.com/comment/102265098
upvote count: 14
type: AcceptedAnswer
has body: This turned out to be fairly simple. There was a span element of class select2-selection--multiple as the parent of the lis. All I had to do was add overflow-y: auto and that did the trick. I was not aware of this property. My select2 combobox, now, looks like the below. For my further reading - overflow-y description in w3schools
has comment: http://stackoverflow.com/comment/115632101
type: Answer
accepted answer of: http://stackoverflow.com/q/29345248
score: 13

http://stackoverflow.com/q/29295404
score: 2
upvote count: 2
has answer: http://stackoverflow.com/a/29371962
possible better answer: http://stackoverflow.com/a/46646410
has body: I wonder if someone can give me an example about how "node-remote" works if I want to run some of the logic/functions of my application from the server. Like, I don't know what to do after adding "node-remote" : "hostip" into package.json, what should my server provide? .js file that has the functions I want to run? So is it like: "node-remote" : "myappserver.com/funcs.js" ? I am so confused about this... I can't find enough information on web about this, so some help or at least a better explanation of "baconface"'s reply from this link would be so helpful: https://github.com/nwjs/nw.js/issues/3278
has answer: http://stackoverflow.com/a/46646410
tagged with: node.js
type: AnsweredQuestion
type: Question
tagged with: webkit
accepted answer: http://stackoverflow.com/a/29371962
answer count: 2
downvote count: 0
tagged with: javascript
favorite count: 0
has title: Node-Webkit's (nwjs) node-remote Usage

http://stackoverflow.com/q/29358889
score: 0
has answer: http://stackoverflow.com/a/29358947
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: UnansweredQuestion
has title: I have created a simple test portfolio site, but the images move on resize
has answer: http://stackoverflow.com/a/29358992
has body: I created a simple test website where the user can edit a jQuery code to insert images into a portfolio. I have created the html and css and everything but when i resized the screen the images moved. I would like the screen to just move over top the images. How can i do this, i tried putting position:absolute; but that did not work. All help would be appreciated! THANKS! HTML: Portfolio Brick image Read more &gt&gt Brick image Read more &gt&gt Brick image Read more &gt&gt Brick image Read more &gt&gt Brick image Read more &gt&gt Brick image Read more &gt&gt Brick image Read more &gt&gt CSS: *{margin:0px;padding:0px;} body{ width:80%; margin-left:100px; } .container{ width:100%; } img{ height:100px; width:200px; margin:30px; } .imageBlocks{ height:100px; width:200px; display:inline-block; margin-right:30px; } .imageBlocks p{ font-family:Arial; text-align:center; } .imageBlocks a{ font-family:Arial; margin-left:50px; color:#3CABCE; text-decoration: none; } Javascript: $("document").ready(function(){ //Bellow you can change the images and add new ones! //<---If you would like to change it, just change the location //The number beside the .img is the the image that will change, from right to left // |Image #| |Location| $(".img1 img").attr("src", "brick.png"); $(".img2 img").attr("src", "brick.png"); $(".img3 img").attr("src", "brick.png"); $(".img4 img").attr("src", "brick.png"); $(".img5 img").attr("src", "brick.png"); $(".img6 img").attr("src", "brick.png"); $(".img7 img").attr("src", "brick.png"); $(".img8 img").attr("src", "brick.png"); $(".img9 img").attr("src", "brick.png"); $(".img10 img").attr("src", "brick.png"); $(".img11 img").attr("src", "brick.png"); }); And you can use just any image at all because it resize with css Also as you can see, I used javascript/jquery to change the images, but is there an easier way i could learn? Maybe some type of config file? I only ask because someone has asked me to make a website like this where they can easily change the…
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/29271026
score: -2
has comment: http://stackoverflow.com/comment/46743012
tagged with: http://stackoverflow.com/tag/json
tagged with: mozilla
has comment: http://stackoverflow.com/comment/46742761
has comment: http://stackoverflow.com/comment/46742755
type: Question
has answer: http://stackoverflow.com/a/29271328
accepted answer: http://stackoverflow.com/a/29271328
upvote count: 1
tagged with: stringify
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/46742976
tagged with: scope
has comment: http://stackoverflow.com/comment/46742710
downvote count: 3
has body: I have removed my question text, as it didn't address the real error in my code. The two answers fully explain my error, and why I had made it.
favorite count: 0
has title: JSON.stringify doesn't work as expected on changed object. How to handle this?
has comment: http://stackoverflow.com/comment/46742944
type: AnsweredQuestion

http://stackoverflow.com/comment/46918724
has text: I tried that one but then I get an error from Firebug: TypeError: vector_bricks[i] is undefined window.setInterval(function(){vector_bricks[i].MOVE_BRICK();}, 25);
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/29368354
type: Comment

http://stackoverflow.com/q/29314369
tagged with: jquery
type: Question
has body: I’m looking to fix an issue a site is having on touch devices. On desktop, there’s a row of navigation links and on hover each of these drop their own flyout. On touch devices, however, there’s no hover event so I’m looking for the best way to mock this. The behaviour I’m looking to achieve on a touch device is as follows: The user taps once on a menu item and the flyout is shown The user can then tap a link from the flyout if they desire or The user can tap the menu item again and follow the link to that page The user can tap anywhere else on the page (or scroll) and the flyout will close I initially tried using something like: $('nav-item').on(‘touchstart’, function() { ... }); to trigger the showing of these flyouts and it seemed to work but I can’t get the closing of these quite right. I did some research into this and some other people were doing things like: $(‘html’).on(‘touchstart’, function() { ... }); as way to listen for a touch anywhere on the page and then force-close a currently-open flyout. This, however, seems a little crude and means that the flyout will close if the user touches somewhere in the flyout itself, which is not desirable. Would it be better to use jQuery’s not selector here and rule out all flyouts for areas that can be touched to close the flyout or is there a better way to handle this? A good example of what I'm trying to achieve is how Amazon are handling their flyouts in the right side of their main navigation. Tap once to open, tap again to follow the link, or tap/scroll anywhere else to close the flyout. I'm pushing to completely refactor the way these flyouts are handled so that mobile/touch is considered from the start but, at least for now, I'd like to figure out a way to achieve what I mentioned above. Thanks in advance.
score: 0
has answer: http://stackoverflow.com/a/29336968
answer count: 1
has title: How do I handle (well, mock) hover behaviour on a touch device?
accepted answer: http://stackoverflow.com/a/29336968
tagged with: jquery-mobile
tagged with: javascript
tagged with: mobile-safari
type: AnsweredQuestion

http://stackoverflow.com/q/29220398
upvote count: 0
score: -2
has comment: http://stackoverflow.com/comment/46649802
tagged with: javascript
tagged with: jquery
has title: Get value from a td class with tr id
has answer: http://stackoverflow.com/a/29220460
has answer: http://stackoverflow.com/a/29220549
has comment: http://stackoverflow.com/comment/46649709
tagged with: http://stackoverflow.com/tag/html
answer count: 4
possible better answer: http://stackoverflow.com/a/29220549
favorite count: 0
has answer: http://stackoverflow.com/a/29220499
has body: Hi it sounds complicated but here is my table: 709663341 709663341 i am the text How can i get the value of the p (i am the text) with the id of the tr? ( because there is multiple tr) Well it has to be code javascript because it is injecting the code. It possible with the code jQuery also.
downvote count: 2
type: Question
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29220688
accepted answer: http://stackoverflow.com/a/29220499
has comment: http://stackoverflow.com/comment/46649789

http://stackoverflow.com/q/29244547
tagged with: javascript
tagged with: angular-ui-bootstrap
score: 0
has body: I am using the Angular UI Bootstrap carousel in a project and I would like to pass own images to this slider. This is my code for the Carousel Controller: .controller('CarouselCtrl', function ($scope) { $scope.myInterval = 2000; var slides = $scope.slides = []; $scope.addSlide = function() { var newWidth = 1 + slides.length + 1; slides.push({ image: '../img' + newWidth, text: ['More','Extra','Lots of','Surplus'][slides.length % 4] + ' ' + ['Cats', 'Kittys', 'Felines', 'Cutes'][slides.length % 4] }); }; for (var i=0; i&lt;4; i++) { $scope.addSlide(); } }) I understand that a new array is initialised and the function addSlide adds each image to the array and iterates throught this array; however, I just want to change the origin of the images to the image folder in the project and it is not working by now, the images are not displayed. The img folder is one folder above the .js-file with the Carousel Controller. So I would be very happy for any hint, thanks!
answer count: 1
tagged with: angularjs
has answer: http://stackoverflow.com/a/29245657
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29245657
has title: Passing images to Angular UI Bootstrap Carousel
type: Question

http://stackoverflow.com/q/29334766
has comment: http://stackoverflow.com/comment/47059867
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46954824
tagged with: http://stackoverflow.com/tag/html
has title: Adding Dynamic Inputs , getting value from Dynamic dynamic generate input
has comment: http://stackoverflow.com/comment/46861467
answer count: 0
score: 0
has comment: http://stackoverflow.com/comment/46955915
type: Question
has comment: http://stackoverflow.com/comment/46968401
has body: I created a dynamic Form with JavaScript, with AddChapitre function and I want to get number value from an input text . And created "numbers value" inputs when I click to addChapitre button using AddFeild() function add titres . The problem is when I click in addChapitre I get the The Chapitre Form hidden. Here is it in JsFiddle : http://jsfiddle.net/javagose/6veqe55v/1/ This image will show the problem: function addChapitre() { var newdiv = document.createElement('div'); var addChapitre = ' ' + 'chapitre : ' + j + ' '; newdiv.innerHTML += addChapitre; addChapitre1 = ' ' + ' ' + ' Titre du chapitre ' + ' '; newdiv.innerHTML += addChapitre1; addChapitre2 = ' ' + ' ' + ' Grands titres des chapitre: ' + j + ' '; newdiv.innerHTML += addChapitre2; addChapitre2 = ' ' + ' ' + ' GRAND TITRE ' + ' ' + ' add titres ' + ' ' + ' '; newdiv.innerHTML += addChapitre2; document.getElementById('conteneur').appendChild(newdiv); j++; } function addFields() { var number = document.getElementById("grandTitreNbr" + j + "").value; var container = document.getElementById("grandTitresDiv" + j + ""); for (i = 0; i < number; i++) { // Append a node with a random text var newdiv = document.createElement('div'); var grandTitreTxt = ' '; newdiv.innerHTML += grandTitreTxt; var grandTitreUpload = ' Pdf ' + ' '; newdiv.innerHTML += grandTitreUpload; var grandTitreUpload = ' video ' + ' '; newdiv.innerHTML += grandTitreUpload; container.appendChild(newdiv); // Append a line break container.appendChild(document.createElement("br")); } }
tagged with: javascript
tagged with: jquery
tagged with: twitter-bootstrap

http://stackoverflow.com/comment/46765885
type: QuestionComment
has text: possible duplicate of [Change an element's CSS class with JavaScript](http://stackoverflow.com/questions/195951/change-an-elements-css-class-with-javascript)
comment on: http://stackoverflow.com/q/29284054
score: 0
type: Comment

http://stackoverflow.com/a/29432768
has body: You've probably used an intermediate version between 0.6 and 0.7. the right syntax is now: var app = angular.module('app', ['ng-admin']); app.config(function (NgAdminConfigurationProvider) { var nga = NgAdminConfigurationProvider; var app = nga.application('My backend') .baseApiUrl('http://localhost:3000/'); });
score: 1
downvote count: 0
answers question: http://stackoverflow.com/q/29295826
type: Answer
upvote count: 1

http://stackoverflow.com/comment/46821009
has text: are they guaranteed to be in order?
score: 0
comment on: http://stackoverflow.com/q/29313960
type: QuestionComment
type: Comment

http://stackoverflow.com/a/50720684
has comment: http://stackoverflow.com/comment/96997459
answers question: http://stackoverflow.com/q/29226283
upvote count: 10
type: Answer
downvote count: 0
score: 10
has body: Solution 1 : To Resolve This Please Use "scrollXInner": true Avoid to Using "scrollX": true" var tableI = $('#table_data').DataTable({ "bLengthChange": false, "scrollX": true, //Do Not Use This (Remove This Line) "scrollXInner": true //Use This (Add This Line) "dom": 'frtp' }); Solution 2 : OR You Can Add This CSS .dataTables_scrollBody thead tr[role="row"]{ visibility: collapse !important; }

http://stackoverflow.com/q/29269057
answer count: 3
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/46739623
has answer: http://stackoverflow.com/a/31016869
has body: I'm learning about observing Array objects. I found the following surprising: var fooArray = []; Array.observe(fooArray, function(changes){ console.log('changes:', changes[0].type); }); fooArray.push({}); results in the type of change being splice and not add What methods would result in a change event of type add? It would seem to me that pushing a single value on it would be the most likely scenario.
accepted answer: http://stackoverflow.com/a/31016527
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46739558
has comment: http://stackoverflow.com/comment/46739531
has comment: http://stackoverflow.com/comment/46739468
type: Question
has answer: http://stackoverflow.com/a/31016527
score: 9
upvote count: 9
has comment: http://stackoverflow.com/comment/46739518
has answer: http://stackoverflow.com/a/31547883
tagged with: arrays
tagged with: javascript
has title: Under what condition would Array.observe's "add" event trigger?
possible better answer: http://stackoverflow.com/a/31016869

http://stackoverflow.com/a/29375366
type: Answer
answers question: http://stackoverflow.com/q/29336462
has comment: http://stackoverflow.com/comment/47282659
has body: Seems like a perfect scenario for a knockoutJS solution. I am just posting a sample code here from their live example. you just create the template like this - First name: Last name: Hello, ! (notice the bindings in data-bind) and create the view model and then apply it - // Here's my data model var ViewModel = function(first, last) { this.firstName = ko.observable(first); this.lastName = ko.observable(last); this.fullName = ko.pureComputed(function() { // Knockout tracks dependencies automatically. It knows that fullName depends on firstName and lastName, because these get called when evaluating fullName. return this.firstName() + " " + this.lastName(); }, this); }; ko.applyBindings(new ViewModel("Planet", "Earth")); // This makes Knockout get to work and you are good to go with this output, only a matter of minutes. I created a Survey Builder page with it, the most important part is knockout is fast and also supports all kinds of js libraries to work with like jQuery, AngularJS, etc. You will never need to worry about rendering ui, just get/set with data. Try it out here - http://jsfiddle.net/rniemeyer/LkqTU/
upvote count: 4
downvote count: 0
score: 4

http://stackoverflow.com/comment/46908762
type: QuestionComment
comment on: http://stackoverflow.com/q/29348483
score: 0
has text: I am using a lambda function (updated my question with Lambda function) to create a thumbnail in another bucket. My lambda function will not work if I upload images with extension in uppercase. My lambda function works if I upload image.jpg but not Image.JPG. Therefore, I want to change the file extension to lowercase before/when uploading.
type: Comment

http://stackoverflow.com/q/29307640
has title: D3 Selection Works while svg Selection Doesn't
tagged with: http://stackoverflow.com/tag/svg
score: 1
upvote count: 1
type: Question
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29308420
tagged with: javascript
has comment: http://stackoverflow.com/comment/46812479
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/46809943
accepted answer: http://stackoverflow.com/a/29308420
favorite count: 0
has comment: http://stackoverflow.com/comment/46812532
has comment: http://stackoverflow.com/comment/46810015
tagged with: d3.js
has body: I have var svg = d3.select(.....) .append("svg") .attr("width", 1500) .attr("height", 850); Later on I have svg.SelectAll(......) . . .on("mouseover", function(){ d3.select(this).style(..... } Inside the anonymous function, I change the style of some svg contents. But I tried to do svg.select(this).style.... instead of d3.select(this).style.... and it broke. What is the reason why d3 must be used instead of svg?
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/46847160
type: AnswerComment
has text: Each time i click the button it adds more post. After the LAST posts are added i would like to hide the button... :/
comment on: http://stackoverflow.com/a/29328596
score: 0
type: Comment

http://stackoverflow.com/a/29351070
downvote count: 0
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/29351023
has comment: http://stackoverflow.com/comment/46892743
has body: You're setting $test after it's being echo'd so it's empty, thus the blank...

http://stackoverflow.com/comment/46926616
type: Comment
type: QuestionComment
has text: Sounds like you need a backend. Localstorage is good, though. Why would you want to avoid it?
comment on: http://stackoverflow.com/q/29372659
score: 0

http://stackoverflow.com/a/29286278
answers question: http://stackoverflow.com/q/29282120
type: Answer
has body: Your circle gets rendered before the "resize" function is called. The "resize" function calls the "draw" function, where 2 paths get appended. I think those are the ones above your circle.
has comment: http://stackoverflow.com/comment/46771275
has comment: http://stackoverflow.com/comment/46772928
score: 0

http://stackoverflow.com/q/29263549
upvote count: 4
tagged with: sails-mongo
accepted answer: http://stackoverflow.com/a/29278203
answer count: 1
downvote count: 0
favorite count: 0
tagged with: sails.io.js
has title: Not able to add scripts in layout.ejs (sails.js)
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46761277
has answer: http://stackoverflow.com/a/29278203
has body: I am trying to add a route.js file in the layout.ejs. Scratchpad <!-- Stylesheets and Preprocessors ============================== You can always bring in CSS files manually with ` ` tags, or asynchronously using a solution like AMD (RequireJS). Or, if you like, you can take advantage of Sails' conventional asset pipeline (boilerplate Gruntfile). By default, stylesheets from your `assets/styles` folder are included here automatically (between STYLES and STYLES END). Both CSS (.css) and LESS (.less) are supported. In production, your styles will be minified and concatenated into a single file. To customize any part of the built-in behavior, just edit `tasks/pipeline.js`. For example, here are a few things you could do: + Change the order of your CSS files + Import stylesheets from other directories + Use a different or additional preprocessor, like SASS, SCSS or Stylus --> MY SCRATCHPAD hello world Whenever i add this and save it. Its got saved. But when i try to run sails lift. The route.js script getting gone and the layout.ejs file changes into old state. Can anyone figure this out? Any idea of what may be the bug? cause of grunt?
type: Question
tagged with: sails.js
tagged with: javascript
score: 4

http://stackoverflow.com/a/29218846
answers question: http://stackoverflow.com/q/29218554
score: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46647278
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/29218554
upvote count: 1
has body: Try this: HTML: The original SheerWeave fabric Infused with Microban GREENGUARD Certified Available in 10 colors CSS: .centre { display: table; margin:0 auto; } #image { opacity: 0; display: table-cell; position: relative; margin-left: 0px; float:left; } #border { border: 1px solid black; position: absolute; height: 150px; margin-left: -10px; opacity: 0; } #text { opacity: 0; position: relative; float: left; vertical-alignment: middle; display: table-cell; margin-left: -220px; } JS: $(window).load(function() { $( "#image" ).animate({ opacity: 1, marginRight: "0.3in" }, 1500 ); $( "#text" ).animate({ opacity: 1, marginLeft: "0.1in" }, 1500 ); $( "#border" ).animate({ opacity: 1 }, 5500 ); }); See Example.

http://stackoverflow.com/comment/46689823
has text: Please add meaningful code and a problem description here. Don't just link to the site that needs fixing - otherwise, this question will lose any value to future visitors once the problem is solved. Posting a [Short, Self Contained, Correct Example (SSCCE)](http://www.sscce.org/) that demonstrates your problem would help you get better answers. For more info, see [Something on my web site doesn't work. Can I just paste a link to it?](http://meta.stackexchange.com/questions/125997/) Thanks!
type: QuestionComment
type: Comment
score: 1
comment on: http://stackoverflow.com/q/29241898

http://stackoverflow.com/q/29340496
has answer: http://stackoverflow.com/a/29340579
has answer: http://stackoverflow.com/a/29340560
has answer: http://stackoverflow.com/a/29340734
type: UnansweredQuestion
has title: Post array from javascript to php function using Ajax
upvote count: 1
tagged with: php
score: 1
has answer: http://stackoverflow.com/a/29340605
type: Question
tagged with: arrays
downvote count: 0
tagged with: javascript
tagged with: jquery
has body: i want to post an array from java script to php by ajax. But i don't know how do that, especially send it to php function like controller class. Correct me if i'm wrong, this is my java script source, as a function to send an array : &lt;script&gt; function send(){ var obj = JSON.stringify(array); window.location.href = "post.php?q=" + obj; } &lt;/script&gt; i was try, but still fail. really need help..
favorite count: 0
tagged with: ajax
has answer: http://stackoverflow.com/a/29340646
answer count: 5

http://stackoverflow.com/q/29286145
has comment: http://stackoverflow.com/comment/46769906
tagged with: object
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46769851
has comment: http://stackoverflow.com/comment/46769816
has comment: http://stackoverflow.com/comment/46769861
type: Question
has body: I need to create a array like the following var new = 'New'; var old = 'Old'; var posterArray = [new, old]; //I want to push posterType and posterYear into new and old array var posterType = [{'id':123, 'name':'test'}, {'id':456, 'name':'test'}]; var posterYear = [{'year':12345, 'status':'old'}, {'year': 3456, 'name':'old'}]; Is there anyway I can push posterType and posterYear into new and old variable inside the posterArray? For example, posterArray[0].push(postertype). Basically I need mullti-dimentional array and I am not sure how to accomplish here. Thanks for the help!
tagged with: arrays
answer count: 1
has title: How to setup arrays in my case
tagged with: javascript
has comment: http://stackoverflow.com/comment/46769759
score: 0
has answer: http://stackoverflow.com/a/29286220
accepted answer: http://stackoverflow.com/a/29286220

http://stackoverflow.com/q/29370475
score: 0
answer count: 1
has body: I work on Selenium IDE. I don't know JS at all (I'm a tester, not a developer). I'm storing this string: "le 31 Mars 2015 à 11h02m storeText //table[3]/tbody/tr[3]/td[2]&lt;/td&gt; (cell where is the date) LongDateHour Then I do this: (with help of other post) storeEval storedVars['LongDateHour'].match(/(\d{2}) (\D*) (\d{4})/); DueDate But it returns: DueDate = "31 Mars 2015,31,Mars,2015" I want only DueDate = "31 Mars 2015"
tagged with: selenium-ide
has answer: http://stackoverflow.com/a/29378870
accepted answer: http://stackoverflow.com/a/29378870
type: AnsweredQuestion
tagged with: match
type: Question
tagged with: javascript
tagged with: date
has title: Selenium + js : match a date 'dd Mmmm yyyy' in a string

http://stackoverflow.com/comment/78247356
score: 0
has text: What is "url that launches Chrome"?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29225317

http://stackoverflow.com/a/29353344
has comment: http://stackoverflow.com/comment/84571466
has body: Yes, the base value is the context in which the referenced name lives. For an object property, this would be the object (see §8.12 Object internal methods for setter/getter operations). For a variable, this would be the variable environment (§10.2.1 Environment records). For an unresolvable reference (the things that throw reference errors except when supplied to typeof), this would be undefined. it does not say how it is set Reference values are only constructed by very few operations: identifier reference expressions, that resolve the identifier in the current lexical environment (or one of its parents) property accessor expressions, i.e. the .… and […] operators function calls to host functions are permitted to return them, but such don't exist.
has comment: http://stackoverflow.com/comment/84583109
type: Answer
score: 6
answers question: http://stackoverflow.com/q/29353177
has comment: http://stackoverflow.com/comment/84581069
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29353177
has comment: http://stackoverflow.com/comment/92142324
has comment: http://stackoverflow.com/comment/92137312
has comment: http://stackoverflow.com/comment/46892644
upvote count: 6
has comment: http://stackoverflow.com/comment/84582678
has comment: http://stackoverflow.com/comment/46892911
has comment: http://stackoverflow.com/comment/92146313
type: AcceptedAnswer

http://stackoverflow.com/q/29263898
answer count: 3
has comment: http://stackoverflow.com/comment/46729962
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46730574
tagged with: css
has answer: http://stackoverflow.com/a/29264338
possible better answer: http://stackoverflow.com/a/29263995
has comment: http://stackoverflow.com/comment/46730019
has answer: http://stackoverflow.com/a/29263995
type: AnsweredQuestion
has body: I have a cell with a class called OnHandClass. I have an input field inside the cell and I have added a double click event to the cell and have tried many ways to change the visibility of the closest input element. Three are listed below. What am I missing ? &lt;input type="text" class="OnHandEditClass" value="1" style="display: none;"&gt; &lt;td class="OnHandClass"&gt; 1 &lt;input type="text" class="OnHandEditClass" value='1'&gt; &lt;/td&gt; $('.OnHandClass').dblclick(function (evt) { $(this).next(":text").css("display", "inline"); $(this).next("input[type='text']").show(); $(this).closest('input').css("display", "inline"); });
has comment: http://stackoverflow.com/comment/46730005
has comment: http://stackoverflow.com/comment/46730382
has comment: http://stackoverflow.com/comment/46729786
type: Question
has comment: http://stackoverflow.com/comment/46729906
accepted answer: http://stackoverflow.com/a/29264338
tagged with: javascript
tagged with: jquery
has title: How to change the css of a text input using jquery?
has answer: http://stackoverflow.com/a/29264578
score: 0

http://stackoverflow.com/a/29353962
downvote count: 2
has comment: http://stackoverflow.com/comment/46893118
has comment: http://stackoverflow.com/comment/46893000
type: Answer
has comment: http://stackoverflow.com/comment/46893234
upvote count: 0
accepted answer of: http://stackoverflow.com/q/29353725
answers question: http://stackoverflow.com/q/29353725
has comment: http://stackoverflow.com/comment/46893179
has body: This is an example of where it has the front slash at the beginning. Doesn't work with it, works without it. This is with the html file being in some random directory that has a /js folder in it with the jquery.js file in it. &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt; &lt;head&gt; &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt; &lt;title&gt;jQuery Selectors&lt;/title&gt; &lt;script type="text/javascript" src="/js/jquery.js"&gt;&lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;p&gt;Hello&lt;/p&gt; &lt;p&gt;World&lt;/p&gt; &lt;div&gt;&amp;copy; 2011 by John Fontana&lt;/div&gt; &lt;script&gt; $("p").css("color","#FF0000"); $("div").css("color","#000000"); &lt;/script&gt; &lt;/body&gt; &lt;/html&gt;
score: -2
type: AcceptedAnswer

http://stackoverflow.com/q/29347903
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/29348040
has comment: http://stackoverflow.com/comment/46881663
has comment: http://stackoverflow.com/comment/46881717
has body: I want to be able to create an offline program that can use the browser as GUI. I'm not particularly good at GUI programming in general, and overall it seems that using HTML and CSS to structure a GUI would be the easiest. Cross browser method is preferred, but I will most likely use Google Chrome I need to be able to open an external program, possibly with command line arguments Javascript seems like the best language for this, however as far as I know it isn't possible to launch programs with it. This is on Windows 7.
has answer: http://stackoverflow.com/a/29349349
type: Question
answer count: 2
score: 5
upvote count: 5
downvote count: 0
tagged with: javascript
tagged with: browser
has title: How to use the browser as the GUI for an offline application?
has comment: http://stackoverflow.com/comment/46881741
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/comment/46839068
type: Comment
comment on: http://stackoverflow.com/a/29322544
has text: Thanks! Does it require that I do an ajax call or can I use it on anything? I guess I'll have to try it out and see!
score: 0
type: AnswerComment

http://stackoverflow.com/comment/46753916
type: AnswerComment
comment on: http://stackoverflow.com/a/29277857
type: Comment
has text: You should've included that important info beforehand — **and that is why we ask OPs to construct examples themselves** as they are the ones who fully understands the contexts of the question.
score: 0

http://stackoverflow.com/comment/53344092
type: Comment
has text: How do you know that the Feed Dialog is deprecated? I couldn't see that mentioned on the [Facebook doc page](https://developers.facebook.com/docs/sharing/reference/feed-dialog/v2.4).
comment on: http://stackoverflow.com/a/29332771
score: 0
type: AnswerComment

http://stackoverflow.com/q/29299741
answer count: 2
has body: Have problem. have side floated menu like this: Font Family Arial Halvetica Times new roman Select font color Inner background color Outer background color javascript code: $(".open_button").click(function() { if ($(this).hasClass("opened")) { $(".customize").animate({ marginRight: '-=431px' }, 1000); $(this).removeClass("opened"); } else { $(".customize").animate({ marginRight: '+=431px' }, 1000); $(this).addClass("opened"); } }); and some extra js code for that if click outsite that div to hide it. $(document).mouseup(function (e){ var container1 = $(".customize"); if(click == 0){ if (!container1.is(e.target) && container1.has(e.target).length === 0){ // if the target of the click isn't the container... if($('.open_button').hasClass('opened')){ $('.open_button').trigger('click'); } } } }); The problem is that in that input's i'm using jquery colorpicker plugin wich have extra div like: and I can't stop hiding function mouseup if clicked somewhere in that last div with class colorpicker colorpicker-visible
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46795247
has comment: http://stackoverflow.com/comment/46794349
favorite count: 0
score: 2
upvote count: 2
has answer: http://stackoverflow.com/a/29299997
has comment: http://stackoverflow.com/comment/46794617
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29300246
possible better answer: http://stackoverflow.com/a/29299997
has title: jquery do not hide div if clicked div
accepted answer: http://stackoverflow.com/a/29300246
type: Question

http://stackoverflow.com/q/29279079
tagged with: plugins
has title: Using Javascript libraries with CocoaScript
downvote count: 0
score: 1
tagged with: libraries
type: Question
has answer: http://stackoverflow.com/a/29458717
tagged with: javascript
upvote count: 1
answer count: 1
tagged with: cocoa
favorite count: 0
has body: I'm creating a plugin for Bohemian Coding's Sketch. They are using CocoaScript for creating plugins. Regular coding works fine, however I wondered if it is possible to use javascript libraries with CocoaScript. Specifically I tried multiple csv-to-json libraries (such as PapaParse) within my code, which failed to function. Unfortunately I can't find almost anything on the web regarding CocoaScript, since it is not widely used. The console is also not very helpful, since Error messages are pretty basic right now. So, long story short: Can I use javascript libraries with CocoaScript and if yes, what are it's limitations?
type: UnansweredQuestion

http://stackoverflow.com/comment/46956371
comment on: http://stackoverflow.com/q/29371145
type: Comment
type: QuestionComment
has text: We are not asking you to reproduce your entire code, but at least create a [**minimal, concrete and verifiable example**](http://stackoverflow.com/help/mcve) to demonstrate what you want to achieve.
score: 1

http://stackoverflow.com/a/38006982
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/29247032
has body: $scope.countRows=0; $scope.gridOptions.onRegisterApi = function(gridApi){ $scope.gridApi = gridApi; gridApi.selection.on.rowSelectionChanged($scope, function(row){ $scope.countRows = $scope.gridApi.selection.getSelectedRows().length; }); gridApi.selection.on.rowSelectionChangedBatch($scope, function(row){ $scope.countRows = $scope.gridApi.selection.getSelectedRows().length; }); }; In the HTML side you can use some thing like this &lt;button class="custom-button" ng-disabled="countRows&lt;=0" ng-click="submit()"&gt;Details&lt;/button&gt;
downvote count: 0

http://stackoverflow.com/comment/46771194
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29286924
has text: What about `document.getElementById('txt_0').value;` ? http://stackoverflow.com/questions/1642447/how-to-change-the-content-of-a-textarea-with-javascript
score: 0

http://stackoverflow.com/a/29326071
score: 0
type: AcceptedAnswer
has body: RegEx would be the easiest solution here, something like <a.*yourdomain.*?\/a> should do the trick. It will remove anchor tags that contain yourdomain inside them (both as attributes and attribute values - you didn't specify how accurate you want it, so everything gets triggered). See it here: var html = 'ThesiteGood URLGood URL'; var replaced = html.replace(/<a.*yourdomain.*?\/a>/, ''); document.getElementById('f').textContent = html; document.getElementById('r').textContent = replaced; p {color: #777} span {color: black} Sample markup: After RegEx: Used one-line sample markup on purpose so you can see it won't touch the other anchors. So your full code would be: function checkLoad(){ if (document.readyState === "complete") { document.body.innerHTML = document.body.innerHTML.replace(/<a.*yourdomain.*?\/a>/, ''); } else { setTimeout('checkLoad();', 500) } }
has comment: http://stackoverflow.com/comment/46845348
type: Answer
has comment: http://stackoverflow.com/comment/46844490
upvote count: 1
downvote count: 1
accepted answer of: http://stackoverflow.com/q/29325973
answers question: http://stackoverflow.com/q/29325973
has comment: http://stackoverflow.com/comment/46843385

http://stackoverflow.com/comment/46776434
has text: @scaryguy: The code in your answer works because the `async_f*` functions there are not the same as the ones in the question. Blame the OP :-)
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29289469
type: Comment

http://stackoverflow.com/q/29269978
score: 0
has comment: http://stackoverflow.com/comment/46740966
type: Question
has title: JavaScript undefined function external JavaScript file
tagged with: javascript
tagged with: jquery
has body: I have loaded an external JavaScript file, and placed functions within it, but when running the functions, it says "undefined function", but when I place the functions within the index file, it works perfectly. To debug this, I wrote alert('entered'); when entering the document, and reading content when running and document is ready. Both are executed. The error U get with this is: Uncaught ReferenceError: countdown is not defined Uncaught ReferenceError: keepalive is not defined How can I fix this? Source: // JavaScript Document alert('entered js.js'); $(document).ready(function() { alert('reading content'); function countdown() { var ele = document.getElementsByClassName('countdown'); for (var i = 0; i &lt; ele.length; ++i) { var v = Math.floor(ele[i].getAttribute('ctime')) - 1; if (v &lt; 0) { v = 0; } ele[i].setAttribute('ctime', v); if (v &gt; 86399) { var sl = v; d = parseInt(sl / 86400); sl = sl % 86400; h = parseInt(sl / 3600); sl = sl % 3600; m = parseInt(sl / 60); s = parseInt(sl % 60); var str = d + 'd ' + h + 't ' + m + 'm ' + s + 's'; } else if (v &gt; 3599) { var h = Math.floor(v / 60 / 60); var m = Math.floor((v - (h * 3600)) / 60); var s = v - (m * 60) - (h * 3600); var str = h + 't ' + m + 'm ' + s + 's'; } else if (v &gt; 59) { var m = Math.floor(v / 60); var s = v - (m * 60); var str = m + 'm ' + s + 's'; } else if (v &gt; 0) { var str = v + 's'; } else { var str = ele[i].getAttribute('ctext') || '0s'; } if (v == 0) { var act = ele[i].getAttribute('caction'); if (act != '') { setTimeout(function() { url(act); }, 1000); } } ele[i].innerHTML = str; } setTimeout('countdown()', 1000); } $( ".specialpost tr" ).click(function(e) { var form = $(this).parents('form').attr('id'); var submitformId = $(this).data("submitid"); console.log(form); console.log(submitformId); $("#submitvalue").val(submitformId); $( "#" + form ).submit(); }); (function ($) { $.fn.countTo = function (options) { options = options || {}; return $(this).each(function () { // set optio…
has answer: http://stackoverflow.com/a/29270010
answer count: 1
has comment: http://stackoverflow.com/comment/46741251
favorite count: 0
upvote count: 1
downvote count: 1
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29270010

http://stackoverflow.com/comment/46791514
has text: why are you using setInterval..?
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/29298133
type: Comment

http://stackoverflow.com/a/29334034
downvote count: 0
has comment: http://stackoverflow.com/comment/46857357
answers question: http://stackoverflow.com/q/29333659
type: Answer
accepted answer of: http://stackoverflow.com/q/29333659
upvote count: 5
has body: Safe enough I'd say, but that may help OCR bots into checking whether they got it right without trying their luck on the server and risking losing the current captcha (as the server would invalidate the code if an incorrect answer was supplied and won't give you a second chance to try again using the same captcha). Let's say an OCR bot has trouble telling whether the last letter of your captcha is a lowercase L or the "1" digit ? In a conventional captcha without client-side validation, the bot just tries its luck, if it guesses wrong the server logs the failure and resends it a totally different captcha, so the OCR has to start all over again. Now imagine the above scenario but with client-side validation, here the bot has a way to verify whether they have the right answer without notifying the server about it, so in this case, if the bot is unsure, it tries all of the possibilities against the hash and only submits the right answer. Basically, this gives the bot the ability to make mistakes without telling the server about it and without having to start all over again. Finally, I don't have precise numbers in mind, but even with a different salt each time, depending on the number of possibilities (like 4 alphanumeric characters, case-insensitive) it may be possible to bruteforce every single possibility in a reasonable amount of time without even making an OCR. To mitigate this you should use many iterations of the hash so that it becomes computationally difficult to try all possible answers.
has comment: http://stackoverflow.com/comment/46857050
score: 5
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46857254

http://stackoverflow.com/a/29317066
has comment: http://stackoverflow.com/comment/46826642
has body: I assume you are using Stripe.JS in which case you wouldn't be required to use the price in a form. I would try and change your code to flow something like the below... For instance... User selects product id 123 via post request on the product page. Then you store that they have selected this product in the session. When they checkout... Use stripe JS on the card details on the frontend which exchange the form card details for a token. Post this token to the server. The webserver then calculates the amount based on the products in the session, uses mysql tables to get the prices for them then submits this to stripe along with the token returned to process the payment. hope this makes sense...
has comment: http://stackoverflow.com/comment/46826747
downvote count: 0
answers question: http://stackoverflow.com/q/29316901
has comment: http://stackoverflow.com/comment/64598306
upvote count: 2
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/46826621

http://stackoverflow.com/q/29373197
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/46953892
tagged with: google-maps-api-3
answer count: 2
tagged with: http://stackoverflow.com/tag/html
has body: I followed this tutorial for creating a Google maps API in my ASP.NET MVC5 project. I have added this code to my _Layout.cshtml (at the bottom, underneath the &lt;html&gt; section - have tried moving them to the &lt;head&gt; section as suggested here but it didn't make any difference): &lt;script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"&gt; &lt;/script&gt; &lt;script type="text/javascript"&gt; $(document).ready(function () { initialize(); }); function initialize() { var mapOptions = { center: new google.maps.LatLng(6.9167, 79.8473), zoom: 10, mapTypeId: google.maps.MapTypeId.ROADMAP }; var map = new google.maps.Map(document.getElementById("map_canvas"), mapOptions); // create a marker var latlng = new google.maps.LatLng(6.9167, 79.8473); var marker = new google.maps.Marker({ position: latlng, map: map, title: 'My Place' }); } &lt;/script&gt; and this code to my view (in the place I want the map to show): &lt;div id="map_canvas" style="width: 640px; height: 480px;"&gt; &lt;/div&gt; At the bottom of my _Layout &lt;body&gt; section, I have: @Scripts.Render("~/bundles/jquery") @Scripts.Render("~/bundles/bootstrap") @RenderSection("scripts", required: false) and in my registering bundles function (which I know is working because rendering other bundles elsewhere is working) I have: bundles.Add(new ScriptBundle("~/bundles/jquery").Include( "~/Scripts/jquery-{version}.js")); but it's not working. What I get is a blank space like this (click for bigger version if needed): but no map. I have viewed the page source and both sections of code appear in it. I don't know what else to look at or try, if maybe there's some crucial step that I'm missing, if I need to do something different for MVC5 (the tutorial was for MVC4), if the Google API has changed again and you need a key again to be able to use it, or if the problem is something else entirely. Update: The code above is working in this fiddle (thanks HoangHieu for getting me started with …
favorite count: 0
accepted answer: http://stackoverflow.com/a/29420499
has title: Google Maps API not showing up in MVC5
has comment: http://stackoverflow.com/comment/46929745
type: AnsweredQuestion
score: 1
upvote count: 1
linked to: http://stackoverflow.com/q/25108910
has comment: http://stackoverflow.com/comment/46952333
type: Question
has comment: http://stackoverflow.com/comment/46957753
tagged with: asp.net-mvc-5
possible better answer: http://stackoverflow.com/a/29388253
tagged with: google-maps
has answer: http://stackoverflow.com/a/29420499
has answer: http://stackoverflow.com/a/29388253

http://stackoverflow.com/q/29241380
type: Question
accepted answer: http://stackoverflow.com/a/29241426
tagged with: object
upvote count: 0
tagged with: javascript
score: -1
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/29241426
has body: So I have the following code and it is doing what I want it to but I was just wondering if there was a better way of doing this. It just feels clunky object.hasOwnProperty(property) ? object[property]++ : object[property] = 1
type: AnsweredQuestion
has title: Add 1 to object property if it exists, create and set it to 1 if it doesn't (javascript)
downvote count: 1

http://stackoverflow.com/q/29332794
upvote count: 3
has title: Write to a Google spreadsheet from JavaScript using the Public API access (no OAuth)
tagged with: google-oauth
type: Question
tagged with: google-sheets-api
tagged with: javascript
tagged with: api
downvote count: 0
has body: I'd like to allow a user to visit one of my sites, enter some information into a field, and then save that information into a Google Spreadsheet via JavaScript. I don't want the user to login via Google or have to do any special authentication. It's Ok if the spreadsheet needs to be open to public; the data's not sensitive. I don't want to use a Google Form, I want to have full control over the client-side UI. I've been reading through the Google developer docs, but they only make mention to an OAuth login solution. The Google Developer Console allows you to create a "Public API access key", but does not explain how it's used.
answer count: 1
favorite count: 0
tagged with: google-drive-api
has comment: http://stackoverflow.com/comment/46961256
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29345475
score: 3

http://stackoverflow.com/q/29255744
score: 4
tagged with: markdown
has answer: http://stackoverflow.com/a/54076421
upvote count: 4
has body: I've got a Markdown editor on the left side and its HTML preview on the right side. How do I make the preview scroll to the same location as the editor.
has answer: http://stackoverflow.com/a/29255919
downvote count: 0
tagged with: jquery
favorite count: 0
accepted answer: http://stackoverflow.com/a/29255919
has answer: http://stackoverflow.com/a/29255806
tagged with: http://stackoverflow.com/tag/html
answer count: 4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29256150
has title: Make side-by-side markdown preview scroll with its editor
type: Question
possible better answer: http://stackoverflow.com/a/29256150
tagged with: javascript

http://stackoverflow.com/comment/46930572
has text: How do you know it doesn't work? It seems to work fine. What is the *expected* behavior?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29372813

http://stackoverflow.com/q/29261172
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29274188
score: -1
possible better answer: http://stackoverflow.com/a/29261361
answer count: 3
favorite count: 0
has title: how do i remove whitespaces after parentheses in javascript?
has answer: http://stackoverflow.com/a/29262182
tagged with: regex
has body: how to get the following outputs using reg-ex in javascript input : "font1" font2 (____"font format"___) output : "font1" font2 ("font format") input : (___format____) / (___format) / (format_____) output:(format) input : (______"font-format"__) output: ("font-format") input:(__font output:(font Thanks in advance
has answer: http://stackoverflow.com/a/29274188
has comment: http://stackoverflow.com/comment/46724484
type: AnsweredQuestion
downvote count: 2
has comment: http://stackoverflow.com/comment/46726831
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/29261361
has comment: http://stackoverflow.com/comment/46724696

http://stackoverflow.com/comment/46908829
has text: You can get the value using JavaScript. Here is an example http://stackoverflow.com/questions/1085801/get-selected-value-in-dropdown-list-using-javascript
score: 0
comment on: http://stackoverflow.com/q/29362507
type: Comment
type: QuestionComment

http://stackoverflow.com/a/30517040
type: Answer
has body: FCSA-Number updates on blur by default, are you performing some other operation onBlur? I'm not seeing this issue with FCSA-Number and angular 1.3.13. FCSA-Number seems to not be supported as the folks there aren't responding to any issues or open PR's which is a shame because it's very close to being very useful. I'm looking to be able to specify a value from my model to be used as min / max but due to scope resolution, that won't work unless min and max are implemented as attributes. Angular 1.3 introduced the 'fractionSize' argument to their number filter which might help you, it allows you to specify the number of decimal places. https://docs.angularjs.org/api/ng/filter/number
answers question: http://stackoverflow.com/q/29260146
score: 0

http://stackoverflow.com/comment/46664732
score: 0
comment on: http://stackoverflow.com/a/29228998
type: Comment
has text: This will not reference the child-element of the clicked anchor.
type: AnswerComment

http://stackoverflow.com/q/29363729
tagged with: dwr
type: Question
type: AnsweredQuestion
has body: I have an application launching an applet. When I try to click on the login button in Chrome I get the following error applet.htm:54 Uncaught TypeError: undefined is not a function engine.js:1262 console.trace() engine.js:1262 dwr.engine._debug engine.js:1263 Error: TypeError, undefined is not a function Code applet.htm line 54(Uncaught TypeError: undefined is not a function) : function initApplet() { while(ctiApplet.isActive()==false) { } lines 1257 - 1281 of engine.js /** @private Used internally when some message needs to get to the programmer */ dwr.engine._debug = function(message, stacktrace) { var written = false; try { if (window.console) { if (stacktrace &amp;&amp; window.console.trace) window.console.trace(); window.console.log(message); written = true; } else if (window.opera &amp;&amp; window.opera.postError) { window.opera.postError(message); written = true; } } catch (ex) { /* ignore */ } if (!written) { var debug = document.getElementById("dwr-debug"); if (debug) { var contents = message + "&lt;br/&gt;" + debug.innerHTML; if (contents.length &gt; 2048) contents = contents.substring(0, 2048); debug.innerHTML = contents; } } }; Really can't understand why it is undefined. Its like it can't get a hold on the applet so doesn't realise its loaded. works on IE8. If anyone can shed any light on it.
tagged with: google-chrome
accepted answer: http://stackoverflow.com/a/29616727
answer count: 1
score: 0
tagged with: java
has answer: http://stackoverflow.com/a/29616727
linked to: http://stackoverflow.com/q/16298597
has title: Uncaught TypeError: undefined is not a function Chrome not working
tagged with: javascript

http://stackoverflow.com/comment/46864562
type: Comment
comment on: http://stackoverflow.com/a/29337626
type: AnswerComment
has text: But seriously, why would length not be an integer? I think I'll remove that bit. Haha. Either way, looping backwards is nice since I can start with the list from 0. I think that's less confusing than decrementing the index everytime.
score: 0

http://stackoverflow.com/q/29333425
tagged with: javascript
has comment: http://stackoverflow.com/comment/46855871
has title: difference between Sign-propagating right shift and Zero-fill right shift in javascript?
answer count: 1
accepted answer: http://stackoverflow.com/a/29333773
favorite count: 0
has comment: http://stackoverflow.com/comment/46856070
type: AnsweredQuestion
upvote count: 10
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/29333773
score: 9
has body: As i know, Sign-propagating right shift (a >> b) : Shifts a in binary representation b bits to the right, discarding bits shifted off. Ex: 8>>2 will return 2.because binary 1000 will shift 2 times right and return 0010. Zero-fill right shift (a >>> b): Shifts a in binary representation b bits to the right, discarding bits shifted off, and shifting in zeros from the left. Ex: 8>>2 return 2.it also retun the same. then what is difference between &gt;&gt; and &gt;&gt;&gt; operator and why javascript has these two operator instead of one or if i am wrong then please guide me to get right concept?

http://stackoverflow.com/a/29348575
score: 1
upvote count: 1
has body: The problem lies in that you're attaching and moving XALUI.Button instead of the inner PIXI.Sprite. Setting the position on the inner sprite (this._button.position.x) would only work if you had added that PIXI.Sprite to the stage. Since DisplayObjects do not contain multiple DisplayObjects, the stage has no reference to the actual sprite. There are a couple of ways to fix this. First, you could inherit from PIXI.Sprite XALUI.Button = function(texture) { PIXI.Sprite.call(this, texture); }; XALUI.Button.prototype = Object.create(PIXI.Sprite.prototype); XALUI.Button.prototype.constructor = XALUI.Button; Or to have it inherit from DisplayObjectContainer in the same manner as above but that implies a button will hold multiple graphical objects so do what works best for you. Here's a working example of the first approach. var XALUI = {}; // Inherits from PIXI.Sprite XALUI.Button = function(texture) { PIXI.Sprite.call(this, texture); }; XALUI.Button.prototype = Object.create(PIXI.Sprite.prototype); XALUI.Button.prototype.constructor = XALUI.Button; // Prepare the stage var stage = new PIXI.Stage(0x66FF99); var renderer = PIXI.autoDetectRenderer(window.innerWidth, window.innerHeight); var texture = PIXI.Texture.fromImage("http://www.goodboydigital.com/pixijs/examples/1/bunny.png"); var button = new XALUI.Button(texture); document.body.appendChild(renderer.view); requestAnimationFrame(animate); stage.addChild(button); // Animate the button function animate() { button.position.x = button.position.x + 5; if (button.position.x &gt; window.innerWidth + button.width) { button.position.x = -button.width; } renderer.render(stage); requestAnimationFrame(animate); } &lt;script src="https://cdn.rawgit.com/GoodBoyDigital/pixi.js/v2.0.0/bin/pixi.js"&gt;&lt;/script&gt;
accepted answer of: http://stackoverflow.com/q/29348047
has comment: http://stackoverflow.com/comment/46883505
type: AcceptedAnswer
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/29348047

http://stackoverflow.com/q/29292383
score: 0
has comment: http://stackoverflow.com/comment/46783366
has answer: http://stackoverflow.com/a/29294962
has title: How do I used D3 to force a user click on a circle object inside of a g.node object?
accepted answer: http://stackoverflow.com/a/29294962
tagged with: d3.js
has answer: http://stackoverflow.com/a/29292702
type: AnsweredQuestion
has body: I have some pretty complex code that runs when a user selects a node in my D3 tree. I want to force a UI click programatically. I've tried several of the suggestions on stack overflow, but I think I have a special case. //This is how I create the nodes... node = nodeElements.selectAll("g.node") .data(nodes, function(d) {return d.name;}); nodeEnter = node.enter().append("g") .attr("class", "node") .attr("name", function(d){return d.name;}); nodeEnter.append("circle") .attr("r", 10) .attr("show", true) .attr("class", "displayNode") .on("click", mouseClickNode); //&lt;---I want to trigger this I think I should be selecting the circle under my node element. I've tried a lot of things, here are a few //Tried d3.select("g.node[name='someNodeName']&gt;circle.displayNode").on("click")(); //Tried d3.select("g.node[name='someNodeName']&gt;circle").on("click")(); //I got desperate... node.filter(function(d){ if(d.name === "someNodeName"){ return d; } }).on("click")();
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/46807825
possible better answer: http://stackoverflow.com/a/29292702
tagged with: javascript

http://stackoverflow.com/comment/46825563
has text: No it's not. I wouldn't be entering my if statement if it was
comment on: http://stackoverflow.com/q/29313511
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29284107
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29283250
downvote count: 0
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/29283250
has body: This: setTimeout($(document).trigger(e), fire); Should be this: setTimeout(function() { $(document).trigger(e) }, fire); The former is calling a function and passing the return value into setTimeout as a parameter, the latter is passing setTimeout a function as a parameter.

http://stackoverflow.com/comment/46673703
has text: @aldel there are such use cases: see for example scores table at nhl.com - http://www.nhl.com/ice/scores.htm?navid=nav-scr-main - it's really useful and comfortable to have multiple videos consecutively running
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29227588
score: 0

http://stackoverflow.com/a/29339810
has comment: http://stackoverflow.com/comment/46867361
has comment: http://stackoverflow.com/comment/46867311
answers question: http://stackoverflow.com/q/29339746
has comment: http://stackoverflow.com/comment/46867126
has body: In case you want just in javascript: function temp() //called on click of delete button { document.getElementById("collapseApprovedUsers").className += " in"; }
type: Answer
has comment: http://stackoverflow.com/comment/46875539
score: 0
has comment: http://stackoverflow.com/comment/46867940

http://stackoverflow.com/comment/51677848
score: 0
has text: I had already found the answer before he had posted. So, it wasn't helpful to me, because I already found out the answer. However you are right, he did try to help. So I can give him an upvote. But can't accept the answer.
comment on: http://stackoverflow.com/q/29342054
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46804236
score: 0
type: AnswerComment
type: Comment
has text: I was looking for similar program two mouths ago. I found autohotkey is super and very flexible program. There is a windows shortcut key for minimizing all windows (not winkey+m and winkey+shift+m) winkey+d but with autohotkey i binded it for one key (Numpad+). And now i found this page http://www.autohotkey.com/board/topic/8227-can-ahk-open-those-windows-minimized-in-sys-tray/ I think i can try to do this by pid or class name ... https://www.autohotkey.com/docs/commands/WinMaximize.htm
comment on: http://stackoverflow.com/a/29303341

gwt
tags question: http://stackoverflow.com/q/29296730
tag name: gwt
tags question: http://stackoverflow.com/q/29231533
tags question: http://stackoverflow.com/q/29343695
type: Tag
tags question: http://stackoverflow.com/q/29297873
tags question: http://stackoverflow.com/q/29263440
tags question: http://stackoverflow.com/q/29268349
tags question: http://stackoverflow.com/q/29295380
tags question: http://stackoverflow.com/q/29342521

http://stackoverflow.com/a/29344542
has comment: http://stackoverflow.com/comment/46875633
score: 0
type: Answer
has body: In your PHP file you ll need to output some javascript code like this // PHP file where your checks are making flag = true echo '&lt;script type="text/javascript"&gt; var flag = true; &lt;/script&gt;'; and // PHP file where your checks are making flag = false echo '&lt;script type="text/javascript"&gt; var flag = false; &lt;/script&gt;'; then DO NOT re-assign value to your flag with your javascript. remove the var flag = false; from your javascript. Be careful, the PHP must echo BEFORE your js code (so your flag will take a value first then your js will work with it).
answers question: http://stackoverflow.com/q/29342473

http://stackoverflow.com/a/29245963
type: Answer
has body: I have been able to identify couple of problems with your code... you handle the sessiondesc from socket only after the person clicks on the connect button, so when tab1 emits that, tab2 does not catch it. Second, when tab2 sends offer and tab1 tries to add it, it's peerConnection has already created offer, so cannot create answer( this part is my assumption that PeerConnection can either only create offer or create answer. )
answers question: http://stackoverflow.com/q/29243759
score: 0

http://stackoverflow.com/comment/46787680
score: 0
type: QuestionComment
type: Comment
has text: can you please update this code JSFIDDLe (it should work for chrome) or is it possible to provide the live website, where we can check.
comment on: http://stackoverflow.com/q/29295602

http://stackoverflow.com/q/29271176
upvote count: 2
type: Question
tagged with: sails.js
tagged with: javascript
answer count: 1
downvote count: 0
has title: How can Sails.js hook routes be wired to policies?
favorite count: 0
has answer: http://stackoverflow.com/a/30569742
type: UnansweredQuestion
has body: When defining routes in a Sails.js hook in routes.after, it appears that these routes are added after the policies are bound to routes. Does anyone know how such routes can be made to honour the polices? The use-case is a hook that represents a pluggable behaviour such as a "blog" hook that adds it's own routes and models to the main application.
tagged with: node.js
score: 2

http://stackoverflow.com/a/29289501
score: 3
answers question: http://stackoverflow.com/q/29289442
upvote count: 3
type: AcceptedAnswer
has body: You need to escape the \\: console.log( (new RegExp('/videos/(\\d+)$')).test('/videos/1') );
type: Answer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29289442

http://stackoverflow.com/comment/46733299
has text: quick note, since you're using html5 markup: that llink element doesn't need a "type" if it's a rel=stylesheet *unless* it's not CSS
type: QuestionComment
comment on: http://stackoverflow.com/q/29265627
score: 0
type: Comment

http://stackoverflow.com/q/29345126
accepted answer: http://stackoverflow.com/a/29345390
has answer: http://stackoverflow.com/a/29345184
possible better answer: http://stackoverflow.com/a/29345184
type: AnsweredQuestion
type: Question
has title: Select all elements containing the same id
has answer: http://stackoverflow.com/a/29345390
has body: I want to iterate all elements that have id '#response_is_accepted' and be able to change their value to something. ie: val(1). I tried but my attempts are failing ie: (in js file) $('#response_is_accepted').each(function(i, obj) { alert($(this).text()); }); it always gives me undefined or blank in my alert. Accept jeje | about 13 hours ago Accept jeje | about 15 hours ago sa Accept jeje | about 15 hours ago Help please
tagged with: javascript
has answer: http://stackoverflow.com/a/29345255
score: 0
answer count: 3
has comment: http://stackoverflow.com/comment/46876671
has comment: http://stackoverflow.com/comment/46876418
tagged with: jquery
has comment: http://stackoverflow.com/comment/46876296

http://stackoverflow.com/a/29260932
accepted answer of: http://stackoverflow.com/q/29260304
has body: Since you want to download them to the file system, javascript is probably not a viable option. That being said, there is a ton of ways to do this. Open up your command line and navigate to the folder you want to dump the files in. If you're on Linux, you can use wget: for i in {1..9000}; do wget https://website/.../download/$i; done If you're on Windows, the easiest way to do this is probably still wget: FOR /L %i in (1,1,9000) do wget https://website/.../download/%i Hope that points you in a helpful direction.
type: Answer
answers question: http://stackoverflow.com/q/29260304
score: 2
upvote count: 2
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/29289499
type: Answer
answers question: http://stackoverflow.com/q/29289169
has body: The caveat is that the child iframe and parent iframe must be from the same domain. You'll need some JavaScript. I created a working fiddle. https://fiddle.jshell.net/zmr0m5qv/ var newNode = document.createElement('div'); newNode.style.bottom = 0; newNode.style.height ="25px"; newNode.style.left = 0; newNode.style.position = "fixed"; newNode.style.right = 0; newNode.style["z-index"] = 100; newNode.style["background-color"] = "yellow"; newNode.innerHTML = "sticky Text"; parent.document.body.appendChild( newNode );
has comment: http://stackoverflow.com/comment/46776174
score: 0
has comment: http://stackoverflow.com/comment/46776126

http://stackoverflow.com/q/29337433
has title: Using babel.js instead of browserify to compile to bundle
accepted answer: http://stackoverflow.com/a/29337621
tagged with: javascript
has body: I am starting out with babel.js to make use of JavaScript ES6 features, however I have run in to a problem I am currently building my app using browserify and reactify with the following command. browserify -t reactify app/main.js -o public/scripts/bundle.js Now I want to use an equivalent command in babel to bundle up my required modules, written in ES6 to a bundle.js. This doesn't work, just giving me an ES5 version of the main.js file. babel app/main.js -o public/scripts/bundle.js However I could compile my bundle.js file to an ES6 version with babel, having 2 commands browserify -t reactify app/main.js -o public/scripts/bundle.js babel app/main.js -o public/scripts/babel.js Is this the correct way to use babel with browserify? to bundle your modules with browserify and then convert the bundle to ES6?
tagged with: reactjs
tagged with: browserify
answer count: 1
downvote count: 0
favorite count: 0
tagged with: node.js
type: AnsweredQuestion
tagged with: babeljs
score: 7
upvote count: 7
has answer: http://stackoverflow.com/a/29337621
type: Question

http://stackoverflow.com/a/50376106
downvote count: 0
score: 7
answers question: http://stackoverflow.com/q/29299632
has body: After a bit of search I found a working solution: https://www.npmjs.com/package/html-to-rtf With html-to-rtf the conversion is easy (here's a piece of code based on browserify): var htmlToRtf = require('html-to-rtf'); var htmlText = "&lt;div&gt;...&lt;/div&gt;"; //or whatever html you want to transform var htmlAsRtf = htmlToRtf.convertHtmlToRtf(htmlText); // html transformed to rtf This solution worked for me. Without browserify you'll have to find implied js inside downloaded modules with npm and link them to your html page.
type: Answer
upvote count: 7

http://stackoverflow.com/comment/46794708
score: 0
type: Comment
has text: Yes, you're correct. I just realized this. I will grant you the check when I can.
type: AnswerComment
comment on: http://stackoverflow.com/a/29299968

http://stackoverflow.com/q/29242075
tagged with: javascript
answer count: 2
has comment: http://stackoverflow.com/comment/46690231
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
favorite count: 0
has title: javascript seems to allow to get a html object directly by its id?
has answer: http://stackoverflow.com/a/29242330
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29242184
has comment: http://stackoverflow.com/comment/46690223
linked to: http://stackoverflow.com/q/3434278
score: 3
upvote count: 3
duplicate of: http://stackoverflow.com/q/3434278
has body: Recently I have noticed something strange in my friends code. At first I thought that it was a mistake, but then I tested it and it seems to work. Please check out this simple code (notice "button_test.click()"): click! Why DOES it work? Where the "button_test" object is defined? I thought that I have to write document.getElementById("button_test") or $("#button_test") using jQuery to get a HTML element, but it seems to be unnecessary. Interestingly I get message "ReferenceError: button_test is not defined" when I move "button_test.click();" line to header.
type: Question

http://stackoverflow.com/comment/46718182
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29257500
has text: how do we know it's a code problem and not a search term issue? Are cases the same in terms and values? Are you placing spaces correctly?
score: 0

http://stackoverflow.com/comment/46983578
type: AnswerComment
comment on: http://stackoverflow.com/a/29333571
has text: @gerdi When you have enough reputation, you can 'review' posts, there is a set list of comments that you can flag an item with.
type: Comment
score: 0

http://stackoverflow.com/comment/46654087
type: AnswerComment
comment on: http://stackoverflow.com/a/29221818
type: Comment
has text: Here is the website: www.voilanorbert.com. Try it yourself.
score: 0

http://stackoverflow.com/comment/46680549
comment on: http://stackoverflow.com/q/29237239
score: 4
type: Comment
has text: Your HTML is invalid. The only child elements of a TR are TD or TH.
type: QuestionComment

http://stackoverflow.com/a/29326619
downvote count: 0
has comment: http://stackoverflow.com/comment/46862915
type: AcceptedAnswer
upvote count: 3
has body: Please have a look at my example: http://jsfiddle.net/s7p0zavy/ Suppose I have the $scope.items as following: $scope.items = [ { makes: [ {name: 'make01', models: [ {name:'model0101', years:['111','112']}, {name:'model0102', years:['121', '122']} ] }, {name: 'make02', models: [ {name:'model0201', years:['211','212']}, {name:'model0202', years:['221', '222']} ] } ] } ]; Then I can display it information as below: Make Model Year
type: Answer
accepted answer of: http://stackoverflow.com/q/29321589
answers question: http://stackoverflow.com/q/29321589
score: 3

http://stackoverflow.com/comment/46715503
score: 0
type: QuestionComment
has text: PartialView is .cshtml... I have used this in my other module it works there....Because i am posting here `file` so it is giving error..
type: Comment
comment on: http://stackoverflow.com/q/29256259

http://stackoverflow.com/comment/46810761
type: AnswerComment
has text: ?? you mean ?
type: Comment
score: 0
comment on: http://stackoverflow.com/a/29290022

http://stackoverflow.com/q/29365500
duplicate of: http://stackoverflow.com/q/11472273
tagged with: javascript
score: 0
tagged with: html5-canvas
has comment: http://stackoverflow.com/comment/46913966
answer count: 1
has title: Make a Canvas Transparent
favorite count: 0
linked to: http://stackoverflow.com/q/11472273
accepted answer: http://stackoverflow.com/a/29372889
has body: I have a canvas with an id #cnv. &lt;canvas id="cnv"&gt;&lt;/canvas&gt; &lt;img id="img" src=""&gt;&lt;/img&gt; I converted the canvas to an image using the code below: var a = document.getElementById("img"); a.src = document.getElementById("cnv").toDataURL(); After doing so, I save the image in physical disk.Below is the result image: It's background is white and not transparent. I want to make the image transparent except the lines that is drawn into it.How will I do that?
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29372889
upvote count: 1
downvote count: 1
type: Question

http://stackoverflow.com/q/29251006
type: Question
answer count: 1
tagged with: computed-observable
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/29251808
accepted answer: http://stackoverflow.com/a/29251808
tagged with: ko.observablearray
has title: Filtering observableArray
type: AnsweredQuestion
tagged with: knockout.js
has body: I have troubles with filtering observable array with knockout.js my js: Array containing data var docListData = [ { name: "Article Name 1", info: "Authors, name of edition, publishing year,(moreinfo?)", checked:ko.observable(false) }, { name: "Article Name 2", info: "Authors, name of edition, publishing year,(moreinfo?)", checked:ko.observable(false) }, { name: "Article Name 3", info: "Authors, name of edition, publishing year,(moreinfo?)", checked:ko.observable(false) } ]; viewmodel: var viewModel = function() { var self = this; Filling observable array with data self.docList = ko.observableArray( ko.utils.arrayMap(docListData, function (item) { return item; }) ); self.appendableData = ko.observableArray([]); Creating additional parameters in observable array for (var i=0; i < self.docList().length; i++){ self.docList()[i].type = "document"; self.docList()[i].id = i; self.docList()[i].pos = ko.observable(-1); // self.docList()[i].pos = -1; self.appendableData().push(self.docList()[i]); }; Function that changes additional values in my observable array and logs changes to console toggleChecked = function (){ this.checked(!this.checked()); if (this.checked() === true){ this.pos = self.position; // changes value, but doesn't affect target array self.appendableData()[this.id].pos = self.position; //second try, same result self.position++; console.log("this.pos",this.pos); console.log("this id: ", this.id); } else if(this.checked() === false) { this.pos = self.position; self.position--; console.log("this.pos",this.pos); console.log('nope'); }; console.log("position for next: ",self.position); console.log(self.appendableData()); console.log(self.appendableDataToView()); }; manual changes affect target array self.appendableData()[2].pos =2; // this affects target array filtering function returns an empty array: self.appendableDataToView = ko.computed(function () { return ko.utils.arrayFilter(self.appendableData(), function (item) { return item.pos >= 0; }); }); my html cod…

http://stackoverflow.com/comment/46700050
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29247466
has text: This isn't valid JS. What is the `else` connected to? What is the `farm` element? An `input`? Then you'll need to get its `value`, not its `innerHTML`.

http://stackoverflow.com/q/29268706
tagged with: javascript
answer count: 2
upvote count: 1
has comment: http://stackoverflow.com/comment/46739034
favorite count: 0
has answer: http://stackoverflow.com/a/29268953
has title: How to reference javascript object function from onclick string
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46738773
has comment: http://stackoverflow.com/comment/46738842
has body: I have an object where I build the html and want to bind the div tag to onclick but can't seem to find the right way to do it. function person(obj){ this.init(obj); } person.prototype = { init: function(){ var html = ''; for(i = 0; i &lt; obj.length; i++){ html += '&lt;div onclick="myFunction()"&gt;'+obj[i].name+'&lt;/div&gt;'; } $(html).appendTo('.people'); function: myFunction(){ console.log('hello'); } } What is the best way to bind myFunction() and have it work? I tried nesting the function in init() and I tried putting it at the same level as the init function. I realize that the div is not in the dom yet so it's not registering but I would like to find the best way to do this.
has comment: http://stackoverflow.com/comment/46739150
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/29268888
type: Question
tagged with: object
has comment: http://stackoverflow.com/comment/80492597

http://stackoverflow.com/comment/46660873
score: 0
comment on: http://stackoverflow.com/q/29226714
has text: I have given 1.4.2 in my template file and in one of the commonly used JSP
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29268999
score: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/29498265
has comment: http://stackoverflow.com/comment/46776312
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46776685
has comment: http://stackoverflow.com/comment/46748770
tagged with: tumblr
has title: No Authentication Pop up with Tumblr Like link
has answer: http://stackoverflow.com/a/29498265
tagged with: tumblr-themes
type: Question
has body: As of now I am building out a custom Tumblr page which is basically aggregating post content into 1 page. Problem is, we can't use the Tumblr tags for the Like, we have successfully gotten the Reblog to work, but when ever I try and use an hrefed to this pattern, 'http://www.tumblr.com/like/'+oath+'?id='+id' and /unlike/ for unliking the post. I can't get anything but an access denied page to come up.. Shouldn't I at least be seeing an authentication pop-up of some kind? Not sure what else to do here. Need to get this LIKE functionality working, and using the Tumblr {like button} is not an option since we aren't using a {posts block} rather pulling all our content in via JSON API.
tagged with: javascript

http://stackoverflow.com/a/29278216
score: 1
upvote count: 1
has body: I just made a snippet code which show a possible answer $("#search").keyup(function(e){ var qr = $("#search").val(); if(qr=="") { $("#frined-replace").html($("#frined-replace-bck").html()); $("#frined-replace-bck").remove(); $("#erase").empty(); return; } if (!$('#frined-replace-bck').length) { var backup = $("#frined-replace").clone(); backup.prop('id', 'frined-replace-bck'); backup.css('display', 'none') $("#frined-replace").before(backup); } //Replace with your ajax call $("#frined-replace").html(' ' + qr + ' '); //$("#search").val(''); //$('#search').val('').empty(); }); My initial content
answers question: http://stackoverflow.com/q/29277882
downvote count: 0
type: Answer

http://stackoverflow.com/q/29272384
has comment: http://stackoverflow.com/comment/46745491
type: Question
has comment: http://stackoverflow.com/comment/46747300
answer count: 2
downvote count: 0
has answer: http://stackoverflow.com/a/29318502
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/29318502
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46745543
favorite count: 0
has comment: http://stackoverflow.com/comment/46744920
upvote count: 2
has body: My HTML like this Next My js for scroll-left $('#next').click(function() { $('#container').animate({ scrollLeft: $('#container').scrollLeft() + 400 }); }); css #container{ overflow-x:hidden; overflow-y:hidden; } .Element{ width:100%; height:50%; position:absolute; height:50%; } I tried to display the div tag with position:absolute with scrollLeft function. But scrollleft is not working on position:absolute. But position:relative is works fine. I want to display the div tag with position absolute with scrolling option? How can i do it? JSFiddle http://jsfiddle.net/aja_aja/s9snvk5s/9/
possible better answer: http://stackoverflow.com/a/29275110
tagged with: css
has answer: http://stackoverflow.com/a/29275110
type: AnsweredQuestion
score: 2
has title: jQuery scroll left is not working when using position absolute?
has comment: http://stackoverflow.com/comment/46745442

http://stackoverflow.com/comment/46701676
score: 1
has text: What does `dat` return? Can you post that?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29248460

http://stackoverflow.com/a/29322072
has body: You are touching the main issue with P2P protocol, as you need your two peer to connect to each other ( sound simple, but it is complex on the internet ). It really depend on your network topology between your two computer. Direct connection Peer 1 --- Peer 2 this situation is perfect as there is no obstacle for 1 to connect to 2 and vice versa Routed connection Peer 1 --- Router --- Peer 2 You everyday situation on the internet, the ability for 1 to connect to 2 heavily depend on your router configuration (and more than often, you don't control the configuration of the routers that are in between). To overcome that situation there was multiple solution that were developed : uPnP : The Computer tells the router which port the computer is listening on that the router should be listening to and transfer the packet to the computer. It has a somewhat ok adoption rate but suffer from security issues. Stun and Turn Servers I real world scenario, peer to peer network rely on supernode to relay traffic in such case, there is nosuch thing for webRTC (except if you count Turn servers), as they would need to carry the charge of realtime video/audio traffic wich could be heavy when scaled to a lot of client.
answers question: http://stackoverflow.com/q/29308824
downvote count: 0
score: 1
type: Answer
has comment: http://stackoverflow.com/comment/77464523
upvote count: 1
has comment: http://stackoverflow.com/comment/77511593

checkbox
tags question: http://stackoverflow.com/q/29278702
tag name: checkbox
tags question: http://stackoverflow.com/q/29219042
tags question: http://stackoverflow.com/q/29336004
tags question: http://stackoverflow.com/q/29307314
tags question: http://stackoverflow.com/q/29227753
tags question: http://stackoverflow.com/q/29264843
tags question: http://stackoverflow.com/q/29262639
tags question: http://stackoverflow.com/q/29320439
tags question: http://stackoverflow.com/q/29284310
tags question: http://stackoverflow.com/q/29225283
tags question: http://stackoverflow.com/q/29240445
tags question: http://stackoverflow.com/q/29273158
tags question: http://stackoverflow.com/q/29239822
tags question: http://stackoverflow.com/q/29240516
tags question: http://stackoverflow.com/q/29322249
tags question: http://stackoverflow.com/q/29329318
tags question: http://stackoverflow.com/q/29314312
tags question: http://stackoverflow.com/q/29326912
tags question: http://stackoverflow.com/q/29220837
tags question: http://stackoverflow.com/q/29242048
type: Tag
tags question: http://stackoverflow.com/q/29313688
tags question: http://stackoverflow.com/q/29320048
tags question: http://stackoverflow.com/q/29339599
tags question: http://stackoverflow.com/q/29344377
tags question: http://stackoverflow.com/q/29267005
tags question: http://stackoverflow.com/q/29275543
tags question: http://stackoverflow.com/q/29238299
tags question: http://stackoverflow.com/q/29271633

http://stackoverflow.com/a/29232370
answers question: http://stackoverflow.com/q/29231249
type: Answer
has body: Give different id for different form and use the simple way bellow document.getElementById("your_form_id").submit();
score: 0

http://stackoverflow.com/comment/46710390
score: 0
type: AnswerComment
has text: On a given system. :). The same instance can have a different hashcode on a different machine
type: Comment
comment on: http://stackoverflow.com/a/29253509

http://stackoverflow.com/a/34001042
downvote count: 0
type: Answer
upvote count: 3
has body: This question has already been answered, but if you use React Native on Android, you might have that same problem. For me, solution was using source={{ uri: "google", isStatic: true }} instead of source={required('./bg.png')}. Just don't forget to add your images in src/main/res/drawable folder.
has comment: http://stackoverflow.com/comment/65588326
score: 3
answers question: http://stackoverflow.com/q/29308937

http://stackoverflow.com/a/29341753
has comment: http://stackoverflow.com/comment/46872338
answers question: http://stackoverflow.com/q/29338433
score: 0
type: AcceptedAnswer
has body: It is quite difficult to determine the name of the user, because the system does not really know it. The closest you can use automatically would be the login name of the user. There is a JavaScript property which represents the login name of the user. However, for privacy reasons, this property is only accessible when Acrobat/Reader starts up. In order to make it available for the document, you'd have to install an application-level script which would read out the login name and make it available in a (global) variable. This is rather impractical and only possible if you have control over your user's machine. An alternative is a bit kludgy, but would work, is to create an annotation (for example freetext), and display the author property of the annotation. If not changed elsewhere, this would be the login name. Another approach would be showing a app.answer() dialog where the user has to enter the name, and then you can fill that answer into the text fields where you want it to appear.
has comment: http://stackoverflow.com/comment/46912417
has comment: http://stackoverflow.com/comment/46871886
has comment: http://stackoverflow.com/comment/47168769
type: Answer
has comment: http://stackoverflow.com/comment/47173922
accepted answer of: http://stackoverflow.com/q/29338433
has comment: http://stackoverflow.com/comment/46881876

http://stackoverflow.com/comment/92137312
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29353344
has text: If Type(V) is not Reference, return V. When will Type(V) will not be a reference. Is it in case of literals ??
type: AnswerComment

http://stackoverflow.com/comment/46875242
comment on: http://stackoverflow.com/q/29344284
has text: Why do you have `contentType: 'text/plain',`? You are making a GET request. There is no content to describe the type of.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29362701
tagged with: angularjs
has answer: http://stackoverflow.com/a/29362765
type: UnansweredQuestion
downvote count: 2
has comment: http://stackoverflow.com/comment/46909169
has comment: http://stackoverflow.com/comment/46909292
has comment: http://stackoverflow.com/comment/46909068
has comment: http://stackoverflow.com/comment/46909100
has comment: http://stackoverflow.com/comment/46909121
has body: I started out with Angular and came across this code that should work, but it doesn't. Angular is downloaded and added via the script tag and it is correct, others tutorials worked before. I have tried everything but just doesnt seem to find out what's the problem. Started learning from the book AngularJS from O'Reilly. Angular Training {{ name }} remove https://jsfiddle.net/eqk5adc1/3/
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/46909135
upvote count: 0
score: -2
has title: AngularJS - simple tutorial wont work
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/46910704
has answer: http://stackoverflow.com/a/29464250

http://stackoverflow.com/comment/46689460
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29236470
has text: That is not intentional! Good catch. They should each consist of a single digit to be matched on. I thought I had figured it out....
score: 0

http://stackoverflow.com/comment/46844449
comment on: http://stackoverflow.com/a/29327073
has text: Lol np, I was just saying. Stackoverflow is all about helping. Have fun.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/29308369
has title: HTML5 Can I use with
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has answer: http://stackoverflow.com/a/29308421
score: 1
favorite count: 0
tagged with: http://stackoverflow.com/tag/svg
linked to: http://stackoverflow.com/q/980855
type: UnansweredQuestion
has body: I wonder if I can use tag &lt;img&gt; like &lt;video&gt;. When I want to add a video to my website I use: &lt;video&gt; &lt;source src="movie.mp4" type="video/mp4"&gt; &lt;source src="movie.ogg" type="video/ogg"&gt; &lt;/video&gt; The result is that browser loads only first file, which are supported. It's possible to do the same with &lt;img&gt;? I want to add icons in svg and png/jpg format, so browser will loads the one, which support. Or maybe is better to do it with some Javascript to detect user-agent and then replace graphics in other format?
has comment: http://stackoverflow.com/comment/46810769
upvote count: 1
type: Question
downvote count: 0
tagged with: javascript

http://stackoverflow.com/a/32219548
has body: Here is what you can do: retrieve the file size with stat / stat.ST_SIZE, decide on a chunk size, call PySide.QtGui.QProgressBar.setRange() with the correct range, which is 0 to number of blocks ( filesize / ftp transfer chunk size ) for binary files or number of lines for text files. pass a callback to ftplib.FTP.storbinary() or ftplib.FTP.storlines() so that each block / line transferred increases your progress bar accordingly with PySide.QtGui.QProgressBar.setValue()
downvote count: 0
answers question: http://stackoverflow.com/q/29343042
has comment: http://stackoverflow.com/comment/52329638
upvote count: 2
type: Answer
score: 2

web-container
tag name: web-container
tags question: http://stackoverflow.com/q/29219464
type: Tag

http://stackoverflow.com/a/29511824
score: 4
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/55599893
accepted answer of: http://stackoverflow.com/q/29286050
upvote count: 4
has body: I found solution to this.The problem here is with the data size. Web socket protocol has its limitation on message size. Better follow RFC standards before implementation. Explained here rfc6455#section-5.2
answers question: http://stackoverflow.com/q/29286050

html5-canvas
tags question: http://stackoverflow.com/q/29223869
tags question: http://stackoverflow.com/q/29352971
tags question: http://stackoverflow.com/q/29335972
tags question: http://stackoverflow.com/q/29276855
tags question: http://stackoverflow.com/q/29220836
tags question: http://stackoverflow.com/q/29300411
tags question: http://stackoverflow.com/q/29276441
tags question: http://stackoverflow.com/q/29238244
tags question: http://stackoverflow.com/q/29232129
tags question: http://stackoverflow.com/q/29315589
tags question: http://stackoverflow.com/q/29307168
tags question: http://stackoverflow.com/q/29227890
tags question: http://stackoverflow.com/q/29291499
tags question: http://stackoverflow.com/q/29301331
tags question: http://stackoverflow.com/q/29305220
tags question: http://stackoverflow.com/q/29229178
tags question: http://stackoverflow.com/q/29328299
tags question: http://stackoverflow.com/q/29365500
tag name: html5-canvas
tags question: http://stackoverflow.com/q/29352106
tags question: http://stackoverflow.com/q/29321259
tags question: http://stackoverflow.com/q/29307186
type: Tag
tags question: http://stackoverflow.com/q/29280253

http://stackoverflow.com/q/29243575
tagged with: arrays
downvote count: 0
score: 1
favorite count: 0
type: Question
has answer: http://stackoverflow.com/a/29243803
tagged with: lodash
upvote count: 1
answer count: 1
accepted answer: http://stackoverflow.com/a/29243803
tagged with: underscore.js
tagged with: javascript
has body: Using Underscore (technically Lodash). Have an object that looks like the following. var myObj = { first: {name: 'John', occupation: 'Welder', age: 30}, second: {name: 'Tim', occupation: 'A/C Repair', kids: true}, third: {name: 'Dave', occupation: 'Electrician', age: 32}, fourth: {name: 'Matt', occupation: 'Plumber', age: 41, kids: false} }; I also have a hash of arrays that I want to "clean" out of each object: var excludes = { first: ['name', 'age'], second: ['occupation'], fourth: ['kids] }; The idea is that each of the elements in the array will be dropped from the object that has the matching key. Meaning my data will end up like this: { first: {occupation: 'Welder'}, second: {name: 'Tim', kids: true}, third: {name: 'Dave', occupation: 'Electrician', age: 32}, fourth: {name: 'Matt', occupation: 'Plumber', age: 41} }; I was originally trying: _.map(myObj, function(obj, k) { if(_.has(excludes, k) { // not sure what here } }); I was thinking of using omit at the innermost level, but I can only drop one key at a time, not a list of keys.
has title: Omit array of keys with Underscore
type: AnsweredQuestion

http://stackoverflow.com/comment/46915172
type: Comment
comment on: http://stackoverflow.com/q/29365710
score: 0
has text: @Razzildinho sorry, i try to reproduce my problem in code snippet. but failed. It looks like this [problem](http://stackoverflow.com/questions/25241645/angularjs-escaped-characters-in-model-assigned-to-input-value)
type: QuestionComment

http://stackoverflow.com/q/29250404
type: Question
tagged with: javascript
has title: Parse cloud code is not logging/alerting on success or failure
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/34535912
tagged with: parse-platform
has answer: http://stackoverflow.com/a/29255136
has body: I am a newbie in Parse.com cloud code. I am trying to query a table which has a particular column having a request parameter which I am supplying. The query is: Parse.Cloud.define("newPostNotification", function(request, response) { Parse.Cloud.useMasterKey(); var userId = request.params.userid; console.log("User Id "+userId); var query = new Parse.Query(Parse.ViewCount); query.equalTo('userId', userId); query.first({ success: function(object) { /* var userString = request.params.username; response.success(userString); */ alert("Success!"); }, error: function(error) { alert("Error: " + error.code + " " + error.message); } }); }); I am utterly confused as why I cannot see the the alert messages for success or failure! Please rectify me where I am wrong!
type: UnansweredQuestion

http://stackoverflow.com/comment/46689531
type: Comment
comment on: http://stackoverflow.com/a/29240396
score: 0
has text: @ManuSoman You should check the console to see what you get back. But if you want to pass information from php to javascript you really should use json instead.
type: AnswerComment

http://stackoverflow.com/comment/46798004
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29301307
has text: Great! This is the answer to my question!
type: AnswerComment

http://stackoverflow.com/comment/46671567
type: Comment
comment on: http://stackoverflow.com/q/29231533
type: QuestionComment
has text: @Baz: I am editing the file in Eclipse but I have changed the encoding to UTF-8 in the file properties but still having the same problem.
score: 0

http://stackoverflow.com/q/29238238
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/29238731
has body: I need to Know how i can make array in java script from css class and html class Here is my HTML: Alexandria Is very nice city. List page 1 Cairo Is very nice city. List page 2 and my CSS: .list_City0, .list_City1,.list_City9{ background-size:cover; position:absolute; width:300px; height:300px; z-index:9999; display:none; margin-left:220px; top:30px; box-shadow:4px 4px 5px #888; overflow:hidden; border-radius:10px; } i write in java script this because i dont like to write more onne line to do this var htmlarraycity=[$(".img-list0"),$(".img-list1"),$(".img-list9")]; var cssarraycity= [$(".list_City0"),$(".list_City1"),$(".list_City9")]; for(i=0;htmlarraycity[i].length;i++){ (htmlarraycity[i]).hover(function(){ (cssarraycity[i]).fadeIn(1000); }); (htmlarraycity[i]).mouseleave(function(){ (cssarraycity[i]).hide(); });
upvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
score: -2
tagged with: css
accepted answer: http://stackoverflow.com/a/29238731
has answer: http://stackoverflow.com/a/29238723
has title: Fade in elements on hover of their parent
downvote count: 2
has comment: http://stackoverflow.com/comment/46682893
possible better answer: http://stackoverflow.com/a/29238723
type: AnsweredQuestion

http://stackoverflow.com/a/29313562
accepted answer of: http://stackoverflow.com/q/29313455
type: Answer
upvote count: 1
score: 1
has body: First off, you don't want to use $timeout in this case, you want to use $interval Second, ng-style already expects an angular expression, so there is no need for the {{}}. All I did was change the expression to be syntactically correct. var app = angular.module('myApp', []); app.controller('TimeCtrl', function($scope,$interval, $filter) { $scope.clock = "loading clock"; // initialise the time variable $scope.tickInterval = 1000 //ms var tick = function () { $scope.clock = Date.now() // get the current time $scope.a = $filter('date')($scope.clock,'HHmmss'); } // Start the timer $interval(tick, $scope.tickInterval); }) {{a}}
answers question: http://stackoverflow.com/q/29313455
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/29362427
has comment: http://stackoverflow.com/comment/46908586
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29362726
type: Question
has answer: http://stackoverflow.com/a/29362579
tagged with: javascript
score: 0
has title: change font color of content under ul , on hover
answer count: 2
has comment: http://stackoverflow.com/comment/46908789
tagged with: jquery
accepted answer: http://stackoverflow.com/a/29362579
has body: .text-right %ul#conversation %li %ul.btnClear %li - unless statement == Statement.featured.first = link_to "", display_featured_path(:current_featured_statement_id =&gt; statement.id, :direction =&gt; "previous"), :remote =&gt; true, :class=&gt; "fa fa-play" %li - unless statement == Statement.featured.first = link_to "PREVIOUS", display_featured_path(:current_featured_statement_id =&gt; statement.id, :direction =&gt; "previous"), :remote =&gt; true, :class=&gt; "" trying to either put the ul under a button with a hover affect, or change all text under the ul on hover. I can get the individual a under the ul to change, but I need everything to change on the hover over -- when you hover over any portion of the ul. The font awesome icon and the link. .btnClear:hover , li ul.btnClear:hover, ul#conversation li ul:hover{ color: #4dbbca !important; /*background: transparent !important;*/ text-decoration: none; cursor: pointer; background-color: yellow; } I can get the background to change with the CSS above, but I need all text content under the entire ul. If I specify the > a , it just changes the individual 'a' on hover, not both at the same time, as you would expect.
tagged with: haml
has answer: http://stackoverflow.com/a/29362726
has comment: http://stackoverflow.com/comment/46908823
tagged with: css

http://stackoverflow.com/q/29227926
tagged with: http://stackoverflow.com/tag/html
has body: I have these two dropdown menus that generates a picture that pops up depending on selection. But I also want the selected values to be inserted into the text on the same page when the "View your product" button is pressed. function f(){ var gid=function(i){return document.getElementById(i);}; var version_id=gid("two").value; var arch_id=gid("three").value; var width = 670; var height = 800; var left = (screen.width/2)-(width/2); var top = (screen.height/2)-(height/2); if( version_id ==='default' || arch_id === 'default'){return;} window.open('images/shop/' + version_id + '_' + arch_id + '.jpg', "_blank", 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width='+width+', height='+height+',top='+top+', left='+left ); } Chose frame Chose fabric
accepted answer: http://stackoverflow.com/a/29228268
has comment: http://stackoverflow.com/comment/46662898
has title: Want selected values inserted in the text
has comment: http://stackoverflow.com/comment/46663277
has comment: http://stackoverflow.com/comment/46662773
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46662980
has comment: http://stackoverflow.com/comment/46662931
type: Question
has comment: http://stackoverflow.com/comment/46663203
has answer: http://stackoverflow.com/a/29228268
has comment: http://stackoverflow.com/comment/46662831
answer count: 1
tagged with: javascript
score: 0

http://stackoverflow.com/comment/46761815
comment on: http://stackoverflow.com/q/29281886
score: 0
type: Comment
type: QuestionComment
has text: `chkCheckboxA` would be `undefined` as it's not a `DOM object`. If you really need to do the way you did, `document.getElementById('chkCheckboxA').value`

http://stackoverflow.com/q/29222970
score: 1
tagged with: jquery
possible better answer: http://stackoverflow.com/a/29223190
favorite count: 0
has body: After gotten help from @michael-p who had made a script that works excellent, i was looking for some code that could work better in my new situation (old topic link). The "container" class or id (as shown below) displays flexbox content ("box") who go from top to bottom and when reaching the bottom makes another row to the right en start over. This was a issue because as explained in my old topic, Chrome doesn't recognize the flexbox content and does not stretch the width. Michael P solved this however through some scripting but the script was made for one "container" class (it freaks out when multiple divs has the same class name, because they have different amount of "box" classes inside it, so different widths). What i would like to achieve: A script (can be modified from Michael-P script) that focuses only in the div that its placed in, and stops when the div stops, so there would be no need to specify a certain class by name. Doing so there would be no limit of how many div copies there could be with the same class name but different amount of "box" contents in it. Fiddle from Michael P 1 2 3 4 5 6 7 8 9 10 11 12 13 maybe here the script? that stops when is shown? Script // Find the biggest offset right var maxOffsetRight = 0, currentOffsetRight; $('#container').children().each(function(index) { currentOffsetRight = $(this).position().left + $(this).outerWidth(true); if (currentOffsetRight > maxOffsetRight) { maxOffsetRight = currentOffsetRight; } }); $('#container').css('width', maxOffsetRight);
has answer: http://stackoverflow.com/a/29223190
has comment: http://stackoverflow.com/comment/46654883
linked to: http://stackoverflow.com/q/29109863
type: Question
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/29223334
has comment: http://stackoverflow.com/comment/46654754
upvote count: 1
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29223334
has title: Script that change the width of multiple divs with the same class name
answer count: 2
tagged with: flexbox
type: AnsweredQuestion
downvote count: 0

http://stackoverflow.com/q/29240730
downvote count: 2
has comment: http://stackoverflow.com/comment/46689113
has title: JavaScript onbeforeunload() function not submiting form
type: Question
has answer: http://stackoverflow.com/a/29241617
score: -2
has comment: http://stackoverflow.com/comment/46687914
answer count: 2
has comment: http://stackoverflow.com/comment/46687641
upvote count: 0
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/46689446
type: UnansweredQuestion
has body: I have a form called "myForm" that I install handler into in order to capture the form data when the form is moved off of. What I find is the form data is not posted when the user moves away from the form. onchange works but does not capture data when the form is left. Yahoo
has answer: http://stackoverflow.com/a/29240943
tagged with: onbeforeunload

http://stackoverflow.com/q/29229922
answer count: 3
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/29230162
tagged with: web
tagged with: css
has answer: http://stackoverflow.com/a/29230162
favorite count: 0
has comment: http://stackoverflow.com/comment/46666760
has answer: http://stackoverflow.com/a/29230218
upvote count: 1
has comment: http://stackoverflow.com/comment/46666559
has comment: http://stackoverflow.com/comment/46666658
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29230284
has title: How do I align one li to the right and have a dropdown list down from it?
score: 1
type: Question
accepted answer: http://stackoverflow.com/a/29230218
downvote count: 0
tagged with: javascript
has body: Here is the webpage: http://codepen.io/anon/pen/QwYKQM So I am a beginner web designer/programmer and I am just trying to make something to learn myself CSS and HTML (and JavaScript), but I seem to have a problem aligning the 'Archive' to the right of the list, beneath the search box and make the drop down list appear beneath the menu class and 'over' the main content area. I have tried floating it right, but the list element just 'floated' above the others a little. Also, when I hover above the main list If you feel like it, please leave some advice to the look and the feel of the webpage and what I can do further. This is the CSS for the menu: .menu { margin-left: 10px; } .menu ul li{ display: inline-block; transition: all 0.3s; } .menu ul li ul { display: none; opacity: 0; } .menu ul li ul li { float: right; } .menu ul li:hover ul { display: block; opacity: 1; visibility: visible; } .menu ul li ul li a:hover { background-color: #333; } .menu ul li:hover { background-color: #333; } .menu ul li a { color: #fff; display: inline-block; padding: 5px; margin: 2px; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7); }

http://stackoverflow.com/comment/46904626
has text: You are right Jeph, the code is corrected now, I also noticed the fiddle wasn't updated, please check it out again. Don't worry for the upvote, it's cool to help you anyway.
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29290221

http://stackoverflow.com/comment/46712394
comment on: http://stackoverflow.com/a/29242167
score: 0
type: AnswerComment
has text: If you use jQuery, you can attach to the submit button's click event, or the submit event for the form without modifying the form HTML. Other Javascript frameworks probably have this capability, but I use jQuery. You could probably manually code it too if it's not an option...
type: Comment

http://stackoverflow.com/comment/46876654
comment on: http://stackoverflow.com/q/29345224
score: 2
has text: Add `async:false` flag to the ajax call, but that kinda defeats the whole purpose of asynchronous call.
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29248527
accepted answer: http://stackoverflow.com/a/30221721
type: AnsweredQuestion
has body: I'm getting an JS error in IE8 but for the life of me cannot seem to find a reason to why this error is firing. I'm referencing a JSON file that has been requested and parsed with jQuery's $.getJSON(). Once that is done, I use an event (pub/sub) that is fired and from there do what ever I need to do with the parsed JSON file. All good until, IE8 throws an error on the imgPath variable declaration (below). I'm loading an image into a &lt;img&gt; tag through the src attribute. //This is function is inside a object IE8_loadImage: function($root, data) { var self = this, $comp = $root.data('comp').parent, $imgHolder = $root.data('comp').IE8holder, imgPath = $root.data('json')[data.scene][data.convo]['ie8Img']; console.log(typeof $root.data('json')); //outputs to 'object' console.log(imgPath); //outputs to 'images/1-0.jpg' console.log(typeof imgPath); //output 'string' console.log(typeof data.scene); //output 'string' console.log(typeof data.convo); //output 'string' //Set the source $imgHolder.css('z-index', 5).attr('src', imgPath); }, The odd thing is that I can console.log out the imgPath variable and get the intended result from the JSON. The JSON (checked on jsonlint.com) file is as follows: { "demo": { "scene1": { "c0": { "text": "Lorem ipsum Tempor magna nisi non enim fugiat do dolor dolore esse aliquip irure ullamco cillum dolor reprehenderit eiusmod dolore irure commodo et reprehenderit voluptate dolore Ut in Duis tempor tempor esse et Duis enim.", "ie8Img": "images/1-0.jpg", "audio": { "source": "audio/s1-1.mp3", "autoplay": "true" } }, "c1": { "text": "Lorem ipsum Tempor magna nisi non enim fugiat do dolor dolore esse aliquip irure ullamco cillum dolor reprehenderit eiusmod dolore irure commodo et reprehenderit voluptate dolore Ut in Duis tempor tempor esse et Duis enim.", "ie8Img": "images/1-1.jpg", "audio": { "source": "", "autoplay": "false" } } } } Any idea, or just a second pair of eyes on why this could be happening – would be awesome! Thanks. Edit: The …
has comment: http://stackoverflow.com/comment/46703666
type: Question
has answer: http://stackoverflow.com/a/30221721
score: 0
has title: IE8 Error: is null or not an object, but can still trace/console log out
answer count: 1
has comment: http://stackoverflow.com/comment/46701735
tagged with: internet-explorer-8
tagged with: http://stackoverflow.com/tag/json
tagged with: javascript

http://stackoverflow.com/a/29317599
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/46827922
has comment: http://stackoverflow.com/comment/46844338
answers question: http://stackoverflow.com/q/29317439
accepted answer of: http://stackoverflow.com/q/29317439
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46828333
has comment: http://stackoverflow.com/comment/46827265
has comment: http://stackoverflow.com/comment/46827497
has comment: http://stackoverflow.com/comment/46827440
has comment: http://stackoverflow.com/comment/46844912
has comment: http://stackoverflow.com/comment/46827514
has body: page.evaluate() is the sandboxed page context in PhantomJS. It doesn't have access to any variable defined outside. So you cannot reference fs or page inside of it and you don't need to, because page.content is available in the outer context: page.open(file,function(){ fs.write(i + '.html', page.content, 'w'); setTimeout(next_page,100); }); The remaining code looks fine.
type: Answer
has comment: http://stackoverflow.com/comment/46827318
has comment: http://stackoverflow.com/comment/46827960
has comment: http://stackoverflow.com/comment/46828089
has comment: http://stackoverflow.com/comment/46827290
has comment: http://stackoverflow.com/comment/46827230
has comment: http://stackoverflow.com/comment/46827767

http://stackoverflow.com/a/29236360
downvote count: 0
has body: And why doesn't the good old Conditional step work for you? Add build step -&gt; Conditional (Single)
has comment: http://stackoverflow.com/comment/46688996
accepted answer of: http://stackoverflow.com/q/29230249
has comment: http://stackoverflow.com/comment/46682454
type: Answer
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/29230249
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46700758

http://stackoverflow.com/q/29220479
tagged with: jquery
has comment: http://stackoverflow.com/comment/46650532
tagged with: http://stackoverflow.com/tag/svg
answer count: 0
type: UnansweredQuestion
score: 0
has title: SVG Element Masking
type: Question
has body: I have a theoretical question regarding SVG elements. I have several elements that I want to hide in plain sight. You can't query them with Jquery when they have a display of none. If I put an svg element at that same location with a fill of none while not changing the display of the jquery element, will jquery find the svg element or the regular element at that position?
has comment: http://stackoverflow.com/comment/46650573
tagged with: javascript

http://stackoverflow.com/comment/47509664
comment on: http://stackoverflow.com/q/29284222
score: 0
type: Comment
type: QuestionComment
has text: Well, in my case new messages kept appending into the template and it would be rerendered for each message. Setting a timeout seemed like the only thing that worked, though it may not be in the book of Meteor's best practices.

http://stackoverflow.com/q/29303661
has comment: http://stackoverflow.com/comment/46802220
score: 0
has body: I have a js function readCookie which is currently reading value from 1 cookie named test1_cookie using regex. However I want the same function to read test2_cookie as well. What's the best way to do that? function readCookie(name) { var result = document.cookie.match(new RegExp('test1_cookie=([^;]+)')); result &amp;&amp; (result = JSON.parse(result[1])); return result ? result[name] : null; } I want to read test2_cookie as well. || does not work
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46801917
tagged with: regex
tagged with: cookies
has answer: http://stackoverflow.com/a/29303883
type: Question
has comment: http://stackoverflow.com/comment/46802286
answer count: 1
tagged with: javascript
has title: Reading values from multiple cookies

http://stackoverflow.com/comment/46801995
comment on: http://stackoverflow.com/q/29303746
score: 0
type: Comment
type: QuestionComment
has text: http://stackoverflow.com/help/how-to-ask

http://stackoverflow.com/q/29352886
has comment: http://stackoverflow.com/comment/46891337
has answer: http://stackoverflow.com/a/29353744
type: Question
answer count: 2
upvote count: 1
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/29353451
has title: Typeahead in angular js
score: 0
tagged with: typeahead
has body: I am new to angular js. I am trying to implement typeahead for the json data I get: format of json data is like: $scope.utilstates = [ { "State": "Florida", "Key": "FL", "Utility": [ "Bartow (City of) Electric", "Clay Electric Co-Op", "Florida Power &amp; Light", "FMG", "Gainesville Regional Utilities", "Gulf Power Company" ] }, { "State": "Texas", "Key": "TX", "Utility": [ "AEP-Texas (SWEPCO)", "Austin Energy", "Brownsville Public Utilities Board (TX)", "CenterPoint Energy (Reliant - HL&amp;P)"] }, { "State": "Virginia", "Key": "VA", "Utility": [ "DVP", "NOVEC"] } ]; In the html, I want the user to enter the utility company irrespective of state and should show the matching utility company. in html, I have this code: &lt;input type="text" ng-model="query.utility" typeahead="st as st.Utility for st in utilstates | filter:({Utility:$viewValue}) | limitTo:8" class="form-control" placeholder="Utilities"&gt; But I get complete array of values, instead of selected value from the matched array. Any help would be greatly appreciated. Plunker link: http://plnkr.co/edit/no0hATW5mHiIbuON6B9E?p=preview
downvote count: 1
has comment: http://stackoverflow.com/comment/46891204
tagged with: angularjs
type: UnansweredQuestion

http://stackoverflow.com/a/29361168
has comment: http://stackoverflow.com/comment/46906298
has comment: http://stackoverflow.com/comment/46906427
has comment: http://stackoverflow.com/comment/46906255
type: Answer
has comment: http://stackoverflow.com/comment/46907716
has comment: http://stackoverflow.com/comment/46906855
score: 1
has comment: http://stackoverflow.com/comment/46907514
has body: First of all add this '$' to your code: --$(this).attr("numberDiv");-- $(".divClassSelector").on("click", function(){ var numberDiv = $(this).attr("numberDiv"); alert(numberDiv); }); Also change your click function to $(document).on("click",".divClassSelector", function(){ var numberDiv = $(this).attr("numberDiv"); alert(numberDiv); });
has comment: http://stackoverflow.com/comment/46906274
accepted answer of: http://stackoverflow.com/q/29361140
answers question: http://stackoverflow.com/q/29361140
has comment: http://stackoverflow.com/comment/46907154
upvote count: 1
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46908699
has comment: http://stackoverflow.com/comment/46906577

http://stackoverflow.com/comment/114359825
has text: ESLint's opinion is that `Error` is preferred: https://eslint.org/docs/rules/prefer-promise-reject-errors
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29335411

http://stackoverflow.com/q/29222702
has title: Watchify doesn't emit update event
score: 2
type: Question
downvote count: 0
tagged with: javascript
tagged with: browserify
answer count: 1
favorite count: 0
upvote count: 2
has body: I'm trying to build my bundle.js automatically with watchify, but unfortunately no update event is ever triggered when I save files. var bundler = watchify(browserify({ debug: true, entries: ['./js/main.js'], transform: "babelify", cache: {}, packageCache: {}, fullPaths: true })) .on("update", function () { var updateStart = Date.now(); console.log(updateStart); return bundler .bundle() .pipe(exorcist(path.join(distPath, "bundle.js.map"))) .pipe(fs.createWriteStream(path.join(distPath, "bundle.js"))); }) .bundle() .pipe(exorcist(path.join(distPath, "bundle.js.map"))) .pipe(fs.createWriteStream(path.join(distPath, "bundle.js"))); When I use CLI the behavior is similar: Build runs once after start and that's it. watchify ./js/main.js -o js-dist/bundle.js -v I'm using OS X Yosemite.
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29525317
tagged with: watchify

http://stackoverflow.com/q/29231811
answer count: 2
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29232239
has body: I'm totally new to this field so please help me out. I've tried almost everything but nothing seems to be working. Actually, I want to add some text in my scroll to top button, which has already been made and working perfectly and it has an icon in it. But I want to add some text with that icon. Here's a link what I want to do! Following is the code I have in js file: // Append Button $("body").append($("&lt;a /&gt;") .addClass("scroll-to-top") .attr({ "href": "#", "id": "scrollToTop" }) .append( $("&lt;i /&gt;") .addClass("icon icon-chevron-up icon-white") )); where should I have to add the text, either in the above code file or into the code of my page? Help of any kind would be appreciated. Thanks in advance.
has comment: http://stackoverflow.com/comment/46670068
tagged with: scrolltop
type: AnsweredQuestion
has title: How can I add text in my scroll to top button which already has an icon in it
accepted answer: http://stackoverflow.com/a/29232031
type: Question
possible better answer: http://stackoverflow.com/a/29232239
has comment: http://stackoverflow.com/comment/46669848
has answer: http://stackoverflow.com/a/29232031
tagged with: javascript
tagged with: jquery
score: 0

http://stackoverflow.com/comment/46746282
comment on: http://stackoverflow.com/a/29251344
type: Comment
has text: [link](http://jsfiddle.net/duketopmost/0zdwLcdx/4/) why length !=0 can't type + Can anyone Help
score: 0
type: AnswerComment

uikit
tag name: uikit
type: Tag
tags question: http://stackoverflow.com/q/29243347

http://stackoverflow.com/comment/46744688
type: AnswerComment
has text: this is awesome! also i met you at hack reactor a couple of weeks ago and here you are answering my questions while i work on a project here! what are the chances of that
type: Comment
comment on: http://stackoverflow.com/a/29270570
score: 0

http://stackoverflow.com/comment/70067193
score: 1
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29289331
has text: I would suggest console.log(Object.keys(plugins)); instead to not blow up your console and get a list of what is loaded.

http://stackoverflow.com/comment/46862219
comment on: http://stackoverflow.com/q/29336969
type: QuestionComment
has text: @JohnPizzo Yeah, that's weird. I get the same result as you. For what it's worth, I'm using Chrome.
score: 0
type: Comment

http://stackoverflow.com/comment/46915314
has text: Yes I am doing that but it is saying that I will have to wait for 3 minutes to accept it, lol
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29366236

http://stackoverflow.com/a/29247098
has body: You can't use JSON.stringify to turn values into JSON that is not supported. The value undefined is one of those values. If you use for example JSON.stringify(null) you will get the string "null" back because that is a supported value. You can see at http://json.org/ what the supported values are. If you use JSON.stringify(undefined) you won't get the string "undefined" back. The unsuppored value is omitted from the result, and as that makes the result completely empty (not an empty object or array), the result is the value undefined.
downvote count: 0
type: Answer
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/29246871

http://stackoverflow.com/a/29367576
answers question: http://stackoverflow.com/q/29367000
type: Answer
score: 0
has body: Try this.. it is simple and easy to implement: Demo JS Fiddle Help requested - Forming a table from word Type a word: Submit Thanks, ~Chandan

http://stackoverflow.com/comment/46917350
type: Comment
score: 0
has text: @Xlander, you can go by link above - it work.
type: QuestionComment
comment on: http://stackoverflow.com/q/29365247

http://stackoverflow.com/comment/46760056
has text: Can I ask you to explain that to me though? I see what you wrote but I dont know WHY it works. You dont have to though
comment on: http://stackoverflow.com/a/29280901
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/46920590
type: QuestionComment
comment on: http://stackoverflow.com/q/29369502
score: 0
has text: @ryanyuyu a list of node and successor. yes like Linked-list
type: Comment

http://stackoverflow.com/q/29343307
tagged with: javascript
has body: I am trying to display key and value from a json object. here is the code i m using var FirebaseItem = React.createClass({ render: function() { var v=[];var k=[]; var foo; for(var key in this.props.data){ v.push(this.props.data[key]); k.push(key); } foo= function(){ return &lt;p&gt;{k} : {v}&lt;/p&gt;; }(); return ( &lt;div className="Data-item"&gt;{foo}&lt;/div&gt; ); } }); var FirebaseList = React.createClass({ render: function() { var FirebaseData = this.props.data.map(function (obj) { return ( &lt;FirebaseItem data = {obj}/&gt; ); }); return ( &lt;div className="Datalist"&gt; {FirebaseData} &lt;/div&gt; ); } }); var Firebase = React.createClass({ render: function() { var FirebaseData=this.props.data; return ( &lt;FirebaseList data={FirebaseData}/&gt; ); } }) var JsonData = [ {author: "Pete Hunt", text: "This is one comment"}, {author: "Jordan Walke", text: "This is *another* comment"}, {author: "jone doe", text: "This is one comment"} ]; React.render( &lt;Firebase data={JsonData} /&gt;, document.getElementById('Datawrap') ); Here i am getting response like authortext : Pete HuntThis is one comment authortext : Jordan WalkeThis is another comment authortext : jone doeThis is one comment Thanks in advance
score: 0
has answer: http://stackoverflow.com/a/29343417
type: Question
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
has title: Display key and value pair from json In react js
tagged with: reactjs
accepted answer: http://stackoverflow.com/a/29343417
answer count: 1

http://stackoverflow.com/comment/46692690
has text: var elem = element(by.linkText('Log off')); waitElementToBeShown(elem); elem.click();
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29237521
type: AnswerComment

http://stackoverflow.com/q/29309230
tagged with: wordpress
has title: WooCommerce - Add fee based on custom field
type: Question
accepted answer: http://stackoverflow.com/a/39586486
tagged with: woocommerce
tagged with: javascript
score: 4
linked to: http://stackoverflow.com/q/32119053
upvote count: 4
has comment: http://stackoverflow.com/comment/46812556
answer count: 1
downvote count: 0
favorite count: 0
has body: I am trying to add a fee to checkout based on whether or not a custom checkbox I've added it checked. I am really close to getting this to work, but I'm having issues getting the post values to determine if the fee should be applied or not. Here is the code I have for my custom field: add_action( 'woocommerce_after_checkout_billing_form', 'my_custom_fields' ); function my_custom_fields( $checkout ) { echo '&lt;div id="message_fields"&gt;&lt;h3&gt;' . __('Add a Message') . '&lt;/h3&gt;'; woocommerce_form_field( 'add_gift_message', array( 'type' =&gt; 'checkbox', 'class' =&gt; array('gift_message form-row-wide'), 'label' =&gt; __('5x7 Enclosed Personal Message - $4'), 'placeholder' =&gt; __(''), ), $checkout-&gt;get_value( 'add_gift_message' )); woocommerce_form_field( 'gift_message', array( 'type' =&gt; 'textarea', 'class' =&gt; array('gift_message_text form-row-wide'), 'label' =&gt; false, 'placeholder' =&gt; __('Your message'), ), $checkout-&gt;get_value( 'gift_message' )); echo '&lt;/div&gt;'; } This works, and the fields show up perfectly. At the bottom of form-checkout.php in my theme, I have added this javascript to update the cart total when the field it checked: &lt;script type="text/javascript"&gt; jQuery( document ).ready(function( $ ) { $('#add_gift_message').click(function(){ if ( $(this).is(':checked') ) { $('#gift_message_field').show(); var gift_message= true; } else { $('#gift_message_field').hide(); var gift_message = false; } $.ajax({ type: 'POST', url: wc_checkout_params.ajax_url, data: $( 'form.checkout' ).serialize(), success: function( response ) { if ( response ) { var order_output = $(response); $( '#order_review' ).html( $.trim( order_output ) ); $('body').trigger('update_checkout'); } }, error: function(code){ }, dataType: 'html' }); }); }); &lt;/script&gt; This updates the order total and runs the following code (this is where the problem is): add_action( 'woocommerce_cart_calculate_fees', 'woo_add_cart_fee' ); function woo_add_cart_fee( $d…
has answer: http://stackoverflow.com/a/39586486
has comment: http://stackoverflow.com/comment/46925642
tagged with: php
type: AnsweredQuestion
tagged with: checkout

http://stackoverflow.com/a/29354588
has comment: http://stackoverflow.com/comment/46926742
has comment: http://stackoverflow.com/comment/46927040
has comment: http://stackoverflow.com/comment/46926409
has comment: http://stackoverflow.com/comment/46927255
has comment: http://stackoverflow.com/comment/46926627
score: 0
answers question: http://stackoverflow.com/q/29352807
has comment: http://stackoverflow.com/comment/46927654
has body: Try this correction to your js: function likeAJAX(strName) { if (strName == "") { document.getElementById('likeCount').innerHTML=""; return; } else { if(window.XMLHttpRequest) { xmlHTTP = new XMLHttpRequest(); } else { xmlHTTP = new ActiveXObject('Microsoft.XMLHTTP'); } xmlHTTP.onreadystatechange = function() { if (xmlHTTP.readystate == 4 &amp;&amp; xmlHTTP.status == 200) { document.getElementById('likeCount').innerHTML = xmlHTTP.responseText; } } xmlHTTP.open("GET","getLikes.php?n=" + strName,true); xmlHTTP.send(); } }
type: Answer
has comment: http://stackoverflow.com/comment/46925567
has comment: http://stackoverflow.com/comment/46926686

http://stackoverflow.com/a/29242759
score: 0
type: Answer
has body: You could use document.querySelector: document.querySelector('.myClass a').href = 'www.example2.com' Javascript was originally designed to access the DOM on websites, so you would need to find the element within document. There are a bunch of ways to do it. Check out all the methods that start with "get" here: http://www.w3schools.com/jsref/dom_obj_document.asp.
has comment: http://stackoverflow.com/comment/46691570
answers question: http://stackoverflow.com/q/29242743
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29242743

http://stackoverflow.com/a/29267453
downvote count: 0
type: Answer
upvote count: 2
score: 2
has body: Ok, I think I was able to find a proper solution for that. Now, instead of sending <Link/> as prop to Document, I send <NextLink/> which is a custom wrapper for the react-router Link. By doing that, I'm able to have the right arrow as part of the Link structure while still avoiding to have routing code inside Document object. The updated code looks like follows: //in NextLink.js var React = require('react'); var Right = require('./Right'); var NextLink = React.createClass({ propTypes: { link: React.PropTypes.node.isRequired }, contextTypes: { transitionTo: React.PropTypes.func.isRequired }, _onClickRight: function() { this.context.transitionTo(this.props.link.props.to); }, render: function() { return ( {this.props.link} <Right onClick={this._onClickRight} /> ); } }); module.exports = NextLink; ... //in MasterPage.js var sampleLink = Go To Sample var nextLink = <NextLink link={sampleLink} /> <Document next={nextLink} /> //in Document.js ... var Document = React.createClass({ render: function() { return ( ... {this.props.next} ... ); } }); ... P.S: If you are using the latest version of react-router you may need to use this.context.router.transitionTo instead of this.context.transitionTo. This code will work fine for react-router version 0.12.X.
answers question: http://stackoverflow.com/q/29244731

http://stackoverflow.com/a/62026489
answers question: http://stackoverflow.com/q/29310530
has comment: http://stackoverflow.com/comment/109759620
downvote count: 0
has comment: http://stackoverflow.com/comment/109801297
type: Answer
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/109704068
has comment: http://stackoverflow.com/comment/109725895
has body: For babel transpilation (before minification) If you are using Babel with @babel/preset-env, it is possible to keep classes definitions without converting them to functions (which removes the constructor property) You can drop some old browser compatibility with this configuration in your babel.config / babelrc: { "presets": [ ["@babel/preset-env", {"targets": {"browsers": ["> 2%"]}}] ] } More informations about targets : https://babeljs.io/docs/en/babel-preset-env#targets For babel minification (after transpilation) It looks there is no easy solution right now ... We need to look at mangling exclusions.

http://stackoverflow.com/comment/46660764
score: 0
has text: No, it worked because `.text()` is a jQuery method. It doesn't matter whether you're testing a single element, `$("span.characters-count")` will always return a "list".
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29226572

http://stackoverflow.com/comment/46904632
comment on: http://stackoverflow.com/q/29359209
score: 0
has text: Did you name a function function?
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29382236
has body: What you're seeing is distortion in distance inherent in the mercator projection (and the Google Mercator projection based off it that is inherent to most online maps). Because your map starts at zoom 1, dragging the circle marker north/south will cause a lot of distortion. So, rather than georeference your image to a global bounding box, try georeferencing it to something much smaller. In your case, your are adding your image overlay relative to the maxZoom, so by increasing maxZoom, your image will be overlayed over a smaller area of the globe, and you will see less (or no) distortions across latitudes. I changed the maxZoom from 4 to 14, and the result looked like it worked well: fiddle here: var w = 553, h = 329, url = 'https://kathleenmillar.files.wordpress.com/2012/10/picture2.png'; var map = L.map('map', { minZoom : 10, maxZoom : 14, center : [ w / 2, h / 2 ], zoom : 11, crs : L.CRS.Simple }); // calculate the edges of the image, in coordinate space var southWest = map.unproject([ 0, h ], map.getMaxZoom() - 3); var northEast = map.unproject([ w, 0 ], map.getMaxZoom() - 3); var bounds = new L.LatLngBounds(southWest, northEast);
has comment: http://stackoverflow.com/comment/47023701
type: Answer
has comment: http://stackoverflow.com/comment/47036151
has comment: http://stackoverflow.com/comment/47444094
has comment: http://stackoverflow.com/comment/46993417
has comment: http://stackoverflow.com/comment/48164774
accepted answer of: http://stackoverflow.com/q/29366268
answers question: http://stackoverflow.com/q/29366268
has comment: http://stackoverflow.com/comment/47444245
has comment: http://stackoverflow.com/comment/47003074
has comment: http://stackoverflow.com/comment/47003098
has comment: http://stackoverflow.com/comment/47135506
score: 0
has comment: http://stackoverflow.com/comment/47427582
type: AcceptedAnswer

http://stackoverflow.com/comment/46818039
score: 0
type: Comment
has text: The syntax is the same in JS as C and C++. None of them use `case: 1`.
type: AnswerComment
comment on: http://stackoverflow.com/a/29312198

http://stackoverflow.com/q/29314300
has answer: http://stackoverflow.com/a/29320343
accepted answer: http://stackoverflow.com/a/29320343
linked to: http://stackoverflow.com/q/28357971
tagged with: performance
tagged with: underscore.js
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/46821437
tagged with: javascript
has comment: http://stackoverflow.com/comment/46821761
has comment: http://stackoverflow.com/comment/46831933
has title: Performant way to filtering an array of objects
has body: is this a good way to filter out all of the existing objects in an array? var arrayOfObjects = [ { id: 1, text: 'obj1'}, { id: 2, text: 'obj2'}, { id: 3, text: 'obj3'} ], ids = [ 1, 3 ], filteredArray = []; for (var x = 0, len = arrayOfObjects.length; x &lt; len; x++) { for (var i = 0, ilen = ids.length; i &lt; len; i++) { if (arrayOfObjects[x].id === ids[i]) { arrayOfObjects[x] = null; break; } } } filteredArray = _.filter(obj, function(o) { return !!(o); }); Update: The goal of this is to filter objects out of the arrayOfObjects that match an id in the ids array. So the code above works (filteredArray is [{ id: 2, text: 'obj2'}], but is there a better way to accomplish this?
type: AnsweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/46831829

http://stackoverflow.com/a/29225563
score: 0
answers question: http://stackoverflow.com/q/29225466
has body: You should make markTheSquare a factory that generates a closure. Something like this: function markTheSquare(i) { return function() { //... updateBoardState(getXorO(), i); //... } } The the assignment to your clickhandler is: document.getElementById("box" + i).onclick = markTheSquare(i);
has comment: http://stackoverflow.com/comment/46659111
has comment: http://stackoverflow.com/comment/46659430
has comment: http://stackoverflow.com/comment/46659231
type: Answer
has comment: http://stackoverflow.com/comment/46659156

http://stackoverflow.com/a/29372902
upvote count: 2
answers question: http://stackoverflow.com/q/29372632
has body: $$ means $ in the replace parameter. MDN: $$ Inserts a "$". Use var str = "fq$team$456$$$$fq$plrs$4789"; if(str.indexOf("$$$$")&gt;=0){ str = str.replace("$$$$","$$$$"); } console.log(str); //fq$team$456$$fq$plrs$4789
downvote count: 0
type: Answer
score: 2

http://stackoverflow.com/comment/46749380
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29275190
has text: sry want to consider some non-word characters like @ and - as well

http://stackoverflow.com/a/29232923
answers question: http://stackoverflow.com/q/29232221
score: 0
type: AcceptedAnswer
type: Answer
has body: just change it the way you want to but the code to be changed is _.template(_slicer)({name: "praveen"}) and
has comment: http://stackoverflow.com/comment/46700131
accepted answer of: http://stackoverflow.com/q/29232221

http://stackoverflow.com/comment/46762580
has text: All that matters is that the variable is declared when the function actually runs. What's more, `var` declarations are always treated as if they appeared at the very start of a function.
comment on: http://stackoverflow.com/q/29282412
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/comment/61160581
has text: I'm facing same problem using webpack `1.13.0`, this resolves my problem. Strange
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/29292578
type: Comment

http://stackoverflow.com/a/29236985
downvote count: 1
score: -1
answers question: http://stackoverflow.com/q/29235895
upvote count: 0
has body: you can look $emit and $broadcast in angular documentation
type: Answer

http://stackoverflow.com/comment/46873018
type: Comment
has text: added a fiddle to better demonstrate the problem
comment on: http://stackoverflow.com/a/29342648
type: AnswerComment
score: 0

http://stackoverflow.com/q/29257958
linked to: http://stackoverflow.com/q/31368313
has body: iam trying to build a directive that can parse and format an 2dimensional array as comma and line separated text. (all items in one line are comma separated and lines are '\n' separated) the parsing part is working. the formating part only works once. i have a debug console.log in the formatter console.log("formatter called. value:", value); and i see that this prints only one time. app.directive('mycsvparser', function() { return { restrict: 'A', require: 'ngModel', link: function(scope, element, attrs, ngModelCtrl) { // View --> Model ngModelCtrl.$parsers.push(function(viewValue) { if (viewValue) { // parse input text: var resultArray = []; // first split into lines: var arrayLines = viewValue.split("\n"); // parse every line for (var line_index in arrayLines) { ..... resultArray.push(lineArray); } return resultArray; } else { // console.log("invalid"); return ngModelCtrl.$modelValue; } }); // Model --> View ngModelCtrl.$formatters.push( function formatter(value) { console.log("formatter called. value:", value); if (value) { var resultString = ""; var arrayLines = value; for (var line_index in arrayLines) { var arrayItems = arrayLines[line_index]; resultString += arrayItems.join(", "); resultString += "\n"; } return resultString; } }); /**/ scope.$watchCollection(attrs.ngModel, function(newData) { console.log('mycsvparser newData', newData); ngModelCtrl.$render(); }); /**/ } }; }); i think the problem is that the data i use is a (2D) array. but how can i fix this? i found scope.$watchCollection() and i can verify that this fires every time the ngModel is updated. but how can i fire the 'rendering' process / update the view manually? if iam on the wrong way pleas give me a hint what to look for! i have made a Plunker and added the script example as snippet: open up the console and then change the numbers in one of the two textareas. the first is the directive the second one is just a textarea with bind and manual watches in the MainController on the right you see t…
score: 2
linked to: http://stackoverflow.com/q/15310935
upvote count: 2
accepted answer: http://stackoverflow.com/a/29263563
type: Question
tagged with: angularjs-directive
type: AnsweredQuestion
has title: Angular.js directive formatter only called once - or how to tell ngModel to behave like watchCollection
linked to: http://stackoverflow.com/q/15112584
answer count: 1
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/29263563
favorite count: 0
tagged with: angularjs

http://stackoverflow.com/comment/46699660
type: Comment
type: QuestionComment
has text: @jegadees sort by name / sort by price. please click on this table link in the question for further details.
comment on: http://stackoverflow.com/q/29246769
score: 0

http://stackoverflow.com/comment/46911557
comment on: http://stackoverflow.com/q/29364121
score: 0
type: Comment
type: QuestionComment
has text: Yes but then, in the function I used window.open and couldn't work out how to pass the ID when I was opening the html

http://stackoverflow.com/a/29312805
has comment: http://stackoverflow.com/comment/46819272
answers question: http://stackoverflow.com/q/29312744
has comment: http://stackoverflow.com/comment/46823322
accepted answer of: http://stackoverflow.com/q/29312744
type: AcceptedAnswer
downvote count: 0
score: 1
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/46819137
has comment: http://stackoverflow.com/comment/46819235
has body: That's because you can't declare the inheritance structure. All inheritance is done dynamically at runtime, so there is no point in time where it's no longer possible to change it. When you use an instance of one class as a prottype for another, it's inheriting that instance, not just copying the structure. Example: function A() {} A.prototype = { hello: function() {} }; var a = new A(); function B() {} B.prototype = a; var b = new B(); // all instances of B has the hello method b.hello(); // add a method to the A instance a.goodbye = function() {}; // now all instances of B have that method b.goodbye();

http://stackoverflow.com/a/29347877
has body: Off by one error, index starts at zero. while (i &lt;= theAgents[agentNumber].length) { ^^^^ needs to be while (i &lt; theAgents[agentNumber].length) { ^^^^
answers question: http://stackoverflow.com/q/29347817
accepted answer of: http://stackoverflow.com/q/29347817
type: Answer
score: 3
has comment: http://stackoverflow.com/comment/46881961
upvote count: 3
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/46766675
comment on: http://stackoverflow.com/q/29284248
type: QuestionComment
type: Comment
has text: http://stackoverflow.com/questions/21577230/phonegap-save-image-from-url-into-device-photo-gallery
score: 0

http://stackoverflow.com/a/29306481
has body: You're not returning anything. Instead of doing console.log on the last line, just do addS: addS(15);
downvote count: 0
upvote count: 2
type: Answer
score: 2
answers question: http://stackoverflow.com/q/29306446

http://stackoverflow.com/comment/46849176
type: AnswerComment
comment on: http://stackoverflow.com/a/29329501
has text: I was looking for javascript only but It is also fine to use jquery.
type: Comment
score: 0

http://stackoverflow.com/q/29323288
type: AnsweredQuestion
tagged with: custom-data-attribute
has answer: http://stackoverflow.com/a/29323337
type: Question
tagged with: javascript
has title: How would I use a data-attribute in HTML to fill a link and image source with a link from a database?
score: 0
answer count: 2
has body: I have a database that has a table with a column called "link" that holds a link such as this "http://www.google.com", and a column called "image" that holds this "http://www.placehold.it/500x500". I then have the following html: &lt;a href="" data-field="link"&gt; &lt;img src="" data-field="image"&gt; &lt;/a&gt; I have a PHP backend that uses JSON and a JQuery plugin to retrieve and populate information but I don't know how to fill the href"" and src"" attributes specifically. How can I do this with JQuery/JavaScript?
tagged with: jquery
has comment: http://stackoverflow.com/comment/46837546
accepted answer: http://stackoverflow.com/a/29323337
possible better answer: http://stackoverflow.com/a/29323406
tagged with: http://stackoverflow.com/tag/html
tagged with: php
has answer: http://stackoverflow.com/a/29323406

http://stackoverflow.com/comment/46717973
type: QuestionComment
comment on: http://stackoverflow.com/q/29257743
score: 0
type: Comment
has text: What are you trying to do? Assign `A` and `B` to `funcs`?

http://stackoverflow.com/comment/46919424
type: Comment
comment on: http://stackoverflow.com/a/29350966
type: AnswerComment
has text: Thank you :) Could i also set the string to a default value? I want all the options to be selected if no selection is made.
score: 0

http://stackoverflow.com/comment/46820818
type: Comment
has text: Yup, backspace issue :(
type: AnswerComment
comment on: http://stackoverflow.com/a/29312812
score: 0

http://stackoverflow.com/comment/46696227
score: 0
type: Comment
has text: I tried the function and it doesn't work, do I have to save the data first before the function can actually works? Because the idea is, I have to store data first. I want the stored data to appear on screen, maybe as a prompt. Then I want to search for the data, so again maybe appear as a prompt saying "You have searched for..." so and so. The final part to show all data which was stored by the user. Again thanks for the code but if you can help me with this, this would be of much help!
comment on: http://stackoverflow.com/a/29245160
type: AnswerComment

http://stackoverflow.com/comment/46883485
comment on: http://stackoverflow.com/a/29346284
type: Comment
has text: From the looks of it in the current prototype I think older browsers are supported: See generated code: https://github.com/Microsoft/TypeScript/blob/60a0a49437eb4fc4d96ef9d4e7d33818222ddea2/tests/baselines/reference/asyncMethod9.js#L14-L32 and https://github.com/Microsoft/TypeScript/blob/60a0a49437eb4fc4d96ef9d4e7d33818222ddea2/src/lib/tslib.js **BUT** I'm not from the TS team so I can't be sure though :)
type: AnswerComment
score: 0

http://stackoverflow.com/a/29339104
has comment: http://stackoverflow.com/comment/46866536
type: Answer
has comment: http://stackoverflow.com/comment/46866485
upvote count: 3
score: 3
answers question: http://stackoverflow.com/q/29339051
has body: Update: function showContent(i) { $(".content&gt;div").hide(); //for arbitrary keywords. $('div#' + i).css("display", "inline-block"); } Change the function to: function showContent(i) { $("[id*=option]").hide(); $('#' + i).css("display", "inline-block"); } Read more about attribute selectors
has comment: http://stackoverflow.com/comment/46866159
downvote count: 0
has comment: http://stackoverflow.com/comment/46866210

http://stackoverflow.com/a/29222092
has comment: http://stackoverflow.com/comment/46653616
answers question: http://stackoverflow.com/q/29221895
type: Answer
has comment: http://stackoverflow.com/comment/46653572
accepted answer of: http://stackoverflow.com/q/29221895
upvote count: 1
has body: The difficulty is that the format you have is strange, it is not valid JSON, so you can't use JSON.parse() directly. It is not valid JSON for 2 reasons: It is surrounded by ( and ) for some reason. The keys are not double-quoted. So what you ideally need to do is to convert the string into valid JSON first, then try and parse it. A shortcut, if you are sure you trust this data, is to just get rid of the parentheses first and then use the much-vilified eval(), because it will get around the fact that the keys aren't quoted. Here is the one-liner for that (assuming the string is in a variable called s): JSON.stringify(eval(s.substring(s.indexOf('(') + 1, s.lastIndexOf(')'))), null, "\t") Or to split it out a bit: var pseudoJson = s.substring(s.indexOf('(') + 1, s.lastIndexOf(')')); JSON.stringify(eval(pseudoJson), null, "\t");
score: 1
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/29318888
accepted answer: http://stackoverflow.com/a/29319295
has comment: http://stackoverflow.com/comment/46829530
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29318910
type: Question
has body: I'm redirecting the user from another page when they click the "Edit" button using the code below. $('#editListButton').click(function(){ window.location.href = "http://localhost/yyy.php"; //redirect // Changes that need to be made $('#defaultText').remove(); $('#orderList').append('&lt;p' + 'message' + '&lt;/p&gt;'); }); The page redirects to the predefined link, after which I need update a html &lt;div&gt; tag with text. But the code coming from the other page does nothing. How can change the text in the div tag?
tagged with: javascript
tagged with: jquery
favorite count: 0
has title: Updating text with value from the previous page
has answer: http://stackoverflow.com/a/29319295
answer count: 3
tagged with: http://stackoverflow.com/tag/html
score: -1
possible better answer: http://stackoverflow.com/a/29319174
has answer: http://stackoverflow.com/a/29319174
downvote count: 2
has comment: http://stackoverflow.com/comment/46829744
upvote count: 1

http://stackoverflow.com/q/29247300
has answer: http://stackoverflow.com/a/29247411
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46702701
has comment: http://stackoverflow.com/comment/46699739
has comment: http://stackoverflow.com/comment/46699856
has comment: http://stackoverflow.com/comment/46699843
type: Question
has body: I am working on Angularjs and didn't find any way to mask-unmask my html body or div. I tried ng-show but that will not work in my case. Could any one please let me know how I can disable all option using anuglarjs either using masking unmasking or some loading screen. Edited: I want my screen disabled till my http request not returned from the server. In Jquery this can be achieved using masking and unmasking
has answer: http://stackoverflow.com/a/29247728
has comment: http://stackoverflow.com/comment/46699715
tagged with: javascript
tagged with: jquery
score: 0
answer count: 2
has title: Angularjs How to mask unmask whole body when click on any link

http://stackoverflow.com/q/29327365
has comment: http://stackoverflow.com/comment/46844863
has comment: http://stackoverflow.com/comment/46844814
has comment: http://stackoverflow.com/comment/46844757
has answer: http://stackoverflow.com/a/29327491
has body: I have a code where I want a button's text to be stored in a variable and then set a text field's value to the text. Here's my code for the button onclick event: $('#MyButton').click(function(){ var user1 = $(this).attr("value"); $('#MyTextField').val(user1); }); And Here is my button and text field: GO But nothing ever happens. Please help, Thanks in advance EDIT regarding @Drakes That is my script and here is how I have included JQuery:
has comment: http://stackoverflow.com/comment/46844790
has comment: http://stackoverflow.com/comment/46844857
has comment: http://stackoverflow.com/comment/46845374
has comment: http://stackoverflow.com/comment/46845144
has comment: http://stackoverflow.com/comment/46844710
has comment: http://stackoverflow.com/comment/46845248
favorite count: 0
score: 2
has title: Jquery text not parsing into variable
possible better answer: http://stackoverflow.com/a/29327491
upvote count: 2
has comment: http://stackoverflow.com/comment/46844885
has comment: http://stackoverflow.com/comment/46844740
has comment: http://stackoverflow.com/comment/46844778
type: Question
has comment: http://stackoverflow.com/comment/46844741
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46844756
has comment: http://stackoverflow.com/comment/46844732
has comment: http://stackoverflow.com/comment/46845250
has comment: http://stackoverflow.com/comment/46844833
has answer: http://stackoverflow.com/a/29327506
answer count: 2
has comment: http://stackoverflow.com/comment/46845299
has comment: http://stackoverflow.com/comment/46844747
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/46845231
tagged with: jquery
accepted answer: http://stackoverflow.com/a/29327506

http://stackoverflow.com/comment/46690075
score: 0
type: AnswerComment
has text: So the idea was you wanted the syntax in the end as `onclick='acceptChallenge("admin")'` However we needed the double quotes to stop the string literal to eval `challenger`, so we needed escape characters to make sure the literal double quotes were left in still so that JS knew that `admin` was a string and not a variable.
type: Comment
comment on: http://stackoverflow.com/a/29241401

http://stackoverflow.com/comment/46845551
comment on: http://stackoverflow.com/q/29320860
type: QuestionComment
type: Comment
has text: Thanks for the tips, I'll try them out.
score: 0

http://stackoverflow.com/q/29259363
has comment: http://stackoverflow.com/comment/46721800
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/46721786
has body: I am creating a jquery mobile listview dynamically and would like to have different elements on same line with specific spacing. Each element would then line up in each succeeding list item (it looks tabular). I can use span to add a margin between elements but the problem is when the of length text is different it shifts the element. Here is the code I use to create the listview if (i == 0) { content = " DateCount Test TextNext Element " temprec = rec[1]; } else { if (rec[1] == temprec) { content = content + " Long Long Test TextNext Element " } else { content = content + " DateCount TextNext Element " temprec = rec[1]; } }​ Here is example current of output (I tried to attach picture)... Text Next Element Long Long Test Text Next Element Long Long Test Text Next Element Long Long Test Text Next Element I would like all the "Next Element" text to lineup in a column. Is there a way to do that? Thank you!
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29259782
tagged with: css
type: UnansweredQuestion
upvote count: 1
has title: Equal spacing between elements in jqmobile listview
has comment: http://stackoverflow.com/comment/46721189
score: 1
tagged with: listview
type: Question

http://stackoverflow.com/comment/46729573
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/29263609
has text: If you want to basically check from a script whether the browser's spell check has failed for a particular element, then I think the answer is no. See: http://stackoverflow.com/questions/317598/javascript-access-to-spell-checker-on-browsers
type: Comment

http://stackoverflow.com/comment/46701541
score: 0
has text: read this: http://stackoverflow.com/questions/4281274/jquery-ajax-404-handling
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29248406

http://stackoverflow.com/comment/46834684
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29320830
type: AnswerComment
has text: Not only the last line was missing previously but this part `require('js-string-escape');` as well ;) Anyway `.url` is still different than what have been pushed to `content`. In your file it starts with '- //' whereas in the original with '((('.

http://stackoverflow.com/q/29271350
has comment: http://stackoverflow.com/comment/46743323
answer count: 2
favorite count: 0
upvote count: 2
has title: Fastest way to delete and return last n items from an array JavaScript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46775409
has comment: http://stackoverflow.com/comment/46743261
has answer: http://stackoverflow.com/a/29271510
score: 1
linked to: http://stackoverflow.com/q/4228081
downvote count: 1
has comment: http://stackoverflow.com/comment/46743238
type: Question
tagged with: javascript
has body: If I have an array in JavaScript, how can I remove the last n items from it and return it as a new array? I have two options, splice or to iterate pops/pushes. Which is better? Thanks
has answer: http://stackoverflow.com/a/29271412

http://stackoverflow.com/comment/46832490
has text: the problem is when i typed in the field and click submit, it still go the form 2 but display nothing
comment on: http://stackoverflow.com/q/29320474
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46919326
comment on: http://stackoverflow.com/q/29368857
score: 4
type: Comment
type: QuestionComment
has text: Scripts don't really "enter the viewport". Use something as a target element in the DOM, monitor its position, execute when appropriate.

http://stackoverflow.com/q/29263162
tagged with: javascript
score: 0
has title: Header randomly inserted into javascript
has body: I develop using under the WAMP / LAMP platform... specifically I'm using wampserver as my development environment. Recently I've experienced an issue whereby javascript functions fail to execute correctly. My javascript functions are held together in a file and included via the HTML header as follows: &lt;script language="JavaScript" type="text/javascript" src="{$wwwUrl}/js/include.js"&gt;&lt;/script&gt; When logging in to my app the password is md5 encrypted using a javascript function. All was working fine until recently, when the encryption seemed to stop working... The javascript console of my browser reported an error. When I viewed the javascript source a HTTP header seems to have been randomly inserted: function isDateBefore(date1, date2) { date1Day = date1.substring(8,10); if (date1Day.substring(0,1) == '0') { date1Day = date1Day.substring(1,2); } date1Day = parseInt(date1Day); date1Month = date1.substring(5,7); if (date1Month.substring(0,1) == '0') { date1Month = date1Month.substring(1,2); } date1Month = parseInt(date1Month); date1Year = parseInt(date1.substring(0,4)); date2Day = date2.substring(8,10); if (date2Day.substring(0,1) == '0') { date2Day = date2Day.substring(1,2); } HTTP/1.1 200 OK Date: Wed, 25 Mar 2015 17:13:04 GMT Server: Apache/2.2.22 (Win32) PHP/5.2.11 Last-Modified: Wed, 11 Mar 2015 20:04:50 GMT ETag: "3c0000000bbc6e-5c36-51108c7a06712" Accept-Ranges: bytes Content-Length: 23606 Keep-Alive: timeout=5, max=100 Connection: Keep-Alive Content-Type: application/javascript function MM_findObj(n, d) { //v4.01 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))&gt;0&amp;&amp;parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&amp;&amp;d.all) x=d.all[n]; for (i=0;!x&amp;&amp;i&lt;d.forms.length;i++) x=d.forms[i][n]; for(i=0;!x&amp;&amp;d.layers&amp;&amp;i&lt;d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); if(!x &amp;&amp; d.getElementById) x=d.getElementById(n); return x; } I've no idea w…
answer count: 0
tagged with: wampserver
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46735807
tagged with: php
has comment: http://stackoverflow.com/comment/46767186
type: Question
has comment: http://stackoverflow.com/comment/46731324
has comment: http://stackoverflow.com/comment/46767272
has comment: http://stackoverflow.com/comment/46732232

http://stackoverflow.com/comment/46759528
type: AnswerComment
comment on: http://stackoverflow.com/a/29278908
score: 0
type: Comment
has text: Bro sorry please use Text Here (new code) instead of Text Here (your code)

http://stackoverflow.com/a/29308486
type: AcceptedAnswer
upvote count: 45
has comment: http://stackoverflow.com/comment/46811498
has comment: http://stackoverflow.com/comment/46811973
answers question: http://stackoverflow.com/q/29308441
has comment: http://stackoverflow.com/comment/46811271
has comment: http://stackoverflow.com/comment/46813425
has comment: http://stackoverflow.com/comment/46811406
type: Answer
has comment: http://stackoverflow.com/comment/46811876
has comment: http://stackoverflow.com/comment/46811348
has comment: http://stackoverflow.com/comment/46811426
downvote count: 1
has body: For more complex variable types like arrays your best bet is to convert it into JSON, echo that in your template and decode it in JavaScript. Like this: var jobs = JSON.parse("{{ json_encode($jobs) }}"); Note that PHP has to run over this code to make it work. In this case you'd have to put it inside your Blade template. If you have your JavaScript code in one or more separate files (which is good!) you can just add an inline script tag to your template where you pass your variables. (Just make sure that it runs before the rest of your JavaScript code. Usually document.ready is the answer to that) &lt;script&gt; var jobs = JSON.parse("{{ json_encode($jobs) }}"); &lt;/script&gt; If you don't like the idea of doing it like this I suggest you fetch the data in a separate ajax request.
has comment: http://stackoverflow.com/comment/117900465
score: 44
has comment: http://stackoverflow.com/comment/46811484
has comment: http://stackoverflow.com/comment/73367526
accepted answer of: http://stackoverflow.com/q/29308441
has comment: http://stackoverflow.com/comment/86231089

http://stackoverflow.com/comment/46838873
type: AnswerComment
has text: Ok it's going to take a while to put in, but I've never heard of the push() method. That seems like the solution, though, so big thanks to you.
comment on: http://stackoverflow.com/a/29323921
type: Comment
score: 0

google-chrome
tags question: http://stackoverflow.com/q/29343704
tags question: http://stackoverflow.com/q/29332938
tags question: http://stackoverflow.com/q/29312143
tags question: http://stackoverflow.com/q/29230319
tags question: http://stackoverflow.com/q/29325728
tags question: http://stackoverflow.com/q/29236962
tags question: http://stackoverflow.com/q/29363729
tags question: http://stackoverflow.com/q/29272449
tags question: http://stackoverflow.com/q/29305668
tags question: http://stackoverflow.com/q/29229708
tags question: http://stackoverflow.com/q/29325082
tags question: http://stackoverflow.com/q/29354516
tags question: http://stackoverflow.com/q/29355539
tags question: http://stackoverflow.com/q/29356917
tags question: http://stackoverflow.com/q/29352232
tags question: http://stackoverflow.com/q/29302188
tags question: http://stackoverflow.com/q/29262395
tags question: http://stackoverflow.com/q/29260833
tags question: http://stackoverflow.com/q/29240558
tags question: http://stackoverflow.com/q/29358111
tags question: http://stackoverflow.com/q/29290145
tags question: http://stackoverflow.com/q/29291942
tags question: http://stackoverflow.com/q/29300542
tags question: http://stackoverflow.com/q/29346849
tags question: http://stackoverflow.com/q/29304980
tags question: http://stackoverflow.com/q/29263440
tags question: http://stackoverflow.com/q/29232145
tags question: http://stackoverflow.com/q/29285286
tags question: http://stackoverflow.com/q/29325942
tags question: http://stackoverflow.com/q/29275409
tags question: http://stackoverflow.com/q/29346370
tags question: http://stackoverflow.com/q/29293248
tags question: http://stackoverflow.com/q/29283813
tags question: http://stackoverflow.com/q/29255267
tags question: http://stackoverflow.com/q/29288117
tags question: http://stackoverflow.com/q/29238965
tags question: http://stackoverflow.com/q/29347400
type: Tag
tags question: http://stackoverflow.com/q/29336108
tags question: http://stackoverflow.com/q/29365332
tags question: http://stackoverflow.com/q/29352088
tag name: google-chrome
tags question: http://stackoverflow.com/q/29334805
tags question: http://stackoverflow.com/q/29244803
tags question: http://stackoverflow.com/q/29333350
tags question: http://stackoverflow.com/q/29247474
tags question: http://stackoverflow.com/q/29331302
tags question: http://stackoverflow.com/q/29320848
tags question: http://stackoverflow.com/q/29301058
tags question: http://stackoverflow.com/q/29371589
tags question: http://stackoverflow.com/q/29289723
tags question: http://stackoverflow.com/q/29332044
tags question: http://stackoverflow.com/q/29255294
tags question: http://stackoverflow.com/q/29371002
tags question: http://stackoverflow.com/q/29246730
tags question: http://stackoverflow.com/q/29335806
tags question: http://stackoverflow.com/q/29313513
tags question: http://stackoverflow.com/q/29280742
tags question: http://stackoverflow.com/q/29266240
tags question: http://stackoverflow.com/q/29256850
tags question: http://stackoverflow.com/q/29264105
tags question: http://stackoverflow.com/q/29232701
tags question: http://stackoverflow.com/q/29296733
tags question: http://stackoverflow.com/q/29351742
tags question: http://stackoverflow.com/q/29310134

http://stackoverflow.com/comment/46645992
type: QuestionComment
comment on: http://stackoverflow.com/q/29218213
type: Comment
has text: OP, you need to show us the relevant HTML so we can reproduce.
score: 0

http://stackoverflow.com/comment/46797294
type: Comment
comment on: http://stackoverflow.com/a/29298373
has text: and how to get the length of the json?for the loop
type: AnswerComment
score: 0

http://stackoverflow.com/q/29325583
has title: JavaScript application is not calculating, please?
favorite count: 0
score: -1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29325638
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/46841873
has body: I am a beginner at JavaScript and I have been working on this very simple project for a couple of days. It is supposed to allow you to calculate the area and perimeter of a rectangle, but despite how much I tweaked the code, it will not calculate when I enter numbers. It should just be a simple user interface that allows you to input into two text boxes: var $ = function (id) { return document.getElementById(id); } var calculate_click = function () { var width = parseFloat($("width").value); var length = parseFloat($("length").value); $("area").value = ""; $("perimeter").value = ""; if (isNaN(width) || width &lt;= 0) { alert("Width must be a valid number and greater than zero."); } else if (isNaN(length) || width &lt;= 0) { alert("Length must be a valid number and greater than zero."); } else { var area = width * length; var perimeter = 2 * width + 2 * length; $("area").value = area; $("perimeter").value = perimeter; } window.onload = function () { $("calculate").onclick = calculate_click; $("length").focus(); } } body { font-family: Arial, Helvetica, sans-serif; background: #333366; } #content { width: 450px; margin: 10px auto; padding: 5px 20px; background: white; border: thin solid black; } #salesTax, #total { color: black; } #taxCalc label { display: block; width: 6em; text-align: right; padding-right: 1em; float: left; } #taxCalc input { display: block; float: left; } #taxCalc br { clear: left; } ​ &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt; &lt;head&gt; &lt;title&gt;Area and Perimeter Calculator&lt;/title&gt; &lt;link rel="stylesheet" type="text/css" href="sales_tax.css" /&gt; &lt;script type="text/javascript" src="sales_tax.js"&gt;&lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;div id="content"&gt; &lt;h2&gt;Area and Perimeter Calculator&lt;/h2&gt; &lt;p&gt;Enter the values below and click "Calculate".&lt;/p&gt; &lt;div id="taxC…
accepted answer: http://stackoverflow.com/a/29325638
upvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/46841912
tagged with: javascript

http://stackoverflow.com/a/29269962
has body: 145 and js $('#contentbox').keyup(function(){} - contentbox is the ID of the textbox. Using $(this).val() getting the textbox value. bar is the div ID of the count meter $('#bar').animate() increasing the width.
score: 0
answers question: http://stackoverflow.com/q/29269861
type: Answer

http://stackoverflow.com/comment/46815685
has text: I added the class that calls "UserShowStatsSuggestions". Sorry for leaving it out.
type: AnswerComment
type: Comment
score: 0
comment on: http://stackoverflow.com/a/29310966

http://stackoverflow.com/q/29309442
downvote count: 1
linked to: http://stackoverflow.com/q/1584370
tagged with: arrays
tagged with: javascript
has answer: http://stackoverflow.com/a/29309462
score: 2
type: AnsweredQuestion
duplicate of: http://stackoverflow.com/q/1584370
favorite count: 0
type: Question
has title: adding two javascript arrays together
answer count: 1
accepted answer: http://stackoverflow.com/a/29309462
has body: I have two arrays that are built in exactly the same way that I need to add together. One can be added to the end of the other, or a new array can be created containing the data of the two, it doesn't matter to me. Here's a screenshot showing what this looks like NOW in Chrome's console: What I've Tried I tried simply adding the two together... var complete = []; complete.push(array1); complete.push(array2); but this still leaves me with the upper [Object, Object] and [Object, Object, Object] levels that I'm trying to get rid of. How do I merge the individual Objects from these arrays into one?
upvote count: 3

http://stackoverflow.com/q/29218415
type: Question
has answer: http://stackoverflow.com/a/29225987
tagged with: javascript
tagged with: google-chrome-extension
answer count: 1
has comment: http://stackoverflow.com/comment/46652390
linked to: http://stackoverflow.com/q/29200374
type: UnansweredQuestion
has body: I'm trying to use chrome.identity with VK api for standalone app, which requires setting redirect url to "https://oauth.vk.com/blank.html". Chrome can't parse with url, and doesn't return token. Is there any other way to do this in chrome app? May be i can create popup window, and handle by myself, if it is possible to catch redirect in js code?
score: 0
has comment: http://stackoverflow.com/comment/46652409
has title: Custom url in chrome.identity.launchWebAuthFlow

http://stackoverflow.com/q/29329940
accepted answer: http://stackoverflow.com/a/29329996
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/46849538
score: 0
has comment: http://stackoverflow.com/comment/46849387
possible better answer: http://stackoverflow.com/a/29330082
has answer: http://stackoverflow.com/a/29330082
has comment: http://stackoverflow.com/comment/46849521
has comment: http://stackoverflow.com/comment/46849484
tagged with: javascript
has answer: http://stackoverflow.com/a/29329996
type: AnsweredQuestion
has title: Javascript class passing parameters
has body: I have been creating several classes but I never had any that needed parameters on the class itself. The following code works perfectly. $(function() { search.anotherFunction('a', 'b'); }); search = function() { this.anotherFunction = function(param1, param2) { // do whatever }; var public = { anotherFunction: anotherFunction } return public; }(); But now I would like to pass parameters inside search in order to avoid passing the same parameters to all the functions. $(function() { search('front/file.php').anotherFunction('a', 'b'); }); search = function(url) { this.anotherFunction = function(param1, param2) { // use here the 'url' parameter }; this.anotherFunctionB = function(param1, param2) { // use here the 'url' parameter }; var public = { anotherFunction: anotherFunction, anotherFunctionB: anotherFunctionB } return public; }(); This doesn't work and the console outputs the error. Uncaught TypeError: object is not a function It means that search isn't a function but yes a class name and therefore can't receive params?
has comment: http://stackoverflow.com/comment/46849407

http://stackoverflow.com/comment/134703951
type: QuestionComment
has text: I got this error after starting an accidental `npm i --save-dev [package]` and then immediately cancelling. The answer with the highest votes solved the issue for me.
comment on: http://stackoverflow.com/q/29323982
score: 0
type: Comment

http://stackoverflow.com/comment/46928199
type: QuestionComment
comment on: http://stackoverflow.com/q/29362556
score: 0
type: Comment
has text: The one part of this whole question that i'm still confused about is why you consider this to be a bug. `ng-attr-snap-drawer` should and will cause any directives named `snapDrawer` to be called. The purpose of that is so that you can use the directive in areas where custom attributes would be invalid, such as within an svg.

http://stackoverflow.com/comment/109545205
type: Comment
has text: The problem is we had to comply with merchant's security requirement due to multiplying security breach by hackers in web browsers. So it is a must. Also we have a dealer that know every customer's credit card info which is a violation of merchant's security rule too.
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/30792252

http://stackoverflow.com/comment/46843401
type: QuestionComment
comment on: http://stackoverflow.com/q/29326511
score: 0
has text: Ok.. No need to be single level list. The output needs to be that format is enough well.
type: Comment

http://stackoverflow.com/a/29303883
has comment: http://stackoverflow.com/comment/46803075
has body: You could use the RegExp /(?:test[1-2])_cookie=([^;]+)/ which would create a non-capturing group for the test1/test2 match, and then match the subsequent cookie data. This one would work a little better as it would match any cookie's value in the format test_cookie (i.e. test1_cookie, test2_cookie, test3_cookie.) /(?:test[0-9])\_cookie\=([^;]+)/
has comment: http://stackoverflow.com/comment/46802880
score: 0
answers question: http://stackoverflow.com/q/29303661
type: Answer

http://stackoverflow.com/comment/46812993
type: Comment
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/29309556
has text: this can be used for zoom further for zoomed image like magnify zoom?

http://stackoverflow.com/comment/46875636
comment on: http://stackoverflow.com/a/29344182
score: 0
type: AnswerComment
has text: thanx ozil :) , its helpful .. but it's not working in as2 is there afunction using substring to work in as2 .. thanx again
type: Comment

http://stackoverflow.com/comment/46791552
comment on: http://stackoverflow.com/a/29297177
type: Comment
score: 1
has text: @user3241192 — Legacy weirdness from before they wrote a proper spec and thought about what actually made sense.
type: AnswerComment

http://stackoverflow.com/q/29282082
answer count: 2
accepted answer: http://stackoverflow.com/a/29282191
upvote count: 10
possible better answer: http://stackoverflow.com/a/30509924
has answer: http://stackoverflow.com/a/30509924
tagged with: javascript
has body: I'm trying to do a pagenation feature on an array of users. Using Angularjs 1.3. ng-repeat="user in users | filter: searchText | orderBy: 'lastName' | limitTo:pageSize:startPosition track by user.lanId" I want to use the "begin" parameter, the startPosition variable above, for the start of each page of my list of users. When that did not work, I simplify the task to just trying to limiting to a array of numbers. $scope.numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 0]; ng-repeat="n in numbers | limitTo:2:2" That did not worked either. That gave me 1 and 2 instead 3 and 4. Then I switched to Angularjs 1.4-beta.6, and it works as expected for both examples. My Question: Is there a way to get this to work in Angular 1.3? What's causing this in Angular 1.3? I tried with 1.3.15 and 1.3.2 -- both don't work. Thanks.
has answer: http://stackoverflow.com/a/29282191
type: AnsweredQuestion
tagged with: angularjs-filter
downvote count: 0
score: 10
favorite count: 0
has title: Angular limitTo filter's second parameter "begin" does not seem to work in Angular 1.3
tagged with: angularjs
type: Question

angularjs-scope
tags question: http://stackoverflow.com/q/29273008
tags question: http://stackoverflow.com/q/29322103
tags question: http://stackoverflow.com/q/29237840
tags question: http://stackoverflow.com/q/29333664
tags question: http://stackoverflow.com/q/29238039
tags question: http://stackoverflow.com/q/29336340
tags question: http://stackoverflow.com/q/29370723
tags question: http://stackoverflow.com/q/29370511
tags question: http://stackoverflow.com/q/29308028
tags question: http://stackoverflow.com/q/29244790
tags question: http://stackoverflow.com/q/29306325
tags question: http://stackoverflow.com/q/29342895
tags question: http://stackoverflow.com/q/29318674
tags question: http://stackoverflow.com/q/29352160
tag name: angularjs-scope
tags question: http://stackoverflow.com/q/29260103
tags question: http://stackoverflow.com/q/29349756
tags question: http://stackoverflow.com/q/29253231
tags question: http://stackoverflow.com/q/29267624
tags question: http://stackoverflow.com/q/29348640
tags question: http://stackoverflow.com/q/29284756
tags question: http://stackoverflow.com/q/29286512
tags question: http://stackoverflow.com/q/29288786
tags question: http://stackoverflow.com/q/29234544
tags question: http://stackoverflow.com/q/29364957
tags question: http://stackoverflow.com/q/29336640
tags question: http://stackoverflow.com/q/29260040
type: Tag
tags question: http://stackoverflow.com/q/29255709

http://stackoverflow.com/a/29331060
type: Answer
has comment: http://stackoverflow.com/comment/46851403
has comment: http://stackoverflow.com/comment/46851441
answers question: http://stackoverflow.com/q/29331025
has body: I suppose you're generating the html. If so, you can use attribute selector with begins-with operator. $('[id^=t]').val('some value'); Note that this sets value for all elements which have their ids beginning with t. So be careful when using ids starting with t and if you know before hand the number after t, then you can just target that element. $('#t' + id).val('some value');
has comment: http://stackoverflow.com/comment/46851591
score: 0
has comment: http://stackoverflow.com/comment/46851472

http://stackoverflow.com/a/29257143
has body: Alternatively to the other 2 answers, you can also use the following solution: $(this).parent().find('.shareoptions').removeClass('hide');
downvote count: 0
answers question: http://stackoverflow.com/q/29256940
score: 1
has comment: http://stackoverflow.com/comment/46717325
upvote count: 1
type: Answer

http://stackoverflow.com/q/29253102
score: 0
has comment: http://stackoverflow.com/comment/46709725
has title: How to make an image as a button and redirect it to another page?
has answer: http://stackoverflow.com/a/29253208
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/29253208
type: AnsweredQuestion
has body: &lt;asp:ImageButton ID="imgbtn_RoleGuideWin8" runat="server" ImageUrl="~/Images/Windows Logo.png" Width="215px" OnClick="imgbtn_RoleGuideWeb_Click" OnClientClick="fnOnWin8ButtonClick()" /&gt; I have this code using asp.net.I want to convert it to HTML. For doing that I have written this code: &lt;input type="image" src="/Images/Windows Logo.png" id="myButton" /&gt; &lt;script type="text/javascript"&gt; document.getElementById("myButton").onclick = function () { location.href = "www.google.com"; }; &lt;/script&gt; But this is not working. Any poninters?
type: Question
possible better answer: http://stackoverflow.com/a/29258967
answer count: 2
has comment: http://stackoverflow.com/comment/46709753
has answer: http://stackoverflow.com/a/29258967
tagged with: javascript
tagged with: asp.net

storage
tag name: storage
tags question: http://stackoverflow.com/q/29360045
type: Tag

http://stackoverflow.com/comment/46698449
comment on: http://stackoverflow.com/q/29246564
type: QuestionComment
type: Comment
score: 1
has text: Hint: You pass a *string* to your function, strings are immutable, you don't do any assignments.

http://stackoverflow.com/q/29343776
possible better answer: http://stackoverflow.com/a/29343829
upvote count: 1
has answer: http://stackoverflow.com/a/29343829
downvote count: 1
has comment: http://stackoverflow.com/comment/46874073
has body: I want to change the colour of div after checking whether it is red or green. I have tried this but is not working. if ($(this).css("background-color")=="rgb(34,187,69)"|| $(this).css("background-color")=="rgb(255,0,51)") { var s = confirm("Are you sure you want to pushback?"); if (s == true) { $(this).css("background-color","#ffffff"); } Is this correct?
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46874060
accepted answer: http://stackoverflow.com/a/29468526
type: Question
score: 0
has answer: http://stackoverflow.com/a/29345139
has comment: http://stackoverflow.com/comment/46873986
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29344003
has title: Change color dynamically
favorite count: 0
has answer: http://stackoverflow.com/a/29344025
answer count: 5
has comment: http://stackoverflow.com/comment/46873891
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29468526
tagged with: css

jquery-validate
tags question: http://stackoverflow.com/q/29329336
tags question: http://stackoverflow.com/q/29251137
tags question: http://stackoverflow.com/q/29218879
type: Tag
tag name: jquery-validate
tags question: http://stackoverflow.com/q/29298100
tags question: http://stackoverflow.com/q/29288078
tags question: http://stackoverflow.com/q/29247086
tags question: http://stackoverflow.com/q/29321152

http://stackoverflow.com/comment/46761591
comment on: http://stackoverflow.com/a/29281652
type: Comment
score: 0
type: AnswerComment
has text: My god how annoying, cheers mate. I didn't realise I needed to load the UI. It all works perfectly now.

http://stackoverflow.com/comment/46698526
type: QuestionComment
type: Comment
has text: I try to put this minimal example that would return the id of the element [here (jsfiddle)](https://jsfiddle.net/nsh9wyg1/)
score: 0
comment on: http://stackoverflow.com/q/29246373

this
tags question: http://stackoverflow.com/q/29226549
type: Tag
tags question: http://stackoverflow.com/q/29356307
tags question: http://stackoverflow.com/q/29288386
tags question: http://stackoverflow.com/q/29240311
tags question: http://stackoverflow.com/q/29290624
tags question: http://stackoverflow.com/q/29317045
tag name: this
tags question: http://stackoverflow.com/q/29285948
tags question: http://stackoverflow.com/q/29323530

http://stackoverflow.com/q/29270000
has comment: http://stackoverflow.com/comment/46744567
tagged with: jquery
has comment: http://stackoverflow.com/comment/46744719
answer count: 2
upvote count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/46744092
has comment: http://stackoverflow.com/comment/46743555
type: UnansweredQuestion
tagged with: css
has answer: http://stackoverflow.com/a/29270605
has comment: http://stackoverflow.com/comment/46743983
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/29273660
has title: Why does replacing class name using Javascript if statement not working?
has comment: http://stackoverflow.com/comment/46741296
has comment: http://stackoverflow.com/comment/46743951
type: Question
has comment: http://stackoverflow.com/comment/46741307
has body: $(document).ready(checkWidth); $(window).resize(checkWidth); function checkWidth() { var $window = $(window); $("pre").text($window.width()); if ($window.width() < 321) { $('.grve-tablet-column-1-4') .removeClass('grve-tablet-column-1-2').addClass('grve-tablet-column-1'); } else { $('.grve-tablet-column-1') .removeClass('grve-tablet-column-1').addClass('grve-tablet-column-1-2'); } } Home Features Venue Setup Visitor's App Pricing Venue Plan Request Venue Hardware Support FAQ Try Sine for Free Enterprise Login Privacy Policy Terms of Use Free Download info@sine.co sinehelp +61 8 8121 5956 SineHQ SineHQ Copyright 2015 Sine Group Pty Ltd. Patents Pending. Website by Bugeja Studio I would like to find out how i would go replacing class names, using JavaScript for 4 divs in my footer named: class="grve-column-1-4 grve-tablet-column-1-2". I have tried using this code with no luck: $(document).ready(function() { var $window = $(window); // Function to handle changes to style classes based on window width function checkWidth() { if ($window.width() < 321) { $('.grve-tablet-column-1-2').removeClass('grve-tablet-column-1-2').addClass('grve-tablet-column-1'); } } // Execute on load checkWidth(); // Bind event listener $(window).resize(checkWidth); }); What happens is when you access the website on mobile, the footer looks like this: To fix this issue i can change the classes of these 4 divs to grve-tablet-column-1, and as a result it will organise under a single column like this:
tagged with: javascript

http://stackoverflow.com/q/29370017
has answer: http://stackoverflow.com/a/29370629
answer count: 5
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has body: I want to add a high score to my game. Right now I have this: var score = 0; var highscore = 0; The score variable works but whenever I get like points so total of 60 points it says the high score is still zero when checking it using console.log(highscore). I have this to store the high score: if (score &gt; localStorage.getItem("highscore")) { localStorage.setItem("highscore", score); } This does not work properly, but it also doesn't give any errors.
upvote count: 6
has answer: http://stackoverflow.com/a/29371052
has title: Adding a high score to local storage
tagged with: local-storage
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/46921520
tagged with: javascript
has answer: http://stackoverflow.com/a/29370073
has answer: http://stackoverflow.com/a/29371193
score: 5
has answer: http://stackoverflow.com/a/29370610
favorite count: 0

http://stackoverflow.com/a/29339888
has body: Without digging really deep into your code. You build the IDs by using col and row index, so you'll get something like 11, 12, 13, 14, 15, ... 110, 111, 112 etc. for the first row. Without a delimiter the ID of the eleventh row first element would be 111 too. As soon as you use a kind of delimiter like '_' your IDs are unique: 1_1, 1_2 again. for(var row=1; row&lt;=noOfRow; row++){ for(var col=1; col&lt;=noOfColumn; col++){ column += "&lt;td id =" + inc+"_"+col + "&gt; &lt;/td&gt;"; /* you also could add data attributes: data-row=\""+row+"\" data-col=\""+col+"\" */ } appendRow += "&lt;tr&gt;"+column+"&lt;/tr&gt;"; column= ""; inc++; } Looking into your code, I think you will get other problems, because there is a lot of code related to "10". For example: if((currentNumber-9) &gt; 0 &amp;&amp; (currentNumber-9) &lt; maxValue){ - this won't work in case you'll have more than 9 rows. But fixing this would be a rewritten version of the complete game.
has comment: http://stackoverflow.com/comment/46990469
upvote count: 1
downvote count: 0
answers question: http://stackoverflow.com/q/29339305
has comment: http://stackoverflow.com/comment/46871077
type: Answer
score: 1

http://stackoverflow.com/q/29356426
upvote count: 0
answer count: 1
has title: New php page forced out of iframe into whole window
favorite count: 0
has answer: http://stackoverflow.com/a/29366574
type: UnansweredQuestion
has body: I am calling a new url from inside an iframe and want the new url to abandon the iframe (it can close / destroy it if necessary) and appear full screen. The complication is that i do not have control of the call to the new php file becuase it is done by a credit card payment server as a redirect. To clrify, I have a page called order3.php whihc has an iframe in it where the credit card action takes place. At the end, I tell the credit card server that we want to now go to order4.php (but i can't tell it anything else such as script with this instruction, just the page name). As one would expenct order4.php now appears in the ifrmae within order3.php. What i want is for order4.php to declare independence as it loads and insist that it is full screen. I am not being lazy and i have had a good look areound, but i cannot understand the posts that give a single line of javascript and say that that will work because i don't know where to put it! I have tried this: in the header of order4.php, but needless to say it doesn't work. It does cause the iframe to disappear, which is a start, but you then get a white area where the iframe was and order3.php is still showing. Actually, the browser seems to get stuck in a loop at that point. So in summary, what can i do to order4.php so that when it is displayed it forgets the past and just goes whole screen what ever anybody else says. Please, be concise and tell me exctly where to put any code snippets you are kind enough to provide and please remeber that i cannot control the syntax of the call to order4.php. I'm not sure, but i think that you may need to know that i have this in my header: Thanks is advance.
tagged with: php
tagged with: iframe
downvote count: 1
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/46926453
score: -1
has comment: http://stackoverflow.com/comment/46910713

http://stackoverflow.com/q/29236053
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29237093
type: Question
accepted answer: http://stackoverflow.com/a/29237093
has title: Trigger method without change route location backbone.js
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0
tagged with: backbone.js
tagged with: history.js
has body: I have an issue with backbone.js history. When an user click on a link, I stop the propagation and I would like to call the method matching with the href without changing the location. $(document).on("click", "a[href^='/']", function(event){ event.preventDefault(); event.stopPropagation(); Router.goToIntraRoute($(event.target).attr("href")); }); In the backbone router : var Router = Backbone.Router.extend({ routes: { "user/:id": "openProfile" }, // Changes the location modifyRoute: function(route){ this.navigate(route, {trigger: true, replace: false}); }, // Doesn't change the location goToIntraRoute: function(route){ // URL modified this.navigate(route, {trigger: false, replace: false}); } }); I would like the method goToIntraRoute doesn't modify my url but trigger the method... Can anyone help me?

http://stackoverflow.com/q/29254230
tagged with: jquery
has comment: http://stackoverflow.com/comment/46711672
favorite count: 0
tagged with: ajax
tagged with: eval
has answer: http://stackoverflow.com/a/62739246
upvote count: 6
answer count: 4
type: AnsweredQuestion
has title: Declare empty array in javascript
score: 6
has answer: http://stackoverflow.com/a/29276552
has answer: http://stackoverflow.com/a/29254338
has comment: http://stackoverflow.com/comment/46712340
possible better answer: http://stackoverflow.com/a/29256447
type: Question
has answer: http://stackoverflow.com/a/29256447
has body: update My code that works. When page is loaded product= [[],[]]; then the code executed after ajax call: $('#contextreload ul').each(function(i, ul) { product.push([]); }); $('#contextreload ul').each(function(i, ul) { allline=i; $('#reloadajax'+i+' li').each(function(lk, li) { var lilk = $(li).html(); product[i][lk]=lilk; // your code goes here }); // your code goes here }); To use eval(); in ajax response for this, with some changes in php file? /endupdate product[0]=[1,2,3,4]; product[1]=[a,b,x,z]; . . product[10]=[extra,extra,extra,extra]; When I load the page this is executed: product= [[],[],[],[],[],[],[],[],[],[]]; But if I declare this, when I call ajax I can push add data only to this array (10 rows) If I have 11 rows (product[10][0] and product[10][1]), the extra data will not be added. After ajax call I need the extra data : product= [[],[],[],[],[],[],[],[],[],[],**[11]**]; This function is because I want to put data in array after loading ajax data from php file. $('#contextreload ul').each(function(i, ul) { &lt;strike&gt; var product = $(ul).html(); &lt;/strike&gt; allline = i; $('#reloadajax'+i+' li').each(function(lk, li) { var lilk = $(li).html(); product[i][lk]=lilk; alert(lilk+lk); // your code goes here }); // your code goes here }); }
accepted answer: http://stackoverflow.com/a/29254338
tagged with: arrays
downvote count: 0
has comment: http://stackoverflow.com/comment/46712726
tagged with: javascript

http://stackoverflow.com/q/29260833
has comment: http://stackoverflow.com/comment/49402849
downvote count: 1
linked to: http://stackoverflow.com/q/32369
has comment: http://stackoverflow.com/comment/46724080
has answer: http://stackoverflow.com/a/61057059
type: Question
has answer: http://stackoverflow.com/a/30935457
tagged with: autocomplete
has comment: http://stackoverflow.com/comment/48277269
tagged with: javascript
tagged with: forms
upvote count: 10
has answer: http://stackoverflow.com/a/64476448
has body: I am trying to find a way to programmatically disable Chrome's "Do you want save this credit card info" prompt. I have tried adding autocomplete="off" to all the inputs as well as the form, yet this prompt still comes up. Is there a way to disable this programmatically? Unfortunately, this is different from Disable browser 'Save Password' functionality because this all revolves around tricking Chrome into thinking the input field is not a password field / simply using autocomplete="off", however Chrome no longer acknowledges autocomplete="off". This is the banner I'm referring to:
has answer: http://stackoverflow.com/a/30792252
possible better answer: http://stackoverflow.com/a/30935457
linked to: http://stackoverflow.com/q/10938891
favorite count: 0
has comment: http://stackoverflow.com/comment/46724031
has comment: http://stackoverflow.com/comment/46724089
score: 9
answer count: 4
accepted answer: http://stackoverflow.com/a/30792252
has comment: http://stackoverflow.com/comment/48874636
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/15738259
has title: How to prevent Chrome from requesting to save credit card information
tagged with: google-chrome

http://stackoverflow.com/a/68224790
has comment: http://stackoverflow.com/comment/120590205
answers question: http://stackoverflow.com/q/29321494
type: Answer
has body: function yesnoCheck(that) { if (that.value == "aadhar") { document.getElementById("adc").style.display = "block"; } else { document.getElementById("adc").style.display = "none"; } if (that.value == "pan") { document.getElementById("pc").style.display = "block"; } else { document.getElementById("pc").style.display = "none"; } if (that.value == "pass") { document.getElementById("ps").style.display = "block"; } else { document.getElementById("ps").style.display = "none"; } } __Select__ Aadhaar Card Pan Card Passport Select ID Proof Enter Aadhar Card No. Enter Pan Card No. Enter Passport No.
score: 0

http://stackoverflow.com/q/29235608
upvote count: 1
has answer: http://stackoverflow.com/a/29235699
answer count: 1
downvote count: 0
has body: For example, I have a div : I am a square Inside style.css : div:nth-child(1) { height: 200px; width: 200px; border-radius:0; background-color: pink; color: #fff; text-align: center; } The text-align: center property aligns the text in the center of a div, but the text remains on the top inside the square, I want to push the text to the bottom of a square. So it looks like in this diagram. How can I accomplish this without wrapping the text in any sort of tag? __________________ | | | | | | | | | | |_I am a square__|
tagged with: jquery
linked to: http://stackoverflow.com/q/585945
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46677312
tagged with: css
score: 1
has comment: http://stackoverflow.com/comment/46677600
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29235699
tagged with: javascript
has comment: http://stackoverflow.com/comment/46677972
has title: How can I align text to the bottom of a div without wrapping the text in any tag?
type: Question

http://stackoverflow.com/comment/46747068
type: Comment
score: 0
has text: @NichlasTorgersen: Yes, that's definitely the *shortest*. :-) Note that it was wrong (I just noticed), the property is `outerHTML`, not `outerHtml`. I've fixed his answer.
type: AnswerComment
comment on: http://stackoverflow.com/a/29262007

http://stackoverflow.com/q/29320043
score: 1
has title: How to avoid jquery ui tooltip to occur in child div?
type: Question
has body: I am tying to include tooltip only in parent div but not in its child div. Here is jquery ui tooltip: $(function () { $("#parent_div").tooltip(); }); Here is HTML: &lt;div id="parent_div" title="Hello Tooltip"&gt; parent div contents &lt;div id="child_div" onMouseOver="show_list();" onMouseOut="hide_list();" title=""&gt; child div contents &lt;/div&gt; parent div contents &lt;/div&gt; title="" (giving blank to title property) in child_div is creating some problem. After hover on child_div it disables the tooltip from parent_div also. You can see and test the problem HERE. Please give me some solution keeping in view that onMouseOver and onMouseOut events should not be disable because I am using them in child_div for some other purpose. Thank you in advance.
possible better answer: http://stackoverflow.com/a/29320107
tagged with: jquery-ui
has answer: http://stackoverflow.com/a/29320107
has comment: http://stackoverflow.com/comment/46831968
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29320243
has answer: http://stackoverflow.com/a/34965918
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
answer count: 4
has comment: http://stackoverflow.com/comment/46831776
favorite count: 0
has answer: http://stackoverflow.com/a/29320991
accepted answer: http://stackoverflow.com/a/29320243
upvote count: 1
tagged with: css
type: AnsweredQuestion

http://stackoverflow.com/q/29258297
tagged with: http://stackoverflow.com/tag/html
tagged with: events
linked to: http://stackoverflow.com/q/11205957
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29258449
type: Question
has title: Click event trigger only on the first instead every time
tagged with: javascript
has comment: http://stackoverflow.com/comment/46719406
score: 0
linked to: http://stackoverflow.com/q/12148284
answer count: 1
tagged with: jquery
has body: I have an html page with some checkboxes: &lt;div class="col-md-2"&gt; &lt;div class='form-group employe-admin-contactP'&gt; &lt;input type="checkbox" class="readymade-checkbox admin" name="" id="admin-${member?.user?.id }" data-id="${member?.user?.id }" &lt;g:if test="${member?.isAdmin()}"&gt; checked &lt;/g:if&gt; /&gt; &lt;label for="admin-${member?.user?.id }" name="" class="readymade-label admin"&gt;&lt;/label&gt; &lt;/div&gt; &lt;/div&gt; Each time the user click on the checkbox (check/uncheck) a the following function which I wrote in js file have to be triggered: $(document).ready(function() { $('.readymade-checkbox.admin:not(checked)').on('click',function(){ var contact = {id:$(this).data('id') } $.ajax({ url: makeUserAdmin, type: "post", data: { id: JSON.stringify(contact), companyId: $('#teamCompanyId').val() }, success: function (data, textStatus) { jQuery("#updateCompanyteam").html(data); } }) return false; }); }) The problem is that this the function is triggered only once.
has answer: http://stackoverflow.com/a/29258449
has comment: http://stackoverflow.com/comment/46719178

http://stackoverflow.com/q/29250645
tagged with: geocoding
tagged with: google-maps-api-3
has body: I have the following script, designed to pass a variable from a Google Maps API v3 geocoded latitude and longitude to a haversine formula. However, each time it says that my geocoded vars "aren't defined": var address = ['London']; jQuery.each(address, function(index, item) { geocoder = new google.maps.Geocoder(); geocoder.geocode( { 'address': item}, function(results, status) { if (status == google.maps.GeocoderStatus.OK) { startlat = results[0].geometry.location.lat(); startlng = results[0].geometry.location.lng(); } }); }); // start of haversine for marker distances Number.prototype.toRad = function() { return this * Math.PI / 180; }; var mlat = '50.1'; var mlng = '-1.05'; var RDis = '3963'; // miles; Change to 6371 for km var x1 = mlat - startlat; var dLat = x1.toRad(); var x2 = mlng - startlng; var dLon = x2.toRad(); var aDis = Math.sin(dLat/2) * Math.sin(dLat/2) + Math.cos(startlat.toRad()) * Math.cos(mlat.toRad()) * Math.sin(dLon/2) * Math.sin(dLon/2); var cDis = 2 * Math.atan2(Math.sqrt(aDis), Math.sqrt(1-aDis)); var dDis = RDis * cDis; // dDis is the distance Can anyone advise on how I can pass these through the script? Wrapping up the geocoding into the same function as the haversine isn't an option (I need to use each of them elsewhere, too). Thanks for any help. :)
score: 0
answer count: 1
linked to: http://stackoverflow.com/q/14220321
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/23667086
has answer: http://stackoverflow.com/a/29250695
has title: Error passing variable to javascript formula ("undefined")
duplicate of: http://stackoverflow.com/q/23667086
tagged with: var
type: Question
tagged with: javascript

http://stackoverflow.com/comment/46739195
has text: @clockworkgeek yep, I saw that question, but I posted mine because none of the answers actually covered how to do it. Rather, the suggestions still required reconstructing the page.
score: 0
comment on: http://stackoverflow.com/q/29267729
type: Comment
type: QuestionComment

ajax
tags question: http://stackoverflow.com/q/29224630
tags question: http://stackoverflow.com/q/29310298
tags question: http://stackoverflow.com/q/29284858
tags question: http://stackoverflow.com/q/29307144
tags question: http://stackoverflow.com/q/29366033
tags question: http://stackoverflow.com/q/29292722
tags question: http://stackoverflow.com/q/29342558
tags question: http://stackoverflow.com/q/29229304
tags question: http://stackoverflow.com/q/29339346
tags question: http://stackoverflow.com/q/29344979
tags question: http://stackoverflow.com/q/29231984
tags question: http://stackoverflow.com/q/29340773
tags question: http://stackoverflow.com/q/29371417
tags question: http://stackoverflow.com/q/29359358
tags question: http://stackoverflow.com/q/29320999
tags question: http://stackoverflow.com/q/29325672
tags question: http://stackoverflow.com/q/29352975
tags question: http://stackoverflow.com/q/29357588
tags question: http://stackoverflow.com/q/29282298
tags question: http://stackoverflow.com/q/29323456
tags question: http://stackoverflow.com/q/29270360
tags question: http://stackoverflow.com/q/29334997
tags question: http://stackoverflow.com/q/29295530
tags question: http://stackoverflow.com/q/29272190
tags question: http://stackoverflow.com/q/29227872
tags question: http://stackoverflow.com/q/29307485
tags question: http://stackoverflow.com/q/29259687
tags question: http://stackoverflow.com/q/29320318
tags question: http://stackoverflow.com/q/29249579
tags question: http://stackoverflow.com/q/29369091
tags question: http://stackoverflow.com/q/29322250
tags question: http://stackoverflow.com/q/29344455
tags question: http://stackoverflow.com/q/29264088
tags question: http://stackoverflow.com/q/29232235
tags question: http://stackoverflow.com/q/29269000
tags question: http://stackoverflow.com/q/29235938
tags question: http://stackoverflow.com/q/29360778
tags question: http://stackoverflow.com/q/29252179
tags question: http://stackoverflow.com/q/29238127
tags question: http://stackoverflow.com/q/29235077
tags question: http://stackoverflow.com/q/29298631
tags question: http://stackoverflow.com/q/29254527
tags question: http://stackoverflow.com/q/29237239
tags question: http://stackoverflow.com/q/29303734
tags question: http://stackoverflow.com/q/29308264
tags question: http://stackoverflow.com/q/29218925
tags question: http://stackoverflow.com/q/29282210
tags question: http://stackoverflow.com/q/29318953
tags question: http://stackoverflow.com/q/29321888
tags question: http://stackoverflow.com/q/29235546
type: Tag
tags question: http://stackoverflow.com/q/29328434
tags question: http://stackoverflow.com/q/29300273
tags question: http://stackoverflow.com/q/29256710
tags question: http://stackoverflow.com/q/29366092
tags question: http://stackoverflow.com/q/29248406
tags question: http://stackoverflow.com/q/29361027
tags question: http://stackoverflow.com/q/29236095
tags question: http://stackoverflow.com/q/29218235
tags question: http://stackoverflow.com/q/29327929
tags question: http://stackoverflow.com/q/29237960
tags question: http://stackoverflow.com/q/29346288
tags question: http://stackoverflow.com/q/29360616
tags question: http://stackoverflow.com/q/29357758
tags question: http://stackoverflow.com/q/29280686
tags question: http://stackoverflow.com/q/29242117
tags question: http://stackoverflow.com/q/29240504
tags question: http://stackoverflow.com/q/29351871
tags question: http://stackoverflow.com/q/29302649
tags question: http://stackoverflow.com/q/29242548
tags question: http://stackoverflow.com/q/29302905
tags question: http://stackoverflow.com/q/29285718
tags question: http://stackoverflow.com/q/29363292
tags question: http://stackoverflow.com/q/29250008
tags question: http://stackoverflow.com/q/29358718
tags question: http://stackoverflow.com/q/29341069
tags question: http://stackoverflow.com/q/29320425
tags question: http://stackoverflow.com/q/29266886
tags question: http://stackoverflow.com/q/29349101
tags question: http://stackoverflow.com/q/29356249

http://stackoverflow.com/a/46516189
score: 1
has body: I've heard about having to use BackgroundImage because in future you are supposed to not be able to nest the Image tag. But I could not get BackgroudImage to properly display my background. What I did was nest my Image inside a View tag and style both the outer View as well as the image. Keys were setting width to null, and setting resizeMode to 'stretch'. Below is my code: import React, {Component} from 'react'; import { View, Text, StyleSheet, Image} from 'react-native'; export default class BasicImage extends Component { constructor(props) { super(props); this.state = {}; } render() { return ( &lt;View style={styles.container}&gt; &lt;Image source={this.props.source} style={styles.backgroundImage} /&gt; &lt;/View&gt; ) } } const styles = StyleSheet.create({ container: { flex: 1, width: null, height: null, marginBottom: 50 }, text: { marginLeft: 5, marginTop: 22, fontFamily: 'fontawesome', color: 'black', fontSize: 25, backgroundColor: 'rgba(0,0,0,0)', }, backgroundImage: { flex: 1, width: null, height: null, resizeMode: 'stretch', } });
answers question: http://stackoverflow.com/q/29322973
downvote count: 0
type: Answer
upvote count: 1

http://stackoverflow.com/q/29277431
downvote count: 0
has comment: http://stackoverflow.com/comment/46753185
favorite count: 0
type: Question
answer count: 2
has title: Javascript Ruby's map-like method
has answer: http://stackoverflow.com/a/29277837
upvote count: 3
possible better answer: http://stackoverflow.com/a/29277727
accepted answer: http://stackoverflow.com/a/29277837
has answer: http://stackoverflow.com/a/29277727
tagged with: arrays
has body: Is there Ruby's map-like syntax in JavaScript? for example in Ruby I could write: res = [[1,2,3],[4,5,6],[7,8,9]] res = res.map { |x| x[1..2] } # res == [[2, 3], [5, 6], [8, 9]] Is there any function that works like that in JavaScript?
tagged with: javascript
has comment: http://stackoverflow.com/comment/46753341
type: AnsweredQuestion
score: 3

http://stackoverflow.com/q/29306584
has answer: http://stackoverflow.com/a/29307554
type: UnansweredQuestion
tagged with: php
tagged with: css
type: Question
has comment: http://stackoverflow.com/comment/46808161
tagged with: javascript
tagged with: jquery
has title: Toggle multiple table rows
score: 0
tagged with: http://stackoverflow.com/tag/html
has body: I got this table, used for menu and submenu items. It's a combination of PHP (to read the menu items and per menu item all submenu items) and HTML. What I need is to find a way to toggle visibility on only the submenu items of main menu item. I've tried lots of stuff with javascript and jQuery (getelementbyID, byName, byClassname ) but it all doesn't seem to work.. (perhaps it's so simple that I'm making it diffcult..) What I do is I get the mainmenu item per row in the DB table, ordered by order number. While posting the table row with content, I query the submenu DB table for the submenu items. I post the submenu items as additional normal TR lines, so it's no separate table or anything, just a new TR. For both while loops, I run a counter so I can use that as a reference number. I set the display to 'none' on those submenu items, but I'm not sure where to go from there. ex: 1st var 2nd var 3rd var 1st var 2nd var 3rd var 1st var 2nd var 3rd var 1st var 2nd var 3rd var
answer count: 1

http://stackoverflow.com/a/37230133
downvote count: 0
has body: i wrote this small hack to enable access any react component from its dom node var ReactDOM = require('react-dom'); (function () { var _render = ReactDOM.render; ReactDOM.render = function () { return arguments[1].react = _render.apply(this, arguments); }; })(); then you can access any component directly using: document.getElementById("lol").react or using JQuery $("#lol").get(0).react
upvote count: 11
type: Answer
score: 11
answers question: http://stackoverflow.com/q/29321742
has comment: http://stackoverflow.com/comment/111876193

google-maps-api-3
tags question: http://stackoverflow.com/q/29301542
tags question: http://stackoverflow.com/q/29226730
tags question: http://stackoverflow.com/q/29361044
tags question: http://stackoverflow.com/q/29298260
tags question: http://stackoverflow.com/q/29303044
tags question: http://stackoverflow.com/q/29344714
tags question: http://stackoverflow.com/q/29301712
tags question: http://stackoverflow.com/q/29247498
tags question: http://stackoverflow.com/q/29238438
tags question: http://stackoverflow.com/q/29301341
tags question: http://stackoverflow.com/q/29309856
tags question: http://stackoverflow.com/q/29355291
tags question: http://stackoverflow.com/q/29354827
tags question: http://stackoverflow.com/q/29355020
tags question: http://stackoverflow.com/q/29358062
tags question: http://stackoverflow.com/q/29262086
tags question: http://stackoverflow.com/q/29264546
tags question: http://stackoverflow.com/q/29365303
tags question: http://stackoverflow.com/q/29331177
tags question: http://stackoverflow.com/q/29330174
tags question: http://stackoverflow.com/q/29225546
tags question: http://stackoverflow.com/q/29373197
tags question: http://stackoverflow.com/q/29347818
tags question: http://stackoverflow.com/q/29340833
tags question: http://stackoverflow.com/q/29316459
tags question: http://stackoverflow.com/q/29356745
tag name: google-maps-api-3
type: Tag
tags question: http://stackoverflow.com/q/29302570
tags question: http://stackoverflow.com/q/29279202
tags question: http://stackoverflow.com/q/29272902
tags question: http://stackoverflow.com/q/29340919
tags question: http://stackoverflow.com/q/29266495
tags question: http://stackoverflow.com/q/29238721
tags question: http://stackoverflow.com/q/29296700
tags question: http://stackoverflow.com/q/29308711
tags question: http://stackoverflow.com/q/29355437
tags question: http://stackoverflow.com/q/29305954
tags question: http://stackoverflow.com/q/29311337
tags question: http://stackoverflow.com/q/29250645
tags question: http://stackoverflow.com/q/29344977
tags question: http://stackoverflow.com/q/29231590

ios
tags question: http://stackoverflow.com/q/29242044
tags question: http://stackoverflow.com/q/29291286
tags question: http://stackoverflow.com/q/29363128
tags question: http://stackoverflow.com/q/29339142
type: Tag
tags question: http://stackoverflow.com/q/29272444
tags question: http://stackoverflow.com/q/29225875
tags question: http://stackoverflow.com/q/29359935
tags question: http://stackoverflow.com/q/29227619
tags question: http://stackoverflow.com/q/29313747
tags question: http://stackoverflow.com/q/29245824
tags question: http://stackoverflow.com/q/29260971
tags question: http://stackoverflow.com/q/29366384
tags question: http://stackoverflow.com/q/29222044
tags question: http://stackoverflow.com/q/29337456
tags question: http://stackoverflow.com/q/29302242
tags question: http://stackoverflow.com/q/29323705
tags question: http://stackoverflow.com/q/29363665
tags question: http://stackoverflow.com/q/29262317
tag name: ios
tags question: http://stackoverflow.com/q/29371619
tags question: http://stackoverflow.com/q/29354242
tags question: http://stackoverflow.com/q/29272901
tags question: http://stackoverflow.com/q/29252913
tags question: http://stackoverflow.com/q/29251530
tags question: http://stackoverflow.com/q/29308937
tags question: http://stackoverflow.com/q/29249132
tags question: http://stackoverflow.com/q/29257906
tags question: http://stackoverflow.com/q/29365278
tags question: http://stackoverflow.com/q/29273391
tags question: http://stackoverflow.com/q/29364207
tags question: http://stackoverflow.com/q/29288871
tags question: http://stackoverflow.com/q/29335523
tags question: http://stackoverflow.com/q/29242912
tags question: http://stackoverflow.com/q/29228999
tags question: http://stackoverflow.com/q/29226081
tags question: http://stackoverflow.com/q/29317180
tags question: http://stackoverflow.com/q/29352088
tags question: http://stackoverflow.com/q/29321103
tags question: http://stackoverflow.com/q/29237200
tags question: http://stackoverflow.com/q/29310298

cmd
tags question: http://stackoverflow.com/q/29342542
type: Tag
tag name: cmd

http://stackoverflow.com/q/29293406
downvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: ajax
tagged with: jquery-select2
has answer: http://stackoverflow.com/a/29293733
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
upvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/29293733
score: 1
has body: I am using Select2.js(latest version) to implement tokenized tagging in my application. It is working fine except, I am not able to select any item from the suggestions. I saw few answers in which it was mentioned that we need to include "id" in our configuration. it doesn't seems to be working for me. My code is : $("#interest").select2({ ajax: { url: "get-interests", dataType: 'json', delay: 250, data: function (params) { return { q: params.term, // search term page: params.page }; }, processResults: function (data, page) { // parse the results into the format expected by Select2. // since we are using custom formatting functions we do not need to // alter the remote JSON data return { results: data }; }, cache: true }, escapeMarkup: function (markup) { return markup; }, // let our custom formatter work placeholder:{ id: "-1", text: "Add your interest.." } , tags: true, tokenSeparators: [',', ' '], id: function(data) { alert(JSON.stringify(data)); return data.interestId; }, templateResult: function(post) { // return html markup for individual result item var markup =""; if(String(post.description) !== 'undefined') { markup = '&lt;p&gt;&lt;b&gt;' + post.text + '&lt;/b&gt; : ' + post.description + '&lt;/p&gt;'; } else { markup = '&lt;p&gt;&lt;b&gt;' + post.text + '&lt;/b&gt;&lt;/p&gt;'; } return markup; }, formatSelection: function(post) { // This shows up in the select box return post.text; } What I am doing wrong in above configuration?
has title: Select2 js Plugin Not able to select any option

http://stackoverflow.com/a/56856268
score: 0
has body: The best way is to use dataTable.columns.adjust(); on init/draw callback
answers question: http://stackoverflow.com/q/29226283
type: Answer

http://stackoverflow.com/comment/46697303
type: QuestionComment
comment on: http://stackoverflow.com/q/29245716
score: 0
has text: You have not provided any code samples or example data that you have to work with. Can you output the date object you received from the api? Are you able to parse that into a date object?
type: Comment

http://stackoverflow.com/q/29294707
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/29294926
has comment: http://stackoverflow.com/comment/46785516
possible better answer: http://stackoverflow.com/a/29294870
has comment: http://stackoverflow.com/comment/46785575
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/29294926
has body: &lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;script&gt; $(".playThumb").fadeTo("normal", 1); $(".playThumb").hover(function() { $(".playThumb").not($(this)).fadeTo("fast", 0.3); }, function() { $(".playThumb").not($(this)).fadeTo("fast", 1); }); &lt;/script&gt; &lt;body&gt; &lt;a href="#"&gt;&lt;img src="artistry.png" class="playThumb" /&gt; &lt;a href="#"&gt;&lt;img src="flavour.png" class="playThumb" /&gt; &lt;a href="#"&gt;&lt;img src="quality.png" class="playThumb" /&gt; &lt;a href="#"&gt;&lt;img src="Style.png" class="playThumb" /&gt; &lt;/body&gt; &lt;/html&gt; The images appear but nothing happens, whenever the mouse on the image other images it doesnt fade.
has answer: http://stackoverflow.com/a/29294870
answer count: 3
has answer: http://stackoverflow.com/a/29294745
downvote count: 0
has title: jquery to fade images except for the image with mouse over it
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46785439
type: AnsweredQuestion
score: 1

http://stackoverflow.com/comment/46780578
score: 0
comment on: http://stackoverflow.com/a/29291326
type: AnswerComment
has text: I wish I could vote up but I don't have the reputation! Will do it in the future though. Thanks Again.
type: Comment

http://stackoverflow.com/comment/46824201
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29314609
has text: Here's the code: https://docs.google.com/document/d/1YZsI3JpE_olcVfQuJZnV1xalrntdyvbshhOpWKto6iE/edit?usp=sharing

http://stackoverflow.com/comment/46856614
type: QuestionComment
score: 0
has text: It will be a big change in your source code but it will remove the old border. This is why i'm asking before submitting the answer.
comment on: http://stackoverflow.com/q/29333366
type: Comment

http://stackoverflow.com/q/29269701
downvote count: 1
tagged with: recursion
type: AnsweredQuestion
score: 3
has answer: http://stackoverflow.com/a/29333148
type: Question
upvote count: 4
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46834994
has body: I have problem, when i create angualrjs tabs ui dynamically, the ng repeat will keep call select event function recursive and Pass county IDs and Call the Web API to get data. just want to ask for solution to stop ng repeat from passing county IDs and make API call? View {{tab.countyName}}--{{tab.phoneNumber}} Total:{{totalStatusforByCounty.total}}, In:{{totalStatusforByCounty.in}}, Out:{{totalStatusforByCounty.out}}, Unknown: {{totalStatusforByCounty.unknown}} at {{groupUsers.title}} {{user.firstName}} {{user.lastName}} Ext:{{user.voiceMailExt}} {{departmentGroup.name}} {{tab.countyID}} {{departmentGroup.id}} Total:{{totalStatusforByCountyAndDepartmentGroup.total}}, In:{{totalStatusforByCountyAndDepartmentGroup.in}}, Out:{{totalStatusforByCountyAndDepartmentGroup.out}}, Unknown: {{totalStatusforByCountyAndDepartmentGroup.unknown}} at {{groupUsers.title}} {{user.firstName}} {{user.lastName}} Ext:{{user.voiceMailExt}} javascript (function(){ 'use strict'; var app = angular.module('usersboard'); var ReceptionController = function($scope, ReceptionService){ $scope.countytabs = ''; $scope.totalStatusforAllCounties =''; $scope.totalStatusforByCounty = ''; $scope.departmentGroups = ''; $scope.totalStatusforByCountyAndDepartmentGroup = ''; $scope.allUserByCountyAndDepartmentGroup = ''; $scope.allUserByCounty = ''; $scope.AllUserInAllDepartmentGroupsGroupByCounties = ''; $scope.AllUsersInDepartmentGroup= ''; $scope.active = { all: false }; $scope.content = 'county'; $scope.isShown = function (content) { return content === $scope.content; }; var selectAllCounties = function(){ ReceptionService.selectAllCounties().then(function(data){ $scope.countytabs = data; }, function(errMsg){ console.log(errMsg); }); } selectAllCounties(); var selectTotalStatusforAllCounties = function(){ ReceptionService.selectTotal…
accepted answer: http://stackoverflow.com/a/29333148
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/46741577
has title: stop ng repeat from makeing recursive call to tab ui select event
tagged with: angularjs

http://stackoverflow.com/a/50026204
type: Answer
has comment: http://stackoverflow.com/comment/87125747
score: 0
has comment: http://stackoverflow.com/comment/87125748
answers question: http://stackoverflow.com/q/29360321
has body: I think you are looking to sort the listbox on your PDF form? If so you could do it like this: aray=[this.getField("TalentName").value]; aray.push(this.getField("TalentCost").value); var x = aray[0] + "," + aray[1]; this.getField("TalentList").insertItemAt(this.getField("TalentName").value,x); this.getField("TalentName").value=""; this.getField("TalentCost").value=""; count = this.getField("TalentList").numItems; var l = this.getField("TalentList") for (numsorted = 0; numsorted &lt; count; numsorted ++){ max = l.getItemAt(numsorted, false) maxindex = numsorted; for (i=numsorted; i&lt;count; i++){ item = l.getItemAt(i, false); if (item &gt; max) { max = item; maxindex = i; } } item = l.getItemAt(maxindex, false); l.deleteItemAt(maxindex); l.insertItemAt(item, numsorted); }

http://stackoverflow.com/a/29230491
has comment: http://stackoverflow.com/comment/46668304
upvote count: 1
accepted answer of: http://stackoverflow.com/q/29228842
answers question: http://stackoverflow.com/q/29228842
type: AcceptedAnswer
downvote count: 0
score: 1
has body: Try this on your razor view. I tested it and it is working perfectly for both condition (ddl enabled & disabled): @Html.DropDownListFor(m => m.City, new SelectList(Model.Lookups.Where(x => x.LookupType == "City"), "LookupID", "LookupValue"), "---- Select ----", new { disabled= true, @Title= "Tooltip here" }) Please attention to the properties below: new { disabled= true, @Title= "Tooltip here" } Then here is the result with enabled and disabled option:
type: Answer
has comment: http://stackoverflow.com/comment/46668058

http://stackoverflow.com/q/29285151
has comment: http://stackoverflow.com/comment/46780663
has comment: http://stackoverflow.com/comment/46780335
has comment: http://stackoverflow.com/comment/46780877
has comment: http://stackoverflow.com/comment/46781150
downvote count: 1
has body: I am using the jQuery multiselect api to select multiple values in my application,but what i want that,when i click on a button beside that multiselect box all the selected values should be fetched.But i am not able to do that ,Here i am posting my code. Form Submission Test Testing to ensure the correct values are actually passed when the form is submitted. MDC LAC BRO/WPB NOE OTHER Selection along with count is here i am trying to show the count of each selected values in the label with each select i.e when ever i will select a value the count will be updated in the label fiddle is here working fiddle
type: Question
has comment: http://stackoverflow.com/comment/46780776
score: -1
has comment: http://stackoverflow.com/comment/46768210
has comment: http://stackoverflow.com/comment/46780704
has answer: http://stackoverflow.com/a/29292165
answer count: 2
has comment: http://stackoverflow.com/comment/46780675
upvote count: 0
has answer: http://stackoverflow.com/a/29292067
tagged with: javascript
tagged with: jquery
favorite count: 0
possible better answer: http://stackoverflow.com/a/29292067
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46780796
has comment: http://stackoverflow.com/comment/46780218
accepted answer: http://stackoverflow.com/a/29292165
tagged with: css
has comment: http://stackoverflow.com/comment/46780726
has comment: http://stackoverflow.com/comment/46781055
has title: How to show the count selected values in the label of select box(i.e Select Option)
type: AnsweredQuestion

http://stackoverflow.com/comment/46777728
has text: Is this error reproducible? Your server (that served the script file) seems to have had a hiccup, or is buggy.
comment on: http://stackoverflow.com/q/29290145
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29224040
type: Answer
score: 0
answers question: http://stackoverflow.com/q/29223919
has body: You content variable is an object that contains: item1: String item2: String item3: array var content = { item1: "John", item2: "Doe", item3: { "item3_1", "item3_2", "item3_3" } } If item3 is an array then is should use the array notation var content = { item1: "John", item2: "Doe", item3: ["item3_1", "item3_2", "item3_3"] } Now you can pass this object around and call its fields like that: function print(obj) { var fname = obj.item1; var lname = obj.item2; var array = obj.item3; alert(array.toString()); } where call to the function will look like print(content);

http://stackoverflow.com/comment/46647332
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29219013
score: 1
has text: Remove "dataType: 'json'," from your javascript

http://stackoverflow.com/comment/46784469
type: AnswerComment
type: Comment
has text: You can use it in both of them.. Won't make any difference to the persistence
comment on: http://stackoverflow.com/a/29294009
score: 0

http://stackoverflow.com/q/29257678
accepted answer: http://stackoverflow.com/a/29257934
answer count: 1
tagged with: javascript
tagged with: asp.net
score: 0
has answer: http://stackoverflow.com/a/29257934
linked to: http://stackoverflow.com/q/15655415
linked to: http://stackoverflow.com/q/308301
has body: I have a radio button with 2 options, when 1 is selected I want to require 5 text boxes to be filled out, when 2 is selected those text boxes don't have to be. I'm using C# code behind in asp.net and so far I'm utilizing the asp requiredfieldvalidators on my required fields. But I'm needing help in setting the logic to handle this request. I've got a background in C but scripting is still pretty foreign to me so if there is a solution there please let me know! Thanks in advance for any help.
has comment: http://stackoverflow.com/comment/46717881
tagged with: web-applications
tagged with: c#
type: AnsweredQuestion
has title: Setting fields to conditionally use required field validator
type: Question

http://stackoverflow.com/q/29347373
tagged with: javascript
tagged with: firefox-addon
answer count: 1
has answer: http://stackoverflow.com/a/29471488
tagged with: firefox-addon-sdk
favorite count: 0
has body: I have an addon using simple-prefs. The addon modifies some webpages using PageMod. I would like to add a link to these webpages, that will open the addon options. Basically, what I need, is a Firefox version of chrome.extension.getURL('options.html'); used in Chrome. I have tried some old methods. For example using URL like this: addons://detail/ADDON_ID/preferences. Or this method from official documentation. But none of them seem to work. How do I do that? Is it even possible?
accepted answer: http://stackoverflow.com/a/29471488
has title: Open options page of addon using `simple-prefs` from content script
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/46885445
upvote count: 1
has comment: http://stackoverflow.com/comment/46921439
type: Question
tagged with: firefox
downvote count: 0

http://stackoverflow.com/a/29328530
has comment: http://stackoverflow.com/comment/100352712
has comment: http://stackoverflow.com/comment/97450191
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/113198955
score: 24
upvote count: 25
has body: The variable name you sent to the render function is only available while rendering the page, after it is sent to the client, it is not accessible. You have to use it in your view on the rendering stage. Since you are using handlebars, you can display it in your page like this, for instance: &lt;h1&gt;{{ name }}&lt;/h1&gt; If you want to use this data in a javascript, use it inside a script tag: &lt;script&gt; var name = "{{ name }}"; console.log(name); &lt;/script&gt;
has comment: http://stackoverflow.com/comment/85286809
type: Answer
answers question: http://stackoverflow.com/q/29328028
downvote count: 1
accepted answer of: http://stackoverflow.com/q/29328028

http://stackoverflow.com/a/29322930
has comment: http://stackoverflow.com/comment/46839588
has comment: http://stackoverflow.com/comment/46839339
has comment: http://stackoverflow.com/comment/46837578
has comment: http://stackoverflow.com/comment/46838550
downvote count: 0
has comment: http://stackoverflow.com/comment/46838914
type: Answer
has comment: http://stackoverflow.com/comment/46837269
upvote count: 3
has body: This is how you can split up your webpage into different files. You want to use link in the head tag to include external CSS files. For external script files you still use the style.css body { color: red; } h1 { font-family: Arial, sans-serif; font-size: 32px; color: black; } script.js (function() { // Set the variable "node" and set the event listener on click var node = document.getElementById('color'); node.addEventListener('click',changeColor,false); function changeColor(e) { // Get the target (node) that the user clicked var target = e.target || e.srcElement; // Get the color from the data-color attribute var color = target.getAttribute('data-color'); // Define the colors to rotate var colors = ['red','green','blue']; // Get the position of the color. red = 0, green = 1, etc var index = colors.indexOf(color); // If the index is the last item in the array you want // to change the index to 0 otherwise it increases by 1 var next = (index+1 == colors.length ? 0 : index+1); // Set the new color and the data-color attribute target.style.color = colors[next]; target.setAttribute('data-color',colors[next]); } })(); A working example of the above code can be found at JSFiddle. The reason I'm setting data-color instead of reading the style.color variable is because I'm unsure if some browsers may modify this value in different ways. I know for a fact that the browser will not modify the data-color attribute.
answers question: http://stackoverflow.com/q/29322865
has comment: http://stackoverflow.com/comment/46839340
score: 3

state
tag name: state
type: Tag
tags question: http://stackoverflow.com/q/29314884
tags question: http://stackoverflow.com/q/29299183

http://stackoverflow.com/comment/46742952
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/29269951
has text: Why are you using `#table` in CSS in place of `table`? you dont have an element with `id = table`.
type: Comment

http://stackoverflow.com/a/29308690
score: 2
downvote count: 0
has body: You could just wrap the content in a div or something and rotate that rather than the td itself: Northwest Northeast Southwest Southeast CSS: #mainGrid { width: 100%; height: 100%; } #nw { background-color:blue; } #ne { height: 100px; width: 100px; transform:rotate(180deg); background-color:red; } #sw { background-color:yellow; } #se { background-color:green; } .rotated { transform:rotate(-90deg); } Fiddle: https://jsfiddle.net/2hagsgs2/
has comment: http://stackoverflow.com/comment/46811546
accepted answer of: http://stackoverflow.com/q/29308525
upvote count: 2
has comment: http://stackoverflow.com/comment/46811392
answers question: http://stackoverflow.com/q/29308525
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/q/29270059
has title: Using variables in javascript css property
tagged with: jquery
favorite count: 0
has body: I am relatively new to Javascript, and am trying to make a simple game in which a meteor falls at a random rate. My issue is that, every time the for loop plays, the meteor div should be add math to its distance from the top, but I have no idea how to do this. Take a look at the current code and you'll see that #meteor animates with 'math'. This code doesn't work. Any ideas on how to make it work? Thank you, input is appreciated! var math = Math.round(Math.random * 5) for(var i = 0; i &lt;= height / 3; i++) { $('#meteor').animate({top: "+=math"}, 1) }
has answer: http://stackoverflow.com/a/29270176
has comment: http://stackoverflow.com/comment/46741334
has comment: http://stackoverflow.com/comment/46741185
score: 2
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29270198
has comment: http://stackoverflow.com/comment/46741227
accepted answer: http://stackoverflow.com/a/29270136
has comment: http://stackoverflow.com/comment/46761084
type: Question
has comment: http://stackoverflow.com/comment/46741202
tagged with: javascript
has answer: http://stackoverflow.com/a/29270136
upvote count: 3
answer count: 3
has answer: http://stackoverflow.com/a/29270198
downvote count: 1

http://stackoverflow.com/q/29236213
has title: Merge two arrays with objects
tagged with: merge
tagged with: lodash
has answer: http://stackoverflow.com/a/29239175
answer count: 4
favorite count: 0
has answer: http://stackoverflow.com/a/29236497
upvote count: 1
tagged with: extend
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29236497
score: 1
has comment: http://stackoverflow.com/comment/46678644
accepted answer: http://stackoverflow.com/a/29239175
has answer: http://stackoverflow.com/a/29236665
linked to: http://stackoverflow.com/q/1584370
type: Question
has comment: http://stackoverflow.com/comment/46678879
tagged with: arrays
downvote count: 0
tagged with: javascript
has body: I plan to merge two objects: var c = { name: "doo", arr: [ { id: 1, ver: 1 }, { id: 3, ver: 3 } ] }; var b = { name: "moo", arr: [ { id: 1, ver: 0 }, { id: 2, ver: 0 } ] }; When using Object.assign({},b,c) what happens is, that the b.arr is simply being replaced with c.arr. My question is, how do I preserve objects inside the b.arr that are not in c.arr but still merge objects from that array when they match b.arr[0].id === c.arr[0].id. The desired outcome would look like: { name: "doo", arr: [ { id: 1, ver: 1 }, { id: 2, ver: 0 }, { id: 3, ver: 3 } ] } Thanks.
has answer: http://stackoverflow.com/a/29256569

http://stackoverflow.com/comment/46869618
comment on: http://stackoverflow.com/q/29341265
score: 0
type: Comment
type: QuestionComment
has text: You could create a hidden text field and continuosly add focus to it. Then read the value on the keyup event and look for `dance`

http://stackoverflow.com/q/29342190
tagged with: css
has answer: http://stackoverflow.com/a/29342248
has title: Select another div within a common 'root' using jQuery
has body: I have this kind of structure: $100 Banana $14 Spoon Now, I need to know the width of the div with class price that has content $100 and not end up getting the width of div $14; but the code need to be started from $("#title1"). How I'm supposed to do that? Or, how I'm supposed to select the parent of an element, and then select the child with specific class of that parent? Thanks!
accepted answer: http://stackoverflow.com/a/29342248
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/29342337
possible better answer: http://stackoverflow.com/a/29342228
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29342228
score: 0
answer count: 3

http://stackoverflow.com/q/29316589
type: Question
answer count: 1
tagged with: node.js
score: 0
tagged with: javascript
type: UnansweredQuestion
has body: i'm developing high-load testing tool, using eventsource npm library to generate concurrent sse connections. I use CentOS on digitalocean with 512Mb and 1CPU. Take a look at my code: var http = require("http"), EventSource = require('eventsource'), openSockets = 0; http.globalAgent.maxSockets = 70000; console.log(process.memoryUsage() ) beginTest(); function beginTest (options) { for (var i = 0; i &lt; 50000; i++) { setTimeout(formPoster(i),0); } } function formPoster (i) { var url = "http://remoteserver.com/examples/events/connect.sse", es = new EventSource(url); es.onmessage = function(e) { }; es.onerror = function(e) { console.log(e); }; es.onopen = function(e) { openSockets++; if (openSockets == 1 ) { console.log(process.memoryUsage() ); process.exit(code=0); } }; } The problem with that code is huge memory leak - first console.log statement outputs { rss: 8925184, heapTotal: 5066496, heapUsed: 2113192 } whereas the second one (after first connected ) outputs { rss: 373219328, heapTotal: 296538752, heapUsed: 286450700 } herewith remoteserver has around 1500 connection with local machine. What reasons can cause such memory leaks?
has title: Memory leaks in node.js with concurrent sse connections
has answer: http://stackoverflow.com/a/29316781

http://stackoverflow.com/q/29321494
has answer: http://stackoverflow.com/a/68224790
has body: I'm trying to make a form which checks if a certain option is selected from a "select" tag. Here is my current HTML: Valitse automerkkisi Lada Mosse Volga Vartburg Muu This is the div element which should become visible after "Muu" is selected: Muu, mikä? And here is the JavaScript I'm trying to use: But it's not working...
has comment: http://stackoverflow.com/comment/46834436
has answer: http://stackoverflow.com/a/29321711
tagged with: javascript
score: 22
upvote count: 22
accepted answer: http://stackoverflow.com/a/29321711
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
favorite count: 0
tagged with: html-select
linked to: http://stackoverflow.com/q/16712941
possible better answer: http://stackoverflow.com/a/29321624
has title: Show input field only if a specific option is selected
has answer: http://stackoverflow.com/a/29321624
answer count: 4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/65166378
tagged with: forms
type: Question

http://stackoverflow.com/a/29288163
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/29287911
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29287911
type: Answer
has body: Always use directive while using jquery plugin to interact AngularJS Markup &lt;input id="mondayStoreOpentimingsedit" time-picker name="mondayStoreOpentimingsedit" ng-model="mondayBhr.store[0].open" style="max-height:25px" class="col-md-2" /&gt; Directive app.directive('timePicker', function() { return { restrict: 'A', reuqire: 'ngModel', link: function(scope, element, attrs, ngModel) { element.timepicker({ showMinutes: true, showMeridian: false, pick12HourFormat: true, change: function(time) { //need to run digest cycle for applying bindings scope.$apply(function() { ngModel.$setViewValue(time); }); } }).next().on(ace.click_event, function() { $(this).prev().focus(); }); } } });

http://stackoverflow.com/comment/46868186
comment on: http://stackoverflow.com/q/29339494
has text: its true. I've used ff debager and when I set a breakpoint on that function it displays OK when BP is off nothing what's the hell ? Seems that I have to look somewhere else not just this function.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29369502
upvote count: 1
has comment: http://stackoverflow.com/comment/46941310
tagged with: arrays
favorite count: 0
has answer: http://stackoverflow.com/a/29369692
has comment: http://stackoverflow.com/comment/46920492
has answer: http://stackoverflow.com/a/29370008
downvote count: 0
type: UnansweredQuestion
score: 1
type: Question
has body: I want to create a function in Javascript which takes an array as argument and returns a list of objects. I have an array like this: var arr= [10,20,30]; console.log(listFunction(arr)); The result should look like this: {'val':10, 'restList':{'val':20, 'restList':{'val':30,'restList':'null'}}} I have tried the forEach() function: function listFunction(parentArr) { var listOfObjects = []; parentArr.forEach(function (entry, thisArg) { var singleObj = {} singleObj['val'] = entry; singleObj['restList'] = singleObj; listOfObjects[thisArg] = singleObj; }); return listOfObjects; };
tagged with: object
has comment: http://stackoverflow.com/comment/46920590
tagged with: javascript
has title: Creating recursive list of objects
answer count: 2

http://stackoverflow.com/comment/46659236
has text: You can always look at [`@constructor`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/constructor) to see what `@` is but what you seem to be trying to do smells a bit off. Perhaps a more realistic example would help.
comment on: http://stackoverflow.com/q/29225306
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/46695945
comment on: http://stackoverflow.com/q/29243553
type: Comment
type: QuestionComment
has text: Im loosing my mind. I tried to take it out of JS Fiddle and there is a greater/less sign and because of that I cant close the script tag. Dont get me wrong it works PERFECTLY in JS Fiddle
score: 0

http://stackoverflow.com/q/29297873
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29305509
type: Question
has body: I'm trying to get response from U2F Token in GWT project using this source code: public class Test implements EntryPoint { @Override public void onModuleLoad() { Window.alert("Alert 3:"+u2FTest()); } public static native String u2FTest()/*-{ var respond = {rep: "Clear"}; var RegistrationData = {"challenge":"dG7vN-E440ZnJaKQ7Ynq8AemLHziJfKrBpIBi5OET_0", "appId":"https://localhost:8443", "version":"U2F_V2"}; $wnd.u2f.register([RegistrationData], [], function(data) {if(data.errorCode) { alert("U2F failed with error: " + data.errorCode); return; } respond.rep=JSON.stringify(data); alert("Alert 1: "+respond.rep); }); alert("Alert 2: "+respond.rep); return respond.rep; }-*/; } for some reasons I get The Alerts like so: (Alert 2) first with "Clear" result (Alert 3) with "Clear" (Alert 1) with Token response Normally I've to get (Alert 1) with Token response then 2,3. So how can I stop execution until I'll get the token response Thank you,
tagged with: javascript
has comment: http://stackoverflow.com/comment/46795372
score: 0
has answer: http://stackoverflow.com/a/29305509
tagged with: fido-u2f
answer count: 1
has title: U2F JavaScript for Client Side in GWT (JSNI)
tagged with: google-app-engine
tagged with: jsni
tagged with: gwt

http://stackoverflow.com/q/29324556
has comment: http://stackoverflow.com/comment/102298052
downvote count: 0
has body: I am using navigator.getUserMedia with constraints to access the user's webcam, using the feed as the source of an HTML &lt;video&gt; and then copying its stream to drawImage a &lt;canvas&gt; context. I'm doing all this so I can take a snapshot at intervals. What I would like to do is, once the page starts taking snapshots, lock the getUserMedia camera's focus/exposure, so that in between snapshot intervals the environment can change without the light balance changing or the camera refocusing. Does anyone know if this is possible on the JS side?
tagged with: getusermedia
favorite count: 0
upvote count: 25
has comment: http://stackoverflow.com/comment/69744796
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/47637708
score: 25
has answer: http://stackoverflow.com/a/47624956
has comment: http://stackoverflow.com/comment/47090843
has title: getUserMedia lock focus/exposure
type: Question
has comment: http://stackoverflow.com/comment/102357168
has comment: http://stackoverflow.com/comment/71740962
tagged with: camera
tagged with: javascript
has answer: http://stackoverflow.com/a/57941678
has comment: http://stackoverflow.com/comment/102333632
tagged with: html5-video
answer count: 2
tagged with: canvas

http://stackoverflow.com/comment/46898325
has text: I agree here, you shouldn't be using `var demoApp =` twice. Also, it seems you named your controller `CustomersController` but are calling for `SimpleController` in your routes.
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29356703
score: 2

http://stackoverflow.com/comment/46926409
has text: am i supposed to be updating the DIV or the SPAN instead of just echoing?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29354588
type: Comment

http://stackoverflow.com/q/29343412
has comment: http://stackoverflow.com/comment/46873262
linked to: http://stackoverflow.com/q/28909171
linked to: http://stackoverflow.com/q/2236747
has title: Passing callbacks with args down component hierarchy in react.js
answer count: 0
type: UnansweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/46874162
has comment: http://stackoverflow.com/comment/46873579
has comment: http://stackoverflow.com/comment/46874501
duplicate of: http://stackoverflow.com/q/2236747
has body: I am using react.js in my project and I have component hierarchy like this. RootComponent |- Child1 | |- itemA1 | |- itemA2 | - ... - Child2 |- itemB1 |- itemB2 _ ... I have all the state in RootComponent, which is: array of itemA elements array of itemB elements index of currently selected itemA index of currently selected itemB I want to change the currently selected item by clicking on an item, so I created a property in my RootComponent: changeCurrentItemA: function(item) { console.log("check, if the function was called"); //do something with state } I passed it down to Child1: &lt;Child1 items={this.state.data.itemsA} changeCurrentItemA={this.changeCurrentItemA} /&gt; In the child compomnent, I take the function from props: var changeCurrentItemA = this.props.changeCurrentItemA; and I wanted to render it like this: &lt;li onClick={changeCurrentItemA(item)} /&gt; This howerver immediately evaluates the function, so during rendering, it gets evaluated n times and nothing happens, when I click it. How can I tell react to run function with variable item passed to it after user clicks. I saw similar question here: React.js how to pass callbacks to child components? but the function there has no arguments. EDIT: It is not a duplicate of questions about bind, because react hijacks default bind behaviour allowing only binding on components.
type: Question
tagged with: reactjs
downvote count: 0
tagged with: javascript
score: 1
tagged with: callback
favorite count: 0

http://stackoverflow.com/q/29254037
has answer: http://stackoverflow.com/a/29344376
accepted answer: http://stackoverflow.com/a/29344376
has comment: http://stackoverflow.com/comment/46873274
tagged with: javascript
has comment: http://stackoverflow.com/comment/46872180
favorite count: 0
has comment: http://stackoverflow.com/comment/46731875
linked to: http://stackoverflow.com/q/5832412
has comment: http://stackoverflow.com/comment/46764821
tagged with: parsing
score: 2
has body: I'm trying to code a software which should execute instructions of a basic programming language only with these capabilities: Arithmetic expression evaluator (add,minus,mult,divide,parenthesis,...) if-else statement Function definition And it should display the code being 'reduced' or 'simplified' at one step at a time, and to let me show an example of a sample output: Iteration 1: a=3; b=2; c=true; if(c &amp;&amp; (a &lt; 3 * (5 -2) ) || b &gt;= 3 * (5 -2))){ System.out.println("going through if"); }else{ System.out.println("going through else"); } Iteration 2: if(true &amp;&amp; (a &lt; 3 * (5 -2) ) || b &gt;= 3 * (5 -2))){ System.out.println("going through if"); }else{ System.out.println("going through else"); } Iteration 3: if(true &amp;&amp; (3 &lt; 3 * (5 -2) ) || 2 &gt;= 3 * (5 -2))){ System.out.println("going through if"); }else{ System.out.println("going through else"); } Iteration 4: if(true &amp;&amp; (3 &lt; 9 ) || 2 &gt;= 3 * (5 -2))){ System.out.println("going through if"); }else{ System.out.println("going through else"); } Iteration 5: if(true &amp;&amp; (3 &lt; 9 ) || 2 &gt;= 3 * 3)){ System.out.println("going through if"); }else{ System.out.println("going through else"); } Iteration 6: if(true &amp;&amp; (3 &lt; 9 ) || 2 &gt;= 9)){ System.out.println("going through if"); }else{ System.out.println("going through else"); } Iteration 7: if(true &amp;&amp; true || 2 &gt;= 9)){ System.out.println("going through if"); }else{ System.out.println("going through else"); } Iteration 8: if(true &amp;&amp; (true || false)){ System.out.println("going through if"); }else{ System.out.println("going through else"); } Iteration 9: if(true &amp;&amp; false){ System.out.println("going through if"); }else{ System.out.println("going through else"); } Iteration 10: if(false){ System.out.println("going through if"); }else{ System.out.println("going through else"); } Iteration 11: System.out.println("going through else"); So it should parse the input code and executing it a…
has answer: http://stackoverflow.com/a/29655621
upvote count: 3
has comment: http://stackoverflow.com/comment/46786456
downvote count: 1
type: Question
type: AnsweredQuestion
tagged with: java
has comment: http://stackoverflow.com/comment/46872850
tagged with: antlr
has title: Code a term-rewriting parser/expression evaluator with ANTLR (or any other tool)
possible better answer: http://stackoverflow.com/a/29655621
answer count: 2

http://stackoverflow.com/comment/46661078
comment on: http://stackoverflow.com/a/29226779
type: Comment
score: 0
has text: @user3001854 In the MyJavaScriptInterface class.
type: AnswerComment

http://stackoverflow.com/a/29268578
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29268415
has body: Nope. &lt;option&gt;is styled by the platform they are on and attempting to style just one part of them won't work as the html is stripped away.
has comment: http://stackoverflow.com/comment/46779262

http://stackoverflow.com/comment/46745543
type: Comment
type: QuestionComment
has text: Please provide a jsfiddle with your html included
score: 0
comment on: http://stackoverflow.com/q/29272384

http://stackoverflow.com/comment/46861761
has text: **Don't** try to translate like that, it will just cause you to get invalid feedback. You should be posting code that is as similar to your real code as possible. You can assume that anybody who knows Angular knows `$http` anyway.
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29336340

http://stackoverflow.com/comment/46702024
comment on: http://stackoverflow.com/q/29248666
type: Comment
has text: as your dropdown names are similar; simply use `'[id^=drp_menu]'` and proceed :)
score: 0
type: QuestionComment

http://stackoverflow.com/q/29244837
type: Question
upvote count: 1
tagged with: javascript
favorite count: 0
has body: I'm working with a web application and I need to display a plot with data from the server. I use the Chart.JS library, but it doesn't work, only shows this: I load the data via JSON and this is the code I use var labels = new Array(); var cpuLoad = new Array(); $(document).ready(function() { var cpuContext = document.getElementById("cpu").getContext("2d"); $.getJSON("/pi/status/latest", function(data) { $.each(data.response, function(index, status) { labels.push(status.Status.fecha); cpuLoad.push(status.Status.cpu); }); }); var cpuData = { labels: labels, datasets: [ { label: "Carga CPU", fillColor: "rgba(220,220,220,0.2)", strokeColor: "rgba(220,220,220,1)", pointColor: "rgba(220,220,220,1)", pointStrokeColor: "#fff", pointHighlightFill: "#fff", pointHighlightStroke: "rgba(220,220,220,1)", data: cpuLoad }] }; console.log(cpuData); var cpuChart = new Chart(cpuContext).Line(cpuData); }); The .getJSON code works great but the graph doesn't show. Here is an example of what data I'm passing to chart.js: labels array: cpuLoad array:
has title: chart.js doesn't show elements on line chart
answer count: 0
downvote count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/53426814
tagged with: charts
tagged with: chart.js
score: 1

http://stackoverflow.com/a/29548849
upvote count: 2
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/29298356
score: 2
has body: You'll need to use the select2 open event to initialize the keyboard (demo) var keys = { bksp: 8, tab: 9, enter: 13, space: 32, delete: 46 }; $('select') .select2({ placeholder: "Select a state" }) .on("select2:open", function (e) { $('.select2-container--open .select2-search__field').keyboard({ // Used by jQuery UI position utility position: { // null = attach to input/textarea; // use $(sel) to attach elsewhere of: $(document), my: 'center bottom', at: 'center bottom', // used when "usePreview" is false at2: 'center bottom' }, reposition: true, usePreview: false, change: function(e, keyboard, el) { var key = (keyboard.last.key || '').toLowerCase(); // trigger a keydown for "special" keys e.type = keys[key] ? 'keydown' : 'input'; e.which = keys[key] || key.charCodeAt(0); keyboard.$el.trigger(e); } }) // activate the typing extension .addTyping({ showTyping: true, delay: 50 }); }); Update: special key interaction added to allow pressing enter on the virtual keyboard Include this css to remove the blue outline: .ui-keyboard-input-current { -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none; }
answers question: http://stackoverflow.com/q/29298356
downvote count: 0

http://stackoverflow.com/q/29237109
answer count: 2
downvote count: 0
accepted answer: http://stackoverflow.com/a/29237134
favorite count: 0
has answer: http://stackoverflow.com/a/29237142
tagged with: regex
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29237142
score: 1
has title: Simple regex expression to find capital letters is returning small letters
has body: I'm expecting this simple Regex expresison to return null since there are no capital letters in var a = "hiho"; var res = a.match(/[A-Z]/gi); alert(res) the string. Yet, it is returning an array of each small letter. Why?
upvote count: 1
has answer: http://stackoverflow.com/a/29237134
type: Question
has comment: http://stackoverflow.com/comment/46680470
tagged with: javascript

http://stackoverflow.com/comment/46839583
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29322865
has text: @nicael - Um, W3Schools is a nice site for beginners, with easy-to-understand sentences and concepts ([said by Paul Irish himself](https://github.com/paulirish/w3fools/issues/50#issue-13645375)).
score: 0

http://stackoverflow.com/comment/46691257
score: 0
type: QuestionComment
type: Comment
has text: @Cerad, I agree with that logic.. but the op stated **If I enter a value, then delete it, the form will submit** .. and he referenced timeout events, so I suspect there is no submit button to click in this application.
comment on: http://stackoverflow.com/q/29241536

http://stackoverflow.com/comment/46868642
score: 0
type: Comment
has text: I changed my code like this -` //var parent = $(this).parent().parent(); var parent = $(this).parents('tr');
type: AnswerComment
comment on: http://stackoverflow.com/a/29339491

http://stackoverflow.com/q/29233928
has comment: http://stackoverflow.com/comment/46677046
has comment: http://stackoverflow.com/comment/46676520
type: Question
has body: I have an iFrame, where I want to send a JavaScript command after loading. My current code looks like this: &lt;iframe src="http://www.test.tld/" onload="__doPostBack('ctl00$ctl00$bLogout','')"&gt; But with this code the command isn't executed. What must I change to make it work? Only Chrome and Firefox have to be supported.
has comment: http://stackoverflow.com/comment/46675423
has comment: http://stackoverflow.com/comment/46677184
has comment: http://stackoverflow.com/comment/46677935
has comment: http://stackoverflow.com/comment/77027142
tagged with: javascript
has answer: http://stackoverflow.com/a/48098573
tagged with: onload-event
has title: iFrame onload JavaScript event
downvote count: 0
has answer: http://stackoverflow.com/a/65631189
has answer: http://stackoverflow.com/a/43334961
tagged with: dom-events
favorite count: 0
has comment: http://stackoverflow.com/comment/46678156
has comment: http://stackoverflow.com/comment/46678800
has comment: http://stackoverflow.com/comment/46676986
type: UnansweredQuestion
score: 67
linked to: http://stackoverflow.com/q/6348494
tagged with: onload
answer count: 4
upvote count: 67
has comment: http://stackoverflow.com/comment/46679157
linked to: http://stackoverflow.com/q/3142837
has comment: http://stackoverflow.com/comment/80292085
tagged with: iframe
has answer: http://stackoverflow.com/a/29234197

http://stackoverflow.com/comment/46913384
type: Comment
has text: Super dude. But this is pure javascript syntax. I am not sure if some proper angular services available to achieve the same.
comment on: http://stackoverflow.com/a/29362621
type: AnswerComment
score: 0

http://stackoverflow.com/a/29223334
has comment: http://stackoverflow.com/comment/46655506
answers question: http://stackoverflow.com/q/29222970
has body: The script I wrote for your previous question was designed for the case you presented, i.e. with one flexbox container. But it could be easily adapted for a whole set of flexbox containers. First we will have to change the id to a class, because we will have more than one container. Then, we will iterate on each container, and compute the largest offset right of the flexbox items. Therefore we have to put the variable initialization inside a function iterated on the containers. As follows : $('.container').each(function() { var maxOffsetRight = 0, currentOffsetRight; // Find the biggest offset right of all childs $(this).children().each(function(index) { currentOffsetRight = $(this).position().left + $(this).outerWidth(true); if (currentOffsetRight &gt; maxOffsetRight) { maxOffsetRight = currentOffsetRight; } }); // Set the width of the current container var offsetLeft = $(this).position().left; $(this).css('width', maxOffsetRight - offsetLeft); }); Note that when setting the width, we have to substract the offsetLeft of the container. Should have done that in the previous version, but didn't notice it as there was only one container, and he was at an offset left of 0. Fiddle
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29222970
type: Answer
upvote count: 1
score: 1

http://stackoverflow.com/a/29296283
score: 1
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29286651
downvote count: 0
type: Answer
upvote count: 1
has body: I managed to find a solution using php: <?php $value = $_GET["value"]; if (!$value){ $value = 'Y'; } ?> See more?&nbsp <option value='<?php echo $value; ?>'><?php echo $value; ?> Y N <?php if ($value == 'Y'){ echo "<!--"; } ?> <?php if ($value == 'Y'){ echo "-->"; } ?> <?php if ($value == 'N'){ echo "<!--"; } ?> <?php if ($value == 'N'){ echo "-->"; } ?> Additional content goes here
accepted answer of: http://stackoverflow.com/q/29286651

http://stackoverflow.com/q/29355967
has comment: http://stackoverflow.com/comment/46897191
type: UnansweredQuestion
has body: I'm trying to run a function if someone hits the submit button OR there is a value in routeParams (if user hits the page with param already filled out.) I would like a function to run. Im having a brain fart and can't seem to get this to work! myApp.config([ '$routeProvider', function($routeProvider) { $routeProvider.when('/:params?', { templateUrl: 'myTemplate', controller : 'myController' }).otherwise({ redirectTo : '/' }); } ]); myApp.controller('ipCntrl', function($scope,$log,$http,$q,$routeParams, $location) { $scope.runReport = function() { $location.search({'ip': $routeParams['ip']}) } }); myApp.controller('myController', function($scope,$log,$http,$q,$routeParams, $location) { if ($routeParams['ip']) { $scope.ip = $routeParams['ip']; runMyFunction(); } &lt;div ng-controller="ipCntrl"&gt; &lt;form ng-submit="runReport()"&gt; &lt;input class="form-control" ng-model="ip"&gt; &lt;/form&gt; &lt;div ng-view &gt;&lt;/div&gt; &lt;/div&gt; &lt;script type="text/ng-template" id="myTemplate"&gt; HI! &lt;/script&gt;
has comment: http://stackoverflow.com/comment/46897189
has answer: http://stackoverflow.com/a/29356805
tagged with: javascript
type: Question
score: 0
answer count: 2
has title: Angular issue with $scope and $routeParams
tagged with: angularjs
has comment: http://stackoverflow.com/comment/46898160
has answer: http://stackoverflow.com/a/29356173

http://stackoverflow.com/comment/46697389
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29245457
has text: @atomCode .....damn I am bad at this. Thank you so much for your help and understanding. It works now
type: AnswerComment

http://stackoverflow.com/q/29300270
has comment: http://stackoverflow.com/comment/46795705
downvote count: 0
has answer: http://stackoverflow.com/a/29300505
favorite count: 0
has comment: http://stackoverflow.com/comment/46795650
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29300494
has comment: http://stackoverflow.com/comment/46795637
has answer: http://stackoverflow.com/a/29300530
has title: Javascript - convert array of elements to array blocks
score: 1
upvote count: 1
linked to: http://stackoverflow.com/q/6877005
type: Question
tagged with: javascript
has body: So I have a javascript variable that looks like this D,CPU_Purchased_ghz,2015-03-19 00:00:00,10.00,2015-03-20 00:00:00,10.00 Is it possible to split into an array like this: [ [D,CPU_Purchased_ghz], [2015-03-19 00:00:00,10.00], [2015-03-20 00:00:00,10.00] ] ie. I want to be able to split it into blocks of 2
has comment: http://stackoverflow.com/comment/46796015
answer count: 3

http://stackoverflow.com/a/29371448
score: 2
upvote count: 2
has body: You could use !important and that should work. The background probably is probably being over written by the cascade. It would be better to find out where and correct it instead of !important but if you need a quick and dirty solution it will work. Also, you can set the cursor to be the default one when it is disabled. All together the CSS would be: #buttonShareMap:disabled { background:black !important; cursor:default; }
accepted answer of: http://stackoverflow.com/q/29371232
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/29371232
type: Answer

http://stackoverflow.com/comment/46862835
type: Comment
comment on: http://stackoverflow.com/q/29336995
has text: One more question: If the scripts to load were all external (via the `src` attribute), would that execute synchronously? (Assuming they are appended in the correct order)
score: 0
type: QuestionComment

http://stackoverflow.com/comment/46844941
type: AnswerComment
comment on: http://stackoverflow.com/a/29327491
has text: I checked everything... It still doesn't work! So srange
type: Comment
score: 0

http://stackoverflow.com/a/29287031
upvote count: 5
has comment: http://stackoverflow.com/comment/46771390
answers question: http://stackoverflow.com/q/29286834
type: Answer
downvote count: 0
has body: The problem stems from the fact that JavaScript Date instances include a time-of-day portion, and from the related fact that ISO dates like yours are interpreted as being UTC. If you're west of Western Europe, then, your computer is in a time zone that makes UTC midnight of March 11 2015 be some time in March 10 2015 in your time zone. There are a couple ways to solve this; here's one: var utcdate = new Date("2015-03-11"); var local = new Date(utcdate.getUTCFullYear(), utcdate.getUTCMonth(), utcdate.getUTCDate()); That'll make the "local" date be the same as the original date string indicated. As mentioned in the answer for the linked duplicate question, you can also manipulate the date string before instantiating the date. The best thing would be to make sure your server is producing well-formatted dates.
has comment: http://stackoverflow.com/comment/46776141
has comment: http://stackoverflow.com/comment/46776015
has comment: http://stackoverflow.com/comment/46771447
has comment: http://stackoverflow.com/comment/46774219
has comment: http://stackoverflow.com/comment/46771921
has comment: http://stackoverflow.com/comment/46771577
has comment: http://stackoverflow.com/comment/46772029
has comment: http://stackoverflow.com/comment/46771544
score: 5
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46772300
accepted answer of: http://stackoverflow.com/q/29286834

http://stackoverflow.com/q/29253032
type: Question
tagged with: arrays
accepted answer: http://stackoverflow.com/a/29253066
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/46709847
answer count: 1
tagged with: angularjs
has title: Angular Js - Print array with particular key
type: AnsweredQuestion
has body: Am new to Angular js. I wanted to print an array with particular key. This is my array. $scope.airports = { 'PDX':{ 'code': 'PDX', 'name': 'PDX airport', 'destination': [ 'LAX', 'SFO' ] }, 'STL':{ 'code':'STL', 'name':'STL Airport', 'destination': [ 'TLS', 'SLT' ] }, 'MCI':{ 'code':'MCI', 'name':'MCI Airport', 'destination':[ 'CMI', 'IMC' ] }, }; The below code prints an array. The below code is printing the value of STL. The issue is how to print the value of STL if i assign to a variable like this In my Controller, I have set the value of airportCode $scope.airportCode= "STL"; and in my views, i used this code to print. But it's not printing any value, and there is no error in console. Thanks to all.
has answer: http://stackoverflow.com/a/29253066

http://stackoverflow.com/comment/46920774
has text: What about creating custom directive with dynamic templates similar as this: http://onehungrymind.com/angularjs-dynamic-templates/
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29369512
score: 0

http://stackoverflow.com/a/29263252
score: 0
type: AcceptedAnswer
has body: There main issue with your approach is in this line: CountSelectedCB[0] = $(this).attr("id"); The way you are using the array CountSelectedCB, you are always inserting the id of a check box at the first position (index 0) so you will always end up with one id no matter how many checkboxes are checked (or no ids) if no checkboxes are checked. You should change the line above to: CountSelectedCB.push($(this).attr("id")); Also, since CountSelectedCB is in a higher scope then displayCheckbox function, it keeps it's values between calls to displayCheckbox so on each firing of the change event, you have to clear the array before adding the updated list of checked ids. Otherwise, your updated list of ids will get appended to previously stored list. Here is how your code could look like (sample Fiddle): function displayCheckbox(){ $("input:checkbox").change(function() { selectedCB = []; notSelectedCB = []; CountSelectedCB.length = 0; // clear selected cb count before adding the updated ones $("input:checkbox").each(function() { if ($(this).is(":checked")) { CountSelectedCB.push($(this).attr("id")); // add id to count selected cb } }); $('input[name=selectedCB]').val(CountSelectedCB); }); } $(document).ready(displayCheckbox); CountSelectedCB = []; function displayCheckbox(){ $("input:checkbox").change(function() { selectedCB = []; notSelectedCB = []; CountSelectedCB.length = 0; // clear selected cb count $("input:checkbox").each(function() { if ($(this).is(":checked")) { CountSelectedCB.push($(this).attr("id")); } }); $('input[name=selectedCB]').val(CountSelectedCB); }); } &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt; &lt;input type="checkbox" id="cb1"&gt;Checkbox #1 &lt;input type="checkbox" id="cb2"&gt;Checkbox #2 &lt;input type="checkbox" id="cb3"&gt;Checkbox #3 &lt;hr /&gt; &lt;input name="selectedCB"&gt; Here is another way of achieving this (sample Fiddle) Essentially, you initially add a change listener to every c…
type: Answer
answers question: http://stackoverflow.com/q/29262639
accepted answer of: http://stackoverflow.com/q/29262639

http://stackoverflow.com/comment/46805968
has text: @FelixKling Just updated my question, got the code to run, but it still doesn't pass the variable correctly.
comment on: http://stackoverflow.com/q/29305347
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29242536
type: Answer
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/46691493
has comment: http://stackoverflow.com/comment/46691298
downvote count: 0
answers question: http://stackoverflow.com/q/29242482
has body: you need to use three varaibles for ng-class, using one will reflect everywhere L R J if you want to use only one varaible L R J

http://stackoverflow.com/comment/46700365
score: 0
type: QuestionComment
type: Comment
has text: http://stackoverflow.com/questions/2787679/how-to-reload-page-every-5-second
comment on: http://stackoverflow.com/q/29247632

http://stackoverflow.com/comment/46765679
has text: Can you transcript this screenshot with symbols and letter and copy that to your question?
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/29283545

http://stackoverflow.com/q/29261352
tagged with: greasemonkey
answer count: 1
tagged with: javascript
score: 0
has body: I have been trying to implement the following and have gathered this little piece of code so far. To Do : Search for the word "Block" and "Own" if both are present then thrown an alert box "saying both are found" If only "Block" is found then throw an alert box "Only block is found" If only "own" is found along with the word "Cool" then throw alert "own n cool are found " Also all the alert box should have the the "confirm button and when u click that again it should say "Are you sure you have done that?" with a "ok" button. The sample code is : if (/Text you are looking for/i.test (document.body.innerHTML) ) { alert ("Found it!"); }
type: UnansweredQuestion
has title: Searching for a specific string using JavaScript and greasemonkey
has answer: http://stackoverflow.com/a/29261626
tagged with: search
type: Question

http://stackoverflow.com/comment/46700675
type: Comment
type: QuestionComment
has text: yes yes, how to do it? I tried chaining but I could not get past syntax errors! And the first statement is not a function.
score: 0
comment on: http://stackoverflow.com/q/29247911

http://stackoverflow.com/comment/46653232
score: 1
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29222126
has text: Well there is your problem. The onclick is looking for it in global scope!

java
tags question: http://stackoverflow.com/q/29298275
tags question: http://stackoverflow.com/q/29226678
tags question: http://stackoverflow.com/q/29296730
tags question: http://stackoverflow.com/q/29363729
tags question: http://stackoverflow.com/q/29234769
tags question: http://stackoverflow.com/q/29344539
tags question: http://stackoverflow.com/q/29231590
tags question: http://stackoverflow.com/q/29340849
tags question: http://stackoverflow.com/q/29356465
tags question: http://stackoverflow.com/q/29231782
tags question: http://stackoverflow.com/q/29298031
tags question: http://stackoverflow.com/q/29222807
tags question: http://stackoverflow.com/q/29261495
tags question: http://stackoverflow.com/q/29351648
tags question: http://stackoverflow.com/q/29369905
tags question: http://stackoverflow.com/q/29343521
tags question: http://stackoverflow.com/q/29253474
tags question: http://stackoverflow.com/q/29308540
tags question: http://stackoverflow.com/q/29272008
tags question: http://stackoverflow.com/q/29367102
tags question: http://stackoverflow.com/q/29293929
tags question: http://stackoverflow.com/q/29270835
tags question: http://stackoverflow.com/q/29342891
tags question: http://stackoverflow.com/q/29315986
tags question: http://stackoverflow.com/q/29348794
tags question: http://stackoverflow.com/q/29224281
tags question: http://stackoverflow.com/q/29266347
tags question: http://stackoverflow.com/q/29347154
tags question: http://stackoverflow.com/q/29254037
tags question: http://stackoverflow.com/q/29281036
tags question: http://stackoverflow.com/q/29353626
tags question: http://stackoverflow.com/q/29245294
tags question: http://stackoverflow.com/q/29289445
tags question: http://stackoverflow.com/q/29255559
tags question: http://stackoverflow.com/q/29337948
tags question: http://stackoverflow.com/q/29268349
tag name: java
tags question: http://stackoverflow.com/q/29272952
tags question: http://stackoverflow.com/q/29251134
tags question: http://stackoverflow.com/q/29261259
tags question: http://stackoverflow.com/q/29350783
tags question: http://stackoverflow.com/q/29296233
tags question: http://stackoverflow.com/q/29224221
tags question: http://stackoverflow.com/q/29330710
tags question: http://stackoverflow.com/q/29295380
tags question: http://stackoverflow.com/q/29278527
tags question: http://stackoverflow.com/q/29249579
tags question: http://stackoverflow.com/q/29264088
tags question: http://stackoverflow.com/q/29357526
tags question: http://stackoverflow.com/q/29239835
type: Tag
tags question: http://stackoverflow.com/q/29326901
tags question: http://stackoverflow.com/q/29316759

http://stackoverflow.com/comment/46920016
type: AnswerComment
type: Comment
has text: Here's my suggestion. Create a function which gets the height and width of the window (viewport) and adjusts the display accordingly. Then call this function when the page loads and when the page resizes.
comment on: http://stackoverflow.com/a/29359168
score: 0

google-closure-compiler
tags question: http://stackoverflow.com/q/29354192
tags question: http://stackoverflow.com/q/29353843
type: Tag
tags question: http://stackoverflow.com/q/29351032
tag name: google-closure-compiler

http://stackoverflow.com/a/29315661
upvote count: 1
answers question: http://stackoverflow.com/q/29314701
type: Answer
downvote count: 0
score: 1
has body: If you are open to using Underscore, then it's just var transposed = _.zip.apply(0, arr); and the arrays you are looking for will be in transposed[0] and transposed[1]. You can write your own transpose function fairly easily, and it's more compact if you can use ES6 syntax: transpose = arr =&gt; Object.keys(arr[0]).map(i =&gt; arr.map(e =&gt; e[i])); &gt;&gt; transpose([["1","John"], ["2","Rajan"], ...]] &lt;&lt; [[1, 2, ...], ["John", "Rajan", ...]] If you want an ES5 version, here's one with comments: function transpose(arr) { // to transpose an array of arrays return Object.keys(arr[0]) . // get the keys of first sub-array map(function(i) { // and for each of these keys arr . // go through the array map(function(e) { // and from each sub-array return e[i]; // grab the element with that key }) )) ; } If you prefer old-style JS: function transpose(arr) { // create and initialize result var result = []; for (var i = 0; i &lt; arr[0].length; i++ ) { result[i] = []; } // loop over subarrays for (i = 0; i &lt; arr.length; i++) { var subarray = arr[i]; // loop over elements of subarray and put in result for (var j = 0; j &lt; subarray.length; j++) { result[j].push(subarray[j]); } } return result; }

http://stackoverflow.com/q/29293174
has title: Why can't we add properties to a function object inside function body like we do for object literals in javascript?
favorite count: 0
possible better answer: http://stackoverflow.com/a/29296180
has answer: http://stackoverflow.com/a/29293206
upvote count: 2
has answer: http://stackoverflow.com/a/29296180
tagged with: javascript-objects
accepted answer: http://stackoverflow.com/a/29293209
score: 2
type: AnsweredQuestion
type: Question
tagged with: javascript
answer count: 3
has answer: http://stackoverflow.com/a/29293209
has body: Look at the code below var foo = function(){ prop1 : "value"; } foo.prop2 = "value"; console.log("prop1" in foo) // logs flase console.log("prop2" in foo) // logs true Why can't we add properties to a function object like we do in an object literal? Why had I to declare the property for the function object outside its body? Is there a different syntax to add properties to a function object directly in its body.
has comment: http://stackoverflow.com/comment/46783556
downvote count: 0

http://stackoverflow.com/comment/46759279
has text: Is added automatically IN PRODUCTION only. `activator start` or `activator stage`
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29280103
type: Comment

events
tags question: http://stackoverflow.com/q/29223502
tags question: http://stackoverflow.com/q/29321501
tags question: http://stackoverflow.com/q/29316712
tags question: http://stackoverflow.com/q/29351597
tags question: http://stackoverflow.com/q/29239122
tags question: http://stackoverflow.com/q/29297328
tags question: http://stackoverflow.com/q/29341219
tags question: http://stackoverflow.com/q/29252635
tags question: http://stackoverflow.com/q/29355959
tags question: http://stackoverflow.com/q/29350656
tags question: http://stackoverflow.com/q/29304113
tags question: http://stackoverflow.com/q/29331694
tags question: http://stackoverflow.com/q/29239433
tags question: http://stackoverflow.com/q/29309958
tags question: http://stackoverflow.com/q/29271466
tags question: http://stackoverflow.com/q/29257675
tags question: http://stackoverflow.com/q/29241771
tags question: http://stackoverflow.com/q/29288306
tags question: http://stackoverflow.com/q/29219424
tags question: http://stackoverflow.com/q/29258297
tag name: events
tags question: http://stackoverflow.com/q/29264715
type: Tag

http://stackoverflow.com/comment/46840532
type: Comment
has text: Thanks. I think my problem was that my WebFontLoader was separate to my main JavaScript file, and your example showed me what I was doing wrong :)
comment on: http://stackoverflow.com/a/29318951
type: AnswerComment
score: 0

http://stackoverflow.com/q/29319782
tagged with: datatables-1.10
type: Question
has answer: http://stackoverflow.com/a/29886546
accepted answer: http://stackoverflow.com/a/29886546
has title: Using DataTables, how to specify an element inside a to be searched
has body: I'm using jquery DataTables, and I have a table with cells, each contains a and a hidden , now all I want is to filter on just the text inside the not the whole content of the which also contains the hidden element. I'm using basic DataTables configuration: $(document).ready( function () { $('#table_id').DataTable(); } ); I've been trying for a couple of days now on this site, Datatables site , googling, but couldn't find an answer, so please help Thanks in advance The code is generated on server, but the resulting table is something like this: Please notice that: element is hidden with css Text option1 option2 .... Text option1 option2 .... ...
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: datatables
answer count: 1
has comment: http://stackoverflow.com/comment/46831471
upvote count: 3
has comment: http://stackoverflow.com/comment/46831063
type: AnsweredQuestion
score: 3

http://stackoverflow.com/comment/46922919
type: Comment
type: QuestionComment
score: 1
has text: Why aren't you using `.data()` instead of `.attr()`? And what's up with the quotes in `'' + src + ''`?
comment on: http://stackoverflow.com/q/29371002

http://stackoverflow.com/a/29274492
has body: You have to implement toJSON() function inside nested objects to be able to serialize them to JSON format correctly More info here
score: 0
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/46749662
type: Answer
answers question: http://stackoverflow.com/q/29254339

http://stackoverflow.com/comment/46778225
type: Comment
has text: Look at HTML5 Local storage: http://diveintohtml5.info/storage.html
score: 1
comment on: http://stackoverflow.com/q/29290596
type: QuestionComment

http://stackoverflow.com/q/29362224
tagged with: javascript
answer count: 2
has body: I'm writing an AngularJS application and I'm trying to achieve certain things, but since I'm very new to Angular, I want to have the opinion of some AngularJS experts. I'm creating a control suite in fact in AngularJS and that consists out of 2 parts, a loading screen and a showing screen, both defined in HTML. The data which I need to manipulate is stored in JSon files. To give you an idea, here's the first JSon file: { "Styles": [ { "name": "Blue", "stylesheet": "/Resources/Stylesheets/Styles/Blue/OfficeUI.Style.Blue.min.css" }, { "name": "Green", "stylesheet": "/Resources/Stylesheets/Styles/Green/OfficeUI.Style.Green.min.css" }, { "name": "LightBlue", "stylesheet": "/Resources/Stylesheets/Styles/LightBlue/OfficeUI.Style.LightBlue.min.css" }, { "name": "Orange", "stylesheet": "/Resources/Stylesheets/Styles/Orange/OfficeUI.Style.Orange.min.css" }, { "name": "Purple", "stylesheet": "/Resources/Stylesheets/Styles/Purple/OfficeUI.Style.Purple.min.css" }, { "name": "Red", "stylesheet": "/Resources/Stylesheets/Styles/Red/OfficeUI.Style.Red.min.css" }, { "name": "Turquoise", "stylesheet": "/Resources/Stylesheets/Styles/Turquoise/OfficeUI.Style.Turquoise.min.css" } ], "DefaultStyle": "LightBlue", "Themes": [ { "name": "No Background", "stylesheet": "/Resources/Stylesheets/Themes/No Background/OfficeUI.Themes.No-Background.min.css" }, { "name": "Calligraphy", "stylesheet": "/Resources/Stylesheets/Themes/Calligraphy/OfficeUI.Themes.Calligraphy.min.css" }, { "name": "Circles And Stripes", "stylesheet": "/Resources/Stylesheets/Themes/Circles-And-Stripes/OfficeUI.Themes.Circles-And-Stripes.min.css" }, { "name": "Circuit", "stylesheet": "/Resources/Stylesheets/Themes/Circuit/OfficeUI.Themes.Circuit.min.css" }, { "name": "Clouds", "stylesheet": "/Resources/Stylesheets/Themes/Clouds/OfficeUI.Themes.Clouds.min.css" }, { "name": "Doodle Circles", "stylesheet": "/Resources/Stylesheets/Themes/Doodle-Circles/OfficeUI.Themes.Doodle-Circles.min.css" }, { "name": "Doodle Diamonds", "styl…
downvote count: 0
has title: How to wait for resources to be loaded
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/29365225
tagged with: angularjs
possible better answer: http://stackoverflow.com/a/29365225
tagged with: css
type: AnsweredQuestion
score: 1
tagged with: http://stackoverflow.com/tag/json
upvote count: 1
has answer: http://stackoverflow.com/a/29362451
type: Question
accepted answer: http://stackoverflow.com/a/29362451

http://stackoverflow.com/a/29359319
has comment: http://stackoverflow.com/comment/110790417
upvote count: 19
has comment: http://stackoverflow.com/comment/112911101
has comment: http://stackoverflow.com/comment/112892039
has body: You're asking several questions, and when this answer was first written, the short answer to most of them was: not yet (though I've since updated it thanks to DJ House's answer below!). applyConstraints You should be able to alter constraints during an active session, using applyConstraints like this: const videotrack = stream_from_getUserMedia.getVideoTracks()[0]; videotrack.applyConstraints({ frameRate: { max: 10 } }); Most implementations today are able to decimate frame rates and not just deliver the modes available in the camera. Try this fiddle. RTCRtpSender You should be able to control encoding &amp; transmission in the sender object using setParameters: const pc = RTCPeerConnection(config); const videotrack = stream.getVideoTracks()[0]; const sender = pc.addTrack(videotrack, stream); // get the current parameters first const params = sender.getParameters(); if (!params.encodings) params.encodings = [{}]; // Firefox workaround! params.encodings[0].maxBitrate = 60000; params.encodings[0].scaleResolutionDownBy = 2; sender.setParameters(params); encodings is an array, but unless simulcast is used, there's just one entry. Try this fiddle! (tested in Chrome, Firefox, Safari &amp; Edge!) RTCRtpSender.replaceTrack You should also be able to replace the camera track in an ongoing peer session, like this: const videotrack2 = a_different_stream.getVideoTracks()[0]; await sender.replaceTrack(videotrack2); It alters what the remote sees, without altering things at this end. Try it in this fiddle.
answers question: http://stackoverflow.com/q/29302617
has comment: http://stackoverflow.com/comment/112885602
downvote count: 0
score: 19
has comment: http://stackoverflow.com/comment/112892257
type: Answer
has comment: http://stackoverflow.com/comment/112877713
has comment: http://stackoverflow.com/comment/112877865
has comment: http://stackoverflow.com/comment/112891961
has comment: http://stackoverflow.com/comment/60830405
has comment: http://stackoverflow.com/comment/46925266

http://stackoverflow.com/comment/46681909
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/29228144
has text: I always let the client lib handle it much easier
type: Comment

http://stackoverflow.com/comment/46891497
type: Comment
comment on: http://stackoverflow.com/q/29352546
type: QuestionComment
score: 0
has text: the whole idea of matching multiple checked ids to list of hrefs. i can find match one, but how do i match unlimited number of checked?

http://stackoverflow.com/q/29337589
has body: I'm creating a page which displays a number of cats of the screen and for each click the counter will increment by one. The problem I'm running into is that right now for every click within the div it incriments the counter instead of just on the image itsself. Here is the code: display: function () { for (i = 0, idx = 0; i &lt; cats.image.length; i++, idx++) { formattedCatNames = HTMLcatName.replace("%data%", cats.name[i]); var catNames = formattedCatNames; formattedCatImages = HTMLcatImage.replace("%data%", cats.image[i]); var catImages = formattedCatImages; formattedCatCounter = HTMLcatCounter.replace("%data%", cats.clicks[i]); var catCounter = formattedCatCounter var elem = document.createElement('div'); elem.innerHTML = catNames + catImages + catCounter; elem.addEventListener('click', (function(catIndex) { return function() { cats.clicks[catIndex]++; }; })(i)); document.body.appendChild(elem); } }, } cats.display(); I've tried modifying the events handler to something like this but the console states it's undefined: elem.getElementsByTagName('img').addEventListener('click', (function(catIndex) { return function() { cats.clicks[catIndex]++; }; Any suggestions would be greatly appreciated.
answer count: 1
downvote count: 0
has answer: http://stackoverflow.com/a/29337713
favorite count: 0
has comment: http://stackoverflow.com/comment/46863478
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46863437
type: AnsweredQuestion
score: 1
upvote count: 1
has title: Using addEventListener straight after createElement('div')
type: Question
has comment: http://stackoverflow.com/comment/46863442
tagged with: function
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29337713
has comment: http://stackoverflow.com/comment/46863533

http://stackoverflow.com/comment/46735733
type: AnswerComment
has text: You my friend are indeed correct! Thank you very much! :)
comment on: http://stackoverflow.com/a/29266754
score: 0
type: Comment

http://stackoverflow.com/q/29298356
has title: Mottie virtual keyboard and Chosen Selector
score: 2
upvote count: 2
has answer: http://stackoverflow.com/a/29548849
type: AnsweredQuestion
tagged with: virtual-keyboard
type: Question
tagged with: jquery-selectors
accepted answer: http://stackoverflow.com/a/29548849
has body: I am trying to get the following two excellent jQuery plugins to work together. virtual keyboard plugin by Mottie: (github.com/Mottie/Keyboard) a selector called Chosen which does filtering of the options as the user types: (harvesthq.github.io/chosen/) Here is an example of what I mean (when I use my physical keyboard): chosen auto-filtering while typing with physical keyboard Unfortunately this filtering does not happen when I use mottie's keyboard. Here is a screenshot of what happens: chosen auto-filtering while typing with mottie fails My mottie javascript is: $('input, textarea').keyboard({layout: 'qwerty', usePreview: false, autoAccept: true}).addTyping(); Any idea why? Probably this question could be answered by the two developers (@mottie) PS: Since need 10 points to post images I have them as links.
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: jquery-plugins

http://stackoverflow.com/comment/46648253
comment on: http://stackoverflow.com/q/29219582
type: Comment
type: QuestionComment
score: 2
has text: _"how can i preload?"_ Like [this](http://perishablepress.com/3-ways-preload-images-css-javascript-ajax/). _"what would be nice effect to smooth things out?"_ [`$.fadeIn()`](http://api.jquery.com/fadein/)?

http://stackoverflow.com/comment/46968401
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29334766
has text: the code is working perfectly for me. since you are nor using jquery in your javascript you do not need it. therefor in jsfiddle in the left menu you can select "No-Library (pure JS)" and under it select "No wrap - in ". with these settings, your code will work just fine
score: 0

http://stackoverflow.com/q/29346083
score: 0
tagged with: node-request
answer count: 1
accepted answer: http://stackoverflow.com/a/29351809
type: AnsweredQuestion
has body: I want to download file without saving on disk and pass file content to response. Really I want to get file as stream and then pass it to response and client can download file. for example with below Pseudo-code (with iron-router, meteor, request): Router.route('/file/download', function() { var res = this.response; var query = this.params.query; var id = query.id; var request = Meteor.npmRequire('request'); var future = new (Npm.require('fibers/future'))(); request('http://myFileHosting.com/files/download?id='+ id, function (error, response, fileContent) { if (!error &amp;&amp; response.statusCode == 200) { future.return(fileContent); } else { future.throw(error); console.log(error); } }); var fileContent = future.wait(); res.end(fileContent); }, { where: 'server' }); How to do this? What is the real solution for pass file to response on the fly without download on disk?
tagged with: javascript
has title: download file with request module and pass result to response in meteor and node.js
type: Question
tagged with: meteor
tagged with: node.js
has answer: http://stackoverflow.com/a/29351809
tagged with: iron-router

http://stackoverflow.com/comment/46828676
score: 0
has text: Aha, I have found it now, thanks.. I didnt know that it can be done.. registering more than one directives under same name.
type: Comment
comment on: http://stackoverflow.com/a/29266491
type: AnswerComment

http://stackoverflow.com/a/29283627
answers question: http://stackoverflow.com/q/29282313
upvote count: 9
type: Answer
has comment: http://stackoverflow.com/comment/108848221
has comment: http://stackoverflow.com/comment/108841220
downvote count: 0
has comment: http://stackoverflow.com/comment/46766574
score: 9
has comment: http://stackoverflow.com/comment/108845326
has body: There's a function to track if the library has loaded. From the docs: ga(function(tracker) { var defaultPage = tracker.get('page'); }); The passed in function is executed when the library is loaded, so you could set a variable to keep track of whether or not it has loaded. You'd have to put it on some sort of timer to decide when you want to consider it failed: var loaded = false; ga(function() { loaded = true; }); // after one second do something if the library hasn't loaded setTimeout(function(){ if (!loaded){ //do something } },1000);
has comment: http://stackoverflow.com/comment/46787453
accepted answer of: http://stackoverflow.com/q/29282313
type: AcceptedAnswer

http://stackoverflow.com/q/29254821
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46713614
has comment: http://stackoverflow.com/comment/46745157
tagged with: angularjs
tagged with: twitter-bootstrap
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46712716
has comment: http://stackoverflow.com/comment/46745124
has comment: http://stackoverflow.com/comment/46712878
has comment: http://stackoverflow.com/comment/46712679
has body: The calender popup is not working and when I am using angular.module("task", ['angularSpinner','ui.bootstrap']). I am getting the error: Error: Invalid isolate scope definition for directive datepickerPopup: =? This is my HTML page × Create a New Task <input ng-model="taskInstances" min="1" max="10" class="form-control" type="number" name="workerInstance" id="workerInstances" placeholder="Task Instance" value="1" onblur="if(this.value<1) { this.value='1'}" required/> dfghdfhdfgh Create This is my controller $scope.today = function() { $scope.dt = new Date(); }; $scope.today(); $scope.clear = function () { $scope.dt = null; }; // Disable weekend selection $scope.disabled = function(date, mode) { return ( mode === 'day' && ( date.getDay() === 0 || date.getDay() === 6 ) ); }; $scope.toggleMin = function() { $scope.minDate = $scope.minDate ? null : new Date(); }; $scope.toggleMin(); $scope.open = function($event) { $event.preventDefault(); $event.stopPropagation(); $scope.opened = true; }; $scope.dateOptions = { formatYear: 'yy', startingDay: 1 };
answer count: 0
has title: Calendar Pop-up is not working
has comment: http://stackoverflow.com/comment/46713684
type: Question
has comment: http://stackoverflow.com/comment/46714162
tagged with: javascript
tagged with: angular-ui-bootstrap
has comment: http://stackoverflow.com/comment/46712905
score: 0

http://stackoverflow.com/comment/46712486
has text: For me they are, but because of the stacking it looks messed. Simply hover any of the points of the "Oceania"-series.
score: 0
comment on: http://stackoverflow.com/q/29250093
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29231770
downvote count: 0
tagged with: jquery
score: 1
has answer: http://stackoverflow.com/a/29231831
favorite count: 0
tagged with: ajax
has answer: http://stackoverflow.com/a/29231844
type: Question
has title: Bind jQuery to Multiple Elements
has body: I am populating a table with some data. I do not know how many rows the table contains. Each row has a link which if I click shows me the details of the said row. Now I wish to bind a single jQuery to each of these hyperlinks. This function will receive the unique id of each row; and do an ajax to fetch more data for the row: Here is what the HTML looks like (with id being an actual number): &lt;a id="view-id"&gt; &lt;img src="/resources/assets/graphics/view.png" class="action-button" alt="View" title="View" /&gt; &lt;/a&gt; My jQuery function will look like so (with id being an actual number): $(document).on('click', '#view-id', function() { //Do Something }); Since I do not know how many row's I will have; how can I bind my jQuery function to each of these hyperlink elements. I read somewhere that I can do the following: $(document).on('click', '#view-1,#view-2,#view-3', function() { But this doesn't seem very efficient. Any ideas which direction I should head in. Bear in mind the table content is loaded via an AJAX call : ) Thanks.
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/29231831
upvote count: 1
accepted answer: http://stackoverflow.com/a/29231844
has answer: http://stackoverflow.com/a/29231826
has comment: http://stackoverflow.com/comment/46669728
tagged with: javascript
has answer: http://stackoverflow.com/a/29231996
answer count: 4
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46742194

forms
tags question: http://stackoverflow.com/q/29353666
tags question: http://stackoverflow.com/q/29241779
tags question: http://stackoverflow.com/q/29242172
tags question: http://stackoverflow.com/q/29260833
tags question: http://stackoverflow.com/q/29267773
tags question: http://stackoverflow.com/q/29303902
tags question: http://stackoverflow.com/q/29300829
tags question: http://stackoverflow.com/q/29293601
tags question: http://stackoverflow.com/q/29260718
type: Tag
tags question: http://stackoverflow.com/q/29218996
tags question: http://stackoverflow.com/q/29307314
tags question: http://stackoverflow.com/q/29255291
tags question: http://stackoverflow.com/q/29320642
tags question: http://stackoverflow.com/q/29308600
tags question: http://stackoverflow.com/q/29255496
tags question: http://stackoverflow.com/q/29237674
tags question: http://stackoverflow.com/q/29321494
tags question: http://stackoverflow.com/q/29274755
tags question: http://stackoverflow.com/q/29317375
tags question: http://stackoverflow.com/q/29292543
tags question: http://stackoverflow.com/q/29331003
tags question: http://stackoverflow.com/q/29220957
tags question: http://stackoverflow.com/q/29238457
tags question: http://stackoverflow.com/q/29244878
tags question: http://stackoverflow.com/q/29260145
tags question: http://stackoverflow.com/q/29366495
tags question: http://stackoverflow.com/q/29222415
tags question: http://stackoverflow.com/q/29247345
tags question: http://stackoverflow.com/q/29239326
tags question: http://stackoverflow.com/q/29332596
tags question: http://stackoverflow.com/q/29358355
tags question: http://stackoverflow.com/q/29268074
tags question: http://stackoverflow.com/q/29347901
tags question: http://stackoverflow.com/q/29313912
tags question: http://stackoverflow.com/q/29225283
tags question: http://stackoverflow.com/q/29236934
tags question: http://stackoverflow.com/q/29321046
tags question: http://stackoverflow.com/q/29257286
tags question: http://stackoverflow.com/q/29346988
tags question: http://stackoverflow.com/q/29312969
tags question: http://stackoverflow.com/q/29245853
tags question: http://stackoverflow.com/q/29276550
tags question: http://stackoverflow.com/q/29318371
tags question: http://stackoverflow.com/q/29333659
tags question: http://stackoverflow.com/q/29244741
tags question: http://stackoverflow.com/q/29269640
tags question: http://stackoverflow.com/q/29246268
tags question: http://stackoverflow.com/q/29281290
tags question: http://stackoverflow.com/q/29342473
tags question: http://stackoverflow.com/q/29320961
tags question: http://stackoverflow.com/q/29252714
tags question: http://stackoverflow.com/q/29264805
tags question: http://stackoverflow.com/q/29283506
tags question: http://stackoverflow.com/q/29280652
tags question: http://stackoverflow.com/q/29249349
tags question: http://stackoverflow.com/q/29229304
tags question: http://stackoverflow.com/q/29333273
tags question: http://stackoverflow.com/q/29290355
tags question: http://stackoverflow.com/q/29313120
tags question: http://stackoverflow.com/q/29241147
tags question: http://stackoverflow.com/q/29317665
tags question: http://stackoverflow.com/q/29267934
tags question: http://stackoverflow.com/q/29298849
tags question: http://stackoverflow.com/q/29282013
tags question: http://stackoverflow.com/q/29228576
tags question: http://stackoverflow.com/q/29245433
tags question: http://stackoverflow.com/q/29231249
tags question: http://stackoverflow.com/q/29310565
tags question: http://stackoverflow.com/q/29317787
tags question: http://stackoverflow.com/q/29271377
tags question: http://stackoverflow.com/q/29248959
tags question: http://stackoverflow.com/q/29313688
tags question: http://stackoverflow.com/q/29268934
tags question: http://stackoverflow.com/q/29257876
tag name: forms
tags question: http://stackoverflow.com/q/29292709
tags question: http://stackoverflow.com/q/29249606
tags question: http://stackoverflow.com/q/29231849
tags question: http://stackoverflow.com/q/29283632

http://stackoverflow.com/q/29269011
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29269105
has title: Toggling HTML text with a click or tap
type: Question
has answer: http://stackoverflow.com/a/29269386
has comment: http://stackoverflow.com/comment/46764670
answer count: 6
has comment: http://stackoverflow.com/comment/46739408
has answer: http://stackoverflow.com/a/29269274
has answer: http://stackoverflow.com/a/29269118
has answer: http://stackoverflow.com/a/29269181
accepted answer: http://stackoverflow.com/a/29269181
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29269105
has body: I am designing a website that will display long blocks of text which frequently contain unwieldy, difficult-to-read internal cross-references to other parts of the text. For example, a passage in the original text might say: "...as discussed in subparagraph (a) of subdivision (2) of chapter one thousand and fourteen of this article concerning modern art." I would like to present this text to the reader in a more concise format, such as: "...as discussed in Ch. 1014(2)(a) concerning modern art." But I have to leave the user with the option to toggle between my abbreviated version and the original version. I would like to accomplish this by letting the user click or tap on the particular text which will toggle between its abbreviated (by default) presentation and its full, original version. Ideally, an abbreviated chunk of text would be highlighted or outlined in such a way as to signal to the user that a longer original passage was condensed for readability, but may be clicked/tapped to expand. Can anybody suggest how I could program something like this? Should/can it be done in HTML, CSS, jQuery, JavaScript, or something else? (Just to be clear, I don't need an algorithm that will automatically transform the original text to a short form; I can manually identify and type the short forms in each case.) Thank you!
has answer: http://stackoverflow.com/a/29269125
tagged with: css

http://stackoverflow.com/q/29289154
type: UnansweredQuestion
upvote count: 1
downvote count: 1
type: Question
has body: I found a lot of questions about this topic on stackoverflow, but none fits what i encountered so far: When i set the Scriptpath in the basic config file to: define("SCRIPTPATH","inc/img/"); I end up with the Error: WARNING: REQUIRE_ONCE(C:/XAMPP/HTDOCS/INC/IMG//CONF.PHP): FAILED TO OPEN STREAM: NO SUCH FILE OR DIRECTORY IN So i changed the Path to fit my localhost Setup, to localhost/MyProjet/inc/img Now i get no PHP error, but javascript errors. Either way i choose i make something wrong. What's the problem here? JS Error Messages: Uncaught TypeError: Cannot read property 'msie' of undefined Thanks!
has answer: http://stackoverflow.com/a/29310268
tagged with: javascript
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/29315377
favorite count: 0
tagged with: php
has title: PHPChart library - Scriptpath

http://stackoverflow.com/comment/46849148
comment on: http://stackoverflow.com/q/29327929
score: 0
has text: does your ajax request working?
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29371304
has answer: http://stackoverflow.com/a/29371887
answer count: 1
has body: Please help me, i am new in JS.So, as you can see i have 12 divs with some backgorund images.I want to change these 12 backgorund images at the same tame when prev. or next are clicked. But i do not know how to do that.I have some JS code,it works, when i simply change image src. Now how can i change it for changing background-images?Thanks in advance. prev.next var step = 12; var total = 100; function next(x) { var image = document.getElementsByClassName("img"); for (var i = 0; i < image.length; i++) { step = step + x; if (step > total) { step = 12; } if (step < 12) { step = total; } image[i].src = "css/images1/img/img" + step + ".png"; }; };
downvote count: 0
favorite count: 0
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29371887
has title: Changing background image like slider
score: 1
upvote count: 1
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/46924278

http://stackoverflow.com/a/29292675
answers question: http://stackoverflow.com/q/29292330
type: Answer
has body: Assuming I understand what you are trying to do.. you could place the text and images inside the #maincontent element within seperate div tags respectively and then align them side-by-side with their own css. Technically they aren't within the SAME container like you said you wanted but they are still both within the #maincontent container. here is my JSFiddle that hopefully helps. note that I included random images inplace of your ones for the fade effect. CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENTtestestestest added css: #content-box { width: 500px; height: 100%; background-color: '#3e4'; float: left; overflow: hidden; } #image-box { width: 500px; height: 100%; background-color: '#3e4'; float: left; overflow: hidden; }
score: 0

http://stackoverflow.com/comment/46874993
has text: You could also directly use object without declaring a new variable, like `object.myFunc()` or `object.attr1`
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29344307

http://stackoverflow.com/q/29368318
tagged with: mocha.js
has body: I'm trying to assert that a object contains another one(e.i. deep equal cannot be use), but it seems that the nested ones are checked strictly. Code example: describe('Meta', function () { it('object should contains a cloned copy', function () { var obj = {a: 1, b: '2', c: {a: 2, b: '2'}}; return expect(obj).deep.contains(JSON.parse(JSON.stringify(obj))); }); }); Error message: AssertionError: expected { a: 1, b: '2', c: { a: 2, b: '2' } } to have a property 'c' of { a: 2, b: '2' }, but got { a: 2, b: '2' } Is there any way to do a "contains" with "deep equal" functionality?
has comment: http://stackoverflow.com/comment/80143046
has title: Chai deep contains assertion on nested objects
answer count: 1
upvote count: 6
favorite count: 0
type: UnansweredQuestion
score: 6
linked to: http://stackoverflow.com/q/35101998
tagged with: chai
has answer: http://stackoverflow.com/a/30658539
type: Question
downvote count: 0
tagged with: javascript

http://stackoverflow.com/a/30317255
upvote count: 15
has comment: http://stackoverflow.com/comment/65585248
accepted answer of: http://stackoverflow.com/q/29249132
has body: Unfortunately I couldn't find a native solution. But the following workaround solved my problem Use javascript promises &amp; you can call the resolve function from your iOS code. UPDATE This is how you can use promise In JS this.id = 1; this.handlers = {}; window.onMessageReceive = (handle, error, data) =&gt; { if (error){ this.handlers[handle].resolve(data); }else{ this.handlers[handle].reject(data); } delete this.handlers[handle]; }; } sendMessage(data) { return new Promise((resolve, reject) =&gt; { const handle = 'm'+ this.id++; this.handlers[handle] = { resolve, reject}; window.webkit.messageHandlers.&lt;yourHandler&gt;.postMessage({data: data, id: handle}); }); } in iOS Call the window.onMessageReceive function with appropriate handler id
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/29249132
type: Answer
has comment: http://stackoverflow.com/comment/85951000
has comment: http://stackoverflow.com/comment/62386657
has comment: http://stackoverflow.com/comment/64196299
score: 15
has comment: http://stackoverflow.com/comment/72571801

http://stackoverflow.com/a/30028920
downvote count: 0
score: 1
has body: Just wrap your table into a div, and it will work
type: Answer
answers question: http://stackoverflow.com/q/29303942
upvote count: 1

http://stackoverflow.com/a/29294271
answers question: http://stackoverflow.com/q/29293923
score: 0
has comment: http://stackoverflow.com/comment/46790877
has body: @maxval the problem you are facing is because you are delaring the variables outside the function.so inside the function the value of variable will be undefined.So the control never reaches your declaration part. The correct code should be a b you can easily debug your javascript using Mozilla Firefox add on- firebug or if you are using IDE like visual studio you can debug javascript using internet explorer
type: Answer

http://stackoverflow.com/comment/46711248
type: Comment
type: QuestionComment
has text: expectGet has to be setup for each GET request. If an unwanted call is made it will fail, as remote invocation is not allowed during unit test.
comment on: http://stackoverflow.com/q/29253936
score: 0

http://stackoverflow.com/comment/46705617
has text: what is the way to achieve this?How to create custom form?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29249606

http://stackoverflow.com/comment/46665141
comment on: http://stackoverflow.com/q/29229291
type: QuestionComment
type: Comment
score: 0
has text: or if there would be another way to approach this please tell me

http://stackoverflow.com/comment/46873209
type: QuestionComment
comment on: http://stackoverflow.com/q/29342473
type: Comment
has text: that's not what i want. I explained it a bit more detailed above now.
score: 0

http://stackoverflow.com/comment/46923018
comment on: http://stackoverflow.com/q/29365247
score: 0
type: Comment
type: QuestionComment
has text: @Xlander this - http://jsbin.com/yuwiqefuwi/1/edit?js,console

http://stackoverflow.com/comment/46769982
score: 0
type: Comment
type: QuestionComment
has text: technically you have an array of strings.
comment on: http://stackoverflow.com/q/29285961

http://stackoverflow.com/q/29313244
has answer: http://stackoverflow.com/a/31692425
has answer: http://stackoverflow.com/a/32593814
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29679072
has answer: http://stackoverflow.com/a/38560909
has answer: http://stackoverflow.com/a/30814256
has comment: http://stackoverflow.com/comment/46826071
linked to: http://stackoverflow.com/q/37626851
has answer: http://stackoverflow.com/a/30773343
linked to: http://stackoverflow.com/q/30096038
type: Question
linked to: http://stackoverflow.com/q/30546742
tagged with: react-native
upvote count: 92
has answer: http://stackoverflow.com/a/38286807
has body: I've seen this hack for native apps to auto scroll the window, but wondering best way to do it in React Native... When a &lt;TextInput&gt; field gets focus and is positioned low in the view, the keyboard will cover up the text field. You can see this issue in example UIExplorer's TextInputExample.js view. Does anyone have a good solution?
has answer: http://stackoverflow.com/a/41925697
has answer: http://stackoverflow.com/a/37364782
has answer: http://stackoverflow.com/a/35812358
score: 92
answer count: 14
has answer: http://stackoverflow.com/a/33585501
has answer: http://stackoverflow.com/a/30990428
downvote count: 0
tagged with: javascript
has title: How to auto-slide the window out from behind keyboard when TextInput has focus?
has answer: http://stackoverflow.com/a/38000410
favorite count: 0
has answer: http://stackoverflow.com/a/36858532

http://stackoverflow.com/q/29314591
possible better answer: http://stackoverflow.com/a/29316080
answer count: 3
has answer: http://stackoverflow.com/a/29314736
downvote count: 0
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/46821874
has title: jQuery function not found in wordpress
tagged with: http://stackoverflow.com/tag/html
tagged with: php
has comment: http://stackoverflow.com/comment/46821921
has answer: http://stackoverflow.com/a/29314667
accepted answer: http://stackoverflow.com/a/29314736
type: AnsweredQuestion
score: 1
tagged with: wordpress
upvote count: 1
has answer: http://stackoverflow.com/a/29316080
type: Question
has body: i have some code in simple html and it works fine but when i put in wordpress it does not work. its simple jquery slider which i am putting by hardcode in index.php here is how i am adding script <script src="<?php echo PARENT_URL; ?>/js/bjqs.js" type="text/javascript"> here is html which i am putting in index.php file after body tag and here is jquery where i am calling slider function $(".bjqs-slider").bjqs({ animtype : 'slide', height : 250, width : 300, responsive : true, randomstart : true }); so when i check using firebug, it show bjqs is not a function but bjqs.js file is also loading fine. and the same code works fine in local html file
tagged with: javascript

http://stackoverflow.com/comment/46732242
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29263742
has text: I think you might be right, but I can't seem to find the script that is messing with it.
score: 0

mysql
tags question: http://stackoverflow.com/q/29290646
tags question: http://stackoverflow.com/q/29252166
tags question: http://stackoverflow.com/q/29327996
tags question: http://stackoverflow.com/q/29255649
tags question: http://stackoverflow.com/q/29370509
tags question: http://stackoverflow.com/q/29352807
tags question: http://stackoverflow.com/q/29292543
tags question: http://stackoverflow.com/q/29259135
tags question: http://stackoverflow.com/q/29219013
tag name: mysql
tags question: http://stackoverflow.com/q/29270835
tags question: http://stackoverflow.com/q/29241643
tags question: http://stackoverflow.com/q/29238155
tags question: http://stackoverflow.com/q/29276195
tags question: http://stackoverflow.com/q/29269831
tags question: http://stackoverflow.com/q/29246047
tags question: http://stackoverflow.com/q/29271155
tags question: http://stackoverflow.com/q/29345773
tags question: http://stackoverflow.com/q/29297585
tags question: http://stackoverflow.com/q/29220999
tags question: http://stackoverflow.com/q/29371471
tags question: http://stackoverflow.com/q/29239822
tags question: http://stackoverflow.com/q/29305897
tags question: http://stackoverflow.com/q/29344631
tags question: http://stackoverflow.com/q/29248724
tags question: http://stackoverflow.com/q/29244179
tags question: http://stackoverflow.com/q/29339897
tags question: http://stackoverflow.com/q/29233896
tags question: http://stackoverflow.com/q/29247949
tags question: http://stackoverflow.com/q/29342558
tags question: http://stackoverflow.com/q/29256086
tags question: http://stackoverflow.com/q/29239123
tags question: http://stackoverflow.com/q/29320318
type: Tag
tags question: http://stackoverflow.com/q/29272596
tags question: http://stackoverflow.com/q/29256307
tags question: http://stackoverflow.com/q/29351871
tags question: http://stackoverflow.com/q/29236003
tags question: http://stackoverflow.com/q/29321329
tags question: http://stackoverflow.com/q/29255959
tags question: http://stackoverflow.com/q/29257038
tags question: http://stackoverflow.com/q/29317760
tags question: http://stackoverflow.com/q/29287088
tags question: http://stackoverflow.com/q/29328425
tags question: http://stackoverflow.com/q/29362440

http://stackoverflow.com/q/29248301
tagged with: sharepoint
has title: retrive the checkin comment using REST in sharepoint?
score: 0
tagged with: rest
answer count: 1
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29251793
type: Question
has body: i have tried to update,checkout,checkin AND retrive the checkin comment but im getting value does not fall within the range error? anything i have missed ? var getfileurl = document.getElementById("getfileurl").value; //i have entered the path like /lib/folder/test.docx alert(getfileurl); var executor; // Initialize the RequestExecutor with the app web URL. executor = new SP.RequestExecutor(appweburl); executor.executeAsync({ url: appweburl + "/_api/SP.AppContextSite(@target)/web/GetFileByServerRelativeUrl('" + getfileurl + "')/CheckInComment?@target='" + hostweburl + "'", method: "GET", headers: { "Accept": "application/json; odata=verbose" }, success: SuccessHandler, error: ErrorHandler });
tagged with: javascript

http://stackoverflow.com/comment/46905068
comment on: http://stackoverflow.com/a/29337489
score: 0
type: AnswerComment
has text: These frameworks are OVERKILL for simple templating.
type: Comment

http://stackoverflow.com/q/29311898
tagged with: jquery
favorite count: 0
accepted answer: http://stackoverflow.com/a/29311921
has title: Push specific, non-repeating value from JSON set into .each statement
has body: I have an each statement like this: $.each(data, function(i, value) { sublayers.push({ sql: "SELECT " + firstSel2 + ", cartodb_id, the_geom_webmercator FROM full_data_for_testing_deid_2 where " + firstSel2 + "='" + value.attri_1 + "'", cartocss: "#full_data_for_testing_deid_2 {marker-fill:"+color_here+";marker-width:5;marker-line-width: 0.2;marker-line-color:#fff;marker-allow-overlap: true;}" }); }); In the cartocss portion, there's a variable color_here. This is what I need to replace. This needs to be a hex value from an object like this: var myColors = ["#364C57", "#666DD6", "#867EAD", "#1A3D76", "#7F787F", "#35304C", "#1D5772", "#15446B", "#7382C0", "#484A48", "#454252", "#333C6F"]; What I need is for the each statement to pull out one of these colors (starting from the top) for each value that it loops through without repeating. Assume that there will never be more loops than there are colors in my object above. Is there a way to do this that ensures the colors don't repeat for a given each statement? I can come up with something that randomly picks from the list, but it would result in the possibility of a duplicate.
has answer: http://stackoverflow.com/a/29311921
downvote count: 0
has answer: http://stackoverflow.com/a/29312036
type: AnsweredQuestion
score: 1
tagged with: http://stackoverflow.com/tag/json
possible better answer: http://stackoverflow.com/a/29312036
type: Question
answer count: 2
upvote count: 1
tagged with: javascript

http://stackoverflow.com/comment/46742211
score: 0
type: QuestionComment
type: Comment
has text: so if the output is true, then the ajax.responseText.trim() is not "signup_success" ? could you try see what the value actually is?
comment on: http://stackoverflow.com/q/29270346

http://stackoverflow.com/comment/46882427
score: 0
type: AnswerComment
has text: I am changing date of my PC but it is not firing.
type: Comment
comment on: http://stackoverflow.com/a/29348100

http://stackoverflow.com/a/29368809
downvote count: 0
has body: check DEMO HTML &lt;input type="button" onclick="fn()" value="load Image" &gt; JQUERY function fn(){ $('&lt;img&gt;') .data('original','https://www.google.co.in/logos/doodles/2015/126th-anniversary-of-the-public-opening-of-the-eiffel-tower-4812727050567680-hp.jpg') .addClass('lazy') .appendTo('body') ; setTimeout(function(){ $("img.lazy").lazyload(); },100); }
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/29367660
type: Answer

http://stackoverflow.com/q/29362723
tagged with: kendo-ui
has comment: http://stackoverflow.com/comment/46914216
answer count: 2
has title: Typescript Kendo UI grid column type error
possible better answer: http://stackoverflow.com/a/29363184
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/29363184
has body: I have a problem with Kendo UI using Typescript in my project. I have a grid which filtering mode doesn't work on some column types, like integer. I tried to add the type in the columns directly, but it's not working at all. And it's not filtering on links either. [EDIT] Here's my function code that create the grid : private _createInfoGridOptions(): kendo.ui.GridOptions { return { dataSource: { serverPaging: true, serverSorting: true, pageSize: 15, }, resizable: true, selectable: 'row', filterable: true, columnMenu: true, sortable: true, scrollable: { virtual: true }, groupable: true, height: 450, columns: [ { field: 'subTaskId', type: "number", title: 'Subtask Id', width: '80px' }, { field: 'reportDate', type:"date", title: 'Report Date', width: '100px', template: '#= moment.utc(reportDate).local().format("yyyy/mm/dd") #' }, { field: 'prog', type: "string", title: 'prog', width: '60px', template: "&lt;a href='\\#' ng-click=\"openpopup(#=prog#, \'#=reportDate#\'\')\"&gt;#=prog#&lt;/a&gt;" }, { field: 'state', type:"string", title: 'status', width: '130px' }, { field: 'maxTemps', type: 'number', title: 'Max Temps', width: '100px' } ] }; } I have this error on Chrome: Uncaught TypeError: (d.prog || "").toLowerCase is not a function and this one on Firefox: TypeError: "".toLowerCase is not a function. I did a plunker to test my code translated in javascript, but the type property works. $("#grid").kendoGrid({ dataSource: { data : [ {id: 36308,reportDate:"2015-02-01",prog: 58,state: "Waiting",maxTemps: 0}, {id: 36309,reportDate:"2015-02-01",prog: 34,state: "Complete",maxTemps: 86400}, {id: 36310,reportDate:"2015-02-01",prog: 116,state: "Complete",maxTemps: 86400}, {id: 36311,reportDate:"2015-02-02",prog: 58,state: "Complete",maxTemps: 86400} ], serverPaging: true, serverSorting: true, pageSize: 15 }, filterable: true, columnMenu: true, columns: [ { field: 'id', type:'number', title: 'Id', width: '80px' }, { field: 'reportDate', title: 'Report Date', width: '100px' }, {…
favorite count: 0
tagged with: angularjs
upvote count: 1
has comment: http://stackoverflow.com/comment/46912700
has comment: http://stackoverflow.com/comment/46909276
has comment: http://stackoverflow.com/comment/46910295
type: AnsweredQuestion
tagged with: typescript
has answer: http://stackoverflow.com/a/29365199
type: Question
tagged with: kendo-grid
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29365199

http://stackoverflow.com/comment/46839800
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29324465
has text: the method is a POST.

http://stackoverflow.com/comment/46686489
type: AnswerComment
comment on: http://stackoverflow.com/a/29239888
type: Comment
has text: @SantiagoEsquivel - Check out the edit I threw up there. You are most correct that there doesn't need to be the array. And actually, associating the value with each iterated `parameter` object is most likely a better standard to follow. I've also updated the plnkr to display your requested changes!
score: 0

http://stackoverflow.com/comment/46838070
type: QuestionComment
comment on: http://stackoverflow.com/q/29289778
score: 0
has text: Thanks @ddprrt, in that post there is a reference for process.chdir, which indeed solved my problem!
type: Comment

http://stackoverflow.com/q/29266726
favorite count: 0
has answer: http://stackoverflow.com/a/29267292
has answer: http://stackoverflow.com/a/29266811
upvote count: 2
has body: I have a php script which charges a credit card for a payment system, but the thing is that I have a script with a variable in it, which I am trying to add 1 to everytime a function in the php script is called, only problem is that it doesn't work. I am not sure if there is something wrong with the code, or if it is because the variable isn't saved when a new page is loaded, because everytime the php script is called it redirects to a new page. html script with variable called product1.html php script with the function called chargeCard.php <?php require_once('./stripe-php/init.php'); // Set your secret key: remember to change this to your live secret key in production // See your keys here https://dashboard.stripe.com/account \Stripe\Stripe::setApiKey("Removed for safety"); // Get the credit card details submitted by the form $token = $_POST['stripeToken']; $myAmount = $_POST['amount']; $describtion = $_POST['description']; $myAmount = round((int)$myAmount*100,0); // Create the charge on Stripe's servers - this will charge the user's card try { $charge = \Stripe\Charge::create(array( "amount" => $myAmount, // amount in cents, again "currency" => "usd", "source" => $token, "description" => $describtion)); echo ' "'; } catch(\Stripe\Error\Card $e) { // The card has been declined } ?> The function I am trying to call in the php script is the line echo ' "';
type: UnansweredQuestion
tagged with: addition
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46736209
has answer: http://stackoverflow.com/a/29266812
tagged with: php
answer count: 4
has comment: http://stackoverflow.com/comment/46736806
has answer: http://stackoverflow.com/a/29267690
score: 1
downvote count: 1
type: Question
has title: Adding to variable through php won't work
has comment: http://stackoverflow.com/comment/46735268
tagged with: javascript
has comment: http://stackoverflow.com/comment/46735839
tagged with: variables

http://stackoverflow.com/q/29360894
upvote count: 1
tagged with: php
accepted answer: http://stackoverflow.com/a/29361090
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/46984067
has answer: http://stackoverflow.com/a/29361019
has title: pass JavaScript variable to HTML input box and (to use in PHP file)
has comment: http://stackoverflow.com/comment/46984176
type: Question
has body: I'm trying to pass a JavaScript variable to the value of an hidden input button to use in my PHP file output. My HTML is: I'm using this onclick="myFunction();" in my "Submit Form" input to run the function as it is not able to be done in the window.load() My JavaScript below is calling indexes from another function and assigning the text to the variable 'location' (I know this sounds strange but it was the only way I have got it to work so far): function myFunction() { var x = document.getElementById("box2").selectedIndex; var y = document.getElementById("box2").options; var location=(y[x].text); document.getElementById("location2").value=(location); } Any help would be hugely appreciated as I am really struggling and have been working on this for some time (as you can probably tell, I dont really know what I'm doing) - I just need to call the value of this variable into my PHP file output and the majority of my web form is completed. Thanks very much Marcus I've just changed my HTML as follows I've removed myFunction from my submit I've added the following HTML button: Click me The variable is now passing!!!! The only problem is when I press the onclick button, it is now submitting my form!! Is it okay for me to replace my previous submit button with this code?? THANKS TO EVERYONE FOR THEIR HELP ON THIS!!
has answer: http://stackoverflow.com/a/29361124
possible better answer: http://stackoverflow.com/a/29361019
downvote count: 0
tagged with: javascript
tagged with: variables
has answer: http://stackoverflow.com/a/29361090
answer count: 3
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has comment: http://stackoverflow.com/comment/46905922
has comment: http://stackoverflow.com/comment/46984620

http://stackoverflow.com/q/29275791
has comment: http://stackoverflow.com/comment/46765752
type: Question
has comment: http://stackoverflow.com/comment/46753478
tagged with: javascript
has title: Ajax-loaded HTML5-videos won't stop loading
tagged with: html5-video
tagged with: jquery
has comment: http://stackoverflow.com/comment/46754679
tagged with: ajax
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has body: So I have a small project with a scrolldown-page where every new content area gets loaded with ajax because every content area has a background-video. Everythings working fine but after loading approx. 6 pages on chrome the videos stop playing and on firefox everything starts lagging like crazy. I am deleting every video from the DOM after they get out of focus to prevent this but it doesn't work. Any tips?
has comment: http://stackoverflow.com/comment/46752551
answer count: 0
score: 0
has comment: http://stackoverflow.com/comment/46753740

http://stackoverflow.com/comment/46783652
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29293418
score: 0
has text: you can put the meta in GET, and use POST to ex: `xhr.send(inpFile.files[0])`

http://stackoverflow.com/a/29230162
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/29229922
upvote count: 1
has body: Use this css for last li .menu ul li:last-child{ float:right; text-align: right; display:inline; } See update here : http://codepen.io/anon/pen/QwYKBq
score: 1

http://stackoverflow.com/comment/46754625
score: 0
comment on: http://stackoverflow.com/a/29277708
type: Comment
has text: okay, found the mistake. Three different entry points, one with missing value. You're right. Thanks :-)
type: AnswerComment

http://stackoverflow.com/comment/46811292
type: QuestionComment
type: Comment
has text: Width of the element itself as opposed to the length of text inside it. Inspect or add a temporary border to annotation_preview_title and you'll see it.
comment on: http://stackoverflow.com/q/29308063
score: 0

http://stackoverflow.com/a/29322965
accepted answer of: http://stackoverflow.com/q/29322904
answers question: http://stackoverflow.com/q/29322904
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/46837000
has body: You're not returning anything from restApi.get. If you're using mongoose, you could return a Promise easily enough: var restAPI = { get: function(method, model, sort, limit, options) { if (method !== 'get') { return; } return model.find(options).sort(sort).limit(3).exec(); }, }; Then you can use it like this: app.get('/', function(req, res, next) { restAPI.get('get', Event, 'date', 3, {'isActive': true}).then( function ( result ) { res.render('/', { result: result }); }).catch( error ) { // Render error page and log error }); });
type: AcceptedAnswer

http://stackoverflow.com/q/29230276
answer count: 2
has answer: http://stackoverflow.com/a/29231544
upvote count: 1
has body: I've built a image gallery page using the following plugin found from a codrop article: http://tympanus.net/Tutorials/ThumbnailGridExpandingPreview/ I've got the gallery working as intended but I would like to add another feature but I'm struggling to figure out and I would really appreciate any help. Here's a jsfiddle showing a basic version with the open function working: http://jsfiddle.net/yfmm6q0o/ Using Hash values loaded from external links I would like the page to load and automatically open the preview, depending on the hash value (for example www.page.com#item-2 would open the second item preview). I was able to set the hash value using: window.location.hash; And by using the string replace I was able to add 'loc-' to the hash value and scroll the page to that ID, this worked great but I would like preview section to open as well. Is there a way to link the hash value to the following function: function initItemsEvents( $items ) { $items.on( 'click', 'span.og-close', function() { hidePreview(); return false; } ).children( 'a' ).on( 'click', function(e) { var $item = $( this ).parent(); // check if item already opened current === $item.index() ? hidePreview() : showPreview( $item ); return false; } ); } Meaning if the page loaded with #item-2 hash value it would fire a click event or simulate a click on the second item, opening the preview. Thanks in advance for any help.
tagged with: javascript
tagged with: jquery
has title: How to target a click event using hash value from external link
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29231059
accepted answer: http://stackoverflow.com/a/29231544
score: 1
has comment: http://stackoverflow.com/comment/46667754
type: Question
has answer: http://stackoverflow.com/a/29231059

http://stackoverflow.com/comment/46822568
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29314550
type: Comment
has text: this the fiddle i made http://jsfiddle.net/guradio/uygm2L62/3/ the scenario is you add storey first then click the add button

http://stackoverflow.com/comment/82955498
comment on: http://stackoverflow.com/a/44707025
type: Comment
type: AnswerComment
has text: The ES6 version is nice and shorter. However, I'm curious, what use do you have of the "_currentElement" object itself? It doesn't have the normal functions like "setState" which most people would want to access.
score: 0

event-handling
tag name: event-handling
tags question: http://stackoverflow.com/q/29243114
tags question: http://stackoverflow.com/q/29351723
type: Tag
tags question: http://stackoverflow.com/q/29318187
tags question: http://stackoverflow.com/q/29326596
tags question: http://stackoverflow.com/q/29225287

http://stackoverflow.com/comment/46848089
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/29328910
type: Comment
has text: @Xan: thanks but this isn't my problem, I do inject the script to the page and doing that after the DOM has been loaded, go try to play with it in the console in a HTML5 video and in a flash video on Youtube and you will see the issue I'm facing.

http://stackoverflow.com/comment/46769805
has text: @Fergoso what do you have in t?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29285809
type: Comment

http://stackoverflow.com/comment/46718786
score: 0
type: Comment
type: QuestionComment
has text: Here the docs http://api.jquery.com/closest/
comment on: http://stackoverflow.com/q/29258172

http://stackoverflow.com/comment/46718808
type: Comment
comment on: http://stackoverflow.com/q/29258072
score: 0
type: QuestionComment
has text: @shevski: That's not actually true in JavaScript.

http://stackoverflow.com/q/29321342
tagged with: css
has answer: http://stackoverflow.com/a/29321428
has comment: http://stackoverflow.com/comment/46834042
type: AnsweredQuestion
type: Question
accepted answer: http://stackoverflow.com/a/29321428
tagged with: javascript
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/46833972
has comment: http://stackoverflow.com/comment/46834090
has body: I've got a &lt; table > - &lt; tr > - &lt; td > structure. Each &lt; td > includes a &lt; div > with three &lt; span > inside. I need a function, which returns the clicked &lt; td > every time I click either &lt; td > or any of its elements (&lt; div >, &lt; span >#1, &lt; span >#2, &lt; span >#3). What I tried is setting z-index property to &lt; td > of higher value than one to &lt; div > and &lt; span > elements. Thus, I tried to "hide" them behind &lt; td >, but it didn't work. Here's what I've got now: http://jsbin.com/mocajahalu/2/edit?html,css,js,output Please, help.
has title: Retrieve the parent of a clicked element
possible better answer: http://stackoverflow.com/a/29321385
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29321385

http://stackoverflow.com/comment/46788813
type: Comment
score: 0
type: AnswerComment
has text: Thanks, works perfectly, can u check my question in update of this topic too?
comment on: http://stackoverflow.com/a/29296534

http://stackoverflow.com/q/29308530
score: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46812405
tagged with: css
accepted answer: http://stackoverflow.com/a/29308665
has title: Custom font on canvas only working for safari
type: AnsweredQuestion
has body: I'm currently building a canvas game in JavaScript and jQuery. For the statusbar I wanted to use a custom font, named "pixelart.ttf". In index.html I added the following: &lt;style type="text/css"&gt; @font-face { font-family: pixelart; src: url(misc/pixelart.ttf); } &lt;/style&gt; It is before all scripts are loaded. The canvas is also on this page. This is the code that should draw the statusbar with the font: context.fillStyle = 'rgba(25, 25, 25, 0.1)'; context.textBaseline = 'top'; context.font = fontSize + ' ' + fontName; // will become '25px pixelart' context.fillText(currentText, 50, 50); In Safari on both Mac and iPhone the font works, on all other browsers it does not. When I look at the loaded resources in Chrome or Firefox the font is there, but it shows another default font. I tried some things. For example adding this at the top of the body: &lt;div style"font-family: pixelart"&gt;&lt;/div&gt; But this also doesn't work. Any suggestions?
type: Question
has answer: http://stackoverflow.com/a/29308665
tagged with: canvas
answer count: 1
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/29268708
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29268354
type: Answer
score: 2
upvote count: 2
has body: You can hide all menus and only show the selected one, change your toggle function like this : $scope.toggle = function (Menu) { $scope.Menus.forEach(function(m) { m.show = (Menu==m); }); }; Update: here's a better alternative, less and faster code : you can get rid of the show property on your data and change the toggle function to $scope.toggle = function (Menu) { $scope.activeMenu = Menu.id; }; and change your ng-show to ng-show="Menu.id==(activeMenu || 1)" here's a working example : https://refork.codicode.com/xc23 hope this helps.
answers question: http://stackoverflow.com/q/29268354
has comment: http://stackoverflow.com/comment/46739022
type: AcceptedAnswer

http://stackoverflow.com/comment/46819349
score: 0
has text: Thanks for the reference link to the duplicate question. I did search this on here but didn't come across that specific answer and it was detailed quite nicely.
comment on: http://stackoverflow.com/q/29312867
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46863204
has text: Do you already have a ` ` inside `#d3-sizemap-hr` by any chance?
score: 2
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29337471

php
tags question: http://stackoverflow.com/q/29342907
tags question: http://stackoverflow.com/q/29362267
tags question: http://stackoverflow.com/q/29271377
tags question: http://stackoverflow.com/q/29249017
tags question: http://stackoverflow.com/q/29253169
tags question: http://stackoverflow.com/q/29327929
tags question: http://stackoverflow.com/q/29222634
tags question: http://stackoverflow.com/q/29247645
tags question: http://stackoverflow.com/q/29317844
tags question: http://stackoverflow.com/q/29237960
tags question: http://stackoverflow.com/q/29344525
tags question: http://stackoverflow.com/q/29245525
tags question: http://stackoverflow.com/q/29360616
tags question: http://stackoverflow.com/q/29339897
tags question: http://stackoverflow.com/q/29248959
tags question: http://stackoverflow.com/q/29357758
tags question: http://stackoverflow.com/q/29323288
tags question: http://stackoverflow.com/q/29369769
tags question: http://stackoverflow.com/q/29367360
tags question: http://stackoverflow.com/q/29298609
tags question: http://stackoverflow.com/q/29280686
tags question: http://stackoverflow.com/q/29304456
tags question: http://stackoverflow.com/q/29319126
tags question: http://stackoverflow.com/q/29292332
tags question: http://stackoverflow.com/q/29335252
tags question: http://stackoverflow.com/q/29247235
tags question: http://stackoverflow.com/q/29351871
tags question: http://stackoverflow.com/q/29302649
tags question: http://stackoverflow.com/q/29328080
tags question: http://stackoverflow.com/q/29299194
tags question: http://stackoverflow.com/q/29363292
tags question: http://stackoverflow.com/q/29277882
tags question: http://stackoverflow.com/q/29262975
tags question: http://stackoverflow.com/q/29258054
tags question: http://stackoverflow.com/q/29370678
tags question: http://stackoverflow.com/q/29358718
tags question: http://stackoverflow.com/q/29249106
tags question: http://stackoverflow.com/q/29323241
tags question: http://stackoverflow.com/q/29341069
tags question: http://stackoverflow.com/q/29324119
tags question: http://stackoverflow.com/q/29297507
tags question: http://stackoverflow.com/q/29250942
tags question: http://stackoverflow.com/q/29278548
tags question: http://stackoverflow.com/q/29297816
tags question: http://stackoverflow.com/q/29356279
tags question: http://stackoverflow.com/q/29249606
tags question: http://stackoverflow.com/q/29316901
tags question: http://stackoverflow.com/q/29307144
tags question: http://stackoverflow.com/q/29263495
tags question: http://stackoverflow.com/q/29269237
tags question: http://stackoverflow.com/q/29290596
tags question: http://stackoverflow.com/q/29361767
tags question: http://stackoverflow.com/q/29291410
tags question: http://stackoverflow.com/q/29293634
tags question: http://stackoverflow.com/q/29361011
tags question: http://stackoverflow.com/q/29302829
tags question: http://stackoverflow.com/q/29348186
tags question: http://stackoverflow.com/q/29236730
tags question: http://stackoverflow.com/q/29326398
tags question: http://stackoverflow.com/q/29228570
tags question: http://stackoverflow.com/q/29280765
tags question: http://stackoverflow.com/q/29321045
tags question: http://stackoverflow.com/q/29232691
tags question: http://stackoverflow.com/q/29355499
tags question: http://stackoverflow.com/q/29326390
tags question: http://stackoverflow.com/q/29357931
tags question: http://stackoverflow.com/q/29290498
tags question: http://stackoverflow.com/q/29307485
tags question: http://stackoverflow.com/q/29247520
tags question: http://stackoverflow.com/q/29239094
tags question: http://stackoverflow.com/q/29233682
tags question: http://stackoverflow.com/q/29270822
tags question: http://stackoverflow.com/q/29227244
tags question: http://stackoverflow.com/q/29236003
tags question: http://stackoverflow.com/q/29341876
tags question: http://stackoverflow.com/q/29316226
tags question: http://stackoverflow.com/q/29245804
tags question: http://stackoverflow.com/q/29219189
tags question: http://stackoverflow.com/q/29353772
tags question: http://stackoverflow.com/q/29336560

http://stackoverflow.com/q/29346019
accepted answer: http://stackoverflow.com/a/29346407
type: Question
tagged with: javascript
linked to: http://stackoverflow.com/q/17756848
score: 0
answer count: 1
tagged with: passport.js
has body: I have end-points like below: app.post(api + '/channels/:channel_id/albums', user.ensureAuthenticated, album.create); app.get(api + '/channels/:channel_id/albums/published', user.ensureAuthenticated,album.publishedAlbums); app.get(api + '/channels/:channel_id/albums', user.ensureAuthenticated, album.findAll); It all works fine, but it's annoying for me to put user.ensureAuthenticated in each of the end-points, are there any method that you can once put the user.ensureAuthentication at once for all? For ex: Laravel has such options like beforeAuth you make an if and inside that u put all the end-points that you want to make protected. like for ex: if(user.ensureAuthenticated){ // endpoints declariations }else{ // redirect to login } Thanx
tagged with: node.js
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/11650489
has title: Prevent APIs using PassportJS
has answer: http://stackoverflow.com/a/29346407

http://stackoverflow.com/q/29321741
has answer: http://stackoverflow.com/a/29321916
has answer: http://stackoverflow.com/a/29321940
type: AnsweredQuestion
has title: jQuery fade out HTML text when replacing it with new text instead of just appearing
has body: I have the following little script... $(document).ready(function() { $('#search').bind('keyup', function(event) { if($('#search').val().length == '0') { $("#products").html("All Products"); } else { $("#products").html("Searching Products"); } }); }); When #search has something in it, it shows 'Searching Products', and when empty, it shows 'All Products'. My problem is that it quickly changes with no fade effect, so it looks a bit choppy. How could I have it fade from one to the other, no matter which direction (from empty to typed or from typed to empty) it's going?
type: Question
has answer: http://stackoverflow.com/a/29321819
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29321940
score: 0
has comment: http://stackoverflow.com/comment/46834879
has answer: http://stackoverflow.com/a/29322209
tagged with: jquery
has answer: http://stackoverflow.com/a/29322009
has comment: http://stackoverflow.com/comment/46834842
possible better answer: http://stackoverflow.com/a/29322209
answer count: 5

http://stackoverflow.com/a/29275482
score: 0
has body: Try this my code: sliderInt = 1; sliderNext = 2; $(document).ready(function() { $(".sliderzps &gt; img").hide(); $(".sliderzps &gt; img").eq(0).fadeIn(0); startSlider(); }); function startSlider(){ count = $(".sliderzps &gt; img").size(); loop = setInterval(function() { if(sliderNext &gt;= count) { sliderNext = 0; } $(".sliderzps &gt; img").fadeOut(0); $(".sliderzps &gt; img").eq(sliderNext).fadeIn(0); sliderInt = sliderNext; sliderNext++; }, 3000); } .sliderzps{ width:200px; margin:auto; border:1px solid #323232; padding:5px; } img{ margin:auto; width:40px; display:block; } &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"&gt;&lt;/script&gt; &lt;div class="sliderzps"&gt; &lt;img src="http://www.clarkcraft.co.uk/images/des/48040.jpg"/&gt; &lt;img src="http://glamorouslymommy.com/wp-content/uploads/2013/05/small-background1.jpg"/&gt; &lt;img src="https://d21buns5ku92am.cloudfront.net/26027/images/149697-Symbid_logo_square_blue_bg_500px-a46cbc-medium-1416847903.jpg"/&gt; &lt;/div&gt;
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29274889
type: Answer
accepted answer of: http://stackoverflow.com/q/29274889
has comment: http://stackoverflow.com/comment/46755191

http://stackoverflow.com/q/29350970
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/46911663
has title: Parsing JSON with jQuery Mustache template
type: Question
tagged with: javascript
tagged with: jquery
score: 0
linked to: http://stackoverflow.com/q/358350
duplicate of: http://stackoverflow.com/q/358350
tagged with: mustache
has comment: http://stackoverflow.com/comment/46887402
answer count: 0
type: UnansweredQuestion
has body: I am complete rookie to Javascript, jQuery and JSON. For the most part the JSON data is displaying correctly. I have a list of JSON array comments that is rendered in HTML. I would like to include a different background color for list items. I realize that Mustache is a logicless template but can this be achieved. Below are the codes. Any advise will be very much appreciated. Thanks in advance! HTML: JSON data: { "comments": [ { "name": "John Smith", "comment": "Would like background in light gray", "timestamp": "18-11-2013" }, { "name": "Jane Doe", "comment": "Would like background to be dark gray", "timestamp": "26-11-1991" }, { "name": "Amy Lang", "comment": "Would like background in light gray", "timestamp": "30-5-1991" }, { "name": "Jessica Rabbit", "comment": "Would like background to be dark gray", "timestamp": "23-5-1988" } ] }
has comment: http://stackoverflow.com/comment/46901101

http://stackoverflow.com/q/29224271
tagged with: jquery
score: 0
answer count: 2
has title: jQuery: how to find if radio buttons whose ids are dynamically generated is checked?
has answer: http://stackoverflow.com/a/29224299
possible better answer: http://stackoverflow.com/a/29224314
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29224314
accepted answer: http://stackoverflow.com/a/29224299
has body: The item id is not know before hand. We get to know that only at run time. @foreach (var item in Model) { ... @Html.RadioButton("Opinion_" + item.ID, "Agree") Agree @Html.RadioButton("Opinion_" + item.ID, "Disagree") Disagree @Html.RadioButton("Opinion_" + item.ID, "Neither") Neither } This is my script where I want to check if the radio buttons have been checked. If they are, then I want to allow the user to proceed. If not, I just want to display an alert saying that they haven't made a choice. How do I modify the above script to accomplish this?
type: Question
tagged with: javascript

object-literal
tag name: object-literal
tags question: http://stackoverflow.com/q/29292722
type: Tag

http://stackoverflow.com/q/29271245
type: UnansweredQuestion
upvote count: 1
tagged with: firebase
score: 1
has body: I would like to use the value of an input from a form element to add a child reference to my firebase data. But, the firebase .child() requires a string, and I've tried to insert a variable (whose value is a string) but it won't work. How do I by pass this? For example here is a very simple code of an input and submit button. On submission, I want to take the username and add a child reference to my database (under /users ref) in this structure: {username:{userid: "someID"}} test file for .child()/p>
type: Question
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
has title: Using form element as variable in Firebase .child()
has answer: http://stackoverflow.com/a/29275303

http://stackoverflow.com/comment/46789981
type: QuestionComment
has text: just i need the conversion in Java script ,which convert into primitive type from wrapper(object)
type: Comment
score: 0
comment on: http://stackoverflow.com/q/29295380

http://stackoverflow.com/a/29308150
score: 0
answers question: http://stackoverflow.com/q/29307968
type: Answer
has body: I think this NProgress.inc() $.ajax({...}) .done(function( data ) { ... NProgress.done() }); Remember that you must manage the errors.
has comment: http://stackoverflow.com/comment/46887486

http://stackoverflow.com/q/29250997
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46706505
has body: I am implementing a new feature to let my page to support endless scroll AJAX show. But when I pull down my page scroll bar, sometimes the same request occurs. This means that alert(nextPage) method is executed and it shows the same result. I've added the event.stopPropagation() code, but it didn't solve the problem. How can i fix it? (function(window, undefined) { var app = { event: { add: function(obj, type, handle) { try { obj.addEventListener(type, handle, false); } catch (e) { try { obj.attachEvent('on' + type, handle); } catch (e) { obj['on' + type] = handle; } } } }, scroll: function(id, url) { $.get(url, function(html) { $("#" + id).append(html) }); } } })(window); HTML &lt;script&gt; $(function() { app.event.add(window, "scroll", function(event) { var nextPage = getNextPage(); alert(nextPage); app.scroll("productTable", '?page=' + nextPage); if (event &amp;&amp; event.stopPropagation) { event.stopPropagation(); } else { window.event.cancelBubble = true; } }); }); &lt;/script&gt;
type: Question
tagged with: javascript
tagged with: jquery
tagged with: ajax
score: 0
has title: How can prevent the scroll event execute more times?
has comment: http://stackoverflow.com/comment/46706362

http://stackoverflow.com/q/29288829
upvote count: 1
type: Question
tagged with: dropbox
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: dropbox-api
accepted answer: http://stackoverflow.com/a/29288980
answer count: 1
has body: I am working on a simple chrome-extension that needs to upload files to the user's dropbox folder. I am using the simple AJAX requests as mentioned below to upload files, however it works for files with extensions such as .txt, .json, .c, etc i.e. files whose mime type is of type text/plain or similar type but all other file types such as pdfs, image files etc get corrupted and produce blank contents. What am I missing in uploading the files the correct way. function startUpload() { var folderPath = $(this).closest('tr').attr('path')+'/'; var file = $("#upload_file")[0].files[0]; if (!file){ alert ("No file selected to upload."); return false; } var reader = new FileReader(); reader.readAsText(file, "UTF-8"); reader.onload = function (evt) { uploadFile(folderPath+file.name,evt.target.result,file.size,file.type); } } //function to upload file to folder function uploadFile(filepath,data,contentLength,contentType){ var url = "https://api-content.dropbox.com/1/files_put/auto"+filepath; var headers = { Authorization: 'Bearer ' + getAccessToken(), contentLength: contentLength, }; var args = { url: url, headers: headers, crossDomain: true, crossOrigin: true, type: 'PUT', contentType: contentType, data : data, dataType: 'json', success: function(data) { getMetadata(filepath.substring(0,filepath.lastIndexOf('/')),createFolderViews); }, error: function(jqXHR) { console.log(jqXHR); } }; $.ajax(args); }
tagged with: file-upload
favorite count: 0
type: AnsweredQuestion
has title: Upload files to Dropbox using a Dropbox Core API in Javascript
has answer: http://stackoverflow.com/a/29288980
score: 1

http://stackoverflow.com/comment/46910449
score: 0
has text: I get : jQuery is not defined when I remove
type: Comment
comment on: http://stackoverflow.com/a/29363457
type: AnswerComment

http://stackoverflow.com/q/29267835
has comment: http://stackoverflow.com/comment/46737180
linked to: http://stackoverflow.com/q/5078239
has answer: http://stackoverflow.com/a/29267966
has title: There is space between and its subsequent element . Is there a way to make them visible inline
answer count: 3
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/46737176
has body: Kindly suggest the suitable modification to remove the space between the input type="text" and the subsequent div element. If i set width of input type="text" element to 180px and width of the following div to 20px; the div overflows and moves down. I would not want to use margin-left: -...px on the child div to make it appear inline (because it take -8px in firefox and -6px in chrome to make them appear inline) but I would still want both the elements to be displayed perfectly inline without any empty spaces between them and edge to edge of its parent element across all browsers. Kindly suggest... css: #parentDiv { display: block; width: 200px; height: 20px; background-color: rgb(200,200,200); border: dotted 2px; border-radius: 0px 0px 0px 0px; } #parentDiv input[type="text"] { display: inline-block; width: 175px; height: 90%; border: none; vertical-align: top; } #parentDiv div { background-color: #57c274; display: inline-block; cursor: pointer; color: #ffffff; text-decoration: none; height: 100%; width: 20px; /*margin-left: -6px;*/ text-align: center; } &lt;div id=parentDiv&gt; &lt;input type="text"&gt; &lt;div&gt;&lt;/div&gt; &lt;/div&gt;
score: 0
has answer: http://stackoverflow.com/a/29267935
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/29267861
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/19038799
possible better answer: http://stackoverflow.com/a/29267861
upvote count: 1
downvote count: 1
type: Question
duplicate of: http://stackoverflow.com/q/19038799
accepted answer: http://stackoverflow.com/a/29267935

http://stackoverflow.com/q/29233995
type: Question
has comment: http://stackoverflow.com/comment/46674082
score: 0
answer count: 2
has body: I am new to AngularJS, but with the little I have learn't and worked it, I aprreciate it has a fantastic client side framework, However I dont like it when I have to include all the files I need in my my index Page for instance A user can just check source and download my project like this, how can load only a javascript and in that I can bootstrap all my required angular javascript files? An idea is what I put below My Index.html Page ... ... My bootstrapmyfiles.js File //pseudocode here require("angular.js") //require other javascript files too How can I achieve this please, Is there a way? seen this question but not satisfactory
linked to: http://stackoverflow.com/q/25465923
has title: Bootstrapping AngularJS javascript files through one javascript file
has comment: http://stackoverflow.com/comment/46674806
tagged with: javascript
has answer: http://stackoverflow.com/a/29236432
tagged with: angularjs
has comment: http://stackoverflow.com/comment/46676533
has answer: http://stackoverflow.com/a/29236843
type: UnansweredQuestion

http://stackoverflow.com/a/29345475
downvote count: 0
answers question: http://stackoverflow.com/q/29332794
has comment: http://stackoverflow.com/comment/47222584
type: Answer
has comment: http://stackoverflow.com/comment/47214275
score: 2
upvote count: 2
has body: All of the examples are for the scenario where the user is using your app to access his own files. In your case, you want the app to access your own file. This isn't easy. The only ways I can see are :- Use a server app (appengine works well) to do the access Very carefully set up permissions and store a refresh token in your app. Option 2 could be your worst security nightmare if you don't do it carefully, and even then may be an infringement of Google T's and C's since it's akin to distributing your password. Once you figure out the auth, you'll need to check out the spreadsheet API (https://developers.google.com/google-apps/spreadsheets/), as this is the API that allows you to update an existing spreadsheet. The Drive API can only upload an entire new spreadsheet.

http://stackoverflow.com/q/29276237
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/13204562
tagged with: http://stackoverflow.com/tag/svg
tagged with: d3.js
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/29277905
score: 0
accepted answer: http://stackoverflow.com/a/29277905
answer count: 1
has comment: http://stackoverflow.com/comment/46760984
has title: d3js/svg - Polygon without fixed coordinates?
has body: Is it possible to create an SVG polygon shape in d3js without hard coding the coordinates? From what I understand a most common way to create an SVG polygon shape is to hard code the coordinates like done in the below linked examples. Process multiple polygons d3 http://www.w3.org/TR/SVG/shapes.html#PolygonElement But I do not want to hard code the coordinates since I want to use a force directed layout algorithm (in d3js) to define the coordinates like done in the below linked example. http://bl.ocks.org/mbostock/2706022 Thanks, Erno Lindfors
has comment: http://stackoverflow.com/comment/46751468
linked to: http://stackoverflow.com/q/14939325

http://stackoverflow.com/q/29282313
has comment: http://stackoverflow.com/comment/46762563
linked to: http://stackoverflow.com/q/61530268
has answer: http://stackoverflow.com/a/56474445
favorite count: 0
has answer: http://stackoverflow.com/a/29283627
has comment: http://stackoverflow.com/comment/46762712
tagged with: google-analytics
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46762625
has body: I have to use a local analytics.js that I serve from my server. I just want to use the local version if necessary - so is there a solution for checking if the call for analytics.js has failed? I thought about checking it with a global window.onerror, but I don't think a failed call for an external file causes an error. I've tried checking if ga() is available, but it is even if analytics.js isn't loaded. Any ideas? If you are wondering, not all users of this site has internet access, that's why I'm serving a local version. There is more things happening in this case, like adding a sendHitTask to redirect the answer from analytics.js to the local server. EDIT A solution where you check if the user has Internet access would also be OK. But I have not found any solution for this either that works on all modern browsers.
upvote count: 5
has title: Check if analytics.js is loaded
has comment: http://stackoverflow.com/comment/46762826
accepted answer: http://stackoverflow.com/a/29283627
type: Question
score: 5
has answer: http://stackoverflow.com/a/29316491
downvote count: 0
tagged with: javascript
tagged with: jquery
answer count: 3
has comment: http://stackoverflow.com/comment/46762791
possible better answer: http://stackoverflow.com/a/56474445

http://stackoverflow.com/q/29306931
accepted answer: http://stackoverflow.com/a/29310267
score: 5
has answer: http://stackoverflow.com/a/68952461
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/76928800
tagged with: media-source
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/116249318
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/57881151
has answer: http://stackoverflow.com/a/29310267
tagged with: mpeg-dash
possible better answer: http://stackoverflow.com/a/57881151
type: Question
has answer: http://stackoverflow.com/a/78692395
has title: Delete a TextTrack from a video
upvote count: 5
tagged with: javascript
answer count: 6
tagged with: html5-video
has body: Is there a good way to delete a single TextTrack added via JavaScript to a HTML5 &lt;video&gt; tag? The following code is a simple demo of how to add a track, but I haven't found a good way to remove one: document.querySelector('video#myVideo').addTextTrack(...);
has answer: http://stackoverflow.com/a/59419527

http://stackoverflow.com/q/29283873
has comment: http://stackoverflow.com/comment/46766894
upvote count: 1
answer count: 1
has title: Javascript not working in Safari when navigating to a new url
favorite count: 0
tagged with: twitter-bootstrap
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46767158
tagged with: django
tagged with: safari
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/46765538
tagged with: navigation
type: Question
has answer: http://stackoverflow.com/a/29284708
tagged with: javascript
has body: When taking bill payment I display a static bootstrap popup to tell the user to wait. The user clicks a button which calls the js function to display the popup, then redirect the user to the url that runs the billing on the server side. It works in all browsers except Safari. When I click the button in Safari the popup does not appear, it just navigates to the billing page. I noticed if I remove the navigation line (location.replace('/billingpage/pay/');) the popup will display properly in safari. It seems like if there is a navigation in the javascript safari does not bother displaying the popup. I also tried putting the navigation in another function and calling it after a timeout like this: window.setTimeout(navigate(), 1000); but that did not work either. function pay_now() { document.getElementById("paynow_btn").disabled=true; document.getElementById("paynow_btn").style.opacity = 0.25; var wait_title = "Please wait while the transaction is processed..."; var wait_message = " "; document.getElementById("staticModalLabel").innerHTML = wait_title; document.getElementById("staticModalBody").innerHTML = wait_message; var spinner = new Spinner().spin(); document.getElementById("staticModalBody").appendChild(spinner.el); $('#staticPopupModal').modal({ backdrop: 'static', keyboard: false }); location.replace('/billingpage/pay/'); } PAY

http://stackoverflow.com/comment/46811498
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29308486
has text: Well that is obviously not gonna work. If you want to pass PHP variables to JavaScript you have to do it where PHP actually runs.
score: 0

http://stackoverflow.com/q/29264350
type: Question
has answer: http://stackoverflow.com/a/29264446
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29264477
has answer: http://stackoverflow.com/a/29264484
answer count: 3
has comment: http://stackoverflow.com/comment/46730701
upvote count: 1
has comment: http://stackoverflow.com/comment/46730764
has body: given following example Loading... in javascript I've all these constants defined at a global level initialized before angular kicks in. STATES = { DOWNLOADING: 1, UPDATING: 2, INSTALLING: 3 } it works with file.state == 1 but wondering how angular can evaluate it as an expression.
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/46730684
has answer: http://stackoverflow.com/a/29264477
score: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/46730793
has comment: http://stackoverflow.com/comment/46730813
has title: ng-show comparing with a variable
has comment: http://stackoverflow.com/comment/46730663
accepted answer: http://stackoverflow.com/a/29264484
downvote count: 1

http://stackoverflow.com/q/29224762
tagged with: http://stackoverflow.com/tag/html
score: 2
downvote count: 0
has title: Tooltip text sudden added into Arabic text when mouseleave
type: UnansweredQuestion
type: Question
has body: I am creating the Tajweed rules that when the I mouseenter, it will replace the selected Tajweed with color and show the tooltip only under the colored Arabic text. But the problem is, when the I mouseleave, the tooltip text is added into the Arabic text. HTML: ﻣِـنْ أَﺧِﯿﻪِ Javascript: $( "span.enter" ) .mouseenter(function() { var $this=$(this); $this.html($this.text().replace(/نْ أَ/,' '+ unescape("%u0646%u0652%u0020%u0623%u064E")+' ')); $('#enter').tooltip({ trigger: 'hover', placement: 'bottom', html: true, title: 'Read With Bright & Clear' }); }) .mouseleave(function() { var $this=$(this); $this.html($this.text().replace(/نْ أَ/,unescape('%u0646%u0652%u0020%u0623%u064E'))); $('#enter').tooltip('hide'); }); This work like charm, but I have no idea why the tooltip text keep adding to the Arabic text. Thank you. Here's the fiddle: http://jsfiddle.net/610bx4k1/ EDIT Here example of not accurate tooltip, which I have done previously. It only show tooltip below the div: This example what I want, but when mouseleave, the tooltip text added into Arabic text: Thank you everybody!
tagged with: tooltip
tagged with: javascript
upvote count: 2
tagged with: replace
answer count: 1
has answer: http://stackoverflow.com/a/29225104
tagged with: arabic
favorite count: 0

http://stackoverflow.com/a/29313405
has comment: http://stackoverflow.com/comment/46836545
has body: This is the most elegant way I can think of in plain JavaScript, as it doesn't use any intermediary data structures (the original solution creates two arrays which are then combined into the final object). var counts = products.reduce(function (result, product) { product.ingredients.forEach(function (ingredient) { result[ingredient] = (result[ingredient] || 0) + 1; }); return result; }, {});
has comment: http://stackoverflow.com/comment/46837264
answers question: http://stackoverflow.com/q/29312833
upvote count: 1
has comment: http://stackoverflow.com/comment/46836751
has comment: http://stackoverflow.com/comment/46837210
has comment: http://stackoverflow.com/comment/46829647
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/46830283
score: 1
has comment: http://stackoverflow.com/comment/46836598

http://stackoverflow.com/comment/94260102
score: 0
type: Comment
has text: This only returns ```{containerInfo: body, pendingChildren: null, implementation: null}``` for me. Also, constructor.name is ```Object```
comment on: http://stackoverflow.com/a/48335220
type: AnswerComment

http://stackoverflow.com/a/44939719
upvote count: 12
answers question: http://stackoverflow.com/q/29322973
downvote count: 0
type: Answer
has body: If you want to use it as a background image, you will need to use the new &lt;ImageBackground&gt; component introduced at the end of June 2017 in v0.46. It supports nesting while &lt;Image&gt; soon won't. Here is the commit summary: We are removing support of nesting views inside component. We decided to do this because having this feature makes supporting intrinsinc content size of the &lt;Image&gt; impossible; so when the transition process is complete, there will be no need to specify image size explicitly, it can be inferred from actual image bitmap. And this is the step #0. is very simple drop-in replacement which implements this functionality via very simple styling. Please, use instead of if you want to put something inside.
score: 12

http://stackoverflow.com/a/29261599
upvote count: 1
has body: All your models should be in api/models. Nowhere else. If you just follow convention, everything will work. If you have "base" models that you extend from, just put them outside of api/ altogether if you don't want tables created for them in the database.
downvote count: 0
has comment: http://stackoverflow.com/comment/46725269
type: Answer
answers question: http://stackoverflow.com/q/29257841
score: 1
has comment: http://stackoverflow.com/comment/46725324

http://stackoverflow.com/a/29354129
type: Answer
upvote count: 2
accepted answer of: http://stackoverflow.com/q/29354064
answers question: http://stackoverflow.com/q/29354064
score: 2
has body: All you need to do is to set scope model value and use ngModel directive on textarea. So it will be: Now when parent ngIf shows textarea you will see it prepopulated with value provided by textModel model. Demo: http://plnkr.co/edit/4D4O6b9BQSDMXEBKFAX3?p=preview
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46893479

http://stackoverflow.com/q/29308860
tagged with: javascript
has answer: http://stackoverflow.com/a/29324275
type: AnsweredQuestion
type: Question
score: 0
accepted answer: http://stackoverflow.com/a/29324275
has title: Google Maps V3 Styling or Markers not showing up depending on what API javascript source I am using
has body: I have a map setup where I can see the markers correctly, but no styling if I use this source: and I can see my styling correctly, but no markers if I use this source: I have looked through both of the source codes and I can't figure out what is causing the issue either way. I thought it was a version issue, or that I needed to create a styledMapType, but since both work just with different sources I'm now completely lost on this. My code is as follows *(with styled but no markers source):
answer count: 1
tagged with: google-maps

http://stackoverflow.com/comment/46666236
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29229338
has text: so can you a bit more explain how you do checking?
score: 0

http://stackoverflow.com/comment/47135506
score: 0
type: AnswerComment
type: Comment
has text: Thanks alot james for ur kind suggestions. Though I have achieved most of the required functionality by using leaflet but kind of stucking somewhere with these kinds of issues like you just resolved. Will ask you again in case I stuck again :) .Thanks again.
comment on: http://stackoverflow.com/a/29382236

http://stackoverflow.com/comment/46817616
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29308190
has text: Doesn't sound silly, I think that's a good consideration. I read through this https://facebook.github.io/react/docs/reusable-components.html#mixins and call me silly but I wasn't able to gather that from the docs, so you might be on to something.
score: 0

http://stackoverflow.com/comment/46881948
score: 0
type: Comment
has text: I like where you are going here, but I'm unclear how to tie the value to the action url. I'd like to send them to a mobile url when they submit the form if the max width is <= 480
type: AnswerComment
comment on: http://stackoverflow.com/a/29347243

http://stackoverflow.com/q/29352438
tagged with: javascript
answer count: 4
has comment: http://stackoverflow.com/comment/46890378
has comment: http://stackoverflow.com/comment/46890235
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29352543
tagged with: reversing
has answer: http://stackoverflow.com/a/29352673
has title: new to javascript, working with arrays
type: Question
has body: Wondering why i needed to add 4 to the array length in order for it to print out the entire array in reverse? before i added 4 it was just using the .length property and it was only printing out 6543. thanks in advance! function reverseArray(array) { var newArray =[]; for(var i = 0; i &lt;= array.length+4; i++) { newArray += array.pop(i); } return newArray; } var numbers = [1,2,3,4,5,6]; console.log(reverseArray(numbers));
accepted answer: http://stackoverflow.com/a/29352543
has answer: http://stackoverflow.com/a/29352635
score: 0
possible better answer: http://stackoverflow.com/a/29352483
has answer: http://stackoverflow.com/a/29352483
tagged with: arrays

http://stackoverflow.com/comment/46762032
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29282102
has text: You can't call those functions without user interaction. Which is the reason the OP posted this question in the first place. The only answer to his question, to initialize fullscreen without user interaction, is a _"no can do"_.
score: 9

http://stackoverflow.com/comment/46865517
comment on: http://stackoverflow.com/a/29331438
type: Comment
has text: thanks for the feedback, please consider upvoting/accepting an answer if it was any help for you, thanks.
score: 0
type: AnswerComment

for-loop
tags question: http://stackoverflow.com/q/29313604
tags question: http://stackoverflow.com/q/29316378
tags question: http://stackoverflow.com/q/29337727
tags question: http://stackoverflow.com/q/29304130
tag name: for-loop
tags question: http://stackoverflow.com/q/29269992
tags question: http://stackoverflow.com/q/29285897
tags question: http://stackoverflow.com/q/29312318
tags question: http://stackoverflow.com/q/29324332
tags question: http://stackoverflow.com/q/29268524
tags question: http://stackoverflow.com/q/29312498
tags question: http://stackoverflow.com/q/29291496
tags question: http://stackoverflow.com/q/29349125
tags question: http://stackoverflow.com/q/29233968
tags question: http://stackoverflow.com/q/29282775
tags question: http://stackoverflow.com/q/29233778
type: Tag
tags question: http://stackoverflow.com/q/29339311
tags question: http://stackoverflow.com/q/29358656
tags question: http://stackoverflow.com/q/29351471
tags question: http://stackoverflow.com/q/29369563
tags question: http://stackoverflow.com/q/29316348
tags question: http://stackoverflow.com/q/29326937
tags question: http://stackoverflow.com/q/29269902
tags question: http://stackoverflow.com/q/29261854

http://stackoverflow.com/a/32635496
score: 0
answers question: http://stackoverflow.com/q/29295149
type: Answer
has body: just change this ligne : _gaq.push(['_trackEvent', 'Download', 'Click-' + extension, filePath]); to ga('send', 'event', 'Download', 'Click', filePath); and its working again for me

http://stackoverflow.com/q/29327396
possible better answer: http://stackoverflow.com/a/29327497
has answer: http://stackoverflow.com/a/29327497
type: AnsweredQuestion
tagged with: conditional-statements
tagged with: if-statement
accepted answer: http://stackoverflow.com/a/29327418
has comment: http://stackoverflow.com/comment/46844766
score: -1
has title: If Else and Javascript what am I missing?
type: Question
answer count: 2
tagged with: javascript
favorite count: 0
has body: I think there is an issue in my if else statement as I think it is giving me the opposite result of what I'm expecting. console.log(_.map(item, function(n){return _.find(n).tertiary})) //is undefined. console.log(_.map(item, function(n){return _.find(n).primary})); //is ["green"] I use the following if statement to assign a value to my variable: if(_.map(item, function(n){return _.find(n).tertiary}) === undefined ){ var audience = _.map(item, function(n){return _.find(n).tertiary}); } else { var audience = _.map(item, function (n) {return _.find(n).primary}); } console.log(audience);//this is undefined Am I doing something wrong or is this working correctly? I expect the answer to be ["green"].
has answer: http://stackoverflow.com/a/29327418
downvote count: 2
upvote count: 1

http://stackoverflow.com/q/29363925
score: 1
has comment: http://stackoverflow.com/comment/47492746
has title: How to catch refresh (F5) and load the action where we are with struts2
tagged with: struts2
downvote count: 0
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/46912913
answer count: 0
type: UnansweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/46976521
type: Question
has body: Pressing the refresh browser I want it to be loaded the action in which they are. I use to load pages jsp struts2 through tiles. this in struts.xml <result-type name="tiles" class="org.apache.struts2.views.tiles.TilesResult" /> tilesPage this in tile.xml <put-attribute name="title" value="....." /> <put-attribute name="content" value="/pages/page.jsp" />

http://stackoverflow.com/comment/46873020
score: 0
has text: true do_header() must be closed, my code is doing all right. but iam looking do make it easier by using eventually the .done function but iam not sure how to modify it correctly
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29343091

http://stackoverflow.com/q/29225594
tagged with: jquery
has answer: http://stackoverflow.com/a/29225628
favorite count: 0
has body: I have a bootstrap datepicker. It is for birthdate. I only want to enable the date from hundred years to a certain year that is 20 years before the current year. Meaning, if the current year is 2015 then I want it to end in the year 1994. My code is here: $("#DOB").datepicker({ format: 'yyyy-mm-dd', startDate: '-1000y', endDate: '1994-12-31', autoclose: true, todayHighlight: true }); This is actually okay but what if the current year is 2020, the endDate is still in the year 1994.
answer count: 3
upvote count: 1
tagged with: datepicker
accepted answer: http://stackoverflow.com/a/29225693
has title: how to set datepicker's end date to 20years from whatever the current date is?
downvote count: 0
tagged with: twitter-bootstrap
has answer: http://stackoverflow.com/a/29225693
has comment: http://stackoverflow.com/comment/46658989
has answer: http://stackoverflow.com/a/29225646
type: AnsweredQuestion
score: 1
tagged with: date
possible better answer: http://stackoverflow.com/a/29225628
type: Question
tagged with: javascript

http://stackoverflow.com/comment/46733574
comment on: http://stackoverflow.com/a/29265695
type: Comment
has text: ah I know, it returns -1 when fails, wait
score: 0
type: AnswerComment

http://stackoverflow.com/q/29309447
possible better answer: http://stackoverflow.com/a/29309873
answer count: 3
tagged with: javascript
tagged with: jquery
tagged with: ajax
score: 0
has answer: http://stackoverflow.com/a/29309637
has title: Parsing and searching a text file
tagged with: parsing
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29309560
accepted answer: http://stackoverflow.com/a/29309560
has answer: http://stackoverflow.com/a/29309873
type: Question
has body: What I have: A list of counties, states, &amp; codes in a file.txt with a "," as the delimiter: 001001,Autauga, AL 001003,Baldwin, AL 001005,Barbour, AL 001007,Bibb, AL 001009,Blount, AL 001011,Bullock, AL 001013,Butler, AL What I want to do: Search for a specific code given I have the county and state. Thoughts: Load in the entire file with ajax and parse it: $.ajax({ url : CountyAndStateURL, type : 'GET', dataType : 'txt', crossDomain : true, success: function(data) { pageExecute.fileContents = data; Thats where I am lost...How can I search through this text file and find the code given I know the county and state?
has comment: http://stackoverflow.com/comment/46812725

http://stackoverflow.com/comment/46797184
type: QuestionComment
comment on: http://stackoverflow.com/q/29301223
score: 0
has text: I think if you move the code of first `$(function (){` function after `wall.fitWidth();` all work
type: Comment

http://stackoverflow.com/q/29358180
has comment: http://stackoverflow.com/comment/46903652
has body: I am looking to take a set of screenshots and make them into a walk through tutorial. The end product I am aiming for is a slide show where on each screen shot the image makes it clear where on the screen shot to advance to the next shot. When the user clicks that area the show will advance. I found this jsfiddle from another post on slide shows: http://jsfiddle.net/rCd26/2/ var interval = undefined; $(document).ready(function () { interval = setInterval(getNext, 2000); // milliseconds $('#next').on('click', getNext); $('#prev').on('click', getPrev); }); function getNext() { var $curr = $('.slideshow img:visible'), $next = ($curr.next().length) ? $curr.next() : $('.slideshow img').first(); transition($curr, $next); } function getPrev() { var $curr = $('.slideshow img:visible'), $next = ($curr.prev().length) ? $curr.prev() : $('.slideshow img').last(); transition($curr, $next); } function transition($curr, $next) { clearInterval(interval); $next.css('z-index', 2).fadeIn('slow', function () { $curr.hide().css('z-index', 0); $next.css('z-index', 1); }); } .slideshow { position: relative; /* necessary to absolutely position the images inside */ width: 500px; /* same as the images inside */ height: 100px; } .slideshow img { position: absolute; display: none; } .slideshow img:first-child { display: block; /* overrides the previous style */ } Prev Next I think there are 3 things I need to do to make it work for me: Be able to position the next button within the image. Be able to change the size of the next button (creating different size hotspots). Be able to change the location of the hotspot by image. Thanks for your input!
type: Question
has comment: http://stackoverflow.com/comment/46900803
tagged with: javascript
has title: JavaScript slide show with a different location for the next button for each slide
score: 0
has answer: http://stackoverflow.com/a/29359920
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: css
has comment: http://stackoverflow.com/comment/46903745
type: UnansweredQuestion

http://stackoverflow.com/comment/46785485
has text: just replaceed .hover() with .mouseover() nothing happened, the page remained static with images showing.
comment on: http://stackoverflow.com/a/29294745
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/29310511
type: Question
tagged with: mongodb
tagged with: javascript
score: 0
answer count: 1
type: UnansweredQuestion
tagged with: stored-procedures
has answer: http://stackoverflow.com/a/30237863
has body: Please I am new to mongoDB and I want to perform a search with js stored in mongoDB. Below is the js code stored in mongoDB. When I perform the following query: db.eval("dc(cough and asthma and cold)"); I get the following error message: { "errmsg" : "exception: SyntaxError: Unexpected identifier", "code" : 16722, "ok" : 0 } Please can someone fix the above error for me ? Thanks in advance. // save script to mongoDB db.system.js.save({ _id : "countAnd" , value : function(userQuery){ return userQuery.toLowerCase().split("and").length; } }); //save dc to mongoDB db.system.js.save({ _id : "dc", value: function(userQuery){ var numOfAnds = countAnd(userQuery); var uQuery = userQuery.toLowerCase().split("and",numOfAnds); var dcResults =""; for(var i=0; i&lt;uQuery.length; i++){ var dcResults =db.records.find({diagnosis:uQuery[i]},{diagnosis:true}); } return dcResults; } });
has title: Unresolved error in Java Script stored in db.system.js.save on MongoDB

http://stackoverflow.com/q/29317388
favorite count: 0
type: UnansweredQuestion
has body: I have a string that looks like this: var string = "something/123/bah/234/id/835/param/2343"; I want to just target the "835" that I need from "id". Any quick ways to strip that out?
answer count: 4
has answer: http://stackoverflow.com/a/29317403
score: 1
type: Question
has title: Parse certain string in javascript
tagged with: javascript
has answer: http://stackoverflow.com/a/29317459
upvote count: 2
has answer: http://stackoverflow.com/a/29317463
has answer: http://stackoverflow.com/a/29317462
downvote count: 1

http://stackoverflow.com/a/53179716
answers question: http://stackoverflow.com/q/29261304
score: 2
downvote count: 0
upvote count: 2
has body: Adding notes after many researchs (and fails!). For a css translated svg, to get the coordinates of a clicked point for drawing. In my case, using a mouse wheel event to translateX, so the actual rendering depends of the screen size and of the actual translated value. I recommend for your use case to make a little drawing like the following, it will help a lot for figuring out what's going on. Let's say my svg has for id: shoke To get the total computed width, in pixels: shoke.getBoundingClientRect()["width"] Need to know the actual translateX value. (From the right, so it is a negative number, on this case) shoke.style.transform.substr(11).slice(0,-3) Note that it return a string and not an integer, so: +shoke.style.transform.substr(11).slice(0,-3) Now to get the coordinates of the mouse, related to the pixel x0 of the screen. let pt = document.querySelector('svg').createSVGPoint(); pt.matrixTransform(shoke.getScreenCTM().inverse())["x"] So, at the end, to obtain the precise x point: svg_width - (svg_width + translated) + from_pixel x0 of the screen_click Is something like this: shoke.getBoundingClientRect()["width"] - (shoke.getBoundingClientRect()["width"] + +shoke.style.transform.substr(11).slice(0,-3)) + pt.matrixTransform(shoke.getScreenCTM().inverse())["x"]
type: Answer

http://stackoverflow.com/comment/46917631
has text: it is because u have not element with id homePageSection - show your html, or better - create fiddle with example, and i solve it trouble right in fiddle @thomas
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29367662

http://stackoverflow.com/q/29277252
has title: nodejs console.log of object
possible better answer: http://stackoverflow.com/a/29277306
upvote count: 1
tagged with: console.log
has answer: http://stackoverflow.com/a/29277306
tagged with: node.js
type: AnsweredQuestion
score: 1
has body: I'm printing the error object in nodejs. The output of console.log(err) looks like: { [error: column "pkvalue" does not exist] name: 'error', length: 96, severity: 'ERROR'} What is the information printed in square brackets and how to access it ?
has answer: http://stackoverflow.com/a/29277368
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29277368
favorite count: 0

http://stackoverflow.com/q/29247780
tagged with: highcharts
tagged with: javascript
has title: Responsive behaviour for ng-highcharts with compiled ng-click on xAxis labels hidden on load
answer count: 1
tagged with: angularjs
score: 0
has answer: http://stackoverflow.com/a/29269273
type: AnsweredQuestion
has body: I have some ng-highcharts within tabs and collapsed section on a page one is also displayed as per a dropdown selection. All the charts are required to fit to the size of their container (containers are different sizes). The xAxis labels on one of the charts has a ng-click added to it which works with a timeout and compile on load but when the chart is redrawn on resize these are lost. Require full width charts as well as responsive behaviour for all charts hidden on load as well as maintaining the ng-click after resize. jQuery is NOT being used for this project so looking for an angular / native javascript solution. Working fiddle below with examples of current issues. http://jsfiddle.net/7efavzh2/2/ The following will update the width of the charts but breaks all the compiled ng-click on labels. $scope.collapseClick = function() { console.log('collapse click'); //$scope.projectionChartConfig.options.chart.width = null; }
type: Question
accepted answer: http://stackoverflow.com/a/29269273

http://stackoverflow.com/q/29261304
type: Question
upvote count: 57
has answer: http://stackoverflow.com/a/42711775
has answer: http://stackoverflow.com/a/29296049
tagged with: javascript
has body: I haven't been able to calculate the click coordinates (x and y) relative to the element triggering the event. I have not found an easy example online. I have a simple svg (with 100px left margin) in an HTML page. It contains a group (translated 30px 30px) which has an onclick listener attached. And inside that group I have a rect with 50px width and height. After I click any part of the group element, I get an event object with coordinates relative to the HTML page (evt.clientX and evt.clientY). What I need to know is where exactly the user clicked inside the group element (the element holding the onclick listener). How do I convert clientX and clientY coordinates to the group element coordinates. So say, if I click the top leftmost part of the rect it should give me x=0 and y=0. Here is currently what I have: <g transform="translate(30 30)" onclick="clicked(evt)"> <rect x="0" y="0" width="50" height="50" fill="red"/> </g>
has answer: http://stackoverflow.com/a/74087257
favorite count: 0
has answer: http://stackoverflow.com/a/69312786
score: 57
tagged with: http://stackoverflow.com/tag/svg
answer count: 5
has title: How to get the click coordinates relative to SVG element holding the onclick listener?
possible better answer: http://stackoverflow.com/a/42711775
has answer: http://stackoverflow.com/a/53179716
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/12752519
downvote count: 0
accepted answer: http://stackoverflow.com/a/29296049

http://stackoverflow.com/q/29218478
type: Question
upvote count: 0
score: -2
tagged with: javascript
has answer: http://stackoverflow.com/a/29218532
answer count: 1
favorite count: 0
has title: why so many languages that compile to JS
downvote count: 2
accepted answer: http://stackoverflow.com/a/29218532
has comment: http://stackoverflow.com/comment/46645878
has body: There is a huge list of languages that compile to JS https://github.com/jashkenas/coffeescript/wiki/List-of-languages-that-compile-to-JS the question is: why? for what purpose? just to avoid programming in pure JavaScript
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46647774

http://stackoverflow.com/a/29259740
has body: If you're just trying to make the form submit itself, get a reference to the form and use the .submit() method. http://www.w3schools.com/jsref/met_form_submit.asp If your question involves someone trying to do something evil, they would write an .onsubmit method for the form that uses ajax to send data elsewhere. http://www.w3schools.com/tags/ev_onsubmit.asp Also it looks like you might have an error here &lt;scripttype
answers question: http://stackoverflow.com/q/29258157
type: Answer
score: 0

http://stackoverflow.com/a/29345673
type: Answer
has body: Render your view again with the flash as your message object. app.post('/fb', function(req, res) { res.render('feedback', { message: req.flash('hello world') }); });
score: 0
answers question: http://stackoverflow.com/q/29345234

http://stackoverflow.com/comment/46651817
score: 0
type: AnswerComment
has text: @Drops `find` is probably fine here - the docs mean `$('#item1 :selected')` vs `$('#item1').filter(':selected')`
type: Comment
comment on: http://stackoverflow.com/a/29221408

http://stackoverflow.com/comment/46835276
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29304807
has text: @RickSmith No, we don't know in advance its a radio button group

http://stackoverflow.com/a/29373404
type: Answer
has comment: http://stackoverflow.com/comment/123845415
has comment: http://stackoverflow.com/comment/123845120
accepted answer of: http://stackoverflow.com/q/29366109
upvote count: 36
answers question: http://stackoverflow.com/q/29366109
score: 36
has body: There is now an easier pattern that works with both orthographic and perspective camera types: var raycaster = new THREE.Raycaster(); // create once var mouse = new THREE.Vector2(); // create once ... mouse.x = ( event.clientX / renderer.domElement.clientWidth ) * 2 - 1; mouse.y = - ( event.clientY / renderer.domElement.clientHeight ) * 2 + 1; raycaster.setFromCamera( mouse, camera ); var intersects = raycaster.intersectObjects( objects, recursiveFlag ); three.js r.84
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/29249671
type: Answer
has comment: http://stackoverflow.com/comment/46704030
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/46703877
has comment: http://stackoverflow.com/comment/46703919
has body: The syntax of your ajax call is not correct. Have a look here and then try this code (note the addition of {, } and ,): MyVaribale = "Random Data"; $(document).ready(function() { $.ajax({ url: '/some/random/url', data : { myVariable : MyVaribale } }); });
downvote count: 0
answers question: http://stackoverflow.com/q/29249581

http://stackoverflow.com/q/29333125
score: 1
has comment: http://stackoverflow.com/comment/46855301
has comment: http://stackoverflow.com/comment/46855285
answer count: 3
tagged with: validation
has comment: http://stackoverflow.com/comment/46855255
downvote count: 0
possible better answer: http://stackoverflow.com/a/29333228
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/29333750
has title: I want to know how to do form validation in javascript
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29333186
accepted answer: http://stackoverflow.com/a/29333186
has answer: http://stackoverflow.com/a/29333228
has body: I am trying to learn form validation and its not working. // birthyear must be between 1900 and 2012. turn the birth year textbox color to yellow window.onload = function() { document.forms[0].onsubmit = function() { for(i = 0; i &lt; document.forms[0].elements.length; i++){ var x = document.forms[birthyear].value if (x != (&gt;1900 &amp;&amp;&lt;=2012)){ alert("Must be between 1900 and 2012"); x.this.style.color ="yellow"; return false; //this is how I have created the form: &lt;form action = "fake.php"&gt;&lt;/br&gt; Username &lt;input class ="required"type = "text" name = "username" id ="username" /&gt;&lt;br&gt; Username &lt;input class = "required"type = "text" name ="username"id ="username"/&gt; &lt;br&gt; Birthyear &lt;input class = "required" type = "number" name = "birthyear" id= "birthyear"/&gt; &lt;input type = "submit"/&gt; &lt;/form&gt;
upvote count: 1
type: Question

http://stackoverflow.com/a/29352009
has comment: http://stackoverflow.com/comment/46919904
downvote count: 0
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/29351601
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29351601
type: Answer
has body: To get values from a range, you use var values = range.getValues(); This will return a result in an 2D array of values, which is like a grid representing the range, i.e. values[row][column]. So, if our range is, say, "A1:C3", and we want the values in A1 and C3, we could do this: var range = sheet.getRange("A1:C3"); var values = range.getValues(); var valueOne = values[0][0]; var valueTwo = values[2][2]; var msg = '"Form name" + valueOne + ValueTwo' I don't know how to get the form name though, perhaps something as simple as e.source.title? If not, if you are using multiple forms, you may have to do this by getting the form Id from the form being submitted, and then using a switch statement to match that ID to a list of form names within your script.

http://stackoverflow.com/q/29324895
type: Question
has comment: http://stackoverflow.com/comment/46840825
score: 0
has comment: http://stackoverflow.com/comment/46840900
tagged with: popupwindow
has comment: http://stackoverflow.com/comment/46840711
has comment: http://stackoverflow.com/comment/46840916
has comment: http://stackoverflow.com/comment/46840832
tagged with: auto-close
has comment: http://stackoverflow.com/comment/46841017
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46840974
has comment: http://stackoverflow.com/comment/46840958
has title: How do I make this window close automaticly after a button is clicked in javascript?
tagged with: javascript
has body: I have this button made in javascript and when it is clicked it opens up a small twitter popup window that allows the user to follow me. Now what I want is for this popup window to close once the person clicks "Follow". I have attached a picture of the popup window so you can get more of an idea. Here is the script for that window that i'm trying to modify. &lt;script type="text/javascript" charset="utf-8"&gt; window.onload=function(){ twttr.events.bind('follow', function(event) { var followed_user_id = event.data.user_id; var followed_screen_name = event.data.screen_name; //alert('you have followed " '+followed_screen_name+'"');// Uncomment it for the javascript popup to activate document.getElementById('download').style.display = 'block'; }); twttr.events.bind('unfollow', function(event) { //alert('Unfollowed now'); // Uncomment it for the javascript popup to activate document.getElementById('download').style.display = 'none'; }); } &lt;/script&gt; I don't know how or where to insert the code that makes it close once the follow button is clicked. If you are familiar with this situation I would greatly appreciate any information whatsoever. Thanks in advance :)

http://stackoverflow.com/comment/46693454
type: AnswerComment
comment on: http://stackoverflow.com/a/29243698
score: 0
type: Comment
has text: The edit will target a ` ` element with classes of "btn", "btn-primary" and "options".

http://stackoverflow.com/a/29335716
type: Answer
answers question: http://stackoverflow.com/q/29332390
score: 2
upvote count: 2
accepted answer of: http://stackoverflow.com/q/29332390
has body: Indeed, I'm not sure what it accomplished for me as I had to download and reference the definition file manually. Am I misunderstanding something The stubs that webstorm downloads are only for JS. For TS you need to download and reference manually : intellisense and code complete for DefinitelyTyped (TypeScript type definitions) on WebStorm IDE
has comment: http://stackoverflow.com/comment/57401916
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/29268624
answer count: 2
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29275522
linked to: http://stackoverflow.com/q/20161652
score: 0
possible better answer: http://stackoverflow.com/a/36157664
has answer: http://stackoverflow.com/a/36157664
tagged with: http://stackoverflow.com/tag/html
has title: Intel xdk function (cookie) works fine in emulator, but doesnt work in device even i have put tag in index.html
tagged with: android
tagged with: intel-xdk
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29275522
tagged with: cookies
has body: I am trying to test cookie in device, so i build a simple application. I have tested it on emulator and works fine. but when i test it in apps testing server, and in device, All the Intel xdk function doesnt work (I just want test cookie), I have put script in index.html. But it doesnt work also, i have searched here, intel-xdk html5 platform android aplication working properly in emulator but not working properly in device , so i include the but it doesnt work also My code is: (Sorry, im just new here and cant post image if post under 10. Here the image) http://helpmedong.esy.es/ The alert is still : Intel is not defined.. thx before..
type: Question

http://stackoverflow.com/q/29278142
upvote count: 2
accepted answer: http://stackoverflow.com/a/29280042
type: AnsweredQuestion
has title: How to find the last element of ng-repeater when testing with Protractor
has body: I need to find and click the last element (byID) of ng-repeater.
type: Question
tagged with: testing
tagged with: protractor
tagged with: javascript
score: 2
downvote count: 0
answer count: 1
tagged with: angularjs-ng-repeat
has answer: http://stackoverflow.com/a/29280042
favorite count: 0
tagged with: angularjs

http://stackoverflow.com/comment/46840868
comment on: http://stackoverflow.com/q/29325003
score: 0
type: Comment
type: QuestionComment
has text: *"my array stays put"* What does that mean?

http://stackoverflow.com/comment/46711750
score: 0
type: AnswerComment
type: Comment
has text: you solution works fine in chrome but if you open any IE it will not call the onload method for some reason
comment on: http://stackoverflow.com/a/29254144

http://stackoverflow.com/comment/46891601
type: QuestionComment
has text: those may vary in order
comment on: http://stackoverflow.com/q/29352546
score: 0
type: Comment

http://stackoverflow.com/q/29370922
has body: I have an Angular 1.3 app using UI router. I have a view for the pages and a directive for the header and another for the footer. &lt;body ng-controller="AppCtrl as app"&gt; &lt;!-- header --&gt; &lt;div header&gt;&lt;/div&gt; &lt;!-- content --&gt; &lt;div ui-view=""&gt;&lt;/div&gt; &lt;!-- FOOTER --&gt; &lt;div footer&gt;&lt;/div&gt; There are some states in my app where I do not want to display the header and/or footer. How is that done?
has answer: http://stackoverflow.com/a/29371042
answer count: 4
tagged with: angularjs
upvote count: 3
type: UnansweredQuestion
tagged with: angularjs-directive
score: 3
tagged with: angular-ui-router
has answer: http://stackoverflow.com/a/29371048
has title: Angular JS/UI-Router: disable directives for a given state?
has comment: http://stackoverflow.com/comment/46922820
has answer: http://stackoverflow.com/a/29372778
has answer: http://stackoverflow.com/a/29371844
type: Question
downvote count: 0
tagged with: javascript
favorite count: 0

http://stackoverflow.com/a/29378500
upvote count: 1
has body: Notice using phantomjs with protractor is disregarded. Taken from http://angular.github.io/protractor/#/browser-setup Add phantomjs to the driver capabilities, and include a path to the binary if using local installation: capabilities: { 'browserName': 'phantomjs', /* * Can be used to specify the phantomjs binary path. * This can generally be ommitted if you installed phantomjs globally. */ 'phantomjs.binary.path': require('phantomjs').path, /* * Command line args to pass to ghostdriver, phantomjs's browser driver. * See https://github.com/detro/ghostdriver#faq */ 'phantomjs.ghostdriver.cli.args': ['--loglevel=DEBUG'] }
type: Answer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/29364533

http://stackoverflow.com/comment/46702342
has text: I suspect this is because sub-schemas are somehow not validated, I think I read that somewhere, can anyone confirm?
score: 0
type: Comment
comment on: http://stackoverflow.com/q/29247414
type: QuestionComment

http://stackoverflow.com/q/29343695
favorite count: 0
type: UnansweredQuestion
has body: I'm using google charts (in GWT with gwt-charts library) and I'm trying to change the line width of a candlestick chart to 1 but it is not working I'm using ComboChart with series of type Candlestick and I've tried setting lineWidth to 1 for "options" and "series" object, with no luck. Is it possible that lineWidth has no effect on candlestick types ? Code: ComboChart chart = new ComboChart(); ComboChartOptions options = ComboChartOptions.create(); Legend legend = Legend.create(); legend.setPosition(LegendPosition.NONE); options.setLegend(legend); ComboChartSeries series = ComboChartSeries.create(); series.setType(SeriesType.CANDLESTICK); series.setLineWidth(1); options.setSeries(series); options.setLineWidth(1); // draw on data update ... chart.draw(dataTable, options);
has comment: http://stackoverflow.com/comment/46918932
tagged with: gwt
has comment: http://stackoverflow.com/comment/46911274
score: 1
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/46919373
tagged with: google-visualization
has answer: http://stackoverflow.com/a/39480249
tagged with: javascript
has title: Google Candlestick Chart setting line width not working
answer count: 1
downvote count: 0

http://stackoverflow.com/comment/46770800
type: QuestionComment
has text: http://jsfiddle.net/4yphp993/1/ as you can see, when you open the editor, it will only show in the full-screen page conformation.
comment on: http://stackoverflow.com/q/29286328
score: 0
type: Comment

http://stackoverflow.com/a/29349012
answers question: http://stackoverflow.com/q/29348717
has body: First, the other answer are correct as to the "weird" behavior in the first case. The reason you're getting the ReferenceError in the second case without the spaces is because two of those +s are being treated as the ++ increment command. 1+-+(+(+-1)) won't give you an error
score: 0
type: Answer

http://stackoverflow.com/comment/46771435
has text: Well according to your question, the href should be `#something` and `@person`. Otherwise you can do it using a three stage replacement. Will update.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29287045
type: AnswerComment

http://stackoverflow.com/q/29323863
has title: Why is my jQuery click function not firing?
answer count: 1
tagged with: jquery
accepted answer: http://stackoverflow.com/a/29323879
has body: I am building a search page that posts back to itself. I finally got a sample page working here. I also built a fiddle here. But I don't understand why it works. When the user initially hits the page, it should only show the search form. When a search is submitted, it should hide the form, show results, and a button for a new search. I'm using jQuery. Here's my code: //Code Block 1 // Show search form if there is no querystring //Hide search form, show results if querystring $(document).ready(function() { if(document.location.search.length) { $("#newsearch").show(1000); $("#results").show(1000); $("#search").hide(300); } else { $("#search").show(); } }); //code block 2 //if new search clicked, show form, hide results $("#newsearch").click(function() { $("#newsearch").hide(1000); $("#results").hide(1000); $("#search").show(300); }); When code block 1 and 2 are loaded in the head, block 2 never fires. When I pull 2 out and put it at the end of the page, it works. I am trying to learn, so I have 2 questions. (1) Why didn't it work when it was one block, and (2) Any suggestions for doing it better? Thank you. D
has answer: http://stackoverflow.com/a/29323879
type: AnsweredQuestion
type: Question
tagged with: javascript
score: 0

http://stackoverflow.com/q/29242482
has answer: http://stackoverflow.com/a/29242853
score: 1
has body: I'm trying to apply a class to only one element at a time (see this plunk). HTML: L R J JS: var app = angular.module("testApp", []); app.controller("MainController", function($scope) { $scope.listItems = [{description: 'item1', number: 1}]; }); Right now, when I click an element in this list, the class toggle is applied to all elements. I want to be able to click and unclick each letter to toggle the class change individually. How can I do this?
tagged with: ng-class
type: Question
tagged with: javascript
possible better answer: http://stackoverflow.com/a/29242536
answer count: 3
upvote count: 1
downvote count: 0
has answer: http://stackoverflow.com/a/29243314
favorite count: 0
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/29242853
has answer: http://stackoverflow.com/a/29242536
has title: AngularJS -- Toggle class for only one element (ng-class and ng-click)
type: AnsweredQuestion
tagged with: angularjs-ng-click

http://stackoverflow.com/a/29259086
type: Answer
has body: You can create a method. $scope.showScore = function(score) { if (angular.isDefined(score)) { return score; } else { return 0; } } And then in html EDIT: Missed the () around avg.avg.
score: 1
downvote count: 0
answers question: http://stackoverflow.com/q/29258888
has comment: http://stackoverflow.com/comment/46720778
upvote count: 1

http://stackoverflow.com/a/29274082
accepted answer of: http://stackoverflow.com/q/29273324
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29273324
type: Answer
has body: The "minimal" theme hides the bottom axis grid. If you want to make it visible again you can call this later: Chart1.axes.bottom.grid.visible=true; The "minimal" theme also hides the series marks. If you want to make them visible again you can call this later: Series0.marks.visible=true; Series1.marks.visible=true;
score: 0

http://stackoverflow.com/comment/84468107
type: Comment
type: QuestionComment
has text: @elsurudo no, I no longer work on the project where I needed this.
comment on: http://stackoverflow.com/q/29314511
score: 0

http://stackoverflow.com/q/29360290
has comment: http://stackoverflow.com/comment/46904538
has comment: http://stackoverflow.com/comment/46904542
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29360330
favorite count: 0
has comment: http://stackoverflow.com/comment/46904629
type: Question
answer count: 2
downvote count: 2
tagged with: typeof
score: 5
has answer: http://stackoverflow.com/a/29360330
has comment: http://stackoverflow.com/comment/46904650
has comment: http://stackoverflow.com/comment/46904625
tagged with: javascript
has body: I found this weird problem, when I write Javascript code like below: var name = 1; alert(typeof name); // this will alert "string" var b = 1; alert(typeof b); // this will alert "number" I got "string" for "typeof name", but got "number" for "typeof b", however, I think they both should be "number" And this code won't run either: var name = 1; if (name === 1) { alert("ok") } It won't alert out, since name's type is "string" ! I tested above code in Chrome and Safari, they both give the same result, so why "typeof name" is "string" in this case? why the variable name "name" is so special?
has answer: http://stackoverflow.com/a/29360342
has title: Javascript, var name = 1, "typeof name" gives "string"?
linked to: http://stackoverflow.com/q/20945498
upvote count: 7
possible better answer: http://stackoverflow.com/a/29360342
duplicate of: http://stackoverflow.com/q/20945498
has comment: http://stackoverflow.com/comment/46904612
tagged with: var

http://stackoverflow.com/a/29290877
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/29289390
has body: You need to use the $promise of your $resource, like this: $scope.locations = data.locations.getAll(); $scope.locations.$promise.then(function (result) { $scope.selectedOption = result[1]; }); You can also add an error handling function after .then(). Here's a great exemplification of how promises in AngularJS work.
answers question: http://stackoverflow.com/q/29289390
score: 1
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/comment/46777738
has text: @Abdelouahab the real overhead is in rematching inside the loop ;) You should match outside the loop (be it native or jquery) and iterate the returned set. As it is now you're rematching each iteration.
comment on: http://stackoverflow.com/a/29290215
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/29252259
tagged with: javascript
score: 0
has body: In one of my jqGrid Add/Edit Modal I want to arrange the fields in that way like on the picture below: Thanks to Oleg that I have already know from his post, how to arrange the fields in multiple column. But I want to do rowspan in the Add/Edit modal like on the picture below
answer count: 1
tagged with: jquery
favorite count: 0
linked to: http://stackoverflow.com/q/25916710
linked to: http://stackoverflow.com/q/10850978
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29253432
has title: jqGrid - Row Span in Add/Edit Modal
upvote count: 1
accepted answer: http://stackoverflow.com/a/29253432
downvote count: 1
type: Question
tagged with: jqgrid

http://stackoverflow.com/a/74288120
score: 0
type: Answer
has body: You are hiding the select element before calling chosen. First call $("select").chosen(); then hide element with $("select").css("display","none"); Later when you show/hide your element, the width won't become 0.
answers question: http://stackoverflow.com/q/29219991

http://stackoverflow.com/q/29230219
score: 0
has title: Triggering click on button when select option changes doesn't work properly
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/46666972
type: UnansweredQuestion
has body: I have the following code to trigger a click on a button whenever the state changes: $('#selectstate').on('change', function(){ $("[name='update']:submit").trigger("click"); }); It works fine, but the problem is that I have to click exactly on the arrow of the list, as appears below. If I clicked on the white space in order to show the list, the button will be triggered automatically. Any solution to this? Sample HTML Code: Alabama Kansas Kentucky
has comment: http://stackoverflow.com/comment/46667168
type: Question
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29231600

http://stackoverflow.com/comment/46678866
comment on: http://stackoverflow.com/q/29236228
score: 0
has text: You are concatenating strings. For example, `["5","0.47","0.47"].reduce((a,b)=>a+b, 0)` returns `"050.470.47"`. Are you sure you get `5`?
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/54173448
type: AnswerComment
comment on: http://stackoverflow.com/a/29357465
type: Comment
has text: Or `t.throws(myFunction.bind(null, {}), 'should throw an exception')`
score: 1

http://stackoverflow.com/a/29295650
accepted answer of: http://stackoverflow.com/q/29295061
answers question: http://stackoverflow.com/q/29295061
upvote count: 1
type: AcceptedAnswer
type: Answer
has body: You can use Sessions. In your list item template: Template.yourItem.events({ 'click .something': function() { Session.set('selectedItem', this._id); } }); In your form template create a helper to retrieve the list item data: Template.yourForm.helpers({ selectedItemData: function() { return ItemsCollection.findOne({_id: Session.get('selectedItem')}); } }); Then just use your helper to populate your form using with for example: {{#with selectedItemData}} &lt;form&gt; ... &lt;input type="text" value="{{yourfield}}"&gt; ... &lt;/form&gt; {{/with}}
downvote count: 0
has comment: http://stackoverflow.com/comment/48697278
has comment: http://stackoverflow.com/comment/48708744
score: 1

http://stackoverflow.com/a/29333528
answers question: http://stackoverflow.com/q/29333366
downvote count: 0
has comment: http://stackoverflow.com/comment/46858657
type: Answer
has comment: http://stackoverflow.com/comment/46856138
has comment: http://stackoverflow.com/comment/46857860
score: 1
has comment: http://stackoverflow.com/comment/46858844
has comment: http://stackoverflow.com/comment/46857700
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46858382
upvote count: 1
accepted answer of: http://stackoverflow.com/q/29333366
has body: Are you looking for this? var images = document.querySelectorAll( "#gallery img" ); for( i =0; i&lt; images.length; i++ ) { images[i].style.border = "0px"; } var active_image = event.target;

http://stackoverflow.com/comment/46935979
type: Comment
comment on: http://stackoverflow.com/a/29372980
has text: no it doesn't work. If I change it to onclick within the , it would work, but got other problems which I posted another post.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/46892234
has text: You could try using `html2canvas` to render the page, then [`getImageData()`](http://www.w3schools.com/tags/canvas_getimagedata.asp) to get the image data then store that to the PDF using [`addImage`](http://mrrio.github.io/jsPDF/).
comment on: http://stackoverflow.com/q/29353303
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/53320869
type: QuestionComment
has text: how does your code looks like - how do you initialise angular-datatables?
comment on: http://stackoverflow.com/q/29262038
score: 0
type: Comment

http://stackoverflow.com/a/29368653
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/46947614
answers question: http://stackoverflow.com/q/29365231
has body: you have to define css of the image so that it repeats itself on the x-axis. &lt;style&gt; #imageScroll{ height: 400px; width: 500px; background-image: url('./background.jpg'); background-repeat: repeat-x; } &lt;/style&gt; then, at the bottom of the page, or in body onload, you should execute the following instructions. intervalFunc = setInterval(shiftImage, 250); function shiftImage(){ var currentBackgroundX = $('#imageScroll').css('background-position-x'); split = currentBackgroundX.split("%"); currentBackgroundX = split[0]; currentBackgroundX = parseInt(currentBackgroundX); $('#imageScroll').css({"background-position-x": (currentBackgroundX + 25) + '%'}); } I didn't give too much though about the positioning part actually, since that is a completely different subject. But what i'm trying to do here is, change the background-position-x by 25% every 250 miliseconds. You can change the inner workings of the shiftImage function. If you want to stop the animation at any point, just run clearInterval(intervalFunc); Hope this helps Edit: jsFiddle Edit 2: edited fiddle link Edit 3: edited fiddle link
has comment: http://stackoverflow.com/comment/46925553
has comment: http://stackoverflow.com/comment/46947995

http://stackoverflow.com/a/51486259
downvote count: 2
has body: You can prevent the mousedown event to prevent the selection of the text inside the input. &lt;input type="text" id="unselectable" value="You can not select this text!"/&gt; &lt;script&gt; document.getElementById("unselectable").addEventListener("mousedown", function(event){ event.preventDefault(); }); &lt;/script&gt;
score: 4
answers question: http://stackoverflow.com/q/29221991
type: Answer
upvote count: 6
has comment: http://stackoverflow.com/comment/92471670

http://stackoverflow.com/a/29251947
type: AcceptedAnswer
score: 0
type: Answer
has body: It indicates you scale the slider to width of maximum 600px. Please replace jssor_slider1.$ScaleWidth(Math.min(parentWidth,600)); with jssor_slider1.$ScaleWidth(parentWidth); Btw, you'd set original size of your slider container to 1365x450. &lt;div id="slider1_container" style="position:relative; width: 1365px; height: 450px;"&gt;
accepted answer of: http://stackoverflow.com/q/29250742
answers question: http://stackoverflow.com/q/29250742

http://stackoverflow.com/comment/46860852
has text: Please provide a [Minimal, Complete, Tested and Readable example](http://stackoverflow.com/help/mcve) that demonstrates the issue.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29333002
score: 0

http://stackoverflow.com/comment/46702553
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29248959
has text: You can keep a hidden field in your next page, I mean once the form is submitted and after success it will redirect to some page right? so in that page keep a hidden field and set it's value on page load. You can set it's value with a session value. Like once the form is posted and its success, set a session variable and in next page check if that session has value and if it has value set a success value to your hidden field and then write a document.ready function to check your hidden field value and show the success message div if the value exists in that hidden field.

http://stackoverflow.com/comment/46810373
type: QuestionComment
comment on: http://stackoverflow.com/q/29308147
type: Comment
score: 0
has text: Read the docs: http://api.jquery.com/animate/

http://stackoverflow.com/comment/46893472
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29354091
type: AnswerComment
has text: You needed two variables. One that you use to build up the html string and one to hold each member of the results array.

http://stackoverflow.com/a/29260572
has comment: http://stackoverflow.com/comment/46723294
upvote count: 3
has comment: http://stackoverflow.com/comment/46723533
answers question: http://stackoverflow.com/q/29260470
accepted answer of: http://stackoverflow.com/q/29260470
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46723336
has body: Add the ng-disabled directive on your input : &lt;input class="add-input" placeholder="Add a new task..." type="text" ng-model="formTodoText" ng-model-instant ng-disabled="todos.length &gt;= 50"/&gt; The expression in ng-disabled is a boolean and will disable the input when true, enable it when false.
score: 3
type: Answer

http://stackoverflow.com/comment/46696407
score: 0
type: Comment
type: QuestionComment
has text: Can you see the code when you view source of your rendered html page?
comment on: http://stackoverflow.com/q/29245335

http://stackoverflow.com/a/29354676
has comment: http://stackoverflow.com/comment/46894675
has comment: http://stackoverflow.com/comment/46895871
has comment: http://stackoverflow.com/comment/46895434
downvote count: 0
answers question: http://stackoverflow.com/q/29354514
has comment: http://stackoverflow.com/comment/46894602
type: Answer
has comment: http://stackoverflow.com/comment/46894435
has comment: http://stackoverflow.com/comment/46895557
has body: The main problem is that you're setting the variables setRows and setColumns in a different function from the one that uses them. You should do everything in one function -- either bind it with the onclick attribute or with $("button").click() -- rather than splitting it into separate functions. I also think it would be clearer to use nested loops to make it more obvious that you're adding cells to each row. appendTo() will automatically clone the object being appended if there are multiple targets, but this is an obscure feature (I'm very experienced with jQuery and didn't know about it until now) that isn't so obvious. It will also make the code easier to extend if you need to put different values in each cell (e.g. filling them from an array of data, or initializing with something like "row I col J"). function myForm() { var setRows = $("#setRows").val(); var setColumns = $("#setColumns").val(); var table = $(" ").insertAfter("p:last"); for (var i = 0; i < setRows; i++) { var row = $(" "); for (var j = 0; j < setColumns; j++) { $(" column ").appendTo(row); } table.append(row); } } Set Rows: Set Columns: Create Table
score: 1
has comment: http://stackoverflow.com/comment/46894560
upvote count: 1
has comment: http://stackoverflow.com/comment/46895611

http://stackoverflow.com/q/29246137
has body: I'm experiencing some weird behavior with a route parameter in Ember. It works depending on what the name of the route parameter is. I have a router that looks like this Router.map(function() { this.resource('movies', { path: '/movies/:release_date' }); }); and a route that looks like this export default Ember.Route.extend({ model: function(params) { console.log('HI ' + Ember.keys(params) + ', ' + params.release_date); return this.store.findAll('movie', params.release_date); } }); When I visit the route /movies/foo I see this in the console HI release_date, undefined However, if I change the param to almost anything other than release_date, it works as expected (i.e., change it in both the definition in the router and in the route object itself). Examples: HI rel_date, foo HI release_d, foo Why does this happen? Is there any way to make it work with release_date as the parameter?
tagged with: ember.js
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/46698611
has answer: http://stackoverflow.com/a/29246716
tagged with: javascript
type: AnsweredQuestion
tagged with: ember-cli
accepted answer: http://stackoverflow.com/a/29246716
has title: Ember returning undefined for url parameter depending on the name of the parameter
type: Question

http://stackoverflow.com/a/29254135
score: 0
type: Answer
has body: Try like this $('table &gt; tbody &gt; tr').click(function(){ $('table &gt; tbody &gt; tr').removeClass('trselected'); $(this).addClass('trselected'); });
answers question: http://stackoverflow.com/q/29253702

http://stackoverflow.com/a/29262994
answers question: http://stackoverflow.com/q/29262843
has comment: http://stackoverflow.com/comment/46728640
score: 1
has comment: http://stackoverflow.com/comment/46728498
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/46759839
upvote count: 1
has body: So you seem to be wondering why when pushing to the array, your $watch function doesn't do the increment. That's because the #watch function only checks object reference equality. When pushing to the array, the reference stays the same. When you copy the array and set it again in the same variable, the reference changes. That's why @watchCollection works as expected and increments when each item is pushed.

http://stackoverflow.com/q/29299194
tagged with: javascript
tagged with: sorting
has comment: http://stackoverflow.com/comment/46798146
has comment: http://stackoverflow.com/comment/46800885
tagged with: php
has comment: http://stackoverflow.com/comment/46800764
has comment: http://stackoverflow.com/comment/46799705
tagged with: datatable
has comment: http://stackoverflow.com/comment/46801439
answer count: 0
has comment: http://stackoverflow.com/comment/46799437
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46818382
has body: I was trying so hard to solve this problem, but it really make my mind explode. Everything displays nicely including the paging,listing and the date are sorted by asc (Default) After I added in Java script(make it sort by desc) This is javascript: Data listing sorted, everything is still cool, but the paging buttons are missing, left "Showing X to X of X entries" Please Help! Here is my script added this at the bottom of the script import datatable js Table script: '.__("Date").' '.__("Description").' '.__("Credit").' '.__("Debit").' '.__("Balance").' '.$his_row.' //////////////////////////// for($i=0;$i<$this_page_total;$i++){ $p=mysql_fetch_assoc($r); $his_row.=' '.$p["cdate"].' '.$p["descr"].' '.number_format(in_array($p['type'],array('c','credit'))? $p['amount'] : 0, 2).' '.number_format(!in_array($p['type'],array('c','credit'))? $p['amount'] : 0, 2).' '.nl2br($p["bal"]).' '; $k=1-$k; } Here are the link for my datatables (Sorry for I cant post any image here due to low reputation) This is the datatable that sort by default(ASC) https://www.dropbox.com/s/fj8lqj766o4vgeb/Screenshot%202015-03-27%2018.33.52.png?dl=0 This is the datatable that after insert javascript sort by desc https://www.dropbox.com/s/pphc70cp7ntyty8/Screenshot%202015-03-27%2018.34.34.png?dl=0
has comment: http://stackoverflow.com/comment/46801674
has title: Datatable sorting PHP, paging button missing
type: Question
has comment: http://stackoverflow.com/comment/46800422
score: 0
has comment: http://stackoverflow.com/comment/46796294

http://stackoverflow.com/comment/46801269
score: 2
comment on: http://stackoverflow.com/q/29303008
has text: I put in a submit function with an alert box that told me the value of payment, and even though the 2nd is visibly checked, the value of the first is being passed...but only when the code comes through as I've listed above with both checked in the code
type: Comment
type: QuestionComment

typeahead
type: Tag
tags question: http://stackoverflow.com/q/29304283
tags question: http://stackoverflow.com/q/29352886
tags question: http://stackoverflow.com/q/29362520
tag name: typeahead

http://stackoverflow.com/q/29287002
accepted answer: http://stackoverflow.com/a/29287477
score: 0
has comment: http://stackoverflow.com/comment/46772603
has body: I'm having an issue with a continuously polling $.ajax request. The issue I'm running in to is how to have it execute immediately first, and then execute on the interval set in the setTimeout call. Code example: http://jsbin.com/doneka/3/ myObj = {}; var output = ''; var items = ''; myObj.displayItems = function() { console.log('displayItems ran'); output = ''; $.each(items, function(index, val) { output += ' ' + val.player.firstName + ' ' + val.player.lastName + ' '; }); $('#content').html(output); }; $(document).ready(function() { (function loadData() { setTimeout(function() { console.log('loadData ran....'); return $.ajax({ url: '//jsbin.com/xinixa/1.json', type: 'GET', dataType: 'json', cache: false, success: function(data) { items = data.apiResults[0].league.season.draft.rounds[0].picks; loadData(); myObj.displayItems(); }, }); }, 3000); })(); }); JS Bin Whenever I refactor to have the setTimeout call inside the function, I get errors. If I make the function not self executing, I get errors as well.
possible better answer: http://stackoverflow.com/a/29287621
upvote count: 1
downvote count: 1
tagged with: javascript
tagged with: iife
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29287477
favorite count: 0
tagged with: ajax
has title: Continuously polling $.ajax request issue
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/29287621
tagged with: settimeout

http://stackoverflow.com/a/29295371
upvote count: 2
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29295002
accepted answer of: http://stackoverflow.com/q/29295002
has comment: http://stackoverflow.com/comment/46787042
type: Answer
has comment: http://stackoverflow.com/comment/62785883
score: 2
downvote count: 0
has body: You are looking for concatenated properties: export default Ember.Mixin.create({ queryParams: ['abc', 'def', 'ghi'], concatenatedProperties: ['queryParams'] }); then import SampleMixin from 'app/mixins/sample-mixin'; export Ember.ObjectController.extend(SampleMixin, { queryParams: ['xyz'] }); now &lt;&lt; this.get('queryParams') &gt;&gt; ['abc', 'def', 'ghi', 'xyz']

http://stackoverflow.com/comment/46754497
comment on: http://stackoverflow.com/q/29278198
score: 0
type: Comment
has text: did you try `<%= social_share_button_tag("Gradezilla rules", :url => "http://gradezilla.com") %>`?
type: QuestionComment

http://stackoverflow.com/a/29361651
accepted answer of: http://stackoverflow.com/q/29361489
upvote count: 3
score: 3
answers question: http://stackoverflow.com/q/29361489
type: AcceptedAnswer
downvote count: 0
has body: Your router.js file may be using backbone object which is not included yet. So move inclusion of router.js after backbone.js
type: Answer

http://stackoverflow.com/q/29293272
has body: How can I split the below string into a 2dimensional-array: Customer::Europe|UK|Scotland|Product::Drinks|Water| array: [Customer][Europe] [Customer][UK] [Customer][Scotland] [Product][Drinks] [Product][Water] Not sure how to create the array. Haven't coded in years, so be kind hArray= []; vArray= []; var i = j = 0; var count = hierarchy.search(/[:|]+/); write(hierarchy); while (count &gt; 0) { if (hierarchy.indexOf(":") &lt; hierarchy.indexOf("|") || (hierarchy.indexOf(":") &gt; 0 &amp;&amp; hierarchy.indexOf("|") == -1) ) { hArray[j] = hierarchy.substr(0,hierarchy.indexOf(":")); hierarchy = hierarchy.slice(hierarchy.indexOf(":")+2); count = hierarchy.search(/[:|]+/); j++; } else if (hierarchy.indexOf("|") &lt; hierarchy.indexOf(":") { vArray[i] = hierarchy.substr(0,count); hierarchy = hierarchy.slice(count+1); count = hierarchy.search(/[:|]+/); i++; } if (count == -1) break; //create multiArray ? }
upvote count: 0
has title: How can I split the below string into a 2dimensional-array:
accepted answer: http://stackoverflow.com/a/29293835
favorite count: 0
type: AnsweredQuestion
downvote count: 2
type: Question
has answer: http://stackoverflow.com/a/29293835
tagged with: split
has comment: http://stackoverflow.com/comment/46782911
score: -2
tagged with: arrays
tagged with: javascript
possible better answer: http://stackoverflow.com/a/29293917
has answer: http://stackoverflow.com/a/29293917
answer count: 2

http://stackoverflow.com/q/29271715
accepted answer: http://stackoverflow.com/a/29272207
type: Question
answer count: 1
tagged with: javascript
score: 0
has title: array difference based on positions in javascript
has answer: http://stackoverflow.com/a/29272207
has body: I have tried multiple approach to solve this problem, any heads up would be great help. I'm having a drag and drop functionality using ng-draggable.js in my project,so initially I set the elements to array A, and when I drag and drop an element inside the array, I don’t know how to capture the changed elements in that array with positions. say A = [1,2,3] now customer changes the position with drag and drop feature. Its becomes B = [2,1,3]. when I do a diff of A and B, I must get the changed elements [2,1] with positions, so that I can send it to server th elements with updated positions. I have tried underscore.js _.difference(A,B), it gives me empty array,
tagged with: angularjs
type: AnsweredQuestion
tagged with: underscore.js

http://stackoverflow.com/a/29352835
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29331889
has body: Try this. var sublist1 = document.getElementById('e1'); var sublist2 = document.getElementById('e2'); document.getElementsByTagName('ul')[0].childNodes[1].appendChild(sublist2); document.getElementsByTagName('ul')[0].childNodes[3].appendChild(sublist1);

http://stackoverflow.com/comment/46737795
type: Comment
type: QuestionComment
has text: Okay, I have file like this: http://pastebin.com/9z062x8d - I can run it by AJAX request. This is only simple code, my script is very big but works in the same way. For simple I have 5000 elements in $array. I want to create simple progressbar which can show me "Reviewed 10 of 5000 elements". I think I need AJAX requests every 10 sec. I can't send request to file from link beacuse I have response after 5 minutes or longer. I want to send request and have answer in 0.5-2 sec.
comment on: http://stackoverflow.com/q/29267829
score: 0

http://stackoverflow.com/a/29355011
type: Answer
has comment: http://stackoverflow.com/comment/47014442
has comment: http://stackoverflow.com/comment/47124173
has comment: http://stackoverflow.com/comment/46896043
has comment: http://stackoverflow.com/comment/46932502
has comment: http://stackoverflow.com/comment/47153898
has comment: http://stackoverflow.com/comment/47123190
accepted answer of: http://stackoverflow.com/q/29354199
answers question: http://stackoverflow.com/q/29354199
has comment: http://stackoverflow.com/comment/46896085
score: 0
has body: Updated: Since you want to cycle the content in the divs I would probably create three divs and show/hide them (since recreating a tableauSoftware.Viz might be more overhead): 0 1 2 Then you can update your initialize method to take a div name and return the object. This makes it possible to create a simple array that holds all your vis objects, then you can rotate through them to toggle visibility and update the one you want to show: function initializeViz(div, url) { var placeholderDiv = document.getElementById(div); var options = { width: 2000, height: 1200, hideTabs: true, hideToolbar: false, onFirstInteractive: function () { workbook = viz.getWorkbook(); activeSheet = workbook.getActiveSheet(); } }; return { div: placeholderDiv, viz: { refreshDataAsync: function (div, divNo) { div.innerHTML = divNo + ' updated: ' + new Date(); } } }; } var vizs = []; vizs.push(initializeViz('tableauViz1', "http://ccapptabdev01/t/Gas/views/SCADA_SERVER_DASHBOARD/Dashboard1")); vizs.push(initializeViz('tableauViz2', "http://ccapptabdev01/t/Gas/views/ERXTrendingTool/Dashboard1")); vizs.push(initializeViz('tableauViz3', "http://ccapptabdev01/t/Gas/views/ERXTrendingTool/Dashboard1")); rotate = function() { this.value = 0; return function() { this.value++ if (this.value >= vizs.length) { this.value = 0; } //hide all vizs.forEach(function (viz, index, array) { viz.div.style.display = 'none'; }); //show and update vizs[this.value].div.style.display = 'block'; vizs[this.value].viz.refreshDataAsync(vizs[this.value].div, this.value); } }; setInterval(rotate(), 1000); https://jsfiddle.net/39eo3to2/ Original: One option is to create multiple new tableauSoftware.Viz objects and pass them into your refresh method: function refreshViz(myViz){ myViz.refreshDataAsync(); } Then you can refresh them based on whatever interval works for that viz: setInterval(function () { refreshViz(viz); }, 30000); setInterval(function () { refreshViz(viz1); }, 20000); setInterval(function () { refreshViz(viz2); }…
has comment: http://stackoverflow.com/comment/47013305
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46937651
has comment: http://stackoverflow.com/comment/47122853
has comment: http://stackoverflow.com/comment/46930937
has comment: http://stackoverflow.com/comment/46895751
has comment: http://stackoverflow.com/comment/46942387
has comment: http://stackoverflow.com/comment/46942489
has comment: http://stackoverflow.com/comment/46938361

datetimepicker
type: Tag
tags question: http://stackoverflow.com/q/29348797
tags question: http://stackoverflow.com/q/29232617
tags question: http://stackoverflow.com/q/29231729
tag name: datetimepicker
tags question: http://stackoverflow.com/q/29272934
tags question: http://stackoverflow.com/q/29254928
tags question: http://stackoverflow.com/q/29316540

coldfusion
tags question: http://stackoverflow.com/q/29300820
tags question: http://stackoverflow.com/q/29333552
tag name: coldfusion
tags question: http://stackoverflow.com/q/29312669
tags question: http://stackoverflow.com/q/29338790
type: Tag

http://stackoverflow.com/comment/46797830
type: Comment
type: QuestionComment
has text: In the watch task, try using this pattern: `files: ['js/{,*/}*.js']` instead of `files: ["js/*.js", "js/**/*.js"]` ?
comment on: http://stackoverflow.com/q/29301531
score: 0

http://stackoverflow.com/q/29222672
type: AnsweredQuestion
downvote count: 1
type: Question
tagged with: google-maps
has body: I am developing an app where you can click on the Google Maps marker pin and it will automatically populate the info window content into a text box. However, I can't seem to get the transfer of information working. I've searched extensively on trying to resolve this but so far no luck - especially since multiple text boxes are involved. I would appreciate any help please. Here's the HTML code: Destination 1: Destination 2: Here's my Javascript: var map; function initMap(){ google.maps.visualRefresh = true; var mapOptions = { center: new google.maps.LatLng(37.09948, -95.59307), zoom: 4, mapTypeId: google.maps.MapTypeId.ROADMAP }; var mapElement = document.getElementById('mapDiv'); map = new google.maps.Map(mapElement, mapOptions); var markers = [ ['BHM-Birmingham', 33.56243, -86.75413], ['HSV-Huntsville', 34.64033, -86.77569], ['PHX-Phoenix', 33.43727, -112.00779], ['TUS-Tucson', 32.11451, -110.93923] ]; var infoWindowContent = [ [' ' + ' Birmingham, AL (BHM - Birmingham-Shuttlesworth Intl) ' + ' '], [' ' + ' Huntsville, AL (HSV - Huntsville Intl) ' + ' '], [' ' + ' Phoenix, AZ (PHX - Phoenix Sky Harbor Intl) ' + ' '], [' ' + ' Tucson, AZ (TUS - Tucson Intl) ' + ' '], ]; var infoWindow = new google.maps.InfoWindow(), marker, i; for(i=0; i < markers.length; i++){ var position = new google.maps.LatLng(markers[i][1], markers[i][2]); var image = 'images/airportIcon_red.png'; var marker = new google.maps.Marker({ position: position, map: map, icon: image, title: markers[i][0], draggable: false, }); google.maps.event.addListener(marker, 'click', (function(marker, i) { return function() { infoWindow.setContent(infoWindowContent[i][0]); infoWindow.open(map, marker); if (!"dest-num1".val()) { document.getElementById("dest-num1").value = infoWindowContent; if (!"dest-num2".val()) { document.getElementById("dest-num2").value = infoWindowContent; if (!"dest-num1".val() && !"dest-num2".val()) { alert ("One of the destination fields must be cleared before a new destination can be …
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29223910
has comment: http://stackoverflow.com/comment/46657521
has comment: http://stackoverflow.com/comment/46655933
score: 0
has title: How to get Google Maps InfoWindow data into multiple HTML text boxes
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: textbox
tagged with: mouseclick-event
favorite count: 0
has answer: http://stackoverflow.com/a/29223910
linked to: http://stackoverflow.com/q/3059044

http://stackoverflow.com/comment/46756811
type: Comment
comment on: http://stackoverflow.com/q/29254367
type: QuestionComment
has text: isnt that depreciated for versions above 3 , which i am using in my project. the plugin used is an alternative for that only
score: 0

http://stackoverflow.com/comment/46818239
comment on: http://stackoverflow.com/q/29312183
type: QuestionComment
type: Comment
has text: I think you miss some brackets.
score: 0

http://stackoverflow.com/comment/52128597
has text: Thanks, I use jQuery Steps and I can't change the submit to button but I added onsubmit="return false;" and it fixed.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29292309
type: AnswerComment

http://stackoverflow.com/q/29334033
score: 0
answer count: 1
has body: I have done this HTML for weather search by inputCity and when it returns an array, I want to give people a choice to choose from a list: &lt;form class="form-container" ng-submit="submitForm(inputCity)"&gt; &lt;input class="input-field" type="text" ng-model="inputCity" placeholder="City"&gt; &lt;input class="button-style" type="submit" value="Show Weather"&gt; &lt;/form&gt; &lt;table class="cities-table" ng-if="isArray"&gt; &lt;tr ng-repeat="data in cityArray" ng-click="inputCity=='zmw:{{data.zmw}}'"&gt; &lt;td&gt;{{data.city}} in {{data.country_name}}&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; My js file: .controller('WeatherController', [ '$scope', 'Weather', function($scope, Weather) { /* TODO: implement */ $scope.weatherData = []; $scope.submitForm = function(inputCity){ Weather.getWeather(inputCity).success(function(data){ $scope.isArray = angular.isArray(data.response.results); $scope.cityArray = data.response.results; and the link in factory: getWeather : function(inputCity) { return $http({ url: 'http://api.wunderground.com/api/KEY/conditions/q/' + inputCity + '.json', method: 'GET' }) } When array comes, can I do that on ng-click it chooses a city name (person can use zmw:{{data.zmw}} instead of inputCity or real city name in search field as that info comes with array) and send an AJAX request? Making it more clear: I have made a form with input (where should be written city name) and a search button. When Button is clicked weather information appears below. But when person types in a city, which is not the only one with the same name in the world, like for San Francisco (there is 10 of them - in Argentina, US and so on), then weather API returns array of all possible cities instead of weather information. I made it to that point, where if array is returned, it displays all the cities that API returned. What I want to do now is when person clicks on one of the displayed city, ng-click triggers the same AJAX call but with good search input ( zmw:{{data.zmw}} wor…
accepted answer: http://stackoverflow.com/a/29334496
tagged with: angularjs
has comment: http://stackoverflow.com/comment/46857210
has comment: http://stackoverflow.com/comment/46857380
type: Question
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29334496
tagged with: javascript
has title: Make new AJAX request on ng-click AngularJS

http://stackoverflow.com/comment/87176834
type: AnswerComment
has text: @diazdeteran var re = /^[0-9a-f]{1,2}([\.:-])(?:[0-9a-f]{1,2}\1){4}[0-9a-f]{1,2}$/gmi; for single character you can change 1,2 to 2
comment on: http://stackoverflow.com/a/29228841
score: 0
type: Comment

http://stackoverflow.com/comment/46711034
score: 0
comment on: http://stackoverflow.com/q/29253703
type: Comment
type: QuestionComment
has text: See this http://jsfiddle.net/qmy4rjow/

http://stackoverflow.com/q/29274407
tagged with: javascript
tagged with: jquery
score: 4
has body: I am working in a JSONRPC webservice and I am trying to send the request to the server end to get the response. Basically I am trying to send the following details in the request methodname//example 899 Language code Transaction code User ID Password number Amount Now there is the host which I need to submit the request.If I telnet the host and the port its getting connected successfully.But when I try to submit the request through the browser I am getting some net::ERR_CONNECTION_CLOSED.I am not sure why its happening. I am not sure about the request that I am submitting but here is the request that I am submitting.And I am submitting request using the Javascript JSON Based on the above script I am tryiing to find the answers for the following questions. Is the request that I am submitting above is valid or not ? How can I provide the URL value if the above declaration is wrong? Is the type that I have provided above is fine ? Please validate all the parameters and let me know whether all of the parameters positions as valid or not. What is the hierarchy of the parameters that I have provided above ? Really appreciate your help on this.
has answer: http://stackoverflow.com/a/29347285
tagged with: json-rpc
answer count: 1
favorite count: 0
type: UnansweredQuestion
type: Question
upvote count: 4
has title: How to submit a JSONRPC request using JavaScript
downvote count: 0

http://stackoverflow.com/q/29274620
favorite count: 0
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/29275007
type: AnsweredQuestion
type: Question
score: 5
upvote count: 5
has body: I have two ng-app in my application app1 and app2 and two controllers firstcontroller and secondcontroller respectively. The problem is it first executes 2nd controller then first controller. But i want to execute in sequence, like 1st controller execution then 2nd controller. please provide solution for that. thanks in advance. var app1 = angular.module('firstapp', []); app1.controller("firstcontroller",function($scope){ $scope.arr1={name:'arjun'}; alert($scope.arr1.name); }); var app2 = angular.module('secondapp', []); app2.controller("secondcontroller",function($scope){ console.log("come to second app"); $scope.arr2={title:'kumar'}; alert($scope.arr2.title); }); angular.bootstrap(document.getElementById("app2"),['secondapp']); {{arr1.name}} {{arr2.title}}
tagged with: javascript
has answer: http://stackoverflow.com/a/29275007
answer count: 1
has title: how to execute a multiple data-ng-app in sequence in angularjs
downvote count: 0

http://stackoverflow.com/comment/46717243
has text: What do you want to use for the `id` and `class` attributes in your paragraphs?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29256292
score: 0

http://stackoverflow.com/comment/47079447
comment on: http://stackoverflow.com/q/29370075
type: Comment
type: QuestionComment
has text: Hi. What is yr grunt and w.io versions? What are you trying to achieve? To connect webdriver.io to an external hub/via proxy?
score: 0

http://stackoverflow.com/a/29309328
has body: Try this: $('#select1').on('change', function() { function1(someVariable, function() { function2(someOtherVariable); }); }); function function1(param, callback) { //...do stuff callback(); } Here is where I found that: Call a function after previous function is complete
answers question: http://stackoverflow.com/q/29309209
type: Answer
has comment: http://stackoverflow.com/comment/46812818
has comment: http://stackoverflow.com/comment/125181571
score: 0
upvote count: 1
downvote count: 1

http://stackoverflow.com/comment/46852900
comment on: http://stackoverflow.com/a/29331846
has text: Hey there, I actually had tried this approach too. I should mentioned it. In console log it tells me `Uncaught TypeError: Cannot read property 'hasAttribute' of undefined`.
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/comment/46687104
score: 0
type: AnswerComment
has text: Thanks - from that I am nearly there. I added another variable to store the VenueID from the XML, and that is displaying correctly as, for example, 190 Finchley Quaker Meeting. So the only thing I'm not sure of is the syntax to use that nameID in the URL. So presume its something like '">
type: Comment
comment on: http://stackoverflow.com/a/29239298

http://stackoverflow.com/q/29299567
answer count: 3
has answer: http://stackoverflow.com/a/66217986
tagged with: eclipse-plugin
favorite count: 0
upvote count: 12
has answer: http://stackoverflow.com/a/51932582
linked to: http://stackoverflow.com/q/62742955
accepted answer: http://stackoverflow.com/a/29299698
type: AnsweredQuestion
downvote count: 0
possible better answer: http://stackoverflow.com/a/66217986
has body: I have a standard Eclipse running on an Ubuntu 14.10: Eclipse Standard/SDK Version: Luna Service Release 2 (4.4.2) Build id: 20150219-0600 I searched for javascript in the marketplace. But nothing jumped to my eye. I searched javascript editor eclipse on the web, which gave me JSDT (https://eclipse.org/webtools/jsdt/) But I couldn't find it in the marketplace. I realised, that JSDT are budled within the WDT (Web Tools Platform; https://eclipse.org/webtools/). It seems that I'm lacking some basic knowledge about eclipse. Is it somehow possible to install JSDT without all the other stuff of the WTP? When I'd like to use WTP, do I need a separate installation of Eclipse? (since WTP is also not in the marketplace) Is there an JavaScript editor plugin that I can simply add to my existing Eclipse installation?
tagged with: eclipse
type: Question
has answer: http://stackoverflow.com/a/29299698
has title: How to install a JavaScript editor for Eclipse?
tagged with: javascript
score: 12

http://stackoverflow.com/q/29245090
type: UnansweredQuestion
has body: I'm using jQuery Validate with Selecter and while highlight is working just fine, unhighlight is not removing the error class. Code: $.validator.addMethod("selectcheck", function(value, element, arg){ return arg != value; }, "Invalid"); $('select').selecter(); $.validator.setDefaults({ ignore: ":hidden:not(input)" }); $("form").validate({ highlight: function (element, errorClass) { if( $(element).is('select') ) { $('.selecter-selected').addClass(errorClass); } else { $(element).addClass(errorClass); } }, unhighlight: function(element, errorClass) { if( $(element).is('select') ) { $('.selecter-selected').removeClass(errorClass); } else { $(element).removeClass(errorClass); } }, rules: { selecter: { selectcheck: "default" } } }); http://codepen.io/anon/pen/OPdxWO
answer count: 0
type: Question
has title: jQuery Validate - Unhighlight error
tagged with: javascript
tagged with: jquery
score: 2
downvote count: 0
favorite count: 0
upvote count: 2

http://stackoverflow.com/comment/78483251
score: 1
comment on: http://stackoverflow.com/a/41925697
has text: This is an excellent option. Also see https://github.com/douglasjunior/react-native-keyboard-manager for a version wrapped for ReactNative - it's easy to install.
type: AnswerComment
type: Comment

http://stackoverflow.com/a/29314526
score: 0
answers question: http://stackoverflow.com/q/29297717
has comment: http://stackoverflow.com/comment/46875880
has body: Which browser are you using with protractor? If you are using Firefox, this should be an issue. sendKeyscannot work on Firefox browser.
type: Answer

http://stackoverflow.com/comment/46823324
score: 0
comment on: http://stackoverflow.com/q/29315381
type: Comment
type: QuestionComment
has text: @callback "were even using jQuery" ( it means JavaScript)

http://stackoverflow.com/comment/46737883
comment on: http://stackoverflow.com/a/29268177
type: Comment
score: 0
has text: The page is being redirected ?
type: AnswerComment

http://stackoverflow.com/comment/46693483
score: 0
type: AnswerComment
type: Comment
has text: ahh - so the `.` in between each word is what makes it "drop down to the next class I've listed". Perfect. Thank you so much! This way I can use `$("select.btn.btn-primary.options")` and `$("select.btn.btn-primary.names")` and `$("select.btn.btn-primary.blahblahblah")`
comment on: http://stackoverflow.com/a/29243698

http://stackoverflow.com/comment/46918896
comment on: http://stackoverflow.com/q/29368415
has text: It wouldn't help your specific issue, but it's better practice.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/75267586
score: 0
answers question: http://stackoverflow.com/q/29323982
type: Answer
has body: Got this error whilst building docker image with line RUN apt install -g serve Fixed it by changing the method to RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash ENV NVM_DIR=/root/.nvm RUN . "$NVM_DIR/nvm.sh" && nvm install ${NODE_VERSION} RUN . "$NVM_DIR/nvm.sh" && nvm use v${NODE_VERSION} RUN . "$NVM_DIR/nvm.sh" && nvm alias default v${NODE_VERSION} RUN cp /root/.nvm/versions/node/v${NODE_VERSION}/bin/node /usr/bin/ RUN cp /root/.nvm/versions/node/v${NODE_VERSION}/bin/npm /usr/bin/ RUN /root/.nvm/versions/node/v${NODE_VERSION}/bin/npm install serve -g

http://stackoverflow.com/comment/46650442
comment on: http://stackoverflow.com/q/29219961
type: Comment
score: 0
type: QuestionComment
has text: Ty much for your answers. Thanks, it works in plunker, but it seems to don't work in my browser, tried in 3 different browsers.:( So, the problem it wasn't in my code, it is somewhere else. Thank you for your efforts. :)

http://stackoverflow.com/comment/46647905
type: QuestionComment
has text: Just invoke the function `betterExampleNeeded`
comment on: http://stackoverflow.com/q/29219463
score: 5
type: Comment

http://stackoverflow.com/a/29309462
accepted answer of: http://stackoverflow.com/q/29309442
type: Answer
has comment: http://stackoverflow.com/comment/46812765
answers question: http://stackoverflow.com/q/29309442
has body: Use the concat function: var complete = array1.concat(array2);
score: 10
upvote count: 10
has comment: http://stackoverflow.com/comment/46812771
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/46862248
score: 0
comment on: http://stackoverflow.com/q/29336969
type: Comment
type: QuestionComment
has text: I meant you to run first big test and then small ones. You can also run your benchmark several times in one session and look at the differences.

http://stackoverflow.com/q/29274240
answer count: 2
has comment: http://stackoverflow.com/comment/46747796
tagged with: javascript
has answer: http://stackoverflow.com/a/29274317
has body: I've got an URL in a string like this: http://url.com?page=121&amp;param1=hello&amp;param2=bye#hello The above could be something else as well meaning it will be dynamic. How could I only keep the "main page"? In the above it would be: http://url.com?page=121
favorite count: 0
type: UnansweredQuestion
downvote count: 2
has title: Javascript strip all url parameters from string?
has answer: http://stackoverflow.com/a/29274320
has comment: http://stackoverflow.com/comment/46747857
has comment: http://stackoverflow.com/comment/46747791
score: -1
upvote count: 1
type: Question

http://stackoverflow.com/comment/46779434
has text: I think you're looking for `.filter()`, not `.find()`. And use `.first()` to get only one.
comment on: http://stackoverflow.com/q/29290175
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46814001
has text: are your sure your `script.js` is running?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29309842
type: AnswerComment

http://stackoverflow.com/comment/50059258
has text: Maybe this is a new update "Your extension's content scripts can directly access user data without the need for a background page.": https://developer.chrome.com/extensions/storage
type: Comment
score: 2
comment on: http://stackoverflow.com/a/29358508
type: AnswerComment

http://stackoverflow.com/comment/46715185
score: 2
comment on: http://stackoverflow.com/q/29255986
type: QuestionComment
has text: You're missing a `#` on this line - `$("preferredCollaboratorChosenId").on("chosen:ready", ...)` - to make it an ID selector.
type: Comment

http://stackoverflow.com/a/29267909
upvote count: 7
accepted answer of: http://stackoverflow.com/q/29245503
score: 7
type: AcceptedAnswer
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/29245503
has body: What is going on? There are multiple text nodes in the pre element. How can I programmatically detect it? $('pre').contents() will return a list of children of the element, including text nodes. In my case, I'll only ever have text nodes so simply checking if the list has a length greater than 1 will work. If I weren't able to make that assumption, I would have to iterate over the returned list and see if any two consecutive nodes were text nodes. See the documentation from jQuery. How can I programmatically fix / get rid of it? $('pre')[0].normalize() fixes it. See the documentation on normalize from MDN.

http://stackoverflow.com/q/29266045
tagged with: javascript
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46733943
upvote count: 1
has body: I'm trying to calculate the price when the textbox is changed. Inside the table cell I have six textboxes, and I want to recalculate the total every time the numbers change in the textboxes. &lt;asp:TableCell VerticalAlign="Middle"&gt; Price: $12 non reflective, $24 Reflective &lt;br /&gt; &lt;br /&gt; Quantity &lt;asp:TextBox ID="TextBox2" BackColor="Blue" runat="server" Width="40" Text="1" TextMode="Number"&gt;&lt;/asp:TextBox&gt; &lt;asp:TextBox BackColor="Red" ID="TextBox3" Text="0" runat="server" Width="40" TextMode="Number"&gt;&lt;/asp:TextBox&gt; &lt;asp:TextBox Text="0" ForeColor="White" BackColor="Black" ID="TextBox4" runat="server" Width="40" TextMode="Number"&gt;&lt;/asp:TextBox&gt; &lt;asp:TextBox Text="0" ID="TextBox5" runat="server" Width="40" TextMode="Number"&gt;&lt;/asp:TextBox&gt; &lt;asp:TextBox Text="0" ForeColor="White" BackColor="Red" ID="TextBox6" runat="server" Width="40" TextMode="Number"&gt;&lt;/asp:TextBox&gt; &lt;asp:TextBox Text="0" ID="TextBox7" runat="server" Width="40" TextMode="Number"&gt;&lt;/asp:TextBox&gt; &lt;br /&gt; &lt;asp:Label ID="Label178" Width="80" Font-Size="Small" Font-Bold="true" runat="server" Text=" "&gt;&lt;/asp:Label&gt; &lt;asp:Label ID="Label179" Font-Size="X-Small" Font-Bold="true" runat="server" Text="Colors"&gt;&lt;/asp:Label&gt; &lt;asp:Label ID="Label180" runat="server" Width="140" Text=" "&gt;&lt;/asp:Label&gt; &lt;asp:Label ID="Label181" runat="server" Font-Size="X-Small" Text="Reflective"&gt;&lt;/asp:Label&gt; &lt;br /&gt; &lt;br /&gt; Total: &lt;u&gt;$&lt;asp:Label runat="server" ID="tp36" Text="12" Font-Bold="false"&gt;&lt;/asp:Label&gt;&lt;/u&gt; &lt;/asp:TableCell&gt; I want to do it without going back to the server and using server-side code. I would like to do it on client-side code (JavaScript). So I made a script at the end of my .aspx page. &lt;script src="Roadside.js" type="text/javascript"&gt;&lt;/script&gt; &lt;/body&gt; &lt;/html&gt; Roadside.js: var deal = document.getElementById("TextBox2")…
has answer: http://stackoverflow.com/a/29267224
has answer: http://stackoverflow.com/a/29266133
has title: Cannot Make JavaScript event handler get Textbox text attribute
score: 1
type: Question
answer count: 2
downvote count: 0

http://stackoverflow.com/q/29219028
tagged with: http://stackoverflow.com/tag/json
type: Question
has comment: http://stackoverflow.com/comment/46648846
tagged with: javascript
answer count: 3
has answer: http://stackoverflow.com/a/29219300
linked to: http://stackoverflow.com/q/728360
has comment: http://stackoverflow.com/comment/46647174
type: UnansweredQuestion
has body: I have this json object that hold some data, and I'm doing a search on that object and when the result match I want to save it to another object. What is the best way to do it. I need some help copying the data I want to the new variable. Here is what I have. myjson = JSON.parse(jsonData); for(var x=0; x&lt;myjson.ROWCOUNT;x++){ if(myjson.DATA.PARTNUMBER[x].search(regex) != -1){ console.log(myjson.DATA.PARTNUMBER[x]); } } Where I have the console.log that display the partnumber, how can I make it so it copies all the content from the X row? myjson has 4 columns (ID,PARTNUMBER,DESCRIPTION,PRICE) but I'm only searching on the partnumber. I need to copy all to the new json object. thanks.
has comment: http://stackoverflow.com/comment/46647318
has answer: http://stackoverflow.com/a/29219107
has answer: http://stackoverflow.com/a/29219273
has title: How to copy a JSON object in JS
score: 0

http://stackoverflow.com/q/29303787
tagged with: javascript
favorite count: 0
tagged with: yadcf
tagged with: datatables
has title: Colvis javascript create problems for toolbar ui in datatables & yadcf
tagged with: css
upvote count: 2
has answer: http://stackoverflow.com/a/29340787
type: Question
type: AnsweredQuestion
has body: My table without Colvis.js have toolbar, Live Example But with Colvis.js toolbar disappears, Live Example Using Firebug seems to be a conflict with jquery-ui but I don't understand well what exact happens. Is a css problem or a javascript conflict? However this is relevant css for toolbar &lt;div class="fg-toolbar ui-toolbar ui-widget-header ui-corner-tl ui-corner-tr ui-helper-clearfix"&gt; . .ui-helper-clearfix::before, .ui-helper-clearfix::after { content: ""; display: table; } .ui-helper-clearfix::after { clear: both; } .ui-helper-clearfix::before, .ui-helper-clearfix::after { content: ""; display: table; } .ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr { border-top-right-radius: 4px; } .ui-corner-all, .ui-corner-top, .ui-corner-left, .ui-corner-tl { border-top-left-radius: 4px; } .ui-widget-header { background: url("images/ui-bg_highlight-soft_75_cccccc_1x100.png") repeat-x scroll 50% 50% #cccccc; border: 1px solid #aaaaaa; color: #222222; font-weight: bold; } .ui-helper-clearfix { }
accepted answer: http://stackoverflow.com/a/29340787
score: 2
answer count: 1
downvote count: 0

http://stackoverflow.com/a/29261947
has body: For one thing you're passing a string instead of an object as the 2nd argument.
score: 1
answers question: http://stackoverflow.com/q/29261761
downvote count: 0
type: Answer
upvote count: 1

http://stackoverflow.com/a/29298770
downvote count: 0
has comment: http://stackoverflow.com/comment/46792898
answers question: http://stackoverflow.com/q/29298745
type: Answer
score: 3
upvote count: 3
has comment: http://stackoverflow.com/comment/46792474
has comment: http://stackoverflow.com/comment/46792408
has comment: http://stackoverflow.com/comment/46793031
has body: Try to use .not() function along with :eq() selector to achieve what you want, $('.d').each(function(){ $(".head",this).not(":eq(0)").remove(); }); DEMO

http://stackoverflow.com/q/29244662
has comment: http://stackoverflow.com/comment/46695103
has body: I need the code for a Football Scoreboard clock counter (that decreases) that I can use for games. I also need the code for having a button that both stops and starts the clock. I need to have the clock embedded in a picture file I am creating. in other words, have it run just like one you would see in a game.
type: UnansweredQuestion
score: -4
upvote count: 1
tagged with: counter
downvote count: 5
type: Question
answer count: 1
tagged with: clock
tagged with: javascript
has comment: http://stackoverflow.com/comment/46695142
favorite count: 0
has answer: http://stackoverflow.com/a/29245430
has comment: http://stackoverflow.com/comment/46695114
has title: Football Clock counter in JavaScript

http://stackoverflow.com/q/29300538
tagged with: javascript
linked to: http://stackoverflow.com/q/13415345
has comment: http://stackoverflow.com/comment/46796077
tagged with: jquery
type: Question
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/5730433
score: 0
answer count: 1
tagged with: mouse
has answer: http://stackoverflow.com/a/29300785
has comment: http://stackoverflow.com/comment/77050542
has title: js: stop mouse movement
accepted answer: http://stackoverflow.com/a/29300785
has body: it's possible to stop mouse movement in window and allow only in certain box ? for example, i have a div with width: 200px and height: 200px, to allow only in this div to move mouse. Thank you.

http://stackoverflow.com/a/29297218
answers question: http://stackoverflow.com/q/29295380
score: 0
type: AcceptedAnswer
has body: public static native void nativeMethod(Integer index)/*-{ var converted if(index!=null){ converted = Number(hindeIndex); }else{ converted=null; } }-*/; This Worked.. Had a null check,if not then convert it into var type
type: Answer
accepted answer of: http://stackoverflow.com/q/29295380

arrayobject
tags question: http://stackoverflow.com/q/29358656
tag name: arrayobject
type: Tag

http://stackoverflow.com/comment/46803781
comment on: http://stackoverflow.com/q/29304659
type: Comment
type: QuestionComment
has text: Get the keys of the object using `Object.keys`, and sort the returned array?
score: 2

http://stackoverflow.com/q/29252451
downvote count: 0
favorite count: 0
tagged with: http://stackoverflow.com/tag/svg
has comment: http://stackoverflow.com/comment/46793174
has body: I have a rendering problem when I have two column material Google charts on the same page. Basically, the first column gets partially drawn on the vertical line which corresponds to axis of the second chart. If I have only 1 chart - everything is OK. Please take a look at the following screenshots to see the problem: 2 charts (problem): https://www.dropbox.com/s/9p0ji49kpv2vtl1/gc-svg-pb.png?dl=0 1 chart (no problems): https://www.dropbox.com/s/12rpxl23ojean2b/gc-svg-1.png?dl=0
has answer: http://stackoverflow.com/a/29309675
accepted answer: http://stackoverflow.com/a/29309675
type: AnsweredQuestion
score: 2
has answer: http://stackoverflow.com/a/29299192
has title: Rendering issue with 2 Google charts on the same page
has comment: http://stackoverflow.com/comment/46793248
type: Question
tagged with: charts
has answer: http://stackoverflow.com/a/29425131
tagged with: google-visualization
tagged with: javascript
has comment: http://stackoverflow.com/comment/46792853
upvote count: 2
answer count: 3
possible better answer: http://stackoverflow.com/a/29299192
has comment: http://stackoverflow.com/comment/46796218

http://stackoverflow.com/comment/46828036
score: 1
comment on: http://stackoverflow.com/q/29301151
type: Comment
type: QuestionComment
has text: You don't have any transitions in your code. How am I supposed to illustrate your code?

http://stackoverflow.com/q/29296998
answer count: 3
has answer: http://stackoverflow.com/a/29298046
has comment: http://stackoverflow.com/comment/46791301
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29297589
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/868890
has comment: http://stackoverflow.com/comment/46789483
has comment: http://stackoverflow.com/comment/46789450
tagged with: php
has comment: http://stackoverflow.com/comment/46789345
possible better answer: http://stackoverflow.com/a/29297134
type: Question
duplicate of: http://stackoverflow.com/q/868890
has answer: http://stackoverflow.com/a/29297134
has comment: http://stackoverflow.com/comment/46789522
has body: // My jquery for form submission $(document).ready(function() { var form = $('#form1'); // contact form var submit = $('#submit1'); // submit button var alert = $('.alert1'); // alert div for show alert message // form submit event form.on('submit', function(e) { e.preventDefault(); // prevent default form submit // sending ajax request through jQuery $.ajax({ url: 'giftcard_check.php', // form action url type: 'POST', // form submit method get/post dataType: 'html', // request type html/json/xml data: form.serialize(), // serialize form data beforeSend: function() { alert.fadeOut(); submit.html('Checking....'); // change submit button text }, success: function(data) { alert.html(data).fadeIn(); // fade in response data form.trigger('reset'); // reset form submit.html('Apply'); // reset submit button text }, error: function(e) { console.log(e) } }); }); }); // My form Apply Hello // giftcard_check.php include("include/dbconnection.php"); dbconnect(); session_start(); $_SESSION['fromttl'] = 0; $valuebox = $_POST['valuebox']; $query = "SELECT * FROM db_coupon WHERE code='$valuebox' AND publish='1'"; $result = mysql_query($query); $length = mysql_num_rows($result); $rows = mysql_fetch_array($result); $discount = $rows['discount']; if($length == 1) { $_SESSION['fromttl'] = $discount; echo $_SESSION['fromttl']; } else { $_SESSION['fromttl'] = 0; echo "Invalid Gift Card!"; } My question is how to refresh a particular div (ie, <?php echo $_SESSION['fromttl']; ?> ) immediate after the form submission. My current result not refreshing the particular div after form submission. I don't want to refresh whole page, only a particular div. If i refresh whole page the div will be refreshed. Is there any solution? I am stuck here.
has title: how to refresh a particular div after jquery form submission
accepted answer: http://stackoverflow.com/a/29298046
tagged with: javascript
tagged with: jquery
tagged with: ajax
score: 0

http://stackoverflow.com/comment/46873755
type: QuestionComment
has text: You wrote that the problem exists only in case of applying "custom scrollbar" on the div "ui-jqgrid-bdiv", but **the code don't includes the applying**. You should provide the demo which can be used to reproduce the problem.
comment on: http://stackoverflow.com/q/29343340
score: 0
type: Comment

http://stackoverflow.com/comment/46842513
type: Comment
comment on: http://stackoverflow.com/a/29325830
score: 0
type: AnswerComment
has text: I will try that. I think the reason the join('\n') is in there is because the regex match is pulling from a list where each value is on a new line... and it is putting the list back in that format instead of having all of the values comma separated.

http://stackoverflow.com/q/29354192
type: Question
has title: Prevent closure to from renaming object keys
tagged with: google-closure-compiler
tagged with: javascript
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/29356038
accepted answer: http://stackoverflow.com/a/29356038
type: AnsweredQuestion
has body: I have a document['key'] that i am defining in elsewhere in my code. Basically an API key that is being set by client in html &lt;script&gt;&lt;/script&gt; tag like this. &lt;script type="text/javascript"&gt; (function(){ document.clientKey = 'a uuid unique to client'; })(); &lt;/script&gt; i called this key in my javascript file via document['clientKey'] and it was working fine, until i passed it to closure, which renames it to document.I. Can I force closure to keep the string 'clientKey'

http://stackoverflow.com/q/29331167
downvote count: 1
type: Question
has body: i'm working on a chrome extension that takes text from text boxes in an html page and converts it to any other wanted language i have installed on my "Region and Languages" under control settings. is there any easy way to get the languages installed on the "Region and Languages" through chrome extension ?
upvote count: 0
tagged with: javascript
tagged with: google-chrome-extension
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/29331949
type: UnansweredQuestion
has title: How to get the languages installed in "Region and Languages"
score: -1

http://stackoverflow.com/q/29222887
has answer: http://stackoverflow.com/a/29223273
duplicate of: http://stackoverflow.com/q/20997077
linked to: http://stackoverflow.com/q/20997077
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29223191
type: AnsweredQuestion
tagged with: geolocation
has title: How to show location on a map taking longitude and latitude values from XML
type: Question
has body: This is an XML entry and it takes geolocation from PHP form. I want to display those values as a map in HTML: Anny anny1@hotmail.com Fridays Very Good Jack Daniels Burger American 5 34.7618259 33.0283905
possible better answer: http://stackoverflow.com/a/29223191
accepted answer: http://stackoverflow.com/a/29223273
score: 0
answer count: 2
tagged with: xml-parsing
tagged with: google-maps
tagged with: javascript

pug
tags question: http://stackoverflow.com/q/29343131
tag name: pug
type: Tag
tags question: http://stackoverflow.com/q/29337168
tags question: http://stackoverflow.com/q/29369877
tags question: http://stackoverflow.com/q/29301568

http://stackoverflow.com/q/29265080
has body: I have several buttons on my page. for each button I want to open a modal box. However, inside the modalbox the data will be populated based on the button clicked. So I need a way to use the clicked items' value inside the modal box. How can I do this? Here is what I've tried. HTML Open w/ index 0 Open w/ index 1 Open w/ index 2 JS $scope.open = function (index) { var modalInstance = $modal.open({ templateUrl: 'myModalContent.html', controller: 'ModalInstanceCtrl', resolve: { items: function () { return $scope.items; }, index: function() { return index; } } }); modalInstance.result.then(function (selectedItem) { $scope.selected = selectedItem; }, function () { $log.info('Modal dismissed at: ' + new Date()); }); }; Modal HTML I'm a modal! w/ index {{index}} Here is a Plnk of a working example http://plnkr.co/edit/m65ATdiSdAUGxj69GgSV?p=preview
tagged with: modal-dialog
downvote count: 0
score: 1
favorite count: 0
has title: How to get a value inside modalbox based on the item that is clicked
tagged with: angularjs
type: Question
has comment: http://stackoverflow.com/comment/46732706
answer count: 1
has comment: http://stackoverflow.com/comment/46732308
upvote count: 1
has comment: http://stackoverflow.com/comment/46732469
tagged with: javascript
has answer: http://stackoverflow.com/a/29265514
type: UnansweredQuestion

http://stackoverflow.com/q/29272840
tagged with: typesafe-activator
tagged with: http://stackoverflow.com/tag/html
tagged with: minify
has comment: http://stackoverflow.com/comment/46748002
favorite count: 0
has comment: http://stackoverflow.com/comment/46747543
type: Question
upvote count: 2
answer count: 2
has answer: http://stackoverflow.com/a/29280103
has body: How can I minify JS &amp; CSS through play-framework? 'Google Closure Compiler' is no longer an option since it was removed. I am using play Activator 2.3.7 Note: This question is not duplicate since Google Closure Compiler was removed from activator 2.3.7.
tagged with: playframework
score: 2
has title: Minify client through Play Framework
downvote count: 0
tagged with: javascript
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/34317399

http://stackoverflow.com/a/29302698
score: 0
accepted answer of: http://stackoverflow.com/q/29302302
answers question: http://stackoverflow.com/q/29302302
type: AcceptedAnswer
type: Answer
has body: For adding or subtracting month,year w3schools provided the setFullYear() function. You can directly add or subtract whatever date you want See example: Click the button to display the date 1 year ahead of the given date. Try it [http://www.w3schools.com/jsref/jsref_setfullyear.asp][1]

http://stackoverflow.com/comment/46815844
comment on: http://stackoverflow.com/a/29308420
score: 0
type: AnswerComment
type: Comment
has text: @altocumulus Not sure where you got that from; it doesn't work for me (http://jsfiddle.net/9otv235t/).

http://stackoverflow.com/a/29224011
score: 3
downvote count: 0
has body: The way I usually implement O(1) interpolation is by means of an additional data structure, which I call IntervalSelector that in time O(1) will give the two surrounding values of the sequence that have to be interpolated. An IntervalSelector is a class that, when given a sequence of n abscissas builds and remembers a table that will map any given value of x to the index i such that sequence[i] &lt;= x &lt; sequence[i+1] in time O(1). Note: In what follows arrays are 1 based. The algorithm that builds the table proceeds as follow: Find delta to be the minimum distance between two consecutive elements in the input sequence of abscissas. Set count := (b-a)/delta + 1, where a and b are respectively the first and last of the (ascending) sequence and / stands for the integer quotient of the division. Define table to be an Array of count elements. For i between 1 and n set table[(sequence[j]-a)/delta + 1] := j. Repeat every entry of table visited in 4 to the unvisited positions that come right after it. On output, table maps j to i if (j-1)*d &lt;= sequence[i] - a &lt; j*d. Here is an example: Since elements 3rd and 4th are the closest ones, we divide the interval in subintervals of this smallest length. Now, we remember in the table the positions of the left end of each of these deta-intervals. Later on, when an input x is given, we compute the delta-interval of such x as (x-a)/delta + 1 and use the table to deduce the corresponding interval in the sequence. If x falls to the left of the ith sequence element, we choose the (i-1)th. More precisely: Given any input x between a and b calculate j := (x-a)/delta + 1 and i := table[j]. If x &lt; sequence[i] put i := i - 1. Then, the index i satisfies sequence[i] &lt;= x &lt; sequence[i+1]; otherwise the distance between these two consecutive elements would be smaller than delta, which is not. Remark: Be aware that if the minimum distance delta between consecutive elements in sequence is too small the table will have too many e…
type: AcceptedAnswer
upvote count: 3
answers question: http://stackoverflow.com/q/29222858
type: Answer
accepted answer of: http://stackoverflow.com/q/29222858

http://stackoverflow.com/q/29286512
has comment: http://stackoverflow.com/comment/46772785
tagged with: angularjs-scope
has comment: http://stackoverflow.com/comment/46771026
has body: I am trying to make constructor of web page. Here is the plunker. I have headings, paragraphs, lists and so on. I drag them from menu and they are cloned and pasted into dom. Similar to this one layoutit.com. This is how they are cloned: app.directive('ironplayDraggableBox', ['$compile', function($compile) { return { link: function(scope, element, attrs) { $(element).draggable({ connectToSortable: ".column", helper: function(){ $new_el = $(this).clone().draggable({disabled: true}); return $compile($new_el)(scope); }, handle: ".drag", drag: function(e, t) { t.helper.width(400) }, stop: function(e, t) { t.helper.attr('style', ''); } }); } }; }]); I want each element that is created to have some buttons for options: text align, color, etc. This buttons change class of the element that resides in the .view div. I do it via directive and jQuery. Here the html code of element: remove drag Align Left Right Center Emphasis Muted Primary Success Info Warning Danger Title h3. Lorem ipsum dolor sit amet. How can I make it via binding like so: and updated automatically as class name: h3. Lorem ipsum dolor sit amet.
favorite count: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/46827135
upvote count: 2
type: UnansweredQuestion
score: 2
answer count: 0
has title: How to make angular bindings work on dynamically created dom items?
type: Question
has comment: http://stackoverflow.com/comment/46770563
downvote count: 0
tagged with: javascript

http://stackoverflow.com/q/29326789
upvote count: 1
accepted answer: http://stackoverflow.com/a/29327527
answer count: 1
has body: I have a directive that clone object while drag and drop. app.directive('ironplayDraggableBox', ['$compile', function($compile) { return { restrict:'A', link: function(scope, element, attrs) { $(element).draggable({ connectToSortable: ".preview", helper: function(){ $new_el = $(this).clone(); return $compile($new_el)(scope); }, handle: ".drag", }); } }; }]); But when I drag the DOM element with HTML code like this &lt;input type="text" ng-model="align"&gt;{{align}} ng-model stops work completely. Could you suggest how to implement proper dom element clone with angular directives inside? Here is the full code: http://plnkr.co/edit/OJ1a5VyqQq9EpXP7AfpA?p=preview The goal in plunker to have text align select working.
tagged with: angularjs-ng-model
tagged with: jquery-ui
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/29327527
type: AnsweredQuestion
score: 1
has title: ng-model does not work after $(element).clone()
favorite count: 0
tagged with: angularjs
tagged with: drag-and-drop
type: Question

http://stackoverflow.com/comment/46661113
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/29226714
has text: Possible duplicate of [http://stackoverflow.com/questions/1566595/can-i-use-multiple-versions-of-jquery-on-the-same-page](http://stackoverflow.com/questions/1566595/can-i-use-multiple-versions-of-jquery-on-the-same-page)
type: Comment

http://stackoverflow.com/q/29327777
has comment: http://stackoverflow.com/comment/46845483
has comment: http://stackoverflow.com/comment/46845783
has answer: http://stackoverflow.com/a/29327870
has comment: http://stackoverflow.com/comment/46845499
type: AnsweredQuestion
score: 2
downvote count: 0
has answer: http://stackoverflow.com/a/29327817
has body: I have this code to make the data available in table format but the table head and row appear as two different body, how do i work with that $("#container").html(" Name Address Sex Email ") for (var i = 0; i < data.length; i++) { $("#container").append(" " + data[i].name + " " + data[i].address + " " + data[i].sex + " " + data[i].email + " " ); } $("container").append(" ") This is what I get I want the whole table, not two seperate buddies.
has title: How to make the table in javascript
type: Question
tagged with: javascript
upvote count: 2
answer count: 3
possible better answer: http://stackoverflow.com/a/29327817
has answer: http://stackoverflow.com/a/29327819
tagged with: jquery
accepted answer: http://stackoverflow.com/a/29327870
has comment: http://stackoverflow.com/comment/46845435
favorite count: 0

http://stackoverflow.com/comment/46918630
comment on: http://stackoverflow.com/a/29363086
score: 0
type: Comment
has text: give it a global counter, or use a function that you delete
type: AnswerComment

http://stackoverflow.com/q/29315642
type: Question
accepted answer: http://stackoverflow.com/a/29315677
score: 2
tagged with: arrays
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/29315678
answer count: 3
has answer: http://stackoverflow.com/a/29315757
favorite count: 0
possible better answer: http://stackoverflow.com/a/29315757
upvote count: 2
has answer: http://stackoverflow.com/a/29315677
has comment: http://stackoverflow.com/comment/46823635
has comment: http://stackoverflow.com/comment/46823629
type: AnsweredQuestion
has body: I have an array that includes 2 strings. One in a list of numbers and another is an integer. I want to get the elements from the first string from start to the place of the integer (if the integer is 2, I want the first two numbers in the string). I've written this code, but it only returns the first character in my string. Can anyone explain why? Thanks var line = "1,2,3,4,5;2"; line = line.split(";"); console.log(line); var reverse = line[0].slice(0, parseInt(line[1])); console.log(reverse);
has title: array.slice returns 1 element instead of two
tagged with: slice

http://stackoverflow.com/q/29299397
type: Question
possible better answer: http://stackoverflow.com/a/29300009
has title: What's the role of "Isolate" in V8? and how can it be possible to make "Isolate" isolately?
has answer: http://stackoverflow.com/a/29300009
tagged with: javascript
answer count: 2
downvote count: 0
has answer: http://stackoverflow.com/a/29302129
favorite count: 0
upvote count: 8
tagged with: javascript-engine
score: 8
type: AnsweredQuestion
has body: The explanations of "Isolate" what I found so far. exp #1: http://izs.me/v8-docs/classv8_1_1Isolate.html "Isolate represents an isolated instance of the V8 engine. V8 isolates have completely separate states. Objects from one isolate must not be used in other isolates. When V8 is initialized a default isolate is implicitly created and entered. The embedder can create additional isolates and use them in parallel in multiple threads. An isolate can be entered by at most one thread at any given time. The Locker/Unlocker API can be used to synchronize." exp #2: https://developers.google.com/v8/get_started "An isolate is a VM instance with its own heap." OK, I see. "Isolate" is an isolate thread that can operate seperately. Followings are my questions. It looks like just thread for me, except that it has its own heap. is there any difference? I think "Isolate" can be used for implementing concurrent GC. The definition above says that each "Isolate" cannot be used in other "Isolate". But concurrent GC should check(or mark) the main(or other) thread(or Isolate)'s live objects. How can it be possible? How can it be possible to protect their own objects? "Isolate" is a thread not a process. So other thread can access that thread's object if it knows the address. How could protect it? And I cannot understand the meaning of own heap. Because it can be accessed by other thread if other thread knows the address. And normal thread can have their heap in memory space. Since address space of heap is not seperated exactly but if one thread malloc a memory, how could other thread use it unless others know the address? What's the difference each thread just malloc their own heap space and "Isolate" have its own heap space? My questions can be easily summarized that what is the role of the "Isolate" and how can it be possible to have their own heap space and why does it have to have its own heap. It will be very helpful if someone shares some good documentations of "Isolate". Thanks fo…
accepted answer: http://stackoverflow.com/a/29302129
tagged with: multithreading
tagged with: v8

http://stackoverflow.com/q/29249478
type: UnansweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/48013475
upvote count: 1
has comment: http://stackoverflow.com/comment/46707402
tagged with: caret
tagged with: javascript
type: Question
downvote count: 0
linked to: http://stackoverflow.com/q/19620439
tagged with: jquery
favorite count: 0
has body: I am trying to add content at caret position in editable div. Simple MouseOver Add By clicking on Simple, it add content at caret position which is fine, but when I click on Add every time it add content at start position of document. How would I go about doing this? Thanks.
tagged with: http://stackoverflow.com/tag/html
answer count: 0
tagged with: contenteditable
has title: Add content at caret position in contentEditable div
linked to: http://stackoverflow.com/q/29863549

http://stackoverflow.com/comment/46878898
type: Comment
has text: code is invalid and even if it wasn't it doesn't answer the question
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29343445

http://stackoverflow.com/q/29242332
has comment: http://stackoverflow.com/comment/46691545
has answer: http://stackoverflow.com/a/29243672
has comment: http://stackoverflow.com/comment/46691517
has title: How to play multiple videos back to back in the same embedded player with the YouTube js API?
tagged with: youtube-javascript-api
has comment: http://stackoverflow.com/comment/46691928
has comment: http://stackoverflow.com/comment/46693078
upvote count: 2
has comment: http://stackoverflow.com/comment/46692161
has comment: http://stackoverflow.com/comment/46691340
score: 2
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29243672
has comment: http://stackoverflow.com/comment/46691398
has comment: http://stackoverflow.com/comment/46691435
has comment: http://stackoverflow.com/comment/46691127
has comment: http://stackoverflow.com/comment/46692802
has comment: http://stackoverflow.com/comment/46691843
type: Question
has comment: http://stackoverflow.com/comment/46691361
answer count: 1
downvote count: 0
has body: So far I have a YouTube player embedded, which I can control via the YouTube API, and I also get the callbacks properly and everything. So whenever I call loadVideoById on my player object to load another video, while the current one is still playing, it works just fine. However, if I call it after a video has stopped, it doesn't do anything. I have a pre-defined set of YouTube video IDs, that I wish to play one after another in the same embedded player. So what I want, is that once one video stopped, the API issues a callback, so I get notified about it, then I order the player to load another video and play it. Here's the relevant part of the code: this.playNextVideo = function playNextVideo() { if (this.playlist.length &gt; 0) { yt_embedded_player.loadVideoById(this.nextId(), 0); yt_embedded_player.playVideo(); } } this.onPlayerStateChange = function onPlayerStateChange(_event) { if (_event.data == YT.PlayerState.ENDED) this.playNextVideo(); } yt_embedded_player is my embedded player, as returned by the iFrame API playlist is the array that contains the video IDs nextId() is a function that supplies the video IDs one after another (from playlist) Is there any method to load and play a video after the previous one reached the end?
tagged with: javascript
has comment: http://stackoverflow.com/comment/46691178
favorite count: 0
has comment: http://stackoverflow.com/comment/46692180
has comment: http://stackoverflow.com/comment/46692245

http://stackoverflow.com/comment/46705367
score: 0
comment on: http://stackoverflow.com/q/29250252
type: QuestionComment
type: Comment
has text: So you have also a problem with GA script inclusion. @Masiorama: no worries then :)

http://stackoverflow.com/comment/46795090
type: Comment
comment on: http://stackoverflow.com/a/29297713
type: AnswerComment
score: 0
has text: Okay so I have confirmed that the `ajax.php` functions are executing and I have also checked the results are being sent back via the web `console`. But why can't I print these results when I call the message in my `index.php` file? Why aren't the checkbox being generated??

http://stackoverflow.com/q/29302829
score: 1
possible better answer: http://stackoverflow.com/a/29303078
type: Question
answer count: 2
accepted answer: http://stackoverflow.com/a/29302936
upvote count: 1
tagged with: javascript
tagged with: jquery
has title: How to create and handle response for Ajax call
favorite count: 0
tagged with: ajax
has body: How is the correct way to handle success/error results in my PHP script? I have a function in the script, and it either fails or succeeds. Normally, I would return true or false. But if I understand correctly, Ajax success function doesn't care about the result in my script, it only cares whether or not it actually ran my script. In other words, I have to, confusingly, check for errors in the success function. So how should I have PHP return error, and how do I check for it in the success function? Should I have PHP simply "echo "true";" if it succeeds? $.ajax({ type: 'POST', url: 'jquery-actions.php', data: formData, dataType: 'text', encode: true, error: function (response) { console.log(response); }, success: function (response) { //How to find out whether or not PHP function worked? }
has answer: http://stackoverflow.com/a/29302936
has answer: http://stackoverflow.com/a/29303078
has comment: http://stackoverflow.com/comment/46800273
downvote count: 0
has comment: http://stackoverflow.com/comment/46800359
tagged with: php
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46800267

http://stackoverflow.com/q/29316340
has title: How do I get bootstrap modal working?
has comment: http://stackoverflow.com/comment/46824957
has comment: http://stackoverflow.com/comment/46825204
answer count: 1
tagged with: bootstrap-modal
accepted answer: http://stackoverflow.com/a/29316810
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46825532
score: 0
has answer: http://stackoverflow.com/a/29316810
has comment: http://stackoverflow.com/comment/46825640
tagged with: twitter-bootstrap
has comment: http://stackoverflow.com/comment/46824947
has comment: http://stackoverflow.com/comment/46824968
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46824860
has comment: http://stackoverflow.com/comment/46825678
has comment: http://stackoverflow.com/comment/46825062
has comment: http://stackoverflow.com/comment/46824759
type: Question
has body: Below is the html &lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;Title&lt;/title&gt; &lt;meta http-equiv="Content-type" content="text/html; charset=utf-8" /&gt; &lt;link rel="stylesheet" type="text/css" href="styles/bootstrap.min.css" /&gt; &lt;link rel="stylesheet" type="text/css" href="styles/bootstrap-theme.min.css" /&gt; &lt;script type="text/javascript" src="js/jquery-1.11.2.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascipt" src="js/bootstrap.min.js"&gt;&lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;button type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal"&gt;Launch demo modal &lt;/button&gt; &lt;!-- Modal for file filter --&gt; &lt;div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"&gt; &lt;div class="modal-dialog"&gt; &lt;div class="modal-content"&gt; &lt;div class="modal-header"&gt; &lt;button type="button" class="close" data-dismiss="modal" aria-label="Close"&gt; &lt;span aria-hidden="true"&gt;&amp;times;&lt;/span&gt; &lt;/button&gt; &lt;h4 class="modal-title" id="myModalLabel"&gt;Modal title&lt;/h4&gt; &lt;/div&gt; &lt;div class="modal-body"&gt;...&lt;/div&gt; &lt;div class="modal-footer"&gt; &lt;button type="button" class="btn btn-primary"&gt;Apply&lt;/button&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; I've already looked up answers for the same question. Solutions for the same recommend loading jquery.js before bootstrap.js. Mine doesn't work inspite of taking care of the same. EDIT Am now using bootstrap-3.3.4 and jquery-2.1.3

http://stackoverflow.com/comment/46752086
score: 2
comment on: http://stackoverflow.com/a/29276848
type: AnswerComment
type: Comment
has text: Yeah, that's what's mentioned in docs and that's how I've been using them. However, the question is why the author states otherwise.

http://stackoverflow.com/a/29363086
has comment: http://stackoverflow.com/comment/46914391
type: Answer
score: 2
upvote count: 2
accepted answer of: http://stackoverflow.com/q/29363009
has comment: http://stackoverflow.com/comment/46918630
answers question: http://stackoverflow.com/q/29363009
has body: jQuery ajax has callbacks for done, error and always. Check out the docs These functions are activated when call is ended successfully, with error, or eitherway (respectively).
has comment: http://stackoverflow.com/comment/46910818
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46914928

http://stackoverflow.com/a/29234599
has body: Answered finally . using the following : $('#btn_store_next_page').click( function() { var self = this; $(function () { self.value = 'xxxx'; }); console.log(self.value); });
type: Answer
answers question: http://stackoverflow.com/q/29233543
score: 0

http://stackoverflow.com/comment/46742976
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29271026
has text: @John: Your problems are neither related to the use of the `this` keyword nor to variable scopes, that's why I have removed those tags from the question.

http://stackoverflow.com/q/29323367
favorite count: 0
linked to: http://stackoverflow.com/q/12980648
has body: Is it possible for me to get a JSON representation of the contents of a CKEditor instance? I know about getData() but I want to know if I can get a JSON representation. If not, what is the best way to parse the contents of getContents(), because I need it in a JSON format to interact with another system that I don't control. Update: Let's say I want to type Hello, how are you? getData() returns this: &lt;p&gt;Hello,&amp;nbsp;&lt;strong&gt;how&lt;/strong&gt;&amp;nbsp;are you?&lt;/p&gt; I want this (specific format of the JSON is not important): [{"text":"Hello, "},{"text":"how","bold":true},{"text":" are you?"}]
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46847028
duplicate of: http://stackoverflow.com/q/12980648
answer count: 0
upvote count: 2
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46848542
score: 2
has title: CKEditor JSON Output
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/46847758
type: Question
has comment: http://stackoverflow.com/comment/46837767
downvote count: 0
tagged with: javascript
tagged with: ckeditor
tagged with: jquery
has comment: http://stackoverflow.com/comment/46848497

aurelia
tags question: http://stackoverflow.com/q/29289308
tag name: aurelia
tags question: http://stackoverflow.com/q/29230138
tags question: http://stackoverflow.com/q/29267619
type: Tag

ecmascript-6
tags question: http://stackoverflow.com/q/29345559
tags question: http://stackoverflow.com/q/29223071
tags question: http://stackoverflow.com/q/29367236
tags question: http://stackoverflow.com/q/29301316
tags question: http://stackoverflow.com/q/29272134
tags question: http://stackoverflow.com/q/29333017
tags question: http://stackoverflow.com/q/29262581
tags question: http://stackoverflow.com/q/29218695
tag name: ecmascript-6
tags question: http://stackoverflow.com/q/29337966
tags question: http://stackoverflow.com/q/29251388
tags question: http://stackoverflow.com/q/29293083
tags question: http://stackoverflow.com/q/29248034
tags question: http://stackoverflow.com/q/29329662
tags question: http://stackoverflow.com/q/29358499
tags question: http://stackoverflow.com/q/29267619
tags question: http://stackoverflow.com/q/29283994
tags question: http://stackoverflow.com/q/29347240
tags question: http://stackoverflow.com/q/29242408
tags question: http://stackoverflow.com/q/29310530
tags question: http://stackoverflow.com/q/29283875
tags question: http://stackoverflow.com/q/29285045
tags question: http://stackoverflow.com/q/29353728
tags question: http://stackoverflow.com/q/29283935
type: Tag
tags question: http://stackoverflow.com/q/29369563
tags question: http://stackoverflow.com/q/29319492
tags question: http://stackoverflow.com/q/29317839
tags question: http://stackoverflow.com/q/29313604
tags question: http://stackoverflow.com/q/29321647
tags question: http://stackoverflow.com/q/29280189
tags question: http://stackoverflow.com/q/29308105
tags question: http://stackoverflow.com/q/29350022

http://stackoverflow.com/q/29313808
has answer: http://stackoverflow.com/a/29314769
has answer: http://stackoverflow.com/a/29313849
tagged with: css
has title: jQuery - Appending images after input field based on value
type: AnsweredQuestion
has body: Firstly here's the fiddle I'm trying to append an image after input field, the input field can be selected based on value. HTML Code: &lt;input type="checkbox" value="example"&gt; Example JS Code: $('input[value="example"]').append("&lt;img src='https://www.google.co.in/images/nav_logo195.png'"); Any help would be appreciated
type: Question
answer count: 2
accepted answer: http://stackoverflow.com/a/29313849
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/29314769

http://stackoverflow.com/comment/46789104
has text: In your resources folder. Remember to put entry for resources url mapping in your spring config
type: QuestionComment
type: Comment
score: 0
comment on: http://stackoverflow.com/q/29296210

http://stackoverflow.com/comment/46860268
type: Comment
score: 0
type: AnswerComment
has text: Ah so if they sign in through Facebook I could save all of their progress to their Facebook account without having a database of my own? I didn't know that. I've used the Facebook sign-in in the past with Rails but also had my own database. The only difference was I used Facebook instead of Devise for user creation. So, I could make it so all of the quiz information gets saved right to their Facebook account?
comment on: http://stackoverflow.com/a/29335890

http://stackoverflow.com/comment/46742394
type: Comment
type: QuestionComment
has text: ops sorry yeah, i mean `getElementById` yeah
comment on: http://stackoverflow.com/q/29270813
score: 0

http://stackoverflow.com/q/29244294
has comment: http://stackoverflow.com/comment/46694918
score: 0
accepted answer: http://stackoverflow.com/a/29244321
answer count: 1
has answer: http://stackoverflow.com/a/29244321
type: AnsweredQuestion
tagged with: dom
type: Question
tagged with: javascript
has body: I have a simple HTML setup as follows: outer Inner I am traversing it as follows: "use strict"; var divs = document.getElementsByTagName( "div" ); for( var i = 0, div; div = divs[i]; i++ ) { console.log( div.innerText ); } Output: outer Inner Inner Why is Inner output twice?
has title: JavaScript element traversal returning more than expected

angular-strap
tag name: angular-strap
type: Tag
tags question: http://stackoverflow.com/q/29288531

http://stackoverflow.com/comment/46754033
score: 0
type: Comment
comment on: http://stackoverflow.com/q/29277920
type: QuestionComment
has text: I think it's important to say what the actual color(s) are. With certain combinations, it will be impossible.

http://stackoverflow.com/a/72195843
answers question: http://stackoverflow.com/q/29255843
type: Answer
upvote count: 4
has body: You can use the formatToParts method available on the instance, this is generally better as you can ignore the currency and group separators this way function convertToFloat(number, locale = 'en', currency = 'AUD') { const instance = new Intl.NumberFormat(locale, { style: 'currency', currency, }); const roundedValue = instance.formatToParts(number) .filter(part =&gt; !['currency', 'group'].includes(part.type)) .reduce((acc, part) =&gt; `${acc}${part.value}`, '').replace(/,/g, '.'); // then just parse it as a float return [instance.format(number), '-&gt;', parseFloat(roundedValue)]; } console.log(convertToFloat(1234.56)); // -&gt; 1234.56 console.log(convertToFloat(1234.56, 'de-DE', 'EUR')); // -&gt; 1234.56
downvote count: 0
score: 4

http://stackoverflow.com/q/29276437
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29276592
possible better answer: http://stackoverflow.com/a/29276542
has body: I have an Ionic List with items including an attribute from the directive ion-delete-button (see docs). I fill the list using ng-repeat in the following matter: HTML {{albumname}} Change Name Controller // Initialized and Refreshed on Updates $scope.Albums = DashFactory.getAlbums(); $scope.deleteAlbum = function(index) { console.log(index) // SHOWS CORRECT INDEX var confirmPopup = $ionicPopup.confirm({ title: 'Delete Album: ' + $scope.Albums[index], template: 'Are you sure you want to delete this album?' }); confirmPopup.then(function(res) { if(res) { console.log('You are sure'); DashFactory.deleteAlbum(index); // SERVICE FOR DELETING THE ALBUM $ionicListDelegate.showDelete(false); } else { console.log('You are not sure'); } }); } Service (DashFactory) var Albums = ['foobut', 'barplug', 'fooin', 'barass'] var deleteAlbum = function(index) { Albums.splice(index); this.saveAlbums(); }; var getAlbums = function() { return Albums; };
tagged with: ionic-framework
has answer: http://stackoverflow.com/a/29276542
type: AnsweredQuestion
tagged with: angularjs
type: Question
has title: Deleting an item by $index or indexOf() results in deleting all items in ng-repeat
tagged with: angularjs-ng-repeat
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/29276592

http://stackoverflow.com/q/29262959
score: 1
has answer: http://stackoverflow.com/a/29309101
has body: In Jasmine, is there any way to return a certain value from a spy only if it was called with certain parameters? For example, can I have something like: describe('my test', function() { beforeEach(function() { this.mySpy = jasmine.createSpy(); // not sure how to do this, so this is pseudocode this.mySpy.and.returnValue(true).when.calledWith(false); this.mySpy.and.returnValue(false).when.calledWith(true); }); it('returns true if called with false', function() { expect(this.mySpy(false)).toEqual(true); }); it('returns false if called with true', function() { expect(this.mySpy(true)).toEqual(false); }); }); I looked through the docs, but couldn't quite find what I wanted, and couldn't find anything related by searching. I can see why there wouldn't be a case for this - you know what you are calling, and when, and why, and with what parameters, so why make anything more specific? At the same time, this could result in more code, when you could specify exactly what you want to return once, and not have to specify it again.
tagged with: unit-testing
type: Question
has comment: http://stackoverflow.com/comment/46812718
downvote count: 0
answer count: 1
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29309101
tagged with: spy
tagged with: jasmine
has comment: http://stackoverflow.com/comment/46809059
favorite count: 0
upvote count: 1
has title: Return Certain Value Only With Certain Parameters
type: AnsweredQuestion

http://stackoverflow.com/comment/46661432
has text: Regex is not the right tool to validate decimal ranges.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29227095

http://stackoverflow.com/comment/46743746
comment on: http://stackoverflow.com/q/29271633
score: 0
type: Comment
type: QuestionComment
has text: its working. what is the event that you are trying to execute this.

http://stackoverflow.com/q/29329947
has comment: http://stackoverflow.com/comment/46849386
answer count: 1
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/29330007
linked to: http://stackoverflow.com/q/1344030
score: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
has title: Filling a div with AJAX quadrates the column-count set in CSS3
type: Question
has answer: http://stackoverflow.com/a/29330007
has body: I want to make a div containing two columns with the text automatically flowing into the second column. To do this I'm using the CSS3 column properties. This works like it should when the page initially loads, but when I use jQuery to fill the div with new content the column count value quadrates. I tried to isolate the problem as far as possible, but the behavior remains the same: http://tijmen.kervers.nl/B1.2/column-count-issue.html And the CSS: http://tijmen.kervers.nl/B1.2/column-count-issue.css Next to squaring the column-count value it also scrambles the column order. I've numbered the lorem ipsum sentences to illustrate this, the order is 1324 rather than 1234. Why is it doing this? Should I use a different jQuery method to load the content or can I somehow force a redraw of the div? And just in case: here's the full page I'm using it for: http://tijmen.kervers.nl/B1.2/competencies_0.4.html

gmail
type: Tag
tag name: gmail
tags question: http://stackoverflow.com/q/29244768
tags question: http://stackoverflow.com/q/29311308

http://stackoverflow.com/comment/46915222
score: 0
comment on: http://stackoverflow.com/q/29366033
has text: on which element click event is not working ?
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/46736134
has text: Unable to reproduce, voting to close
type: Comment
comment on: http://stackoverflow.com/q/29267192
score: 0
type: QuestionComment

http://stackoverflow.com/a/29311473
answers question: http://stackoverflow.com/q/29306705
score: 0
has body: You could switch to json instead of ini and then use my json-update module.
type: Answer

http://stackoverflow.com/q/29256620
answer count: 2
has answer: http://stackoverflow.com/a/29257199
has comment: http://stackoverflow.com/comment/46715945
tagged with: jquery
type: UnansweredQuestion
tagged with: xmlhttprequest
has comment: http://stackoverflow.com/comment/46716920
has title: onReadyStateChange not firing in IE for XHR Request
has comment: http://stackoverflow.com/comment/46716071
tagged with: http
type: Question
has body: I have this code that I am using and it works fine in chrome, but in IE, it looks like that onreadystatechenge is not firing. How do I get this to work cross browser. I read that in IE you have to place the onreadystatechange event before the send, But that didn't work. The alert here is not firing. And yes it is successful. if (xhr.status==200 &amp;&amp; xhr.readyState==4) { alert("DONE!"); } This is the entire request. function SendFile(evt) { var xhr = new XMLHttpRequest(); var data = new FormData(); var files = $("#FileUpload1").get(0).files; for (var i = 0; i &lt; files.length; i++) { data.append(files[i].name, files[i]); } xhr.upload.addEventListener("progress", function (evt) { if (evt.lengthComputable) { var progress = Math.round(evt.loaded * 100 / evt.total); $("#progressbar").progressbar("value", progress); } }, false); xhr.open("POST", "Handler.ashx"); xhr.onreadystatechange=function () { if (xhr.status==200 &amp;&amp; xhr.readyState==4) { alert("DONE!"); } } xhr.send(data); $("#progressbar").progressbar({ max: 100, change: function (evt, ui) { $("#progresslabel").text($("#progressbar").progressbar("value") + "%"); }, complete: function (evt, ui) { $("#progresslabel").text("File upload successful!"); GetID(); } }); } Tried onload with no luck. xhr.onload = function () { if (xhr.readyState == 4 &amp;&amp; xhr.status==200) { alert("IE DONE!"); } }
has comment: http://stackoverflow.com/comment/46716825
tagged with: internet-explorer
has answer: http://stackoverflow.com/a/37648057
has comment: http://stackoverflow.com/comment/46716252
tagged with: javascript
score: 0

http://stackoverflow.com/a/38214280
answers question: http://stackoverflow.com/q/29223071
has comment: http://stackoverflow.com/comment/74025221
score: 2
has body: Being able to use require modules in the console is handy for debugging and code analysis. @psimyn's answer is very specific so you aren't likely to maintain that function with all the modules you might need. When I need one of my own modules for this purpose, I assign a window property to it so I can get at it e.g window.mymodule = whatever_im_exporting;. I use the same trick to expose a system module if I want to play with it e.g: myservice.js: let $ = require('jquery'); let myService = {}; // local functions service props etc... module.exports = myService; // todo: remove these window prop assignments when done playing in console window.$ = $; window.myService = myService; It is still a bit of a pain, but digging into the bundles, I can't see any way to conveniently map over modules.
has comment: http://stackoverflow.com/comment/65210361
has comment: http://stackoverflow.com/comment/65276798
has comment: http://stackoverflow.com/comment/65404014
has comment: http://stackoverflow.com/comment/74024839
type: Answer
has comment: http://stackoverflow.com/comment/74020796
upvote count: 3
has comment: http://stackoverflow.com/comment/74073082
downvote count: 1
has comment: http://stackoverflow.com/comment/73790654
has comment: http://stackoverflow.com/comment/73790215
has comment: http://stackoverflow.com/comment/65365627

http://stackoverflow.com/comment/46843127
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29312306
score: 0
has text: Thanks Jason. I actually did that and got it working... I used the map in the intern's loader and mapped the request to fakerequest for QuerySomething module.. Thank you..

http://stackoverflow.com/q/29287025
answer count: 1
tagged with: asp.net
type: UnansweredQuestion
has title: OnClientClick and OnClick relation not working on second hit
has body: good evening! I've been trying to use the OnClientClick and OnClick for a validation process. It means, I use the OnClientClick for a confirmation, and proceed with the OnClick if confirmed. The "no" is always ok, we are focusing on the "yes". It all goes well on the first hit, but on the second hit, the PostBack can be seen (it means the "click" was effective), but no action is triggered on code behind. Here is the code: &lt;script type="text/javascript" &gt; function testExample(button) { var confirmed = confirm("Are you sure?"); return confirmed; } &lt;/script&gt; &lt;asp:Button ID="btnButton" runat="server" OnClientClick="if(!testExample(this)) return false;" OnClick="btnClicked" Text="Button Test"/&gt; On code behind there is nothing done, just a check if it was triggered: protected void btnClicked(object sender, EventArgs e) { return; } Adding or removingUseSubmitBehavior="false" does nothing, as also setting ClientIDMode="Static" or AutoID. Changing to OnClientClick="return testExample(this);" also has no impact. If I do on other buttons individually it happens the same, they all run the first time, the second fails. I am trying to avoid the CssClass and pageLoad() relation. Can you help me figuring out what I am doing wrong or missing? EDIT: This seems to happen every time there is a postback event, even after removing OnClientClick. This Button is not inside any place holder.
type: Question
tagged with: javascript
tagged with: jquery
score: 0
has answer: http://stackoverflow.com/a/29287648

http://stackoverflow.com/comment/46690355
type: Comment
type: QuestionComment
has text: var index = (i+1); $("#response-img-" + index).attr('src', "img2.png"); try this.
score: 0
comment on: http://stackoverflow.com/q/29241723

http://stackoverflow.com/q/29371417
tagged with: jquery
tagged with: ajax
score: 0
has comment: http://stackoverflow.com/comment/46925775
answer count: 1
has title: Datatables Refresh Not Working
type: UnansweredQuestion
tagged with: ruby-on-rails
has answer: http://stackoverflow.com/a/29371900
has body: I've been troubleshooting this issue to the point of frustration, so I have made my way back to Stackoverflow. I am very much a beginner so bear with me, and I thank you for any help ahead of time. I am using Datatables with my rails application and I am trying to get the table to update after I add a row to the database. I followed the tutorial at rails-casts, found here: Rails-casts: JQuery and Ajax, to get to where I am currently. I have been successful in providing a link on the page that is replaced by a form on click. The form submits data to the database successfully, and the form is then replaced by the original link (just like in the rails-cast tutorial). The only problem I am running into is trying to get the table to refresh without the whole page refreshing. I currently don't get any errors. I have also tried the Datatables method of ajax.reload(), however, I ended up in a similar situation as I currently am. Please let me know if there is any additional information I can provide. View of table and link: <%= link_to 'Add New', new_quote_path, id: "new_link", remote: true %> <%= @quote.company_name %> Census Subscriber ID First name Last name Dob Sub status Gender Uses tobacco Tobacco cessation Emp status Coverage type Currently enrolled Current anthem Current plan Premium <% @employees.where(:company_name => @client.company_name).each do |employee| %> <a class="xediable-example" href="#" data-xeditable="true" data-pk="<%= employee.id %>" data-model="employee" data-type="text" data-name = "family_id" data-url="/employees/<%= employee.id %>" data-title="Enter title"> <%= employee.family_id %> <a href="#" data-xeditable="true" data-pk="<%= employee.id %>" data-model="employee" data-type="text" data-name = "first_name" data-url="/employees/<%= employee.id %>" data-title="Enter title"> <%= employee.first_name %> <a href="#" data-xeditable="true" data-pk="<%= employee.id %>" data-model="employee" data-type="text" data-name = "last_name" data-url="/employees/<%…
tagged with: datatable
has comment: http://stackoverflow.com/comment/46931194
has comment: http://stackoverflow.com/comment/46924378
type: Question
tagged with: javascript

http://stackoverflow.com/q/29308820
tagged with: javascript
tagged with: jquery
has title: Formatting a paragraph to conform to 80% of the browser size not 100%
has answer: http://stackoverflow.com/a/29309663
tagged with: http://stackoverflow.com/tag/html
tagged with: css
possible better answer: http://stackoverflow.com/a/29308927
favorite count: 0
has answer: http://stackoverflow.com/a/29308927
has comment: http://stackoverflow.com/comment/46813330
answer count: 5
has answer: http://stackoverflow.com/a/29309087
downvote count: 2
has answer: http://stackoverflow.com/a/29309124
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46818175
has comment: http://stackoverflow.com/comment/46816124
has answer: http://stackoverflow.com/a/29309306
type: Question
has comment: http://stackoverflow.com/comment/46811545
upvote count: 0
has body: I'm creating pages for a site, and I've been having to use &lt;br&gt; scripts to conform the text to make it readily readable on smaller devices as well as larger. Is there a way to constrain the text to a percentage of the page without altering the other content? (at 80% of the browser window) much like an image can be constrained to the size of the browser page. Would I need to create an actual text document and insert it as an image? I've tried using "textarea", "body", "hgroups", and "p" to no avail. I'm referring to using something like: &lt;img src="example.jpg" width="50%" alt=""/&gt; but with a text area, box, etc. and allowing it to expand vertically as an inverse proportion to the width. I'm not really picky so long as it doesn't need a scroll bar and can display the entire paragraph. I'm not looking to change the size of the text itself. In a sense that makes the width and height inverse properties so that all the text will be viewable. It should still conform to the browser window at a certain percentage of the window rather than the default 100%. I've also tried using borders, margins, and padding. I have the feeling I'm just missing a key component.
score: -2
accepted answer: http://stackoverflow.com/a/29309124

http://stackoverflow.com/comment/46732327
type: QuestionComment
has text: @RandomlyKnighted, I think the best thing for you here is to play with javascript in the console and figure out what the difference between all these concepts is. Terminology can be pedantic but it's also important to understand what an array is. Your problem stems more from a lack of understanding of how programming works and less from a simple mistake. In your updated description, `users.name` is an erroneous attempt to use common sense instead of correct javascript grammar. You should patiently go through the options binding documentation and make sure you are comfortable with it.
comment on: http://stackoverflow.com/q/29262578
score: 0
type: Comment

http://stackoverflow.com/q/29245901
has body: I cannot understand why is this code: $(window).on("mousewheel DOMMouseScroll", function() { alert("aa"); }); The alert triggers twice when you scroll on page... Anyone knows how to fix this? Here is a codepen, just scroll on the page : http://codepen.io/anon/pen/wBNPvR Thank you!
score: 0
has comment: http://stackoverflow.com/comment/46697380
has comment: http://stackoverflow.com/comment/46697521
answer count: 0
type: UnansweredQuestion
tagged with: scroll
has comment: http://stackoverflow.com/comment/46699213
has title: Windows on scroll firing twice
has comment: http://stackoverflow.com/comment/46697483
has comment: http://stackoverflow.com/comment/46697473
type: Question
has comment: http://stackoverflow.com/comment/46697548
has comment: http://stackoverflow.com/comment/46697395
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46697496

http://stackoverflow.com/comment/47694944
score: 0
type: AnswerComment
has text: @Touffy So following kar288's suggestion, I would use a pos tagger like this code.google.com/p/jspos and get a tagged version of my sentences. Then I apply word-based comparison to this instead of sentence-based comparison on the result that jspos returns?
type: Comment
comment on: http://stackoverflow.com/a/29324966

http://stackoverflow.com/a/49593824
upvote count: 3
has body: As others have previously mentioned, Navigator has been deprecated since v0.44, but can still be imported to support older applications: Navigator has been removed from the core React Native package in version 0.44. The module has been moved to a react-native-custom-components package that can be imported by your application in order to maintain backwards compatibility. To see the original docs for Navigator, please switch to an older version of the docs. As per the docs (React Native v0.54) Navigating Between Screens. It is now recommended to use React Navigation if you are just getting started, or NavigatorIOS for non-Android applications If you are just getting started with navigation, you will probably want to use React Navigation. React Navigation provides an easy to use navigation solution, with the ability to present common stack navigation and tabbed navigation patterns on both iOS and Android. ... If you're only targeting iOS, you may want to also check out NavigatorIOS as a way of providing a native look and feel with minimal configuration, as it provides a wrapper around the native UINavigationController class. NB: At the time of providing this answer, React Native was at version 0.54
type: Answer
downvote count: 0
answers question: http://stackoverflow.com/q/29335523
score: 3

http://stackoverflow.com/comment/46738123
comment on: http://stackoverflow.com/q/29268279
type: Comment
type: QuestionComment
score: 1
has text: I'm pretty sure you're just looking for "local storage". They describe it here -http://learn.ionicframework.com/formulas/localstorage/, but you can also use a module like angular-local-storage https://github.com/grevory/angular-local-storage.

http://stackoverflow.com/comment/46726352
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29260444
has text: Also... not related to your question (and maybe you just have it that way for testing), but you need to escape your database inputs in your PHP script... browsers can (either accidentally or maliciously) send whatever data they want, so they can read (and/or destroy) your database if you don't escape them! :)
type: AnswerComment

http://stackoverflow.com/comment/46742382
type: Comment
has text: try something like `var ta=(document.createElement("div")).setAttribute("id","ta");`
comment on: http://stackoverflow.com/q/29270813
score: 0
type: QuestionComment

http://stackoverflow.com/a/29307803
answers question: http://stackoverflow.com/q/29301542
has body: I do not think Google Maps API would handle the fallback for you but, You can handle it yourself using the Modernizr.svg function in the Modernizr plugin to check if the current browser support svg. I have a sample in jsfiddle. and here is the direct link. https://css-tricks.com/using-svg/#cp_embed_lCEux
has comment: http://stackoverflow.com/comment/46833679
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/46826425

http://stackoverflow.com/comment/46874162
has text: Try `onClick={this.props.changeCurrentItemA.bind(this, item)}`
comment on: http://stackoverflow.com/q/29343412
type: QuestionComment
type: Comment
score: 2

http://stackoverflow.com/comment/46880567
score: 4
type: Comment
type: QuestionComment
has text: Do you have to use regular expressions? Why not just split on "."?
comment on: http://stackoverflow.com/q/29347322

http://stackoverflow.com/q/29316453
downvote count: 0
score: 1
favorite count: 0
tagged with: angularjs
type: Question
has answer: http://stackoverflow.com/a/29316477
has title: How can I make a function that calls another function every 60 seconds?
upvote count: 1
has answer: http://stackoverflow.com/a/29316786
accepted answer: http://stackoverflow.com/a/29316477
tagged with: javascript
answer count: 5
has body: I have this function: isAuthenticated = (): boolean =&gt; { xxx }; I am using AngularJS and I would like to know how can I make a function such as keepCheckingAuthentication() That will call the is Authenticated() function every 60 seconds?
has answer: http://stackoverflow.com/a/29317476
possible better answer: http://stackoverflow.com/a/29316483
has answer: http://stackoverflow.com/a/29316654
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29316483

http://stackoverflow.com/comment/46776333
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29289528
has text: M'sieur's answer will fix your issue, however, the problem lies in that you're catching all clicks inside the document which includes your `.remove()` call.

http://stackoverflow.com/comment/46831617
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29318750
has text: Thanks a lot ! now it works. But there is another issue, maybe you can help with it too. If I input city name that is one and only in the world, it works ok. But if not, it returns an array with all the cities with the same name, and I would like to give some choice if it happens. How can I do that ? Should I add something like a conditional statement before running that function ?
type: AnswerComment

http://stackoverflow.com/comment/46878879
type: AnswerComment
comment on: http://stackoverflow.com/a/29341911
score: 0
type: Comment
has text: Did you try $location.url()?

http://stackoverflow.com/comment/46955205
type: Comment
comment on: http://stackoverflow.com/a/29386561
score: 0
type: AnswerComment
has text: You're edited answer doesn't work either. Here you're assuming that the div tags that I want to edit are within the collapsegroup node. This is not the case. I need all divs between the two divs with either collapsegroup and collapsegroupclose. In the HTML example, that means that I want both divs with class 'row' to be hidden, just because one of these two divs has a span within with class 'label-passive'

http://stackoverflow.com/a/29327440
has comment: http://stackoverflow.com/comment/46850552
type: Answer
accepted answer of: http://stackoverflow.com/q/29327325
downvote count: 0
has body: If I speak general, there can be cases when jQuery use is need in Angularjs app i.e. jQuery plugin is used that isn't available in Angular version. Every Controller has $scope/this and You can access the scope of an angular element if you have an ID tag attached to the same DOM element as the ng-controller: the DOM: your controller: function MyCtrl($scope) { $scope.anyFunc = function(var1, var2) { // var1, var2 passed from jquery call will be available here //do some stuff here } } in jQuery you do this and it will access that controller and call that function : angular.element('#myctrl').scope().anyFunc('value1','value2'); Running Sample angular.module('app', []) .controller('MyCtrl', function ($scope) { $scope.anyFunc = function (var1, var2) { alert("I am var1 = " + var1); alert("I am var2 = " + var2); }; }); $(function(){ $("#hit").on("click",function(){ angular.element($("#myctrl")).scope().anyFunc('VAR1 VALUE', 'VAR2 VALUE'); }); }); Call via jQuery Call Happy Helping!
answers question: http://stackoverflow.com/q/29327325
upvote count: 18
type: AcceptedAnswer
score: 18
has comment: http://stackoverflow.com/comment/46849302

google-chrome-extension
tags question: http://stackoverflow.com/q/29355539
tags question: http://stackoverflow.com/q/29365740
tags question: http://stackoverflow.com/q/29331175
tags question: http://stackoverflow.com/q/29240558
tags question: http://stackoverflow.com/q/29292082
tag name: google-chrome-extension
tags question: http://stackoverflow.com/q/29358302
tags question: http://stackoverflow.com/q/29346849
tags question: http://stackoverflow.com/q/29342446
tags question: http://stackoverflow.com/q/29285286
tags question: http://stackoverflow.com/q/29275409
tags question: http://stackoverflow.com/q/29346370
tags question: http://stackoverflow.com/q/29293248
tags question: http://stackoverflow.com/q/29218415
type: Tag
tags question: http://stackoverflow.com/q/29336108
tags question: http://stackoverflow.com/q/29328910
tags question: http://stackoverflow.com/q/29220254
tags question: http://stackoverflow.com/q/29280742
tags question: http://stackoverflow.com/q/29248106
tags question: http://stackoverflow.com/q/29334805
tags question: http://stackoverflow.com/q/29333350
tags question: http://stackoverflow.com/q/29280828
tags question: http://stackoverflow.com/q/29331302
tags question: http://stackoverflow.com/q/29320848
tags question: http://stackoverflow.com/q/29321780
tags question: http://stackoverflow.com/q/29335806
tags question: http://stackoverflow.com/q/29267773
tags question: http://stackoverflow.com/q/29310134
tags question: http://stackoverflow.com/q/29331167
tags question: http://stackoverflow.com/q/29312143
tags question: http://stackoverflow.com/q/29225317
tags question: http://stackoverflow.com/q/29305668
tags question: http://stackoverflow.com/q/29358778
tags question: http://stackoverflow.com/q/29243659

http://stackoverflow.com/comment/46651736
score: 0
type: Comment
has text: Haha, yep I fixed the typo. Thanks again for all the suggestions, I'll get it working eventually.
type: AnswerComment
comment on: http://stackoverflow.com/a/29221261

http://stackoverflow.com/a/29357806
has body: The replaceWith wasn't working, instead, I used html. $("#product-list").replaceWith(newProducts); to $("#product-list").html(newProducts);
answers question: http://stackoverflow.com/q/29357507
score: 0
type: Answer

http://stackoverflow.com/comment/46889063
score: 3
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29351871
has text: `mysql_query` is a deprecated function. If you are still learning, this is an excellent time to learn about it's replacement.

http://stackoverflow.com/comment/46661632
has text: @jcubic yes... I think I am not clear in explanation.
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/29227150
type: Comment

http://stackoverflow.com/q/29283889
answer count: 1
downvote count: 0
tagged with: jquery
has title: Jquery - Store text in a variable
has body: Im sure this is simple question but not able to find clear information regarding how to store text in a variable? What I was hoping to do is use Jquery to replace text from a TD and covert it into a link. For example in my table td I would get a reference number such as 20150326105 and I would like jquery to replace that text so that it converts it to the following: http://ticketingsystem.com/UpdateNotification.asp?OEN=20150326105&amp;CL=ALL&amp;SU=ALL I want to add the reference number right after the OEN=. Is this something it is possible?
favorite count: 0
accepted answer: http://stackoverflow.com/a/29284022
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
score: 1
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/29284022
has comment: http://stackoverflow.com/comment/46765685
tagged with: javascript
has comment: http://stackoverflow.com/comment/46765616

http://stackoverflow.com/q/29241134
has answer: http://stackoverflow.com/a/29241238
tagged with: http://stackoverflow.com/tag/html
tagged with: css
tagged with: twitter-bootstrap
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46688342
type: Question
has answer: http://stackoverflow.com/a/29241319
has comment: http://stackoverflow.com/comment/46688600
has comment: http://stackoverflow.com/comment/46688550
has body: I'm trying to make a modal dialog prompt using bootstrap but when I click on my specific button I need to add the modal to but it doesn't work. Below is my code for the modal section and below that is my button code: Register/Login This is my button code: Register/Login
has title: Trying to make a modal dialog prompt using bootstrap
answer count: 2
tagged with: javascript
score: 0

http://stackoverflow.com/q/29256409
accepted answer: http://stackoverflow.com/a/29257342
has comment: http://stackoverflow.com/comment/46717002
tagged with: google-maps
score: 2
downvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
tagged with: angularjs
type: AnsweredQuestion
upvote count: 2
has title: angular google maps double windows
has answer: http://stackoverflow.com/a/29257342
type: Question
has body: I have an issue from angular google maps windows. I don't know why the windows label come double on the maps. I made in plnkr. I wan't to show all windows label, but it come it in double windows label. This is my HTML: {{title}}

http://stackoverflow.com/q/29316534
tagged with: ajax
answer count: 2
has title: jQuery .ajax() access to beforeSend local variable in javascript loop
downvote count: 0
favorite count: 0
has body: I have a jQuery ajax Get call inside a for javascript cycle. Here the code: var number_of_ping_for_average = 4; var ping_start_time; for(i = 0; i++; i &lt; number_of_ping_for_average){ $.ajax({ type: 'GET', url: "http://www.exmple.com/pkt.ext", timeout: 1000, cache: false, beforeSend: function(){ ping_start_time[i][new Date().getTime()]; }, success: function (data) { var ping_arrive_time = new Date().getTime(); var ping_val = ping_arrive_time - ping_start_time[i]; }, error: function(data){ //timeout or 500 error //@TODO fare funzionare tutto } }); } As you see... i need to call variable "i" inside anonymous function... but don't work Remember that ping_start_time must contain 3 different simultaneous value!
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/750486
has answer: http://stackoverflow.com/a/29316910
score: 3
upvote count: 3
has comment: http://stackoverflow.com/comment/46825430
type: Question
has comment: http://stackoverflow.com/comment/46825220
has comment: http://stackoverflow.com/comment/46825241
has answer: http://stackoverflow.com/a/29323806
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/46859466
type: QuestionComment
comment on: http://stackoverflow.com/q/29335369
score: 0
has text: @squint I tried to use document.getElementbyid but the problem is I have to generate the input columns based on number of items in the array.
type: Comment

http://stackoverflow.com/comment/46841253
type: QuestionComment
comment on: http://stackoverflow.com/q/29324701
has text: Not a duplicate of that question, but different problem
score: 0
type: Comment

http://stackoverflow.com/comment/74020796
has text: @AluanHaddad, I admit, indeed. :) Have you realized that you can create different webpack config for development and for release? Release should be completely without such "devDependencies".
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/38214280

http://stackoverflow.com/q/29282014
downvote count: 0
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29282133
score: 2
type: AnsweredQuestion
upvote count: 2
has comment: http://stackoverflow.com/comment/46761900
has title: Return the text as I type in HTML form
type: Question
possible better answer: http://stackoverflow.com/a/29282270
accepted answer: http://stackoverflow.com/a/29282133
has answer: http://stackoverflow.com/a/29282270
tagged with: javascript
has body: How can I get the data of a text field as I type something in that text field without using any JavaScript library? Something like that is achieved in AngularJS like this: Name: Hello {{yourName}}!
answer count: 2

http://stackoverflow.com/comment/46765329
comment on: http://stackoverflow.com/q/29280548
type: Comment
type: QuestionComment
has text: @slebetman: And I missed the `error` handler :D
score: 0

http://stackoverflow.com/a/29267486
type: Answer
answers question: http://stackoverflow.com/q/29266551
has body: sNot entirely sure of your question but if you could have your two tables side by side. You can use float-left and float-right classes to control their position using ng-class with some condition
score: 0

barcode-scanner
tags question: http://stackoverflow.com/q/29271959
type: Tag
tag name: barcode-scanner

http://stackoverflow.com/a/29280227
has body: Something like this: using jquery load and your code: $(currentSection).find('.next').attr('href') is incorect used in your context :( My First HTML Welcome Home of {{projectName}} I'm the landing and first page Click here to go to second step You need this page accessible: http://www.localhost/aborto.hbs and returning this I'm the second page Sei in cinta e devi abortire? Cerca qui le info necessarie!
answers question: http://stackoverflow.com/q/29279171
has comment: http://stackoverflow.com/comment/46759607
score: 0
type: Answer

http://stackoverflow.com/comment/46748614
comment on: http://stackoverflow.com/q/29274689
type: Comment
type: QuestionComment
has text: •◘•◘ ☻ _WTF_ ☻░░▒▒▓▓███████████. Well you have to submit ███ something ███. At least data to send to database but you can reduce amount of what you're •◘•◘•◘•◘ receiving •◘•◘•◘•◘ using AJAX (at least you don't need to reload full page...
score: 2

http://stackoverflow.com/comment/46695122
score: 0
type: Comment
comment on: http://stackoverflow.com/q/29241522
type: QuestionComment
has text: What is the content of your 500 error? Can you put it here with the stacktrace? Which version of Django?

permissions
tag name: permissions
type: Tag
tags question: http://stackoverflow.com/q/29264105
tags question: http://stackoverflow.com/q/29269677
tags question: http://stackoverflow.com/q/29356308

http://stackoverflow.com/q/29238039
score: 0
accepted answer: http://stackoverflow.com/a/29251476
answer count: 3
upvote count: 1
downvote count: 1
tagged with: angularjs-ng-repeat
has comment: http://stackoverflow.com/comment/46682684
has comment: http://stackoverflow.com/comment/46682389
possible better answer: http://stackoverflow.com/a/29238603
has comment: http://stackoverflow.com/comment/46685485
favorite count: 0
has comment: http://stackoverflow.com/comment/46683282
tagged with: angularjs
has answer: http://stackoverflow.com/a/29251476
has comment: http://stackoverflow.com/comment/46682889
has comment: http://stackoverflow.com/comment/46683343
has comment: http://stackoverflow.com/comment/46684630
has comment: http://stackoverflow.com/comment/46686680
has body: I have a couple of drop downs and based on selection I updated the textarea content, but when I am trying to update the text the function, I presume gets triggered, and does not let me update. Here is my html : &lt;textarea ng-model="desc" ng-change="des"&gt;&lt;/textarea&gt; and angular somehow the code got deleted.. please visit plunker: http://plnkr.co/edit/pVSiNrnAOY0A5v0iTmYQ?p=preview
has comment: http://stackoverflow.com/comment/46684900
has comment: http://stackoverflow.com/comment/46684532
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46706824
has answer: http://stackoverflow.com/a/29322426
has answer: http://stackoverflow.com/a/29238603
type: Question
tagged with: angularjs-directive
has comment: http://stackoverflow.com/comment/46682979
has comment: http://stackoverflow.com/comment/46682495
has title: angularjs textarea - how to keep it in sync with angularjs dropdowns selected values
tagged with: javascript
has comment: http://stackoverflow.com/comment/46683807
tagged with: angularjs-scope
has comment: http://stackoverflow.com/comment/46683768
has comment: http://stackoverflow.com/comment/46682311

http://stackoverflow.com/q/29220268
type: UnansweredQuestion
tagged with: oracle-database
has body: I have a 3-tier architecture. The db is oracle, the business/logic layer is php, while the front end is html/JavaScript. My business/logic layer have a bunch of unit tests that only pass if the requirements are met. The problem occurs when I wire the business layer and front end via javascript. After a lot debugging, I found the sources of the problem: JavaScript code causing error. function getAllUsers() { var allUsers = []; $.ajax ({ url: '../php/get-all-users.php', success:function(data){ allUsersJSON = JSON.parse(data); console.log(allUsersJSON); for (var i = 0; i &lt; allUsersJSON.length; i++){ allUsers[i] = allUsersJSON[i].USER_NAME; } console.log(allUsers); } }); return allUsers; } ../php/get-all-users.php &lt;?php include_once 'Database.php' $db = Database::instance(); // Singleton to initialize db. echo json_encode($db-&gt;getAllUsers()); ?&gt; Database.php fragment. public function createConnection($username, $password, $connectionString){ $this-&gt;_connection = oci_connect($username, $password, $connectionString); if (!$this-&gt;_connection) { $e = oci_error(); trigger_error(htmlentities($e['message'], ENT_QUOTES), E_USER_ERROR); throw new Exception("Database connection failed. Please check constructor arguments."); }else{ //print "Database connection established.\n"; } } In one of my tests, I tried echo json_encode($db->getAllUsers()); and get a result, "[\"USER_NAME\":\"userName\"]". In get-all-users.php, if I comment out everything, and echo the string I get from the tests, the web page now loads fine, but of course this is not what I desired. Furthermore, if I uncomment include_once 'Database.php' in get-all-users.php and comment out oci_connect in my Database.php, the web page loads fine. This made me conclude that the root of the problem is oci_connect. Did anyone else have a similar experience? I tried googling but found no result. If you need more information to make light of this problem, I'd gladly spew them out. Edit: I'm working in linux. My …
tagged with: php
has title: PHP and JQuery weird behaviour
has comment: http://stackoverflow.com/comment/46650419
has comment: http://stackoverflow.com/comment/46653769
type: Question
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46650130
has comment: http://stackoverflow.com/comment/46649868
answer count: 0
has comment: http://stackoverflow.com/comment/46650169

http://stackoverflow.com/comment/46842508
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29325839
has text: It seems I would have to reengineer my design. Will try and update !
score: 0

http://stackoverflow.com/comment/108972789
type: AnswerComment
comment on: http://stackoverflow.com/a/59419527
score: 0
type: Comment
has text: "remoteTextTracks is not a function"

http://stackoverflow.com/a/29280600
answers question: http://stackoverflow.com/q/29266551
type: Answer
score: 0
type: AcceptedAnswer
has body: I have figured out this question on my own and the solution seems really simple and works great! I used jQuery functions before and after to get the desired effect.
accepted answer of: http://stackoverflow.com/q/29266551

http://stackoverflow.com/q/29254983
type: Question
score: 3
has comment: http://stackoverflow.com/comment/46713031
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
linked to: http://stackoverflow.com/q/10096300
favorite count: 0
type: UnansweredQuestion
has body: i am using http://davidwalsh.name/lazyload-plugin when i run it giving a error in console as "Uncaught ReferenceError: Class is not defined". i added code as below &lt;script src="lazyload/Source/LazyLoad.js"&gt;&lt;/script&gt; then downside &lt;script&gt; /* do it! */ window.addEvent("domready",function() { var lazyloader = new LazyLoad(); }); &lt;/script&gt; and in body for images i am using as below. &lt;img alt=\"\" src=\"lazyload/Assets/blank.gif\" data-src=\"{$v['image_path']}\" style=width:auto;height:200px;max-height:200px&gt; where $v['image_path'] is dynamic. What is the problem causing that error please help me.
has answer: http://stackoverflow.com/a/29255316
tagged with: lazy-loading
upvote count: 3
has title: lazy load plugin throwing Uncaught ReferenceError
tagged with: referenceerror

http://stackoverflow.com/comment/46786185
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29294328
has text: Thanks for response @Rahul Borole.

http://stackoverflow.com/comment/46816141
comment on: http://stackoverflow.com/q/29309568
score: 1
has text: Your code has serious syntax errors - JS doesn't have a `foreach` construct and you certainly can't `then` it - what are you calling `then` on?
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29261432
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29261470
tagged with: http://stackoverflow.com/tag/json
has title: Issue parsing JSON object with .map
type: Question
tagged with: javascript
score: 0
answer count: 2
possible better answer: http://stackoverflow.com/a/29261505
has answer: http://stackoverflow.com/a/29261470
has answer: http://stackoverflow.com/a/29261505
tagged with: jquery
has body: I have this JSON object returned and I'm trying to parse it to get the value in identifier. Here's what the object looks like if I console.log it: Object {rows: Array[33], time: 0.015, fields: Object, total_rows: 33} fields: Object rows: Array[33] 0: Object cartodb_id: 28 coordinates: "41.959836,-87.681545" created_at: "2015-03-05T14:40:43Z" id: "28" identifier: "Store Number: 28" 1: Object 2: Object Here's how I'm trying to parse it: $.getJSON('https://URLHERE, function(data) { console.log(data); var ticks6 = data.rows.map(function() { return data.rows.identifier; }); ticks6 returns an array with all values as "undefined". I've tried a bunch of different combinations here and can't get it to parse out the right piece.
has comment: http://stackoverflow.com/comment/46725025

http://stackoverflow.com/comment/46854083
score: 0
type: QuestionComment
type: Comment
has text: Please, if anyone could help, it'll be spectacular.
comment on: http://stackoverflow.com/q/29326727

http://stackoverflow.com/comment/46844097
type: Comment
score: 0
comment on: http://stackoverflow.com/q/29323544
has text: I have the same problem. An issue (https://github.com/facebook/react-native/issues/414) was created and closed. I assume the more info would come to the official doc.
type: QuestionComment

http://stackoverflow.com/comment/46866300
type: Comment
has text: Pointing out that `for (; condition ;)` is essentially just a `while (condition)` is probably the most important part. Since `i` is being both initialized and updated, the code should have been `for (var i = 0; condition; i++)`
comment on: http://stackoverflow.com/a/29339352
score: 0
type: AnswerComment

http://stackoverflow.com/a/35812358
answers question: http://stackoverflow.com/q/29313244
score: 6
has comment: http://stackoverflow.com/comment/91027365
downvote count: 0
has comment: http://stackoverflow.com/comment/62039457
has comment: http://stackoverflow.com/comment/59527326
has body: Try this: import React, { DeviceEventEmitter, Dimensions } from 'react-native'; ... getInitialState: function() { return { visibleHeight: Dimensions.get('window').height } }, ... componentDidMount: function() { let self = this; DeviceEventEmitter.addListener('keyboardWillShow', function(e: Event) { self.keyboardWillShow(e); }); DeviceEventEmitter.addListener('keyboardWillHide', function(e: Event) { self.keyboardWillHide(e); }); } ... keyboardWillShow (e) { let newSize = Dimensions.get('window').height - e.endCoordinates.height; this.setState({visibleHeight: newSize}); }, keyboardWillHide (e) { this.setState({visibleHeight: Dimensions.get('window').height}); }, ... render: function() { return ( your view code here... ); } ... It worked for me. The view basically shrinks when the keyboard is displayed, and grows back again when its hidden.
type: Answer
upvote count: 6

http://stackoverflow.com/a/38264689
answers question: http://stackoverflow.com/q/29312669
has body: Use to redirect to the link window.location = 'skype:' + phone + '?call';
score: 0
type: Answer

http://stackoverflow.com/comment/47883167
type: Comment
type: QuestionComment
has text: Given that you only have one series the only valid index is `0`. If you're asking to have a single series that is rendered as both a line and as a bar I don't think that can be done. You'd have to create a second series with the same data and set one to `bars` and one to `line`.
comment on: http://stackoverflow.com/q/29369073
score: 0

http://stackoverflow.com/comment/46920994
score: 1
comment on: http://stackoverflow.com/a/29369692
type: AnswerComment
has text: Quick note: `arr.length` isn't needed in the `slice` function. If the second parameter is missing, it defaults to the length of the array.
type: Comment

http://stackoverflow.com/q/29330710
tagged with: java
has comment: http://stackoverflow.com/comment/46851083
has comment: http://stackoverflow.com/comment/46850769
type: Question
linked to: http://stackoverflow.com/q/4112686
answer count: 1
downvote count: 0
tagged with: jsp
tagged with: javascript
has comment: http://stackoverflow.com/comment/46851007
has answer: http://stackoverflow.com/a/29330791
has title: Use a variable in javascript function inside Java code
has comment: http://stackoverflow.com/comment/46850879
has comment: http://stackoverflow.com/comment/46850840
favorite count: 0
type: UnansweredQuestion
score: 3
has body: I have a javascript function as below. &lt;script type="text/javascript"&gt; window.addEventListener ("message", OnMessage, false); function OnMessage (event) { var test = event.data; &lt;% ReadCookiesServlet readCookiesServlet=new ReadCookiesServlet(); readCookiesServlet.doGet(&lt;%=test%&gt;,response); %&gt; } &lt;/script&gt; What I actually needs is to pass the value of event.data to the method doGet.How can I pass this value? Thanks.
upvote count: 3

http://stackoverflow.com/comment/46829863
score: 0
type: QuestionComment
type: Comment
has text: I just mean that you could read the data and create any number of nested table combinations from it. IF you could show us the raw html table that you expect to end up with, that would really help us understand waht you need to do
comment on: http://stackoverflow.com/q/29318953

http://stackoverflow.com/comment/46803122
type: Comment
has text: Load? Load what? You didn't ask to load anything. You asked how to display an array as a list, that's what this code does.
score: 0
comment on: http://stackoverflow.com/a/29304221
type: AnswerComment

http://stackoverflow.com/q/29261136
has title: Get element by id doesn't work
type: UnansweredQuestion
answer count: 4
tagged with: alert
has answer: http://stackoverflow.com/a/29261890
type: Question
has answer: http://stackoverflow.com/a/29261321
tagged with: if-statement
linked to: http://stackoverflow.com/q/1085801
tagged with: javascript
has answer: http://stackoverflow.com/a/29261261
has answer: http://stackoverflow.com/a/29261290
has comment: http://stackoverflow.com/comment/46724420
has comment: http://stackoverflow.com/comment/46724704
score: 0
has body: So when my value is gsm i just need an alert with ("nice it works") but it doesn't want to work! Can you guys help me out? Without changing to much of my code? Unless it's really wrong ofcourse. This is my Html: gsm telefoon This is my js: var gsm = document.getElementById("gsm"); function Checkfunction() { var x = document.getElementById("telefoonkeuze").value; if (x == gsm) { alert("nice it works!"); } }
tagged with: getelementbyid

http://stackoverflow.com/comment/46823477
has text: I've made a [plugin](https://github.com/blauharley/Cordova-Reminder) so far only for android that keeps track of the user's location/movements while they are in a app and after the app has been closed but at the moment I'afraid you have to modify my GNU-app in order that it shows notifications based by certain locations. But may be such feature will be added soon ;)
comment on: http://stackoverflow.com/q/29314720
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46850216
type: Comment
type: QuestionComment
has text: Are you using d3/TopoJson to generate the paths? Or are you working with the raw SVG? If straight SVG have you seen [this](http://stackoverflow.com/a/1692771/16363). If d3, have you tried [this](https://github.com/mbostock/d3/wiki/Geo-Paths#path_centroid)?
comment on: http://stackoverflow.com/q/29316652
score: 0

http://stackoverflow.com/a/29253455
accepted answer of: http://stackoverflow.com/q/29253169
answers question: http://stackoverflow.com/q/29253169
type: AcceptedAnswer
score: 0
type: Answer
has body: Just add it like you added onblur, as: $form-&gt;textField($model, 'amount', array( 'name'=&gt;'amount', 'onblur'=&gt;'return checkallfield();', 'onkeypress'=&gt;'return doKeyPress();', 'id'=&gt;'amnt' ) );

http://stackoverflow.com/comment/46759985
comment on: http://stackoverflow.com/q/29280999
type: Comment
type: QuestionComment
score: 0
has text: Don't `<path>` elements belong inside ` ` elements?

http://stackoverflow.com/q/29220101
has comment: http://stackoverflow.com/comment/46649317
has title: Ajax post not completely working in IE8
score: 0
has comment: http://stackoverflow.com/comment/46649368
has comment: http://stackoverflow.com/comment/46649391
accepted answer: http://stackoverflow.com/a/29224141
tagged with: regex
has answer: http://stackoverflow.com/a/29224141
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46649569
tagged with: internet-explorer-8
has comment: http://stackoverflow.com/comment/46649763
type: Question
has body: I have a simple post that works with every other browser but IE version 8. $.post( "/pages/event_layout", { id: id }, function(html){ $('#the_content').html(html); }, 'html' ); I realized that the issue is this: When it posts and retrieves data, there is a space at the beginning of the content resulting in basically nothing appearing, or the good old Text-Empty Text Node issue with IE8 because Microsoft is awesome. so on the post I have tried this to get rid of the initial space. $.post( "/pages/event_layout", { id: id }, function(html){ $('#the_content').html($.trim(html)); }, 'html' ); but no avail. Is there REGEX or something I can use to eliminate this space and is also compliant with IE8.
answer count: 1
tagged with: javascript
tagged with: ajax

http://stackoverflow.com/q/29351339
has comment: http://stackoverflow.com/comment/46889472
type: Question
score: 5
upvote count: 5
tagged with: javascript
has comment: http://stackoverflow.com/comment/46889497
has title: Get Current URL in ember JS
has answer: http://stackoverflow.com/a/29356808
has body: I'm trying to get the current url in emberJS but I cannot. I am doing this: App.Route = Ember.Route.extend(Em.I18n.TranslateableProperties, { actions: { didTransition: function (transition) { this._super(); console.log(window.location.href); console.log(this.get('router.url')); } } }); I used to use didTransition because I need to know the current URL when all elements are load. For example: If I am in home(/home) page and navigate to contact page(/contact-page), I want to know the url '/contact-page'. If I use window.location.href works, but not always. I thought that didTransition was called when everything else is finished, but not. Why? Thanks in advance
downvote count: 0
answer count: 1
favorite count: 0
type: UnansweredQuestion
tagged with: ember.js
has comment: http://stackoverflow.com/comment/46908582

http://stackoverflow.com/comment/46933162
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29373336
has text: Ideally whatever the method is I'd be able to pass it a sync function that might throw errors or a promise that might throw errors and the interface for testing would be the same, because ideally it's wrapped in a promise already and it's going to be caught.

http://stackoverflow.com/comment/46648600
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29219035
has text: Yes, I do get output. `Please input username: asdf` and `You entered: asd` for 2.0.1. Then it doesn't exit, because there is no `phantom.exit()` in the code.

http://stackoverflow.com/comment/46814493
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29310184
has text: Just add the image into the SVG as an `<image>` element - http://tutorials.jenkov.com/svg/image-element.html
score: 0

http://stackoverflow.com/a/29378870
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/29370475
answers question: http://stackoverflow.com/q/29370475
has body: Remove the parantheses: storedVars['x'].match(/\\d{2} \\D* \\d{4}/); Because those are indicating regex groups, which are being returned with your results. Or you could just return first element of results: storedVars['x'].match(/(\\d{2}) (\\D*) (\\d{4})/)[0];
score: 0

http://stackoverflow.com/comment/46830527
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29319391
has text: Okay this works but the page displays, so i need to use server side. Back to PHP it is!
score: 0

http://stackoverflow.com/a/29265497
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46733041
has body: You can store it everytime on the local storage(or event session storage, which I think its better in your case). Then everytime you look after that value on the storage. In case of any value found, you send it to the controller. If it was me I would do as I said above, save your data into the sessionStorage(what means that the data will be lost if user closes the tab/browser): var saveData = function() { var data = { id: $("#id_field").val(), name: $("#name_field").val(), pw: $("#pw_field").val() }; sessionStorage.setItem("formValues", JSON.stringify(data)); } Idk if your post is async or not. If its async, you can call that function on your successCallback, if it isn't async, call it on the submit event. Then at ready event, you can read that data: $(document).ready(function() { var data = sessionStorage.getItem("formValues"); // Check if there is any user data already saved if (data) { data = JSON.parse(sessionStorage.getItem("formValues")); $("#id_field").val(data.id); $("#name_field").val(data.name); $("#pw_field").val(data.pw); } }); I prefer to store a group of data in an object into a single key on the storage, that is why I use JSON to stringify and parse an object, because storage only accepts string types. A simple advise: Don't - ever - store passwords, let the user type it. For security reasons.
upvote count: 2
accepted answer of: http://stackoverflow.com/q/29265415
type: Answer
answers question: http://stackoverflow.com/q/29265415
has comment: http://stackoverflow.com/comment/46733077
score: 2
has comment: http://stackoverflow.com/comment/46733527
has comment: http://stackoverflow.com/comment/46733494

http://stackoverflow.com/comment/46776242
comment on: http://stackoverflow.com/a/29289280
type: AnswerComment
type: Comment
score: 0
has text: @Mottie: That's different code, showing a problem that doesn't exist in the code in the answer. I fixed the demo so that it uses the same way to create and append the list item: http://jsfiddle.net/Guffa/o4pqfx7e/1/

http://stackoverflow.com/comment/46927725
score: 0
type: Comment
type: QuestionComment
has text: My issue with that is that the div that would be omitted is a wrapper for alot of child elements that I don't want repeated, so lots of child elements . I do not want all the child content repeated but I could make a template of the child content I guess
comment on: http://stackoverflow.com/q/29362556

http://stackoverflow.com/comment/46686658
score: 0
type: AnswerComment
type: Comment
has text: someone broke that plunker, added a new one and froze it.
comment on: http://stackoverflow.com/a/29238603

http://stackoverflow.com/comment/46843950
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29319435
has text: When this loop gets execute, it register a event but event never gets called.
score: 0

http://stackoverflow.com/a/29271542
has comment: http://stackoverflow.com/comment/46743531
has comment: http://stackoverflow.com/comment/46743597
type: Answer
has body: You've got some typos. For a quick fix. Replace $("medicine-inforamtion").hide(); $(".user-information").show(); With $(".medicine-information").hide(); $(".user-information").show();
has comment: http://stackoverflow.com/comment/46743569
has comment: http://stackoverflow.com/comment/46743606
answers question: http://stackoverflow.com/q/29271517
has comment: http://stackoverflow.com/comment/46743688
score: 0

http://stackoverflow.com/comment/46812482
comment on: http://stackoverflow.com/q/29286650
type: QuestionComment
has text: where is your current running file located? is it also on the same address http://localhost:82/ ? it seems that you have some kind of authentication on the address your ajax request is looking for(http://localhost:82/JSON/Lookups/ComponentTypes)
score: 0
type: Comment

http://stackoverflow.com/q/29305049
has answer: http://stackoverflow.com/a/29347289
tagged with: linkedin-api
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/46808082
favorite count: 0
tagged with: rest
has body: I am trying to develop a sample app that uses Javascript in client side and consumes rest web services. I am new to LinkedIn ans social network APIs. Si I want to setup a LinkedIn login at first then other social networks later. Linkedin API utilise OAuth2. I want to use it to store tokens that give us if the user authorize the application to access some its basic data. I am thinking to use the REST API so the could request token for authorized users and stores them in a database via the developed RESTful web servcie. I know but we want to use what we have now. The schema up tells what I have in mind. If I am wrong please help. An other problem for is that I want to use token to renew it or get some data from social networks.
type: AnsweredQuestion
has title: Linkedin Login using REST service and Javascript to store tokens
accepted answer: http://stackoverflow.com/a/29347289
has comment: http://stackoverflow.com/comment/46806975
score: 1
tagged with: oauth-2.0
tagged with: authentication
upvote count: 1
type: Question
tagged with: javascript

http://stackoverflow.com/q/29345559
favorite count: 0
has comment: http://stackoverflow.com/comment/46880986
has body: we are currently using Microsoft TypeScript in our project. I came to know that Microsoft TypeScript is following ECMAScript 6 standards. So when ECMASCript 6 is finalized and released and browsers natively supports javascript based off of ECMAScript 6, do we need Microsoft TypeScript? Since TypeScript follows ECMAScript 6 standard, after ECMAScript 6 based javascript is directly supported in browsers, can we still use Typescript without compiling into to native javascript as it will be ultimately supported by browsers?
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46877091
tagged with: typescript
has title: will Microsoft Typescript be obsolete when browsers directly support ECMAScript 6 based javascript
upvote count: 3
has comment: http://stackoverflow.com/comment/46877088
downvote count: 3
type: Question
tagged with: ecmascript-6
has comment: http://stackoverflow.com/comment/46881832
has comment: http://stackoverflow.com/comment/46878225
tagged with: javascript
has answer: http://stackoverflow.com/a/29346284
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/46897234

http://stackoverflow.com/a/29525674
has body: You can use context.expand from a script using javascript in SOAPUI. For example if you add a property called SOME_PROPERTY in the TestCase then in you can retriever it using javascript as follows: var a = context.expand('${#TestCase#SOME_PROPERTY}'); log.info(a); As you can see it's possible also to use log object as in groovy, I add the log.info(a); due to this you can see the result in script log tab. See the follow image: So the problem with your script it's not the context.expand is that you're missing the ; at the end of some lines (as you said in your comment the error thrown by rinho which is the js engine is: Error: missing ; before statement). Add the missing ; will solve your problem. So use something like: var userIdElement = document.querySelector("#idp *[name=userid]"); userIdElement.value = context.expand('${#TestCase#userIdProperty}'); var password = document.querySelector("#idp *[name=userpwd_page]"); password.value = context.expand('${#TestCase#passwordProperty}'); var button = document.querySelector("button[type=submit]"); button.click(); Instead of: var userIdElement = document.querySelector("#idp *[name=userid]"); userIdElement.value = "123123" var password = document.querySelector("#idp *[name=userpwd_page]"); password.value = "aa123456"; var button = document.querySelector("button[type=submit]") button.click(); Hope this helps,
has comment: http://stackoverflow.com/comment/47348116
score: 0
answers question: http://stackoverflow.com/q/29348450
type: Answer
has comment: http://stackoverflow.com/comment/47264739

http://stackoverflow.com/a/29335389
type: Answer
has body: First, added an id to each object for later reference. var rect1 = new fabric.Rect({ id: 'rect1', width: 100, height: 100, left: 50, top: 50, fill: 'rgba(255,0,0,0.5)' }); Then instantiated a variable to keep track of the last selected object. Upon selection, checking what is currently selected, and then checking last_selected to see if the mate object was last selected, and if so, remove both. And, finally, assigning the object to last_selected. var canvas = new fabric.Canvas(document.getElementById('c')) var last_selected canvas.on('object:selected',function(ev){ if ( ( 'rect1' === ev.target.id &amp;&amp; rect2 === last_selected ) || ( 'rect2' === ev.target.id &amp;&amp; rect1 === last_selected ) ) { canvas.remove(rect1) canvas.remove(rect2) } if ( ( 'circ1' === ev.target.id &amp;&amp; circ2 === last_selected ) || ( 'circ2' === ev.target.id &amp;&amp; circ1 === last_selected ) ) { canvas.remove(circ1) canvas.remove(circ2) } last_selected = ev.target }); JSFiddle
has comment: http://stackoverflow.com/comment/46859669
score: 0
answers question: http://stackoverflow.com/q/29334858

http://stackoverflow.com/q/29236341
answer count: 2
has answer: http://stackoverflow.com/a/29236446
favorite count: 0
has comment: http://stackoverflow.com/comment/139858759
has answer: http://stackoverflow.com/a/29236455
type: UnansweredQuestion
has title: Function behavior confusion
has body: I am confused why this below code outputs only the b2 value. What happens to b1? var B = (function(){ var name = ""; return function(n){ name = n; this.sayHello = function(){ console.log("Hi " + name); } } })(); var b1 = new B("xxx"); var b2 = new B("yyy"); b1.sayHello(); b2.sayHello();
upvote count: 1
downvote count: 1
type: Question
linked to: http://stackoverflow.com/q/500431
tagged with: javascript
score: 0

http://stackoverflow.com/comment/46881086
score: 0
type: AnswerComment
has text: Thank you. It worked. This code is called from loadComplete event. How to use unformatter instead ? Unformatter works with any formatter so it is more general.
type: Comment
comment on: http://stackoverflow.com/a/29344749

http://stackoverflow.com/q/29331123
has comment: http://stackoverflow.com/comment/46852577
score: 1
tagged with: http-headers
has title: Browser console, get response header from js console
has body: I am looking to get/return the response headers of an already made request using js in the browser console. I do not wish to use the XMLHTTPRequest object as it makes another request. I tried using the window.performance object in the js console, but failed to get the response header of the already made request on the page. Does anybody have an idea how to do this?
tagged with: response
type: Question
tagged with: browser
has comment: http://stackoverflow.com/comment/46851786
downvote count: 0
tagged with: javascript
tagged with: console
has comment: http://stackoverflow.com/comment/46851484
linked to: http://stackoverflow.com/q/220231
has comment: http://stackoverflow.com/comment/46852144
favorite count: 0
answer count: 0
type: UnansweredQuestion
upvote count: 1

canvas
tags question: http://stackoverflow.com/q/29260117
tags question: http://stackoverflow.com/q/29369377
tags question: http://stackoverflow.com/q/29240391
tags question: http://stackoverflow.com/q/29357540
tags question: http://stackoverflow.com/q/29366664
tags question: http://stackoverflow.com/q/29229946
tags question: http://stackoverflow.com/q/29308530
tags question: http://stackoverflow.com/q/29358555
tags question: http://stackoverflow.com/q/29300280
tags question: http://stackoverflow.com/q/29248169
tags question: http://stackoverflow.com/q/29305326
tags question: http://stackoverflow.com/q/29355128
tags question: http://stackoverflow.com/q/29307168
tags question: http://stackoverflow.com/q/29227890
tags question: http://stackoverflow.com/q/29319628
tags question: http://stackoverflow.com/q/29276056
tags question: http://stackoverflow.com/q/29239795
tags question: http://stackoverflow.com/q/29292416
tags question: http://stackoverflow.com/q/29316433
tags question: http://stackoverflow.com/q/29315787
tags question: http://stackoverflow.com/q/29331194
tags question: http://stackoverflow.com/q/29291499
tags question: http://stackoverflow.com/q/29224437
tags question: http://stackoverflow.com/q/29369403
tags question: http://stackoverflow.com/q/29305220
tags question: http://stackoverflow.com/q/29229178
tag name: canvas
tags question: http://stackoverflow.com/q/29239781
tags question: http://stackoverflow.com/q/29321661
tags question: http://stackoverflow.com/q/29226062
tags question: http://stackoverflow.com/q/29359497
tags question: http://stackoverflow.com/q/29233785
tags question: http://stackoverflow.com/q/29321259
tags question: http://stackoverflow.com/q/29365247
tags question: http://stackoverflow.com/q/29285184
tags question: http://stackoverflow.com/q/29307186
type: Tag
tags question: http://stackoverflow.com/q/29323614
tags question: http://stackoverflow.com/q/29247392
tags question: http://stackoverflow.com/q/29266204
tags question: http://stackoverflow.com/q/29280253
tags question: http://stackoverflow.com/q/29301375
tags question: http://stackoverflow.com/q/29248182
tags question: http://stackoverflow.com/q/29366620
tags question: http://stackoverflow.com/q/29317593
tags question: http://stackoverflow.com/q/29368364
tags question: http://stackoverflow.com/q/29223869
tags question: http://stackoverflow.com/q/29367820
tags question: http://stackoverflow.com/q/29308321
tags question: http://stackoverflow.com/q/29324556
tags question: http://stackoverflow.com/q/29321951
tags question: http://stackoverflow.com/q/29286802
tags question: http://stackoverflow.com/q/29352971
tags question: http://stackoverflow.com/q/29276441
tags question: http://stackoverflow.com/q/29355920
tags question: http://stackoverflow.com/q/29244843
tags question: http://stackoverflow.com/q/29282501
tags question: http://stackoverflow.com/q/29236589
tags question: http://stackoverflow.com/q/29350172
tags question: http://stackoverflow.com/q/29349816
tags question: http://stackoverflow.com/q/29247363
tags question: http://stackoverflow.com/q/29368433

http://stackoverflow.com/comment/46865765
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29338730
type: Comment
has text: Hello! thanks for the reply. The solution works is not entirely correct. if, for example add a button that will take the width and click on it in the middle of the document, the size is wrong Calculate.

http://stackoverflow.com/a/29341146
answers question: http://stackoverflow.com/q/29341003
has body: value/60 + ":" + value%60, formats to (m)m:ss figure out the right padding
score: 0
type: Answer

http://stackoverflow.com/comment/46650487
comment on: http://stackoverflow.com/q/29220735
type: Comment
type: QuestionComment
has text: Source for your `OpenInNewTab()` function? You can keep track of windows (tabs) you opened by saving the return value of `window.open()`
score: 1

http://stackoverflow.com/a/29299232
accepted answer of: http://stackoverflow.com/q/29299053
answers question: http://stackoverflow.com/q/29299053
type: Answer
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/46793856
has comment: http://stackoverflow.com/comment/46793660
has body: You have it in the event of the loadstart, just take it: var ref = window.open(encodeURI(_url), '_blank', 'location=no'); ref.addEventListener('exit', function() { alert(event.url); // here you have the URL }); See Cordova docs for more info
upvote count: 2
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46793684

http://stackoverflow.com/comment/46749767
has text: I got a workaround, but that's not what I am looking for. Basically the trick is to convert object to string (you will get something like "v(TestV)[#13:1]") and then truncate unnecessary content leaving just the RID. This works for now giving me id, but i do need an access to the object itself.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29274897

http://stackoverflow.com/comment/46804091
comment on: http://stackoverflow.com/q/29301337
score: 0
type: Comment
type: QuestionComment
has text: That bug in jquery validate about `min:0` is fixed in version 1.13.1, and possibly before that.

http://stackoverflow.com/comment/57954496
type: Comment
has text: This is older but just came across it and it is excellent. Just curious, do you know if there is a way to take the "cut out" part of the image and save it somewhere as a PNG with transparent background (i.e. the white part of the image after you clip would essentially become transparent around the part that you cut out and want to keep)
type: AnswerComment
comment on: http://stackoverflow.com/a/29951712
score: 0

http://stackoverflow.com/comment/46761220
type: QuestionComment
type: Comment
has text: well, you should check the status, if it is `200` the page exist
comment on: http://stackoverflow.com/q/29281650
score: 0

http://stackoverflow.com/a/29243497
type: AcceptedAnswer
downvote count: 0
has body: Support for triggering native click events is flaky across browsers, especially mobile. Since you're just trying to open a window, use window.open(). https://developer.mozilla.org/en-US/docs/Web/API/Window/open Edit... If you want to fake a click, create a js function that is accessible from the window and call it from the android app. window.fakeClick = function(anchorSelector){ var el = document.querySelector(anchorSelector); el.style.color = "red"; // fake active state ga.post(...) // send click to analytics somehow window.open(anchorSelector.href); // open the link } in android... myBrowser.loadUrl("javascript:window.fakeClick('a.someclass')");
has comment: http://stackoverflow.com/comment/46773826
has comment: http://stackoverflow.com/comment/46776424
has comment: http://stackoverflow.com/comment/46707584
type: Answer
has comment: http://stackoverflow.com/comment/46807580
has comment: http://stackoverflow.com/comment/46726693
upvote count: 1
has comment: http://stackoverflow.com/comment/46753491
has comment: http://stackoverflow.com/comment/46770857
score: 1
accepted answer of: http://stackoverflow.com/q/29242258
answers question: http://stackoverflow.com/q/29242258
has comment: http://stackoverflow.com/comment/46786623

http://stackoverflow.com/a/29349231
has comment: http://stackoverflow.com/comment/46885224
answers question: http://stackoverflow.com/q/29349158
has comment: http://stackoverflow.com/comment/46895665
upvote count: 1
score: 1
has body: The major disadvantage is that you consume CPU every 100ms. And it doesn't do anything most of the time. There is a better way. Just emit an event after the fixed element changes height and bind your css adjusment to it. Something like: $(document).trigger('my_element_changed_height'); wherever the height changes and $(document).on('my_element_changed_height', function() { $('article').css('padding-top', $('header').outerHeight()); });
downvote count: 0
type: Answer

http://stackoverflow.com/a/29292255
type: Answer
has body: There are two issues in your code: It is "document", not "Document". Case matters. You have an extra "})" at the end of your script. Your code works after those two corrections: &lt;script type="text/javascript"&gt; $(document).ready(function() { alert("HelloWorld"); }); &lt;/script&gt; Demo: http://jsfiddle.net/BenjaminRay/2tvv6tLc/
score: 0
answers question: http://stackoverflow.com/q/29292230
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29292230

http://stackoverflow.com/q/29239889
has answer: http://stackoverflow.com/a/29242374
has title: issue using async module in Node.js
tagged with: javascript
favorite count: 0
score: 0
has comment: http://stackoverflow.com/comment/46690098
has answer: http://stackoverflow.com/a/29240073
has body: Having an issue, appreciate any help. I'm trying to gather all my async functions together. Tried async.parallel, async.each, gather-gm. Nothing makes the final callback work. Here's the updated code(but yet not working properly): var calls = []; async.each(parser.allHrefs,function (href,callback) { getHtml(href,function(err, add){ console.log("Passing data: " + href); if(err){ return callback(err); }; if(add){ calls.push(href); }; return callback(); }); }, function (err) { if(err){ console.log('something went wrong'); }else{ console.log('finished'); }; }); And the first function: function getHtml(link, callback) { httpreq.get(link, function(err, res) { if(err) { return callback(err); } if(res.statusCode &gt;= 300) { return callback(null, false); } else { //cut parsing code here... return callback(null, true); } }); } p.s.:I've updated the code couple times. In this example i've tried to use async.parallel. And the thing is when i even get no errors, i still dont get to the "getLocations" function. Code looks much more better than first versions, but still refuses to work correctly.
downvote count: 1
tagged with: asynchronous
has comment: http://stackoverflow.com/comment/46686164
possible better answer: http://stackoverflow.com/a/29240073
has comment: http://stackoverflow.com/comment/46692598
has comment: http://stackoverflow.com/comment/46686103
tagged with: node.js
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29242374
type: Question
answer count: 2
upvote count: 1

http://stackoverflow.com/a/29309827
score: 0
has body: I believe you want an object containing objects. var myObj = { "thing1": { "key1": "someValue", "key2": "someValue" }, "thing2": { // etc } }; alert(myObj.thing1.key1);
type: Answer
answers question: http://stackoverflow.com/q/29309606

http://stackoverflow.com/q/29340440
has title: Javascript spliting a string with multiple integer values with delimiter as "." retrns wrong values
answer count: 4
has comment: http://stackoverflow.com/comment/46868600
score: 0
has comment: http://stackoverflow.com/comment/46868304
type: Question
has answer: http://stackoverflow.com/a/29340488
has answer: http://stackoverflow.com/a/29340543
has answer: http://stackoverflow.com/a/29340553
tagged with: javascript
has body: I have a javascript string and I want to split it using delimiter "." with exact value as integer. &lt;script&gt; var string = "6.100"; string.split("."); console.log(string[2]); // Returns 1, I need 100 as output. &lt;/script&gt;
tagged with: jquery
has answer: http://stackoverflow.com/a/29340482
type: UnansweredQuestion

joystick
type: Tag
tags question: http://stackoverflow.com/q/29220255
tag name: joystick

http://stackoverflow.com/comment/46920806
comment on: http://stackoverflow.com/a/29356875
has text: If you play with it you will see that sometimes it DOES work. I updated an example with setTimeout instead of requestAnimationFrame. On my computer it works in most cases in Chrome and doesn't work in FF
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/29237191
answers question: http://stackoverflow.com/q/29237106
has body: One possibility is to synthetically fire the click event. See How can I trigger a JavaScript event click fireEvent( document.getElementById('drop-zone-600'), 'click' );
upvote count: 1
downvote count: 0
type: Answer
score: 1

http://stackoverflow.com/q/29347584
has body: This is probably an easy question but I haven't been able to find an answer from the lodash API docs and Google. Let's assume I have an object like this: var obj = { code: 2, persistence: true } I want a function that I can pass a key/value pair and returns true if the key exists in my object and has the specified value: _.XXXX(obj, {code: 2}); //true _.XXXX(obj, {code: 3}); //false _.XXXX(obj, {code: 2, persistence: false}); //false _.XXXX(obj, {code: 2, persistence: true}); //true This is somehow like where() but for only one object.
tagged with: underscore.js
has answer: http://stackoverflow.com/a/29352020
accepted answer: http://stackoverflow.com/a/29352020
has answer: http://stackoverflow.com/a/29347837
type: Question
answer count: 3
downvote count: 0
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/29347779
has title: lodash/underscore check if one object contains all key/values from another object
tagged with: lodash
possible better answer: http://stackoverflow.com/a/29347837
upvote count: 11
score: 11
type: AnsweredQuestion

http://stackoverflow.com/a/29329417
has body: $(document).ready(function() { $('#myModal').modal(); var myVar=setInterval(function(){myTimer()},1000); function myTimer() { var d = new Date(); document.getElementById("demo").innerHTML = d.toLocaleTimeString(); } }); &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt; &lt;link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css" rel="stylesheet"&gt; &lt;script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"&gt;&lt;/script&gt; &lt;div class="modal fade" id="myModal"&gt; &lt;div class="modal-dialog"&gt; &lt;div class="modal-content"&gt; &lt;div class="modal-header"&gt; &lt;button type="button" class="close" data-dismiss="modal" aria-label="Close"&gt;&lt;span aria-hidden="true"&gt;&amp;times;&lt;/span&gt;&lt;/button&gt; &lt;h4 class="modal-title"&gt;Modal title&lt;/h4&gt; &lt;/div&gt; &lt;div class="modal-body"&gt; &lt;div id="demo"&gt;&lt;/div&gt; &lt;/div&gt; &lt;div class="modal-footer"&gt; &lt;button type="button" class="btn btn-default" data-dismiss="modal"&gt;Close&lt;/button&gt; &lt;button type="button" class="btn btn-primary"&gt;Save changes&lt;/button&gt; &lt;/div&gt; &lt;/div&gt;&lt;!-- /.modal-content --&gt; &lt;/div&gt;&lt;!-- /.modal-dialog --&gt; &lt;/div&gt;&lt;!-- /.modal --&gt;
type: Answer
has comment: http://stackoverflow.com/comment/46849134
answers question: http://stackoverflow.com/q/29329203
score: 0

http://stackoverflow.com/q/29274525
answer count: 0
type: UnansweredQuestion
has title: Show tree of directory with angularjs
type: Question
tagged with: angularjs-directive
has comment: http://stackoverflow.com/comment/46751515
score: 0
has comment: http://stackoverflow.com/comment/47848695
tagged with: javascript
has body: I want to show a tree of a directory in a frame and open a file in another frame using angularjs i didn't find any solution i used angular directive ui-ace to show the data but i can't show a data from a file selected! and this is my controller angular.module('myModule', ['ui.ace']) .controller('myController', ['$scope', function($scope) { $scope.aceModel ='some data'; }]);
tagged with: angularjs
tagged with: http://stackoverflow.com/tag/html
tagged with: angularjs-ng-repeat

http://stackoverflow.com/q/29357147
has answer: http://stackoverflow.com/a/29357214
type: UnansweredQuestion
tagged with: capitalization
has title: Is there a function that will ignore capital letters in javascript?
has answer: http://stackoverflow.com/a/29357657
answer count: 4
tagged with: if-statement
tagged with: case-insensitive
type: Question
score: -2
tagged with: javascript
has answer: http://stackoverflow.com/a/29357200
downvote count: 2
has body: i have a chatbot that answers questions only if i write them the same way as in the code Ex: If i wrote the tag "Hello" it will not answer if i say in the chatbot "hello" . I have to write it with a capital letter like in the code. Is there a function that will ignore that and answer it even if i write it "HeLlO"? if (message.indexOf("Bye")&gt;=0 || message.indexOf("bye")&gt;=0 || message.indexOf("Goodbye")&gt;=0 || message.indexOf("Goodbye")&gt;=0 ){ send_message("You're welcome."); }
has answer: http://stackoverflow.com/a/29357203
favorite count: 0
upvote count: 0

http://stackoverflow.com/comment/46705032
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29250354
has text: Thank but I run into the same problem I have with other solutions. The animation doesn't finish before going to the still frame. I would like the animation, on mouseout, to finish before it goes back to the still frame. I should have added that into the title but it was a bit long. Or am I missing something and it could be easily possible?

http://stackoverflow.com/comment/46876834
comment on: http://stackoverflow.com/q/29345140
has text: works fine in FF Version 36.0.1
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/a/43055806
answers question: http://stackoverflow.com/q/29223071
type: Answer
score: 4
upvote count: 4
has body: I found a way that works, for both WebPack 1 and 2. (as long as the source is non-minified) Repo: https://github.com/Venryx/webpack-runtime-require Install npm install --save webpack-runtime-require Usage First, require the module at least once. import "webpack-runtime-require"; It will then add a Require() function to the window object, for use in the console, or anywhere in your code. Then just use it, like so: let React = Require("react"); console.log("Retrieved React.Component: " + React.Component); It's not very pretty (it uses regexes to search the module wrapper functions) or fast (takes ~50ms the first call, and ~0ms after), but both of these are perfectly fine if it's just for hack-testing in the console. Technique The below is a trimmed version of the source to show how it works. (see the repo for the full/latest) var WebpackData; webpackJsonp([], {123456: function(module, exports, __webpack_require__) { WebpackData = __webpack_require__; }}, [123456] ); var allModulesText; var moduleIDs = {}; function GetIDForModule(name) { if (allModulesText == null) { let moduleWrapperFuncs = Object.keys(WebpackData.m).map(moduleID=&gt;WebpackData.m[moduleID]); allModulesText = moduleWrapperFuncs.map(a=&gt;a.toString()).join("\n\n\n"); // these are examples of before and after webpack's transformation: (which the regex below finds the var-name of) // require("react-redux-firebase") =&gt; var _reactReduxFirebase = __webpack_require__(100); // require("./Source/MyComponent") =&gt; var _MyComponent = __webpack_require__(200); let regex = /var ([a-zA-Z_]+) = __webpack_require__\(([0-9]+)\)/g; let matches = []; let match; while (match = regex.exec(allModulesText)) matches.push(match); for (let [_, varName, id] of matches) { // these are examples of before and after the below regex's transformation: // _reactReduxFirebase =&gt; react-redux-firebase // _MyComponent =&gt; my-component // _MyComponent_New =&gt; my-component-new // _JSONHelper =&gt; json-helper let moduleName = v…
downvote count: 0

http://stackoverflow.com/comment/46804207
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29303561
score: 0
has text: Thanks, @Joe. Unfortunately that´s not what I wanted. I´d messed up my fiddle with a test. The "toDo2" has nothing to do with it. I want the 'toDo'-observable to trigger the preview. If the checkbox is checked the selected project.title should overwrite 'toDo' If 'toDo' is blank, the selected project.title should overwrite 'toDo' even it the checkbox is not checked.

http://stackoverflow.com/comment/46776887
type: Comment
has text: Ah ok. I never do such an odd thing, creating a function that will "die" rightaway. I will use === from now on, but actually I hesitate on what to do with the thousands of already existing ==. If they don't create garbage, no problem. If they do (or if they cause deoptimisation by the way) then I should take time to change them. That is why I was asking.
type: AnswerComment
comment on: http://stackoverflow.com/a/29285623
score: 0

http://stackoverflow.com/q/29255957
has title: Ember-cli require("my_app/app")["default"].create is not a function
has comment: http://stackoverflow.com/comment/46723390
accepted answer: http://stackoverflow.com/a/29261011
has comment: http://stackoverflow.com/comment/46722768
type: AnsweredQuestion
answer count: 1
has comment: http://stackoverflow.com/comment/46723945
tagged with: ember-cli
favorite count: 0
has comment: http://stackoverflow.com/comment/46721027
type: Question
has comment: http://stackoverflow.com/comment/46718840
score: 5
has comment: http://stackoverflow.com/comment/46722900
tagged with: ember.js
tagged with: ruby-on-rails
has comment: http://stackoverflow.com/comment/46720318
has body: I'm migrating my project from a situation where it was a nested asset in a Rails app to a separate frontend with Ember-Cli. And I've been stuck with the following problem for quite some time now: When running $ Ember serve in my terminal and opening localhost:4200 with Chrome I get the following error in the console: Uncaught TypeError: undefined is not a function in app-boot.js:25 On that line the following code is present: require("my_app/app")["default"].create({ "defaultLocale":"en", "name":"my_app", "version":"0.0.0.bece32c1" }); I added a breakpoint on that line and checked if require("my_app/app" was defined, and it was Object {default: Class} so I checked if the default object property was defined, and this also was the case: Class {modulePrefix: "my_app", podModulePrefix: undefined, Resolver: function, _readinessDeferrals: 1, $: function…} The console output of require("my_app/app")["default"] can be seen in the following screenshot: This is the content of my config/environment file: And this is the content of my app/index.html file: And this is the content of my app/app.js file: I'm using the latest version of Ember-cli, Ember v1.10.0, ember-data v1.0.0-beta.15 and Jquery 1.11.2 ============= Update 1: origin of app-boot.js ================== Someone asked where the app-boot.js was located as he was only familiar with https://github.com/ember-cli/ember-cli/blob/master/lib/broccoli/app-boot.js Below is a screenshot of the resources pane in Chrome, showing that it is in fact a compiled vendor asset of ember-cli. == Update 2: commenting I18N import and include constants in initialisation == I did do some refactoring and commented the I18N import that maybe is conflicting. I also included the constants inside the Ember app initialisation. see screenshot below for current version of app.js: I didn't edit my Brocfile.jsas far as I know but decided to include a screenshot of it anyway because maybe it contains a bug.. you never know.. I hope someone knows a solut…
has answer: http://stackoverflow.com/a/29261011
has comment: http://stackoverflow.com/comment/46722331
has comment: http://stackoverflow.com/comment/46719451
has comment: http://stackoverflow.com/comment/46720376
has comment: http://stackoverflow.com/comment/46723610
has comment: http://stackoverflow.com/comment/46721806
upvote count: 5
has comment: http://stackoverflow.com/comment/46721618
downvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/46843414
score: 0
type: Comment
type: QuestionComment
has text: It would be considerably easier to work on this if there was complete code (a [MCVE](http://stackoverflow.com/help/mcve)) available rather than having to roll my own SeaMonkey add-on prototype just to test code for this question.
comment on: http://stackoverflow.com/q/29314165

http://stackoverflow.com/comment/46926625
comment on: http://stackoverflow.com/a/29371185
score: 0
type: AnswerComment
type: Comment
has text: Implementing the custom `toString` method is perfect, that's all I was looking to do - I just didn't quite know that's what I was looking to do. :D

http://stackoverflow.com/q/29267297
has body: I have found some questions like this one,but unfortunately,none of the solutions solved my problem. Here is what I'm doing(also tried with json_encode.Didn't work either) PHP $head="&lt;div id='headx'&gt;".htmlspecialchars($headu)."&lt;input type='submit' id='edit_head' value='Edit' onclick='edit_title9(this.id,\"".htmlspecialchars($headu,ENT_QUOTES)."\")'&gt;&lt;/div&gt; Javascript function edit_title9(ya,va1){ var divid = document.getElementById(ya).parentNode.id; var cola=ya; var val1=va1.replace(/'/g,"\'"); alert(val1); //works fine document.getElementById(divid).innerHTML="&lt;input type='text' id='taxi1' width='40px' value='"+val1+"' &gt;"; } when I use alert(val1),it works fine and show ' on the line,but in the text field,I get only upto apostrophe(exclusive) and the rest is removed. But when I use other characters it shows nicely in text field. va1.replace(/'/g,"\A"); gives heAs good for he's good on text field. Why is that happening and how can I get rid of this?
has comment: http://stackoverflow.com/comment/46736655
tagged with: php
has comment: http://stackoverflow.com/comment/46736415
accepted answer: http://stackoverflow.com/a/29284285
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46738406
type: Question
tagged with: javascript
tagged with: replace
has comment: http://stackoverflow.com/comment/46736450
has answer: http://stackoverflow.com/a/29284285
score: 0
has title: Escape apostrophe is not working
has comment: http://stackoverflow.com/comment/46736362
answer count: 1
has comment: http://stackoverflow.com/comment/46736389

http://stackoverflow.com/comment/46746005
comment on: http://stackoverflow.com/q/29272805
score: 0
has text: Ok.. you might need to take a look on these plugins - **[jscroll.js](http://jscroll.com/)** and **[Emberjs/list-view](https://github.com/emberjs/list-view)**
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29257434
type: Answer
answers question: http://stackoverflow.com/q/29257183
has body: If you ask for initial load . $( document ).ready(function() { $.ajax({ method: 'GET', url: "pages/index.php", success: function(content) { $('#apDiv2').html (content); } }); });
accepted answer of: http://stackoverflow.com/q/29257183
type: AcceptedAnswer
score: 0
has comment: http://stackoverflow.com/comment/46723304

http://stackoverflow.com/q/29329318
answer count: 3
favorite count: 0
has body: I am quite new to jquery and javascript to be honest and I am having trouble with checkboxes. This works as #checkAll is a checkbox used for checking all the other checkboxes with class "check": function test() { if($("#checkAll").prop('checked')) { $(".check").prop('checked', true); } else { $(".check").prop('checked', false); } } However, I want it to work when I select any checkbox. So I tried putting the function to all checkboxes as a click event, just using onclick="test()". I think the problem is that I am trying to use $(this) but I must be using it wrongly, what I have is: function test() { if($(this).prop("checked")) { $(".check").prop("checked", true); } else { $(".check").prop("checked", false); } } "$(this)" also has the class "check", so maybe it's to do with that. Ultimately I want to check one box and it check all previous checkboxes, not ones that come afterwards. I think if I get my head around why this isn't working then I should be able to figure that out. I'm not lazy, just learning!! I have searched for an answer but cannot find one. I'm hoping someone can help. Thanks in advance!
has answer: http://stackoverflow.com/a/29329410
upvote count: 1
tagged with: checkbox
accepted answer: http://stackoverflow.com/a/29329396
type: AnsweredQuestion
score: 1
possible better answer: http://stackoverflow.com/a/29329358
has answer: http://stackoverflow.com/a/29329358
type: Question
downvote count: 0
has title: Check current and previous checkboxes
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29329396

http://stackoverflow.com/a/29321578
has comment: http://stackoverflow.com/comment/46844401
score: 4
upvote count: 4
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46834479
has comment: http://stackoverflow.com/comment/46844337
type: Answer
has comment: http://stackoverflow.com/comment/46844839
has comment: http://stackoverflow.com/comment/46834773
has body: What's the benefits of using resolve method for data retrieval? You dont want your views to render before you get the required data to be displayed , this is what the purpose of using resolve in routes. It is useless to display half of the view with out having {{necessary. requirements}} (these brackets are intentional) Authorized data ,data that is major part of the view or data that if not loaded before the view is rendered will take out the value from the view(template) is better to be loaded before the view is actually rendered For example you have user profile that mostly has user data, it is useless to render the view with dozens of ng-if without having actual data isn't? What are the common approaches to handling rejections/failed data retrieval situations redirecting to other routes or the routes is preferred but it depeds on the logic. you can catch the rejection in $routechangerror or again it depend on your logic Simple example for handling rejection: route resolve .when('/seedata', { templateUrl: '/partials/seedata.html', controller: 'abcCtrl', resolve: { data : function(dataService){ if(dataService.hasData()) { return true; } else { return $q.reject('no data'); } } } }); handling resolve at run phase angular.module('test').run(function($rootScope, $location) { $rootScope.$on('$routeChangeError', function(evt, current, previous, rejection) { if(rejection === 'no data') { $location.path('#/wait'); } }) })
has comment: http://stackoverflow.com/comment/46844730
accepted answer of: http://stackoverflow.com/q/29321551
answers question: http://stackoverflow.com/q/29321551
has comment: http://stackoverflow.com/comment/46834511
has comment: http://stackoverflow.com/comment/46834564

http://stackoverflow.com/a/29342829
answers question: http://stackoverflow.com/q/29342525
has comment: http://stackoverflow.com/comment/46872689
has comment: http://stackoverflow.com/comment/46872786
has comment: http://stackoverflow.com/comment/46872440
has comment: http://stackoverflow.com/comment/46872820
has comment: http://stackoverflow.com/comment/46872630
score: 0
has comment: http://stackoverflow.com/comment/46872557
type: Answer
has body: This is for your basic interactions with "p" document.getElementsByTagName('p')[0].addEventListener("click",function() { this.style.display = "none"; }); about "document ready function" it is much more complicated than it seems

http://stackoverflow.com/q/29361489
tagged with: jquery
has answer: http://stackoverflow.com/a/29361550
favorite count: 0
tagged with: backbone.js
possible better answer: http://stackoverflow.com/a/29361550
type: AnsweredQuestion
score: 1
upvote count: 1
has answer: http://stackoverflow.com/a/29361651
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/46906780
has body: I'm just starting backbone and am getting this error. This is my index.html file: Error: Uncaught ReferenceError: Backbone is not defined Any help ?
answer count: 2
has title: Backbone is not defined in Backbone
downvote count: 0
accepted answer: http://stackoverflow.com/a/29361651

http://stackoverflow.com/comment/46872726
type: Comment
has text: I would modify this answer slightly to cater for whichever version of jquery you're using: `"content_scripts": [ { "js": [ "[JQUERY FILE NAME HERE]", "background.js" ], "matches": [ "http://*/*", "https://*/*"] }]`
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29342996

arrays
tags question: http://stackoverflow.com/q/29236228
tags question: http://stackoverflow.com/q/29255652
tags question: http://stackoverflow.com/q/29282775
tags question: http://stackoverflow.com/q/29264748
tags question: http://stackoverflow.com/q/29309442
tags question: http://stackoverflow.com/q/29370424
tags question: http://stackoverflow.com/q/29352438
tags question: http://stackoverflow.com/q/29292175
tags question: http://stackoverflow.com/q/29280317
tags question: http://stackoverflow.com/q/29323758
tags question: http://stackoverflow.com/q/29343591
type: Tag
tags question: http://stackoverflow.com/q/29248279
tags question: http://stackoverflow.com/q/29339311
tags question: http://stackoverflow.com/q/29304311
tags question: http://stackoverflow.com/q/29290111
tags question: http://stackoverflow.com/q/29342805
tags question: http://stackoverflow.com/q/29348878
tags question: http://stackoverflow.com/q/29284516
tags question: http://stackoverflow.com/q/29293603
tags question: http://stackoverflow.com/q/29249106
tags question: http://stackoverflow.com/q/29323241
tags question: http://stackoverflow.com/q/29343437
tags question: http://stackoverflow.com/q/29293464
tags question: http://stackoverflow.com/q/29256689
tags question: http://stackoverflow.com/q/29358656
tags question: http://stackoverflow.com/q/29279092
tags question: http://stackoverflow.com/q/29269237
tags question: http://stackoverflow.com/q/29265470
tags question: http://stackoverflow.com/q/29317866
tags question: http://stackoverflow.com/q/29284877
tags question: http://stackoverflow.com/q/29229338
tags question: http://stackoverflow.com/q/29291410
tags question: http://stackoverflow.com/q/29356358
tags question: http://stackoverflow.com/q/29331006
tags question: http://stackoverflow.com/q/29254230
tags question: http://stackoverflow.com/q/29360634
tags question: http://stackoverflow.com/q/29329833
tags question: http://stackoverflow.com/q/29351471
tags question: http://stackoverflow.com/q/29324480
tags question: http://stackoverflow.com/q/29319900
tags question: http://stackoverflow.com/q/29289913
tags question: http://stackoverflow.com/q/29296885
tags question: http://stackoverflow.com/q/29312162
tags question: http://stackoverflow.com/q/29265131
tags question: http://stackoverflow.com/q/29336360
tags question: http://stackoverflow.com/q/29334425
tags question: http://stackoverflow.com/q/29333353
tags question: http://stackoverflow.com/q/29316348
tags question: http://stackoverflow.com/q/29326937
tags question: http://stackoverflow.com/q/29242606
tags question: http://stackoverflow.com/q/29240324
tags question: http://stackoverflow.com/q/29243454
tags question: http://stackoverflow.com/q/29236397
tags question: http://stackoverflow.com/q/29280766
tags question: http://stackoverflow.com/q/29322857
tags question: http://stackoverflow.com/q/29245468
tags question: http://stackoverflow.com/q/29340496
tags question: http://stackoverflow.com/q/29291083
tags question: http://stackoverflow.com/q/29313960
tags question: http://stackoverflow.com/q/29312224
tags question: http://stackoverflow.com/q/29256496
tags question: http://stackoverflow.com/q/29351559
tags question: http://stackoverflow.com/q/29366809
tags question: http://stackoverflow.com/q/29254166
tags question: http://stackoverflow.com/q/29235071
tags question: http://stackoverflow.com/q/29227577
tags question: http://stackoverflow.com/q/29247623
tags question: http://stackoverflow.com/q/29364003
tags question: http://stackoverflow.com/q/29342332
tags question: http://stackoverflow.com/q/29242204
tags question: http://stackoverflow.com/q/29273550
tags question: http://stackoverflow.com/q/29352105
tags question: http://stackoverflow.com/q/29270225
tags question: http://stackoverflow.com/q/29290058
tags question: http://stackoverflow.com/q/29224505
tags question: http://stackoverflow.com/q/29246150
tags question: http://stackoverflow.com/q/29229946
tags question: http://stackoverflow.com/q/29254432
tags question: http://stackoverflow.com/q/29328353

http://stackoverflow.com/a/29375125
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29310699
answers question: http://stackoverflow.com/q/29310699
type: Answer
has body: I changed my JSON data to call the index of status and errorCode instead of calling the scope: "status": 0, "errorCode": 0, I also changed my HTML to reflect the changes so my data would appear in the table: &lt;td&gt;{{status[app.status].name}}&lt;/td&gt; &lt;td&gt;{{errorCode[app.errorCode].name}}&lt;/td&gt;
score: 0

http://stackoverflow.com/comment/67195052
type: Comment
comment on: http://stackoverflow.com/a/29234106
score: 0
type: AnswerComment
has text: Maybe you should read the answer as: 'Your tables MUST have a primary key, so it cannot be disabled, but you can change the name/definition of it'. Not sure whether it's actually impossible to completely disable it though.

http://stackoverflow.com/comment/46899285
score: 0
type: Comment
type: QuestionComment
has text: Why *wouldn't* it "work"? It is doing exactly that which is requested ..
comment on: http://stackoverflow.com/q/29357279

http://stackoverflow.com/comment/46725213
score: 0
type: Comment
has text: hi @mike.thanks for the reply.it is removing the first parentheses and unable to remove spaces also .if input: ( "font -format" ) --> "font-format" ) and i want like this --> ("font-format")
type: AnswerComment
comment on: http://stackoverflow.com/a/29261361

http://stackoverflow.com/comment/46774737
score: 0
comment on: http://stackoverflow.com/q/29288664
type: Comment
type: QuestionComment
has text: You cannot perform a replace on 'summary.total_formatted' before bind it?

http://stackoverflow.com/comment/46889110
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29351884
has text: I'm getting this error in Firebug TypeError: trainingExpiration.setValue is not a function
score: 0

http://stackoverflow.com/comment/46725371
type: Comment
type: QuestionComment
has text: @mccainz I am doing this inside of a controller. Can you explain to me why this is a bad idea? Also, what should I do instead?
score: 0
comment on: http://stackoverflow.com/q/29261016

http://stackoverflow.com/q/29309856
tagged with: javascript
possible better answer: http://stackoverflow.com/a/29310872
has answer: http://stackoverflow.com/a/29310872
tagged with: google-maps-api-3
answer count: 2
tagged with: google-maps
accepted answer: http://stackoverflow.com/a/29311408
downvote count: 0
has body: I have loaded a geojson file successfully on my map. I am able to click each polygon to change stroke and access its properties. But I want to find out if certain points are within each multipolygon. I have used google.maps.geometry.poly.containsLocation() for normal polygons. Is there either a way to extract the polygon from event.feature.getGeometry()... to use in containsLocation or another method to check for this? map.data.loadGeoJson('inc-tracts.json'); var featureStyle = { strokeColor: '#000000', strokeOpacity: 0.5, strokeWeight: 3, } map.data.setStyle(featureStyle); map.data.addListener('click', function(event) { console.log(event.feature.getProperty("CTNAME")); // This is where I want to check if point(s) fall within it. }
favorite count: 0
upvote count: 6
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29311408
score: 6
type: Question
has title: Google Maps 3 API - Click on feature (from geojson) and check if it contains location(s)

http://stackoverflow.com/q/29246256
has comment: http://stackoverflow.com/comment/46697967
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has body: I have eight scripts on the body of the html such as, they take some space. I tried to remove this by adding a div and inside the div I put disply:none. it didn't work then as for the following link http://www.sitepoint.com/forums/showthread.php?336853-weird-spacing-issue-from-script-tag I changed it to margin-top : -12px it didn't work. after that i changed -12 -84 since I had 8 script that also didn't change a thing. my div is like this now. .hiddenScript{ margin-top : -1000px; margin-bottom : -1000px; padding-top: -1000px; height: -1000px; } All of these steps didn't change a thing. Please let me know what i'm doing wrong. thanx in advance.
answer count: 0
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/11557974
has comment: http://stackoverflow.com/comment/46698125
type: Question
has title: Spacing generating from script tag
has comment: http://stackoverflow.com/comment/46699323
tagged with: javascript
score: 0

http://stackoverflow.com/comment/46772929
type: AnswerComment
type: Comment
has text: Yes it will work for classes, its still more performant than finding every span in a page, then return the one(s) in your container, ID just ensures its restricted to one element
comment on: http://stackoverflow.com/a/29286804
score: 2

http://stackoverflow.com/q/29259047
has answer: http://stackoverflow.com/a/29259153
score: 0
possible better answer: http://stackoverflow.com/a/29259153
has title: skipping spaces with javascript
accepted answer: http://stackoverflow.com/a/29259205
tagged with: javascript
has comment: http://stackoverflow.com/comment/46720511
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
has body: here i have a javascript/html code. My code is supposed to read a string of one or more zipcodes from the user and return the first non-valid zipcode. It should ignore spaces. the user can only use the zipcodes 48103, 48104, 48105, 48106, 48197, 48198. anything else should be invalid. My code mostly works except when the user puts in more than one space to separate the zipcodes. so for example if the user enters "48103, space , space, space, 98324" my program should return 98324 but it just returns the space. Can anyone help? Thank you Due 03/30 Test String
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/29259205
has comment: http://stackoverflow.com/comment/46720499
has comment: http://stackoverflow.com/comment/46720481

http://stackoverflow.com/q/29229665
has answer: http://stackoverflow.com/a/29229875
tagged with: javascript
has answer: http://stackoverflow.com/a/29230065
favorite count: 0
has comment: http://stackoverflow.com/comment/46666261
linked to: http://stackoverflow.com/q/2631001
type: Question
has comment: http://stackoverflow.com/comment/46665956
accepted answer: http://stackoverflow.com/a/29229875
has title: Checking if property of property exists
has comment: http://stackoverflow.com/comment/46666014
upvote count: 2
answer count: 3
has answer: http://stackoverflow.com/a/29230090
has body: generaly, if I want to check if obj.foo.bar exits, I will do this: if( typeof obj != "undefined" &amp;&amp; typeof obj.foo !== "undefined" &amp;&amp; typeof obj.foo.bar !== "undefined" ){ action() } this is quite ugly and repetitious, and sadly I have to use it a lot. I believe there won't be any function isDefined() available to do so, because even empty function (function isDefined(){}) will throw an error when if(isDefined(obj.foo.bar)){action()} So, is there any smart way to check that obj.foo.bar exits? EDIT: Approaches using string parsing (or just passing variables as string) are extremely problematic - since minifier might be in use. typeof obj != "undefined" could be replaced with obj. This solution still doesn't satisfy me. EDIT 2 - Solution: as proposed here var a = { b: { c: 'd' } }; function isDefined(fn) { var value; try { value = fn(); } catch (e) { value = undefined; } finally { return value !== undefined; } }; // ES5 console.log( isDefined(function () { return a.b.c; }), //return true isDefined(function () { return a.b.c.d.e.f; }) //returns false ); // ES6 using the arrow function console.log( isset(() =&gt; a.b.c), isset(() =&gt; a.b.c.d.e.f) ); I have approved @T.J. Crowder's solution and not @somethinghere's one because at the end the regular solution is shorter, and because try catch statements have other purpose and can cause problems
score: 2
linked to: http://stackoverflow.com/q/6491463
type: AnsweredQuestion
downvote count: 0
possible better answer: http://stackoverflow.com/a/29230065

http://stackoverflow.com/q/29365713
has title: Angular animate parent div of ng-view using element insde ng-view
downvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
tagged with: css-animations
has comment: http://stackoverflow.com/comment/46946301
has body: Is it possible to css animate a div (background-color) that is outside the ng-view, using a directive on a $state inside the ng-view? The ng-view has css animations for the routing. If I do not animate the div then the ng-view anims work fine, but.. If I add animation classes to the div(bgId) then the routing anims do not fire. Here is a sample of html: (Button added as example - would normally be in the template pages eg. home.html / login.html ) change colour This is controlled by a directive(swapcolour) that gets the nxtpage value from the button attr and updates the colorVal in MainCtrl. //MainCtrl.js .controller('MainCtrl', ['$scope', '$state', function($scope, $state) { $scope.colorVal = 'redBg'; }]) //Directive.js .directive('swapcolour', function ($rootScope, $state) { var pageArr = [{home:'redBg'},{login:'blueBg'}]; return function (scope, element, attrs) { var nextPageNum = attrs.nxtpage; var obj = pageArr[nextPageNum]; var item = Object.keys(obj); var objItem = obj[item]; element.bind('click', function () { $state.transitionTo(item[0]); $rootScope.$$childHead.colorVal = objItem; }); } }]) I do not know why it fails. Any ideas?? I am new to directives. (Trying to setup a plunker, but having issues getting ionic working with it)
has answer: http://stackoverflow.com/a/29397109
tagged with: angularjs
type: UnansweredQuestion
upvote count: 1
tagged with: angularjs-directive
has comment: http://stackoverflow.com/comment/46946639
tagged with: angular-ui-router
score: 1
type: Question

increment
tags question: http://stackoverflow.com/q/29361569
tags question: http://stackoverflow.com/q/29268524
tags question: http://stackoverflow.com/q/29320657
type: Tag
tag name: increment
tags question: http://stackoverflow.com/q/29304105

http://stackoverflow.com/comment/46736112
has text: That now makes sense. Made me look into something and have now sorted it, thanks.
type: QuestionComment
comment on: http://stackoverflow.com/q/29267005
score: 0
type: Comment

http://stackoverflow.com/comment/46902958
type: AnswerComment
has text: You mus do it on page load. Like `$(function(){ $("#Main4").removeAttr("href"); });` Looks like when you're trying to remove the link was not added to the page. That's why it's not removed
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29359224

http://stackoverflow.com/comment/46650205
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29220633
has text: It is not obvious why he has a two level array. Possibly he needs a flattening step...
type: AnswerComment

http://stackoverflow.com/a/29351865
answers question: http://stackoverflow.com/q/29351770
has body: a and b do not equal the same number. In the first iteration: c = a + b // 1 + 2 a = b // 2 b = c // 3 what don't you understand?
downvote count: 1
has comment: http://stackoverflow.com/comment/46889053
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/46889630
upvote count: 1
has comment: http://stackoverflow.com/comment/46890513

http://stackoverflow.com/comment/46801844
type: AnswerComment
has text: @PraveenKumar Array index starts from 0, so `c[10]` becomes 11th element.. simple count
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29280417

http://stackoverflow.com/q/29341003
downvote count: 3
type: Question
has body: I am making a online quiz system and i want to convert my timer from seconds to minutes and seconds. Please help me to solve this problem here is my code &lt;div id="divCounter"&gt;&lt;/div&gt; &lt;script type="text/javascript"&gt; if(localStorage.getItem("counter")){ if(localStorage.getItem("counter") &lt;= 0){ var value = 110; } else{ var value = localStorage.getItem("counter"); } } else{ var value = 10; } var counter = function (){ document.getElementById('divCounter').innerHTML = localStorage.getItem("counter"); if(value &lt;= 0){ window.location="http://www.google.com" }else{ value = parseInt(value)-1; localStorage.setItem("counter", value); } }; var interval = setInterval(function (){counter(value);}, 1000);
tagged with: javascript
score: -1
has answer: http://stackoverflow.com/a/29341178
answer count: 3
possible better answer: http://stackoverflow.com/a/29341146
favorite count: 0
has answer: http://stackoverflow.com/a/29341146
upvote count: 2
has title: how to convert seconds to minutes using javascript...?
has answer: http://stackoverflow.com/a/34251550
accepted answer: http://stackoverflow.com/a/29341178
type: AnsweredQuestion

boolean
tags question: http://stackoverflow.com/q/29265627
tag name: boolean
tags question: http://stackoverflow.com/q/29336425
tags question: http://stackoverflow.com/q/29358815
type: Tag

http://stackoverflow.com/a/29357992
score: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/46900562
has body: You can use localStorage on client side &lt;script&gt; localStorage.setItem("mykey",99); // set a variable var varNumber = localStorage.getItem("mykey"); // retrieve variable &lt;/script&gt;
upvote count: 3
answers question: http://stackoverflow.com/q/29357931
type: Answer

http://stackoverflow.com/q/29371065
has comment: http://stackoverflow.com/comment/46923258
type: Question
score: 1
has comment: http://stackoverflow.com/comment/46923861
has comment: http://stackoverflow.com/comment/46923331
has comment: http://stackoverflow.com/comment/46923092
has comment: http://stackoverflow.com/comment/46924787
upvote count: 1
has comment: http://stackoverflow.com/comment/46923386
downvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/46923516
tagged with: javascript
has comment: http://stackoverflow.com/comment/46936663
has comment: http://stackoverflow.com/comment/46923574
favorite count: 0
has comment: http://stackoverflow.com/comment/46923024
has comment: http://stackoverflow.com/comment/46923360
has body: I would like to know if there is a way to return a JS class's value by default instead of of reference to the class object itself. Let's say, for example, I want to wrap a string.. var StringWrapper = function(string) { this.string = string; }; StringWrapper.prototype.contains = function (string) { if (this.string.indexOf(string) >= 0) return true; return false; }; var myString = new StringWrapper("hey there"); if(myString.contains("hey")) alert(myString); // should alert "hey there" if(myString == "hey there") // should be true doSomething(); and now I want to get string just by using myString rather than myString.string. Is this doable somehow? Edit I took the console.log(myString) out of the question, because console.log has behavior that I didn't originally take into account. This question isn't about log.
accepted answer: http://stackoverflow.com/a/29371185
has comment: http://stackoverflow.com/comment/46924094
has comment: http://stackoverflow.com/comment/46925498
type: AnsweredQuestion
has title: Return JavaScript class value instead of object reference
has comment: http://stackoverflow.com/comment/46924000
has answer: http://stackoverflow.com/a/29371185
has comment: http://stackoverflow.com/comment/46923183
has comment: http://stackoverflow.com/comment/46922998

http://stackoverflow.com/q/29227223
has answer: http://stackoverflow.com/a/29227327
linked to: http://stackoverflow.com/q/6421639
linked to: http://stackoverflow.com/q/10150877
type: Question
downvote count: 0
tagged with: javascript
tagged with: tizen-web-app
linked to: http://stackoverflow.com/q/12467542
answer count: 1
has comment: http://stackoverflow.com/comment/46661751
linked to: http://stackoverflow.com/q/995183
has comment: http://stackoverflow.com/comment/46661704
favorite count: 0
has comment: http://stackoverflow.com/comment/46661670
has comment: http://stackoverflow.com/comment/46661695
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has body: I have a text box that should take only float value. It should not allow any other value. How to do it. I did this in HTML. Weight But, it is not Working? How to do it.
has title: Java Script Text Box
score: 1
upvote count: 1

http://stackoverflow.com/q/29284122
has title: How to create re-direct to login page in ASP.NET?
type: Question
has answer: http://stackoverflow.com/a/29284415
has answer: http://stackoverflow.com/a/29284334
tagged with: c#
has comment: http://stackoverflow.com/comment/46766168
tagged with: webforms
score: 0
has comment: http://stackoverflow.com/comment/46809509
has body: Using ASP.NET, what is the best way to re-direct a user to my login page, if they attempt to visit a page that's meant for logged-in users? Note: Not sure if this matters, but I'm using ASP.NET WebForms, but I'm not actually using any WebForms. The front end is pure jQuery/HTML/CSS that communicates using jQuery $.getJSON() or $.post() with backend *.ashx files Do I have to add code to the Page_Load() event of my form? Or is there central "redirector" sort of file that I can use? Thanks!
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46766054
tagged with: asp.net
possible better answer: http://stackoverflow.com/a/29284334
has comment: http://stackoverflow.com/comment/46766509
has answer: http://stackoverflow.com/a/29307752
answer count: 3
accepted answer: http://stackoverflow.com/a/29307752
type: AnsweredQuestion

http://stackoverflow.com/comment/46732658
comment on: http://stackoverflow.com/q/29265131
has text: Do you see any error in your console? What is the value of `x`?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29328835
upvote count: 1
has comment: http://stackoverflow.com/comment/47070779
type: Question
has body: Is there a way to save CKEditor (text) data as a textfile local on a disk so one can open it later and proceed with editing ? Just like wordprocessors do ?
score: 1
has answer: http://stackoverflow.com/a/29452448
has comment: http://stackoverflow.com/comment/47071313
has comment: http://stackoverflow.com/comment/47071212
has comment: http://stackoverflow.com/comment/47071351
linked to: http://stackoverflow.com/q/20537696
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/47070971
tagged with: javascript
tagged with: ckeditor
tagged with: jquery
linked to: http://stackoverflow.com/q/4240524
has comment: http://stackoverflow.com/comment/47071278
favorite count: 0
has comment: http://stackoverflow.com/comment/46847547
linked to: http://stackoverflow.com/q/5053244
has title: Saving text from CkEditor local on disk
has comment: http://stackoverflow.com/comment/47070868
type: UnansweredQuestion

http://stackoverflow.com/q/29312669
has title: How to launch Skype without being redirected by window.location in Javascript?
has comment: http://stackoverflow.com/comment/46833964
type: Question
answer count: 2
linked to: http://stackoverflow.com/q/2841676
tagged with: javascript
tagged with: jquery
has body: I am not sure if this is possible or maybe I am just doing it the wrong way. What I want to do is to call a function which checks the database to get the skype id (user B) and verify if user A is login. If user A is login and a Skype ID for user B is found then start up Skype. If not, nothing happens. Sounds simple enough.... A function is called when a user (user A) click on an image button on a form. For example on start.html &lt;a href="#" onclick="skypeme('var1','var2'); return false"&gt;&lt;img src="images/chat.png" &gt;&lt;/a&gt; skypeme is a javascript function like this: &lt;script&gt; function skypeme(a,b) { window.location = 'skypeme.cfm?a=' + a + '&amp;b=' + b; } &lt;/script&gt; which calls skypeme.cfm to do all the database checking: check the database and see if user A is login.... if user A is login, check if user B has skype ID if skype id is found for user B do this &lt;script language="javascript"&gt; window.location = 'skype:#skype_id#?chat'; &lt;/script&gt; else do nothing else user A is not login &lt;script language="javascript"&gt; signin('#a#','#b#'); &lt;/script&gt; The skypeme.cfm is doing its job and start up Skype when everything is checked out fine. However, the problem is when user click on the button on start.html, he is directed to a blank page skypeme.cfm (skypeme.cfm doesn't display anything but checking) then the skype starts. Is there any way to do it so that when the user click on the chat button on start.html, he will REMAIN on the start.html page while skype.cfm check the database and kick up Skype with javascript code? This maybe something simple but I just can't get it to do that. Any help is appreciated. Thanks in advance.
has comment: http://stackoverflow.com/comment/47333303
score: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46829405
has answer: http://stackoverflow.com/a/38264689
has answer: http://stackoverflow.com/a/53832103
type: UnansweredQuestion
tagged with: skype
has comment: http://stackoverflow.com/comment/46834059
has comment: http://stackoverflow.com/comment/46824281
tagged with: coldfusion
has comment: http://stackoverflow.com/comment/47382180

http://stackoverflow.com/a/29274892
score: 3
upvote count: 3
answers question: http://stackoverflow.com/q/29274826
downvote count: 0
has body: Try using CSS @media Rule, and specify your styles accordingly.
type: Answer

http://stackoverflow.com/q/29234297
tagged with: jquery
accepted answer: http://stackoverflow.com/a/29242146
has body: Fiddle: http://jsfiddle.net/1bgun0k0/1/ I have a DIV with several child SPANs. Alpha Beta Gamma Child elements have a margin: #parent { padding: 5px; } .child { margin: 5px; } When user clicks between child elements (or at either end of the parent DIV outside a child element), I need to insert a new child there. How do I detect between which child elements user clicked? Update: I need to support multiple rows of children (thanks, Roko, for the heads-up). Clicks between rows should be ignored. Clicks on the left and right side of the whole row should be handled correctly.
possible better answer: http://stackoverflow.com/a/29234583
has comment: http://stackoverflow.com/comment/46675112
has answer: http://stackoverflow.com/a/29234583
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has title: How to find nearest child to a click location?
answer count: 5
type: AnsweredQuestion
score: 3
has answer: http://stackoverflow.com/a/29242146
upvote count: 3
has answer: http://stackoverflow.com/a/29234455
has comment: http://stackoverflow.com/comment/46675042
type: Question
has answer: http://stackoverflow.com/a/29235187
has answer: http://stackoverflow.com/a/29234638
linked to: http://stackoverflow.com/q/7478336
downvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/46937716
type: Comment
has text: See my revisions above to the answer. And be sure to read the new last paragraph.
comment on: http://stackoverflow.com/a/29360608
score: 0
type: AnswerComment

http://stackoverflow.com/a/29271519
score: 0
type: Answer
has body: The reason for writing your jQuery inside document ready is to ensure that you don't get an error by trying to select a DOM element that isn't in the document yet. So if you're event involves some DOM element not waiting for document ready could cause an error.
answers question: http://stackoverflow.com/q/29271466

http://stackoverflow.com/comment/46826744
type: QuestionComment
comment on: http://stackoverflow.com/q/29317438
score: 1
has text: `JSON.parse(yourString);`
type: Comment

http://stackoverflow.com/comment/46891768
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29352839
type: AnswerComment
has text: console.log(response) gives: Object {data: "", status: 200, headers: function, config: Object}

http://stackoverflow.com/comment/93667759
type: AnswerComment
score: 0
type: Comment
has text: this is very old code, you would rather add it to a scene instead of a game now. and you actually don´t need to keep the reference, because "this.scene" would return the scene of the sprite.
comment on: http://stackoverflow.com/a/35655456

http://stackoverflow.com/q/29277387
type: Question
score: 3
has title: Embedding multiple levels collection of forms in Symfony2
tagged with: javascript
answer count: 2
downvote count: 0
tagged with: jquery
has answer: http://stackoverflow.com/a/29370084
favorite count: 0
tagged with: symfony-forms
accepted answer: http://stackoverflow.com/a/29370084
tagged with: symfony
has body: I have the following situation: the CVCFormType is a collection of BenefiItemsFormType. Each BenefitItemFormType has one field that is a collection of BenefitGroupFormType. I want to be able to dynamically add and remove elements. I followed the instructions here. Of course they must be tweaked as we talk about nested collections. On the "fixed" side everything is ok. On the dynamic side (to add and remove elements) so far I've implemented only the inner side (adding BenefitGroups) and only for adding fields. Here is what I get (which is not right). I have a double link on the top Benefit Item (I should have only one), plus the two group of links (of the first benefit item and of the second one) are not independent (I click on the second of the one above and it adds a field to the one below). I think I'll have to dynamically change the ul class name. Any help? Here is a screenshot: And here is the code: {% extends "internal.html.twig" %} {% block content %} {{ form_start(form) }} &lt;br&gt;&lt;b&gt;CVC&lt;/b&gt; {% for benefititem in form.benefititems %} &lt;br&gt;&lt;b&gt;Benefit Item&lt;/b&gt; {{ form_row(benefititem.comment) }} &lt;br&gt;&lt;b&gt;Benefit Groups&lt;/b&gt; {# &lt;ul class="benefitgroups"&gt; #} &lt;ul class="benefitgroups" data-prototype=""&gt; {% for benefitgroup in benefititem.benefitgroups %} &lt;li&gt;{{ form_row(benefitgroup.name) }}&lt;/li&gt; {% endfor %} &lt;/ul&gt; {% endfor %} {{ form_end(form) }} {% block javascripts %} &lt;script&gt; var $collectionHolder; // setup an "add a benefitgroup" link var $addBenefitGroupLink = $('&lt;a href="#" class="add_benefitgroup_link"&gt;Add a Group&lt;/a&gt;'); var $newLinkLi = $('&lt;li&gt;&lt;/li&gt;').append($addBenefitGroupLink); jQuery(document).ready(function() { // Get the ul that holds the collection of benefit groups $collectionHolder = $('ul.benefitgroups'); // add the "add a benefitgroup" anchor and li to the benefitgroups ul $colle…
type: AnsweredQuestion
upvote count: 3
possible better answer: http://stackoverflow.com/a/29432986
has answer: http://stackoverflow.com/a/29432986

http://stackoverflow.com/a/29287100
downvote count: 0
has comment: http://stackoverflow.com/comment/46771680
type: Answer
accepted answer of: http://stackoverflow.com/q/29287065
answers question: http://stackoverflow.com/q/29287065
has comment: http://stackoverflow.com/comment/46771530
has body: if (wal &lt; "100") should be changed to if (parseInt(wal, 10) &lt; 100) to properly compare numbers data types.
upvote count: 5
has comment: http://stackoverflow.com/comment/46771554
score: 5
has comment: http://stackoverflow.com/comment/46771632
type: AcceptedAnswer

http://stackoverflow.com/a/29256809
upvote count: 1
has comment: http://stackoverflow.com/comment/46716519
answers question: http://stackoverflow.com/q/29256689
score: -1
type: Answer
has body: I see no other option as to walk to the whole arrays again to check if they contains your new generated value(s).
downvote count: 2

http://stackoverflow.com/q/29350216
tagged with: websocket
tagged with: jquery
linked to: http://stackoverflow.com/q/9336774
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has body: I need an idea in designing a complex html/javascript(jQuery) system communicating with my C++-Webserver. Until now i have a main index.html and I load Submodules by events: $(".MainButton").click(function(){ $("#swap").load($(this).attr('alt')); }); The problem is now that every Submodule needs a Websocket Connection and I dont want to open a new Connection for every Submodule that I am loading. Is it possible to open a global Websocket connection.. var ws = new WebSocket("ws://localhost:800/stream"); .. and use ws in every subpage? Thank you very much.
linked to: http://stackoverflow.com/q/10886910
type: Question
tagged with: javascript
has title: Hold Websocket-Connection over several pages
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/29371968

http://stackoverflow.com/a/29371628
score: 6
type: Answer
accepted answer of: http://stackoverflow.com/q/29348926
has body: The number of slides, and thus sometimes the activeIndex, is "wrong" by design when loops are involved: https://github.com/nolimits4web/Swiper/issues/1205 Best way I could find to get the total number of slides is: mySwiper.slides.length - 2 You could use that to get the current index (this one is zero-based): (mySwiper.activeIndex - 1) % (mySwiper.slides.length - 2) This is not ideal, of course. You could open a GitHub issue and propose adding more convenient ways of accessing these values.
upvote count: 6
answers question: http://stackoverflow.com/q/29348926
has comment: http://stackoverflow.com/comment/101355872
has comment: http://stackoverflow.com/comment/46934298
has comment: http://stackoverflow.com/comment/46934344
has comment: http://stackoverflow.com/comment/70325350
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/29240588
score: 1
upvote count: 2
type: AcceptedAnswer
downvote count: 1
type: Answer
has body: chrome.storage.sync.get is an asynchronous operation. Move the alert into the call back function and you will see the proper value. chrome.storage.sync.get("conversion", function(fetched) { var tempCon = fetched.conversion, conversionFactor; if(tempCon.includes('toKG')) { conversionFactor = 0.45; } else { conversionFactor = 2.2; } console.log(conversionFactor); });
accepted answer of: http://stackoverflow.com/q/29240558
answers question: http://stackoverflow.com/q/29240558

http://stackoverflow.com/comment/46656266
has text: facepalm!! I'm such an idiot - that's 90 minutes of my life I wont get back
type: Comment
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/29223930

http://stackoverflow.com/a/29326608
has body: You can replace following code from var newField = newFields.childNodes; for (var i = 0; i &lt; newField.length; i++) { var theName = newField[i].name if (theName) newField[i].name = theName + counter; } to var newField = newFields.querySelectorAll("input"); for(var i=0; i&lt;newField.length; i++){ var theName = newField[i].name; if(theName) newField[i].name = theName + counter; } Check this link at w3schools for details. Note that above implementation doesn't clear the values in the newly added section. You will have to manually clear it off. Updated with browser screenshot
has comment: http://stackoverflow.com/comment/46843514
type: Answer
score: 1
has comment: http://stackoverflow.com/comment/46843559
upvote count: 1
has comment: http://stackoverflow.com/comment/46843533
accepted answer of: http://stackoverflow.com/q/29326473
answers question: http://stackoverflow.com/q/29326473
has comment: http://stackoverflow.com/comment/46843440
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46843497

http://stackoverflow.com/comment/46765010
type: QuestionComment
has text: I think we still need to see more HTML and JavaScript. We need to see how you set statecode, what the value of cityConfirmAutoCompletionOption is, and we should see what your select input looks like (.find-city).
comment on: http://stackoverflow.com/q/29281469
score: 0
type: Comment

http://stackoverflow.com/comment/46789487
type: AnswerComment
comment on: http://stackoverflow.com/a/29296959
score: 0
has text: @stribizhev..Number should be only in range [1,2,3,4....25] not more than that and not even less than 1 as well. your regex accepts 0 as well..
type: Comment

http://stackoverflow.com/q/29294094
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/29294985
tagged with: javascript
has comment: http://stackoverflow.com/comment/46785029
score: 0
answer count: 1
tagged with: jquery
favorite count: 0
accepted answer: http://stackoverflow.com/a/29294985
tagged with: http://stackoverflow.com/tag/svg
has title: Undo , Redo in Javascript With Local Storage
has comment: http://stackoverflow.com/comment/46785791
has body: Undo and Redo in Javascript and every event i want to store in local storage as a object FIDDLE [http://jsfiddle.net/fdq68tbc/][1]
has comment: http://stackoverflow.com/comment/46784379
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46784359
has comment: http://stackoverflow.com/comment/46784354
has comment: http://stackoverflow.com/comment/46784343
upvote count: 1
has comment: http://stackoverflow.com/comment/46785554

http://stackoverflow.com/comment/46742457
type: Comment
has text: The problem is that Angular aren't sending the request to reload the page.
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/29270881

http://stackoverflow.com/a/34563103
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29290563
has body: I don't think there is any way to get the auto port discovery to work without modifying the actual Socket.io code or waiting for a fix. The simplest thing you could do is just insert the current location.port including a colon before your namespace. var admin_socket = io(':' + location.port + '/admin'); var user_socket = io(':' + location.port + '/user'); Or create a new function that will create a socket for you. function sio(nsp) { return io(':' + location.port + nsp); }

http://stackoverflow.com/a/29246593
type: Answer
score: 6
downvote count: 0
answers question: http://stackoverflow.com/q/29246298
accepted answer of: http://stackoverflow.com/q/29246298
upvote count: 6
type: AcceptedAnswer
has body: I wonder whether this would be the best practice or not. However If the value doesn't need to be secure, one of the most simple way to pass constant values from server is something like this. In html. &lt;script type="text/javascript"&gt; var _config = { key1: server_value1, key2: server_value2 }; &lt;/script&gt; In angular module run method. angular.module('yourapp', []) .run(function($rootScope) { $rootScope.config = _config; }); In your controller. console.log($scope.config);

http://stackoverflow.com/q/29334658
score: 0
has title: return false not preventing click
accepted answer: http://stackoverflow.com/a/29334703
type: Question
tagged with: javascript
tagged with: jquery
answer count: 1
has answer: http://stackoverflow.com/a/29334703
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has body: I have this jquery to prevent click , but its not working , why ? HTML Favorite Javascript $(document).ready(function() { $(document).on("click","a.fav-auto",function(e) { $.get($(this).attr("href"),function(fav-lin) { var fav-pos = $(fav-lin).find('.fav-mess-in'); var fav-pis2 = $(this).attr("href"); $('fav-mess').empty(); $('fav-mess').append(fav-pos); $('fav-mess').append(fav-pos2); }); return false; }); });

http://stackoverflow.com/comment/46707492
comment on: http://stackoverflow.com/q/29251815
type: Comment
type: QuestionComment
score: 0
has text: yes. It is correct. I am embedding this from code behind

http://stackoverflow.com/a/29264018
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46730977
type: Answer
has comment: http://stackoverflow.com/comment/46730375
score: 3
upvote count: 3
has comment: http://stackoverflow.com/comment/46731476
answers question: http://stackoverflow.com/q/29263969
has comment: http://stackoverflow.com/comment/46730573
has body: Node.js has no concept of versions. The require() function resolves its argument to a full path to a .js file, and caches them by filename. You may be asking how npm installs modules; that depends on the order in which you install them. You can run npm dedup to do nice things here.
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29263969
has comment: http://stackoverflow.com/comment/46730320

http://stackoverflow.com/a/29291459
has comment: http://stackoverflow.com/comment/46779987
answers question: http://stackoverflow.com/q/29291394
downvote count: 0
has body: You would want to loop for each entry in the array.Just send your data to this function and it will create the object function goMap3(data) { var layerSource = { user_name: 'me', type: 'cartodb', sublayers: [] }; //Adds a new sublayer to the layerSource object every iteration. $.each(data, function (i, attr_value) { layerSource.sublayers.push({ sql: "SELECT cartodb_id, the_geom_webmercator FROM mytable where attribute='" + attr_value + "'", cartocss: "#location_fusion_table {marker-fill:#1d5492;marker-width:5;marker-line-width: 0.3;marker- line-color:#fff;marker-allow-overlap: true;" }); }); cartodb.createLayer(map_object, layerSource, options) .addTo(map_object); }
has comment: http://stackoverflow.com/comment/46779845
type: Answer
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/46779864

http://stackoverflow.com/q/29278850
has answer: http://stackoverflow.com/a/29279118
score: 0
has body: I'm trying to create a link that changes into two links when you hover over the text. You can see something like what I want to do here: https://www.kenzo.com/en/ You can see that the collections link changes into two separate links for men and women when you hover over the link. At the moment I have managed to create a link that separates into two words when hovered over but not into two links. Here is my HTML code: Collection And here is my CSS code: #nav-item1:hover span { display:none; } #nav-item1:hover:before { content: "Men Women"; } So the text changes which is great, but I haven't quite figured out how to turn the text into two separate links. I'm not sure if I have to use JS for this or not, as my JS knowledge terrible. Any ideas?
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29279011
tagged with: css
answer count: 4
type: Question
tagged with: hover
has answer: http://stackoverflow.com/a/29279142
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29279011
has title: Change one link into two on hover
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/29279067
has answer: http://stackoverflow.com/a/29279067

http://stackoverflow.com/q/29239951
accepted answer: http://stackoverflow.com/a/29240404
has title: Change the values of select
has comment: http://stackoverflow.com/comment/46686107
type: Question
answer count: 2
tagged with: javascript
tagged with: drop-down-menu
tagged with: jquery
possible better answer: http://stackoverflow.com/a/29240742
score: 0
has comment: http://stackoverflow.com/comment/46686591
tagged with: http://stackoverflow.com/tag/html
has body: Hi guys I have 2 dropdown list and I need when I click in any option of the dropdown 1 change the options of a dropdown 2 for example: Dropdown menu 1 Dropdown menu 2 - Option 1 - Option 2 - Option 3 If I select in the dropdown 1 ("Option 1") automatic the dropdown 2 will update with some values, if I select in the dropdown 2 ("Option 2") the dropdown 2 will update with some values and the same for other options!!! How I can do that using Javascript or Jquery?
has answer: http://stackoverflow.com/a/29240742
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29240404

http://stackoverflow.com/a/29310406
upvote count: 1
has body: You need to use localStorage API. http://www.w3schools.com/html/html5_webstorage.asp Not tested. &lt;script&gt; var count = localStorage.getItem("count") || 0; var button = document.getElementById("countButton"); var display = document.getElementById("displayCount"); button.onclick = function() { count++; display.innerHTML = count; localStorage.setItem("count", count); } &lt;/script&gt;
score: 1
answers question: http://stackoverflow.com/q/29310332
downvote count: 0
type: Answer

http://stackoverflow.com/a/29308283
answers question: http://stackoverflow.com/q/29308129
type: Answer
upvote count: 1
score: 1
downvote count: 0
has body: I think the events fire on the parent.So it should be the element above the .dropdown.So your code should be All Standards Library

http://stackoverflow.com/comment/46732175
has text: its either $scope or the controller as method: http://stackoverflow.com/questions/21287794/angularjs-controller-as-syntax-clarification.. if you dont have access to scope, return a promise and use `then` where you do have access. see this: https://docs.angularjs.org/api/ng/service/$q
comment on: http://stackoverflow.com/a/29264154
score: 0
type: AnswerComment
type: Comment

google-fusion-tables
type: Tag
tags question: http://stackoverflow.com/q/29344099
tag name: google-fusion-tables

http://stackoverflow.com/q/29267701
has body: When clicking on the tabs, the accordion is hiding and showing but not on every click. See fiddle. Home Profile Messages Settings It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. Lorem Ipsum is simply dummy text of the printing and typesetting industry. The first line of Lorem Ipsum, "Lorem ipsum dolor sit amet..", comes from a line in section 1.10.32. The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from "de Finibus Bonorum et Malorum" by Cicero are also reproduced in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham.
tagged with: twitter-bootstrap-3
score: 0
has comment: http://stackoverflow.com/comment/46737278
has answer: http://stackoverflow.com/a/29268657
tagged with: javascript
tagged with: jquery
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46737395
accepted answer: http://stackoverflow.com/a/29268657
type: Question
has title: When clicking on the tabs why not toggle on every click?
answer count: 1
tagged with: css

http://stackoverflow.com/q/29239736
type: AnsweredQuestion
tagged with: numbers
type: Question
answer count: 2
tagged with: function
tagged with: javascript
has body: I have some problems with JavaScript. So far, I have this code: This program generates random numbers from 100 to 999. Start <-- Here's the FUNCTION OF FUNCTIONS..It should generate 3 digits, but only generates 1 :( And it doesn't work like I intended to. It should generate a random number from 100 to 999. (I am generating separate digits because later I will need to check if there are same digits in that number (for example 222)). So what did I do wrong? Any kind of help would be nice. Thank you.
score: 0
tagged with: random
has answer: http://stackoverflow.com/a/29239834
has comment: http://stackoverflow.com/comment/46685720
has title: Generating and checking random numbers in JavaScript
has answer: http://stackoverflow.com/a/29240494
accepted answer: http://stackoverflow.com/a/29240494
possible better answer: http://stackoverflow.com/a/29239834

http://stackoverflow.com/a/29456795
upvote count: 8
answers question: http://stackoverflow.com/q/29334775
type: AcceptedAnswer
score: 8
type: Answer
downvote count: 0
has body: We solved this issue by replacing eventually.throw() with .be.rejected provided by chai-as-promised, since an async function always returns a Promise. That wasn't clear to me in the first place. Have a look at the discussion on github if you like.
accepted answer of: http://stackoverflow.com/q/29334775

http://stackoverflow.com/comment/46699715
has text: what you mean by mask-unmask??
type: QuestionComment
comment on: http://stackoverflow.com/q/29247300
type: Comment
score: 1

http://stackoverflow.com/comment/46851308
has text: Do you know why Its not getting the max-data value from the div? http://jsfiddle.net/houareau/RvSgj/188/
type: Comment
comment on: http://stackoverflow.com/a/29329971
score: 0
type: AnswerComment

http://stackoverflow.com/comment/46910917
comment on: http://stackoverflow.com/q/29363626
type: Comment
has text: Because you can't reference an object literal until it is created, one way to solve your problem is to use a variable: `var c = 10; var obj = { a: c, b: c };` or to create and then add properties: `var obj = {}; obj.a = obj.b = 10;`
score: 0
type: QuestionComment

waveform
tag name: waveform
type: Tag
tags question: http://stackoverflow.com/q/29218645
tags question: http://stackoverflow.com/q/29240409

http://stackoverflow.com/comment/46743601
type: QuestionComment
type: Comment
has text: Another problem related to this issue. I did create a new filter as described in the "answer" and there is now problem with css files. They are not interpreted as CSS now but as text now breaking overall website. Anyone there? Do I post it as a new question?
score: 0
comment on: http://stackoverflow.com/q/29250774

http://stackoverflow.com/comment/46984176
type: QuestionComment
has text: Hi Arvind if I change my function to run from this input button it actually writes the value of the variable onto the input button!!!
comment on: http://stackoverflow.com/q/29360894
score: 0
type: Comment

http://stackoverflow.com/a/32427316
score: 4
answers question: http://stackoverflow.com/q/29251842
has comment: http://stackoverflow.com/comment/54681255
type: Answer
has comment: http://stackoverflow.com/comment/54288335
has body: What you state is incorrect. The server can definitely set cookies, but as with XMLHttpRequest you cannot access them from the API. The only way to observe cookies from JavaScript is document.cookies and we decided not to increase the number of places since we haven't found a good way to do that, while also respecting cookie flags such as HttpOnly.
has comment: http://stackoverflow.com/comment/54668942
has comment: http://stackoverflow.com/comment/54652191
upvote count: 4
accepted answer of: http://stackoverflow.com/q/29251842
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/29354031
tagged with: css
upvote count: 1
has comment: http://stackoverflow.com/comment/46893139
accepted answer: http://stackoverflow.com/a/29358103
has body: i am having a problem with scroll bar on inner content. when i hover a arrow on inner content, scroll bar appears that's what i require. But it just change the content that,s look so odd. What the solution for this property. i want scrrol bar on inner content but dont want change in content? snap without hovering snap when i hover over inner content click here to check live link
type: AnsweredQuestion
has title: What is solution of inner content scroll bar
score: 1
tagged with: javascript
type: Question
answer count: 1
downvote count: 0
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/29358103
has comment: http://stackoverflow.com/comment/46893947
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/29258751
type: AcceptedAnswer
has body: I think it would be cleaner to call check recursively. You should avoid having two separate setTimeouts (it could end up netting you unexpected results, especially in a scenario where the timeouts are interdependent) - read up on the event loop if you are not familiar with how it works. var TIMEOUT_DUR = 200; var MAX = 5000; var accum = 0; function check () { if ( accum &gt;= MAX ) { $log.error( '...' ); return; } setTimeout( function () { if ( currentModules[ name ] ) { // do things return; } accum += TIMEOUT_DUR; check(); }, TIMEOUT_DUR ); }
type: Answer
has comment: http://stackoverflow.com/comment/46720162
accepted answer of: http://stackoverflow.com/q/29258419
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/46720514
answers question: http://stackoverflow.com/q/29258419
upvote count: 1

http://stackoverflow.com/comment/46797121
type: QuestionComment
comment on: http://stackoverflow.com/q/29301223
score: 1
has text: i have this error : `Uncaught ReferenceError: wall is not defined`
type: Comment

http://stackoverflow.com/q/29306967
tagged with: function
answer count: 1
tagged with: javascript
score: 0
has body: I am trying to implement the math.frexp function in python. See here if you're confused. Apparently, I am working on this program on Khan Academy. However, it is PJS and does not support DataView or ArrayBuffer. Can someone please help me with this implementation this? Here is the current code (commented out because of DataView/ArrayBuffer). I found this on the Internet. var frexp = function(value) { if (value === 0){ return [value, 0]; } var data = new DataView(new ArrayBuffer(8));//Does not support DataView and ArrayBuffer objects. data.setFloat64(0, value); var bits = (data.getUint32(0) &gt;&gt;&gt; 20) &amp; 0x7FF; if (bits === 0) { data.setFloat64(0, value * Math.pow(2, 64)); bits = ((data.getUint32(0) &gt;&gt;&gt; 20) &amp; 0x7FF) - 64; } var exponent = bits - 1022, mantissa = value * Math.pow(2, -exponent); return [mantissa, exponent]; };
tagged with: python
accepted answer: http://stackoverflow.com/a/29307536
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29307536
tagged with: math
type: Question
has title: Having a hard time converting python to JS

http://stackoverflow.com/a/29313541
has comment: http://stackoverflow.com/comment/46820413
has comment: http://stackoverflow.com/comment/46820214
answers question: http://stackoverflow.com/q/29313520
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46820300
type: Answer
has comment: http://stackoverflow.com/comment/46820335
has comment: http://stackoverflow.com/comment/46820310
has comment: http://stackoverflow.com/comment/46820285
upvote count: 1
has comment: http://stackoverflow.com/comment/46820391
has comment: http://stackoverflow.com/comment/46820360
has comment: http://stackoverflow.com/comment/46820387
score: 1
has comment: http://stackoverflow.com/comment/46820243
accepted answer of: http://stackoverflow.com/q/29313520
has comment: http://stackoverflow.com/comment/46820327
has body: I think you need to add user name and id to the data param in the client. It looks like when server gets it, data is empty. Try {id:id,username:username}

http://stackoverflow.com/comment/46846722
type: Comment
comment on: http://stackoverflow.com/a/29328346
score: 3
has text: Thank you for your reply. I know the solution is socket.io. But my question is "how" can implement it in real time way.
type: AnswerComment

http://stackoverflow.com/q/29365805
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46914581
has comment: http://stackoverflow.com/comment/46914543
has comment: http://stackoverflow.com/comment/46914653
accepted answer: http://stackoverflow.com/a/29365906
type: Question
has comment: http://stackoverflow.com/comment/46914504
has comment: http://stackoverflow.com/comment/46914545
answer count: 1
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29365906
has body: When I create input field with jquery datepicker do not work. I try $(function() { $('.datepick').each(function(){ $(this).datepicker(); }); }); Jquery generated input: Jquery code generate input field $(document).ready(function() { var max_fields = 10; //maximum input boxes allowed var wrapper = $(".input_fields_wrap"); //Fields wrapper var add_button = $(".add_field_button"); //Add button ID var x = 1; //initlal text box count $(add_button).click(function(e){ //on add input button click e.preventDefault(); if(x < max_fields){ //max input box allowed x++; //text box increment $(wrapper).append(' '+ 'Iskustvo od: '+ 'Remove '); //add input box } }); $(wrapper).on("click",".remove_field", function(e){ //user click on remove text e.preventDefault(); $(this).parent('div').remove(); x--; }) });
score: 0
has title: Jquery add input field and datepicker

http://stackoverflow.com/q/29266990
tagged with: http://stackoverflow.com/tag/html
answer count: 1
accepted answer: http://stackoverflow.com/a/29267083
has comment: http://stackoverflow.com/comment/46735953
tagged with: css
has answer: http://stackoverflow.com/a/29267083
has title: jQuery addClass not working on pageload
type: AnsweredQuestion
type: Question
has body: Hey I have a problem that is getting on my nerves and I dont get why this happens. I want to when the page loads, my h1-tag get the class .load so it fades in with a nice effect, the problem is that the addClass dont work and my h1-tag never gets the class load. Some help please..? HTML and jQuery in script-tag: New Era of Swegre SWEGRE DESIGNS CSS: body {background-color:black} .wrapper { position: relative; } h1 { opacity: 0; color:white; font-size: 21px; text-align: center; transition: opacity 1s ease-in; } .load { color:white; opacity: 1; }
tagged with: javascript
tagged with: jquery
score: 0

http://stackoverflow.com/q/29228016
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29228154
type: Question
possible better answer: http://stackoverflow.com/a/29228154
answer count: 2
has answer: http://stackoverflow.com/a/29228111
score: 0
accepted answer: http://stackoverflow.com/a/29228111
has title: jQuery add class to random div after random delay
tagged with: javascript
tagged with: jquery
has body: I'm trying to add a class "flip" to a random "child" div, after a random time period between 0.5 and 5 seconds. The class should then be removed three seconds later. The divs are laid out as: and the jquery that I have so far is: $(document).ready(function () { var $children = $(".child"); var interval = setInterval(function () { var $d = $children.not(".flip"); $d.eq(Math.floor(Math.random() * $d.length)).addClass('flip'); if ($d.length == 1) { clearInterval(interval); } }, Math.floor((Math.random() * 4500) + 500)); }); Not too sure how to remove the class again after 3 seconds tho? Thanks!

http://stackoverflow.com/comment/46861787
type: Comment
score: 0
has text: moment("2015/05/09 8:00 PM").format("YYYY-MM-DDTHH:mm:ss") returns "2015-05-09T20:00:00".
type: AnswerComment
comment on: http://stackoverflow.com/a/29336751

http://stackoverflow.com/comment/46879695
score: 0
type: Comment
type: QuestionComment
has text: Think he's using ui-router. Try $timeout instead of $interval.
comment on: http://stackoverflow.com/q/29346897

http://stackoverflow.com/a/29356086
type: Answer
has body: Not sure based on just this code but the deleteJob button is being added dynamically and probably doesn't exist at the time you are adding the click event. You should probably use event delegation on the parent element instead. Based on your code this is the li element. If it is part of a &lt;ul&gt; maybe put the click event on it like so: $(function(){ $('ul').on('click','.deleteJob', function(){ deleteJob(); console.log('hello'); }); }); Again, not 100% sure without seeing the rest of the code. But either way, Event Delegation is the way to go.
answers question: http://stackoverflow.com/q/29356000
score: 0

http://stackoverflow.com/a/29288406
has comment: http://stackoverflow.com/comment/46774615
answers question: http://stackoverflow.com/q/29287481
score: 1
accepted answer of: http://stackoverflow.com/q/29287481
has comment: http://stackoverflow.com/comment/46776412
has comment: http://stackoverflow.com/comment/46774429
type: AcceptedAnswer
has body: Since you probably want the game console to still show, you can draw your 100x100 boxes with a reduced alpha (globalAlpha). Here's example code and a Demo: var canvas=document.getElementById("canvas"); var ctx=canvas.getContext("2d"); var cw=canvas.width; var ch=canvas.height; var boxWidth=100; var boxHeight=100; var boxRows=Math.ceil(865/boxHeight); var boxCols=Math.ceil(1152/boxWidth); var boxes=new Array(boxRows*boxCols); for(var i=0;i&lt;boxes.length;i++){boxes[i]=false;} var img=new Image(); img.onload=start; img.crossOrigin='anonymous'; img.src="http://i.imgur.com/RrHayx8.png?1"; function start(){ ctx.drawImage(img,0,0); var d=ctx.getImageData(0,0,cw,ch).data; for(var i=0;i&lt;d.length;i+=4){ if(d[i+3]&gt;200){ var px=parseInt(i/4); var pixelY=parseInt(px/cw); var pixelX=px-pixelY*cw; var boxX=parseInt(pixelX/boxWidth); var boxY=parseInt(pixelY/boxHeight); boxes[boxY*boxCols+boxX]=true; } } ctx.globalAlpha=0.25; ctx.fillStyle='red'; for(var i=0;i&lt;boxes.length;i++){ var y=parseInt(i/boxCols); var x=i-y*boxCols; if(boxes[i]==true){ ctx.fillRect(x*boxWidth,y*boxHeight,boxWidth,boxHeight); } } ctx.globalAlpha=1.00; ctx.fillStyle='black'; } body{ background-color: ivory; } #canvas{border:1px solid red;} &lt;canvas id="canvas" width=1152 height=865&gt;&lt;/canvas&gt;
has comment: http://stackoverflow.com/comment/46777526
upvote count: 1
type: Answer
has comment: http://stackoverflow.com/comment/46774472
downvote count: 0

http://stackoverflow.com/comment/46789129
type: QuestionComment
type: Comment
score: 0
comment on: http://stackoverflow.com/q/29296805
has text: The REGEX you provided seems to be incorrect.

http://stackoverflow.com/a/29234805
has body: You could use this HTML: &lt;body ng-app="myApp" ng-controller="myController" ng-init="result = { grant_total: 0 }" &gt; &lt;div ng-repeat="i in items"&gt; &lt;input type="text" ng-model="num1" /&gt; &lt;input type="text" ng-model="num2" /&gt; &lt;input type="text" value="{{ result.grant_total = parseInt(result.grant_total) + (num1 * num2) }}" /&gt; &lt;/div&gt; &lt;input type="text" ng-model="result.grant_total" /&gt;
score: 0
answers question: http://stackoverflow.com/q/29234544
type: Answer

http://stackoverflow.com/q/29260246
has comment: http://stackoverflow.com/comment/46753117
tagged with: cordova-plugins
tagged with: ibm-mobilefirst
has body: I'm trying to implement a video chat in Worklight using PhoneRTC. First, I add the Java files to my Worklight application and add the feature in my config.xml. The problem is that when I use the PhoneRTC function in my main.js I get an error in the conversion Converting circular structure to JSON .. Here is my main.js function wlCommonInit() { } var config = { isInitiator : true, stun : { url : 'stun:stun.l.google.com:19302' }, streams : { audio : true, video : false } } var parameters = { container : $('#videoContainer'), local : { position : [ 0, 0 ], size : [ 100, 100 ] } }; function launch() { if (WL.Client.getEnvironment() == WL.Environment.PREVIEW) { WL.SimpleDialog .show( "Cordova Plugin", "Please run the sample in either a Simulator/Emulator or physical device to see the response from the Cordova plug-in.", [ { text : "OK", handler : function() { WL.Logger.debug("Ok button pressed"); } } ]); } else { cordova.exec(RTCSuccess, RTCFailure, "PhoneRTCPlugin", "setVideoView",parameters); } } function RTCSuccess(data) { WL.SimpleDialog.show("Response from plug-in", data, [ { text : "OK", handler : function() { WL.Logger.debug("Ok button pressed"); } } ]); } function RTCFailure(data) { WL.SimpleDialog.show("Response from plug-in", data, [ { text : "OK", handler : function() { WL.Logger.debug("Ok button pressed"); } } ]); } Here is the complete project : https://mega.co.nz/#!gsAXga6L!Rc7yJDzj5GhQA-8gV45gFHFk3jPGmmRN0j5gV3ZihRw
has comment: http://stackoverflow.com/comment/46744217
score: 0
has comment: http://stackoverflow.com/comment/46748726
answer count: 1
has comment: http://stackoverflow.com/comment/46753306
has comment: http://stackoverflow.com/comment/46749049
has comment: http://stackoverflow.com/comment/46724391
has comment: http://stackoverflow.com/comment/46726658
type: UnansweredQuestion
tagged with: phonertc
has comment: http://stackoverflow.com/comment/46727434
tagged with: javascript
has answer: http://stackoverflow.com/a/33107714
has comment: http://stackoverflow.com/comment/46727166
type: Question
has comment: http://stackoverflow.com/comment/46725435
has title: Using PhoneRTC with Worklight
has comment: http://stackoverflow.com/comment/46727629

http://stackoverflow.com/q/29328368
has comment: http://stackoverflow.com/comment/46846581
type: AnsweredQuestion
downvote count: 0
score: 1
has body: For example, I have such request to my server. As a response, I will get an array of objects with parameters: id, name and position. All of these loads into a table. How can I manipulate with an array $scope.employees if i will decide to change it later? An answer from server is: data = [{"id":1,"name":"Jack","position":"City guard"},{"id":2,"name":"Jim","position":"Sheriff"},{"id":4,"name":"Jack","position":"Cruel genius"},{"id":7,"name":"Guy","position":"Manager"}] And how to be sure, that request is already posted into a table, so i can perform some later operations? angular .module('MyApp', []) .controller('MyController', ['$scope', '$http', MyController]); function MyController ($scope, $http) { $http.get("/servlet").success(function(data){ $scope.employees = data; }); } function otherOperation () { $scope.employees.push({ id : 5, name : "John", position : "Manager" }); } HTML code: ID Name Position {{employee.id}} {{employee.name}} {{employee.position}} Button
has comment: http://stackoverflow.com/comment/46846723
type: Question
has title: How to access Angular.js $scope from other method?
upvote count: 1
has answer: http://stackoverflow.com/a/29328711
accepted answer: http://stackoverflow.com/a/29328711
tagged with: javascript
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
tagged with: angularjs

http://stackoverflow.com/comment/46775975
comment on: http://stackoverflow.com/q/29289406
score: 0
has text: You can't download a file over AJAX. You need a regular link.
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29234494
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46675650
tagged with: spring-mvc
type: AnsweredQuestion
tagged with: innerhtml
has body: I am trying to find a way to have the document.getElementById("1").innerHTML to get triggered based on a condition coming from jsp code. For example I have the following jsp code on the jsp page, <c:forEach items="${elements}" var="element"> ${element.elementNumber} ${element.isReserved} </c:forEach> Based on "element.isReserved", I need to change an element (supposedly using .innerHTML)in html. The element in html looks like the following. I have several of these elements. 1 As shown above, it is displayed as a button with value "1". I want to change the value to "X" based on a condition. I can do this directly with js, But I need to make it dependent on the output from spring or the jsp code shown above. My desired output is that the "1" displayed on the button will change to a "X" when the element.isReserved() (inside the jsp code) evaluates to true. Since I have several of the button elements, I need to check for every button if element.isReserved() evaluates to true.
type: Question
has title: call innerHTML based on a condition from jsp code in spring mvc
has answer: http://stackoverflow.com/a/29288296
tagged with: javascript
score: 0
answer count: 1
tagged with: jsp
accepted answer: http://stackoverflow.com/a/29288296

http://stackoverflow.com/q/29324342
accepted answer: http://stackoverflow.com/a/29324419
type: Question
has answer: http://stackoverflow.com/a/29324419
has body: You can see my problem and the code in the link below. I am trying to make the .bg div to completly cover the first section, but it ends up only covering 50%. http://oskarvertetics.kaggteknik.se/portfolio/test2 I have tried playing around with different margins and paddings on different elements but can not get it to work in any way. Any help would be appreciated!
tagged with: javascript
tagged with: jquery
score: 0
has title: fullPage.js, content div not properly placed
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: fullpage.js
tagged with: css
type: AnsweredQuestion

http://stackoverflow.com/q/29272444
type: UnansweredQuestion
tagged with: web-applications
has title: Console.log affect performance ipad webapp?
has comment: http://stackoverflow.com/comment/46745278
type: Question
tagged with: webkit
has comment: http://stackoverflow.com/comment/46745398
tagged with: ios
tagged with: javascript
tagged with: ipad
has comment: http://stackoverflow.com/comment/46745346
has comment: http://stackoverflow.com/comment/46745564
score: 0
has comment: http://stackoverflow.com/comment/46745206
has body: Will it affect ipad webapp performance when I use console.log to log huge object? I mean in production, when I use console.log under the background, will it affect performance?
answer count: 0

http://stackoverflow.com/comment/46728640
score: 2
type: AnswerComment
type: Comment
has text: Well .. you need to better explain what you want to do. It's really unclear as you can see from other answers/ comments
comment on: http://stackoverflow.com/a/29262994

http://stackoverflow.com/q/29281161
has title: Information from my object filled observable array won't show up in my view
answer count: 2
has body: I have found similair questions about the problem I'm having here on SO, but none of them fixed my problem. When I load the page, I retrieve an array of objects from the database using AJAX. They have the properties ID,name and score. The array will be put in a variable called hs. When I console.log the variable hs, it logs the array with the objects inside, so that can not be the problem. (Right?) Now, when I load the page, it doesn't show the information from those objects. That is the issue I'm experiencing! This is a piece of my viewmodel: function initCanvas() { this.playerName = ko.observable(""); this.chosenLevel = ko.observable(); this.chosenDifficulty = ko.observable(); this.availableLevels = ko.observableArray(['Mountains', 'Stars', 'Jungle']); this.difficulty = ko.observableArray(['Makkelijk', 'Normaal', 'Moeilijk']); this.highscores = ko.observableArray(hs); this.personalHighScore = ko.observable(localStorage.getItem("+score") || "Geen record!"); My HTML looks like this: Can you guys help me out? I'm a bit new at Knockout so please forgive me if this is a dumb question. Edit Here's some more information: hs = []; getHighScores(); function getHighScores() { var highScoreArray = []; $.ajax({ url: "../php/score_server.php", data: { "action": "getScore" }, type: 'GET', success: function (result) { var resultParsed = JSON.parse(result); $.each(resultParsed, function (key, value) { hs.push(value); }); }, error: function (jqXHR, textStatus, errorThrown) { console.log(jqXHR); console.log(textStatus); console.log(errorThrown); }, async: true }); } The result looks like this: There's some other bugs as well that I can not fix, like the getHighScores() being fired twice, although I call it only once... And it doesn't matter what the score is, The PHP document I call with my sendHighScore() function will always put 9 in the database. But I might open another question for that later. EDIT 2 $(document).ready(function () { var ctx = document.getElementById('canvas').g…
tagged with: javascript
has answer: http://stackoverflow.com/a/29282835
score: 0
accepted answer: http://stackoverflow.com/a/29282835
possible better answer: http://stackoverflow.com/a/29284174
has comment: http://stackoverflow.com/comment/46763066
has answer: http://stackoverflow.com/a/29284174
type: AnsweredQuestion
tagged with: data-binding
has comment: http://stackoverflow.com/comment/46760235
type: Question
has comment: http://stackoverflow.com/comment/46762518
has comment: http://stackoverflow.com/comment/46762816
tagged with: knockout.js

http://stackoverflow.com/comment/46701094
type: Comment
comment on: http://stackoverflow.com/a/29247746
has text: Ah thank you. I've managed to let it at least return some text now.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/46661455
comment on: http://stackoverflow.com/a/29226346
score: 0
type: Comment
has text: This is called CIDR notation, You can find some god example of regex for CIDR notations here http://blog.markhatton.co.uk/2011/03/15/regular-expressions-for-ip-addresses-cidr-ranges-and-hostnames
type: AnswerComment

http://stackoverflow.com/comment/46940504
comment on: http://stackoverflow.com/q/29356764
type: QuestionComment
type: Comment
has text: It's more apt to close as a *"typo"*. FYI, you should pay close attention to the [documentation](https://dev.twitter.com/rest/reference/get/search/tweets) - *"**q**: A UTF-8, **URL-encoded** search query of 500 characters maximum, including operators"*
score: 1

http://stackoverflow.com/comment/46919749
comment on: http://stackoverflow.com/q/29368274
type: QuestionComment
has text: Use the dev tools that come with your browser. If you right click and `inspect element` then select `console` you will see your javascript error as described by Banana below
type: Comment
score: 0

http://stackoverflow.com/q/29337591
has title: Alter object value base on object value
answer count: 0
type: Question
tagged with: http://stackoverflow.com/tag/json
tagged with: javascript
has comment: http://stackoverflow.com/comment/46863598
linked to: http://stackoverflow.com/q/7364150
score: 0
upvote count: 1
downvote count: 1
duplicate of: http://stackoverflow.com/q/7364150
has comment: http://stackoverflow.com/comment/46863428
tagged with: jquery
has body: Below is the result of my console.log(myJson) [{"placeholdId":1,"itemId":null,"type":null}, {"placeholdId":2,"itemId":null,"type":null}, {"placeholdId":3,"itemId":null,"type":null}, {"placeholdId":4,"itemId":null,"type":null}, {"placeholdId":5,"itemId":5,"type":"food"}, {"placeholdId":6,"itemId":null,"type":"null"}] how can I set the value of my object value base on the placeholdId? for example the 5th item, I want to change the itemId and type to null as well. I'm stuck until here.. var obj = $.parseJSON(json); console.log(obj[4]);
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/a/29248517
type: Answer
has body: If you really only want to filter the array on the condition you give, this is all the code you need: myArray.filter(function(item) { return item &gt; 2 })
score: 0
has comment: http://stackoverflow.com/comment/46701975
has comment: http://stackoverflow.com/comment/46701634
has comment: http://stackoverflow.com/comment/46701709
has comment: http://stackoverflow.com/comment/46701933
answers question: http://stackoverflow.com/q/29248279

http://stackoverflow.com/q/29318175
score: -1
tagged with: npm
has answer: http://stackoverflow.com/a/29318343
has comment: http://stackoverflow.com/comment/46828356
answer count: 1
downvote count: 1
tagged with: algorithm
tagged with: javascript
type: UnansweredQuestion
upvote count: 0
favorite count: 0
has body: I have to implement an algorithm as a Node.js app where I'll be getting to strings and based on their context I'll have to decide if its a match or not. Take a taxi service for example. A person asking for a taxi can be considered string one. A taxi driver willing to offer his service could be considered string2. The algorithm should process these two strings and for this case return a match. I have lot of test data to train my algorithm on, if need be. So far I have come across Bayes Document Classification algorithm and I think it could get the job done. I was wondering if there was an easier way to do this, or any existing npm module that I could use? Example strings: S1 : I am looking for apartments in new york S2 : Our website lists apartments for sale in new york. Outcome : Match. S1 : I am looking for restaurants in new york S2 : John sells computers. Outcome : No Match.
type: Question
has title: Algorithm for textual context matching in Javascript
tagged with: node.js

http://stackoverflow.com/comment/46832768
score: 0
type: Comment
type: QuestionComment
has text: This might help. http://stackoverflow.com/questions/7837456/comparing-two-arrays-in-javascript[1]
comment on: http://stackoverflow.com/q/29320678

http://stackoverflow.com/comment/72604866
comment on: http://stackoverflow.com/a/29309872
score: 0
type: AnswerComment
type: Comment
has text: I ended up using `class`, which worked nicely with `document.getElementsByClassName()`. Thank you!

http://stackoverflow.com/a/29275007
accepted answer of: http://stackoverflow.com/q/29274620
upvote count: 2
answers question: http://stackoverflow.com/q/29274620
type: AcceptedAnswer
has body: Doc said To run multiple applications in an HTML document you must manually bootstrap them using angular.bootstrap While it is possible to have multiple ng-app on the page but only one ng-app directive will be automatically instantiated and initialized by the Angular framework. Now order can be mantianed by using angular.element(document).ready(function() { angular.bootstrap(document.getElementById("app2"),['secondapp']); }); Here is plunker for you Plunker
has comment: http://stackoverflow.com/comment/46749672
type: Answer
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/46749926

http://stackoverflow.com/q/29280828
has title: Polymer paper buttons not working inside chrome extension
has body: I'm trying to add some paper elements to a popup of a chrome extension. So far so good as to rendering them in the popup but I'm having trouble having my buttons work. Since Chrome extensions have to have separate files for the JavaScript here is the code I'm working with: popup.html Popup Sign in Sign out popup.js Polymer({ var buttonIn = document.querySelector('signin'); buttonIn.addEventListener('signin', function() { chrome.runtime.sendMessage({message: "do_signin"}, function(response) {}); }); var buttonOut = document.querySelector('signout'); buttonOut.addEventListener('signout', function() { chrome.runtime.sendMessage({message: "do_signout"}, function(response) {}); }); }); The problem is Chrome is returning with the following Uncaught SyntaxError: Unexpected identifier on the line var buttonIn = document.querySelector('signin'); Is this because of some problem between polymer and the chrome extension or because I'm doing something wrong? P.S. When the button gets clicked, all I need it to do is send a message to the background.js file that will handle the signin/signout.
has answer: http://stackoverflow.com/a/29281344
type: Question
tagged with: polymer
tagged with: paper-elements
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/46768638
tagged with: google-chrome-extension
answer count: 1
type: UnansweredQuestion

http://stackoverflow.com/q/29343701
tagged with: javascript
tagged with: jquery
favorite count: 0
possible better answer: http://stackoverflow.com/a/29343783
has comment: http://stackoverflow.com/comment/46873935
has comment: http://stackoverflow.com/comment/46873946
has answer: http://stackoverflow.com/a/29343844
upvote count: 1
type: AnsweredQuestion
score: 1
accepted answer: http://stackoverflow.com/a/29343844
type: Question
has comment: http://stackoverflow.com/comment/46874741
answer count: 2
has answer: http://stackoverflow.com/a/29343783
has body: I have a for loop that GETs a json array and populates it in a table along with another list's variables. My problem is I am not able to access i inside the get method. But I have mylist and all its contents inside. I tried binding the function to a variable i using bind(this,i) but that says .getJSON() is not a function. Here's the relevant code. var mylist = ["a", "b", "c"] for (i = 0; i &lt; mylist.length; i++) { urlstr = "/" + mylist[i]; // Generate url $.getJSON(urlstr, function(data) { html = "&lt;tr&gt;&lt;td&gt;" + mylist[i] + "&lt;/td&gt;&lt;td&gt;" + data.string[0] + "&lt;/td&gt;&lt;/tr&gt;"; $("#tableresult").append(html); //this returns undefined for mylist[i] console.log(i); //this returns 3 which is the length of list }); } In short I need the variables outside getJSON be accessible within getJSON. Can someone please help? Thanks and regards.
downvote count: 0
has title: Jquery binding loop variable to getJSON function

http://stackoverflow.com/q/29338082
downvote count: 0
has answer: http://stackoverflow.com/a/29450816
has answer: http://stackoverflow.com/a/29338663
score: 1
type: Question
has comment: http://stackoverflow.com/comment/46864467
tagged with: video-streaming
linked to: http://stackoverflow.com/q/21292114
has body: I want to play a video file from my web server. Here is my HTML code. &lt;video width="100%" height="100%" controls&gt; &lt;source ng-src="{{media_url}}" type="video/mp4" /&gt; &lt;/video&gt; &lt;div&gt;{{media_url}}&lt;/div&gt; In angular controller: $scope.media_url = '/get_video/movie.mp4'; Every time I refresh the page, the div is displaying correctly. However, the video player is not always sending request to "/get_video/movie.mp4". Its behavior looks random. If I set the src directly, then there's no problem: &lt;source ng-src="/get_video/movie.mp4" type="video/mp4" /&gt; Any idea why?
tagged with: javascript
tagged with: html5-video
answer count: 2
upvote count: 1
linked to: http://stackoverflow.com/q/5235145
favorite count: 0
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/29338663
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/29450816
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46864263
has title: html video player not always read from src

http://stackoverflow.com/comment/46690343
comment on: http://stackoverflow.com/q/29241773
type: QuestionComment
type: Comment
has text: Nevermind styling, I just want to fill it with data from the model. If I have time left, I'll make it prettier
score: 0

http://stackoverflow.com/a/29229223
answers question: http://stackoverflow.com/q/29229138
upvote count: 2
type: Answer
score: 2
has body: Although what you've posted doesn't look valid, your objects are in arrays so you can use .concat var a = [{id: 0, name: "Zero"}]; var b = [ [{id: 1, name: "one", firstName:"First"}], [{id: 2, name: "two", firstName:"Second"}], [{id: 3, name: "three", firstName: "Third"}] ]; var c = a.concat(b); if there is no reason why your objects are in individual arrays, you'd want b to be: var b = [ {id: 1, name: "one", firstName:"First"}, {id: 2, name: "two", firstName:"Second"}, {id: 3, name: "three", firstName: "Third"} ];
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29229138

http://stackoverflow.com/comment/60769694
type: AnswerComment
type: Comment
score: 3
comment on: http://stackoverflow.com/a/29324225
has text: I read that as 'no demon' for a good five minutes .. if only someone would write THAT package.

http://stackoverflow.com/q/29278364
upvote count: 4
has comment: http://stackoverflow.com/comment/46754697
answer count: 2
downvote count: 0
tagged with: jquery
has comment: http://stackoverflow.com/comment/46754757
favorite count: 0
accepted answer: http://stackoverflow.com/a/29278475
possible better answer: http://stackoverflow.com/a/29278605
has answer: http://stackoverflow.com/a/29278605
type: AnsweredQuestion
has body: Please select Test One Test Two Test Three Here option Test Two is selected and disabled. The below code fetches select value when dropdown is enabled and value is changed. //pass value to hidden input $('#test_me').change(function () { var id = $(this).val(); $('input#test_hidden').val(id); }) How can I pass selected option value i.e. 2 to my hidden input, when dropdown is disabled and value is selected ?
has title: jQuery fetch disabled select option value
type: Question
has answer: http://stackoverflow.com/a/29278475
tagged with: javascript
has comment: http://stackoverflow.com/comment/46755212
score: 4

http://stackoverflow.com/a/29222072
has comment: http://stackoverflow.com/comment/46677510
upvote count: 1
has comment: http://stackoverflow.com/comment/46678064
accepted answer of: http://stackoverflow.com/q/29219283
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46671614
answers question: http://stackoverflow.com/q/29219283
has comment: http://stackoverflow.com/comment/46679634
has comment: http://stackoverflow.com/comment/46671737
has comment: http://stackoverflow.com/comment/46671881
has comment: http://stackoverflow.com/comment/46671476
has comment: http://stackoverflow.com/comment/46672002
type: Answer
has comment: http://stackoverflow.com/comment/46671563
has body: The problem with your code is that easyPieChart is offseted with the border, since the chart is drawn using a canvas. You can however use box-shadow instead, replace the border line with: box-shadow: inset 0 0 0 11px black; -moz-box-shadow: inset 0 0 0 11px black; -webkit-box-shadow: inset 0 0 0 11px black; That should do the trick for you. By the way, the CSS width and height are being overridden to 110,110 and not 70,70 EDIT: Here is the working code for the inner border WITHOUT the outer hardly seen outer border: HTML: 6 CSS: .pie { box-sizing:border-box; box-shadow: inset 0px 0px 0 10px black; border-radius:50%; } .pie canvas { position: absolute; top: -1px; left: -1px; width: 110px; height: 110px; } JS: $('.pie').easyPieChart({ barColor: '#62ae41', scaleColor: false, lineWidth: 10, trackWidth: 10, animate: false, lineCap: 'square', size: 110 }); $('.pie').css('width', '108px'); $('.pie').css('height', '108px'); $('.pie').css('line-height', '108px'); and voila, the pie chart of dreams. all in one jsfiddle Explanation: For the most part, this is the same as your fiddle, what changed was: the size of pie chart is added to the options the canvas is shifted to hide the outer border, the original div size is decreased so all the shadow-box sets inside the generated canvas. And that's it. PS: I hate it when I have to change the style of generated code, but I HAD TO play with the generated canvas
has comment: http://stackoverflow.com/comment/46678657
score: 1
has comment: http://stackoverflow.com/comment/46677872

http://stackoverflow.com/a/29257823
has comment: http://stackoverflow.com/comment/46719029
accepted answer of: http://stackoverflow.com/q/29257331
has comment: http://stackoverflow.com/comment/46719237
score: 0
answers question: http://stackoverflow.com/q/29257331
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46718701
has body: If I am not wrong then you want to set image of all the cards which you are utilizing in game. Then you just have to set background image of all the cards in css like take example of card 1 so its id is card1 then set its css as following #card1{ background-image:url("http://static3.bigstockphoto.com/thumbs/7/0/3/large2/30774275.jpg"); }
type: Answer

http://stackoverflow.com/q/29329519
tagged with: ionic-framework
has answer: http://stackoverflow.com/a/29329595
type: Question
has answer: http://stackoverflow.com/a/29329586
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: angularjs
has body: I am trying to make simple app single page app .Actually I take background image which is placed on it display when I used position:absolute but it display in small area .I need to display on whole contend .In other words in whole contend tag complete screen. here is my code http://codepen.io/anon/pen/pvYdNM Ionic List Directive Title! contend Fotter!
has answer: http://stackoverflow.com/a/29329579
possible better answer: http://stackoverflow.com/a/29329576
tagged with: css
has title: why background image not display?
answer count: 4
has comment: http://stackoverflow.com/comment/46848652
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29329576
accepted answer: http://stackoverflow.com/a/29329586

http://stackoverflow.com/q/29250529
has comment: http://stackoverflow.com/comment/46705345
score: 0
has answer: http://stackoverflow.com/a/29250656
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46705960
has answer: http://stackoverflow.com/a/29250625
has body: Just getting back in to the swing of things and seem to be losing my mind... I have a function (model): function Users(data) { var self = this; self.UserComments = ko.observableArray(); //...some other thingies } And then... function viewModel() { var self = this; //How do I access self.UserComments from the Users function? } Bonus points, question is somewhere in the comments. :) Cheers Edit: To make it clearer I actually need the self.UserComments array (with data intact) accessible in my viewModel. The Users function will add a comment to the self.UserComments array each time data is added in the viewModel,
tagged with: knockout.js
accepted answer: http://stackoverflow.com/a/29250656
type: Question
possible better answer: http://stackoverflow.com/a/29250625
answer count: 2
has title: Knockout/JS Referencing Observable In Other Function
tagged with: javascript

http://stackoverflow.com/q/29329656
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/29330217
has title: Check when filter is done, angular
tagged with: javascript
has comment: http://stackoverflow.com/comment/46849397
answer count: 1
has comment: http://stackoverflow.com/comment/46849591
downvote count: 0
accepted answer: http://stackoverflow.com/a/29330217
has comment: http://stackoverflow.com/comment/46849656
favorite count: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/46849390
type: AnsweredQuestion
score: 1
has body: I have a filter with a lot of logic combined with much data. It takes a few seconds until it's done. I want to display a loading symbol that indicates the filter is working. I tried this: I have ng-show on my loading symbol in my markup. I turn on the property in the beginning in my filter and then turn it off at the end. It's not working. The property never get set to true. Is there any better approach to this? angular.module('clientApp') .filter('matchPositions', function ($filter, CommonFactory) { return function (actions, firstLevels, secondLevels, objectTypes, searchText) { var filtered = []; CommonFactory.filterLoading = true; //logic here CommonFactory.filterLoading = false; return filtered; }; }); Controller: angular.module('clientApp') .controller('ActionStateCtrl', function($scope, CommonFactory){ $scope.filterLoading = CommonFactory.filterLoading; }); Markup &lt;i ng-show="filterLoading" class="fa fa-spinner fa-spin"&gt;&lt;/i&gt;

http://stackoverflow.com/q/29318674
has answer: http://stackoverflow.com/a/29319132
has title: Why does Angularjs Service Return a Character Array instead of an Array of Objects?
tagged with: javascript
has comment: http://stackoverflow.com/comment/46829633
has comment: http://stackoverflow.com/comment/46829293
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/46829214
tagged with: angularjs-ng-repeat
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46829426
tagged with: angularjs-scope
type: Question
has comment: http://stackoverflow.com/comment/46829153
has comment: http://stackoverflow.com/comment/46829366
has answer: http://stackoverflow.com/a/29322409
has body: I am using a service(.factory) to hold an array of objects/items which gets updated by multiple controllers and then the data is pulled back down by each controller. Each time I add a new array of data, I push it onto the array. However, when I attempt to load an array within my controller so I can display it my view, it is returning a character array which makes it impossible to use ng-repeat to iterate over the values. // controllers.js angular.module('myapp.controllers', []) .controller('MainCtrl', function($scope, MainService) { $scope.mainItems = MainService.all(); // Why does this return a char array? // get the count $scope.getCount = function(item){ return TempOrder.getCount(item); } // add an item $scope.addItem = function(item){ TempOrder.addItem(item); return TempOrder.getCount(item); } }) .controller('SecondaryCtrl', function($scope, MainService) { $scope.items = MainService.all(); // Why does this return a char array? // get the count $scope.getCount = function(item){ return TempOrder.getCount(item); } // add an item $scope.addItem = function(item){ TempOrder.addItem(item); return TempOrder.getCount(item); } }); This is my service // services.js angular.module('myapp.services', []) .factory('MainService', function() { orderItems = []; return { all: function() { return orderItems; // Why does return a char array??? }, getCount: function(item){ var count = 0; for (i = 0;i&lt;orderItems.length;i++) { if (orderItems[i] === item ){ count++; } } return count; }, addItem: function(item) { orderItems.push(item); } } });

http://stackoverflow.com/a/29307437
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29307144
has comment: http://stackoverflow.com/comment/46809837
has comment: http://stackoverflow.com/comment/46929395
upvote count: 1
downvote count: 1
has body: Htennek i have debugged the code and found that you have passed two same ID to div after select from dropdown list' &lt;div id="details"&gt; &lt;div id="details" class="table-responsive"&gt;' . please check you know why your style goes away.

http://stackoverflow.com/comment/46864487
type: AnswerComment
score: 0
type: Comment
has text: Gotcha -- this worked: `var hello; Meteor.call("newCompanyReview",company="Test",function(err,result){hello = result;});` I still don't completely understand why the sync call doesn't return, but we've gotten my id working without a session.get so I'll accept the answer. Thank you for the help!
comment on: http://stackoverflow.com/a/29337526

http://stackoverflow.com/q/29339690
tagged with: javascript
has answer: http://stackoverflow.com/a/29339711
score: 0
answer count: 2
has body: I have a registration wherein if successful it would redirect to a certain page. I'm having problem when a successful registration happens it would redirect to successReg.php my registration has a link that myurl/mobile/registration.php it should redirect to myurl/successReg.php instead what happens is it redirects to myurl/mobile/successReg.php which doesn't exist. So how can I make it to redirect at myurl/successReg.php? Here is how I redirect when the registration is a success. echo ("&lt;SCRIPT LANGUAGE='JavaScript'&gt; window.location.href='successReg.php'; &lt;/SCRIPT&gt;");
tagged with: php
has title: Redirect after successful registration
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29339711
has answer: http://stackoverflow.com/a/29339840
accepted answer: http://stackoverflow.com/a/29339840
type: Question

http://stackoverflow.com/comment/46858258
comment on: http://stackoverflow.com/q/29333584
score: 0
has text: @AaronDufour the number is coming in the params of a post request, I have tried var jsonString = JSON.stringify(582235852866076672); with the same result console.log(jsonString); // 582235852866076700.
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/46762421
type: Comment
comment on: http://stackoverflow.com/q/29282292
has text: ^there you go thats all
score: 0
type: QuestionComment

http://stackoverflow.com/comment/46804002
score: 0
type: Comment
has text: Since subtraction always casts operands as numbers, you don't need `parseInt`. (Removing it will also ensure correct order if keys contain decimals.)
type: AnswerComment
comment on: http://stackoverflow.com/a/29304732

http://stackoverflow.com/q/29292722
tagged with: object-literal
has title: Highcharts Ajax
linked to: http://stackoverflow.com/q/13718326
tagged with: jquery
has comment: http://stackoverflow.com/comment/46828703
favorite count: 0
tagged with: ajax
type: UnansweredQuestion
answer count: 0
upvote count: 2
score: 1
has body: This was something that I struggled with, and found the answer on stackoverflow, so I thought I should share it. This is Jquery syntax. $.ajax({ url: 'AjaxPHPScript.php' type: 'POST', data: "chartdata="+chartdata, // this is what I pass to the Ajax call success: function(result) { // this is when it comes back from Ajax // this will NOT work $("#"+contentdiv).highcharts(result); // this will // the parentheses around the JSON results inside the eval function is the key! var chartstuff=eval("("+result+")"); $("#"+contentdiv).highcharts(chartstuff); // I did not discover this on my own, I got the lead from this post: // http://stackoverflow.com/questions/13718326/javascript-string-to-object }, error: function(e) { console.log(e); console.log(JSON.stringify(e)); } });
downvote count: 1
type: Question
tagged with: highcharts
tagged with: javascript

http://stackoverflow.com/a/29343125
has comment: http://stackoverflow.com/comment/46903992
has comment: http://stackoverflow.com/comment/46904364
score: 0
answers question: http://stackoverflow.com/q/29342895
has comment: http://stackoverflow.com/comment/46872999
type: Answer
has comment: http://stackoverflow.com/comment/46909689
has body: Binding service to the view is a bad practice and you must avoid it. Instead do that inside the controller. GreetingApp.controller("GreetingCtrl", function($scope, GreetingService) { $scope.greetWord = GreetingService.greetWord; $scope.setGreetWord = function(greetWord) { if(greetWord) { GreetingService.setGreetWord(greetWord); } } }); In your View: As you want to filter it using greetWord, you can just set it to the filter. It will take care of filtering :) &lt;li ng-repeat="item in names | filter:greetWord"&gt; &lt;greeting name="item.name"&gt;&lt;/greeting&gt; &lt;/li&gt;
has comment: http://stackoverflow.com/comment/46873656

http://stackoverflow.com/comment/46732590
type: QuestionComment
score: 1
has text: What about subtracting the [offsets](http://momentjs.com/timezone/docs/#/zone-object/offset/)?
comment on: http://stackoverflow.com/q/29265389
type: Comment

http://stackoverflow.com/a/29311678
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46817252
has comment: http://stackoverflow.com/comment/46817010
type: Answer
has comment: http://stackoverflow.com/comment/46817284
has body: You are missing the jQuery library reference You are not properly using selecter to select image of id theImage. theImage is supposed to be for the img tag. JavaScript &lt;script src="http://code.jquery.com/jquery-2.1.1.min.js"&gt;&lt;/script&gt; &lt;script&gt; $(document).ready(function () { $("#theImage").css('display':'block'); }); &lt;/script&gt; CSS #theImage { display: none; } HTML &lt;img id= "theImage" src="images/Kami-100.jpg" alt="Kami Nelson Image"/&gt;
has comment: http://stackoverflow.com/comment/46817047
accepted answer of: http://stackoverflow.com/q/29311643
has comment: http://stackoverflow.com/comment/46817201
has comment: http://stackoverflow.com/comment/46817019
has comment: http://stackoverflow.com/comment/46817214
score: 0
answers question: http://stackoverflow.com/q/29311643

asp.net-mvc
tags question: http://stackoverflow.com/q/29246467
tags question: http://stackoverflow.com/q/29289406
tags question: http://stackoverflow.com/q/29277982
tags question: http://stackoverflow.com/q/29241773
tags question: http://stackoverflow.com/q/29268934
tags question: http://stackoverflow.com/q/29317171
tags question: http://stackoverflow.com/q/29256259
tags question: http://stackoverflow.com/q/29277851
tags question: http://stackoverflow.com/q/29249485
tags question: http://stackoverflow.com/q/29369300
tags question: http://stackoverflow.com/q/29239496
tags question: http://stackoverflow.com/q/29287835
tags question: http://stackoverflow.com/q/29365884
tags question: http://stackoverflow.com/q/29228842
tags question: http://stackoverflow.com/q/29345185
tags question: http://stackoverflow.com/q/29256926
tags question: http://stackoverflow.com/q/29361597
tag name: asp.net-mvc
tags question: http://stackoverflow.com/q/29364402
tags question: http://stackoverflow.com/q/29342454
tags question: http://stackoverflow.com/q/29241723
tags question: http://stackoverflow.com/q/29253095
tags question: http://stackoverflow.com/q/29366060
tags question: http://stackoverflow.com/q/29369506
tags question: http://stackoverflow.com/q/29293637
tags question: http://stackoverflow.com/q/29347479
tags question: http://stackoverflow.com/q/29282298
tags question: http://stackoverflow.com/q/29372865
tags question: http://stackoverflow.com/q/29287759
tags question: http://stackoverflow.com/q/29285003
type: Tag
tags question: http://stackoverflow.com/q/29331759
tags question: http://stackoverflow.com/q/29279042
tags question: http://stackoverflow.com/q/29304502
tags question: http://stackoverflow.com/q/29327344
tags question: http://stackoverflow.com/q/29279863
tags question: http://stackoverflow.com/q/29316227
tags question: http://stackoverflow.com/q/29305853

http://stackoverflow.com/a/29256593
type: Answer
has body: call the function function alertClose();
score: -4
downvote count: 4
upvote count: 0
answers question: http://stackoverflow.com/q/29256335

http://stackoverflow.com/q/29369888
has title: resize and calling function
score: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/29369925
tagged with: jquery
has answer: http://stackoverflow.com/a/29369925
type: AnsweredQuestion
type: Question
tagged with: javascript
has body: I have this function that when you click on the html it checks the width of a number of elements and compares it with the windows width. I can't get it to work with the resize function. I think I'm calling it wrong. $(document).ready(function() { $(window).resize(function() { var conditionWidth = checkWidth() }); function checkWidth() { var elementWidth = 1; $("div>div").each(function() { if ($(this).width() > $("html").width() / 2) { elementWidth = 2; } }); return elementWidth; } var conditionWidth = checkWidth() $("body").off("click").click(function() { alert(conditionWidth); }); }) div div { position: relative; height: 100px; width: 100px; margin-top: 20px; } .rectangle1 { background-color: black; width: 100px; } .rectangle2 { background-color: red; width: 200px; } .rectangle3 { background-color: black; width: 300px; }

http://stackoverflow.com/a/29238907
has body: You are probably missing the leading zero in months and days. Your value should be probably 2015-03-24T18:38:26Z Like @Bergi suggested in comment - use toISOString.
accepted answer of: http://stackoverflow.com/q/29238841
upvote count: 4
downvote count: 0
score: 4
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29238841
has comment: http://stackoverflow.com/comment/46684351
type: Answer

http://stackoverflow.com/comment/46717596
type: Comment
type: QuestionComment
has text: @charlietfl if you press the left arrow key (for example), the value doesn't get changed but onkeyup get's triggered, while oninput does not get triggerd => benefit because you don't need to pull data again if the value doesn't get changed
comment on: http://stackoverflow.com/q/29257038
score: 0

http://stackoverflow.com/q/29293304
has comment: http://stackoverflow.com/comment/46783179
has body: So, this might be a bit confusing. A while back when Chromium decided to kill their modal support, our place found a library that seemed to work great (and yes, they want it parsed out between webkit/non-webkit [basically we have two versions of this thing running in either Firefox or Chrome]) function AddToConfig(){ .... .... .... if(/ipad|android|webkit/i.test(navigator.userAgent)){ $.showModalDialog({ url: "get_required.php?maxSelect="+max+"&amp;forceReload="+Math.random(), dialogArguments: window, height: 270, width: 510, position: 'top', onClose: function(){ numReq = this.returnValue; return retAction(numReq); } }); }else{ numReq = window.showModalDialog ("get_required.php?maxSelect="+max+"&amp;forceReload="+Math.random(), window, "dialogHeight:250px; dialogWidth:500px; center:yes; help:no; resizable:no; scroll:no; status:no; edge:raised"); return numReq; } (Lifted/more info here) http://extremedev.blogspot.com/2011/03/windowshowmodaldialog-cross-browser-new.html For a while, it worked fine. All the code replacement thus far has been situations where user clicks button, popup (now modal) happens, it does its thing and returns a value that 99% of the time requires a iFrame or something to be refreshed, so timing wasn't a issue. Great, awesome. The situation I'm in right now, this modal call is in the middle of a bunch of other calculations. It fires if it reaches down this chain of ifthens. However, the code above seems to be making it a issue. I've tried doing callbacks like below (and maybe I'm just writing them wrong) and that hasn't worked. Hell, the comments in that URL above say doing this is a little tricky. Here's kinda (what I hope) is enough. So, I want to hit AddToConfig(), ClearSelections(), printText() which seems simple in and of itself, but the GetRequired asynch-y call is throwing everything off. Main code in question (Original): //What kicks it off &lt;input type=button class="button3" id=btnAdd onClick='AddToConfig()' value='Add' onMouseDown="t…
has comment: http://stackoverflow.com/comment/46783324
has title: Making javascript synchronous code from nested asychronous calls with a modal library?
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
type: Question
tagged with: asynchronous
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/29293423
tagged with: synchronous

http://stackoverflow.com/q/29337585
downvote count: 1
type: Question
has title: window.location in alert must redirect to previous page
score: -1
upvote count: 0
answer count: 1
has answer: http://stackoverflow.com/a/29337622
tagged with: javascript
favorite count: 0
has body: i have the script that will redirect in new page,but i want to that script will redirect in previous page,help me please :( if ($tipe_file != "image/jpeg" AND $tipe_file != "image/pjpeg") { echo " "; } How must i change the script in window.location (blablabla)?
tagged with: php
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29337622

http://stackoverflow.com/comment/46911684
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29363007
score: 0
has text: What is the exact requirement to do it?

http://stackoverflow.com/q/29238376
tagged with: jquery
answer count: 1
downvote count: 0
favorite count: 0
tagged with: ajax
tagged with: php
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46682944
score: 1
has title: Yii2: Calculation using JQuery based on condition
has answer: http://stackoverflow.com/a/29238788
accepted answer: http://stackoverflow.com/a/29238788
upvote count: 1
type: Question
tagged with: yii2
has body: I have a form with fields with ID like #opdtestbill-health_card_number #opdtestbill-test_charges #opdtestbill-discount #opdtestbill-total_charges Now what I am trying to do is when the health_card_number is not empty calculate discount on test charges. That is the discount field and total_charges field is filled automatically. The test_charges field is getting the data through ajax and is not filled manually. I have tried this code, but I am getting NaN in both discount and total_charges. This is my code: <?php $this->registerJs("$('#opdtestbill-health_card_number').blur(function(){ if( $(this).val() ) { var test_charges = parseInt($('#opdtestbill-test_charges').val()); var discount = (test_charges*5)/100; var totalAmount = test_charges - discount; $('#opdtestbill-discount').val(discount); $('#opdtestbill-total_charges').val(totalAmount); }else{ $('#opdtestbill-discount').val()=0; } });"); ?> I have not much idea about using JQuery, any help will be greatly appreciated. I have also tried to do this using only php, but it works only on update, not on new record. The php code I am using is like in my Model public function getHealthCardDiscount(){ $discount=0; if (!empty($this->health_card_number)){ $discount = ($this->test_charges *5)/100; } return $discount; } and in _form.php $model->discount=$model->healthCardDiscount; $model->total_charges=$model->test_charges - $model->healthCardDiscount; Thanks. HTML for relevant section is like this: Health Crd. No. Test Charges Disct. Total Charges Rendered Jquery jQuery(document).ready(function () { $('#opdtestbill-health_card_number').blur(function(){ if( $(this).val() ) { var test_charges = parseInt($('#opdtestbill-test_charges').val()); var discount = (test_charges*5)/100; var totalAmount = test_charges - discount; $('#opdtestbill-discount').val(discount); $('#opdtestbill-total_charges').val(totalAmount); }else{ $('#opdtestbill-discount').val()=0; } });
tagged with: javascript

http://stackoverflow.com/a/29270756
answers question: http://stackoverflow.com/q/29270672
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/46742622
has comment: http://stackoverflow.com/comment/46742246
downvote count: 0
has comment: http://stackoverflow.com/comment/46742263
has body: Try the following code for your javascript: document.getElementById("enterText").innerHTML = "Look at the Picture below, Is it possible for the equation to be true?"; document.getElementById("submitBtn").addEventListener("click", calcChoices, false); function calcChoices(){ var radioGroup = document.getElementsByName("radio-group1"); for (var i = 0; i &lt; radioGroup.length; i++) { if (radioGroup[i].checked) { if(radioGroup[i].value==="Yes"){ alert("NICE!") } if(radioGroup[i].value==="No"){ alert("try again!") } } } }
type: Answer

http://stackoverflow.com/a/29248831
type: Answer
has body: When I put console.log on $scope, am able to see only these properties: ["$$childTail", "$$childHead", "$$nextSibling", "$$watchers", "$$listeners", "$$listenerCount", "$id", "$$ChildScope", "$parent", "$$prevSibling"] If you want to access the template URL inside your controller: brainframeApp.run(function($rootScope) { $rootScope.$on( "$routeChangeStart", function(event, next, current) { $rootScope.templateUrl = next.$$route.templateUrl; }); }); Now inside your controller, inject $rootScope and get the template URL $rootScope.templateUrl
has comment: http://stackoverflow.com/comment/46702791
has comment: http://stackoverflow.com/comment/46702941
has comment: http://stackoverflow.com/comment/46702392
upvote count: 1
has comment: http://stackoverflow.com/comment/46702247
score: 1
has comment: http://stackoverflow.com/comment/46702347
has comment: http://stackoverflow.com/comment/46702496
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29248053
answers question: http://stackoverflow.com/q/29248053

http://stackoverflow.com/comment/46785747
type: QuestionComment
has text: @VinothKrishnan,I tried but when I leave my field empty, and click on submit no validation is popped up,see my updated question
comment on: http://stackoverflow.com/q/29274618
score: 0
type: Comment

http://stackoverflow.com/comment/46925087
type: AnswerComment
score: 0
type: Comment
has text: Because it's the way Google recommends, because it doesn't change your actual location as does yours, and because if one day, Google decides to change how it handles those request (e.g if they block direct access to the page you're transferring your user), you will have to rewrite again your code. That said, it's up to you to choose which solution does fit the best your needs.
comment on: http://stackoverflow.com/a/29359888

http://stackoverflow.com/q/29369577
has answer: http://stackoverflow.com/a/29369695
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46920509
accepted answer: http://stackoverflow.com/a/29369730
tagged with: if-statement
has answer: http://stackoverflow.com/a/29369699
possible better answer: http://stackoverflow.com/a/29369695
type: Question
has comment: http://stackoverflow.com/comment/46921178
has comment: http://stackoverflow.com/comment/46920525
has title: Multiple if statement returning css value depending on URL
tagged with: url
has comment: http://stackoverflow.com/comment/46920439
tagged with: javascript
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/29369730
has comment: http://stackoverflow.com/comment/46921339
tagged with: css
has comment: http://stackoverflow.com/comment/46920780
has body: The script works but their seems to be a bug causing the first and last if statement to implement the style no matter what page it is on. The middle if statement does not display. I have also tried a break and return after each if statement but that completely brakes the script and does not display anything on the page. window.onload = function() { var ThisStyle = "background-color: #4C4C4C; color: #fff; -webkit-border-top-right-radius: 15px; -webkit-border-bottom-right-radius: 15px; -moz-border-radius-topright: 15px; -moz-border-radius-bottomright: 15px; border-top-right-radius: 15px; border-bottom-right-radius: 15px;" if (document.URL.indexOf("index.php")) { document.getElementById("home-nav").style.cssText = ThisStyle; } else if (document.URL.indexOf("about.php")) { document.getElementById("about-nav").style.cssText = ThisStyle; } else (document.URL.indexOf("products.php")) { document.getElementById("products-nav").style.cssText = ThisStyle; } } Anyone have any idea what I am doing wrong?

http://stackoverflow.com/a/29229691
has body: This should work: https://jsfiddle.net/23jcejbm/ $(document).ready(function() { var $cells = $("#table tr td").not(':first-child'), $inputs = $cells.find('input[type="text"]'); $.each($inputs, function(){ var value = this.value; alert(value); }); });
score: 2
accepted answer of: http://stackoverflow.com/q/29229586
answers question: http://stackoverflow.com/q/29229586
type: AcceptedAnswer
downvote count: 0
upvote count: 2
type: Answer

http://stackoverflow.com/q/29326390
favorite count: 0
has title: How to pull individual values out of $_COOKIE["elementValues"]?
downvote count: 0
has answer: http://stackoverflow.com/a/29326401
tagged with: php
type: AnsweredQuestion
score: 1
type: Question
answer count: 1
has body: I have a JavaScript that saves checkboxes state, puts it into a cookie, and then repopulates my checkboxes in my form. What I am trying to do at this point is put together a bunch of "if statements" with php and then into a string for those that are "true". Here is what I get when I echo $_COOKIE["elementValues"]. The 1,2,3 represent the id number of each form input checkbox. {"1":false,"2":false,"3":false,buttonText":""} Here is what I am trying to do with PHP. if ($_COOKIE["1"]=true) { $arguments[] = "AND 2kandunder = 'yes'"; } if ($_COOKIE["2"]=true) { $arguments[] = "AND 2kto4k = 'yes'"; } if ($_COOKIE["3"]=true) { $arguments[] = "AND 2kandup = 'yes'"; } if(!empty($arguments)) { $str = implode($arguments); echo "string: ".$str."&lt;br&gt;; The problem is I echo my $str and even if all the checkoxes are "false" in the $_COOKIE["elementValues"] it will still echo out AND 2kto4k = 'yes'AND 2kandunder = 'yes'AND 2kandup = 'yes'. How do I write these if statements to add the argument to the string ONLY if that id is "true"? Here is var_dump($_COOKIE); array(3) { ["PHPSESSID"]=&gt; string(32) "4b4bbcfc32af2f41bdc0612327933887" [2]=&gt; string(6) ""true"" ["elementValues"]=&gt; string(47) "{"1":false,"2":false,"3":false,"buttonText":""}" } {"1":false,"2":false,"3":false,"buttonText":""}
tagged with: javascript
upvote count: 1
accepted answer: http://stackoverflow.com/a/29326401

http://stackoverflow.com/q/29262060
answer count: 2
tagged with: jquery
has title: JSON encode a HTML list - all childs are showed at all parents
has answer: http://stackoverflow.com/a/29262463
tagged with: http://stackoverflow.com/tag/html
has body: I have this ordered list: function convert( name_ref ) { name_ref = name_ref + " > ol > li"; var mylist = []; $(name_ref).each(function () { if ($(this).find('> ol > li').length){ mylist.push({ "name": $(this).children("span").text(), "childs": convert( name_ref ) }); } else { mylist.push({ "name": $(this).children("span").text() }); } }); return mylist; } function convert_final( the_list ) { $("#result").html(JSON.stringify(the_list)); } convert_final( convert('.ols') ); Something Something 1 Something 2 Something 3 Something 4 The list above has sublists like a menu with submenus. I want to encode by json the html list (to convert the list to json), but the json result is wrong because the child of "Something 3" can be found in the json at the childs of "Something" and vice-versa. What can I do to show the olny the real child of the "li" in json. Hope you understand my question, Thank you so much!
possible better answer: http://stackoverflow.com/a/29262463
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/29262716
type: Question
accepted answer: http://stackoverflow.com/a/29262716
tagged with: javascript
score: 0

http://stackoverflow.com/q/29345894
has answer: http://stackoverflow.com/a/29346140
upvote count: 2
has comment: http://stackoverflow.com/comment/46877873
has title: Javascript clientHeight returns correct values in devtools console but 0 from js
answer count: 1
has comment: http://stackoverflow.com/comment/46877700
has comment: http://stackoverflow.com/comment/46877827
tagged with: javascript
tagged with: jquery
has body: Hi for some reason when I try to get client Height of an element via javascript file it returns 0, both ways via javascript (element.clientHeight) and jquery ($("element").height();) . But when I ask height of the same element via console it returns the correct value. Why is it happening. Thx. jQuery(document).ready(function($) { $(window).load(function() { var obj = document.getElementById("slider").clientHeight; console.log(obj); }); });
favorite count: 0
score: 2
has comment: http://stackoverflow.com/comment/46877759
downvote count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46877664
type: Question
has comment: http://stackoverflow.com/comment/46877880
has comment: http://stackoverflow.com/comment/46878152

http://stackoverflow.com/q/29219964
type: Question
has title: Simple JQuery Script for woocommerce not working
has answer: http://stackoverflow.com/a/29222994
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0
has body: This is quite a tricky one to debug as the problem occurs in the context of an entire page and I struggle to reproduce it in isolation. I will try and post as much relevant code as possible here though. Essentially I have a dev WooCommerce WordPress store for which I have built a custom theme. On the checkout page there is the standard choice of payment options marked up as follows: &lt;ul class="payment_methods methods"&gt; &lt;li class="payment_method_bacs"&gt; &lt;div class="radio"&gt; &lt;label for="payment_method_bacs"&gt; &lt;input id="payment_method_bacs" type="radio" class="input-radio" name="payment_method" value="bacs" checked='checked' data-order_button_text="" /&gt;Direct Bank Transfer&lt;/label&gt; &lt;/div&gt; &lt;div class="panel panel-default payment_box payment_method_bacs"&gt; &lt;div class="panel-body"&gt; &lt;p&gt;Make your payment directly into our bank account. Please use your Order ID as the payment reference. Your order won&amp;#8217;t be shipped until the funds have cleared in our account.&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;/li&gt; &lt;li class="payment_method_cheque"&gt; &lt;div class="radio"&gt; &lt;label for="payment_method_cheque"&gt; &lt;input id="payment_method_cheque" type="radio" class="input-radio" name="payment_method" value="cheque" data-order_button_text="" /&gt;Cheque Payment&lt;/label&gt; &lt;/div&gt; &lt;div class="panel panel-default payment_box payment_method_cheque" style="display:none;"&gt; &lt;div class="panel-body"&gt; &lt;p&gt;Please send your cheque to Store Name, Store Street, Store Town, Store State / County, Store Postcode.&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;/li&gt; &lt;/ul&gt; The idea is that when a payment option radio button is selected the corresponding payment_box is shown. Upon referring to the plugin assets there is a jQuery snippet that achieves this: payment_method_selected: function( e ) { if ( $( '.payment_methods input.input-radio' ).length &gt; 1 ) { var target_payment_box = $( 'div.payment_b…
accepted answer: http://stackoverflow.com/a/29222994
type: AnsweredQuestion
tagged with: woocommerce
tagged with: wordpress

http://stackoverflow.com/q/29235574
has comment: http://stackoverflow.com/comment/46677424
has answer: http://stackoverflow.com/a/29235824
type: Question
tagged with: http://stackoverflow.com/tag/json
accepted answer: http://stackoverflow.com/a/29235824
has comment: http://stackoverflow.com/comment/46677762
score: 0
answer count: 2
possible better answer: http://stackoverflow.com/a/29235862
tagged with: javascript
has answer: http://stackoverflow.com/a/29235862
has title: Procjess JSON of unknown Formats
has body: a Services provides the following Information via JSON {"errors":{"subject":"foobar"}} and further alements in this errors array OR {"ok":{"subject":"foobarfoobar"}} and further alements in this ok array array So always either of the two is present, not both at once. Any as one is not present I always get an access error as one the proeprties is of course not existing And I completely fail how to process this result. I always get "can not ... of undefined": Currenlty I have: if (data[0].hasOwnProperty("status")) { alert('ddd'); } What is the correct way to test, if either errors or ok is provided? UPDATE blex is right: But on the serverside is use: echo json_encode( array('errors' =&gt; $result['errors']) ); Doesnt this mean I that errors is already the first element of an array? Why is this seen as an object propety? SOLUTION/LEARNING: Beware of PHP! As stated above echo json_encode( array('errors' =&gt; $result['errors']) ); does NOT lead to encoding this as an JSON Array. What I missunderstood and oversaw was, that { is the Format/Notation for Objects NOT for Arrays. So to be an array it would have to be [ . So in the End PHP does encode Associative Arrays as normal Object Properties not as arrays. That was my wrong assumption
has comment: http://stackoverflow.com/comment/46677243
tagged with: properties
type: AnsweredQuestion

http://stackoverflow.com/comment/47075125
score: 0
type: AnswerComment
type: Comment
has text: @CameronWilby Your welcome, let me know if you have any more doubts on this, Thanks :)
comment on: http://stackoverflow.com/a/29455011

http://stackoverflow.com/a/29331384
type: Answer
has body: For what it's worth, I believe your first approach (adding and removing handlers) is the "cleanest" (or most elegant?) approach. If you think of the handlers as only having use/meaning when the menu is present, from a conceptual perspective, there's no need for them to exist when the menu is not visible. If you bundle the event-wiring into the same function(s) or method(s) that handle the menu, then it becomes a self-contained, re-usable element that doesn't leave any "garbage" behind. Since I don't have your code in front of you, here's some pseudocode: function displayMenu() { $menu.show() .on('click', function() { /* etc */ }); } function hideMenu() { $menu.hide() .off() // remove ALL event handlers } Or, even better, encapsulate it in an object: var menu = { show: function() { // ... } hide: function() { // ... } }; Or you could use a jQuery function too (though I generally eschew jQuery when I'm working with a map API, just to keep the number of dependencies low).
answers question: http://stackoverflow.com/q/29331177
score: 0

http://stackoverflow.com/comment/46793703
comment on: http://stackoverflow.com/a/29298373
type: AnswerComment
score: 0
has text: Thanks its working.Tested by alert instead of console.log() but I think there will be a ; semicolon at the end of the statement. console.log(data.results[0].geometry.location.lat);
type: Comment

http://stackoverflow.com/a/29354524
accepted answer of: http://stackoverflow.com/q/29354005
has comment: http://stackoverflow.com/comment/46894898
answers question: http://stackoverflow.com/q/29354005
score: 2
has body: From what I understand, what you really want is ng-repeat. &lt;span ng-repeat="hour in form.interval"&gt; &lt;input class="form-control" type="text" placeholder="Interval" ng-model="hour" /&gt; &lt;/span&gt; Declare the variable inside the controller or directive: $scope.form.interval = []; When you do add() to get another input, add a blank entry to the array in the controller or directive: $scope.form.interval.push(''); Call add() when you create the variable if you want to start with one empty input box.
type: AcceptedAnswer
downvote count: 0
type: Answer
upvote count: 2

http://stackoverflow.com/comment/46675961
type: Comment
comment on: http://stackoverflow.com/a/29234585
type: AnswerComment
has text: must be something else in my code. i'll have to look more closely. thanks everyone!
score: 0

http://stackoverflow.com/comment/46661913
has text: @NullPoiиteя community asked me whether this post is dup of the other.. I said yes. and this got closed.
score: 0
comment on: http://stackoverflow.com/q/29227150
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46903140
has text: that makes a lot of sense for my particular case- I'm doing some DOM interaction on the `resize` event, and if my tab isn't active, I'm ok with that interaction not happening until the user switches back to my tab.
type: AnswerComment
comment on: http://stackoverflow.com/a/29359316
score: 0
type: Comment

http://stackoverflow.com/q/29261183
has answer: http://stackoverflow.com/a/29276365
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46750832
has comment: http://stackoverflow.com/comment/46733463
linked to: http://stackoverflow.com/q/5449193
has comment: http://stackoverflow.com/comment/46725605
accepted answer: http://stackoverflow.com/a/29276365
has title: Get Facebook likebox height after SDK loaded
tagged with: facebook
tagged with: loaded
type: AnsweredQuestion
has body: Is there a way to get the correct facebook likebox height after the stream is loaded? I'm trying this way, it won't work. window.fbAsyncInit = function() { FB.init({ appId : 'xxx', status : true, cookie : true, oauth : true, xfbml : true }); FB.Event.subscribe('auth.login', function(response) { window.location.reload(); }); console.log($('.fb_iframe_widget').height()); }; In the console i see null. It means the fbAsyncInit runs before the whole stream is loaded and there is no fb_iframe_widget element or I don't get it. If i wait for pageload and type in the console console.log($('.fb_iframe_widget').height()); It goes good, I get the height of the loaded Facebook box. Thank you for the help.
type: Question
score: 0
has comment: http://stackoverflow.com/comment/46726973

http://stackoverflow.com/comment/46789417
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/73912/discussion-between-ezpura-and-user1852837).
comment on: http://stackoverflow.com/q/29296452
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46890531
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29352088
has text: i'm not sure that they follow their github questions but they always follow github

http://stackoverflow.com/comment/112311966
comment on: http://stackoverflow.com/a/35088516
type: Comment
has text: @SirajAlam merge is done here: const array = [...arr1, ...arr2]
score: 0
type: AnswerComment

http://stackoverflow.com/comment/46654493
comment on: http://stackoverflow.com/q/29222816
score: 0
type: Comment
type: QuestionComment
has text: I'm not too familiar with Json, but yeah it looks like it. However after the `index` action runs, the view should be displayed?

http://stackoverflow.com/comment/46756959
has text: You're missing a return before `project.save().then(`. I strongly advise you to consider the refactoring per @danh's answer.
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/29259007
type: Comment

http://stackoverflow.com/a/29481701
has comment: http://stackoverflow.com/comment/47197440
has comment: http://stackoverflow.com/comment/47196220
type: Answer
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/29281129
has comment: http://stackoverflow.com/comment/47197038
has body: You need to set the mimetype of the stream you are returning to the client... When the user refreshes that request, the document is read from disk, and mimetype is set ... something like for MVC. return new FileContentResult(bytes, "application/pdf"); for ASP.NET : http://www.devtoolshed.com/aspnet-download-file-web-browser
has comment: http://stackoverflow.com/comment/47196452
upvote count: 2

http://stackoverflow.com/q/29245011
favorite count: 0
type: UnansweredQuestion
has body: Im using jQuery and jQuery UI on my website. I use this segment of script. $("content").load("newContent.php"); Speed of loading the content is slower whenever I try to reload this content. My question is Why and how i solved this issues. Thanks :).
upvote count: 1
has title: slow loading content with .load() - jQuery
type: Question
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
score: 1
has answer: http://stackoverflow.com/a/29245047

http://stackoverflow.com/comment/46761985
type: Comment
has text: hey @luis.thanks for the answer and how can i learn building reg-ex statements in javascript.what are best resources..thanks in advance
comment on: http://stackoverflow.com/a/29274188
type: AnswerComment
score: 0

http://stackoverflow.com/comment/46678233
has text: @BrAtMaria You can't mark my answer, since it's a comment. The most you can do is upvote the comment, but you probably need more rep for that. Here, I'll put it as an answer so you can mark the problem as solved.
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29234747

http://stackoverflow.com/a/29277368
accepted answer of: http://stackoverflow.com/q/29277252
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/29277252
type: Answer
has comment: http://stackoverflow.com/comment/46753457
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/46754082
has body: It just common Error part Rest is additional defined fields: $ node &gt; var e = new Error('Some error'); undefined &gt; e.field = 'value' 'value' &gt; console.log(e) { [Error: Some error] field: 'value' } You can access to error message as message field: &gt; e.message 'Some error'

http://stackoverflow.com/comment/46937555
score: 0
comment on: http://stackoverflow.com/q/29356005
type: Comment
type: QuestionComment
has text: Check out this SO Answer. http://stackoverflow.com/a/7149719/209259

http://stackoverflow.com/a/29297806
upvote count: 2
type: Answer
accepted answer of: http://stackoverflow.com/q/29275164
score: 2
answers question: http://stackoverflow.com/q/29275164
type: AcceptedAnswer
has body: If your aim is to fill the top right red gap with the "unskewed" content, you should set the transform origin of the content to the top right with : transform-origin: 100% 0; rather than using absolute positioning and a negative top value : #container { transform: skewY(-6deg); height: 250px; background-color: red; overflow: hidden; } #img-container { transform-origin: 100% 0; transform: skewY(6deg); } #img-container img { width: 100%; height: auto; display: block; } &lt;div id="container"&gt; &lt;div id="img-container"&gt; &lt;img src="http://lorempixel.com/output/people-q-c-640-480-9.jpg" /&gt; &lt;/div&gt; &lt;/div&gt;
downvote count: 0

http://stackoverflow.com/q/29302242
tagged with: javascript
has comment: http://stackoverflow.com/comment/53249329
has body: I'm working on a cordova app on which I have to locate the user latitude and longitude. Using the geolocation plugin, it works fine on android devices but it display an alert asking for permission from user in iOS. When I used the simulator I get this alert message: Users/user/Library/Developer/CoreSimulator/Devices/783A2EFD-2976-448C-8E4E-841C985D337D/data/Containers/Bundle/Application/EFC846BB-4BA3-465C-BD44-575582E649FC/app_name.app/www/index.html would like to use your current location. I have seen topic talking about this problem like: this and thisbut none of the provided solutions works for me. this is the cordova example page: Device Properties Example Finding geolocation... Is there any way to change the text of the alert or to disable this alert? -edit--- I have found the source of my problem. I removed the geolocation plugin and add it several times because when I have added the plugin I haven't found a folder with the name of the geolocation plugin like the other plugins. Even the cordova_plugin.js file doesn't contain any data about geolocation plugin. Now I have installed the plugin again and it works.
has title: Location permission alert on iPhone with Cordova
tagged with: iphone
type: AnsweredQuestion
score: 3
has comment: http://stackoverflow.com/comment/53233503
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/29322283
accepted answer: http://stackoverflow.com/a/30742445
tagged with: cordova-4
type: Question
linked to: http://stackoverflow.com/q/19009776
upvote count: 3
has comment: http://stackoverflow.com/comment/46810131
linked to: http://stackoverflow.com/q/1673579
answer count: 3
possible better answer: http://stackoverflow.com/a/40891337
has answer: http://stackoverflow.com/a/40891337
has comment: http://stackoverflow.com/comment/46869571
has answer: http://stackoverflow.com/a/30742445
tagged with: ios

http://stackoverflow.com/q/29347797
tagged with: smoothstate.js
upvote count: 2
answer count: 1
tagged with: jquery
has body: I'm putting together a simple site and I want to use the nice transitions from SmoothState.js, but I also use other jQuery scripts (such as Flexslider) that I have set up to fire on $(document).ready() -- and now that my transitions are nice and smooth, the other JS is no longer firing. I've tried placing this at the beginning of all my pages (taken from here): (function($, undefined) { var isFired = false; var oldReady = jQuery.fn.ready; $(function() { isFired = true; $(document).ready(); }); jQuery.fn.ready = function(fn) { if(fn === undefined) { $(document).trigger('_is_ready'); return; } if(isFired) { window.setTimeout(fn, 1); } $(document).bind('_is_ready', fn); }; })(jQuery); But they're still not firing properly. What am I missing?
favorite count: 0
has title: SmoothState not firing $(document).ready()
accepted answer: http://stackoverflow.com/a/29348112
score: 2
downvote count: 0
has answer: http://stackoverflow.com/a/29348112
type: Question
type: AnsweredQuestion
tagged with: javascript

http://stackoverflow.com/q/29275164
favorite count: 0
has comment: http://stackoverflow.com/comment/46790445
has comment: http://stackoverflow.com/comment/46749385
has answer: http://stackoverflow.com/a/29275439
upvote count: 1
tagged with: css
type: AnsweredQuestion
score: 1
tagged with: math
has answer: http://stackoverflow.com/a/29297806
accepted answer: http://stackoverflow.com/a/29297806
has comment: http://stackoverflow.com/comment/46751364
type: Question
answer count: 2
has body: i need some help here. I have rectangle (red). This rectangle has transform: skew(0deg, -6deg); What i now need is the height of the area above the red. Look at the image: Im Sure that this is simple math. but i dont find a soloution on google... Thank you^^ EDIT: http://codepen.io/anon/pen/raROPy
possible better answer: http://stackoverflow.com/a/29275439
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46749313
has comment: http://stackoverflow.com/comment/46750960
downvote count: 0
has title: CSS Skew - Get the Offset/Upper Distance

http://stackoverflow.com/comment/46920778
has text: possible duplicate of [Is using eval() for data from ONLY server-side safe? (and if not, alternatives please)](http://stackoverflow.com/questions/6727365/is-using-eval-for-data-from-only-server-side-safe-and-if-not-alternatives-p)
score: 0
type: Comment
comment on: http://stackoverflow.com/q/29369091
type: QuestionComment

http://stackoverflow.com/comment/46772148
type: QuestionComment
has text: this would allow me to test if the button would have change something in the view but what if it doesn't change anything you see, but just get some info not displayed? furthermore, this doesn't allow me to test if there's no request send when the button is supposed to be disabled.
score: 0
type: Comment
comment on: http://stackoverflow.com/q/29285960

http://stackoverflow.com/comment/46801189
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29292747
type: AnswerComment
has text: Seems to work in some cases, fails in others, not sure what's going on since I don't understand all of that.. I'll validate anyway but would you mind explaining your code a bit please?

http://stackoverflow.com/comment/46895447
comment on: http://stackoverflow.com/a/29353316
score: 0
type: Comment
has text: I think you mean to put `theme.src` && `theme.dest` NOT `themes.src` lol I saw this initially and should have knew to make the change but I was just following what you advised because I thought maybe for some reason it was different in this case.
type: AnswerComment

http://stackoverflow.com/a/29315602
score: 1
has body: Here is the answer function f(n) { if(typeof n == "number" &amp;&amp; Math.abs(n) ==n &amp;&amp; Math.floor(n) == n) return (1 + n)*(n/2); else return 0; } Mathematical formula to get summary of 1..N numbers http://en.wikipedia.org/wiki/1_%2B_2_%2B_3_%2B_4_%2B_%E2%8B%AF No hesitate to ask me any question Good luck !
upvote count: 1
answers question: http://stackoverflow.com/q/29315436
type: Answer
downvote count: 0

http://stackoverflow.com/a/29517932
has body: I recommend you migrating to Google Analytics Universal first (needs modifying your JS code). Then you'll get access to custom dimensions, where you can store your custom parameters. For user's local time you should create new hit scope custom dimension and pass the value from your website: &lt;a onclick="window.ga &amp;amp;&amp;amp; ga('send', 'event', 'MobileLinks', 'Phone', 'Our Facility Location', {'dimension1': new Date().getTimezoneOffset()/60});" href="tel:5555555555"&gt; You'll get a visitor's timezone. Adding it to ga:dateHour + ga:minute of the hit you will know his local time.
answers question: http://stackoverflow.com/q/29264715
upvote count: 2
type: AcceptedAnswer
type: Answer
score: 2
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29264715

http://stackoverflow.com/comment/46884940
type: Comment
has text: Here is my js Code: function showNMCHelp() { var dialog = NMCApp.addDialog(helpTitle, 800, 400); dialog.load('/' + NMCApp.getVirtualDirectoryName() + helpLink, null, true); } document.addEventListener('keydown', function (e) { if (e.key === 'F1' || e.keyCode == 112) { e.cancelable = true; e.stopPropagation(); e.preventDefault(); e.returnValue = false; showNMCHelp(); } });
type: AnswerComment
comment on: http://stackoverflow.com/a/29278883
score: 0

http://stackoverflow.com/comment/46875828
has text: What I want to do next is pull the date from the array so it reads: yyyy-mm-dd hh-mm-ss and make this a php datetime variable so i am able to input to my database. Should I have extracted the values before posting?
comment on: http://stackoverflow.com/q/29344631
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29356173
score: 0
answers question: http://stackoverflow.com/q/29355967
type: Answer
has body: Since you're trying to call a function on button click or on initialization after checking the $routeParams, just include that code in the angular controller you are using (ipCntrl) myApp.controller('ipCntrl', function($scope,$log,$http,$q,$routeParams, $location) { $scope.runReport = function() { $location.search({'ip': $routeParams['ip']}) } //Just put the if statement here //you're already using the ng-submit to call this function from your form if ($routeParam.ip != null) //other definition check logic $scope.runReport(); });

google-oauth
type: Tag
tags question: http://stackoverflow.com/q/29228144
tag name: google-oauth
tags question: http://stackoverflow.com/q/29332794
tags question: http://stackoverflow.com/q/29239193

http://stackoverflow.com/comment/46776015
type: Comment
comment on: http://stackoverflow.com/a/29287031
has text: @MattJohnson ha ha - done. The whole Date parsing thing in JavaScript is one of the few situations in which I think it's good to suggest add-on facilities like Moment or DateJS.
type: AnswerComment
score: 0

http://stackoverflow.com/q/29277108
has answer: http://stackoverflow.com/a/29277140
has body: I need to select all elements that have a 'hidden' attribute added to them. This is the mark-up: Option 1 Option 2 Option 3 Option 4 I'm showing only one , but there are many of them in the markup. So far I have come up with this code: jQuery('optgroup').each(function() { var options = jQuery(this).find('option'); jQuery.each(options, function(index, value) { if ($(value).data('hidden') !== undefined) { console.log('Found it!'); } }); }); Unfortunately, the code conditional inside is never true. What am I missing here?
has comment: http://stackoverflow.com/comment/46752728
type: Question
has title: jQuery - select DOM elements that have "hidden" attribute in an each() loop
tagged with: javascript
score: 0
answer count: 2
tagged with: jquery
accepted answer: http://stackoverflow.com/a/29277140
tagged with: each
possible better answer: http://stackoverflow.com/a/29277556
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29277556

http://stackoverflow.com/comment/46821995
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/29296616
has text: No, he doesn't show any error, as my own script. But the audio resource is reloaded
score: 0

http://stackoverflow.com/comment/46924080
type: Comment
score: 0
has text: If I remove the url or comment it out from the routes config, when I click on It, I get the working on it popup and never dismisses.
type: QuestionComment
comment on: http://stackoverflow.com/q/29371571

http://stackoverflow.com/comment/46836751
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29313405
type: Comment
has text: Well, what doesn't make sense is that we are mutating the value, when we try to think functional :-) Btw, it could be a `flatMap`/`reduce` operation :-)

http://stackoverflow.com/comment/46706865
score: 0
comment on: http://stackoverflow.com/q/29251388
type: QuestionComment
type: Comment
has text: There's a difference between _"not caring"_ for browser compatibility, and actively breaking your code.

http://stackoverflow.com/q/29256307
has comment: http://stackoverflow.com/comment/46716364
tagged with: mysql
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/46718125
has title: German characters in angularJS live search
score: 0
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/46717130
has comment: http://stackoverflow.com/comment/46756305
has body: German characters in AngularJS live search I have problem with AngularJS live search from MySQL, everything works perfectly except German characters. I tried everything but without results. This is my JS code: PATH = 'search.php'; var app = angular.module("myApp",[]); //live search controller for welcome view and welcome controller app.controller('SearchController', function($scope, $http){ $scope.url = 'search.php'; // the get request page $scope.search = function (){ //create the http post request //the data holds the search key //the request is a json request $http.post($scope.url, {"data":$scope.keybords} ).success(function (data, status){ $scope.status = status; $scope.data = data; $scope.result = data; }).error(function (data, status){ $scope.data = data || "Request Failed"; $scope.status = status; }); }; }); This is my PHP code: &lt;?php mysql_set_charset('utf8'); header('Content-Type: text/html; charset=utf-8'); require_once './db_connect.php'; $data = file_get_contents("php://input"); $objData = json_decode($data); $key = $objData-&gt;data; if(!empty($key)){ $sql = "SELECT * from search where title LIKE '%$key%' or description LIKE '%$key%' OR url LIKE '%$key%'"; $result = mysqli_query($link, $sql) or die(mysqli_error($link)); $output = array(); while ($row = mysqli_fetch_array($result)) { $output[] = $row; } echo json_encode($output); } ?&gt; ...and here is testpage: http://www.topfertighaus.at/ng_live_search/index.html
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46717404
has comment: http://stackoverflow.com/comment/46716200
tagged with: php
has comment: http://stackoverflow.com/comment/46752847
answer count: 0

http://stackoverflow.com/q/29344664
has answer: http://stackoverflow.com/a/29351251
accepted answer: http://stackoverflow.com/a/29351251
type: Question
tagged with: reactjs
has comment: http://stackoverflow.com/comment/46875677
has title: Tic-Tac-Toe using React JS
tagged with: javascript
answer count: 2
upvote count: 1
possible better answer: http://stackoverflow.com/a/31104039
favorite count: 0
has answer: http://stackoverflow.com/a/31104039
has comment: http://stackoverflow.com/comment/46875920
has comment: http://stackoverflow.com/comment/46877763
type: AnsweredQuestion
downvote count: 0
score: 1
has body: I'm new to web development world, especially to React JS. Here I'm trying to create a Tic-Tac-Toe game using React JS. The problem is when I try to click, it changes all other components as well, not only one. I know it's because I pass status to all divs, but I can't figure out how do I change only clicked component. I've searched a lot and found many Tic-Tac-Toe games which are used React JS, but I couldn't figure out how they work (mainly because of .map()). Can you guys please help with examples and explanations why you did so? And can someone explain how .map() works in React JS. I know how .map() works in general, but with React JS code I really got confused. var Game = React.createClass({ getInitialState: function() { return { status: " ", turn: 'o', clicks: 0 }; }, clickHandler: function() { var newClicks = this.state.clicks + 1; var newMark = newClicks%2 ? 'X' : 'O'; if ((status === 'X' || status === 'O')){ return; } this.setState({ status: newMark, clicks: newClicks }); }, render: function() { return {this.state.status} {this.state.status} {this.state.status} {this.state.status} {this.state.status} {this.state.status} {this.state.status} {this.state.status} {this.state.status} } }); React.render( <Game />, document.getElementById('container') );

http://stackoverflow.com/q/29354102
downvote count: 0
tagged with: javascript
duplicate of: http://stackoverflow.com/q/9733288
tagged with: colors
linked to: http://stackoverflow.com/q/9733288
favorite count: 0
has title: Logic of comparing two RGB colours for contrast in Javascript
answer count: 0
upvote count: 2
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/2353211
has body: I am trying to make a function in javascript that check how well a text show on its background. Example black(RGB(0,0,0)) text on white(RGB(255,255,255)) background is the best possible contrast. I would want my fn to return 100%. However if it was yellow text on green background how would I be able to determine how well those 2 colour contrast? I was thinking of (random example of two colours: |RGB(240,230,220) - RGB(220,130,255)| = RGB(20,100,35) then [RGB(20,100,35)/RGB(255,255,255)] = 8%,39%,14% Average of [8%,39%,14%] = 20% so those 2 colours are 20% contrast compatible. Is this the right way?
tagged with: css
score: 2
has comment: http://stackoverflow.com/comment/46893319
has comment: http://stackoverflow.com/comment/46893344
type: Question
has comment: http://stackoverflow.com/comment/46893288

http://stackoverflow.com/q/29260664
type: Question
has answer: http://stackoverflow.com/a/29266533
has comment: http://stackoverflow.com/comment/46733647
has comment: http://stackoverflow.com/comment/46748868
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/46733499
score: 0
has comment: http://stackoverflow.com/comment/46723655
has comment: http://stackoverflow.com/comment/46723642
has comment: http://stackoverflow.com/comment/46728443
has comment: http://stackoverflow.com/comment/46723457
has body: I have a PHP file that calls my print.js to print the page. This file was working on my server perfectly but after I moved the folder to my new server it stopped working. All I did was change the folder name after I moved it but I am confused because there aren't any absolute paths so it should still be working. When clicking the print button, I get Uncaught ReferenceError: PrintThisPage is not defined. I am not sure what the problem is because everything was working fine before. Can anyone give me some insight why I am receiving this error? PHP <?php render('_header',array('title'=>$title))?> Print JS function PrintThisPage() { var sOption="toolbar=yes,location=no,directories=yes,menubar=yes,"; sOption+="scrollbars=yes,width=750,height=600,left=100,top=25"; var youChoseHTML = $('#youchose').html(); var productHTML = $('#products').html(); var warningHTML = $('#warningcontainer').html(); var winprint=window.open("","",sOption); winprint.document.open(); winprint.document.write(' '); winprint.document.write(' '); winprint.document.write(youChoseHTML); winprint.document.write(warningHTML); winprint.document.write(productHTML); winprint.document.write(' DISCLAIMER: The information provided is for reference only. '); winprint.document.write(' '); winprint.document.close(); winprint.focus(); } function getUrlVars() { var url = window.location.href, vars = {}; url.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m, key, value) { key = decodeURIComponent(key); value = decodeURIComponent(value); vars[key] = value; }); return vars; }
type: UnansweredQuestion
has title: Uncaught ReferenceError: PrintThisPage is not defined
has comment: http://stackoverflow.com/comment/46748646
tagged with: php

http://stackoverflow.com/comment/46876814
type: Comment
type: QuestionComment
has text: What type of device are you running this on (android/ios/windows 8.1/?)?
score: 0
comment on: http://stackoverflow.com/q/29311884

http://stackoverflow.com/comment/46819789
comment on: http://stackoverflow.com/a/29313215
type: Comment
has text: @Bigboy6 At OP, `document.getElementsByName('cf')[1]` -> `[1]` -> index `1` . Not certain if interpret "Question 3" correctly ? `console.log(event.target.value, event.target.id)` ? Add `event` listeners to all `document.getElementsByName('cf')` elements ?
type: AnswerComment
score: 0

http://stackoverflow.com/comment/46895328
comment on: http://stackoverflow.com/q/29242621
has text: I undeleted the post now because I just ran into a problem. The filepath size is too big to build in jenkins (around the 255 windows character limit).
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29288975
tagged with: contenteditable
has answer: http://stackoverflow.com/a/29289115
downvote count: 1
type: Question
score: 14
has answer: http://stackoverflow.com/a/29289414
tagged with: javascript
upvote count: 15
answer count: 3
favorite count: 0
has comment: http://stackoverflow.com/comment/46775347
type: UnansweredQuestion
has body: I have the following: http://jsfiddle.net/mb76koj3/. [contentEditable=true]:empty::before{ content:attr(data-ph); color: #CCC; text-align: center; } h1 { text-align: center; } &lt;h1 contenteditable="true" data-ph="Name"&gt;&lt;/h1&gt; The problem is the &lt;h1&gt; is centered, but the placeholder caret isn't centered (until you start typing). The caret is on the left side, how can I change this?
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has title: Centering the placeholder caret in contentEditable element
has answer: http://stackoverflow.com/a/77632277

http://stackoverflow.com/q/29265232
downvote count: 4
answer count: 3
has answer: http://stackoverflow.com/a/29266517
has comment: http://stackoverflow.com/comment/46736217
has body: I have a LESS file with color definitions: @RED: #CE1512; @BLUE: #3E83A0; // ... I now have need of using these color definitions in my JavaScript as well. How best to share code like this between LESS and JavaScript?
tagged with: javascript
has comment: http://stackoverflow.com/comment/46735974
linked to: http://stackoverflow.com/q/19252248
favorite count: 0
has answer: http://stackoverflow.com/a/29265378
has comment: http://stackoverflow.com/comment/46732352
has title: Compiling LESS color definitions to JavaScript
has comment: http://stackoverflow.com/comment/46732334
type: UnansweredQuestion
score: -3
upvote count: 1
tagged with: less
type: Question
has answer: http://stackoverflow.com/a/29265322
has comment: http://stackoverflow.com/comment/46734911
has comment: http://stackoverflow.com/comment/46732597

http://stackoverflow.com/q/29219035
has comment: http://stackoverflow.com/comment/46647099
has comment: http://stackoverflow.com/comment/46647069
has comment: http://stackoverflow.com/comment/46648527
score: 0
has title: What normal JavaScript functions are available in PhantomJS?
has comment: http://stackoverflow.com/comment/46648429
has comment: http://stackoverflow.com/comment/46649322
tagged with: casperjs
answer count: 0
has body: My question is best illustrated by example. I'm attempting to begin writing some regression tests in CasperJS. However, the website requires authentication (not Basic HTTP Auth), so I'll be using the setup option function to log in for the duration of the tests. However, I don't want to hardcode this into the script for obvious reasons. My solution is to read in the credentials from stdin using system. However, I am trying to use readLine since I don't know the length ahead of time. This captures a newline at the end. I don't want the newline so I'm trying to trim it off the end. However, calling username.slice(0,-1) results in a crash, I think. It doesn't actually display any error, it just hangs. Thus, my question is what IS available in PhantomJS that we would be used to having in a normal JS environment? Is there a list somewhere? Bonus points if you know a way to configure CasperJS in the scenario of a login. EDIT: Test code, as requested. On my machine, it does nothing after you submit the username. var system = require('system') system.stdout.write("Please input username: ") username = system.stdin.readLine() user = username.slice(0,-1) // or trim() system.stdout.write("You entered: " + user);
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46648600
type: Question
tagged with: phantomjs
has comment: http://stackoverflow.com/comment/46647138
tagged with: javascript

http://stackoverflow.com/q/29266204
answer count: 1
has body: I'm trying to create a drawing board with two different colour brushes. You can select the brush you want by clicking on the appropriate button. Note: This only needs to work on iOS Safari. The two brushes are: A Yellow Highlighter A solid brush colour The issue I am facing is that selecting a different brush, alters the colour of the existing brush strokes on the canvas. How can I have each brush not affect the other? Code: var el = document.getElementById('c'); var ctx = el.getContext('2d'); var isDrawing; var _highlight = false; function marker(){ ctx.lineWidth = 10; ctx.strokeStyle = 'rgba(0,0,0,1)'; } function highlight(){ ctx.lineWidth = 15; ctx.strokeStyle = 'rgba(255,255,0,0.4)'; ctx.globalCompositeOperation = 'destination-atop'; } document.getElementById("marker").addEventListener("click", function(){ _highlight = false; }); document.getElementById("clear").addEventListener("click", function(){ ctx.clearRect(0, 0, el.width, el.height); ctx.restore(); ctx.beginPath(); }); document.getElementById("highlight").addEventListener("click", function(){ _highlight = true; }); el.onmousedown = function(e) { isDrawing = true; if(_highlight){ highlight(); ctx.lineJoin = ctx.lineCap = 'round'; ctx.moveTo(e.clientX, e.clientY); }else{ marker(); ctx.lineJoin = ctx.lineCap = 'round'; ctx.moveTo(e.clientX, e.clientY); } }; el.onmousemove = function(e) { if (isDrawing) { if(_highlight){ highlight(); ctx.lineTo(e.clientX, e.clientY); ctx.stroke(); }else{ marker(); ctx.lineTo(e.clientX, e.clientY); ctx.stroke(); } } }; el.onmouseup = function() { isDrawing = false; }; canvas#c { border: 1px solid #ccc; background:url(http://i.imgur.com/yf6d9SX.jpg); position: relative; left: 0; top: 0; z-index: 2; } Marker Highlight Clear
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/29072686
has title: Toggle brush colours html5 canvas
type: Question
tagged with: canvas
has answer: http://stackoverflow.com/a/29266306
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29266306
score: 0
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/46878518
comment on: http://stackoverflow.com/q/29303942
type: Comment
type: QuestionComment
has text: I edited my post to bring you some new information
score: 0

http://stackoverflow.com/q/29354827
has title: Add a Marker Inside a Polygon Depending on Where User Clicks
has answer: http://stackoverflow.com/a/29355278
has comment: http://stackoverflow.com/comment/46895309
upvote count: 1
downvote count: 1
type: Question
type: AnsweredQuestion
has body: Depending on where a user clicks inside the polgyon, I display an infoWindow. This is done by adding a click event listener to the polygon: bermudaTriangle.addListener('click', function(event) { var anchor = new google.maps.MVCObject(); anchor.set("position", event.latLng); infowindow.open(map, anchor); }); Is there any way I can show a marker icon at the anchor point that is being retrieved using event.latLng? If I create new google.maps.Marker instead of new google.maps.MVCObject, then the infoWindow opens outside of the polygon, and is way off. Example: http://jsfiddle.net/2qyhkkok/
tagged with: google-maps
accepted answer: http://stackoverflow.com/a/29355278
answer count: 1
tagged with: javascript
favorite count: 0
tagged with: google-maps-api-3
score: 0

http://stackoverflow.com/q/29265706
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29317587
has comment: http://stackoverflow.com/comment/46733888
answer count: 2
has answer: http://stackoverflow.com/a/29266491
has comment: http://stackoverflow.com/comment/46734311
tagged with: javascript
has comment: http://stackoverflow.com/comment/46733176
tagged with: angularjs-ng-include
score: 0
tagged with: angularjs-ng-repeat
has body: My custom directives compile function is executed before ngRepeat (priority=1000) and ngInclude (priority=400), despite of default priority is 0, so it should be executed after. Snippet shows that content appended by myDir directive is missing, only shows included content from ngInclude template: angular.module("app", []) .run(function($templateCache) { $templateCache.put('test.html', ' Content included by ngInclude Number {{$index}}'); }) .directive("myDir", function() { return { compile: function(elm){ elm.append('apended by directive myDir, 1+1={{1+1}}'); return function link(){}; } }; }) .controller("myApp", function($scope){ $scope.items = [1,2,3]; }); First content I have same code in jsfiddle here: jsfiddle-link There it shows expected behaviour. Appended text from directive is shown. Because of lowest priority text is appended after ngRepeat and ngInclude compile functions. Difference between examples is in angular versions only. Snipped here runs on v1.2.23 (same behaviour as in my project running v1.3.0) and jsfiddle runs on v1.2.1 Any advice is welcome, thanks in advance ;) PS: In jsfiddle example, there is "Number {{$index}}" part missing in view, extra score for those who tell me why.
accepted answer: http://stackoverflow.com/a/29266491
tagged with: angularjs
has title: My directive is executed before ngRepeat and ngInclude, despite of default priority 0
possible better answer: http://stackoverflow.com/a/29317587
type: Question
tagged with: angularjs-directive

http://stackoverflow.com/q/29358062
has title: google.maps.event.addDomListener(window, 'load', function(){}) vs window.onload = function(){}
has comment: http://stackoverflow.com/comment/46900618
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29365313
accepted answer: http://stackoverflow.com/a/29365313
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/46900918
has comment: http://stackoverflow.com/comment/46900734
tagged with: google-maps-api-3
score: 0
answer count: 1
has body: What is the purpose of google's api having a method for assigning event handlers? Why would I use: google.maps.event.addDomListener(window, 'load', function(){}); over window.onload = function()

http://stackoverflow.com/q/29277066
tagged with: hybrid-mobile-app
type: Question
accepted answer: http://stackoverflow.com/a/29280073
tagged with: javascript
has title: How to automatically open modal on app launch?
tagged with: ionic-framework
score: 0
tagged with: modal-dialog
answer count: 1
has body: Currenly I have a modal which opens up when a button is clicked. However this isn't what I want, I want the modal to open up when the app is launched. My goal is to create an introduction modal which only appears the first time the user uses the app. However I'm having problems opening the modal on app launch. The first step is to open the modal on app launch. Then the second step is create a function that saves on the local storage if the user has been on the app before. If not then it will display the modal. If yes then it will hide the modal. I've seen examples of this function on http://jsfiddle.net/zono/vHG7j/ however I also can't get this working with my current modal. Would deeply appreciate help, thanks in advance :) My modal: Edit Contact Name Info Done JS: angular.module('Mob').controller('TeamCtrl', function($scope, $ionicModal) { /* Modal */ $ionicModal.fromTemplateUrl('intro-modal.html', { scope: $scope, animation: 'slide-in-up' }).then(function(modal) { $scope.modal = modal; }); $scope.openModal = function() { $scope.modal.show(); }; $scope.closeModal = function() { $scope.modal.hide(); }; //Cleanup the modal when we're done with it! $scope.$on('$destroy', function() { $scope.modal.remove(); }); })
has answer: http://stackoverflow.com/a/29280073
type: AnsweredQuestion

http://stackoverflow.com/comment/47006435
has text: I appreciate that English isn't your first language, but I've told you *several times now* that **using window.onload = initialize; does not fix the problem**. I appreciate any help you can give, but please don't keep suggesting the same thing over and over when it's already been ruled out. Thanks again.
comment on: http://stackoverflow.com/a/29388253
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/46805641
score: 0
type: Comment
type: QuestionComment
has text: I see... so what's the issue then? Just let the user consume thunks like they are meant to be consumed. They don't have a do use a generator (+ yield), they could just use `myObj.getFieldValue()(function(error, val) { ....});`. Your desired result is impossible to achieve.
comment on: http://stackoverflow.com/q/29301316

http://stackoverflow.com/comment/46879990
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29346801
has text: Guys I Apologize, my loopVar was char probably.

http://stackoverflow.com/comment/46736427
has text: If you want to use ajax posting and progress bar check this answer, this answer can almost be change for multiple uploads and display as one progress bar but this is where you need to put in the work. I know because i use the same for my multiple uploading and single uploaing. http://stackoverflow.com/questions/26674575/php-upload-extract-and-progressbar/26679480#26679480
comment on: http://stackoverflow.com/q/29267364
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29292290
has body: Is there a decent way to capture the audio stream of a user and record it? I've only seen the getUserMedia() functions, but those seem to be only usable with the Mic or webcam. Any ideas?
downvote count: 2
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/29292322
tagged with: javascript
score: -1
answer count: 1
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has title: Retrieve system audio through HTML
tagged with: audio
type: UnansweredQuestion

http://stackoverflow.com/a/29221202
type: AcceptedAnswer
score: 0
type: Answer
has body: I'm sure you'll want to do some kind of server-side saving of the comments, but the code below answers your question by adding the elements to the DOM. You'll see some changes to your code, including some IDs and proper closing of input and br tags. HTML: Post Your Comments! Name: Add! JavaScript: $(document).ready(function () { $('#btnAdd').on('click', function (event) { event.preventDefault(); // Create new HTML string containing name & comment var newComment = ' ' + $('#txtName').val() + ' ' + ' ' + $('#txtComments').val() + ' '; // This creates a new jQuery object containing newComment // and appends it to the posted comments section $(newComment).appendTo('#postedComments'); // Clear input $('#txtComments').val(''); $('#txtName').val(''); }); }); Demo: http://jsfiddle.net/BenjaminRay/85k8y6eo/ If you want to post the comments to the server and only add them to the DOM after they have been saved on the server, look into jQuery's post() (or other similar AJAX functions). https://api.jquery.com/jquery.post/
answers question: http://stackoverflow.com/q/29220995
accepted answer of: http://stackoverflow.com/q/29220995

http://stackoverflow.com/comment/46778061
type: Comment
has text: Ah yes that's what's happening! I tried "alert(response);" to see what was being sent back and it gave me this: ** Notice: Undefined index: userbirthday in C:\wamp\www\gamedev\insertuserdetails.php on line 46 0** The zero is there, but so is the error message for the userbirthday variable, for some reason the user's birthday doesn't get sent to the database in the AJAX, the PHP has always entered an empty value for it in the database but I figured that was due to a Facebook profile setting.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29264292

http://stackoverflow.com/a/29234474
accepted answer of: http://stackoverflow.com/q/29234385
score: 15
answers question: http://stackoverflow.com/q/29234385
has body: There are two important differences between your way and theirs. Wrapping in a self invoking function ((function() { ... })();) Using the .prototype property over this. for methods. Wrapping things in a self invoking function, then assigning the result (as defined in the return statement to a variable is called the module pattern. It's a common pattern to ensure scope is more controlled. Using Dog.prototype.sound = function() {} is preferable to this.sound = function(). The difference is that Dog.prototype.sound is defined once for all objects with the Dog constructor, and the this.sound = function() {} is defined again for each Dog object created. The rule of thumb is: Things that are individual to an object (usually its properties) are to be defined on this, while things that are shared to all objects of the same type (usually functions) are to be defined on the prototype.
upvote count: 15
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/a/29369581
type: Answer
has body: You don't need to reinvent the wheel. Your approach will not account for the curvature of the Earth so your calculations will be inaccurate if the distances are large. I would advise to use Geospatial Indexes already supported by MongoDB. UPDATE For example you can use $centerSphere operator which returns documents within a radius from a central point (example taken from there). { &lt;location field&gt;: { $geoWithin: { $centerSphere: [ [ &lt;x&gt;, &lt;y&gt; ], &lt;radius&gt; ] } } } To do this you need to store your coordinates in GeoJSON format (you need to add just a few meta fields to your html5 coordinates).
answers question: http://stackoverflow.com/q/29365383
has comment: http://stackoverflow.com/comment/46947173
has comment: http://stackoverflow.com/comment/46953109
upvote count: 1
type: AcceptedAnswer
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/29365383

http://stackoverflow.com/a/75828108
answers question: http://stackoverflow.com/q/29319420
score: 0
has body: We had the same problem and did not find any solution. To solve this problem i wrote a small plugin for PM2 which can help dynamically scale applications based on utilization demand. You can try and play with it https://www.npmjs.com/package/pm2-autoscale Or just install it directly pm2 install pm2-autoscale When module detects that CPU utilisation is higher then expected it will start increasing instances to max CPUs-1 and if server has available free memory. When module detects CPU utilization is decreasing it will stop useless instances.
type: Answer

http://stackoverflow.com/q/29218879
score: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has body: How avoid jquery validation css to field too. I have a dropdown. If validation fails. dropdown text color also changing to red. How to avoid that? and also validation error message show under field. suppose to next to field. class .validationError { color: #ff0000; } Select Personal Work/University Required script $.validator.addMethod("selectNone", function (value, element) { alert(value); if (value == 'Select') return false; else return true; }); $("#frmEmail").validate({ rules: { CommunicationLocation: { required: true } }, messages: { CommunicationLocation: { required: "Required" } }, errorClass:"validationError",
type: UnansweredQuestion
has title: jquery validation css change effecting field too?
has comment: http://stackoverflow.com/comment/46652494
has comment: http://stackoverflow.com/comment/46646760
has comment: http://stackoverflow.com/comment/46646923
tagged with: jquery-validate
has comment: http://stackoverflow.com/comment/46652567
type: Question
has answer: http://stackoverflow.com/a/29221705
answer count: 1
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/29297209
accepted answer of: http://stackoverflow.com/q/29296010
answers question: http://stackoverflow.com/q/29296010
has comment: http://stackoverflow.com/comment/46949015
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 1
upvote count: 1
has body: As described in Mark Colemans blog post about this, you can get your config and then load the application. Pasting Mark's code for convenience: var urlToCheck = '/echo/json/'; var myApp = angular.module('myApp', []); myApp.controller("MyCtrl", ["$scope", "config", function ($scope, config) { $scope.url = config.url; }]); $.ajax({ url: urlToCheck }).fail(function () { myApp.constant('config', { url: '/fail-url' }); }).done(function () { myApp.constant('config', { url: '/done-url' }); }).always(function () { angular.bootstrap(document, ['myApp']); });

http://stackoverflow.com/a/29263176
has comment: http://stackoverflow.com/comment/46759702
type: Answer
answers question: http://stackoverflow.com/q/29222634
has comment: http://stackoverflow.com/comment/46792848
score: 0
has comment: http://stackoverflow.com/comment/47035690
has body: fullPage.js doesn't provide a proper way to work with dynamic sections or slides at the moment. You would need to replicate the structure used by it. fullPage.js follows the following structure internally when dealing with slides within a section: Slide 1 Slide 2 Slide 3 You can easily check it by inspecting the DOM in the demo page. Note a few things: fullPage.js is using an internal class to identify the slides within a section, which is: fp-slide. It is also using two wrappers for the slides with the class fp-slidesContainer and fp-slides You would also have to add the width in percentage depending on the number of slides that you have. There are two elements for each arrow (left and right)
has comment: http://stackoverflow.com/comment/47077719

http://stackoverflow.com/comment/46698578
type: QuestionComment
has text: what happened if you change `Template.shop.rendered` to `Template.catalog.rendered` ? also what you get running this on the Meteor `shell meteor --version`
score: 0
comment on: http://stackoverflow.com/q/29246234
type: Comment

http://stackoverflow.com/comment/46830256
type: Comment
comment on: http://stackoverflow.com/q/29315090
score: 0
type: QuestionComment
has text: @jcbartlett25 You still have a problem in that you are referring to elements by the IDs `descript`, `title`, etc. And creating copies of those elements. As LShetty has already said, you shouldn't have multiple elements with the same ID.

http://stackoverflow.com/comment/46905705
type: Comment
comment on: http://stackoverflow.com/q/29357668
score: 0
has text: Just give it a try it will works. It has nothing to do with cakephp its all jquery. try the console for url browse it on you browser directly, you will know.
type: QuestionComment

http://stackoverflow.com/comment/46837546
type: QuestionComment
comment on: http://stackoverflow.com/q/29323288
score: 0
has text: Can include returned `json` ?
type: Comment

http://stackoverflow.com/a/29266313
has body: the ERR_CONNECTION_RESET is generally a return message from the webserver. It is reset your TCP/IP connection. What webserver are you using?
type: Answer
answers question: http://stackoverflow.com/q/29266240
has comment: http://stackoverflow.com/comment/49666917
has comment: http://stackoverflow.com/comment/46832861
score: 0

http://stackoverflow.com/a/29285643
upvote count: 1
downvote count: 1
answers question: http://stackoverflow.com/q/29285006
accepted answer of: http://stackoverflow.com/q/29285006
score: 0
has comment: http://stackoverflow.com/comment/46769504
type: AcceptedAnswer
has body: I can't say 100% what they use since (to my knowledge) it isn't exactly out there; but you can look into other libraries which achieve very similar layouts like: Masonry, Isotope, Salvattore, etc... There is a good chance Google is either extending functionality from that, or using it themselves. Also to add to this question, look into the stackoverflow question I found from another user: Is there a Google Keep API?
type: Answer
has comment: http://stackoverflow.com/comment/46769858

http://stackoverflow.com/a/29335505
has body: You should use a value instead of "slow", for me that seems to fix it. Also I recommand to put return false at the end of the function to prevent the view from going to the top of the page again.
answers question: http://stackoverflow.com/q/29335410
type: Answer
score: 0

http://stackoverflow.com/q/29349816
answer count: 2
accepted answer: http://stackoverflow.com/a/29375281
upvote count: 1
tagged with: javascript
tagged with: fabricjs
tagged with: canvas
type: AnsweredQuestion
downvote count: 0
possible better answer: http://stackoverflow.com/a/29349961
score: 1
has answer: http://stackoverflow.com/a/29375281
tagged with: jquery
has answer: http://stackoverflow.com/a/29349961
favorite count: 0
type: Question
has body: When I click a circle, the rectangle is created around of circle.How can I remove it? http://jsfiddle.net/yrL4eLsn/4/ var canvas = new fabric.Canvas(document.getElementById('c')); var rect = new fabric.Rect({ width: 100, height: 100, left: 50, top: 50, fill: 'rgba(255,0,0,0.5)' }); var circle = new fabric.Circle({ radius: 50, left: 175, top: 75, fill: '#aac' }); canvas.add(rect); canvas.add(circle);
has title: Removing selected object rectangle in Fabric.js

http://stackoverflow.com/comment/46791671
score: 0
comment on: http://stackoverflow.com/q/29298273
has text: I know the solution, But i want to know why it's happen?
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29245010
has body: when I use form.reset() in javascript. The function will reset the form to its original state. for example: &lt;form id="myForm"&gt; First name: &lt;input type="text" name="fname" value="??"&gt;&lt;br&gt; Last name: &lt;input type="text" name="lname"&gt;&lt;br&gt;&lt;br&gt; &lt;input type="button" onclick="myFunction()" value="Reset form"&gt; &lt;/form&gt; &lt;script&gt; function myFunction() { var form = document.getElementById("myForm"); form.reset(); } &lt;/script&gt; when I running this code the first input field will be reset to "??" (which is the original value). How does javascript get this value? Can I access it? I am building an website which need to check if user has changed any value of the form. If nothing changes I want to stop user from submitting the form. that's why I am asking is there any way I can have a general method to check if the current value of some field is equal to its original value.
has answer: http://stackoverflow.com/a/29245082
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46695942
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
answer count: 1
has title: Javascript check the form current data is equal to its original data
favorite count: 0
accepted answer: http://stackoverflow.com/a/29245082
type: AnsweredQuestion
score: 1
upvote count: 1
type: Question

http://stackoverflow.com/comment/46738746
type: QuestionComment
comment on: http://stackoverflow.com/q/29268613
has text: @IsmaelMiguel Yes, that works fine, as does finding the button and running `.click()`. But that is not what I'm trying to test.
score: 0
type: Comment

http://stackoverflow.com/a/29232457
type: AcceptedAnswer
type: Answer
has body: Give your local server relative url of Porsche_911_GT2.js to JSONLoader. It will not work with file protocol... It should be on a server and accessible via http or https protocol.
score: 2
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29232145
answers question: http://stackoverflow.com/q/29232145
upvote count: 2

http://stackoverflow.com/comment/46717626
comment on: http://stackoverflow.com/a/29257073
type: Comment
has text: figured it out .. :-)
type: AnswerComment
score: 0

http://stackoverflow.com/a/29324419
accepted answer of: http://stackoverflow.com/q/29324342
has comment: http://stackoverflow.com/comment/46839805
has body: You can try to add top:0; in your .bg css .bg { opacity: 0.5; position: absolute; width: 100%; height: 100%; -webkit-transition: opacity 5s; -moz-transition: opacity 5s; transition: opacity 5s; top: 0; }
answers question: http://stackoverflow.com/q/29324342
has comment: http://stackoverflow.com/comment/46839729
upvote count: 1
type: AcceptedAnswer
type: Answer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/46839653

http://stackoverflow.com/comment/46847618
has text: Downvoted for Off topic cause opinion-based.
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29327539

http://stackoverflow.com/comment/46883716
score: 0
type: Comment
has text: I'm not going to adopt an entire framework for this one issue. But thanks anyway.
type: AnswerComment
comment on: http://stackoverflow.com/a/29348607

http://stackoverflow.com/comment/113211946
has text: This is neat and off-course works for v5.x With arrow functions one could simply further as `onClick={ () => history.push('/home') }`
type: AnswerComment
comment on: http://stackoverflow.com/a/59547618
type: Comment
score: 0

http://stackoverflow.com/a/29338888
answers question: http://stackoverflow.com/q/29338725
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46868464
has comment: http://stackoverflow.com/comment/46871528
accepted answer of: http://stackoverflow.com/q/29338725
type: Answer
downvote count: 1
has comment: http://stackoverflow.com/comment/46872228
score: -1
has body: $(".btn1").click(function() { $("#toggle-example").fadeToggle(); }) @charset "utf-8"; body { width: 960px; overflow-x: hidden; } } html, body { height: 100%; } #toggle-example { display: none } body { margin: 0px; padding: 0px; background: #ffffff; font-family: 'Raleway', sans-serif; font-size: 11pt; font-weight: 400; color: #363636; } a { text-decoration: none } .wrapper { text-align: center; width: 100%; position: absolute; } .header { background-color: #ffffff; } .header img { width: 360px; } #nav { background-color: black; width: 100%; font-size: 1em; border-top-width: medium; border-top-style: groove; border-bottom-style: groove; border-bottom-width: medium; } #nav a { letter-spacing: 1px; } #nav ul { list-style: none; display: block; font-size: larger; } #nav ul li { display: inline-block; } #nav ul { text-align: center; } #nav ul li a { color: #ffffff; text-decoration: none; display: block; padding-top: 10px; padding-right: 15px; padding-left: 15px; padding-bottom: 10px; font-family: Constantia, "Lucida Bright", "DejaVu Serif", Georgia, serif; text-transform: uppercase; position: relative; } #nav ul li a:hover { color: #fff; } #cssmenu ul li a:hover:before { width: 100%; } #nav ul li a.active { text-decoration: underline; color: #EDF0BA; } div.navigation li { list-style: none; } div.navigation li:hover { background: #555; } div.navigation li:hover ul { display: block; } .how, .about { font-family: Segoe, "Segoe UI", "DejaVu Sans", "Trebuchet MS", Verdana, sans-serif; margin-left: 10%; margin-right: 10%; background-color: white; text-align: left; color: black; } .sectiontitle { text-align: center; color: black; text-shadow: 1px 1px 2px #767676; } .footer { background-color: black; width: 100%; border-style: groove hidden hidden; border-bottom-right-radius: 8px; border-bottom-left-radius: 8px; padding-top: 1%; padding-bottom: 1%; font-size: 1em; color: #FFFFFF; font-variant: small-caps; vertical-align: middle; } .addnotes { float: left; padding-left: 2%; font-c…
upvote count: 0

http://stackoverflow.com/q/29325069
has body: Say, if I wanted to generate an unbiased random number between min and max, I'd do: var rand = function(min, max) { return Math.floor(Math.random() * (max - min + 1)) + min; }; But what if I want to generate a random number between min and max but more biased towards a value N between min and max to a degree D? It's best to illustrate it with a probability curve:
has answer: http://stackoverflow.com/a/29332646
type: Question
possible better answer: http://stackoverflow.com/a/29351508
tagged with: algorithm
tagged with: math
linked to: http://stackoverflow.com/q/1527803
tagged with: javascript
upvote count: 34
has comment: http://stackoverflow.com/comment/46841012
has comment: http://stackoverflow.com/comment/46846892
has title: How to generate random numbers biased towards one value in a range?
has comment: http://stackoverflow.com/comment/46841295
has comment: http://stackoverflow.com/comment/46841246
accepted answer: http://stackoverflow.com/a/29325222
favorite count: 0
has answer: http://stackoverflow.com/a/29351508
has comment: http://stackoverflow.com/comment/46884267
score: 32
has answer: http://stackoverflow.com/a/29325222
answer count: 4
linked to: http://stackoverflow.com/q/16110758
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46863116
has answer: http://stackoverflow.com/a/29325311
tagged with: probability
downvote count: 2

http://stackoverflow.com/comment/46835592
has text: Aha, when i tested it, the canvas was in the top left, so the mouse offset in the window and canvas was essentially the same.
comment on: http://stackoverflow.com/a/29322213
type: Comment
score: 1
type: AnswerComment

http://stackoverflow.com/comment/46646761
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29218849
has text: You're going to have better luck searching the web for a solution. SA is going to help you solve specific problems or hangups you run into. Don't ask a question expecting users to write a solution for you.

http://stackoverflow.com/comment/46705979
type: Comment
comment on: http://stackoverflow.com/a/29244539
has text: Thank you, it is working. I corrected the jshint errors (moved functions above return), otherwise it was plug and play:)
score: 0
type: AnswerComment

http://stackoverflow.com/comment/46947061
has text: i used like this to transfer value through javascript to template file... success: function(jsonData) { if (jsonData) { $('.order-detail-id').html(jsonData.reference); $('.order-updated-date').html(jsonData.date_upd); $('.order-detail-carrier').html(jsonData.carrier.name); }}
comment on: http://stackoverflow.com/a/29343332
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/46743048
comment on: http://stackoverflow.com/a/29270995
has text: Thank you. This is the problem when I work in the company. I use that example to show you my issue. Anyway thanks a lot.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/105040526
type: Comment
has text: How to remove white stroke except in the part of separation of the inner and outer chart?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/33751574

http://stackoverflow.com/comment/46749050
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29260781
has text: you may not just remove function prefix, also sorted it when change the tag.

http://stackoverflow.com/comment/46805072
type: QuestionComment
comment on: http://stackoverflow.com/q/29305324
has text: [It works for me](http://jsfiddle.net/wahwahwah/t7gs7Lny/8/)
score: 3
type: Comment

http://stackoverflow.com/comment/90952262
score: 0
type: Comment
comment on: http://stackoverflow.com/a/48335220
has text: to me stateNode was not enough, but this worked: `el._debugOwner.stateNode.constructor.name`
type: AnswerComment

http://stackoverflow.com/q/29371002
upvote count: 1
tagged with: google-chrome
type: Question
has body: The problem I have the problem where Chrome is not placing the attr from an image. Note: The following snippet is working without any errors in Firefox and Internet Explorer. $(".product .left img").each(function(){ var img = $(this); var src = $(this).attr('src'); $(this).addClass("zoom").attr('data-zoom-image', '' + src + ''); var imgsrc = $(this).attr("data-zoom-image"); var on = imgsrc.replace(/.png$/gi,"-large.png"); $(img).attr("data-zoom-image",on); }); What I am trying to do I would like to grab the source of the image and place it in a data-zoom-image attribute. Then manipulate the url placed in the data-zoom-image attribute by looking for.png and replacing that part with -large.png. In Chrome the attribute gets placed in the image tag, but it only shows: data-zoom-image="undefined" What could I improve to my code snippet to make it work in Chrome?
has title: jQuery place attr src not working in Chrome
tagged with: javascript
has answer: http://stackoverflow.com/a/29371061
answer count: 1
downvote count: 0
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46922919
score: 1

http://stackoverflow.com/comment/46925369
comment on: http://stackoverflow.com/a/29371185
type: AnswerComment
score: 0
has text: You may be right sir, if what he intends is something like an __repr__ in python, ie a representation of the object, that is ok... but from the question I would not say so.
type: Comment

http://stackoverflow.com/comment/46689503
score: 0
comment on: http://stackoverflow.com/q/29241723
has text: missing quotation in attr('src', "img2.png");
type: Comment
type: QuestionComment

http://stackoverflow.com/a/55766544
has body: With ES6+ you can just do [${variable}]
type: Answer
upvote count: 4
downvote count: 0
score: 4
answers question: http://stackoverflow.com/q/29280445

http://stackoverflow.com/q/29254079
upvote count: 1
has title: Error: Cannot write a value to a ko.computed unless you specify a 'write' option. If you wish to read the current value, don't pass any parameters
tagged with: knockout.js
type: Question
has comment: http://stackoverflow.com/comment/46712485
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29259255
downvote count: 0
answer count: 1
linked to: http://stackoverflow.com/q/26393484
favorite count: 0
has comment: http://stackoverflow.com/comment/46713190
has comment: http://stackoverflow.com/comment/46712001
linked to: http://stackoverflow.com/q/12014128
has body: I have use the below link to make a filter on select option based on input text : 1. http://jsfiddle.net/tyrsius/67kgm/ 2. http://www.knockmeout.net/2011/04/utility-functions-in-knockoutjs.html 3. Using Knockout to Filter ViewModel Data Using Multiple Fields/Columns and Controls Faced a Error: Cannot write a value to a ko.computed unless you specify a 'write' option. If you wish to read the current value, don't pass any parameters. Did some research and found the below link to solve 1. Possible Bug: Breeze.js 1.5 -- Cannot write a value to a ko.computed unless you specify a 'write' option 2. Cannot write a value to a ko.computed unless you specify a 'write' option But still facing the error not able to find out the solution. Can anyone please help me I know this question has been ask most of the time . Ironically I am not able to find the solution.Where is the mistake??. function AccessLevelVM() { var self = this; self.AccessLevel_nameSearch = ko.observable(); self.PositionTypeJobDesc = ko.computed(function () { var filter = self.AccessLevel_nameSearch(); if (!filter) { return self.PositionTypeJobDesc(); } else { return ko.utils.arrayFilter(self.PositionTypeJobDesc(), function (item) { return ko.utils.stringStartsWith(PositionTypeJobDesc.PositionByDept.toLowerCase(), filter.toLowerCase()); }); } }); } $(document).ready(function () { ko.utils.stringStartsWith = function (string, startsWith) { string = string || ""; if (startsWith.length > string.length) return false; return string.substring(0, startsWith.length) === startsWith; }; var Model = new AccessLevelVM() ko.applyBindings(Model, document.getElementById('AccessLevelForm')); }); HTML
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/19156766
accepted answer: http://stackoverflow.com/a/29259255
score: 1
has comment: http://stackoverflow.com/comment/46717146

http://stackoverflow.com/a/29256447
has comment: http://stackoverflow.com/comment/46715616
type: Answer
score: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/46724245
upvote count: 3
has body: Note: this line of your code produces a string, not an array. var product = $(ul).html(); //returns string not an array what you need is something like var product_arr = {}; // an object or var product_arr = []; // an array
answers question: http://stackoverflow.com/q/29254230

http://stackoverflow.com/q/29308937
has answer: http://stackoverflow.com/a/30806620
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/42712490
score: 46
type: Question
has body: Just getting started with React-Native and I'm having some trouble requiring a static image. Here's the very-basic code I have so far: 'use strict'; var React = require('react-native'); var { AppRegistry, StyleSheet, Text, Image, View, } = React; var buzz = React.createClass({ render: function() { return ( Welcome to Buzz! iOS interface to Charityware ); } }); var styles = StyleSheet.create({ container: { flex: 1, justifyContent: 'center', alignItems: 'center', backgroundColor: 'transparent' }, welcomeHeader: { fontWeight: '600', fontFamily: 'Helvetica', color: '#fff', fontSize: 50, alignSelf: 'center' }, bg: { width: 400, height: 300, alignSelf: 'auto', }, welcome: { fontSize: 20, textAlign: 'center', margin: 10, }, instructions: { textAlign: 'center', color: '#333333', }, }); AppRegistry.registerComponent('buzz', () => buzz); The main trouble area is: Welcome to Buzz! iOS interface to Charityware When packaging my app and running it, I get a render error: I understand that you need to add images in xcode as an image set in order for the require call to find the image and have added an image set to that end: ...But to no avail. Anyone have any thoughts? I've read the docs and seem to be doing this in the prescribed way. Thanks!
has answer: http://stackoverflow.com/a/34001042
upvote count: 46
has comment: http://stackoverflow.com/comment/59481592
tagged with: react-native
has answer: http://stackoverflow.com/a/33625059
tagged with: javascript
has answer: http://stackoverflow.com/a/41768971
possible better answer: http://stackoverflow.com/a/29381280
tagged with: reactjs
has answer: http://stackoverflow.com/a/29381280
downvote count: 0
tagged with: ios
answer count: 7
favorite count: 0
has title: Trouble requiring image module in React Native
accepted answer: http://stackoverflow.com/a/33625059
has answer: http://stackoverflow.com/a/29310672
tagged with: xcode

http://stackoverflow.com/comment/46779635
has text: @JonP, thanks for the heads up. I edited my other similarly structured question and posted our solution as the answer. I think it can help readers as this was quite an abstruse bug.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29291311
score: 0

http://stackoverflow.com/q/29248323
score: 1
tagged with: jquery-chosen
has body: I am implementing chosen dropdown in my project. But I have some problem which I want to solve. Before proceeding, let me give you the jQuery fiddle: http://jsfiddle.net/jHvmg/278/ Now I have a dropdown like this Option 1 Option 2 Option 3 Option 4 Option 5 As you can see in the fiddle: 1) If I write "Opt" in the searchbox then the list is filtered showing all the options. 2) If I write " 1" it shows "Option 1" 3) If I write "1" it shows "Option 1" 4) If I write "ptio" then it states "No results" 5) If I write "tio" then it states "No result" I want to results if words typed in the searchbox matches.
type: Question
answer count: 2
has title: Search issue on chosen dropdown using jQuery
possible better answer: http://stackoverflow.com/a/29248412
tagged with: javascript
has answer: http://stackoverflow.com/a/29248412
tagged with: jquery
upvote count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/29248391
accepted answer: http://stackoverflow.com/a/29248391
type: AnsweredQuestion
downvote count: 0

http://stackoverflow.com/comment/46904890
has text: It's nice to know that I can use `html()` function too for that. Thanks!
comment on: http://stackoverflow.com/a/29342337
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/87707224
comment on: http://stackoverflow.com/q/29245503
score: 0
type: Comment
type: QuestionComment
has text: Hypothesis: The upper half of the screen shot may be logical from the standpoint that normal HTML ignores white space. The ` ` tag alters this behavior, thus the user-agent will emulate the effect of having multiple lines by paying attention to line breaks. It adds multiple text nodes. What jQuery does to concatenate the text into one string is probably a jQuery thing.

http://stackoverflow.com/q/29269132
type: Question
type: AnsweredQuestion
has body: I'm trying to create a dynamic navbar which changes on scroll and having problems getting the elements within the nav to stay fixed when the menu options appear. see the attached codepen to see what I mean: http://codepen.io/timothyfernandez/pen/azXQPV Any help would be very much appreciated! The CSS: body {font-family:sans-serif;} .socialmedia {margin-left: 80%;} .socialmedia li { display: inline; border:none !important;} /*Fixed Nav*/ #nav { position: fixed; top: 0; left: 0; width: 100%; padding:30px 0 5px 0; z-index: 100; color: white; background-color: #211f1f; font-family: sans-serif;} .inner { margin-left: 19%; float: left; text-align: justify; font-size: 120%;} .inner a { padding: 0px 63px;} #nav li { display: inline; border-right: 1px solid grey;} #nav a { display: inline-block; color: #FFF; text-decoration: none;} /*Nav Transitions*/ .noNav {display: hidden;} #content { width: 800px; height: 700px; margin-top:100px; margin-left:auto; margin-right:auto;}
has title: fixing three divs in a dynamic navbar
has answer: http://stackoverflow.com/a/29269201
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/29269201
tagged with: css

http://stackoverflow.com/comment/46788149
type: Comment
has text: Thanks Kosmo. This is exactly im looking
comment on: http://stackoverflow.com/a/29296189
score: 0
type: AnswerComment

http://stackoverflow.com/comment/46685365
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29239170
has text: I guess I should have explained better. Scenario: - User visits a page, - Clicks on the Bookmark - It opens a new window(which will be smaller) and displays all the data from dataLayer.

http://stackoverflow.com/a/29290215
answers question: http://stackoverflow.com/q/29290182
has comment: http://stackoverflow.com/comment/46777888
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/46777704
upvote count: 2
has comment: http://stackoverflow.com/comment/46777722
has comment: http://stackoverflow.com/comment/46777858
has comment: http://stackoverflow.com/comment/46777770
has comment: http://stackoverflow.com/comment/46777738
downvote count: 0
has body: The items in the returned jQuery set are native DOMElements you need to rewrap them like $($('.meteo')[h]).attr('id', 'meteo'+h); or use the native setAttribute method like so: Native only: var metro = document.querySelectorAll('.metro'), i; for (i = 0; i &lt; 4; i++) metro[i].setAttribute('id', 'metro'+i);

http://stackoverflow.com/comment/46700117
comment on: http://stackoverflow.com/q/29247466
score: 0
type: Comment
type: QuestionComment
has text: whether `farm` an input text box or some `div`? If it's a text box use `.value` instead and also before parseInt, check if `farm` is not undefined/null and then add

http://stackoverflow.com/q/29343011
tagged with: smarty
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/46946979
type: Question
tagged with: javascript
has title: How to pass the object values with in the products object here to smarty from php through json
score: 0
has body: POST http://www.chirubhai.com/modules/trackmyorder/ViewOrderStatus.php 200 OK 145ms 491dc0a...f293.js (line 2) HeadersPostResponseHTMLJSONCookies JSON: { "id_address_delivery":"3819", "id_address_invoice":"3819", "id_shop_group":"1", "id_shop":"1", "id_cart":"11708", "id_currency":"1", "id_lang":"1", "id_customer":"1994", "id_carrier":"23", "current_state":"19", "secure_key":"57fd1d90574aa441e059c10b8714d6bb", "payment":"Cash on delivery (COD)", "module":"cashondelivery", "conversion_rate":"1.000000", "recyclable":"0", "gift":"0", "gift_message":"", "mobile_theme":"0", "shipping_number":"", "total_discounts":"962.50", "total_discounts_tax_incl":"962.50", "total_discounts_tax_excl":"962.50", "total_paid":"8662.50", "total_paid_tax_incl":"8662.50", "total_paid_tax_excl":"8662.50", "total_paid_real":"0.00", "total_products":"9625.00", "total_products_wt":"9625.00", "total_shipping":"0.00", "total_shipping_tax_incl":"0.00", "total_shipping_tax_excl":"0.00", "carrier_tax_rate":"0.000", "total_wrapping":"0.00", "total_wrapping_tax_incl":"0.00", "total_wrapping_tax_excl":"0.00", "invoice_number":"0", "delivery_number":"0", "invoice_date":"0000-00-00 00:00:00", "delivery_date":"0000-00-00 00:00:00", "valid":"0", "date_add":"2014-12-19 15:44:23", "date_upd":"2014-12-19 15:44:39", "reference":"APYAKKKZF", "id":"5440", "id_shop_list":null, "id_order_state":19, "invoice":false, "order_history":false, "carrier":{ "id_reference":"23", "name":"Ecom Express", "url":"", "delay":"Standard Delivery Time", "active":"1", "deleted":"0", "shipping_handling":"0", "range_behavior":"0", "is_module":"0", "is_free":"1", "shipping_method":"1", "shipping_external":"0", "external_module_name":"", "need_range":"0", "position":"7", "max_width":"0", "max_height":"0", "max_depth":"0", "max_weight":"0.000000", "grade":"5", "id":23, "id_shop_list":null, "id_tax_rules_group":"0" }, "address_invoice":{ "id_customer":"1994", "id_manufacturer":"0", "id_supplier":"0", "id_warehouse":"0", "id_country":"110",…
answer count: 1
tagged with: ajax
has comment: http://stackoverflow.com/comment/46879246
type: UnansweredQuestion
tagged with: php
has answer: http://stackoverflow.com/a/29343332

http://stackoverflow.com/a/29352928
has comment: http://stackoverflow.com/comment/46891654
answers question: http://stackoverflow.com/q/29349686
upvote count: 1
score: 1
has body: If you are not using JSP, you are not going to be able to do string replacement in your HTML or JavaScript to plug the content of cdata into your document. Even if you were using JSP, your object would need a valid toString() method to convert it into readable JSON text. If you want to get your domain data into your web page without using JSP, you will have to fetch it via AJAX. Assuming your customer objects do not have any complex embedded objects, you should be able to serialize them pretty easily and read them into your page as JSON. Create a new controller method for handling AJAX requests: @RequestMapping(value = "/customerdata", method = RequestMethod.GET, produces = { "application/json" }) public ResponseEntity&lt;List&lt;Customer&gt;&gt; getCustomerData(){ List&lt;Customer&gt; customers = custServe.listAllCustomers(); return new ResponseEntity&lt;&gt;(customers, HttpStatus.OK); } Then request the data on your page in your JavaScript: var cdata; $.ajax({ url: "/customerdata", dataType: "json", method: "get" }).done(function(data){ cdata = data; //do stuff });
downvote count: 0
has comment: http://stackoverflow.com/comment/46891424
type: Answer

http://stackoverflow.com/a/29241537
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29241042
answers question: http://stackoverflow.com/q/29241042
type: Answer
downvote count: 0
has body: For dynamically created elements in jQuery you should use a static parent to select the dynamic element, in your case an example can be: $('#Dashboard').on('click', 'a[data-toggle=tab]', function(e){ //your code here }); OR even the document itself $(document).on('click', 'a[data-toggle=tab]', function(e){ //your code here });
score: 1
upvote count: 1

http://stackoverflow.com/q/29254507
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/29254856
score: 1
favorite count: 0
type: Question
has comment: http://stackoverflow.com/comment/46712087
has comment: http://stackoverflow.com/comment/46712263
upvote count: 1
tagged with: php
answer count: 1
has comment: http://stackoverflow.com/comment/46712162
has answer: http://stackoverflow.com/a/29254856
downvote count: 0
tagged with: javascript
tagged with: jquery
has body: I am trying to hide a DIV after posting variables with window.location.assign. The variables are posted if the checkbox inside the DIV is selected. My code is below. $(document).on("change", ".checkbox", function () { var db = $(this).val(); window.sessionStorage.setItem("db", db); window.location.assign("index.php?db=" + db); document.getElementById('dbdisplay').style.display='none'; }); The problem I am having is that the DIV is only hidden temporarily before the page is refreshed via .assign. I have tried to use location.href instead but this doesn't post by db variable so my PHP code won't run. How can I fix this??
has title: Hidding a DIV after POST

http://stackoverflow.com/a/29241755
answers question: http://stackoverflow.com/q/29239310
score: 0
has body: Got it figured out: it was because I was using a === instead of a == and the variable I was using for lastPage was coming back from the database stored procedure as a string instead of a number. It was comparing a string to a number with === and they are not equal. I just used parseInt() on the value returned from the DB and it is fixed.
type: Answer

http://stackoverflow.com/comment/46762716
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29282470
type: AnswerComment
has text: TJ, you disappoint me, this should've been closed as dupe ;-)

http://stackoverflow.com/a/29327142
answers question: http://stackoverflow.com/q/29327102
upvote count: 1
has comment: http://stackoverflow.com/comment/46844809
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46844695
type: Answer
has body: Use Bootstrap grid system. On wide screen show vertical tabs, hide horizontal tabs; on small - hide vertical tabs, show horizontal. To hide some element, use hidden-[xs/sm/md/lg] or visible-[xs/sm/md/lg] helper classes.
has comment: http://stackoverflow.com/comment/46844323
accepted answer of: http://stackoverflow.com/q/29327102
score: 1
has comment: http://stackoverflow.com/comment/46845134

http://stackoverflow.com/q/29333619
tagged with: function
tagged with: javascript
score: 0
tagged with: undefined
has comment: http://stackoverflow.com/comment/46856233
has comment: http://stackoverflow.com/comment/46856105
has title: Parameter undefined in javascript function
has body: I can't solve the problem in this code that give me an undefined result for the parameter menu1 in the function 'table', called in the function menu(). function table(menu1){ var x=document.getElementById('myTable').rows var y=x[0].cells y[0].innerHTML = menu1; } function menu(){ var tx =" some text ..."; table(tx); } It always return the value 'undefined' for menu1. Please help!!!
type: UnansweredQuestion
tagged with: parameters
answer count: 0
has comment: http://stackoverflow.com/comment/46856107
type: Question

http://stackoverflow.com/comment/46769183
type: Comment
type: QuestionComment
has text: In your function, determine what key was pressed (there are plenty of examples on how to get which key was pressed in javascript on the web), if it is 13 (which I believe is Enter), then set `textSize = ele.value.length + 5;`, else, set it to `ele.value.length;`
score: 0
comment on: http://stackoverflow.com/q/29284538

http://stackoverflow.com/comment/57430694
type: AnswerComment
has text: You can add a `+`sign before the return to cast to number. When I do this I usually want to convert into a numeric value too
type: Comment
comment on: http://stackoverflow.com/a/29273131
score: 0

http://stackoverflow.com/q/29260409
possible better answer: http://stackoverflow.com/a/29260751
has answer: http://stackoverflow.com/a/29260751
type: AnsweredQuestion
downvote count: 0
tagged with: toggleclass
score: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/46723588
favorite count: 0
type: Question
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29260819
tagged with: css
has title: JS toggleClass right way
answer count: 2
upvote count: 1
has body: I've this project where when I click on the plant the scale changes and show some texts. http://www.gaianet.com.br/Nissin-teste/ I've this project where I should click on a planet and scale's it and show another div by opacity. Right now i've been trying to do by js using toggle class but I need some help to make it work right. If I click on first planet it works fine, but when this planet is 'selected'and I click on another all the classes start to toogle and the scale and opacity goes crazy.I don't know how to make a 'reset' to the original css if I click on another planet when one has already changed the class. $(".layer.planeta1").click(function(){ $(".institucional").toggleClass("escala-planeta repo1-1"); $(".planet-info1").toggleClass("opacidade-planeta "); $(".educacao").toggleClass("escala-menor-planeta repo1-2"); $(".pdv").toggleClass("escala-menor-planeta repo1-3"); }); $(".layer.planeta2").click(function(){ $(".educacao").toggleClass("escala-planeta repo-2-1"); $(".planet-info2").toggleClass("opacidade-planeta "); $(".institucional").toggleClass("escala-menor-planeta repo-2-2"); $(".pdv").toggleClass("escala-menor-planeta repo-2-3"); }); $(".layer.planeta3").click(function(){ $(".pdv").toggleClass("escala-planeta"); $(".planet-info3").toggleClass("opacidade-planeta "); $(".educacao").toggleClass("escala-menor-planeta"); $(".institucional").toggleClass("escala-menor-planeta"); }); I'm sure there should a way better way to do that but I have no idea how. Thanks a lot
accepted answer: http://stackoverflow.com/a/29260819
tagged with: javascript

http://stackoverflow.com/comment/46714946
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29254338
type: Comment
has text: I want to rewrite the array. I think my function is wrong with this line product[i][lk]=lilk; . Mabe product[i]=[var,var,var,var]; is right. I need to rethink the loop

http://stackoverflow.com/q/29346642
tagged with: three.js
has answer: http://stackoverflow.com/a/29348107
has title: Threejs 2000 textures bottleneck
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29348107
type: Question
tagged with: javascript
tagged with: webgl
has body: I've been playing around with three.js a couple of months now. Recenlty we started a three.js app - project which is a 3d webgl product catalogue(imagine plane with the product image as a texture 512x512), storing base64 images into browser indexeddb and on app load creates the product catalogue. However we have performance issues, imagine that a category of products might have 100 products or even more and the total number of products could be up to 10000. On each category we present our models(planes) in a specific way. Because the app should offer a nice user experience everything is being pre-loaded, textures are generated before the app starts and saved in memory. Here is where the issue starts... At the moment on a hardware with a 4gb of ram and an on-board gpu that shares memory with cpu results in chrome crash. Also each model can be dragged by the user by touch events. On the other hand we tried loading textures on demand but this is a big impact for user experience, it might freeze the app for 1-2 secs. At the moment materials are being created for each product without any textures. Textures are stored on a different object based on product id, and when each category loads we assign the texture to each model. Also we dispose textures from materials that are no longer visible. My issue is that having to store 2000 textures is not memory efficient and causes chrome to crash on low badget hardware. On the other hand if I load textures on demand user experience freezes for a couple of seconds... Keep in mind that each model is draggable by user touch. I don't face any coding problems so there is no point to show any code unless you 'd like to see something. My main concern is architectural. If there is a more performant way to implement such an app... I've thought of particle systems, but having a different texture for each particle would result in the same result ?
score: 0
answer count: 1

heap-memory
tag name: heap-memory
type: Tag
tags question: http://stackoverflow.com/q/29225834

http://stackoverflow.com/comment/46772694
comment on: http://stackoverflow.com/q/29282120
has text: I'm not sure I understand. Can you show me where and what you would put? Sorry if that's asking too much.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29325713
tagged with: jquery
possible better answer: http://stackoverflow.com/a/29325746
has title: jQuery :visible working but :hidden does not
tagged with: css
has comment: http://stackoverflow.com/comment/46842084
accepted answer: http://stackoverflow.com/a/29325748
score: 0
type: Question
type: AnsweredQuestion
has body: I'm working on this website. Here is the code for the menu trigger on the left sidebar: jQuery(document).ready( function(){ jQuery('.nav-animate nav').hide('slide', 500); jQuery('.nav-animate').hide(); jQuery(".x-btn-navbar").click(function(){ jQuery('#dimmer').fadeToggle(500); jQuery('.nav-animate').fadeToggle(500); jQuery('.nav-animate nav').toggle('slide', {direction: "left"}, 750); // I am trying to show only the middle line when the navigation is closed // and change the `.menu-p` text by checking whether the navigation has // display:none or display:block, like this: if(jQuery(".nav-animate").is(":visible")) { jQuery("span.line.top").css('background-color', '#fff'); jQuery('span.line.bottom').css('background-color', '#fff'); jQuery('.menu-p').html('CLOSE') } // The above part works perfectly, however the part below doesn't: if(!jQuery(".nav-animate").is(':visible')) { alert('hidden'); jQuery('span.line.top').css('background-color', '#262628'); jQuery('span.line.bottom').css('background-color', '#262628'); jQuery('.menu-p').html('MENU'); } }); }); I tried using if(jQuery(".nav-animate").is(":hidden")) {//...}, and if(jQuery(".nav-animate").css('display') == 'none') {//...} but both doesn't work. My guess, when you click to "CLOSE" it does the :visible or :hidden check, but the menu is still open at the time you click so it still doesn't have the display:none until the click event performs that. In that case, what can I do? Thanks in advance for your time and suggestions.
has comment: http://stackoverflow.com/comment/46842215
answer count: 2
has answer: http://stackoverflow.com/a/29325746
has answer: http://stackoverflow.com/a/29325748
tagged with: javascript

http://stackoverflow.com/a/29253493
has body: You can use key press event in the same manner as blur: &lt;?php echo $form-&gt;textField($model,'amount',array('name'=&gt;'amount','onblur'=&gt;'console.log("onblur event triggered")','onkeyup'=&gt;'console.log("onkeyup event triggered")','id'=&gt;'amnt')); ?&gt; Check console you will be able to see events.
score: 0
answers question: http://stackoverflow.com/q/29253169
type: Answer

http://stackoverflow.com/q/29305161
type: Question
tagged with: javascript
has body: Hello I'm struggling while creating a generic confirmation directive based on angular-bootstrap Modal directive. I can't find a way to transclude my content in the ng-template used for the modal construction because the ng-transclude directive isn't evaluated since it's part of a ng-template loaded afterward when executing $modal.open() : index.html (directive insertion) : <confirm-popup is-open="openConfirmation" on-confirm="onPopupConfirmed()" on-cancel="onPopupCanceled()" > Are you sure ? (modal #{{index}}) confirmPopup.html (directive template) : confirmPopup.js (directive JS) : .directive('confirmPopup', [ function() { return { templateUrl: 'confirmPopup.html', restrict: 'EA', replace: true, transclude: true, scope: { isOpen: '=', confirm: "&onConfirm", cancel: "&onCancel" }, controller: ['$scope', '$element', '$modal', '$transclude', '$compile', function($scope, $element, $modal, $transclude, $compile) { // watching isOpen attribute to dispay modal when needed $scope.$watch( function() { return $scope.isOpen; }, function(newValue) { if (newValue === true) { openModal(); } else { // if a modal is already dispayed : the modal must be canceled/confirmed by the user // else (if no modal is dispayed), then do nothing } } ); // open modal function // create / register ok/cancel callbacks // and open modal // all on one shot function openModal() { $modal.open({ templateUrl: 'confirmModalTemplate.html', controller: ['$scope', '$modalInstance', 'content', function($scope, $modalInstance, content) { $scope.directiveTranscludedContent = content; $scope.ok = function() { $modalInstance.close(); }; $scope.cancel = function() { $modalInstance.dismiss(); }; }], resolve: { content: function() { return $transclude().html(); //return $compile($transclude().contents())($scope); }, } }) .result.then( // modal has been validated function() { $scope.confirm(); }, // modal has been dismissed function() { if ($scope.cancel) { $scope.cancel(); } } ); }; }] }; } ]); If it's not clear e…
tagged with: angular-bootstrap
tagged with: transclusion
tagged with: modal-dialog
downvote count: 0
answer count: 1
favorite count: 0
has title: Angular transclude in a directive containing a ng-template (generic Confirm Modal)
tagged with: angularjs
has answer: http://stackoverflow.com/a/29309923
accepted answer: http://stackoverflow.com/a/29309923
type: AnsweredQuestion
score: 3
upvote count: 3

http://stackoverflow.com/comment/46852558
type: QuestionComment
type: Comment
score: 0
has text: Not entirely sure I understand the problem with creating polygons, and why a grid system is needed. Can you not just have click handlers and figure out a coordinate from the mouse event and build up a polygon from there ? I'm probably not quite understanding something though.
comment on: http://stackoverflow.com/q/29330384

http://stackoverflow.com/comment/46817019
type: Comment
score: 0
type: AnswerComment
has text: did you do $("#theImage") instead of what you have?
comment on: http://stackoverflow.com/a/29311678

http://stackoverflow.com/a/33075886
answers question: http://stackoverflow.com/q/29237106
score: 27
type: Answer
upvote count: 27
has body: Try this, I had a same issue before. No javscript required... .dropzone-width { pointer-events: none; }
downvote count: 0
has comment: http://stackoverflow.com/comment/131786207

http://stackoverflow.com/a/29338025
has comment: http://stackoverflow.com/comment/46864800
type: Answer
answers question: http://stackoverflow.com/q/29337907
has comment: http://stackoverflow.com/comment/46864853
score: 1
accepted answer of: http://stackoverflow.com/q/29337907
has body: If two keywords are found, both are joined by a hyphen and passed to a variable Try this update to your original code for clarity: var re = /Geo|Pete|Rob|Nick|Bel|Sam/g; var str = 'Sam maybe late today. Nick on call. '; var m; var VAR10 = ""; // holds the names found if ((m = re.exec(str)) !== null) { var name1 = m; if ((m = re.exec(str)) !== null) { var name2 = m; // Two names were found, so hyphenate them // Assign name1 + "-" + name2 to the var that you want VAR10 = name1 + "-" + name2; } else { // In the case only one name was found: // Assign name1 to the var that you want VAR10 = name1; } } Note, change var re = /Geo|Pete|Rob|Nick|Bel|Sam|/g; to var re = /Geo|Pete|Rob|Nick|Bel|Sam/g; Here is an updated demo: http://jsfiddle.net/7zg2hnt6/1/
has comment: http://stackoverflow.com/comment/46864498
upvote count: 1
has comment: http://stackoverflow.com/comment/46864398
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/29370255
downvote count: 0
tagged with: javascript
tagged with: jquery
score: 1
favorite count: 0
answer count: 3
has answer: http://stackoverflow.com/a/29370288
has answer: http://stackoverflow.com/a/29370307
upvote count: 1
has title: How to find an element by id that is a child of either of two classes?
type: AnsweredQuestion
has body: I have a button with an id that sometimes appears in &lt;body class="boxes new"&gt;, sometimes in &lt;body class="boxes create"&gt; and sometime in a &lt;body&gt; with different classes. Here is how I find it for the first case: $('body.boxes.new #submit_box') Can I find it with one line of jQuery for classes new and create instead of two lines like below? $('body.boxes.new #submit_box').doSomething() $('body.boxes.create #submit_box').doSomething()
has answer: http://stackoverflow.com/a/29370290
type: Question
accepted answer: http://stackoverflow.com/a/29370288
possible better answer: http://stackoverflow.com/a/29370290

http://stackoverflow.com/a/29329808
has comment: http://stackoverflow.com/comment/46849231
score: 1
accepted answer of: http://stackoverflow.com/q/29329771
upvote count: 1
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29329771
has body: In the immediate scope of a jQuery plugin this is a jQuery object, which means you don't have to wrap it. Generally you would do $(this).each(function() { ... but in a jQuery plugin you can do this.each(function() { ... because this is already a jQuery wrapper/collection object. On the other hand, inside an each() callback function this is not a jQuery object, it's the native DOM node, so to get the same result you would have to do $.fn.plugin = function() { console.log(this); // jQuery object this.each(function() { console.log( $(this) ) // jQuery object console.log( this ) // native DOM node }); });
type: Answer
has comment: http://stackoverflow.com/comment/46849206
downvote count: 0

http://stackoverflow.com/comment/46696498
type: QuestionComment
comment on: http://stackoverflow.com/q/29245374
score: 0
has text: `deferredAction` is resolved as soon as `self.adaptor.create( record, callback )` is resolved, not earlier. Your initial `deferredAction` and the one on the next line are 2 different objects. Just give them different names.
type: Comment

http://stackoverflow.com/a/38265549
type: Answer
accepted answer of: http://stackoverflow.com/q/29258984
downvote count: 0
answers question: http://stackoverflow.com/q/29258984
score: 7
has body: Here is a library that can be used from Node.js also https://github.com/cisco/node-jose. They have also a very good documentation on how to use it.
upvote count: 7
type: AcceptedAnswer

http://stackoverflow.com/q/29311013
possible better answer: http://stackoverflow.com/a/29311464
has answer: http://stackoverflow.com/a/29311050
has body: Suppose I'm on this page: http://example.com/users/BECCA/edit/advanced I want to redirect the user to: http://example.com/users/BECCA/edit How can I do this? (I'm also familiar with window.history.back(); but my question is something else!) Thanks.
tagged with: http-redirect
tagged with: http://stackoverflow.com/tag/html
has title: Redirect to previous ROUTE in Javascript
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/503093
type: Question
has answer: http://stackoverflow.com/a/29311464
answer count: 2
linked to: http://stackoverflow.com/q/901115
has comment: http://stackoverflow.com/comment/46815863
tagged with: javascript
has comment: http://stackoverflow.com/comment/46815991
tagged with: jquery
has comment: http://stackoverflow.com/comment/46815703
score: 0
has comment: http://stackoverflow.com/comment/46815815
accepted answer: http://stackoverflow.com/a/29311050
has comment: http://stackoverflow.com/comment/46815760
has comment: http://stackoverflow.com/comment/46815922
has comment: http://stackoverflow.com/comment/46815876

http://stackoverflow.com/q/29322563
answer count: 1
tagged with: child-process
favorite count: 0
has body: I have a Node.js script which makes a call to exec but it never calls the callback. The code: var exec = require('child_process').exec; exec("{COMMAND} &gt; results.log", function (error, stdout, stderr) { console.log('callback called!'); // this never gets called. }); I'm using async lib and I'm relying on the exec callback to be called so I can in turn call an async callback to continue execution flow. The command does indeed get executed, as I see the output to the results.log file. What am I doing wrong here?
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/67922759
tagged with: node.js
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/46836779
type: Question
has answer: http://stackoverflow.com/a/29322594
tagged with: javascript
upvote count: 2
has title: Node.js exec call never calls callback

http://stackoverflow.com/comment/84798280
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29233723
has text: This does not escape HTML.
type: AnswerComment

http://stackoverflow.com/comment/46841966
type: Comment
comment on: http://stackoverflow.com/q/29325655
has text: have you tried printing to the console the var "redraw"? It's clearly not an array, most likely undefined or the actual tag. Print that to console and tell us what you get.
score: 0
type: QuestionComment

http://stackoverflow.com/q/29261414
tagged with: http://stackoverflow.com/tag/html
downvote count: 1
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46724956
tagged with: css
has comment: http://stackoverflow.com/comment/46725663
upvote count: 0
has title: dynamically inserting html specific to a clicked div
has body: I am trying to achieve a very similar feel to this http://www.hausofmagdalen.com/. Using jQuery .toggle I can hide or show a div(text box) above the gallery specific to a selected gallery image. However, when clicking multiple images successively I get all the text boxes showing . To put it another way, the text boxes don't cancel each other out. A solution would be greatly appreciated.
type: Question
tagged with: javascript
tagged with: jquery
score: -1
has comment: http://stackoverflow.com/comment/46726016
has answer: http://stackoverflow.com/a/29262251
has answer: http://stackoverflow.com/a/29261483
answer count: 2

http://stackoverflow.com/a/29264535
has body: In your global functions, this is referring to the window object. Inside of the caller function, num is outputting the local variable. Here is a jsfiddle to look at. Also, this article helps to explain more about using this. Hope it helps!
answers question: http://stackoverflow.com/q/29264031
accepted answer of: http://stackoverflow.com/q/29264031
type: AcceptedAnswer
score: 0
type: Answer

http://stackoverflow.com/q/29266167
type: Question
linked to: http://stackoverflow.com/q/25537919
has comment: http://stackoverflow.com/comment/46734245
possible better answer: http://stackoverflow.com/a/43813984
tagged with: selenium
answer count: 5
linked to: http://stackoverflow.com/q/26872481
has answer: http://stackoverflow.com/a/46230908
upvote count: 17
has title: What is a good headless browser to run with protractor?
tagged with: protractor
tagged with: javascript
has answer: http://stackoverflow.com/a/29270496
has answer: http://stackoverflow.com/a/29267222
has body: New User here. After hours of building my smoke and regression tests, I found out after reading many cases online that phantomjs is known to be a trouble to run with protractor. Jenkins has been running phantomjs for all the tasks it has been given so far. They need these tests to run as part of ci which does not have a windowing system installed. So I would appreciate it if there is a recommendation for completely headless browser or a headless chrome(that would be most beneficial) and a step by step to set it up. I already have a conf.js and a e2e.conf.js file. My code works perfectly fine with chrome. I am on a iMac and selenium webdriver, I believe. Edit: Problem = protractor doesn't work with phantomjs. What I have done = use different web elements and googled if anyone has faced a similar situation. Also googled for headless browsers that worked for protractor, unable to find a suitable solution.
type: AnsweredQuestion
downvote count: 0
has answer: http://stackoverflow.com/a/29266649
tagged with: headless-browser
accepted answer: http://stackoverflow.com/a/29267222
score: 17
favorite count: 0
has answer: http://stackoverflow.com/a/43813984
tagged with: jenkins

http://stackoverflow.com/comment/46713122
comment on: http://stackoverflow.com/a/29254856
type: AnswerComment
score: 0
type: Comment
has text: It DOES work if your initial page load is, let's say, /index.php.

http://stackoverflow.com/q/29327025
possible better answer: http://stackoverflow.com/a/33486627
has answer: http://stackoverflow.com/a/29327801
type: Question
has answer: http://stackoverflow.com/a/33486627
tagged with: sails.js
downvote count: 0
has comment: http://stackoverflow.com/comment/46844427
tagged with: javascript
has answer: http://stackoverflow.com/a/32828644
has comment: http://stackoverflow.com/comment/46845257
linked to: http://stackoverflow.com/q/21470128
tagged with: browserify
answer count: 3
accepted answer: http://stackoverflow.com/a/29327801
favorite count: 0
upvote count: 2
has body: I'm attempting to set up my sails app to use Browserify (which is working fine). However, I want to not have the non-browserified files automagically injected into my web page. In my tasks/pipeline.js file I've attempted this (my js files that need to be browserified are in he browserify directory): // Client-side javascript files to inject in order // (uses Grunt-style wildcard/glob/splat expressions) var jsFilesToInject = [ // Load sails.io before everything else 'js/dependencies/sails.io.js', // Dependencies like jQuery, or Angular are brought in here 'js/dependencies/**/*.js', // All of the rest of your client-side js files // will be injected here in no particular order. 'js/**/*.js', // Ignore browserify directory '!js/browserify/**/*' ]; This however is not working and my non-browserified files are being injected into the web page. I'm new to Sails, so it's highly likely that this isn't the correct way to achieve this at all. Any advice would be greatly appreciated.
has title: Sails.js specify JS files to exclude from auto-insertion
tagged with: node.js
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/53034753

http://stackoverflow.com/a/29268017
has comment: http://stackoverflow.com/comment/46737766
downvote count: 0
has body: You can use event.preventDefault(); to prevent the default behaviour of the link: $('a').click(function(event){ event.preventDefault(); $('.loaded_content').load($(this).attr('href')); }); Ensure that this code is either wrapped in $(document).ready(); or put it at the bottom of your html, otherwise the click event can not be attached to the links, because they need to be processed first.
answers question: http://stackoverflow.com/q/29267956
type: Answer
score: 3
upvote count: 3
has comment: http://stackoverflow.com/comment/46737678

http://stackoverflow.com/a/29273660
score: 0
type: Answer
has body: Finally after searching for ages, i found that there was a 30% width placed on those elements which was causing the problem. When i changed the width to 100% the columns started to work using css. So turns out i didnt even need the JavaScript, although its some useful information if i need it next time for something :) Thanks for you help guys. Alex
answers question: http://stackoverflow.com/q/29270000

http://stackoverflow.com/a/29324871
score: 1
answers question: http://stackoverflow.com/q/29312465
has body: If I follow your code it looks like you're trying to use a regular expression to search integers in your query, which doesn't make sense to me. You have conditions[key] = new RegExp('^' + parseInt(req.query[key]) + '$', 'i'); but you should be able to simply have conditions[key] = parseInt(req.query[key]); Glad that worked. Thanks!
accepted answer of: http://stackoverflow.com/q/29312465
type: AcceptedAnswer
downvote count: 0
type: Answer
upvote count: 1

http://stackoverflow.com/q/29260292
has title: HTML isn't changed when removing data item
downvote count: 1
type: Question
has body: I'm trying to make the data-title value empty strings for the second option (where value="24"). Although the console.log statements say the data-title is now empty, when I inspect the element on my browser, the text is still there. Is there a way to dynamically change the HTML on the browser? HTML: 1 Hour 1 Day 1 Week jQuery/JavaScript: var selectID = "ctl00_phBody_ddlTimeScale"; console.log("Before 24: " + $('#' + selectID + ' option[value="24"]').data('title')); $('#' + selectID + ' option[value="24"]').data('title', ''); console.log("After 24: " + $('#' + selectID + ' option[value="24"]').data('title')); jsFiddle
tagged with: javascript
has comment: http://stackoverflow.com/comment/46723012
has comment: http://stackoverflow.com/comment/46723428
has answer: http://stackoverflow.com/a/29260471
answer count: 2
has comment: http://stackoverflow.com/comment/46722932
has comment: http://stackoverflow.com/comment/46723268
tagged with: jquery
possible better answer: http://stackoverflow.com/a/29260436
favorite count: 0
has answer: http://stackoverflow.com/a/29260436
has comment: http://stackoverflow.com/comment/46723195
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/29260471
score: 2
type: AnsweredQuestion
upvote count: 3
has comment: http://stackoverflow.com/comment/46722930

http://stackoverflow.com/a/29312773
has comment: http://stackoverflow.com/comment/46848970
has body: If you are using PointerLockControls and you want to set a raycaster, you can use this pattern: var direction = new THREE.Vector3(); var raycaster = new THREE.Raycaster(); // create once and reuse ... controls.getDirection( direction ); raycater.set( controls.getObject().position, direction ); Do not set the camera position or rotation directly if you are using PointerLockControls. three.js r.71
answers question: http://stackoverflow.com/q/29311875
has comment: http://stackoverflow.com/comment/46850476
upvote count: 1
has comment: http://stackoverflow.com/comment/46855720
score: 1
has comment: http://stackoverflow.com/comment/46850535
has comment: http://stackoverflow.com/comment/46830116
has comment: http://stackoverflow.com/comment/46827832
downvote count: 0
type: Answer

http://stackoverflow.com/a/35442835
score: 109
has comment: http://stackoverflow.com/comment/138831069
answers question: http://stackoverflow.com/q/29302392
type: AcceptedAnswer
has body: If you are using 2.0.0-beta2, you can use tooltip callback and return array of strings there. tooltips: { mode: 'single', callbacks: { afterBody: function(data) { var multistringText = ['first string']; // do some stuff multistringText.push('another string'); return multistringText; } } }
has comment: http://stackoverflow.com/comment/67978686
type: Answer
upvote count: 109
downvote count: 0
has comment: http://stackoverflow.com/comment/116146646
accepted answer of: http://stackoverflow.com/q/29302392

http://stackoverflow.com/comment/46771680
score: 0
type: Comment
has text: Yes. My Value is 120 so he go into else with <100 but for test purp i change 100 to 500 ( <500) and he jump into else.
type: AnswerComment
comment on: http://stackoverflow.com/a/29287100

http://stackoverflow.com/comment/46911828
type: Comment
type: QuestionComment
has text: What is output of `console.log($scope.builds)`?
score: 0
comment on: http://stackoverflow.com/q/29364282

http://stackoverflow.com/q/29333273
has answer: http://stackoverflow.com/a/29354829
favorite count: 0
tagged with: ajax
tagged with: php
has body: I am almost at my wit's end trying to figure out why my code is not working. Here is what I am trying to do: 1) Accept several variables in a form (myform). 2) Using an onsubmit, I want to use pass one or more of those variables to a script (process_info). 3) After process_info has executed, the form should be posted to the form's action URL ('save_info.php'). As you can see in the code below, I have tried several things: Test 1: This simple alert is shown and the form is submitted to save_info.php. Test 2: I copied and modified this jQuery script from another page on this site. No matter what I do, the script does not run. I know this because no alert message is shown. Test 3: After removing the jQuery(document).ready statement from Test 2, the senddata function runs. Although it runs the process_info script, the form does not get posted to save_info. Form Test I assume that what I am trying to do is actually possible. What am I doing wrong?
has comment: http://stackoverflow.com/comment/46883432
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29354829
upvote count: 1
tagged with: forms
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/46882715
has title: JavaScript/Ajax - How to run one PHP script before posting form to another one
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/46859868
has comment: http://stackoverflow.com/comment/46883135
answer count: 1

http://stackoverflow.com/comment/46785589
has text: At first if clicked submit,it redirect to next page, even though i put code to check whether any of those que3 & 4 are checked or not. & another error is its not validating que3 correctly. it mean while inserting values in que3 if clicked on submit, it should say fill other values but it won't.
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/29294300
type: Comment

http://stackoverflow.com/comment/46682733
has text: I was going to suggest that, but figured for the point of answering your question as is, I will write you a function so you don't have to modify existing data
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29236665
score: 1

http://stackoverflow.com/comment/46824153
comment on: http://stackoverflow.com/q/29315051
score: 0
type: Comment
type: QuestionComment
has text: Let me know if this works - [http://jsfiddle.net/na9p05f0/1/](http://jsfiddle.net/na9p05f0/1/)

http://stackoverflow.com/a/29246841
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46700464
type: Answer
has body: add this on each element: display: inline-block; Here's the output, i edited some css alignment. screenshot: then rearrange your HTML order to: mail-id, phone number, skype your current html order is: mail-id, skype, phone number
upvote count: 1
has comment: http://stackoverflow.com/comment/46700490
score: 0
downvote count: 1
has comment: http://stackoverflow.com/comment/46700162
accepted answer of: http://stackoverflow.com/q/29246759
answers question: http://stackoverflow.com/q/29246759

http://stackoverflow.com/a/29463466
answers question: http://stackoverflow.com/q/29240341
has comment: http://stackoverflow.com/comment/47091843
upvote count: 1
type: AcceptedAnswer
type: Answer
has body: With 'scopes', you can create custom groups of files and folders. https://www.jetbrains.com/webstorm/help/scopes.html You can assign a color to that scope. Everything in the scope will show as that color in the sidebar, and when you open a file from that scope, its tab will be that color too! https://www.jetbrains.com/webstorm/help/add-edit-color-label-dialog.html The project sidebar on the left shows all files and folders by default. However, you can filter your files by your custom scope/group: Click on dropdown menu in the upper left where it says 'Project' (next to the crosshair-looking thing). Select the scope you defined. Now your sidebar only shows the files in that scope!
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/29240341

http://stackoverflow.com/a/29286091
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29282292
has body: Here I go: $scope.$watch('data.sl',function(nv,ov){ if(nv==ov)return; if(nv &gt;= 75){ //document.getElementById("sl").stepDown(10); $scope.data.sl=75; console.log("going up"); } if(nv &lt;= 25){ //document.getElementById("sl").stepDown(10); $scope.data.sl=25; console.log("going down"); } });

http://stackoverflow.com/comment/46869470
type: Comment
has text: @Łukasz i dont know how to create event in ionic. for now, i just periodically call my native java to get current progress. can you give me example how to make event in ionic?
comment on: http://stackoverflow.com/q/29340849
score: 0
type: QuestionComment

http://stackoverflow.com/a/29252127
answers question: http://stackoverflow.com/q/29251985
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/46708202
score: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/46707983
accepted answer of: http://stackoverflow.com/q/29251985
upvote count: 3
has body: You need to return a function in the closure here. Just calling your function immediately won't work, as you discovered. for (var i=0; i &lt; 5; ++i) { var doc = document.createElement("a"); doc.innerHTML = i; doc.onclick = function(i) { return function(){alert(i);}; }(i); document.body.appendChild(doc); }

http://stackoverflow.com/q/29224933
has body: I am working on a webpage where when I enter a word and press the button, it will show the meaning of the word. I am getting an [object Object] error instead of the meaning of the word. Example: Word I entered: code Result through API: {"Verb": ["attach a code to", "convert ordinary language into code"], "Noun": ["a set of rules or principles or laws (especially written ones", "a coding system used for transmitting messages requiring brevity or secrecy", "(computer science"]} JS: var links={ 'meaning': 'link here', } var getMeaning = function(word){ totalLink = links.meaning + word; var r = new XMLHttpRequest(); r.open("GET",totalLink, false); r.send(); var data; if (r.status===200){ var resp= JSON.parse(r.responseText); data=resp; } else{ data='Error while running AJAX'; } return data; } var PDictionary = function(){ this.meaning = getMeaning; } HTML: Do it On my console RESPONSE tab, I am getting the meaning of the word but on the webpage, I get the error
score: 0
has answer: http://stackoverflow.com/a/29225243
answer count: 1
tagged with: javascript
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/29225243
has title: object Object error javascript on response
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46657879
tagged with: error-handling
has comment: http://stackoverflow.com/comment/46657867
type: Question
tagged with: object
has comment: http://stackoverflow.com/comment/46657897

http://stackoverflow.com/q/29254359
tagged with: javascript
downvote count: 0
tagged with: jquery
favorite count: 0
has body: I have developed custom directive for using intltelinput jquery plugin. I want to get rich value that contains suc as country and dial code of selected number as following like; scope.nationalphoneinfo.number = elem.intlTelInput("getNumber"); scope.nationalphoneinfo.country = elem.intlTelInput("getSelectedCountryData"); scope.nationalphoneinfo.isValid = true; But I can't see nationalphoneinfo data in controller. How does this get nationalphoneinfo in controller. The direcitive definition: var intlTepInputDirecitive = pluginDirecitvesModule.directive('intltelinput', function () { return { require: "^ngModel", restrict: "A", transclude: true, scope: { ngModel: "=", nationalphoneinfo :"=nationalphoneinfo" }, link: function (scope, elem, attrs, ngModelCtrl) { elem.intlTelInput({defaultCountry: scope.defaultCountry, preferredCountries: ["tr", "de", "nl", "us", "fr", "en"], utilsScript: ASSETS_PATH + "app/bower_components/utils.js"}); elem.bind("blur", function () { //e.preventDefault(); scope.$apply(function () { if (elem.intlTelInput("isValidNumber{")) { scope.nationalphoneinfo.number = elem.intlTelInput("getNumber"); scope.nationalphoneinfo.country = elem.intlTelInput("getSelectedCountryData"); scope.nationalphoneinfo.isValid = true; } else { scope.nationalphoneinfo.isValid = false; } }); }); } }; }); The directive declaration in html: &lt;input intltelinput type="tel" id="phone" name="mobilePhone" ng-required="true" class="form-control pl tel" ng-model="mobilePhone" nationalphoneinfo="nationalPhoneInfo"&gt;
tagged with: angularjs
has title: Get rich value from Angular intl-tel-input custom directive attribute
answer count: 0
type: UnansweredQuestion
score: 1
upvote count: 1
type: Question
tagged with: angularjs-directive

http://stackoverflow.com/comment/46661670
comment on: http://stackoverflow.com/q/29227223
type: Comment
type: QuestionComment
has text: This will help you out -> [How to allow only numeric (0-9) in HTML inputbox using jQuery?](http://stackoverflow.com/a/995193/1407478) `type="number"` does not itself prevent none-number characters, it does only provide spin buttons, in _some_ browsers. Though the suggested link targets jQuery, it iis easy to implement in plain javascript.
score: 0

http://stackoverflow.com/a/29303635
accepted answer of: http://stackoverflow.com/q/29303535
score: 3
answers question: http://stackoverflow.com/q/29303535
has body: Something like this? $("a[id^=link]").click(function(){ $(".link-box").hide(); $("#"+this.id+"-box").show(); }) Checks if any with id starting with link is clicked Hides all the boxes Opens the box which id is the id of the clicked link + -box Demo: $("a[id^=link]").click(function(){ $(".link-box").hide(); $("#"+this.id+"-box").show(); }) .link-box{ display: none; } Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello 1 2 3 4 5 6 7 8 9 10 11 12
upvote count: 3
type: AcceptedAnswer
type: Answer
downvote count: 0

http://stackoverflow.com/comment/46812663
type: Comment
comment on: http://stackoverflow.com/q/29309409
score: 0
type: QuestionComment
has text: http://bonsaiden.github.io/JavaScript-Garden/#function.this . Scroll to "Common pitfalls".

http://stackoverflow.com/a/29240468
has comment: http://stackoverflow.com/comment/46694431
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46695291
type: Answer
answers question: http://stackoverflow.com/q/29240412
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/29240412
has body: If you want to have different objects, you can use a function instead of an IIFE, and call it once for each object: function myApp2 () { var count = 1; return { getCount: function(){return count}, incCount: function(){count++} }; } var test = myApp2(); console.log(test.getCount()); // outputs 1 console.log(test.incCount()); // increment count by 1 console.log(test.getCount()); // outputs 2 var test2 = myApp2(); // creates new object console.log(test2.getCount());// outputs 1

http://stackoverflow.com/a/29269109
score: 0
answers question: http://stackoverflow.com/q/29268194
has body: It looks like you're encountering results that don't have a valid lat, long location associated with them. For those records, your latitude and longitude fields will be null. In your $.each loop, you can check for those and skip them. I'd also recommend using Chris Whong's newer soda-leaflet example instead. It makes use of our modern SODA 2.0 API and also includes some functionality for filtering and styling your data.
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/29268194

http://stackoverflow.com/q/29338424
answer count: 2
has comment: http://stackoverflow.com/comment/46864899
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29338622
tagged with: css
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29338622
has comment: http://stackoverflow.com/comment/46864888
possible better answer: http://stackoverflow.com/a/29338555
has answer: http://stackoverflow.com/a/29338555
type: Question
tagged with: javascript
has body: A picture of what I'm trying to make: I want to make a custom select + option drop down menu. Is there a way of including content within the option tags, or am I better off making a drop down menu with jQuery and elements: Option 1 html here Option 2 html here Option 3 html here Option 4 html here
tagged with: jquery
has title: Custom select and option elements
score: 0

http://stackoverflow.com/comment/46905125
score: 0
has text: `io.to(id).emit` should work. `io.to` is used to emit to a [room](http://socket.io/docs/rooms-and-namespaces) but each socket is already in a room named as its own `socket.id` so it should work, unless they've changed something, I haven't used it after 1.0. Have you made sure `socket_id` is correct?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29342449

http://stackoverflow.com/a/29240396
has comment: http://stackoverflow.com/comment/46689531
has comment: http://stackoverflow.com/comment/46687958
score: 0
has body: You probably don't see what is happening as the form gets submitted the non-ajax / regular way as well. You can avoid that by using for example: &lt;form action='' onsubmit="changer('inputing'); return false;"&gt; Although ideally you would get rid of the inline javascript altogether and handle everything in a javascript event handler.
type: Answer
answers question: http://stackoverflow.com/q/29240224

quotes
tags question: http://stackoverflow.com/q/29347262
tag name: quotes
type: Tag

http://stackoverflow.com/comment/46803371
type: AnswerComment
comment on: http://stackoverflow.com/a/29293883
type: Comment
has text: Thanks - I took a look at the jQuery site and it looks like it will do what I need and looks better. Plus, I like the demos that show how to 'snap' dragged items into place.
score: 0

http://stackoverflow.com/q/29246444
score: 183
has comment: http://stackoverflow.com/comment/46699076
has comment: http://stackoverflow.com/comment/46698445
type: Question
has answer: http://stackoverflow.com/a/43968374
possible better answer: http://stackoverflow.com/a/42518434
has body: with fetch('somefile.json'), it is possible to request that the file be fetched from the server and not from the browser cache? in other words, with fetch(), is it possible to circumvent the browser's cache?
has answer: http://stackoverflow.com/a/42518434
accepted answer: http://stackoverflow.com/a/29246795
upvote count: 183
downvote count: 0
tagged with: javascript
has title: fetch(), how do you make a non-cached request?
tagged with: http://stackoverflow.com/tag/html
tagged with: fetch-api
answer count: 4
favorite count: 0
has answer: http://stackoverflow.com/a/29246795
has answer: http://stackoverflow.com/a/59493583
type: AnsweredQuestion

http://stackoverflow.com/q/29345918
upvote count: 1
type: Question
score: 1
has comment: http://stackoverflow.com/comment/46878138
accepted answer: http://stackoverflow.com/a/29345990
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46877757
favorite count: 0
has comment: http://stackoverflow.com/comment/46877808
has title: concatenate variable with background style broken in my case
possible better answer: http://stackoverflow.com/a/29346219
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29346219
has answer: http://stackoverflow.com/a/29345990
has body: $("#home").append('&lt;div style="background:url("http://example.com/images/'+obj[i]+'.jpg")"'); what's wrong here? I think I'd closed it properly..

http://stackoverflow.com/comment/46663125
has text: Hey sorry thats not to percentage. I mst convert into millions by replacing with M
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29227154

http://stackoverflow.com/a/29370837
type: AcceptedAnswer
type: Answer
has body: You can also use snippets like this (I modified your regex to use a non-capturing group and now, we do not need to use indexing): var n = 5; var re = new RegExp("(?:[^/]*/){" + n + "}"); var result = "Path/more/paths/here/andhere/file.php".match(re); console.log(result); NOTE: There is no need escaping / symbol when defining a regex pattern within a RegExp constructor.
accepted answer of: http://stackoverflow.com/q/29369626
answers question: http://stackoverflow.com/q/29369626
score: 0

http://stackoverflow.com/comment/46848439
type: QuestionComment
comment on: http://stackoverflow.com/q/29328901
has text: there are more than 10 posts per div and post has a text box
score: 0
type: Comment

http://stackoverflow.com/comment/46708266
comment on: http://stackoverflow.com/q/29252179
has text: `$.post is a shorthand for $.ajax[...]`, more info here: https://api.jquery.com/jquery.post/ (may be semantic nitpicking, but I think it is important to note that $.post() does NOT do a pure http POST, which would include navigation to another page)
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29321045
tagged with: php
accepted answer: http://stackoverflow.com/a/29321081
type: AnsweredQuestion
tagged with: https
has answer: http://stackoverflow.com/a/29321081
type: Question
has body: I've been going through google, bing, etc etc trying to find out how I can get my scripts to run correctly, but google chrome says that it's attempting to load scripts from unauthenticated sources, and I'm not 100% sure what it means by that. Here's my login page that runs fine on localhost, but chrome doesn't like running the script. Email: Password: Login Forgot your password?
tagged with: javascript
tagged with: jquery
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/46834432
has title: Javascript for HTTPS

http://stackoverflow.com/comment/46671104
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/29224792
score: 0
has text: Thanks for the help, however the only thing I could get to work was to add video .load() in addition to reloading the source. Also, with the polyfill above, I am having no luck. Should I add that in addition to my two lines of webkitRequestFullScreen and mozRequestFullScreen. All of this full screen stuff is extremely confusing to me

http://stackoverflow.com/a/29250138
type: Answer
score: 1
upvote count: 1
has body: var url = 'http://yourdomain.com/search?modal=name'; alert(url.substring(0, url.indexOf('?'))); Demo
answers question: http://stackoverflow.com/q/29250077
downvote count: 0

eventtrigger
tags question: http://stackoverflow.com/q/29351394
tag name: eventtrigger
type: Tag

marker
tag name: marker
tags question: http://stackoverflow.com/q/29324136
tags question: http://stackoverflow.com/q/29295789
type: Tag

http://stackoverflow.com/comment/46682228
type: AnswerComment
has text: Well, I want the object c that I merge into object b take precendence and hence those properties should override the properties of object b. Similar to Object.assign(), _.merge, $.extend. That is all clear to me. And that works. The caveat is that when it comes to arrays with objects in them, they get replaced by index b[1] = c[1] etc.
type: Comment
comment on: http://stackoverflow.com/a/29236665
score: 0

http://stackoverflow.com/q/29330887
has comment: http://stackoverflow.com/comment/46851086
type: Question
has comment: http://stackoverflow.com/comment/46851200
tagged with: javascript
tagged with: jquery
score: 0
has title: getting into the next element from the currently clicked element not working
answer count: 0
type: UnansweredQuestion
has body: I have this simple link structure (refer below) link 1 link 2 and a jquery script (refer below) $(document).ready(function(){ $('.bxxa').click(function(){ $('.errors').hide(); $(this).next('.errors').show(); $(this).next('.errors').html('column name itemname from row 2'); }); }); as you can see from the code above, if one of the link (.bxxa) is clicked, it will then first hide all the .errors div and then show the .errors div that was next to the current clicked .bxxa link and then add the add html inside on it but sadly not working, why?? any ideas, clues, suggestions, recommendations, help would be greatly appreciated. Thank you.
has comment: http://stackoverflow.com/comment/46851071

http://stackoverflow.com/comment/46895523
type: QuestionComment
comment on: http://stackoverflow.com/q/29355134
type: Comment
has text: Try using `find(...).toArray(function (err, docs) {...})`, and verify the length of the docs. I don't know if this seems hacky, but a lot of examples are using this pattern.
score: 0

http://stackoverflow.com/comment/46646927
type: AnswerComment
comment on: http://stackoverflow.com/a/29218770
has text: You could try [this](http://jsfiddle.net/Lkumqbym/4/) or see the template section [here](http://getbootstrap.com/javascript/#popovers-options)
type: Comment
score: 1

http://stackoverflow.com/q/29327815
has answer: http://stackoverflow.com/a/29327849
score: 2
type: AnsweredQuestion
downvote count: 0
tagged with: javascript
favorite count: 0
type: Question
accepted answer: http://stackoverflow.com/a/29327849
tagged with: regex
upvote count: 2
answer count: 2
possible better answer: http://stackoverflow.com/a/29327939
has answer: http://stackoverflow.com/a/29327939
has body: What I want to get is to find all whitespaces after some string eg. "abc" like this: Abcabcabc ab abc babcba. ^ ^ Only what I can do is to find strings "abc " with regex /abc\s/g But I want to get only a space after "abc". Is it even possible? It is important to me because then I can use this i JS text.replace(REGEX, "something");
has title: Is it possible to find whitespace after some string

http://stackoverflow.com/a/29240969
upvote count: 4
answers question: http://stackoverflow.com/q/29240675
downvote count: 0
has body: I would use the bootstrap events API instead of adding additional click handlers $('.yourTabsClass a').on('show.bs.tab', function(e){ alert('ID clicked = ' + e.target.id) }); Reference: bootstrap tabs docs DEMO
score: 4
type: Answer

http://stackoverflow.com/a/29352941
has comment: http://stackoverflow.com/comment/46992100
score: 0
has comment: http://stackoverflow.com/comment/46907756
type: Answer
has body: I solved this in pure css/html!! The only annoying bit is that you need a css declaration for every list item in order to set its initial width. I used css left and right attributes instead of width, because I found that made things substantially easier. Check it out: https://jsfiddle.net/gershy/k16mcgkb/2/ The idea is that all the li elements are absolutely positioned taking up all vertical space, and a portion of horizontal space. When an li is hovered its left and right are then both set to 0 (stretching all the way across its parent). There's a neat effect as well that you will notice, that the li elements on either side of the hovered one become compressed. This is important because it helps avoid any z-index difficulties. Here's the css that takes care of this (it's the most complicated part): ul:hover &gt; li { left: 0; right: 100%; } ul &gt; li:hover { left: 0; right: 0; z-index: 2; } ul &gt; li:hover ~ li { left: 100%; right: 0; } The 1st rule says that when the ul is hovered, ALL li elements need to squish over to the left side (left: 0; and right: 100%; tell an element to have 0 width at the left side of its parent). The 2nd rule says that the specific li being hovered should stretch the entire way across its parent (and gain a higher z-index than its siblings, just in case) The 3rd rule is the cool part and uses a css feature I've barely ever had to use; the ~ is the "general sibling selector" and selects all elements following a certain element. This rule tells only all li elements that are to the right of the hovered element to squish to the right side instead of the left, overwriting the effects of the 1st rule. I hope you don't mind the "compression" effect, I understand that you didn't ask for it. EDIT: It's always been stackable, here it is with several items on top of each other. The only thing that's really been added are !important modifiers on the hover-resizing rules, to ensure that no matter how specific the previous style rules are, the size…
answers question: http://stackoverflow.com/q/29351531
has comment: http://stackoverflow.com/comment/46913139

http://stackoverflow.com/comment/46847471
comment on: http://stackoverflow.com/a/29328877
has text: What should I put in place of ("html, body")? Or is that always the same? Also if I don't want a delay do I just remove the 500 or do I need to change the whole line?
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/29334865
tagged with: mongoose
tagged with: javascript
tagged with: express
duplicate of: http://stackoverflow.com/q/23667086
answer count: 1
downvote count: 0
favorite count: 0
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/23667086
has body: I have a function which basically queries the MongoDB for a credential (simplified): var query = Credential.findOne({token: token}); return query.exec(function (err, credential) { if (err) return null; return credential; }); I need this credential for another query to get associated roles: router.get('/api/roles', function (req, res) { var token = req.headers.authorization || ''; var cred; if (token === '') { return res.sendStatus(401); } getCredential(token).then(function (credential) { cred = credential; }); getRoles(cred).then(function(roles) { return res.json(roles); }); }); Unfortunately, I can't seem to set the local variable cred from within the resolved promise and thus it is undefined. Any idea how to do this?
tagged with: node.js
has answer: http://stackoverflow.com/a/29335127
score: 1
has title: Mongoose set local variable from query
upvote count: 1
type: Question

http://stackoverflow.com/comment/46723959
type: Comment
has text: Thanks chridam, will do. MJB.
comment on: http://stackoverflow.com/a/29255087
type: AnswerComment
score: 0

http://stackoverflow.com/a/29286914
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/46772139
has body: I am just wondering if there is a way for me to have the JS code in HTML. Instead of having 2 different files Yes, just wrap it inside a Second Option (good practice) You can do the follow put the css into styles.css and put the Js code into the file name myScript.js. Now i create this JSFiddle (hope this is what you want.), since Jsfiddle wrap for you the onDomReady Option, this is how the html document should look. Open video With this the html will load first the tag, and later will load the .js Script You can also use $(document).ready(jQuery) as @Austin Mullins suggest, but for this example this is ok. Hope you get it
has comment: http://stackoverflow.com/comment/46771491
downvote count: 0
has comment: http://stackoverflow.com/comment/46771384
has comment: http://stackoverflow.com/comment/46771197
upvote count: 2
accepted answer of: http://stackoverflow.com/q/29286534
has comment: http://stackoverflow.com/comment/46771603
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29286534
has comment: http://stackoverflow.com/comment/46771850

http://stackoverflow.com/comment/46818507
comment on: http://stackoverflow.com/q/29312176
has text: There is no need to deactivate, user can use same colors for `:active` state
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/109449303
comment on: http://stackoverflow.com/a/39165137
score: 3
type: AnswerComment
type: Comment
has text: it works for me from console but when i try to use the same from my chrome extension, `Object.keys` is empty for the same htmlnode. any suggestions?

http://stackoverflow.com/comment/46911967
type: AnswerComment
type: Comment
score: 0
comment on: http://stackoverflow.com/a/29364378
has text: Yeah, you are right, thanks. Do you know if is there a way to get the size of an array inside the object?

http://stackoverflow.com/a/29308665
has comment: http://stackoverflow.com/comment/46812373
has comment: http://stackoverflow.com/comment/46811211
type: Answer
accepted answer of: http://stackoverflow.com/q/29308530
answers question: http://stackoverflow.com/q/29308530
downvote count: 0
has comment: http://stackoverflow.com/comment/46811605
score: 1
has body: In addition to .ttf you need to have your font in .eot .woff2 .woff to make it work. css example: @font-face { font-family: 'yourFONT'; src: url(/yourFont.eot'); src: url('/yourFont.eot?#iefix') format('embedded-opentype'), url('/yourFont.woff2') format('woff2'), url('/yourFont.woff') format('woff'), url('/yourFont.ttf') format('truetype'), url('/yourFont.svg#yourFONT') format('svg'); font-weight: normal; font-style: normal; }
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/comment/46868833
has text: I am using SharePoint 2013.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29324140
type: AnswerComment

http://stackoverflow.com/q/29357588
tagged with: javascript
has title: Modal window on ajax success handler
score: 0
tagged with: modal-dialog
tagged with: jquery
favorite count: 0
tagged with: ajax
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46899933
answer count: 0
has comment: http://stackoverflow.com/comment/46900161
has comment: http://stackoverflow.com/comment/46900017
upvote count: 1
downvote count: 1
has body: I'm trying to open a modal window after a made ​​via ajax request through the success handler , however the theme I'm using uses a plugin to own ajax , and modal windows are not showing up sorry 4 my bad english $.ajax({ url: 'http://127.0.0.1/projects/biblioteca/php/cadastrar-autor.php', type: "POST", data: {autor1 : autor}, dataType: 'html', success: function(data) { if (data == 'ok') { $.modal.alert('clicado'); } }, error: function(data) { alert('Servidor não respondendo, tente novamente'); } }); } If i put $.modal.alert('clicado'); on $(document).ready the modal windows shows normally, but inside the ajax don't.
type: Question
has comment: http://stackoverflow.com/comment/46900097

http://stackoverflow.com/q/29284548
has comment: http://stackoverflow.com/comment/46767697
has comment: http://stackoverflow.com/comment/46767185
favorite count: 0
has comment: http://stackoverflow.com/comment/46768707
has body: Folks, using js libraries such as underscore,underscore.string, or lodash, I'd like to convert the following String to an Object 'animals=cat&amp;dogs&amp;horses&amp;fish=salmon&amp;tuna'; The following are constant: animals and fish. Separator is = The result should look like: { animals: 'cats&amp;dogs&amp;horses', fish: 'salmon&amp;tona' } animals and fish can occur in the string in any order. Thanks! PS Its not a duplicate of Parse query string in JavaScript... as the requirements are to return an object for later parsing...
has comment: http://stackoverflow.com/comment/46767532
has comment: http://stackoverflow.com/comment/46766904
tagged with: lodash
has comment: http://stackoverflow.com/comment/46766838
has comment: http://stackoverflow.com/comment/46767232
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46767012
tagged with: underscore.js
linked to: http://stackoverflow.com/q/2090551
accepted answer: http://stackoverflow.com/a/29285051
upvote count: 1
has title: JavaScript convert String to object
downvote count: 1
possible better answer: http://stackoverflow.com/a/29286046
type: Question
has comment: http://stackoverflow.com/comment/46767394
has comment: http://stackoverflow.com/comment/46767096
has answer: http://stackoverflow.com/a/29286046
has comment: http://stackoverflow.com/comment/46767543
has comment: http://stackoverflow.com/comment/46767126
tagged with: javascript
has comment: http://stackoverflow.com/comment/46767480
has comment: http://stackoverflow.com/comment/46767161
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/29285051
has comment: http://stackoverflow.com/comment/46767538

http://stackoverflow.com/comment/46768087
type: QuestionComment
comment on: http://stackoverflow.com/q/29278936
has text: It's not clear from the question what your actual technical problem is. Perhaps it helps if you explain better, add some sketch etc.
score: 0
type: Comment

http://stackoverflow.com/a/29329609
has comment: http://stackoverflow.com/comment/46878693
has body: In General you modify each element using JavaScript like this: if (document.getElementById("elementname")) { document.getElementById("elementname").style.backgroundColor = "#FF0000" } "elementname" is the value of the ID property of the html element. You can also use getElementByName (but I don't use it and do not have an example)
has comment: http://stackoverflow.com/comment/46848844
downvote count: 3
score: -3
type: Answer
answers question: http://stackoverflow.com/q/29329520
upvote count: 0

http://stackoverflow.com/a/29270268
score: 0
has comment: http://stackoverflow.com/comment/46741723
type: Answer
answers question: http://stackoverflow.com/q/29270060
has body: On "mouseover" set the classes to "stateOff" or "stateHovered" as needed. Then on "mouseout" set them back to "color". If you can use jQuery it's fairly straight forward, although I think you're probably going to want to fiddle with the CSS a bit: $(document).ready(function(){ $('#menu2 li').mouseover(function(){ //Instead of trying to figure out who is who, just set them all to "stateOff" $('#menu2 li').attr('class','stateOff'); //Then set "this" to "stateHovered". $(this).attr('class','stateHovered'); //The browser won't render any changes until the script finishes running, //So you don't have to worry about "this" jumping back and forth between //two styles. }); $('#menu2 li').mouseout(function(){ $('#menu2 li').attr('class','color'); }); }); menu2{ overflow: hidden; padding-left: 0; padding-right: 0; margin: 0; } .color{ display: inline-block; position: relative; list-style: none; float: left; height: 110px; margin-right: 0; width: 25%; background-color: blue; cursor: pointer; } .stateHovered{ width: 100%; transition: all 500ms ease-out; background-color: #FAA500; } .stateOff{ width: 0; } A B C D
has comment: http://stackoverflow.com/comment/46742718

http://stackoverflow.com/q/29301531
has comment: http://stackoverflow.com/comment/46798359
favorite count: 0
has body: I have been spending over an hour on this one, looked through several questions, but the answer is nowhere to be found. I am running into a problem when using watch on my javascript files. All of the other files are watched and the tasks are executed properly. If I run the default from the start, concat and uglify are working perfectly fine, but if I make any changes to a js file, watch will just plainly ignore it. This is my file: module.exports = function(grunt) { // Project configuration. grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), concat: { index: { src: ['js/shared/*.js', 'js/index/*.js'], dest: 'js/concat/index.js', }, page: { src: ['js/shared/*.js', 'js/page/*.js'], dest: 'js/concat/page.js', }, }, uglify: { dist: { files:{ 'js/build/index.min.js': 'js/concat/index.js', 'js/build/page.min.js': 'js/concat/page.js', } } }, sass: { options: { outputStyle: 'compressed', }, dist: { files: { 'css/main-unprefixed.css': 'sass/main.scss' } } }, autoprefixer: { global: { src: 'css/main-unprefixed.css', dest: 'css/main.css' } }, jade: { compile: { options: { pretty: true }, files: [{ expand: true, cwd: '', src: [ '_layouts/jade/*.jade' ], dest: '_layouts', flatten: true, ext: '.html' }] } }, shell: { jekyllServe: { command: "jekyll serve --no-watch" }, jekyllBuild: { command: "jekyll build" } }, open : { build: { path: 'http://localhost:4000', app: 'Firefox' } }, watch: { options: { livereload: true }, site: { files: ["*.html", "**/*.html", "*.md", "**/*.md", "**/*.yml", "*.yml", "!_site/*.*", "!_site/**/*.*"], tasks: ["shell:jekyllBuild"] }, scripts: { files: ["js/*.js", "js/**/*.js"], tasks: ["concat", "uglify", "shell:jekyllBuild"] }, jade: { files: ["_layouts/jade/*.jade"], tasks: ["jade"] }, css: { files: ["sass/*.scss", "sass/**/*.scss", "sass/**/**/*.scss"], tasks: ["sass", "autoprefixer", "shell:jekyllBuild"] } } }); require('load-grunt-tasks')(grunt); // Default task(s). grunt.registerTask("serve", ["shell:jekyllServe"]); grunt.registerTask("de…
has comment: http://stackoverflow.com/comment/46798031
has title: Grunt Does Not Watch JS files
score: 2
type: AnsweredQuestion
upvote count: 2
tagged with: grunt-contrib-watch
type: Question
has comment: http://stackoverflow.com/comment/46798499
has answer: http://stackoverflow.com/a/29302050
has comment: http://stackoverflow.com/comment/46797830
tagged with: javascript
tagged with: gruntjs
has comment: http://stackoverflow.com/comment/46797880
has comment: http://stackoverflow.com/comment/46798093
tagged with: grunt-contrib-uglify
accepted answer: http://stackoverflow.com/a/29302050
has comment: http://stackoverflow.com/comment/46797999
tagged with: grunt-contrib-concat
has comment: http://stackoverflow.com/comment/46798255
downvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/46798159

http://stackoverflow.com/comment/46834084
type: AnswerComment
type: Comment
has text: @Steve, `shownUsers` is an alias for the array filtered with `limitTo` assigned within the `ng-repeat` expression. Actually, with an array further filtered (on `r.name`), there is a bit more complexity - I updated the answer accordingly
score: 0
comment on: http://stackoverflow.com/a/29320956

http://stackoverflow.com/comment/46699259
score: 0
type: Comment
comment on: http://stackoverflow.com/q/29246874
type: QuestionComment
has text: It's part of a much bigger project. The saved variable is used by many other functions, but depending on user choices, the element may be removed from DOM, and thus I'm left with a leak.

http://stackoverflow.com/comment/46654068
has text: Let the code speak... any answer will be a guess...
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29222634

http://stackoverflow.com/a/29218786
score: 4
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29218772
type: Answer
upvote count: 4
accepted answer of: http://stackoverflow.com/q/29218772
downvote count: 0
has body: No need for underscore. You can do this pretty easily with vanilla javascript: var i, tag, main, simpleArray = [1,1,2,3,5,8,13,21]; var complexArray = simpleArray.map(function(e) { return { tag: e }; }); main = document.getElementById('main'); for(i = 0; i < complexArray.length; i++) { tag = complexArray[i]; main.innerHTML += ' tag: '+tag.tag+' '; }

http://stackoverflow.com/comment/46876422
has text: You have get the first character and remove it before you can do this.
type: Comment
score: 0
comment on: http://stackoverflow.com/a/29345151
type: AnswerComment

http://stackoverflow.com/comment/46704481
score: 0
comment on: http://stackoverflow.com/q/29250134
type: QuestionComment
type: Comment
has text: Why you not doing like this `$("form").submit();`

http://stackoverflow.com/comment/51271008
type: AnswerComment
has text: If Json Schema only validates structure, not data, then the enum type itself clearly falls outside that boundary. Either you'd have to take enum out and leave it be array, or, provide a way to DRY out enums.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29362758

http://stackoverflow.com/comment/57401916
score: 1
type: AnswerComment
has text: Would you know how to the opposite? Make WebStorm use `typings` in package.json or an actual d.ts file from the package to provide autocompletion support and hinting for JS code? I have a library written in TS, compiled and published on npm. In my project I want to use my own d.ts which is not on DefintelyTyped repo.
type: Comment
comment on: http://stackoverflow.com/a/29335716

http://stackoverflow.com/comment/46839576
score: 1
type: AnswerComment
type: Comment
has text: `newVal!=oldVal` should be `newVal !== oldVal`
comment on: http://stackoverflow.com/a/29324192

http://stackoverflow.com/comment/46772928
type: AnswerComment
comment on: http://stackoverflow.com/a/29286278
score: 0
has text: Could I see your updated code? Maybe a plnkr or jsbin or jsfiddle would be useful
type: Comment

http://stackoverflow.com/comment/46902771
comment on: http://stackoverflow.com/a/29357407
type: AnswerComment
score: 0
type: Comment
has text: Ah, gotcha. Wrong type of attack that I'm referencing, then. Is it possible for the cookie to be obtained by a 3rd party, without XSS? I'm not concerned about a request that would originate from our domain to our own backend servers, but more concerned with how a 3rd party could obtain a user's token.

http://stackoverflow.com/comment/46921880
has text: @mintsauce: It is a good point, we should limit to everything that is not a period. Answer updated.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29370095

http://stackoverflow.com/a/29264226
score: 1
has body: Exposing through an http request would be the most elegant option and would allow for refreshes. You are already counting on the browser having javascript, anyway. Also, if the value is not dynamic, why not just serve a static javascript file with the array in the first place?
answers question: http://stackoverflow.com/q/29264088
upvote count: 1
downvote count: 0
type: Answer

http://stackoverflow.com/comment/46703674
type: Comment
comment on: http://stackoverflow.com/a/29249493
score: 1
has text: I agree but unfortunately it's a pretty common pattern (empty anchor), ebforced by some css/js libraries. It's also a way to disable links on older browsers (or with a pure js approach). Js *version* has also another use: it will not affect browser **history** and won't move to page top when clicked (and other dirty uses too, for example user won't see linked URL and it may be pre/post processed in an Ajax call).
type: AnswerComment

http://stackoverflow.com/q/29292921
linked to: http://stackoverflow.com/q/25751723
has answer: http://stackoverflow.com/a/51722274
has answer: http://stackoverflow.com/a/65578850
has answer: http://stackoverflow.com/a/76138171
type: Question
has answer: http://stackoverflow.com/a/45177550
has answer: http://stackoverflow.com/a/44393925
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/62871506
has comment: http://stackoverflow.com/comment/46782417
has answer: http://stackoverflow.com/a/50437423
possible better answer: http://stackoverflow.com/a/64915904
has answer: http://stackoverflow.com/a/56418103
score: 45
has answer: http://stackoverflow.com/a/66983331
has answer: http://stackoverflow.com/a/29293745
has comment: http://stackoverflow.com/comment/46782361
accepted answer: http://stackoverflow.com/a/29293745
downvote count: 0
has answer: http://stackoverflow.com/a/51274543
tagged with: javascript
has comment: http://stackoverflow.com/comment/46782444
favorite count: 0
linked to: http://stackoverflow.com/q/5525795
linked to: http://stackoverflow.com/q/23803743
has comment: http://stackoverflow.com/comment/46782424
has answer: http://stackoverflow.com/a/64771228
answer count: 18
has answer: http://stackoverflow.com/a/29313578
tagged with: asynchronous
has answer: http://stackoverflow.com/a/64915904
has title: How to use Promise.all with an object as input
has answer: http://stackoverflow.com/a/37898438
has body: I've been working on a small 2D game library for my own use, and I've run into a bit of a problem. There is a particular function in the library called loadGame that takes dependency info as input (resource files, and a list of scripts ot be executed). Here's an example. loadGame({ "root" : "/source/folder/for/game/", "resources" : { "soundEffect" : "audio/sound.mp3", "someImage" : "images/something.png", "someJSON" : "json/map.json" }, "scripts" : [ "js/helperScript.js", "js/mainScript.js" ] }) Each item in resources has a key that is used by the game to access that particular resource. The loadGame function converts the resources into an object of promises. The problem is that it tries to use Promises.all to check for when they're all ready, but Promise.all accepts only iterables as inputs - so an object like what I have is out of the question. So I tried to convert the object into an array, this works great, except each resource is just an element in an array and doesn't have a key to identify them. Here's the code for loadGame: var loadGame = function (game) { return new Promise(function (fulfill, reject) { // the root folder for the game var root = game.root || ''; // these are the types of files that can be loaded // getImage, getAudio, and getJSON are defined elsewhere in my code - they return promises var types = { jpg : getImage, png : getImage, bmp : getImage, mp3 : getAudio, ogg : getAudio, wav : getAudio, json : getJSON }; // the object of promises is created using a mapObject function I made var resources = mapObject(game.resources, function (path) { // get file extension for the item var extension = path.match(/(?:\.([^.]+))?$/)[1]; // find the correct 'getter' from types var get = types[extension]; // get it if that particular getter exists, otherwise, fail return get ? get(root + path) : reject(Error('Unknown resource type "' + extension + '".')); }); // load scripts when they're done // this is the problem here // my 'values' function converts the o…
tagged with: promise
has answer: http://stackoverflow.com/a/75720662
upvote count: 45
linked to: http://stackoverflow.com/q/22519784
has answer: http://stackoverflow.com/a/61530774
has answer: http://stackoverflow.com/a/60689307

http://stackoverflow.com/a/29351855
has body: // Declare variables var loopStart; var loopMax; var total; // Assignments loopStart = Number(prompt("Enter a number:")); loopMax = Number(prompt("Enter a number larger than the last:")); total = 0; // Processing while (loopStart &lt;= loopMax) { total += loopStart; document.write(loopStart+ (loopStart!=loopMax ? "+" : "")); loopStart++; } document.write(" = " + total);
type: Answer
answers question: http://stackoverflow.com/q/29351606
has comment: http://stackoverflow.com/comment/46889004
score: 0

http://stackoverflow.com/q/29252906
tagged with: jquery
score: -1
has answer: http://stackoverflow.com/a/29252976
tagged with: http://stackoverflow.com/tag/html
has body: I'm unable to remove rows from dynamically created table. If a user selects a option then on change event will be invoked. Upon that event dynamically here I'm creating a table. If a user selects another option previous rows should be removed and new rows should be added to table. &lt;table id="tbl1"&gt;&lt;/table&gt; &lt;script type="text/javascript"&gt; $('#options').change(function() { $('#tbl1 tr').remove(); if (this.value != "") { var tr = $('&lt;tr&gt;'); //some code to add nu. rows dynamically $('&lt;td&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/td&gt;').appendTo(tr); $('#tbl1').last().after(tr); } //end What is my mistake?
answer count: 1
has comment: http://stackoverflow.com/comment/46710108
favorite count: 0
has comment: http://stackoverflow.com/comment/46709671
has comment: http://stackoverflow.com/comment/46709340
has comment: http://stackoverflow.com/comment/46709365
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46709596
has comment: http://stackoverflow.com/comment/46709649
has title: Unable to remove rows from table with jQuery
downvote count: 1
has comment: http://stackoverflow.com/comment/46709633
has comment: http://stackoverflow.com/comment/46709473
has comment: http://stackoverflow.com/comment/46709611
type: Question
upvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/46709405

http://stackoverflow.com/comment/46884526
type: Comment
has text: I'd be careful using [for...of](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of#Browser_compatibility) as it's not supported in IE yet.
score: 0
comment on: http://stackoverflow.com/a/29349396
type: AnswerComment

http://stackoverflow.com/comment/46645615
score: 0
comment on: http://stackoverflow.com/q/29218235
has text: You should create a javascript function which will call addTab and then, return false.
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29319439
tagged with: node.js
accepted answer: http://stackoverflow.com/a/29319659
has comment: http://stackoverflow.com/comment/46849942
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46831715
has answer: http://stackoverflow.com/a/29319659
type: Question
answer count: 1
tagged with: javascript
has title: Nesting callbacks for more than two tasks
tagged with: callback
score: 0
has body: It is possible to determine the order of TWO tasks using callbacks, as shown below. a(b); function a(callback) { // do something callback(); } function b() { // do next } See Fiddle First do a(), then do b(). I would like to concatenate more than two tasks. As I´m dealing with quite big functions, I´m looking for something like that: a(b(c)); First do a(), then do b(), then do c(). However I'm not successful with this. See Fiddle Is there an easy way to do so, maybe without needing Promises?
has comment: http://stackoverflow.com/comment/46830567
tagged with: asynchronous

http://stackoverflow.com/comment/46849063
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29329771
score: 0
has text: [**Read the docs!**](http://api.jquery.com/each/)

http://stackoverflow.com/a/37627535
score: 2
upvote count: 2
has body: I have gone through the same issue and I am sharing working code for you. index.php Textarea The editor can also be initialized on a textarea. upload_image.php <?php // Allowed extentions. $allowedExts = array("gif", "jpeg", "jpg", "png"); // Get filename. $temp = explode(".", $_FILES["file"]["name"]); // Get extension. $extension = end($temp); // An image check is being done in the editor but it is best to // check that again on the server side. // Do not use $_FILES["file"]["type"] as it can be easily forged. $finfo = finfo_open(FILEINFO_MIME_TYPE); $mime = finfo_file($finfo, $_FILES["file"]["tmp_name"]); /* if you want to check extension of a file, then please remove the below if condition */ /*if ((($mime == "image/gif") || ($mime == "image/jpeg") || ($mime == "image/pjpeg") || ($mime == "image/x-png") || ($mime == "image/png")) && in_array($extension, $allowedExts)) {*/ // Generate new random name. $name = sha1(microtime()) . "." . $extension; // Save file in the uploads folder. move_uploaded_file($_FILES["file"]["tmp_name"], getcwd() . "/uploads/" . $name); // Generate response. $response = new StdClass; $response->link = "http://localhost/test/editor-3/html/uploads/" . $name; echo stripslashes(json_encode($response)); //} ?> Now Open included javascript file image.min.js and just find and change the imageUploadURL parameter to url of your upload_image.php file, in my case, it is: imageUploadURL: "http://localhost/test/editor-3/html/upload_image.php",
downvote count: 0
answers question: http://stackoverflow.com/q/29336544
type: Answer

http://stackoverflow.com/a/29372163
upvote count: 3
has comment: http://stackoverflow.com/comment/58064569
has body: In case anyone else runs into this, the issue is that the minimum value setDetectionInterval will accept is 15. I found some code that is trying to do exactly what I am doing in a Safari Online book... chrome.idle.setDetectionInterval(15); chrome.idle.onStateChanged.addListener( function (state) { if (state === "idle" &amp;&amp; dirty) save(); } ); This code is almost exactly the same, but this version works and mine didn't. The console prints an error that says the minimum value for the interval is 15 seconds where I was trying to check every 10. So I switched my code to check every 15 seconds and everything worked
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29356308
answers question: http://stackoverflow.com/q/29356308
has comment: http://stackoverflow.com/comment/58079629
score: 3
type: Answer
has comment: http://stackoverflow.com/comment/58079345

http://stackoverflow.com/a/29318552
answers question: http://stackoverflow.com/q/29264330
score: 1
upvote count: 1
type: AcceptedAnswer
has body: The problem you are facing is because the bounding box of the lines are bigger than the line. To actually see what is happening, change selectable property of lines to true. line = new fabric.Line(coords, { fill: 'black', stroke: 'black', strokeWidth: 3, selectable: true }); Now when you hover over the lines, wherever you see cursor turning into a hand, those are the places clicking which your polyline will get selected. A simple solution to this is a property Fabric.js provides called perPixelTargetFind. Just set it to true while creating the lines and they will get selected only if you click on the lines and not the bounding box. line = new fabric.Line(coords, { fill: 'black', stroke: 'black', strokeWidth: 3, selectable: false }); line.hasControls = line.hasBorders = false; line.perPixelTargetFind = true; canvas.add(line); You can find the updated fiddle here: http://jsfiddle.net/w86vcyez/5/ and documentation here: http://fabricjs.com/docs/fabric.Object.html#perPixelTargetFind
type: Answer
accepted answer of: http://stackoverflow.com/q/29264330
downvote count: 0

http://stackoverflow.com/q/29269992
has answer: http://stackoverflow.com/a/29270424
tagged with: for-loop
has answer: http://stackoverflow.com/a/29270280
tagged with: arrays
downvote count: 0
has answer: http://stackoverflow.com/a/29270336
score: 1
favorite count: 0
answer count: 4
has body: In the following code, my alert() is returning 0 when it should be returning the checked box value. I need it to return the value in the designated array associated with the checkbox. Program 4 Parallel Arrays JavaScript, the Definitive Guide: $45.25 JavaScript & JQuery: The Missing Manual: $24.88 Head First JavaScript: $32.35 Beginning JavaScript: $27.33 JavaScript by Example: $34.85 JavaScript Bible: $36.24 JavaScript: The Web Technologies Series: $85.33 JavaScript Step by Step: $45.32 Total Pages Subtotal Tax Total
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29270280
upvote count: 1
type: Question
has title: Why is my JavaScript function not returning the checked array value?
tagged with: javascript
possible better answer: http://stackoverflow.com/a/29270321
has answer: http://stackoverflow.com/a/29270321

http://stackoverflow.com/a/29250526
accepted answer of: http://stackoverflow.com/q/29246769
type: Answer
answers question: http://stackoverflow.com/q/29246769
score: 2
has comment: http://stackoverflow.com/comment/46740662
downvote count: 0
has comment: http://stackoverflow.com/comment/46747952
upvote count: 2
has comment: http://stackoverflow.com/comment/46751474
type: AcceptedAnswer
has body: You can sort the elements, take a look the example I did to sort by number: http://jsfiddle.net/tnnqyxcw/1/ js: $(document).ready(function(){ $('button').on('click', function(){ var s = $(this).data('sort'); console.log(s); if(s === 0){ $(this).data('sort', 1); $('.clist div').sort(function(a,b){ return a.dataset.sid < b.dataset.sid }).appendTo('.clist') }else{ $(this).data('sort', 0); $('.clist div').sort(function(a,b){ return a.dataset.sid > b.dataset.sid }).appendTo('.clist') } }); }); Html Sort: Number 1 Number 4 Number 3 Number 1 Number 4 Number 2 Number 1 So you can use data- to sort for all you want and then assign the click to the button or whatever you want. I hope it's help.

location-href
tags question: http://stackoverflow.com/q/29238934
type: Tag
tag name: location-href

http://stackoverflow.com/comment/47105374
type: Comment
comment on: http://stackoverflow.com/a/29463537
has text: However, it's not true. [See the same answer and my comments, here.](http://i.imgur.com/JuAMjFc.png)
score: 0
type: AnswerComment

http://stackoverflow.com/a/29236531
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: It is a good practice to put a condition check before INSERT $data = "%".$_GET['input']."%"; //get data from javascript if (empty($_GET['input'])) { echo 'name input cannot be blank'; }else { $sql = "INSERT INTO drafts (picks) VALUES ('$data')"; } Before the insert check what you are getting in $_GET['input']. Try to print $_GET['input'] first, put a condition check, if its null (as it is in your case), do not execute the INSERT statement
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/29236003
answers question: http://stackoverflow.com/q/29236003

http://stackoverflow.com/q/29352088
tagged with: javascript
score: 0
answer count: 2
tagged with: iphone
favorite count: 0
has comment: http://stackoverflow.com/comment/46890531
has comment: http://stackoverflow.com/comment/46978760
has comment: http://stackoverflow.com/comment/46890558
has answer: http://stackoverflow.com/a/42581644
has comment: http://stackoverflow.com/comment/46889752
has body: We use gapi.js for Google authorising. It works correct on majority of desktop browsers and on mobile Safari. But it doesn't on Mobile Chrome IOS(41.0.2272.58). In the begging we load gapi.js script require(['https://apis.google.com/js/client.js?onload=gapiIsLoaded']; Then we try authorize using: gapi.auth.authorize(params, handler); Params are var params = { client_id: MY_CLIENT_ID, scope: MY_SCOPES, immediate: false // to open popup }; Browsers shows popup and I can autorize and continue work. IOS Safari works correct too. But Chrome IOS never calls handler callback.
has title: Google Client Authorize doesn't work on Mobile IOS IPhone(41.0.2272.58)
upvote count: 1
has comment: http://stackoverflow.com/comment/46891455
tagged with: google-chrome
downvote count: 1
type: Question
possible better answer: http://stackoverflow.com/a/30418516
has comment: http://stackoverflow.com/comment/46889637
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/30418516
tagged with: ios
accepted answer: http://stackoverflow.com/a/42581644

http://stackoverflow.com/comment/46876763
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29258925
has text: @slicedtoad Fiddle updated https://jsfiddle.net/3kq85hx0/2/.
score: 0

http://stackoverflow.com/a/29240777
upvote count: 1
type: Answer
downvote count: 0
answers question: http://stackoverflow.com/q/29240754
has body: Your input has class testField, not id; change # to .: alert("test blah blah " + $(".testField").val());
score: 1

http://stackoverflow.com/comment/46783969
comment on: http://stackoverflow.com/q/29293811
type: Comment
type: QuestionComment
has text: Are you using the native drag and drop functionality, or jQuery UI's draggable/droppable functionality?
score: 1

http://stackoverflow.com/a/29232037
score: 1
has body: use ng-form directive, here is the DOC --Select--- Save here is the plunker here is a good explanation
upvote count: 1
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/29231858
answers question: http://stackoverflow.com/q/29231858
downvote count: 0

http://stackoverflow.com/q/29272134
type: Question
has comment: http://stackoverflow.com/comment/46748165
has body: I want to create a set of value objects in JavaScript. The problem is that in JavaScript equality is based on identity. Hence, two different objects with the same value will be treated as unequal: var objects = new Set; objects.add({ a: 1 }); objects.add({ a: 1 }); alert(objects.size); // expected 1, actual 2 How do you work around this problem?
tagged with: javascript
has title: JavaScript sets and value objects
tagged with: identity
upvote count: 2
tagged with: ecmascript-6
tagged with: ecmascript-harmony
has answer: http://stackoverflow.com/a/29272276
accepted answer: http://stackoverflow.com/a/29272276
answer count: 1
has comment: http://stackoverflow.com/comment/46818391
downvote count: 1
duplicate of: http://stackoverflow.com/q/27094680
favorite count: 0
linked to: http://stackoverflow.com/q/27094680
has comment: http://stackoverflow.com/comment/46746582
has comment: http://stackoverflow.com/comment/46818934
has comment: http://stackoverflow.com/comment/46744605
has comment: http://stackoverflow.com/comment/46753194
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46744706
has comment: http://stackoverflow.com/comment/46744531
score: 1
tagged with: set

http://stackoverflow.com/comment/46813838
type: AnswerComment
type: Comment
has text: Glad it worked out for you. If my response fixed your issue, please set my answer as the correct one by clicking the Checkmark to the left of my initial post. Thank you, and good luck in your coding.
comment on: http://stackoverflow.com/a/29309124
score: 0

http://stackoverflow.com/q/29311513
type: AnsweredQuestion
tagged with: href
has answer: http://stackoverflow.com/a/29311638
accepted answer: http://stackoverflow.com/a/29311638
tagged with: javascript
score: 0
answer count: 1
has body: I have this code and I want after click to a href checked to radio box code: <?php echo $result['answer1'];?> <?php echo $result['answer2'];?> <?php echo $result['answer3'];?> How can do it?
tagged with: http://stackoverflow.com/tag/html
has title: Href to checked input radio
has comment: http://stackoverflow.com/comment/46816796
type: Question

http://stackoverflow.com/q/29218981
has title: jasmine 2 - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL
has answer: http://stackoverflow.com/a/29229172
score: 18
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/43858218
type: Question
accepted answer: http://stackoverflow.com/a/29229172
has answer: http://stackoverflow.com/a/34661716
tagged with: javascript
upvote count: 18
possible better answer: http://stackoverflow.com/a/34661716
answer count: 3
downvote count: 0
tagged with: jasmine
has body: Having trouble with jasmine 2 and getting async specs wired up: define(['foo'], function(foo) { return describe('foo', function() { beforeEach(function(done) { window.jasmine.DEFAULT_TIMEOUT_INTERVAL = 10000; return setTimeout((function() { console.log('inside timeout'); return done(); }), window.jasmine.DEFAULT_TIMEOUT_INTERVAL); }); return it('passes', function() { return expect({}).toBeDefined(); }); }); }); When I run via karma, I get back Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL. and then the specs fail. I have attempted to override the default timeout but I can't get past the error
favorite count: 0

http://stackoverflow.com/comment/46785822
comment on: http://stackoverflow.com/q/29294297
score: 0
has text: And you are not escaping anything here, but writing plain html strings into a html document. That won't display it as text.
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29302950
answers question: http://stackoverflow.com/q/29302435
type: Answer
has body: With jQuery you can use: $('#divParent').mouseover(function () { $('#divParent > p').addClass('hover') }).mouseout(function () { $('#divParent > p').removeClass('hover') }) $('#divChild').mouseover(function (e) { e.stopPropagation(); $('#divChild > p').addClass('hover') }).mouseout(function (e) { $('#divChild > p').removeClass('hover') }) .myhover { width: 120px; } .hover { color: #FED242; } Some text Text text text Example text As others have already noted, since there is no parent CSS selector you can't use CSS alone.
has comment: http://stackoverflow.com/comment/47082267
downvote count: 2
upvote count: 1
score: -1

http://stackoverflow.com/a/29240073
has body: There are several issues in your gethtml function you need to fix. Make sure that everywhere you have now return, you call the callback, e.g. return callback(err) when you want to communicate an error or return callback(null, result) when you want to communicate success and return a result. Never return without calling the callback.
upvote count: 1
has comment: http://stackoverflow.com/comment/46686633
has comment: http://stackoverflow.com/comment/46687759
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/29239889
score: 1

http://stackoverflow.com/q/29282385
possible better answer: http://stackoverflow.com/a/29282834
has title: calling functions and click animations
has body: I have one rectangle, 2 functions that animates different this rectangle at different window widths, and im calling the functions with a click. it Must work when screen resizes as well. Problems: 1- it seems like when I load one function then the other cant work, only the first. 2- It doesn't work on the first click. 3- I have to write the same code for when the document is ready and when the document resize. How can I fix this 3 points. thx. code below. $(document).ready(function () { function lateralMove() { $(".rectangle-1").off("click").click(function () { $(this).animate({ left: "+=50" }, 500); }) } function horizontalMove() { $(".rectangle-1").off("click").click(function () { $(this).animate({ top: "+=50" }, 500); }) } $(window).resize(function () { screenWidth = $(this).width() }) $(".rectangle-1").click(function () { if (screenWidth > 300) { lateralMove() } else if (screenWidth <= 300) { horizontalMove() } }) screenWidth = $(window).width() if (screenWidth > 300) { blackMove() } else if (screenWidth <= 300) { horizontalMove() } }) .rectangle-1 { position: relative; background-color: #000; height: 100px; width: 100px; margin-top: 20px; }
accepted answer: http://stackoverflow.com/a/29283240
score: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29283709
answer count: 3
has answer: http://stackoverflow.com/a/29283240
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29282834
type: Question

http://stackoverflow.com/comment/46765676
type: Comment
comment on: http://stackoverflow.com/a/29283824
score: 0
type: AnswerComment
has text: I tried `adee@coinachgaaaaaa` and its saying Valid ! Not so good.

http://stackoverflow.com/q/29281481
score: 0
answer count: 1
tagged with: jquery
tagged with: file-upload
has body: Is there a way to use Fine Uploader to upload to an Amazon S3 bucket by providing the already signed policy document along with the key and the other credentials all at once by overriding the policy post request with our own XML api call? Our company API returns all the credentials including signed policy for the file in one response and is already well established so setting up a signing page is not an option.
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29281867
type: Question
tagged with: amazon-s3
tagged with: fine-uploader
tagged with: javascript
has title: Fine uploader S3 upload without additional policy sign request

http://stackoverflow.com/comment/46787496
type: QuestionComment
has text: Also, don't do `$('#TableName tbody')` but rather do `$('#TableName').find('tbody')`
comment on: http://stackoverflow.com/q/29295946
score: 1
type: Comment

http://stackoverflow.com/a/29292477
score: 0
answers question: http://stackoverflow.com/q/29282298
has body: Run Update-Package command from nuget package console to update all missing packages. It update existing package to newer version. nice way to update to latest one.
type: Answer

http://stackoverflow.com/comment/138992996
comment on: http://stackoverflow.com/q/29254339
has text: Likely because you didn't wait for getCurrentPosition to do it's thing before stringifying.
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/q/29357171
has comment: http://stackoverflow.com/comment/46899227
has comment: http://stackoverflow.com/comment/46899438
upvote count: 0
score: -2
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46899116
possible better answer: http://stackoverflow.com/a/29357423
has answer: http://stackoverflow.com/a/29357423
has title: Hiding and showing classes with the same Class with jQuery
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29357249
favorite count: 0
downvote count: 2
has comment: http://stackoverflow.com/comment/46899188
tagged with: css
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29357249
type: Question
has body: I'm creating a tool which generates a bunch of divs based on data I input into an array, however they all have the same class. The idea is that when one link is clicked it shows one of the ".catbox" divs and hides the rest. All of these divs have the same class so I need to iterate through them, but I'm not quite sure how this is done with jQuery. Currently clicking on the last ".list" class triggers the on click event instead of all of them, and currently it shows all of the divs with the class ".catbox" instead of the corresponding one. Here is the code: var HTMLcatName = ' %data% '; var HTMLcatImage = ' '; var HTMLcatCounter = ' Number of clicks: %data% '; var HTMLcatList = ' %data% ' var noCats = 'No cats selected m8'; var getCounterClass = document.getElementsByClassName("counter"); $(document).ready(function() { cats.display(); $('.catbox').hide(); for (u = 0; u < cats.name.length; u++) { formattedCatList = HTMLcatList.replace("%data%", cats.name[u]); var listDiv = document.createElement('div'); listDiv.innerHTML = formattedCatList; listDiv.className = "list"; $(".list").click(function() { $(".catbox").toggle("slow"); }); $("body").prepend(listDiv); } }); var update = function() { for (j = 0; j < getCounterClass.length; j++) { getCounterClass[j].innerHTML = 'Number of clicks: ' + cats.clicks[j]; } } var cats = { "name": ["Monte", "Jib"], "image": ["images/monte.jpg", "images/jib.jpg"], "clicks": [0, 0], display: function () { for (i = 0; i < cats.image.length; i++) { formattedCatNames = HTMLcatName.replace("%data%", cats.name[i]); formattedCatImages = HTMLcatImage.replace("%data%", cats.image[i]); formattedCatCounter = HTMLcatCounter.replace("%data%", cats.clicks[i]); var catDiv = document.createElement('div'); catDiv.className = "catbox"; catDiv.innerHTML = formattedCatNames + formattedCatImages + formattedCatCounter; catDiv.querySelector('img').addEventListener('click', (function(catCountUp) { return function() { cats.clicks[catCountUp]++; update(); }; })(i)…
answer count: 2

http://stackoverflow.com/comment/46920149
has text: You're looking for [stop()](https://api.jquery.com/stop/)
type: QuestionComment
type: Comment
score: 1
comment on: http://stackoverflow.com/q/29369324

http://stackoverflow.com/comment/46815355
type: AnswerComment
comment on: http://stackoverflow.com/a/29309725
score: 0
has text: actually @gregnr async.series gave me the expected console output, but for some reason async.parallel gave me very unexpected console output, not because it was unordered but because 90% of the entries were missing, that shouldn't happen. but async.series had expected output, all 100% and of course in order. why would this be?
type: Comment

http://stackoverflow.com/a/29321052
accepted answer of: http://stackoverflow.com/q/29320899
has comment: http://stackoverflow.com/comment/46834174
has comment: http://stackoverflow.com/comment/46833504
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/57581801
type: Answer
has body: It's a cross-domain issue. You can get the first url data by rquesting it with JSONP. Angular support it with the $http.jsonp method: $http.jsonp('http://teckstack.com/api/get_recent_posts?callback=JSON_CALLBACK') .success(function (data1) { console.log("BLOG pass"); $scope.heading1 = data1; // response data }).error(function (data1) { console.log("BLOG failed"); }); Make sure you add the callback=JSON_CALLBACK parameter to your url.
has comment: http://stackoverflow.com/comment/46833730
answers question: http://stackoverflow.com/q/29320899
score: 1
upvote count: 1

http://stackoverflow.com/a/29238462
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29238293
has body: I assume this is all within a document.ready if you're using jQuery. To get this to render before the user sees anything, conditionally add the class inside the head element: &lt;html&gt; &lt;head&gt; &lt;!-- Make sure the CSS class is added first --&gt; &lt;script&gt; var isNight = localStorage["night"] || false; if(isNight) document.querySelector("html").className = "night"; &lt;/script&gt; &lt;!-- Now load your stylesheet, jQuery &amp; other scripts --&gt; &lt;link rel="stylesheet" type="text/css" href="yourstyles.css"&gt; &lt;/head&gt; &lt;body&gt; &lt;/body&gt; &lt;/html&gt;
type: Answer
has comment: http://stackoverflow.com/comment/46685244
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/46685157
upvote count: 1
accepted answer of: http://stackoverflow.com/q/29238293

http://stackoverflow.com/q/29257117
has comment: http://stackoverflow.com/comment/46717106
tagged with: javascript
tagged with: ionic-framework
type: Question
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/46744555
has body: i fetch from json and set the value to my angular ionic app. my textbox holds the value. but im unable to get the textbox value to controller. this is how i have done it controller.js $http.post("http://www.fooget.com/mydetails.php).success(function(details){ $scope.mydetails= details; }); and i set the value to my html page &lt;form&gt; &lt;div ng-repeat="data in details|limitTo:1"&gt; &lt;p&gt;{{data.f_name}}&lt;/p&gt; &lt;!--displays the value--&gt; &lt;input type="text" ng-model="v.name" value="{{data.f_name}}"/&gt; &lt;!--empty values--&gt; &lt;input type="text" ng-model="v.id" value="{{data.id}}"/&gt; &lt;!--empty values--&gt; &lt;button ng-click="push(v)"&gt; &lt;/form&gt; on form click i dont get the textbox values to my controller, im trying to get the vaules to the controller. it doesnt appear $scope.push= function (v) { var push_name = v.name; // empty values var push_id = v.id; // empty values }
tagged with: angularjs
has title: Angular, get dynamic value of textbox to controller
has comment: http://stackoverflow.com/comment/46718068
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46717872
has answer: http://stackoverflow.com/a/29257773

http://stackoverflow.com/a/39410265
has comment: http://stackoverflow.com/comment/76395470
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29223071
type: Answer
has comment: http://stackoverflow.com/comment/124803432
has comment: http://stackoverflow.com/comment/73190939
has comment: http://stackoverflow.com/comment/89710736
has body: Here's another more generic way of doing this. Requiring a module by ID The current version of WebPack exposes webpackJsonp(...), which can be used to require a module by ID: function _requireById(id) { return webpackJsonp([], null, [id]); } or in TypeScript window['_requireById'] = (id: number): any =&gt; window['webpackJsonp'];([], null, [id]); The ID is visible at the top of the module in the bundled file or in the footer of the original source file served via source maps. Requiring a module by name Requiring a module by name is much trickier, as WebPack doesn't appear to keep any reference to the module path once it has processed all the sources. But the following code seems to do the trick in lot of the cases: /** * Returns a promise that resolves to the result of a case-sensitive search * for a module or one of its exports. `makeGlobal` can be set to true * or to the name of the window property it should be saved as. * Example usage: * _requireByName('jQuery', '$'); * _requireByName('Observable', true)´; */ window['_requireByName'] = (name: string, makeGlobal?: (string|boolean)): Promise&lt;any&gt; =&gt; getAllModules() .then((modules) =&gt; { let returnMember; let module = _.find&lt;any, any&gt;(modules, (module) =&gt; { if (_.isObject(module.exports) &amp;&amp; name in module.exports) { returnMember = true; return true; } else if (_.isFunction(module.exports) &amp;&amp; module.exports.name === name) { return true; } }); if (module) { module = returnMember ? module.exports[name] : module.exports; if (makeGlobal) { const moduleName = makeGlobal === true ? name : makeGlobal as string; window[moduleName] = module; console.log(`Module or module export saved as 'window.${moduleName}':`, module); } else { console.log(`Module or module export 'name' found:`, module); } return module; } console.warn(`Module or module export '${name}'' could not be found`); return null; }); // Returns promise that resolves to all installed modules function getAllModules() { return new…
has comment: http://stackoverflow.com/comment/82756523
score: 15
upvote count: 15
answers question: http://stackoverflow.com/q/29223071

http://stackoverflow.com/comment/46687200
score: 0
comment on: http://stackoverflow.com/q/29240498
type: QuestionComment
has text: " the right and left boxes" - what do you mean?
type: Comment

http://stackoverflow.com/comment/46709389
type: Comment
has text: looks like the elements are not there
score: 1
comment on: http://stackoverflow.com/q/29252928
type: QuestionComment

http://stackoverflow.com/a/29312414
downvote count: 0
type: Answer
has body: As @lsowen pointed out, gulp-util does not have the beep function anymore, so you should npm install --save-dev beepbeep And do something like: var beep = require('beepbeep'); gulp.task('sass', function () { return sass('src/sass/style.scss', { style: 'compressed' }) .pipe(autoprefixer()) .pipe(rename('style.css')) .pipe(gulp.dest('src/css/')) .on('end', function () { beep(); }); });
upvote count: 3
accepted answer of: http://stackoverflow.com/q/29300726
answers question: http://stackoverflow.com/q/29300726
score: 3
type: AcceptedAnswer

http://stackoverflow.com/a/29292766
accepted answer of: http://stackoverflow.com/q/29292558
answers question: http://stackoverflow.com/q/29292558
score: 2
type: AcceptedAnswer
downvote count: 0
has body: You were using 1-based indexing instead of 0-based indexing in JavaScript. I also added a trace for your convenience. Try this: var heapSort = function(array) { var swap = function(array, firstIndex, secondIndex) { var temp = array[firstIndex]; array[firstIndex] = array[secondIndex]; array[secondIndex] = temp; }; var maxHeap = function(array, i) { var l = 2 * i; var r = l + 1; var largest; if (l &lt; array.heapSize &amp;&amp; array[l] &gt; array[i]) { largest = l; } else { largest = i; } if (r &lt; array.heapSize &amp;&amp; array[r] &gt; array[largest]) { largest = r; } if (largest != i) { swap(array, i, largest); maxHeap(array, largest); } }; var buildHeap = function(array) { array.heapSize = array.length; for (var i = Math.floor(array.length / 2); i &gt;= 0; i--) { maxHeap(array, i); } }; buildHeap(array); for (var i = array.length-1; i &gt;= 1; i--) { swap(array, 0, i); array.heapSize--; maxHeap(array, 0); document.getElementById("getHeapSort").innerHTML = document.getElementById("getHeapSort").innerHTML + a + "&lt;br&gt;"; } }; var a = [55, 67, 10, 34, 25, 523, 1, -2]; document.getElementById("getHeapSort").innerHTML = a + "&lt;br&gt;"; heapSort(a); Here is a JFiddle: http://jsfiddle.net/mbL5enL5/1/
type: Answer
upvote count: 2

http://stackoverflow.com/comment/46896996
type: Comment
comment on: http://stackoverflow.com/a/29305233
score: 0
type: AnswerComment
has text: @balnazzar, if this worked out for you, please mark it as answer.

http://stackoverflow.com/a/29297375
type: Answer
upvote count: 23
has comment: http://stackoverflow.com/comment/100126694
has comment: http://stackoverflow.com/comment/100146766
score: 23
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/138721059
accepted answer of: http://stackoverflow.com/q/29297257
downvote count: 0
answers question: http://stackoverflow.com/q/29297257
has body: JavaScript will use the client's local time but it also has UTC / GMT methods. The following is from Mozilla: The JavaScript Date object supports a number of UTC (universal) methods, as well as local time methods. UTC, also known as Greenwich Mean Time (GMT), refers to the time as set by the World Time Standard. The local time is the time known to the computer where JavaScript is executed. While methods are available to access date and time in both UTC and the localtime zone, the date and time are stored in the local time zone: Note: It's important to keep in mind that the date and time is stored in the local time zone, and that the basic methods to fetch the date and time or its components all work in the local time zone as well. Reference: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date

http://stackoverflow.com/q/29275488
type: Question
has title: ExpressJS : Strange String Comparation
has body: I'm doing this: res.jsonp({ userId: user._id, spotUserId: spot.user._id, condition: (user._id === spot.user._id) }); And the result is this: { "userId": "551192836bff030fb657777c", "spotUserId": "551192836bff030fb657777c", "condition": false } I don't understand why the condition is false... Help me!
tagged with: node.js
has comment: http://stackoverflow.com/comment/46751920
upvote count: 1
answer count: 1
has answer: http://stackoverflow.com/a/29275670
has comment: http://stackoverflow.com/comment/46750190
type: AnsweredQuestion
downvote count: 0
tagged with: mongoose
tagged with: javascript
score: 1
tagged with: string
tagged with: express
favorite count: 0
accepted answer: http://stackoverflow.com/a/29275670

http://stackoverflow.com/a/29231132
answers question: http://stackoverflow.com/q/29230917
score: 0
has body: Try below code: var id = 10; // this is the id (from externel function) var value = id.toString(); // (i try to cast the id as string) console.log(value); $("input[name="+value+"]").on('change', function() { // use the casted value to name my input. alert($("input[name="+value+"]:checked", "#myForm").val()); }); Demo Link
type: Answer
has comment: http://stackoverflow.com/comment/46668781

http://stackoverflow.com/comment/48109342
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29370987
has text: Thank you for your input - sorry it took so long to reply! However, this was not the right path. :( I'm updating my original question now, as I've tried quite a few more things and kind of figured out the right direction but still not the implementation as of yet.
type: Comment

http://stackoverflow.com/comment/46669191
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29231317
type: AnswerComment
has text: Edited my answer. Take a look.

http://stackoverflow.com/a/72132715
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/29312504
has body: I was able to solve this problem using just CSS. .css{ text-overflow: ellipsis; white-space: nowrap; overflow: hidden; } This is a really long bit of text that is too large to display on-screen, but should be fully intact when copy/pasted. The class 'css' uses: -text-overflow, to place the ellipsis after the text, -overflow, to prevent the text from fully showing, -white-space, to prevent text from having multiple lines, -and the div has max-width, to define where to replace text with ellipsis. This makes it so that all elements with class 'css' will have their text replaced with ellipsis once it exceeds the max-width limit.
downvote count: 0
type: Answer

http://stackoverflow.com/comment/46826459
comment on: http://stackoverflow.com/a/29317147
type: AnswerComment
score: 0
type: Comment
has text: I tried your code but I still get the error alert, is it caused by the condition from the AJAX?

http://stackoverflow.com/comment/46718524
comment on: http://stackoverflow.com/q/29258054
type: Comment
has text: you have to use `post` or `get` method for that.
score: 0
type: QuestionComment

http://stackoverflow.com/comment/46857050
type: Comment
comment on: http://stackoverflow.com/a/29334034
type: AnswerComment
has text: Hi André, that's a good point I didn't saw so far! I think this aspect does really detroy the security of the captcha if you really expect someone to analyse your form and code. But sometime the captcha is more meant as a "hint" to spamers which says: "Don't try - I am prepared" ;-)
score: 0

http://stackoverflow.com/q/29339580
has title: setting and getting session variables using javascript ajax and php
score: 0
answer count: 1
tagged with: javascript
tagged with: variables
tagged with: ajax
tagged with: php
type: UnansweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/46866888
has answer: http://stackoverflow.com/a/29339682
tagged with: session
has body: I am trying to set and retrieve session variables. For each I have javascript code that runs ajax to call php functions. In my javascript code I want to use the returned session field. Nothing works. Can someone look at my code and tell me what I did wrong. Thanx MY Ajax code to set the session variable is: {$.ajax({ type: "POST", url: "setsessionvar.php", data: option, success: function(){ alert("success") } }); Its PHP function is: function setvar($option) { session_start(); $_SESSION["temp"]=$option; } MY Ajax code to retrieve the session variable is: {$.ajax({ type: "POST", url: "getsessionvar.php", data: option, success: function(option){ } }); It's PHP function is: function getsessionvar() { return .$_SESSION['option']; } I made the changes to the php code, however nothing is still working. I have an alert in the success sections of the ajax. Neither alert executes. I am also not sure I am accessing the session variable value in the ajax code. I am including the entire code of my page this time. The set ajax is in the function called foo. The get ajax is in the routine called startup. &lt;!DOCTYPE HTML&gt; &lt;html&gt;&lt;!-- InstanceBegin template="/Templates/Ricks Universe.dwt" codeOutsideHTMLIsLocked="false" --&gt; &lt;head&gt; &lt;!-- InstanceBeginEditable name="doctitle" --&gt; &lt;title&gt;Fun and Games&lt;/title&gt; &lt;!-- InstanceEndEditable --&gt; &lt;meta charset="utf-8"&gt; &lt;meta name="viewport" content="width=device-width initial-scale 1.0 minimum-scale 1.0" /&gt; &lt;link rel="stylesheet" href="ricks.css" type="text/css" media="screen" title="Ricks Style Sheet"/&gt; &lt;link rel="stylesheet" href="hh.css" type="text/css" media="handheld"/&gt; &lt;link rel="stylesheet" media="print" type="text/css" href="print.css" /&gt; &lt;!-- InstanceBeginEditable name="head" --&gt; &lt;style type="text/css"&gt; #Games{display:inline;} #Humor{display:none;} &lt;/style&gt; &lt;script type="text/javascript"&gt; function foo(option) { var n = option.search(".HT…

knockout-components
type: Tag
tags question: http://stackoverflow.com/q/29329988
tags question: http://stackoverflow.com/q/29318382
tag name: knockout-components

http://stackoverflow.com/a/29256770
answers question: http://stackoverflow.com/q/29255113
has body: Try this example JS function checkTable() { var rowElem; $('#my-table tr').each(function(idx, elem) { rowElem = $(elem); if(rowElem.find('input').is(':checked')) { console.log('row ' + (idx + 1) + ' is checked'); console.log('data1 is: ' + rowElem.find('.data1').html()); console.log('data2 is: ' + rowElem.find('.data2').html()); } }); } HTML Row1 Data1 Row1 Data2 Row2 Data1 Row2 Data2 Row3 Data1 Row3 Data2 Check table Plunker demo
score: 0
type: Answer

http://stackoverflow.com/q/29336340
tagged with: angularjs
has answer: http://stackoverflow.com/a/29338275
has comment: http://stackoverflow.com/comment/46861761
type: AnsweredQuestion
score: 2
upvote count: 2
has body: I noticed that the dialog for Angular can do custom dialog by loading an html file (or whatever file in html format) like this: $mdDialog.show({ controller: DialogController, templateUrl: tempUrl, }); My question would be, can we instead of loading the tempUrl, make the tempUrl a template where we can dynamically load content into? I have tried to add ng-control in my tempUrl like this: And then use {{scope.property}} to manipulate the content but failed. What would be the correct approach for this? P.S. I think this might have to do with the fact that the dynamic content I generated was done asynchronously. Here is my code: $scope.showCardDes = function(card) { var tempUrl = card.link; tempUrl = tempUrl.replace('sometext','othertext'); tempUrl = tempUrl + '.json?api_key=xxx'; $log.debug(tempUrl); $.ajax({ url: tempUrl, crossDomain: true, dataType: "json", success: function(data) { $log.debug(data); $scope.description = data.results[0].description; }, error: function(status) { $log.debug(status); } }); $mdDialog.show({ controller: DialogController, templateUrl: 'detail.html', }); }; $scope.test = 'test'; For those who want to see the code with $http: $http({ url: tempUrl, method: 'GET', }).success(function(data) { $log.debug(data); detail = data; $scope.description = data.results[0].description; }). error(function(status) { $log.debug(status); }); $mdDialog.show({ controller: DialogController, templateUrl: 'detail.html', }); $scope.test = 'test'; And here is what I set up in my dialog html: {{description}} {{test}} Go Back Apparently the 'test' shows up fine by the 'description' does not because the latter involves an aync process. BTW, if I console.log(scope.description) it will actually show the correct content - I assume that the dialog just loaded before the description was loaded...perhaps it was even loaded when the page was loaded. I tried using .then() on $http and it still doesn't work.
has comment: http://stackoverflow.com/comment/46861151
type: Question
tagged with: angularjs-directive
accepted answer: http://stackoverflow.com/a/29338275
tagged with: javascript
tagged with: angularjs-scope
has title: Can we load dynamic Angular dialog?
answer count: 1
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/46861110

http://stackoverflow.com/q/29247162
favorite count: 0
has comment: http://stackoverflow.com/comment/46702253
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46699721
has comment: http://stackoverflow.com/comment/46699583
type: Question
has comment: http://stackoverflow.com/comment/46707629
tagged with: asp-classic
has comment: http://stackoverflow.com/comment/46699842
linked to: http://stackoverflow.com/q/3037725
tagged with: javascript
has body: I have a project in which I have to set shipping address for online shopping. For paying, payment option are various credit cards for example: paypal, visa etc. so payment option is a drop down menu. I have two labels namely "creditcard no" and "ccv". these should be hidden initially. Once payment option (from dropdown) is chosen, those two labels should appear. $(document).ready(function() { $('.nav-toggle').click(function() { //get collapse content selector var collapse_content_selector = $(this).attr('href'); //make the collapse content to be shown or hide var toggle_switch = $(this); $(collapse_content_selector).toggle(function() { if ($(this).css('display') == 'none') { //change the button label to be 'Show' toggle_switch.html('Show'); } else { //change the button label to be 'Hide' toggle_switch.html('Hide'); } }); }); }); .round-border { border: 1px solid #eee; border: 1px solid rgba(0, 0, 0, 0.05); -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; padding: 10px; margin-bottom: 5px; } &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt; &lt;body&gt; &lt;section class="round-border"&gt; &lt;div&gt; &lt;button href="#collapse1" class="nav-toggle"&gt;credit card&lt;/button&gt; &lt;/div&gt; &lt;div id="collapse1" style="display:none"&gt; &lt;label&gt; Payment Option &lt;select name="credit"&gt; &lt;option value="paypal"&gt;Paypal&lt;/option&gt; &lt;option value="Visa"&gt;Visa&lt;/option&gt; &lt;option value="Visa"&gt;Master Card&lt;/option&gt; &lt;option value="Discover"&gt;Discover&lt;/option&gt; &lt;option value="American Express"&gt;American Express&lt;/option&gt; &lt;option value="Alipay"&gt;Alipay&lt;/option&gt; &lt;/select&gt; &lt;/label&gt; &lt;br&gt;Card Number: &lt;input type="text" size="24" maxlength="20" name="cc_number" onBlur=" cc_number_saved = this.value; this.value = this.value.replace(/[^\d]/g, ''); if(!checkLuhn(this.value)) { alert('Sorry, this is not a valid number - Pleas…
has comment: http://stackoverflow.com/comment/46722477
upvote count: 4
score: 0
has comment: http://stackoverflow.com/comment/46699643
downvote count: 4
has comment: http://stackoverflow.com/comment/46699485
linked to: http://stackoverflow.com/q/436411
has title: How to hide and show label control JavaScript?
has answer: http://stackoverflow.com/a/29247655
answer count: 1

http://stackoverflow.com/q/29357856
has comment: http://stackoverflow.com/comment/46900521
has title: Open CSS Menu OnLoad
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46900284
upvote count: 0
has answer: http://stackoverflow.com/a/29358061
tagged with: javascript
favorite count: 0
type: Question
tagged with: css
tagged with: menu
score: -1
has body: This is my website: http://tinyurl.com/n9vous5 I need a way to have the "Products" tab open when the page loads. Thanks for the help! :-D
has comment: http://stackoverflow.com/comment/46941339
answer count: 1
downvote count: 1
tagged with: onload

http://stackoverflow.com/q/29310565
has title: Taking values from HTML form fails
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29317436
upvote count: 1
downvote count: 1
type: Question
tagged with: firebase
has comment: http://stackoverflow.com/comment/46818211
has comment: http://stackoverflow.com/comment/46826371
tagged with: forms
accepted answer: http://stackoverflow.com/a/29317436
answer count: 2
has comment: http://stackoverflow.com/comment/46887237
tagged with: javascript
favorite count: 0
score: 0
has comment: http://stackoverflow.com/comment/46823600
possible better answer: http://stackoverflow.com/a/29310853
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29310853
has body: I want to use a JavaScript function to save values from an html form to a Firebase database. The following code works (not using a form): Following code, using a form, doesn't work What is wrong? Added to question: changed code using onFormSubmitted

http://stackoverflow.com/comment/46926057
score: 0
comment on: http://stackoverflow.com/q/29362556
type: Comment
type: QuestionComment
has text: *"So, unbelievably, the angular.directive('snapDrawer') is matching to "ng-attr-snap-drawer". How can this be, I am really shocked that AngularJS, in all its glory, has a bug like this."* Is that not exactly what the [documentation says it should do](https://docs.angularjs.org/guide/directive#-ngattr-attribute-bindings)? (though i'm having problems finding version-relevant documentation of the same)

http://stackoverflow.com/q/29248666
tagged with: jquery
favorite count: 0
has title: Chosen dropdown : make search_contains true for all dropdown at once
has comment: http://stackoverflow.com/comment/46702532
answer count: 3
score: 1
has body: WHile initialisation of three dropdowns i have used this script $(document).ready(function() { $('#drp_menu').chosen({ search_contains: true }); $('#drp_menu2').chosen({ search_contains: true }); $('#drp_menu3').chosen({ search_contains: true }); }); Now, the practical problem is that, in a script I have already initialised 50 dropdowns but didn't made the search_contains: true. Now I have to re-edit the code to make it enabled. Is there any way if i can do this in a single code withot editing the code for 50 drop-downs? May be something in the chosen-library itself. But i would prefer not to tamper the chosen library. Thanks here's a fiddle http://jsfiddle.net/jHvmg/288/
has answer: http://stackoverflow.com/a/41681273
upvote count: 2
type: UnansweredQuestion
downvote count: 1
has answer: http://stackoverflow.com/a/29248786
has answer: http://stackoverflow.com/a/29248717
has comment: http://stackoverflow.com/comment/46702024
tagged with: jquery-chosen
type: Question
tagged with: javascript
tagged with: drop-down-menu

http://stackoverflow.com/a/29284330
upvote count: 2
score: 2
has body: You can add a style element, with the required CSS, on the fly to the document body. See this JSFiddle If references bootstrap.css and, on load, overrides .btn-primary: $(function(){ $("&lt;style&gt;") .text(".btn-primary{ background-color: cyan !important; min-height:20px; }") .appendTo($("body")); }); You could use a similar approach I think?
answers question: http://stackoverflow.com/q/29284054
downvote count: 0
type: Answer

http://stackoverflow.com/comment/46815884
type: Comment
comment on: http://stackoverflow.com/a/29311098
type: AnswerComment
has text: Thanks it worked. I'll make your answer as correct when SO lets me.
score: 0

http://stackoverflow.com/comment/46903446
type: AnswerComment
comment on: http://stackoverflow.com/a/29359440
type: Comment
has text: About to have a lot more fun ;-)
score: 0

http://stackoverflow.com/comment/46721534
type: AnswerComment
score: 0
type: Comment
has text: What happens when you try to run a query then? You must be getting some kind of error message?
comment on: http://stackoverflow.com/a/29259294

http://stackoverflow.com/comment/46855734
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29310298
score: 0
has text: As far as I know [`call` does take the operation context as the first argument](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/call), the only difference being in the rest of the arguments. But, anyways, I tried to edit it using `apply`, but I get the same error. In all fairness, I tried to entirely remove that line, and I still get the same problem: it seems that editing the `prototype` of `XMLHttpRequests` does that.

http://stackoverflow.com/q/29317726
score: 1
accepted answer: http://stackoverflow.com/a/29318138
has title: Getting html of
has body: I am using the following function to try and get the html of a element by referencing it from the row above (I feel I have to do this for a certain reason that I won't go into). function test() { var rowAmount = $("#orderTable &gt; tbody &gt; tr").length; for(i = 0; i &lt; rowAmount; i++) { $( "#orderTable &gt; tbody &gt; tr :eq(i)" ).setAttribute( "id", "row" + (i + 1) ); } alert($( "tr#row1" ).next().find( "td.qty" ).html()); } I am using the for loop to set the id of the rows I have, the ones I wish to reference from. I will be inserting new rows depending on the value within these. The error I am getting is this line, $( "#orderTable &gt; tbody &gt; tr :eq(i)" ).setAttribute( "id", "row" + (i + 1) ); is returning an error, undefined is not a function. Does anyone know why? Thanks in advance. Mike.
type: Question
has answer: http://stackoverflow.com/a/29317748
tagged with: javascript
has answer: http://stackoverflow.com/a/29318138
possible better answer: http://stackoverflow.com/a/29317748
answer count: 3
upvote count: 1
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29318044
downvote count: 0

http://stackoverflow.com/a/29352839
score: 1
answers question: http://stackoverflow.com/q/29352652
has body: Your service function is doing $http using .then which is nothing but resolving using chain promise you should get explicit data from object you service will return response.data instead of response GetSuperCategories: function () { return $http(req).then( function(response) { var data = response.data; if (typeof data === 'object') { return data ; } else { alert ('wrong'); } }, function(response) { alert ('again worng'); // something went wrong //return $q.reject(response.data); }); } };
has comment: http://stackoverflow.com/comment/46891768
has comment: http://stackoverflow.com/comment/46891482
has comment: http://stackoverflow.com/comment/46896651
has comment: http://stackoverflow.com/comment/46891065
downvote count: 0
has comment: http://stackoverflow.com/comment/46891847
type: Answer
has comment: http://stackoverflow.com/comment/46891595
has comment: http://stackoverflow.com/comment/46892066
has comment: http://stackoverflow.com/comment/46891938
upvote count: 1
has comment: http://stackoverflow.com/comment/46891708

http://stackoverflow.com/a/29227368
upvote count: 3
type: Answer
downvote count: 0
answers question: http://stackoverflow.com/q/29227104
has comment: http://stackoverflow.com/comment/46662015
score: 3
has body: You're overwriting scope.content with a new variable. This won't be updated. Try scope.content.push('something') instead or something else that maintains the object reference of scope.content.

http://stackoverflow.com/comment/46687928
score: 0
type: Comment
comment on: http://stackoverflow.com/q/29240452
type: QuestionComment
has text: if `json` is a string, jquery will send it as such, if it is an object, jquery will send them as POST params and not JSON. Unfortunately that is further complicated by people calling objects json.

http://stackoverflow.com/comment/46767681
type: Comment
has text: Ok, so we can establish that I need some kind of Javascript or variant. The code I tried (unsuccessfully) for the link that should perform the action in question is the following (the quoted string is being echoed with PHP): `"".$name.""` 'buss' is the id of the textbox where I want the name to appear when the link is clicked. $name is the variable containing the name of the business that was predicted. EDIT: If this needs to be a separate question, let me know!
score: 0
comment on: http://stackoverflow.com/q/29280686
type: QuestionComment

http://stackoverflow.com/q/29319127
has comment: http://stackoverflow.com/comment/46830161
tagged with: php
type: AnsweredQuestion
has title: adding textInput values to another text input using js function in Yii 2
type: Question
tagged with: yii2
has body: Simply I'm trying to add value of text Input fields to another as : http://jsfiddle.net/MaK2k/1/ my form code : &lt;?php $script = &lt;&lt;&lt; JS $('#amount_value_id').keyup(function(){ var amountSum=0; $('#amount_value_id').each(function(){ if (this.value != "") amountSum+=parseInt(this.value); }); // alert('foo'); $("#totalamount").text(amountSum); //console.log(amountSum); }); JS; $this-&gt;registerJs($script); ?&gt; &lt;?php $form = ActiveForm::begin(["id" =&gt; "project-form"]); ?&gt; &lt;?php foreach ($project as $i =&gt; $project) { ?&gt; &lt;div class="col-lg-2 col-md-3" id="amount_value_id"&gt; &lt;?= $form-&gt;field($project, "[{$i}]amount")-&gt;textInput(); ?&gt; &lt;/div&gt; &lt;?php } ?&gt; &lt;div class="col-lg-2" id="totalamount"&gt; &lt;?php echo $form-&gt;field($model, 'total_amount')-&gt;textInput(['maxlength' =&gt; 128, 'id' =&gt; 'totalamount']) ?&gt; &lt;/div&gt; In the text Input for total amount that should holds the total sum is giving NaN !! .What I'm doing ??
tagged with: yii
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/29319224
accepted answer: http://stackoverflow.com/a/29319224
answer count: 1
tagged with: jquery

http://stackoverflow.com/comment/46883542
has text: if( document.getElementsByTagName("select").value=="lol") did not work?
comment on: http://stackoverflow.com/q/29348956
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/q/29291286
has answer: http://stackoverflow.com/a/29301078
accepted answer: http://stackoverflow.com/a/29301078
tagged with: ios
tagged with: javascript
score: 12
has body: Can an iOS app (built entirely with React Native) be built/run from the command line? PhoneGap has a nice ios-sim utility for doing just that, but I haven't had any luck with it.
tagged with: xcode
has title: Run a React Native app without launching Xcode?
favorite count: 0
upvote count: 12
tagged with: cordova
type: AnsweredQuestion
tagged with: react-native
downvote count: 0
has answer: http://stackoverflow.com/a/36294590
type: Question
possible better answer: http://stackoverflow.com/a/36294590
answer count: 2

http://stackoverflow.com/comment/46823606
comment on: http://stackoverflow.com/q/29315417
type: QuestionComment
has text: Something like this? http://plnkr.co/edit/jOKsJrM1oYcjl07UgC7W?p=preview
type: Comment
score: 2

http://stackoverflow.com/a/29283366
downvote count: 0
answers question: http://stackoverflow.com/q/29282485
score: 1
upvote count: 1
type: Answer
has body: After playing with Huangism's idea a bit I came to the following solution: images[i] = new Image(); images[i].src = $('#image'+i).css('background-image').replace(/"/g,"").replace(/url\(|\)$/ig, ""); images[i].pos = i; images[i].onload = function() { var position = this.pos; width = this.width; height = this.height; var divwidth = $('#image'+position).width(); var divheight = $('#image'+position).height(); var ratioH = divheight / height; var ratioW = divwidth / width; var scaleW = width * ratioH; var scaleH = height * ratioW; console.log("For image "+position+" the height is "+height+" and width "+ width +" and ratioH "+ratioH + " and ratioW " + ratioW +" (Scaled width: "+scaleW+")" ); if(scaleW &lt; 120 || scaleH &lt; 100){ $('#image'+position).css('background-color', 'red'); } } This code compares the image used as a background image's height and width with the dimensions of the div he is contained in. Based on this I calculate the scaling ratio between the original height and width and the maximum height and width within the div. This ratio is then multiplied with the opposing dimension (height * width ration, width * height ratio) to calculate the dimensions of the rendered image. Comparing the values in the console to measurements in Photoshops shows they are a perfect match! I hope this answer can help other users that want to know the dimensions of a rendered background image.

jquery-events
tags question: http://stackoverflow.com/q/29291136
tag name: jquery-events
tags question: http://stackoverflow.com/q/29253183
tags question: http://stackoverflow.com/q/29246269
tags question: http://stackoverflow.com/q/29359031
type: Tag
tags question: http://stackoverflow.com/q/29272420
tags question: http://stackoverflow.com/q/29279805

http://stackoverflow.com/q/29340491
duplicate of: http://stackoverflow.com/q/17206631
tagged with: javascript
has answer: http://stackoverflow.com/a/29340695
linked to: http://stackoverflow.com/q/17206631
score: 0
answer count: 2
tagged with: highcharts
tagged with: jquery
accepted answer: http://stackoverflow.com/a/29340813
has title: Highcharts 's width is not correctly rendered at a hidden div
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29340813
possible better answer: http://stackoverflow.com/a/29340695
tagged with: css
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46870213
has comment: http://stackoverflow.com/comment/46868489
linked to: http://stackoverflow.com/q/16436666
has body: What I have done are something like : I have plenty of plots(say 30) that needed to be showing. I separate these 30 plots into several groups(say 3). When the page loads. the plots are all loading from the ajax requests, while only one group will be shown(depending on the button user click) Now, the problem is, every plot is wrapped by a div which has a min-width,and at the first time I load the page, 20 of them are hidden. When user click a button to show another groups of plot , the widths are not correctly set. I write a very quick demo to show my problem here: http://jsfiddle.net/k5adky9d/4/ plot subject $(function () { //$('#wrapper').hide();//I can also use hide() here if the originally 'display' is not set to none $('#btn').on('click',function(){ $('#wrapper').show();//after show, the plot'width is not adjust to what it should be, it only adjust the the min-width(300px) }); $('#container').highcharts({...}) })
type: Question

http://stackoverflow.com/q/29242269
has answer: http://stackoverflow.com/a/29242388
downvote count: 1
possible better answer: http://stackoverflow.com/a/29242364
type: Question
has title: addEventListener function is being executed when listener is declared
accepted answer: http://stackoverflow.com/a/29242333
linked to: http://stackoverflow.com/q/27509931
tagged with: javascript
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29242378
favorite count: 0
upvote count: 2
has answer: http://stackoverflow.com/a/29242333
duplicate of: http://stackoverflow.com/q/27509931
has body: I have this javascript code function change (elem){ if (x==1) elem.innerHTML = "1"; else elem.innerHTML = "not 1"; } var test = document.getElementById ("abc"); var x=1; test.addEventListener ("click", change(test)); and the html looks like this a div How do I prevent the function from being executed until the div element is clicked? Right now it just changes the innerHTML by itself and I want it to wait for the click listener.
answer count: 4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29242364
score: 1

http://stackoverflow.com/q/29259104
type: UnansweredQuestion
has body: I tried https://github.com/chariotsolutions/phonegap-nfc to read NFC tag under WP8 (VS 2013) on Nokia 735 but I failed. Problem occures when nfc\platforms\wp8\Plugins\com.chariotsolutions.nfc.plugin\NfcPlugin.cs try to communicateafter tapping nfc with javasript function fireNfcTagEvent() through: ScriptCallback script = new ScriptCallback("fireNfcTagEvent", new string[] { "ndef", JsonHelper.Serialize(tag) }); this.InvokeCustomScript(script, false); I added alert("1") at the beginning of function fireNfcTagEvent() but it never pop ups... how can I fix it? how can I communicate with JS properly? Moreover during building process there is (possibly not crutial) a warning: Plugins\com.chariotsolutions.nfc.plugin\NfcPlugin.cs(184,12): warning CS0612: 'WPCordovaClassLib.Cordova.Commands.BaseCommand.InvokeCustomScript(WPCordovaClassLib.Cordova.ScriptCallback, bool)' is obsolete [C:\Users\xxx\Documents\xxx\nfc\platforms\wp8\Nfc.csproj] My question of course is about properly executing fireNfcTagEvent; not about warning during building process. I'm looking for any help.
upvote count: 1
answer count: 0
score: 1
tagged with: windows-phone-8
tagged with: ndef
linked to: http://stackoverflow.com/q/10359117
type: Question
tagged with: c#
tagged with: javascript
has title: Communicate cs->js wp8 InvokeCustomScript chariotsolutions
downvote count: 0
favorite count: 0
tagged with: nfc

youtube-javascript-api
type: Tag
tags question: http://stackoverflow.com/q/29242332
tag name: youtube-javascript-api
tags question: http://stackoverflow.com/q/29261897

http://stackoverflow.com/comment/46904608
comment on: http://stackoverflow.com/q/29275496
has text: It was. I'm building a widget in iAd Producer to embed in an ebook via iBooks Author. Having the book open on the iPad doesn't change anything in the Develop menu in Safari. It still shows No Inspectable Applications even with the widget running in the page. I guess that as it's not a typical app, typical debugging methods won't apply. I think this might have to remain unanswered...
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46867936
score: 0
type: AnswerComment
has text: It's an huge code than call many functions, i can't post all. I just wanted to know if there was any particular function that could create problems of interaction with jQuery.data
type: Comment
comment on: http://stackoverflow.com/a/29339398

http://stackoverflow.com/comment/46658985
type: QuestionComment
has text: Sorry, I forgot to add this in the OP but the specifications specifically say that markTheSquare does not have any formal parameters.
comment on: http://stackoverflow.com/q/29225466
score: 0
type: Comment

http://stackoverflow.com/q/29246234
score: 0
tagged with: meteor
has body: I started writing a Meteor app today, for an eCommerce site. This is some code in my basic.js file. Router.route("/shop", function () { this.layout("shop"); this.render("catalog"); }); When /shop is rendered, some code inside of shop.js is executed: Template.shop.rendered = function () { if ($("figure").hasClass("selected")) { var productSelected = $("figure.selected"), productPrice = productSelected.data("price"), productTitle = productSelected.data("product"), productLocation = productSelected.find("a").attr("href"); $(".product-title").html(productTitle); $(".product-cost").html(productPrice); $(".content__info__title--overview").find("a").attr("href", productLocation); } // Slideshow var galleryItems = $(".content").children("section"); galleryItems.each(function () { var container = $(this); // Update slider when user clicks on the preview images container.on("click", ".move-down, .move-up", function (event) { event.preventDefault(); if ($(this).hasClass("move-down")) { nextSlide(container); } else { prevSlide(container); } if ($(this).hasClass("selected")) { var productPrice = $(this).data("price"), productTitle = $(this).data("product"); $(".product-title").html(productTitle); $(".product-cost").html(productPrice); } }); }); // Next Slide function nextSlide(container, n) { var visibleSlide = container.find("figure.selected"); if (typeof n === "undefined") { n = visibleSlide.index() + 1; } $("figure.selected").removeClass("selected"); $(".content__products figure").eq(n).addClass("selected").removeClass("move-down").prevAll().removeClass("move-down move-up").addClass("hide-up").end().prev().removeClass("hide-up").addClass("move-up").end().next().addClass("move-down"); } // Previous Slide function prevSlide(container, n) { var visibleSlide = container.find("figure.selected"); if (typeof n === "undefined") { n = visibleSlide.index() - 1; } $("figure.selected").removeClass("selected"); $(".content__products figure").eq(n).addClass("selected").removeClass("move-up…
has answer: http://stackoverflow.com/a/29246755
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29246743
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/46698692
has title: Reinitializing code in Meteor
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/29246755
possible better answer: http://stackoverflow.com/a/29246743
has comment: http://stackoverflow.com/comment/46698578

http://stackoverflow.com/comment/46865530
score: 0
has text: This is how my `HTML` rendering -http://pastebin.com/S7HS2s8x
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29338953

http://stackoverflow.com/comment/46727857
comment on: http://stackoverflow.com/q/29262086
score: 0
type: Comment
type: QuestionComment
has text: I used this one here http://www.geocodezip.com/v3_MW_example_map3_radiusSearch.html

http://stackoverflow.com/comment/46774911
type: Comment
type: QuestionComment
score: 1
has text: What's your goal here? Do you truly want to save the partial form or do you just want to allow the user to continue from where they left off later? If you don't literally need the info on your end until the user is ready to submit it, then local storage is better option.
comment on: http://stackoverflow.com/q/29287759

http://stackoverflow.com/comment/46810559
type: AnswerComment
has text: It's just basic JavaScript. When you want to programatically drive a key, you generally use the `myObject[myKey] = myValue syntax`. Only when your keys are defined in code can you use `myObject.myKey = myValue` syntax or `myObject = {myKey: myValue}` syntax.
type: Comment
comment on: http://stackoverflow.com/a/29289968
score: 1

http://stackoverflow.com/a/29346179
score: 0
answers question: http://stackoverflow.com/q/29345761
type: Answer
has body: Look at this answer. - https://stackoverflow.com/a/16006607/2277126 Here you have list of key codes key codes Good luck!

http://stackoverflow.com/a/29364598
type: Answer
answers question: http://stackoverflow.com/q/29364432
upvote count: 1
score: 1
has body: The documentation for loadData() says Note that JavaScript's same origin policy means that script running in a page loaded using this method will be unable to access content loaded using any scheme other than 'data', including 'http(s)'. To avoid this restriction, use loadDataWithBaseURL() with an appropriate base URL. Now you do use loadDataWithBaseURL(), but your base URL is x-data://base yet you try to load a script from http(s)://vmss.boldchat.com. I think that can cause your problem.
downvote count: 0

http://stackoverflow.com/a/29258834
answers question: http://stackoverflow.com/q/29258672
score: 0
type: Answer
has body: The first one is immediately invoked function, the second one is invalid JS, because when the parser encounters the function keyword, it find it as a function declaration, but not as a function expression. For immediately invoked function best way is (function(){ ... }()); or (function(){ ... })(); But you can also prefixing the function with a unary operator, it will be save a byte !function(){ ... }(); ~function(){ ... }(); -function(){ ... }(); +function(){ ... }();

http://stackoverflow.com/q/29259980
linked to: http://stackoverflow.com/q/7782266
type: Question
has comment: http://stackoverflow.com/comment/46722286
has comment: http://stackoverflow.com/comment/46722264
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29262212
has comment: http://stackoverflow.com/comment/46722343
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46722195
has comment: http://stackoverflow.com/comment/46722462
has comment: http://stackoverflow.com/comment/46722251
upvote count: 1
has body: I'm making a simple game in JQUERY and I want to know how to make a simple 4 way movement (up, down, left, right) with JQUERY I have this: html &lt;div id="dot"&gt;&lt;/dot&gt; &lt;!-- the character --&gt; jquery $(document).keydown(function(e) { if(e.which == 37) { } else if (e.which == 38){ } else if (e.which == 39){ } else if (e.which == 40){ } }); EDIT: The movement is to simulate the "Worlds hardest game" which you can find here: http://www.el-juego-mas-dificil-del-mundo.com/. I need it to be soft (I don't know how to explain it xD)
score: 1
has title: Simulate 4 way movement with jQuery

http://stackoverflow.com/comment/46835690
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29322171
has text: @adeneo to center the map on a latitude and longitude

http://stackoverflow.com/a/29711579
accepted answer of: http://stackoverflow.com/q/29242172
upvote count: 1
answers question: http://stackoverflow.com/q/29242172
score: 1
has body: To track a form submission, you might want to look at Event Tracking. If you are using jQuery, you might have something similar to: &lt;form action="thank-you.html" method="POST"&gt; &lt;!-- Some inputs --&gt; &lt;!-- ... --&gt; &lt;input type="submit" value="Send" /&gt; &lt;/form&gt; Then you could track Form interactions using: (function ($) { $('form').on('submit', function (event) { // Temporarily prevent submission of the form: event.preventDefault(); // Keep a reference to the form: var form = $(this); ga('send', 'event', { 'eventCategory': 'Form', // Event Category (Required). 'eventAction': 'Submit', // Event Action (Required). 'eventLabel': 'Form Title', // Event Label (Optional). 'hitCallback': function () { // Once the Event has been sent to Google Analytics, submit the form: form.submit(); } }); }); })(jQuery) You could then use this Event as Goals in Google Analytics to get specific insights about Form submissions: https://support.google.com/analytics/answer/1012040?hl=en
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/q/29340190
type: Question
accepted answer: http://stackoverflow.com/a/29342123
answer count: 1
tagged with: javascript
has body: I've got a problem confused me on the tick line, inspired from Zoomable Area created by mbostock. I'm using the Chrome V41 as the rendering browser. When zooming page to be less than 110%, some y-axis tick lines are missed. Is that the browser's problem? Can anyone tell me why and how to fix it? Thanks.
score: 0
has title: D3.js: miss tick lines when zooming the svg
tagged with: http://stackoverflow.com/tag/svg
has answer: http://stackoverflow.com/a/29342123
tagged with: d3.js
linked to: http://stackoverflow.com/q/29342670
type: AnsweredQuestion

http://stackoverflow.com/q/29338175
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/46864435
has answer: http://stackoverflow.com/a/29338288
answer count: 4
favorite count: 0
has title: Determining factorial of a number
upvote count: 1
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29338288
has comment: http://stackoverflow.com/comment/46864396
score: 1
has answer: http://stackoverflow.com/a/29338316
possible better answer: http://stackoverflow.com/a/29338200
type: Question
has answer: http://stackoverflow.com/a/29338200
has body: I'm new to javascript and I'm having a hard time figuring out how to get this factorial function to work. Here's my code now. var x = prompt("Enter a number"); { function fact(x) { if (x &lt; 0) { return ("Enter a positive integer"); } else { return (x * fact(x-1)) } } } var result = fact(x) document.write("The factorial of" + x + "is" + result); Thanks for the help!
has answer: http://stackoverflow.com/a/29338405

http://stackoverflow.com/a/29294940
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/29294405
has body: Using Callback functions, you can achieve this easily. function NextData() { var lQIndex = $('#hfLastQIndex').val(); SaveData(lQIndex,function(result){ //rest code---- //result will be either true/false }); } function SaveData(QNo, successCallback) { var flag = false; $.ajax({ url: '/Assessment/Save', type: 'POST', data: {A:QNo}, async: false, success: function (data) { //alert("Test: " + data.result); if (data.result == "T") flag = true; successCallback(flag); }, error: function (req, status, error) { //alert("R: " + req + " S: " + status + " E: " + error); alert('Unable to connect server!'); flag = false; successCallback(flag); } }); return flag; } http://gireeshsb.blogspot.in/2013/08/callback-functions-in-javascript.html http://issacjk.blogspot.in/2014/08/callback-functions-in-javascript.html
downvote count: 0
type: Answer

http://stackoverflow.com/q/29368694
has body: I want to create a slider with stripes effect like in the image below: How do they "cut" the image in a number of stripes? I would like "cut" my image in custom shape stripes (not the default rectangular ones like in the example, but curved in a custom manner). Link to the actual example slider: http://www.jssor.com/demos/x-stripe.html I just need the conceptual explanation, the starting point, I don't expect or want the actual code. I searched on the internet but the tutorials only reffer to simple effects as sliding or fading which I know how to implement
upvote count: 1
tagged with: css
downvote count: 1
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29369075
type: Question
has title: Create a slider with stripes effect
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
score: 0
has answer: http://stackoverflow.com/a/29369075

http://stackoverflow.com/a/29372265
has body: A disabled button wont be able to catch the JS events like hover, mouseover etc. If you want to change your disabled button color, you can directly do it using CSS. You can do something like: &lt;style&gt; input.button:disabled{ background: #000; color: #FFF; cursor: default;} &lt;/style&gt; &lt;input type="button" class="button" value="Button" disabled&gt; If the background color is not picked you can add an !important with the CSS rule.
answers question: http://stackoverflow.com/q/29371232
score: 0
type: Answer

http://stackoverflow.com/q/29368015
tagged with: jslint
tagged with: javascript
has comment: http://stackoverflow.com/comment/46918710
has answer: http://stackoverflow.com/a/29368367
score: 0
has body: I know that I can type into Chrome or FF the following command: Object.keys(window); but this displays DHTMLX stuff and also function names in which I'm not interested in. And it doesn't display variables in functions that have not been executed yet. We have more than 20,000 lines of JavaScript codebase, so I would prefer static code analyis. I found JavsScript Lint. It is a great tool but I don't know how to use it for displaying global vars. So I'm searching for memory leaks, forgotten var keywords, and so on...
possible better answer: http://stackoverflow.com/a/29369938
has answer: http://stackoverflow.com/a/29904098
has comment: http://stackoverflow.com/comment/46918583
has answer: http://stackoverflow.com/a/29369938
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46920743
accepted answer: http://stackoverflow.com/a/29904098
has title: How to display all JavaScript global variables with static code analysis?
has comment: http://stackoverflow.com/comment/46918629
linked to: http://stackoverflow.com/q/1335851
answer count: 3
linked to: http://stackoverflow.com/q/836449

http://stackoverflow.com/a/29282831
downvote count: 0
has comment: http://stackoverflow.com/comment/47241664
accepted answer of: http://stackoverflow.com/q/29268955
type: Answer
has comment: http://stackoverflow.com/comment/47423524
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/47162295
has body: The methods you described are part of the old API. It is deprecated and will not continue to be supported. The new api (https://developer.vimeo.com/api) exposes some related videos through https://developer.vimeo.com/api/endpoints/videos#GET/videos/%7Bvideo_id%7D/videos.
has comment: http://stackoverflow.com/comment/46769872
answers question: http://stackoverflow.com/q/29268955
has comment: http://stackoverflow.com/comment/47162445
type: AcceptedAnswer

http://stackoverflow.com/a/29338770
answers question: http://stackoverflow.com/q/29338725
score: 0
type: Answer
has body: Firstly you need to hide in css as: #toggle-example p{display:none;} and in jquery on click on Terms button, you need to toggle as: $('#toggle-example p').toggle();

http://stackoverflow.com/q/29333609
has body: I've read a lot of this like issues here and I've got a good answers that solved other my problems. I've created my own AWSAccessKeyId and secretAccess and the request has been done, but when my client gives me his AWSAccessKeyId and secretAccess I got this message: <ItemLookupErrorResponse xmlns="http://ecs.amazonaws.com/doc/2013-08-01/"> <Code>SignatureDoesNotMatch The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details. c53a74b1-4db2-4356-aca9-1b7d1519737b </ItemLookupErrorResponse> Here is my code: var today = new Date(); time = today.toISOString(); time = encodeURIComponent(time); var AWSAccessKeyId = "My Key"; var secretAccess = "SECRET ACCESS"; var associateTag = ""; var messageToEncrypt ="GET\nwebservices.amazon.com\n/onca/xml\nAWSAccessKeyId="+AWSAccessKeyId+"&ItemId=0679722769&Operation=ItemLookup&ResponseGroup=SalesRank&Service=AWSECommerceService&Timestamp="+time+"&Version=2013-08-01"; var sig = CryptoJS.HmacSHA256(messageToEncrypt, secretAccess); sig = sig.toString(CryptoJS.enc.Base64); sig = encodeURIComponent(sig); var request = "http://webservices.amazon.com/onca/xml?AWSAccessKeyId="+AWSAccessKeyId+"&ItemId=0679722769&Operation=ItemLookup&ResponseGroup=SalesRank&Service=AWSECommerceService&Timestamp="+time+"&Version=2013-08-01&Signature="+sig; What is caused the problem? Is their anything else I've to ask my client to do to get the right keys? My client from another country, is this cause another problem? I don't change a lot, just change the keys.
score: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46879674
has title: "The request signature we calculated does not match the signature you provided" using different access/secret keys
answer count: 0
type: Question
linked to: http://stackoverflow.com/q/29241872
has comment: http://stackoverflow.com/comment/46866155
tagged with: javascript
tagged with: amazon-web-services

http://stackoverflow.com/comment/46668175
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/29230857
has text: What error are you getting? What about it isn't working? What browser are you testing it in?
type: Comment

http://stackoverflow.com/q/29235951
possible better answer: http://stackoverflow.com/a/29236048
downvote count: 0
tagged with: javascript
tagged with: jquery
score: 4
favorite count: 0
has answer: http://stackoverflow.com/a/29236042
has comment: http://stackoverflow.com/comment/46678248
has comment: http://stackoverflow.com/comment/46678131
has answer: http://stackoverflow.com/a/29236064
has title: JavaScript if/else not acting as expected
upvote count: 4
tagged with: css
has answer: http://stackoverflow.com/a/29236508
has answer: http://stackoverflow.com/a/29236039
accepted answer: http://stackoverflow.com/a/29236039
has answer: http://stackoverflow.com/a/29236048
has answer: http://stackoverflow.com/a/29236389
has body: I'm using jQuery to select a button on my website and add an event listener to add a night-time class when it is clicked. Initially the button works, however when I click the button again it won't run the code to remove the night-time class. Here is the JavaScript code: var night_time = false; if (!night_time) { $('.blog-desc').find('a').on('click', function() { $('html').addClass('night-time').animate(200); night_time = true; console.log("Making it night!"); }); } else { $('.blog-desc').find('a').on('click', function() { $('html').attr('class', ""); night_time = false; console.log("Making it day!"); }); } I really don't know why this isn't working, but I feel like I'm missing something painfully obvious. Also, the .animate({}, 200) isn't working either, as it just instantly applies the class, but this problem isn't as important to me as the main one.
type: AnsweredQuestion
tagged with: if-statement
has answer: http://stackoverflow.com/a/29236044
type: Question
answer count: 8
has answer: http://stackoverflow.com/a/29236027
has comment: http://stackoverflow.com/comment/46678147

http://stackoverflow.com/comment/46905396
comment on: http://stackoverflow.com/q/29360760
has text: It seems to work when you remove the unwanted ` });`
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29367742
type: Answer
accepted answer of: http://stackoverflow.com/q/29366495
answers question: http://stackoverflow.com/q/29366495
has body: You can use google chrome and and copy a sample request as 'curl' option. Then replace the form variable (Company name) with your input and save it to a file, then use bs4 to scrape the values you require.
type: AcceptedAnswer
score: 0

http://stackoverflow.com/comment/46879190
comment on: http://stackoverflow.com/q/29342882
has text: I just want to code or procedure to hide the frame
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/a/29365756
answers question: http://stackoverflow.com/q/29362299
score: 0
type: AcceptedAnswer
has body: Try using ng-option instead of select and option. Your html should be Nationality Place of birth -{{employee.City_Id}}
type: Answer
accepted answer of: http://stackoverflow.com/q/29362299

http://stackoverflow.com/q/29221837
answer count: 2
tagged with: javascript
has answer: http://stackoverflow.com/a/29221927
score: 0
possible better answer: http://stackoverflow.com/a/29222587
accepted answer: http://stackoverflow.com/a/29221927
has answer: http://stackoverflow.com/a/29222587
type: AnsweredQuestion
has body: I've been following a project on the Youtube channel Devtips. Everyting was working fine until I tried creating a slide effect using JavaScript. Nothing happens when I click the link to make slide. CSS: .alt-section{ padding-top: 50px; background-color: #e4e7ec; } .section-work{ overflow-x: hidden; } .work-belt{ width: 200%; position: relative; left: 0%; } .thumb-wrap, .work-wrap{ width: 50%; float: left; } .thumb-container{ max-width: 960px; margin: 0px auto; padding-bottom: 100px; overflow: auto; } .work-container{ max-width: 960px; margin: 0px auto; } .work-container > img{ max-width: 100%; margin-bottom: 20px; } .work-return{ width: 25px; height: 25px; cursor: pointer; opacity: 0.8; position: absolute; margin-left: -45px; } @media (max-width: 740px){ .work-container{ } .work-return{ margin-left: 0px; } #work2{ margin-left: 30px; } } .work-return:hover{ opacity: 1; } .thumb-unit{ width: 25%; display: block; float: left; background-image: url(http://goo.gl/yAzmRg); background-position: center center; background-size: cover; background-repeat: no-repeat; position: relative; padding-top: 16%; overflow: hidden; } .thumb-unit:hover .thumb-overlay{ -webkit-animation: animation 1000ms linear both; animation: animation 1000ms linear both; } .thumb-unit2{ width: 25%; display: block; float: left; background-image: url(http://goo.gl/BDUPbm); background-position: center center; background-size: cover; background-repeat: no-repeat; position: relative; padding-top: 16%; overflow: hidden; } .thumb-unit2:hover .thumb-overlay{ -webkit-animation: animation 1000ms linear both; animation: animation 1000ms linear both; } .thumb-unit3{ width: 25%; display: block; float: left; background-image: url(http://goo.gl/dwUDmj); background-position: center center; background-size: cover; background-repeat: no-repeat; position: relative; padding-top: 16%; overflow: hidden; } .thumb-unit3:hover .thumb-overlay{ -webkit-animation: animation 1000ms linear both; animation: animation 1000ms linear bo…
has title: Creating a slide effect using javascript
type: Question

http://stackoverflow.com/a/29426365
answers question: http://stackoverflow.com/q/29370050
type: Answer
score: 0
has body: You can use combination of view and list. Emit keys like ["title", doc.title.toUpperCase()] , ["status", doc.status.toUpperCase()] using map fn, say indexfn. Create _list fn, say filter that accepts query like {field1:"value1", field2:"value2"...} – lists can receive custom query params unlike map fns. Your filter must drop rows if they do not match. Surely to make filtering possible your _list must receive full (or somehow trimmed) set of fields from view fn. Perform request like /_design/ddoc/_list/filter/_view/indexfn?startkey=["field1","val1"] &amp; endkey=["field1","val1z"] &amp; filter={"field2":"val2", "field3":"val3"} This approach is reasonable when your _list receives, say, not more then thousand rows from view – piping data from view through _lists fn to end user is quiet slow. So if you have more or less alphbetically distributed data set with ~1M records, you can have good performance if you send startkey that is 3 or more chars long.

http://stackoverflow.com/q/29276841
tagged with: php
downvote count: 1
answer count: 1
has comment: http://stackoverflow.com/comment/46753077
accepted answer: http://stackoverflow.com/a/29278424
has title: Woocommerce Js elements are not loading
tagged with: wordpress
has comment: http://stackoverflow.com/comment/46752792
type: AnsweredQuestion
tagged with: javascript
has body: I really hope someone can help me with this, it is driving me mad and frustrating me. I have installed WooCommerce on an off-line test site on a default theme (TwentyThirteen) and it works and looks great. When applying it to a theme I have developed however,it works fine. All the woocommerce style has loaded but the woocommerce javascript file is not loaded. I had used some other woocommerce plugin and its js file also not loaded. But when I used TwentyThirteen theme all works fine and all the woocommerce styles and javascript files are loaded but when applying to my theme only style file is loaded I've tried all the instructions on the WooCommerce website to integrate it to my theme (both methods of either using a catch all page, or adding hooks), and all of this still results.
has comment: http://stackoverflow.com/comment/46752280
favorite count: 0
has comment: http://stackoverflow.com/comment/46752426
type: Question
has answer: http://stackoverflow.com/a/29278424
score: 1
tagged with: wordpress-theming
has comment: http://stackoverflow.com/comment/46752104
upvote count: 2
has comment: http://stackoverflow.com/comment/46752259

http://stackoverflow.com/q/29225800
type: Question
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/46660331
answer count: 3
tagged with: css
has answer: http://stackoverflow.com/a/29226139
has body: I am learning MVC in PHP. The css and js files are not working in php pages. I am using eclipse, xampp server. This is my .htaccess RewriteEngine On RewriteCond %{REQUEST_FILENAME)} !-d RewriteCond %{REQUEST_FILENAME)} !-f RewriteCond %{REQUEST_FILENAME)} !-l RewriteRule ^(.*)$ index.php?url=$1 [QSA,L] this is my bootstap.php &lt;?php class Bootstap { function __construct() { $url = isset($_GET ['url'])?$_GET ['url']:null; $url = rtrim($url,'/'); $url = explode ( '/', $url ); // print_r ( $url ); if (empty($url[0])){ require 'controllers/Index.php'; $controller = new Index(); return false; } $file = 'controllers/' . $url [0] . '.php'; //print_r ( $file ); if (! file_exists ( $file )) { require 'controllers/Error.php'; $controller = new Error (); return false; } require "$file"; $controller = new $url [0] (); if (isset ( $url [1] )) { if (isset ( $url [2] )) $controller-&gt;$url [1] ( $url [2] ); else $controller-&gt;$url [1] (); } } } How do I resolve this issue?
type: UnansweredQuestion
has title: css & js file not working in php
has comment: http://stackoverflow.com/comment/46671920
tagged with: php
has answer: http://stackoverflow.com/a/29232219
has answer: http://stackoverflow.com/a/29226696
has comment: http://stackoverflow.com/comment/46661304

http://stackoverflow.com/q/29226027
score: 4
tagged with: fuelux
upvote count: 4
has comment: http://stackoverflow.com/comment/46660373
answer count: 3
has comment: http://stackoverflow.com/comment/46662986
has comment: http://stackoverflow.com/comment/46661000
downvote count: 0
tagged with: jquery
has answer: http://stackoverflow.com/a/41472126
tagged with: wizard
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29229749
has answer: http://stackoverflow.com/a/30670291
has body: I am creating a wizard control pages using the FuelUX wizard plugin http://getfuelux.com/javascript.html#wizard And I am trying to disable the NEXT button only on the STEP1 of the wizard. Kindly check this image for better understanding: https://i.sstatic.net/YLbnl.png I would love to have some help on this. Let me know if need anything from my side.
has comment: http://stackoverflow.com/comment/46664028
type: Question
has title: How to disable NEXT button on step 1 of FuelUX Wizard
tagged with: jquery-steps
has comment: http://stackoverflow.com/comment/46659890
tagged with: javascript

http://stackoverflow.com/comment/46684209
type: Comment
has text: Why not use jQM's change method: http://api.jquerymobile.com/pagecontainer/#method-change
score: 0
comment on: http://stackoverflow.com/q/29238934
type: QuestionComment

http://stackoverflow.com/comment/46919904
has text: Ahh, I almost had that, I just did not assign the last 2 values. as for the form name, I realized that this code should only be used with the 1 form, so there is no need to make it dynamic and so i just hard coded the name
comment on: http://stackoverflow.com/a/29352009
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/73333432
type: AnswerComment
has text: Great conceptual explanation, especially with the formula. This was exactly the solution I needed for my problem. Tested with code and works!
type: Comment
comment on: http://stackoverflow.com/a/29321766
score: 0

phantomjs
tags question: http://stackoverflow.com/q/29246204
tags question: http://stackoverflow.com/q/29317439
tags question: http://stackoverflow.com/q/29255269
tags question: http://stackoverflow.com/q/29241165
type: Tag
tags question: http://stackoverflow.com/q/29255108
tags question: http://stackoverflow.com/q/29324134
tag name: phantomjs
tags question: http://stackoverflow.com/q/29236866
tags question: http://stackoverflow.com/q/29219035
tags question: http://stackoverflow.com/q/29253690
tags question: http://stackoverflow.com/q/29315593
tags question: http://stackoverflow.com/q/29337431
tags question: http://stackoverflow.com/q/29295343
tags question: http://stackoverflow.com/q/29242252
tags question: http://stackoverflow.com/q/29241449
tags question: http://stackoverflow.com/q/29325942
tags question: http://stackoverflow.com/q/29314823

http://stackoverflow.com/comment/46885602
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29350007
has text: In that case array's `toString()` method is used, and the actual content of an array is shown.
score: 0

http://stackoverflow.com/q/29332437
type: AnsweredQuestion
type: Question
tagged with: javascript
has title: Sending a email in a angularjs function with emailyak
has answer: http://stackoverflow.com/a/29332476
score: 0
has body: I want to send a email with a javascript function. I created a emailyak account this for and can send a email with a curl command. Like this: curl -H "Content-Type: application/json" -d '{"FromAddress" : "info@mydomain.simpleyak.com","FromName" : "My App","ToAddress": "blabal@gmail.com","Subject" : "Test","TextBody" : "Hello"}' https://api.emailyak.com/v1/my_api_key/json/send/email/ But if I do the equivalent call from javascript side it does not work. I use: .controller('AppointmentCtrl', function($scope, Services) { $scope.sendMail = function() { var req = { method: 'POST', url: 'https://api.emailyak.com/v1/my_api_key/json/send/email/', headers: { 'Content-Type': 'application/json; charset=utf-8' }, data: { "FromAddress" : "info@mysubdomain.simpleyak.com", "FromName" : "My App", "ToAddress": "blabla@gmail.com", "Subject" : "Subject", "TextBody" : "Body" } }; $http(req). success(function(data, status, headers, config) { // this callback will be called asynchronously // when the response is available alert("Success"); //return data; }). error(function(data, status, headers, config) { // called asynchronously if an error occurs // or server returns response with an error status. alert("Error:"+JSON.stringify(status)); //return false; }); } }); In my html I use: &lt;button ng-click="sendMail()" class="button button-positive button-block"&gt; Absenden &lt;/button&gt; This is a ionic framework application and I run the test in the iOS Simulator. I checked the internet connection of the simulator and it works. If emailyak has some problems the call wouldn't work from the terminal. What is the problem here?
tagged with: email
answer count: 1
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/29332476

http://stackoverflow.com/q/29313769
possible better answer: http://stackoverflow.com/a/29313828
upvote count: 1
has answer: http://stackoverflow.com/a/29313828
type: Question
has answer: http://stackoverflow.com/a/29313834
tagged with: javascript
answer count: 2
downvote count: 0
favorite count: 0
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/29313834
has body: I have an angularjs dropdownlist using ng-options &lt;select ng-options="perlocation.name for perlocation in locations" ng-model="locationDropdown"&gt; My dropdown list loads fine but the selected option 0 is empty and i want to replace it with "Please Select One" &lt;option value="?" selected="selected"&gt;&lt;/option&gt; How do i do this? All the examples i have seen online doesnt seem to work. Thanks
type: AnsweredQuestion
has title: Set Default Text Option in AngularJS Dropdownlost
score: 1

http://stackoverflow.com/comment/46880885
score: 0
type: Comment
type: QuestionComment
has text: I think this has something to do with the ng-view having an isolate scope. From the docs Example scenarios of multiple incompatible directives applied to the same element include: Multiple directives requesting isolated scope. Multiple directives publishing a controller under the same name. Multiple directives declared with the transclusion option. Multiple directives attempting to define a template or templateURL. It could also be that sticky headers uses transclusion as well.
comment on: http://stackoverflow.com/q/29347460

http://stackoverflow.com/a/29315932
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29314190
answers question: http://stackoverflow.com/q/29314190
type: Answer
score: 2
downvote count: 0
has body: I think there is some confusion about the lifecycle of a controller and where a certain controller is available: "A controller controls a view"! A controller definition like module.controller('ctrlname', fn) just defines a controller function. Important: This controller function will not be run with this yet, it just makes it known to the angular environment by the name you give it, eg. 'ctrlname' here. It is also not yet defined, where this controller will be run. You must then associate your controller with a view (= a DOM element = a HTML Partial = a template) that it is controlling. You can do this in several ways: use ng-controller to associate it directly use ui-router (or ng-router) states definition: it will associate the controller you define with the top level tag in the view (=template) you are defining in the state. in a directive definition. maybe others?... The controller function is then run as soon as that element/Partial/template where you assiciated it to is rendered. The $scope that is injected into each of these controllers inherit from each other whenever the tag a controller is associated to is nested inside another tag that holds another controller. This prototypical inheritence is a way to access data of a controller's scope from another controller, that lives on a child element. You can also use the controller as ctrlName syntax. This allows you the give your controller a name and lets you directly access any parent controller by its name you give it from the HTML templates (as long as you are nested deeper). So, if I understand your need correctly, you want to have the Menu always visible (in multiple ui-router states). The right solution is therefore to just associate the controller that controls that menu with the top-level HTML tag of the menu by using ng-controller in the HTML.
upvote count: 2

http://stackoverflow.com/comment/46874915
score: 0
has text: Thanks for your answer. Maybe I should have been more clear. My question isn't on _how_ to add the eventhandlers, but on _how many_ should I add: one for the container or for each button one?
type: Comment
comment on: http://stackoverflow.com/a/29343762
type: AnswerComment

http://stackoverflow.com/a/29263579
has comment: http://stackoverflow.com/comment/46730360
answers question: http://stackoverflow.com/q/29263370
score: 0
has comment: http://stackoverflow.com/comment/46729908
type: Answer
has body: As others have said, returning false in your onsubmit callback will prevent the form from being submitted. var form = document.getElementById( 'idgoeshere' ); form.onsubmit( function() { // validate here return false; });

http://stackoverflow.com/a/29299979
has comment: http://stackoverflow.com/comment/46794714
type: Answer
has body: Can you use find instead $(div).find('input[type!="hidden"]').each(function(index, input) { console.log(input) });
has comment: http://stackoverflow.com/comment/46795525
score: 0
answers question: http://stackoverflow.com/q/29299665

http://stackoverflow.com/comment/46849475
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29329973
has text: Nope, both are same. Just used a ternary operator in this

http://stackoverflow.com/comment/46795440
comment on: http://stackoverflow.com/a/29299840
score: 0
type: AnswerComment
has text: Ohhhh God finally. Great. You can accept answer if solves you problem.
type: Comment

http://stackoverflow.com/comment/46833636
has text: You should look into one of the table directives like `ui-grid`. Much better than making your own custom table
score: 0
comment on: http://stackoverflow.com/q/29321117
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29257125
upvote count: 1
answer count: 1
downvote count: 1
has title: HTML5 getUserMedia is not streaming
tagged with: getusermedia
has body: I wrote a navigator.getUserMedia() script but it isnt working right. I reused nearly the same lines of code in another test and there it worked. The problem is, that actually the camera is turned on (after given permission) but the stream isnt streaming. The camera stays on but the video element only displays a static image (maybe the first frame). The src of the video element is a blob. Heres my markup: &lt;video src="" id="camera-stream"&gt; &lt;canvas style="display:none"&gt;&lt;/canvas&gt; &lt;/video&gt; The basic script is the following: navigator.getUserMedia = navigator.getUserMedia || navigator.msGetUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia; window.URL = window.URL || window.webkitURL; var video, canvas, ctx, previewImg, localMediaStream = null; function startCapture(){ console.log("Start Capture invoked"); if( !video || !navigator.getUserMedia || !window.URL ){ console.log("Start capture returned."); return; } var args = { video: true }; navigator.getUserMedia(args, captureSuccess, captureError); } function captureSuccess(stream){ console.log("Capture successful"); localMediaStream = stream; video.src = window.URL.createObjectURL(localMediaStream); console.log("Stream: ", stream); } function captureError(e){ console.log("Capture failed", e); } The startCapture() function is invoked in a jQuery onClick-hanlder for a link. Is there an error in my script?
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
type: Question
tagged with: javascript
tagged with: html5-video
score: 0
has answer: http://stackoverflow.com/a/29257370

http://stackoverflow.com/a/29324311
downvote count: 0
answers question: http://stackoverflow.com/q/29324282
upvote count: 3
type: Answer
score: 3
has body: You would use the .insertBefore() method: $('#parentDiv .childDiv2').insertBefore('#parentDiv');
accepted answer of: http://stackoverflow.com/q/29324282
type: AcceptedAnswer

http://stackoverflow.com/q/29220835
has answer: http://stackoverflow.com/a/29220968
has comment: http://stackoverflow.com/comment/46650755
has comment: http://stackoverflow.com/comment/46650604
has comment: http://stackoverflow.com/comment/46651154
has title: Inconvenience Changing a Buttons Text in Javascript
linked to: http://stackoverflow.com/q/10671174
answer count: 1
has comment: http://stackoverflow.com/comment/46651054
tagged with: javascript
score: 0
has body: I am making a store in my Javascript Browser Game, I am I trying to change the text of a button every time I press it. I starts out as "Powerup (*** Points)" Or something like that, and the points increase each time I click on it, so the gameplay is balanced, but fun... I want to change the buttons text to show the points, my code is: document.getElementById("X10Thing").innerHTML = 'Buy X2 (10 Points)' function buyX2() { if (derp &gt; X2Cost) { Times1 = Times1 + 1; derp = derp - (X2Cost + 1); X2Cost = X2Cost + round((X2Cost / Times1)); X2Cost2 = X2Cost + 1; //This is the main problem// document.getElementById("X10Thing").innerHTML = 'Buy X2 (' + X2Cost2 + ' Points)' } } &lt;button type="button" onclick="buyX2()" id="X10Thing"&gt;&lt;/button&gt; And, when I have enough Derps (I haven't found a good name for the currency...) The button doesn't change, at all, or it will become a little button. Please Help...
has comment: http://stackoverflow.com/comment/46650623
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/15171008
has comment: http://stackoverflow.com/comment/46650810
type: Question

http://stackoverflow.com/comment/46676680
score: 0
type: Comment
type: QuestionComment
has text: your JSON is invalid since there are no `,` between your object attributes.
comment on: http://stackoverflow.com/q/29235071

http://stackoverflow.com/q/29265253
score: 4
answer count: 1
has body: Using the service-configuration and accounts-facebook packages, after clicking on the facebook button and logging in from the Facebook authorization window that pops up, we're getting an Internal server error when performing a Meteor.loginWithFacebook. This was tested on a very basic example, what is causing this error? Template.login.events({ 'click .btn-facebook': function (ev) { Meteor.loginWithFacebook({}, function(error) { if(error) { throw new Meteor.Error('Facebook login failed: ', error); } }) } }); /server/lib/config/social.js Meteor.startup(function() { ServiceConfiguration.configurations.update( { service: "facebook" }, { $set: { appId: "xxx", secret: "xxx" } }, { upsert: true } ); }) Error (server side) Exception while invoking method 'login' undefined Error (client side) Error: Internal server error [500] at _.extend._livedata_result (http://localhost:3000/packages/ddp.js?d1840d3ba04c65ffade261f362e26699b7509706:4964:23) at onMessage (http://localhost:3000/packages/ddp.js?d1840d3ba04c65ffade261f362e26699b7509706:3725:12) at http://localhost:3000/packages/ddp.js?d1840d3ba04c65ffade261f362e26699b7509706:2717:11 at Array.forEach (native) at Function._.each._.forEach (http://localhost:3000/packages/underscore.js?0a80a8623e1b40b5df5a05582f288ddd586eaa18:156:11) at _.extend._launchConnection.self.socket.onmessage (http://localhost:3000/packages/ddp.js?d1840d3ba04c65ffade261f362e26699b7509706:2716:11) at REventTarget.dispatchEvent (http://localhost:3000/packages/ddp.js?d1840d3ba04c65ffade261f362e26699b7509706:156:22) at SockJS._dispatchMessage (http://localhost:3000/packages/ddp.js?d1840d3ba04c65ffade261f362e26699b7509706:1141:10) at SockJS._didMessage (http://localhost:3000/packages/ddp.js?d1840d3ba04c65ffade261f362e26699b7509706:1199:18) at WebSocket.SockJS.websocket.that.ws.onmessage (http://localhost:3000/packages/ddp.js?d1840d3ba04c65ffade261f362e26699b7509706:1346:17)
tagged with: meteor
favorite count: 0
has comment: http://stackoverflow.com/comment/46732527
tagged with: oauth
has comment: http://stackoverflow.com/comment/46733147
type: UnansweredQuestion
tagged with: facebook
upvote count: 4
downvote count: 0
has title: Internal Server Error when using Meteor.loginWithFacebook
type: Question
has answer: http://stackoverflow.com/a/33959076
tagged with: javascript

http://stackoverflow.com/q/29341927
has comment: http://stackoverflow.com/comment/46874780
has answer: http://stackoverflow.com/a/29348172
has body: I have a line chart made with Highcharts. I want to change the style of the line to dotted when the lines intersect, something like this: https://i.sstatic.net/4JpRX.png Does somebody know if this is possible in highcharts?
score: 0
has comment: http://stackoverflow.com/comment/46871757
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46870990
has title: Highcharts change line style after intersect
type: Question
tagged with: highcharts
answer count: 1
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/29260580
accepted answer of: http://stackoverflow.com/q/29259007
has comment: http://stackoverflow.com/comment/46764154
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29259007
score: 4
has body: The basic ideas look okay, but the code is kind of a jumble of callback parameters and promises. I took the liberty of refactoring into simpler, promise-returning logical chunks so we could see what's going on. You highlighted the .map functions in the post. Not sure what the issue was there, so the code I suggest uses underscorejs, which can be easily included in the cloud as follows: var _ = require('underscore'); First, return a promise to save a "project" given most of the params to your cloud function: function createProject(params) { var ProjectClass = Parse.Object.extend("Project"); var project = new ProjectClass(); var emails = request.params.shareEmails; var user = request.params.userId; var projectDescription = request.params.projectDescription; var projectTitle = request.params.projectTitle; var emailStatus = request.params.isEmailEnabled; project.set("title", projectTitle); project.set("createdBy", { "__type": "Pointer", "className": "_User", "objectId": user }); project.set("description", projectDescription); project.set("status", true); project.set("emailShareEnabled", emailStatus); return project.save(); } Next, create "Email"'s (which are objects) given an array of email address strings. (You would do well to more carefully distinguish the objects and the strings in your naming, but I tried to hew to original nomenclature in the code) function createEmails(emails) { var EmailsClass = Parse.Object.extend("Email"); var toSave = _.map(emails, function(emailAddress) { var email = new EmailsClass(); email.set("address", emailAddress); return email; }); // like the when() function, but (possibly) fewer requests return Parse.Object.saveAll(toSave); } This is where the original code took a turn for the worse. In it, the code just finished creating the Email objects, then for some reason, it attempts to query those objects. But we have them in hand already, on the fulfullment of the promises to save. The method below, takes already built email objects (named …
has comment: http://stackoverflow.com/comment/46756992
has comment: http://stackoverflow.com/comment/46765508
type: Answer
has comment: http://stackoverflow.com/comment/46757886
upvote count: 4
downvote count: 0
has comment: http://stackoverflow.com/comment/46765164
has comment: http://stackoverflow.com/comment/46757991
has comment: http://stackoverflow.com/comment/46757427

webdriver-io
type: Tag
tag name: webdriver-io
tags question: http://stackoverflow.com/q/29262805
tags question: http://stackoverflow.com/q/29370075

http://stackoverflow.com/comment/46885780
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29347945
has text: I've added a window resize check. It relies on keeping the items (in their original order) as a closure variable. I used `if ( typeof newColumnCount != 'number' ) { newColumnCount = Math.floor((window).width() / 220); }` to test it on jsFiddle
score: 1

http://stackoverflow.com/a/29278229
has body: You can try this : register click event handler for .answer radio button and inside it disable all other sibling radio button using .prop() $(document).ready(function(){ //If user selects q1b which is the correct answer... //all other radio buttons will be disabled $('li.answer input[type="radio"]').click(function() { //disable all other radio button $(this).closest('ul').find('input[type="radio"]').not(this).prop('disabled',true); }); });
answers question: http://stackoverflow.com/q/29278147
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/46754542
upvote count: 2
score: 2
has comment: http://stackoverflow.com/comment/46754479
accepted answer of: http://stackoverflow.com/q/29278147

http://stackoverflow.com/q/29239549
score: 0
has answer: http://stackoverflow.com/a/29239794
has body: I have 4 'tabs' at the top of my page, which, when clicked, slide down to reveal a hidden div using the jQuery slide down function. The problem is that I don't want the 4 static 'tabs' to be affected by this. I want them to remain in the same position. I can't seem to find a away to stop them moving down when the hidden div is revealed. Here is a JSFiddle of my code: https://jsfiddle.net/k6nzyrhm/ And here is the CSS for the static tabs: .static { width: 160px; height: 120px; float: left; text-align: center; margin: 250px 35px 0 35px; } Please does somebody know a way to stop the 4 static 'tabs' at the bottom from moving down when the hidden div is revealed. Thanks.
answer count: 1
tagged with: javascript
tagged with: jquery
has title: Stop jQuery slide down effect from moving content below?
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47855195
type: Question

http://stackoverflow.com/comment/46659231
type: AnswerComment
score: 0
type: Comment
has text: @user2009653: Then parse `i` out of the element's ID. It's stupid, but if that's the dumb hoop your instructor wants you to jump through, I guess you're stuck.
comment on: http://stackoverflow.com/a/29225563

http://stackoverflow.com/comment/46736184
score: 1
has text: have you tried simply reversing the domain values? EDIT: just saw your answer, glad you figured it out yourself :)
comment on: http://stackoverflow.com/q/29267238
type: QuestionComment
type: Comment

http://stackoverflow.com/a/29324024
type: Answer
has comment: http://stackoverflow.com/comment/46846605
has body: Wild guess: is the event handler registered 7 times? To check do something like: $window.addEventListener('keydown', function(e) { if(e.iAmNotAlone) { throw new Error('Oh dear!'); } e.iAmNotAlone = true; /* for control in control thingy goes here */ }); Are you setting this up in the singleton part of a service or in some sort of controller (which will be recreated every time and could explain this behaviour) ?
upvote count: 1
answers question: http://stackoverflow.com/q/29322021
score: 1
has comment: http://stackoverflow.com/comment/46839523
downvote count: 0
has comment: http://stackoverflow.com/comment/46839626

http://stackoverflow.com/a/29334965
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29334858
has comment: http://stackoverflow.com/comment/46858903
accepted answer of: http://stackoverflow.com/q/29334858
has comment: http://stackoverflow.com/comment/46859119
type: Answer
has body: If I understand you correctly, you only have to objects (circles) and you want to remove them when both of them are clicked? To do this, you can create an empty array, and whenever a circle is clicked, you can check if the array is still empty (and add the clicked object to it). If the array is not empty, then you can remove the object being clicked and the object currently in the array. Something like this should do the trick: var objectsToDelete = []; canvas.on('object:selected',function(ev){ if(objectsToDelete.length == 0){ objectsToDelete.push(ev.target); } else{ canvas.remove(objectsToDelete[0]); canvas.remove(ev.target); } });
score: 0

http://stackoverflow.com/q/29281405
has body: what i need i need to toggle image onclick of event. like stack overflow star similar case. html &lt;span itemprop="location" itemscope itemtype="http://schema.org/Place"&gt; &lt;div style="display:block; float:right; width:auto; color:#7c7c7c;"&gt; &lt;a href="javascript:void(0);" src="http://im.gifbt.com/images/star1_phone.png" class="favourate_dextop" id="fav'.$data[$k]['id'].'" onClick=" favaorite(this)"&gt;&lt;/a&gt; &lt;/div&gt;' js code function favorite(pointer) { $(".favourate_dextop").click(function(){ if($(".favourate_dextop").attr("src") == "http://im.gifbt.com/images/star1_phone.png"){ //$(pointer).closest('.evt_date').find('.favourate_dextop').attr("src", "http://im.gifbt.com/images/star1_phonehover.png"); $(pointer).closest('.evt_date').find('.favourate_dextop').css('background-image', 'url("' + imageUrl + '")'); alert("if"); } else { //$(pointer).closest('.evt_date').find('.favourate_dextop').attr("src", "http://im.gifbt.com/images/star1_phone.png"); $(pointer).closest('.evt_date').find('.favourate_dextop').css('background-image', 'url("' + imageUrls + '")'); } }); } problem i need to toggle image on click of function fav(). problem im facing i searched google though i found toggleclass though its not working in case. i found helpfull code // in CSS .favourate_dextop{ background: url("http://im.gifbt.com/images/star1_phone.png") no-repeat scroll 0 0 rgba(0, 0, 0, 0); display: block; float: right; height: 19px; width: 18px; } .favourate_dextop:hover{ background: url("http://im.gifbt.com/images/star1_phonehover.png") no-repeat scroll 0 0 rgba(0, 0, 0, 0);} .favourate_dextops{ background: url("http://im.gifbt.com/images/star1_phone.png") no-repeat scroll 0 0 rgba(0, 0, 0, 0); display: block; float: right; height: 19px; width: 18px; } .favourate_dextops:hover{ background: url("http://im.gifbt.com/images/star1_phonehover.png") no-repeat scroll 0 0 rgba(0, 0, 0, 0);} // in JS // based on value of imageUrl, determine what class to remove and what class to a…
has comment: http://stackoverflow.com/comment/46760945
has answer: http://stackoverflow.com/a/29281631
type: Question
accepted answer: http://stackoverflow.com/a/29281631
tagged with: javascript
tagged with: jquery
score: 0
answer count: 2
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29282004
has title: Toggle image not working in jquery
tagged with: css
possible better answer: http://stackoverflow.com/a/29282004
type: AnsweredQuestion

http://stackoverflow.com/q/29269000
has answer: http://stackoverflow.com/a/29269663
type: AnsweredQuestion
tagged with: dynamic
has comment: http://stackoverflow.com/comment/46739913
type: Question
accepted answer: http://stackoverflow.com/a/29269663
has comment: http://stackoverflow.com/comment/46740019
has body: I'm working on a calendar that will allow users to store events on a given date. when I update the calendar each new month I create new nodes and assign them an id so I will be able to append something to them later like so: var i = 1; for(var w in weeks){ var days = weeks[w].getDates(); // days contains normal JavaScript Date objects. // alert("Week starting on "+days[0]); var which_week = "week"+i; i++; for(var d in days){ console.log(days[d].toISOString()); var tr = document.getElementById(which_week); if(days[d].getMonth()==month){ var newDay = document.createElement("div"); newDay.appendChild(document.createTextNode(days[d].getDate())); //alert(newDay.data); newDay.setAttribute("id", newDay.lastChild.data); $(tr).append('&lt;td&gt;&lt;a class="linky" href="#"&gt;'+newDay.lastChild.data+'&lt;/a&gt;&lt;/td&gt;'); } else{ $(tr).append('&lt;td class="disabledCell"&gt;&lt;a class="linky disabledLink" href="#"&gt;'+days[d].getDate()+'&lt;/a&gt;&lt;/td&gt;'); } } } getEvents(); } I modify the nodes: function ajaxEventCallback(event){ var data = event.target.responseText; data = JSON.parse(event.target.responseText); for (var i = 0; i &lt; data.length; i++) //alert("event: " + data[i].title); // var dayOfEvent= data[i].day; document.getElementById(dayOfEvent).appendChild(data[i].title); } I get a "cannot read property append child of null" error on the last line of code. I think it's a scoping issue but I don't know where to begin solving it.
tagged with: dom
score: 0
has comment: http://stackoverflow.com/comment/46739946
has comment: http://stackoverflow.com/comment/46740123
has comment: http://stackoverflow.com/comment/46739598
has title: updating DOM through ajax call back with Javascript
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/46739579
has comment: http://stackoverflow.com/comment/46739874
has comment: http://stackoverflow.com/comment/46739631
tagged with: ajax
tagged with: scope

http://stackoverflow.com/comment/46860055
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29335812
has text: Storing in database doesn't have a big security benefit. You can check answers and save (whichever method) status of a user server-side and create it as a secured token on the client.

http://stackoverflow.com/comment/46675585
type: Comment
type: QuestionComment
has text: but the ajax call works because I see it in firebug, and it doesn't return any errors. It's just that the alert doesn't work. any ideas? :?
comment on: http://stackoverflow.com/q/29234485
score: 0

http://stackoverflow.com/a/29284030
type: Answer
score: 3
upvote count: 3
has comment: http://stackoverflow.com/comment/46765939
has body: You have to close the first script tag:
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29283974
downvote count: 0
answers question: http://stackoverflow.com/q/29283974

http://stackoverflow.com/a/57937168
score: 0
has body: I have a similar problem.. when click outside of the popup, the popup window closes automatically and change the page very fast... I tried this code for stop close sweetalert itself, and refresh the page when the user click "OK" of sweetalert window. HTML: &lt;form method="post" action="contact.php" name="myform" onsubmit="return myFunction()"&gt; &lt;input type="text" class="form-control" name="full" placeholder="* Full Name" required="" &gt; &lt;input type="text" class="form-control" name="last" placeholder="* Last Name" required=""&gt; &lt;input type="submit" value="send" name="sends" class="btn btn-lg"&gt; &lt;/form&gt; javascript &lt;script type="text/javascript"&gt; function myFunction() { var full=document.myform.full.value; var last=document.myform.last.value; if (full==null || last==null){ swal("Error...!!!!!!"); return false; }else{ swal("Congrats!", ", Your account is created!", "success"); return true;} } &lt;/script&gt;
type: Answer
has comment: http://stackoverflow.com/comment/124570492
answers question: http://stackoverflow.com/q/29348785

http://stackoverflow.com/q/29249914
has body: i have a combo box that needs to append on button click, how can i execute the code $(document).ready(function(){$('.combobox').combobox();}); in the appended combo box if it is a ready function? Thank you in advance. from this site. https://github.com/danielfarrell/bootstrap-combobox/
has comment: http://stackoverflow.com/comment/46740287
upvote count: 1
accepted answer: http://stackoverflow.com/a/29281566
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/46719013
type: AnsweredQuestion
downvote count: 0
score: 1
favorite count: 0
has title: bootstrap combobox with append not working
type: Question
tagged with: twitter-bootstrap
tagged with: combobox
has answer: http://stackoverflow.com/a/29281566

http://stackoverflow.com/comment/46707769
type: QuestionComment
type: Comment
score: 1
comment on: http://stackoverflow.com/q/29251815
has text: So you are expecting `ng-init` to evaluate to `false`, and then be stored in `$scope.performswitch['S10000000032']`? Seems to work fine: http://plnkr.co/edit/f1yIAw7athS7UGEAP2ig?p=preview

http://stackoverflow.com/a/29230284
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/29229922
has body: Try like this: Demo HTML: &lt;div class="menu clearfix"&gt; &lt;div class="image-left"&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="#"&gt;Home&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;Contact&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;Work&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;About&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; &lt;div class="image-right"&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="#" id="menu-item-left"&gt;Archive &amp;or;&lt;/a&gt;...&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; &lt;/div&gt; CSS: .clearfix:after { clear: both; content: "."; display: block; height: 0; visibility: hidden; } .clearfix { display: inline-block; } .clearfix { display: block; }
score: 1
upvote count: 1

http://stackoverflow.com/comment/46886007
type: Comment
score: 1
has text: yes... logically yes.... `var x = validate(); if (x == false) { return } //ajax here`
type: AnswerComment
comment on: http://stackoverflow.com/a/29350002

http://stackoverflow.com/q/29300900
has comment: http://stackoverflow.com/comment/46796437
has comment: http://stackoverflow.com/comment/46796527
has answer: http://stackoverflow.com/a/29301034
has body: I have created a form that checks whether or not an email address is valid and outputs VALID or INVALID accordingly. My problem is that it does not work in internet explorer, and this is incredibly frustrating. My code is as follows: Email Validation Enter an email address: Submit Reset
has comment: http://stackoverflow.com/comment/46796604
has comment: http://stackoverflow.com/comment/46796484
type: Question
has title: HTML form not working in IE
has answer: http://stackoverflow.com/a/29301300
tagged with: javascript
tagged with: jquery
score: 0
answer count: 2
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46797271
has comment: http://stackoverflow.com/comment/46796454
type: UnansweredQuestion

http://stackoverflow.com/comment/46804203
type: AnswerComment
has text: @BryantMiano : apparently yes, `Options None` and you can give 'toggle' option, that's strange but that fix this problem, test it on fiddle
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29304571

http://stackoverflow.com/comment/46683343
type: QuestionComment
has text: @ribsies $scope.stat contains a list json objects, on match I assign its text to textarea.
score: 0
type: Comment
comment on: http://stackoverflow.com/q/29238039

http://stackoverflow.com/q/29254005
has comment: http://stackoverflow.com/comment/46711365
has title: Javascript Acting on Bullet List
possible better answer: http://stackoverflow.com/a/29254157
type: AnsweredQuestion
upvote count: 0
has comment: http://stackoverflow.com/comment/46711599
has answer: http://stackoverflow.com/a/29254162
type: Question
score: -1
has comment: http://stackoverflow.com/comment/46711300
answer count: 3
downvote count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
accepted answer: http://stackoverflow.com/a/29254162
has comment: http://stackoverflow.com/comment/46711337
has answer: http://stackoverflow.com/a/29254157
has answer: http://stackoverflow.com/a/29254514
has body: I have a bulletted list like this: Point 1 Point 2 Point 3 has sub-points Sub-point about something Sub-point about something else I am transliterating from one writing script to another writing script, so I have to run something against the text in each tag. Here is what my jQuery looks like: $("li").each(function() { text = dev2latin($(this).text()); } It makes it look like this: Point 1 Point 2 Point 3 has sub-points Sub-point about something Sub-point about something else I have tried several iterations of jQuery selectors including ol>li, etc, but none of them give the desired result. Thoughts?

http://stackoverflow.com/comment/46653623
has text: Each has a different constructor: http://jsfiddle.net/qm52hc1u/1/
comment on: http://stackoverflow.com/q/29222387
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29236497
has body: You could have a look at ArrayUtils.addAll() from the apache commons
answers question: http://stackoverflow.com/q/29236213
upvote count: 2
type: Answer
has comment: http://stackoverflow.com/comment/46679226
score: 2
downvote count: 0

http://stackoverflow.com/comment/46667415
type: Comment
type: QuestionComment
has text: And how can I do this? Never heard anything about this before.
comment on: http://stackoverflow.com/q/29229975
score: 0

http://stackoverflow.com/comment/46847698
type: Comment
comment on: http://stackoverflow.com/a/29329005
score: 2
type: AnswerComment
has text: your ignorance is what was causing the problem, look at ` `

http://stackoverflow.com/comment/46829495
type: Comment
comment on: http://stackoverflow.com/a/29318669
score: 0
type: AnswerComment
has text: @Lex R i havent been using strict mode in javascript but for languages ive been having a number of problems, dont really remember the problems now as its a while ago since i used strict mode for any language but perl was the last language i used it with i think

http://stackoverflow.com/a/29292800
answers question: http://stackoverflow.com/q/29290623
type: Answer
score: 0
has body: If you started your Angular app from a generator that uses the Karma test runner, such as generator-angular, then install karma-coverage to generate code coverage reports.

http://stackoverflow.com/q/29230319
has answer: http://stackoverflow.com/a/29230430
score: -1
downvote count: 2
has answer: http://stackoverflow.com/a/29230376
upvote count: 1
has title: How to trigger arrowkey presses in Chrome?
tagged with: google-chrome
has answer: http://stackoverflow.com/a/29230484
has answer: http://stackoverflow.com/a/29230382
tagged with: javascript
type: UnansweredQuestion
answer count: 4
tagged with: jquery
has comment: http://stackoverflow.com/comment/46667583
favorite count: 0
type: Question
has body: In chrome(windows), I can capture keypresses on characters, but not on the arrowkeys. See sample-code below: $('body').on('keypress', function(e) { console.log('Only works on charcters, in chrome') }) How can I capture arrow-key-presses?

http://stackoverflow.com/comment/46729162
type: Comment
score: 0
has text: Cool. Didn't know that one. That's actually a good question. You should ask here on StackOverflow.
comment on: http://stackoverflow.com/a/29262621
type: AnswerComment

http://stackoverflow.com/comment/46886061
has text: These two functions is what I've created. replace function to replace the content and Open to show or hide the div. but the replace() only works for the DOM.. function replace(id,content) { var container = document.getElementById(id); container.innerHTML = content; } function Open(idMyDiv){ var objDiv = document.getElementById(idMyDiv); if(objDiv.style.display == "inline"){ objDiv.style.display = "none"; }else{ objDiv.style.display = "inline"; } }
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29350206
score: 0

http://stackoverflow.com/q/29229225
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29229435
has body: I have a table of results that have an attribute email. I want to be able to pass the object to my modal in rails. Seem not to be able to pass the object so that i can call it in my modal. index.html.erb <%= render "shared/email_template_user"%> <% @banker_assignments.each do |application| %> <%= link_to application.loan_application.email, lp_banker_assignments_email_status_path(application), class: 'email-template-user-modal', id: "email-template-user-id", :data => { :toggle => "modal", :target => "#email-template-user-modal", :email => application.loan_application.email, :id => application.loan_application.id, :application => application } %> <%= end %> assignments_controller.rb def email_status ap params end routes.rb post '/lp_banker_assignments/email_status' => 'lp_banker_assignments#email_status' put '/lp_banker_assignments/email_status' => 'lp_banker_assignments#email_status' get '/lp_banker_assignments/email_status' => 'lp_banker_assignments#email_status' _email_template_user.html.erb Compose Email <%= form_tag :action => 'email_status', class: 'form-horizontal' do %> Recipient <%= email_field_tag "recipient", <%= application.email %>, class: " string optional form-control"%> Cc to: <%= email_field_tag "cc_to", <%= application.second_email %>, class: " string optional form-control" %> Subject <%= text_field "subject", "", class: "subject string optional form-control" %> Content <%= text_field "content", ""%> <%= submit_tag %> <% end %> I have tried a lot of options with jquery and all but I cant seem to know how to get the object from my index.html.erb to my modal view. Any help appreciated
tagged with: twitter-bootstrap
type: UnansweredQuestion
upvote count: 1
tagged with: ruby-on-rails
score: 1
has title: Passing a variable from link_to to a modal in rails
type: Question
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0

http://stackoverflow.com/q/29245671
type: Question
has comment: http://stackoverflow.com/comment/46696968
has title: Javascript, Best method for creating object with vars
has comment: http://stackoverflow.com/comment/46696975
tagged with: underscore.js
has answer: http://stackoverflow.com/a/29245735
tagged with: javascript
score: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/29245735
has body: I am creating an object in a function - am passed 3 vars, 1 is a name, 2 is a name, and 3 is an array. So right now I create this object like so createObj(var, var2, var3){ var temp1 = {}; var temp2 = {}; temp2[var2] = var3; temp1[var] = temp2; } Which creates and object like {var1 : {var2 : var3 }}; So this works just fine (I want the object looking like that), however I'm wondering if there is a way to do this without using so many variables to do it? I am using underscore if this makes it easier. It would be cool if there was a much more elegant (and hopefully) simple way to achieve this. I mean, this method works fine for me, however I am trying to improve my javascript skills, and use less code when possible :). Thanks!
has comment: http://stackoverflow.com/comment/46696964
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46696951

http://stackoverflow.com/q/29357507
tagged with: ruby-on-rails
has body: I have a form for filtering products, and want to change by AJAX the results on the partial for results: &lt;%= form_for :pin, url: filter_path, method: :get, remote: true do |f| %&gt; &lt;%= f.radio_button :category, category %&gt; &lt;%= f.range_field :max_value , type: "range", value: "1000", min: "1", max: "1000" %&gt; &lt;%= f.submit "Buscar", class: "margin_top width100" %&gt; &lt;% end %&gt; In the controller, I respond to JS with a partial: respond_to do |format| format.js { render "filter_products" } format.html {render "index"} end And lastly, on my filter_products.js, I change the partial with the new results: $(document).ready(function(){ var newProducts = '&lt;%= j(render partial: "product_list", collection: @pins) %&gt;'; $("#product-list").replaceWith(newProducts); }); Where product_list is my partial with the new products: &lt;% @pins.each do |pin| %&gt; &lt;%= render partial: "product_card", locals: {pin: pin} %&gt; &lt;% end %&gt; Its working OK, but only the first time I submit the form. The second time on, its sending XHR requests with 200 responses, but it's not replacing the old products on the view. Am I missing something? Thanks!
has answer: http://stackoverflow.com/a/29357806
has title: Javascript only executing the first time when sending XHR requests with Remote true in form_for
tagged with: form-for
type: Question
answer count: 2
tagged with: javascript
tagged with: ajax
score: 0
has answer: http://stackoverflow.com/a/29365240
type: UnansweredQuestion

http://stackoverflow.com/a/29360554
answers question: http://stackoverflow.com/q/29289913
downvote count: 0
has body: Here's a clumsy variation on quicksort that will sort either the numbers or the words in situ. (I modified a regular JavaScript quicksort posted by Paul Lewis; not sure if all the kinks are completely ironed out...). function isNumber(x,y) { return y ? Number(x).toString() !== x : Number(x).toString() === x; } function less(a,b,y){ return y ? a &lt; b : Number(a) &lt; Number(b) } function swap(a, i, j) { var t = a[i]; a[i] = a[j]; a[j] = t; } function partition(array, pivot, left, right, what) { var store = left, pivotValue = array[pivot]; swap(array, pivot, right); for (var v = left; v &lt; right; v++) { if (less(array[v],pivotValue,what) &amp;&amp; isNumber(array[v],what)) { swap(array, v, store); store++; } } while(!isNumber(array[store],what)) store++; swap(array, right, store); return store; } function doubleQSort(array, left, right, what) { while(!isNumber(array[right],what) &amp;&amp; right &gt; left) right--; while(!isNumber(array[left],what) &amp;&amp; left &lt; right) left++; var pivot = null; if (left &lt; right) { pivot = (right + left) &gt;&gt; 1; while(!isNumber(array[pivot],what)) pivot--; newPivot = partition(array, pivot, left, right, what); doubleQSort(array, left, newPivot - 1,what); doubleQSort(array, newPivot + 1, right,what); } } Output: var things = ['dog', 'asdf','31','11','6','fat','cat', '4']; doubleQSort(things,0,things.length - 1,'words'); doubleQSort(things,0,things.length - 1); console.log(things); [ "asdf", "cat", "4", "6", "11", "dog", "fat", "31" ]
score: 1
upvote count: 1
type: Answer

http://stackoverflow.com/q/29372037
tagged with: hover
type: AnsweredQuestion
type: Question
has title: AngularJS - get current element with jQuery
tagged with: javascript
tagged with: jquery
score: 0
answer count: 1
has body: I have 4 templates, each of them has mouse actions: ng-mouseover="enableDragging()" ng-mouseleave="disableDragging()" Inside those functions, I change some scope variable and I want to be able to add a class using jQuery. Can I do it without passing a parameter and without updating some scope variable (or some other workaround). What I mean is some plain way of using a class or id located in all 4 templates, without naming which template I'm on. Incase perhaps I'm going about it the wrong way the story is: I want to change some scope variable AND the css of a div when entering that div, and rollback that change when I leave the div. Thanks
has answer: http://stackoverflow.com/a/29372105
accepted answer: http://stackoverflow.com/a/29372105
tagged with: angularjs
tagged with: css

http://stackoverflow.com/comment/46748891
type: Comment
comment on: http://stackoverflow.com/a/29274783
has text: Can you debug the code so you can identify where this condition going wrong.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/46760951
score: 0
comment on: http://stackoverflow.com/a/29265563
has text: @JasonClark - The JSON you provide shows an error. A good way to check these is to clean them up at jsbeautifier.org and then check them at jslint.com . The error in your json is here: `"FinalUsage"...9,`. If there are errors in the posted json, the binding will be null. Is it possible your original usage was correct and that the actual json being used was somehow malformed? Or was this just a typo from watering down the structure?
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/46859356
type: Comment
type: QuestionComment
has text: Where exactly are you stuck? If you don't know any of it, then run through some basic DOM manipulation tutorials.
comment on: http://stackoverflow.com/q/29335369
score: 0

http://stackoverflow.com/a/29225420
type: Answer
has body: Your code is incorrect }); &lt;script&gt; $(document).ready(function () { var windowsize = $(window).width(); if (windowsize &lt; 480) { //DO SOMETHING // }); // here no need to close this } else { //DO SOMETHING } }); &lt;/script&gt;
answers question: http://stackoverflow.com/q/29225266
score: 0

http://stackoverflow.com/comment/46646663
score: 1
comment on: http://stackoverflow.com/q/29218542
has text: Ok, guys. Don't hate me. Somewhere down the line, I had already defined a function: getDetails(){}, with just an empty function body. I deleted it and the code worked. Ugh... ALWAYS CHECK THE LITTLE THINGS FIRST.
type: QuestionComment
type: Comment

http://stackoverflow.com/q/29357539
tagged with: angularjs
has comment: http://stackoverflow.com/comment/46900005
has answer: http://stackoverflow.com/a/29358323
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/13216115
type: Question
has title: AngularJS: search multiple values on ng-model
has body: I've been searching for a solution but I couldn't find an exact scenario. I wonder anyone could help. I have ng-repeat filter list like this: {{f.group}} My JSON: [ { "group": "Product Categories", "filtername" : "category", "options": [ { "title": "Category A", "alt_titles": ["Category B, Category C"] }, { "title": "Category 1", "alt_titles": ["Category 2, Category 3"] } ] } ] With this, I could successfully search for items that belongs to o.titles. Now, I wonder what should I do so I could search for items that also belongs to alt_titles. Ex: If I click on Category A, it will also loop items for Category B and Category C. Same with Category 1, it should show items on Category 2 and 3. I hope I was clear. Please help. Thanks! Working sample FIDDLE
tagged with: angularjs-ng-model
score: 0
has comment: http://stackoverflow.com/comment/46909244
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/46900511

http://stackoverflow.com/q/29300742
has title: Get node by Id in jstree
has answer: http://stackoverflow.com/a/29301833
has comment: http://stackoverflow.com/comment/46796114
has body: I have ids and I need to get the corresponding nodes. But how ? Here, "n" is my node id. How can i get the jstree object? $.each(data.node.children,function(k,v){ var n = $("#jstree_demo_div").find("[id='"+v+"']"); console.log(n); }); Regards.
has comment: http://stackoverflow.com/comment/46796156
has answer: http://stackoverflow.com/a/29300831
type: Question
tagged with: jstree
tagged with: javascript
score: 0
answer count: 2
tagged with: jquery
type: UnansweredQuestion

http://stackoverflow.com/q/29323352
favorite count: 0
has body: I want to make it so when you click one of the buttons all other words disappear except the word starting with that letter. I am very new to javascript and do not know how to do this. aas bas cas das eas fas gas
has answer: http://stackoverflow.com/a/29323679
answer count: 5
has answer: http://stackoverflow.com/a/29323515
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29323617
has comment: http://stackoverflow.com/comment/46837606
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/29323728
has title: Sort With Buttons
tagged with: javascript
score: -1
upvote count: 0
has answer: http://stackoverflow.com/a/29323522

http://stackoverflow.com/comment/46879909
type: AnswerComment
has text: it because i added jQuery selector, cos i think, that u wanna select that. nvm, glad for u
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29346842

http://stackoverflow.com/a/29340041
upvote count: 1
answers question: http://stackoverflow.com/q/29339828
score: 1
has body: Try sorting the data as shown below. var dataset = dataset.map(function (d) { var sortedData = d.co.sort(function(a,b){ return d3.ascending(a.number, b.number); }); return sortedData.map(function (o, i) { return { y: o.act_effort, x: o.number }; }); }); var dataset = [{ "effort": "initial", "co": [{ "number": "123", "act_effort": 10 },{ "number": "456", "act_effort": 10 }, { "number": "678", "act_effort": 0 }] }, { "effort": "scope_creep", "co": [{ "number": "456", "act_effort": 5 }, { "number": "123", "act_effort": 0 }, { "number": "678", "act_effort": 15 }] },{ "effort": "qc_support", "co": [{ "number": "456", "act_effort": 5 },{ "number": "678", "act_effort": 15 }, { "number": "123", "act_effort": 5 }] }, { "effort": "uat_support", "co": [{ "number": "456", "act_effort": 0 }, { "number": "678", "act_effort": 15 },{ "number": "123", "act_effort": 0 }] }]; var margin = { top: 50, right: 30, bottom: 50, left: 50 }, lagendPanel = { width: 180 }, width = 960 - margin.left - margin.right - lagendPanel.width, height = 500 - margin.top - margin.bottom; var barPadding = 2; d3.select("#main") .append("h4") .text("CO v/s Actual Effort Graph"); var effortTyp = dataset.map(function (d) { return d.effort; }); var dataset = dataset.map(function (d) { var sortedData = d.co.sort(function(a,b){ return d3.ascending(a.number, b.number); }); return sortedData.map(function (o, i) { // Structure it so that your numeric // axis (the stacked amount) is y return { y: o.act_effort, x: o.number }; }); }); console.log(dataset); var stack = d3.layout.stack(); stack(dataset); var dataset = dataset.map(function (group) { return group.map(function (d) { // Invert the x and y values, and y0 becomes x0 return { x: d.y, y: d.x, x0: d.y0 }; }); }); console.log(dataset); var svg = d3.select("#main") .append('svg') .attr("width", width + (2 * margin.left) + margin.right + lagendPanel.width) .attr('height', height + margin.top + margin.bottom) .append('g') .attr('transform', 'translate(' + margin.left …
downvote count: 0
type: Answer

http://stackoverflow.com/comment/134227331
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29242107
type: Comment
has text: hm but the sideeffect from this solution is that if the user checks one single row, all rows will be rerendered, which can be a performance problem on bigger tables

http://stackoverflow.com/q/29332787
accepted answer: http://stackoverflow.com/a/29578386
has title: skrollrjs constant multiplication
type: AnsweredQuestion
tagged with: skrollr
has answer: http://stackoverflow.com/a/29578386
type: Question
tagged with: javascript
has body: Is there a way to use.. math basically.. in templates on constants? Something like, say, this: or even Or how else do you animate something for the height of the window for example? By setting multiple constacts? like constants: { vh: '100p', vhx2: '200p' } ?
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1

http://stackoverflow.com/a/29353842
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29353778
has body: Does your elements have more than one class? If yes, maybe this helps: if(key === 69 &amp;&amp; arr[i].className.indexOf("selected") &gt; -1) {

http://stackoverflow.com/comment/46921623
has text: Yes - man in the middle attacks or if the site is not served over `http`, then simply observing traffic such as over an open wireless network. Developers should assume that cookies will be observed by attackers and utilize a secure cookie protocol: https://www.cse.msu.edu/~alexliu/publications/Cookie/cookie.pdf
comment on: http://stackoverflow.com/a/29357407
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/29327922
has comment: http://stackoverflow.com/comment/46845920
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/46845775
has answer: http://stackoverflow.com/a/29327986
has body: Basically I'm making a simple application in javascript that allows you to write in a weekday and then get the school classes that you have for that day. It works fine and outputs the text in the p tag when I enter the day. That's not my problem. I'd like to know how I make the output (the classes) go in a list format sort of. Like it doesnt go next to eachother on one line. Instead it goes line by line with linebreaks basically. How do I make that happen? Skriv in en dag Klick
accepted answer: http://stackoverflow.com/a/29327986
type: Question
has comment: http://stackoverflow.com/comment/46845864
tagged with: javascript
answer count: 3
upvote count: 1
possible better answer: http://stackoverflow.com/a/29328167
has comment: http://stackoverflow.com/comment/46845951
has answer: http://stackoverflow.com/a/29328167
has comment: http://stackoverflow.com/comment/46845844
favorite count: 0
has answer: http://stackoverflow.com/a/29328397
has title: How do I make linebreaks for innerhtml content in a p tag using javascript
has comment: http://stackoverflow.com/comment/46845765
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46845926
type: AnsweredQuestion

http://stackoverflow.com/q/29282765
has comment: http://stackoverflow.com/comment/46787311
tagged with: jquery
tagged with: file-upload
has title: Javascript - CSV file from server and getting the result of the file and store in a variable
has comment: http://stackoverflow.com/comment/46764044
has body: I have a function that reads csv file : function load_data(csv) { var rows = d3.csv.parseRows(csv); create_table(rows); } In the function above the result that goes into the csv argument looks like this: album,artist,price "lateralus","tool",13.00 "aenima","tool",12.00 "10,000 days","tool",14.00 "down in it","nine inch nails",3.00 "broken","nine inch nails",6.00 My question : How can I hard-code a variable that stores a csv file path from my server and another variable that stores the content of the csv file as same as the above result? I will then pass the result into my function for further processing. If I did this - var filepath = "filepathontheserver/blabla/file.csv"; how do I open the csv file and put the content of the file in a var? I know how to do it if the user were to upload it but that's out of the question because that option wont be available- var reader = new FileReader(); reader.onload = function(e) { var contents = e.target.result; load_data(contents); };
has comment: http://stackoverflow.com/comment/46769959
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/csv
has comment: http://stackoverflow.com/comment/46763969
answer count: 0
has comment: http://stackoverflow.com/comment/46763760
type: Question
has comment: http://stackoverflow.com/comment/46764488
has comment: http://stackoverflow.com/comment/46763941
tagged with: javascript
has comment: http://stackoverflow.com/comment/46764249
score: 0
has comment: http://stackoverflow.com/comment/46763898

http://stackoverflow.com/q/29218162
tagged with: angularjs
has comment: http://stackoverflow.com/comment/46645852
tagged with: angularjs-select2
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29218246
has title: Is this angular select2 example some kind of sorcery or what?
has answer: http://stackoverflow.com/a/29219047
score: 0
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/46645798
has comment: http://stackoverflow.com/comment/46645415
type: Question
has comment: http://stackoverflow.com/comment/46645550
has comment: http://stackoverflow.com/comment/46645751
tagged with: javascript
answer count: 2
has comment: http://stackoverflow.com/comment/46645982
tagged with: angular-ui
has body: I am looking at this plunkr and I can't believe it. You can see that if person with name matching search string exists in people array that person is shown in dropdown and otherwise it suggests to create a new one which this (new) string indicates. But how does it decide what element to show? It seems these two conditionally shown/hidden divs are responsible for it, right? &lt;div ng-if="person.isTag" ng-bind-html="person.name +' &lt;small&gt;(new)&lt;/small&gt;'| highlight: $select.search"&gt;&lt;/div&gt; &lt;div ng-if="!person.isTag" ng-bind-html="person.name + person.isTag| highlight: $select.search"&gt;&lt;/div&gt; But wait, what is this?? Person objects don't have isTag property, or do they? I can't see it in demo.js. How does this even work? Where this mysterious isTag flag is coming from? Please, I think I'm going crazy. And also, why concatenate person.name with boolean (it is boolean I assume) value person.isTag? By the way this example is forked the one that I found on angularjs select2 documentation page, I just stripped all other examples. this is original plunker
favorite count: 0
has comment: http://stackoverflow.com/comment/46645327

http://stackoverflow.com/comment/46887901
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/29351262
has text: If efficiency is a major concern, I'd recommend a plain old `for` loop.

http://stackoverflow.com/comment/46884718
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29349180
has text: That's correct! I guess also removing the `this.axis.selectAll("g.axis-y").data([{}])` completely from the second example would work
score: 0

http://stackoverflow.com/q/29256940
score: -1
type: Question
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: ajax
answer count: 3
has answer: http://stackoverflow.com/a/29257143
has answer: http://stackoverflow.com/a/29257074
has title: Remove css classes on Ajax loaded content
upvote count: 0
has body: First of all im new to Jquery Ajax . i Have Loaded some content into DIV using ajax load method and so far all coding went good until now . i have a little share button that will add a class to 3 buttons and itself once its been clicked . i have used a script to accomplish this function but that script wont Work with Ajax . i have spent hours googling to find a solution but none of the proposed solutions worked for me .so here i am. Below is a piece of content that will load through the ajax into div Track Name :- Wiggle By :- USER NAME Play Your browser does not support HTML5 audio. Download MP3 Share Share on Facebook Tweet this Share on goole Show Less i have tried using on() method and live() method even though live is depreciated . But i cannot get it working properly . When i click the button i get the Javascript message , but it does not remove the 'hide' class at all $(document).on('click' , '.sharebtn' , function(){ $(this).closest('audio').find('.shareoptions').removeClass('hide'); alert('Test'); }); if you can suggest me a solution and point out where what went wrong i will really appreciate it , alot .
has answer: http://stackoverflow.com/a/29257073
accepted answer: http://stackoverflow.com/a/29257073
downvote count: 1
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29257074

http://stackoverflow.com/a/29302342
downvote count: 0
answers question: http://stackoverflow.com/q/29302188
has comment: http://stackoverflow.com/comment/46799593
type: Answer
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/46799247
has body: Did you enable the "emulate touch screen"? check this link in "sensors" http://www.sitepoint.com/use-mobile-emulation-mode-chrome/ Try this code &lt;script type="text/javascript"&gt; $(document).bind('touchmove', function(e) { console.log($(this).scrollTop()); }); &lt;/script&gt;
has comment: http://stackoverflow.com/comment/46799733
has comment: http://stackoverflow.com/comment/46799606
has comment: http://stackoverflow.com/comment/46801014

http://stackoverflow.com/q/29315083
tagged with: jquery
has comment: http://stackoverflow.com/comment/46831512
score: 0
has comment: http://stackoverflow.com/comment/46823020
has title: jQuery event not working on mobile
has comment: http://stackoverflow.com/comment/46823144
has comment: http://stackoverflow.com/comment/46841630
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46841646
answer count: 0
has comment: http://stackoverflow.com/comment/46836737
type: Question
has body: I am trying to activate a scrip on click of a checkout button. This checks certain fields are filled in (Delivery type: radiodel1 and 2; Date; and Time) and returns an alert if the user hasn't filled in these fields. This works fine on a desktop browser but on testing on a mobile (iphone) the script doesn't seem to run and the user can just go straight to the checkout page. Is there something in my code that won't function on a mobile? jQuery(function() { jQuery('a[class="cart-checkout button"]').click(function() { if (jQuery('#radiodel1').is(':not(:checked')) { if (jQuery('#radiodel2').is(':not(:checked')) { alert("Please select delivery type"); return false; } else { if (jQuery('#date').val() == '') { alert("Please select delivery date"); return false; } else { if (jQuery('#time').val() == '0') { alert("Please select delivery time"); return false; } else { jQuery(this).submit(); } } } } else { jQuery(this).submit(); } }); });
has comment: http://stackoverflow.com/comment/46831492
tagged with: javascript

http://stackoverflow.com/q/29370481
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29377307
possible better answer: http://stackoverflow.com/a/29371486
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29371486
has comment: http://stackoverflow.com/comment/46922501
has comment: http://stackoverflow.com/comment/46922798
has comment: http://stackoverflow.com/comment/46922041
has answer: http://stackoverflow.com/a/29372021
has comment: http://stackoverflow.com/comment/46923461
tagged with: ajax
has comment: http://stackoverflow.com/comment/46924460
has comment: http://stackoverflow.com/comment/46922317
type: Question
has comment: http://stackoverflow.com/comment/46924317
tagged with: php
has comment: http://stackoverflow.com/comment/46922546
has answer: http://stackoverflow.com/a/29377307
score: 0
has body: I come here with very little knowledge on web development trying to learn, so I ask for some patience in regards to my ignorance on the subject. It would be great if you could show me logical steps that i need to perform to complete the task before me. Working with PHP here. I need to figure out how to send a GET request from one page/web application and process as well as display it in another. A simple example: there are 2 php pages, one to send the request - send.php, another to process and display it display.php send.php contains a simple form to get some user input string and using get method to send it over to display.php &lt;form action="display.php" method="get"&gt; &lt;input type="text" name="userInput"&gt; &lt;input type="submit"&gt; &lt;/form&gt; display.php receives the string and uses it as a parameter for some function and echoes it. What logical steps do I need to perform to be able to open send.php in one window, display.php in another, type something in into the form, press submit and see the results in the display.php window instead of usual redirect to display.php from send.php? As far as I know, AJAX allows us to communicate with the server but the result is still returned to the same page. Forgive my ignorance, I seek the logical steps to the solution, maybe certain technologies or methods that I am currently unaware of,something to look into and find a way to accomplish this task. Actual task is work with inventory management system: we need to be able to scan barcodes/id's etc. with one device, while seeing information about the items on another screen (think: scanning barcodes with an android app, sending it to the web based inventory system, which is open on a tablet computer or something like that and seeing the information about the item on said tablet). Notes: we were explicitly told not to use java/scala, because the sys-admin doesnt want a jvm running on the same server as the inventory system(appearantly only one server dedicated to th…
answer count: 4
has answer: http://stackoverflow.com/a/29371303
has title: PHP process http request from one page and display it on another
tagged with: inventory
has comment: http://stackoverflow.com/comment/46924207

http://stackoverflow.com/a/34395937
answers question: http://stackoverflow.com/q/29361871
type: Answer
score: 0
has body: appzillon.app.currencyConversion = function(lmoduleName,lmoduleType) { var lobj= appzillon.data.scrdata[lmoduleName]; $.each(lobj, function(i, obj) { var Amt = Number(obj[lmoduleType]); obj[lmoduleType] = (Number(Amt) * 1.490); }); appzillon.data.loadData(null); } and call using this method appzillon.app.currencyConversion('Deposits','Amount'); Or appzillon.app.currencyConversion('Investments','Amount'); Or appzillon.app.currencyConversion('AccountDetails','Balance'); Or appzillon.app.currencyConversion('Accounts','Balance'); Or appzillon.app.currencyConversion('AccountDetails','LoanAmount'); You can call these method from your different pages for respective node name and element name.

http://stackoverflow.com/q/29354491
score: 1
has comment: http://stackoverflow.com/comment/46896747
favorite count: 0
type: Question
upvote count: 1
answer count: 1
tagged with: internet-explorer
has title: reading an object URL produced in a worker with IE
has comment: http://stackoverflow.com/comment/46899290
downvote count: 0
has answer: http://stackoverflow.com/a/29371609
tagged with: javascript
type: UnansweredQuestion
has body: I have a webworker that is producing a CSV for downloading, and to conserve memory I only have it return the URL it produces from teh blob.. My worker code looks something like:: var blob = new Blob([ResultOfSomeWork()],{type:'text/csv'}); URL.createObjectURL(blob); self.postMessage({url:blob.url}); My goal is to just be able to download it in firefox and chrome this is very easy as I can just set up an invisible &lt;a&gt; and have it be clicked to download it. For IE10 I want to use msSaveBlob but I need a blob which I don't want to transfer. How can I download a object dataurl in IE10?
tagged with: web-worker

http://stackoverflow.com/q/29339480
has body: How to move the colors and size beside of "Color and Size" using regex? This is my regex: https://regex101.com/r/fB3jK9/1 The result should be like this: My sample input is: Color and Size - Dark Blue|Small Dark Blue|Medium Dark Blue|Large Dark Blue|X-Large Color and Size - Black|Small Black|Medium Black|Large Black|X-Large Ocean|Small Ocean|Medium Ocean|Large Ocean|X-Large Color and Size - Black|Small Black|Medium Black|Large Black|X-Large Black|2X-Large Stone|Small Stone|Medium Stone|Large Stone|X-Large Stone|2X-Large So far all I've been able to come up with to use is: \n\t But I need the output of: Color and Size - Dark Blue|Small, Dark Blue|Medium, Dark Blue|Large, Dark Blue|X-Large Color and Size - Black|Small, Black|Medium, Black|Large, Black|X-Large, Ocean|Small, Ocean|Medium, Ocean|Large, Ocean|X-Large Color and Size - Black|Small, Black|Medium, Black|Large, Black|X-Large, Black|2X-Large, Stone|Small, Stone|Medium, Stone|Large, Stone|X-Large, Stone|2X-Large // end output
type: Question
has comment: http://stackoverflow.com/comment/46866574
has comment: http://stackoverflow.com/comment/46866642
has title: Move characters using regex?
tagged with: javascript
has comment: http://stackoverflow.com/comment/46866614
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/46866468
has comment: http://stackoverflow.com/comment/46866542
tagged with: jquery
has comment: http://stackoverflow.com/comment/46866505
has answer: http://stackoverflow.com/a/29340255
accepted answer: http://stackoverflow.com/a/29340255
has comment: http://stackoverflow.com/comment/46866854
has comment: http://stackoverflow.com/comment/46866625
tagged with: regex
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46866785

http://stackoverflow.com/comment/88594508
has text: Thank you very much @Congelli501, it just works! I have created a jsFiddle with your solution to understand it better and see it in action: https://jsfiddle.net/natterstefan/69yjkm2p/.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/44393925

http://stackoverflow.com/comment/46667520
type: Comment
comment on: http://stackoverflow.com/a/29230362
has text: You can set the .parent container a fixed width. Works the same.
score: 1
type: AnswerComment

http://stackoverflow.com/comment/46834638
score: 0
type: Comment
has text: That was exactly it. Only I had been hopping to not have to rearrange the data using the controller. Which seems a bit naive now. Thank you for the help.
type: AnswerComment
comment on: http://stackoverflow.com/a/29321582

http://stackoverflow.com/a/29348700
score: 2
upvote count: 2
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29348594
type: Answer
has body: I think your problem might be in the function you assigned to onclick: test.onclick= function(){ var filmName= test.previousSibling.innerHTML; // &lt;=== alert(filmName); } the marked line should be var filmName= this.previousSibling.innerHTML; My guess is that the var test is hoisted out of the for loop, meaning that when the loop finished, all the onclick function are referencing the same test variable which is the last element you created.
answers question: http://stackoverflow.com/q/29348594

http://stackoverflow.com/comment/46811075
score: 0
comment on: http://stackoverflow.com/q/29308588
type: Comment
type: QuestionComment
has text: Can you post your code?

http://stackoverflow.com/comment/46651844
type: Comment
comment on: http://stackoverflow.com/a/29221408
has text: @Drops Thanks for the suggestion, in this case as the `this` refers to the select element whose only children are option elements there would be no performance advantage with your suggestion. This is a good point normally though. Also directly filtering on this: `$(this).filter(':selected')` would return nothing as the select element itself is not selected one of its child `option` elements is.
type: AnswerComment
score: 0

http://stackoverflow.com/q/29324888
tagged with: node.js
has answer: http://stackoverflow.com/a/41064825
downvote count: 0
score: 13
has body: I am new to js unit testing and I am trying to use mocha for my backbone contact manager tutorial that i found at this github repo. However, i have a global window.ContactManager variable that I firsted wanted to test whether it exists and then test the router.on functionality inside the start function later. The variable looks like so: window.ContactManager = { Models: {}, Collections: {}, Views: {}, start: function(data) { var contacts = new ContactManager.Collections.Contacts(data.contacts), router = new ContactManager.Router(); router.on('route:home', function() { router.navigate('contacts', { trigger: true, replace: true }); }); router.on('route:showContacts', function() { var contactsView = new ContactManager.Views.Contacts({ collection: contacts }); ..... My test that does not work: var expect = require ('chai').expect; describe("Application", function() { it('creates a global variable for the name space ContactManager' , function () { expect(ContactManager).to.exist; }) }); How do I test and access a global window variable existence in mocha from running the tests in the console?
type: Question
type: AnsweredQuestion
tagged with: chai
has title: Working with global window variable in mocha js from node
possible better answer: http://stackoverflow.com/a/41064825
accepted answer: http://stackoverflow.com/a/29328713
answer count: 2
has comment: http://stackoverflow.com/comment/46840810
tagged with: javascript
upvote count: 13
tagged with: mocha.js
favorite count: 0
tagged with: backbone.js
has answer: http://stackoverflow.com/a/29328713
has comment: http://stackoverflow.com/comment/46840648

http://stackoverflow.com/q/29314331
favorite count: 0
tagged with: datetime
accepted answer: http://stackoverflow.com/a/29314521
upvote count: 1
type: AnsweredQuestion
score: 1
possible better answer: http://stackoverflow.com/a/29314542
has answer: http://stackoverflow.com/a/29314542
tagged with: date
type: Question
has comment: http://stackoverflow.com/comment/46821518
answer count: 2
has title: How to get difference between two dates in javascript when they are of different months
has body: I want to get the difference between two dates when they are in different months or years. I have used the code below var d1= lastexecdate.split("."); var d2= jabusinessdate.split("."); var date1= new Date(d1[2], d1[1],d1[0]); var date2= new Date(d2[2], d2[1],d2[0]); var timeDiff= (date2.getTime() - date1.getTime()); var diffdays= Math.ceil(timeDiff/(1000*3600*24)); When i use dates such as 17.10.2014 and 19.10.2014 it gives me a differenc of two which is perfect. But when i use dates such as 31.10.2014 and 1.11.2014 it gives me a result as zero where as the actual result should have been 1. That is when the months or year are different it shows anomaly in result. Please suggest me some ideas or some functions which i can use to get appropriate result.
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/29314521

http://stackoverflow.com/comment/46670712
type: QuestionComment
comment on: http://stackoverflow.com/q/29231284
has text: The typo appeared when I copy paste the code thus it's not that. But it is still not working.
score: 0
type: Comment

http://stackoverflow.com/q/29325382
has answer: http://stackoverflow.com/a/29325443
type: Question
has body: Using Waypoints and the Inview shortcut, how might I be able to only trigger the handler function if an element is in view for X amount of time, say 5 seconds, rather than trigger immediately on the enter event? new Waypoint.Inview({ element:document.getElementById('target'), enter: function(direction) { // Only do this if in view for 5 seconds } }); Note: This question comes from somebody else, asked through the issue tracker. I've copied it here because it's a good question.
linked to: http://stackoverflow.com/q/29326102
has title: How can I trigger a function if an element is in the viewport for X amount of time?
tagged with: jquery-waypoints
score: 0
answer count: 2
tagged with: javascript
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29325442

http://stackoverflow.com/q/29247392
score: 1
has comment: http://stackoverflow.com/comment/46700144
has answer: http://stackoverflow.com/a/78432161
has comment: http://stackoverflow.com/comment/46725456
has comment: http://stackoverflow.com/comment/46700382
has comment: http://stackoverflow.com/comment/46700334
has body: I'm trying to achieve the following effect: Google only brings up tutorials on how to rotate text along Z axis using rotate(). Does anyone know how to do this? Thank you!
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/46742578
has title: How to rotate text along Y axis in javascript?
tagged with: javascript
has comment: http://stackoverflow.com/comment/46700430
answer count: 2
tagged with: canvas
tagged with: css-transforms
tagged with: 3d
linked to: http://stackoverflow.com/q/19544735
favorite count: 0
upvote count: 2
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46700048
has answer: http://stackoverflow.com/a/78432174
has comment: http://stackoverflow.com/comment/46700035
has comment: http://stackoverflow.com/comment/46699970

http://stackoverflow.com/comment/46665563
comment on: http://stackoverflow.com/a/29228369
type: Comment
has text: Shouldn't do - if the loader can find your js files cmd will too, so long as the classpath you pass to cmd is right
score: 1
type: AnswerComment

http://stackoverflow.com/q/29347901
tagged with: forms
type: Question
tagged with: javascript
tagged with: ajax
has comment: http://stackoverflow.com/comment/46884993
has body: I currently have a form built via Laravel that is bound to a model. However, one of my select boxes also has a onChange() event that triggers an AJAX call elsewhere in the page which renders additional form fields specific to what has been selected. The problem I'm having is that if the select box is already populated (either by pressing the back button or similar), box will be automatically populated with the old input, but the additional questions will not show until the onChange() event is called. I've even tried an onLoad() event, but that doesn't seem to be called for some reason. I'm sure there's a different approach I could have taken to avoid getting here from the beginning, but the quickest and easiest solution I can think of is to just override the Input::old() that seems to be built in to the model-bound form in Laravel that pre-populates the field. Or I would just have to use a plain Form::open() and put in the Input::old() to all of the other fields. Here is a snippet of the form I have currently: {{ Form::model($student, array('route'=&gt;'user.update')) }} {{ Form::select('major', array( 'major1' =&gt; 'major1' ... ), null) }} {{ Form::close() }} Thank you very much.
has title: Is it possible to override Input::old() to null in a model-binded form in Laravel?
type: UnansweredQuestion
tagged with: php
has comment: http://stackoverflow.com/comment/46881782
tagged with: laravel
answer count: 0
score: 0

http://stackoverflow.com/q/29228769
score: 6
has title: MAC address regex for JavaScript
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/4260467
downvote count: 0
has body: I have get Javascript regex from this Regex link. But its match also mix pattern of MAC address /^([0-9a-f]{1,2}[\.:-]){5}([0-9a-f]{1,2})$/i For e.g AA-BB.CC.DD.EE.FF as per above regex its true but i want to match same quantifier in whole mac address. As per my requirement above mac address is wrong. So would please help me how to match same quantifier. i.e for dot(.) find 5 instead of mix pattern same for dash(-) and colon
favorite count: 0
type: Question
accepted answer: http://stackoverflow.com/a/29228841
tagged with: regex
upvote count: 6
has answer: http://stackoverflow.com/a/29228830
has answer: http://stackoverflow.com/a/50080404
answer count: 4
possible better answer: http://stackoverflow.com/a/29228830
has answer: http://stackoverflow.com/a/30395356
tagged with: javascript
has answer: http://stackoverflow.com/a/29228841

http://stackoverflow.com/comment/46735435
type: QuestionComment
comment on: http://stackoverflow.com/q/29266766
has text: Why even use routes, just use `ng-show` and `ng-hide` then set the variables...
score: 0
type: Comment

http://stackoverflow.com/comment/46793741
comment on: http://stackoverflow.com/q/29299385
has text: I have no idea of how this page works and how you made it. How can you expect I understand which or where is the problem and if it's possible to fix it in CSS?
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/q/29342244
has comment: http://stackoverflow.com/comment/46871618
type: Question
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/29342538
has title: Why can't I use the member method to init an instance?
type: UnansweredQuestion
score: 0
has body: I met an issue of JavaScript constructor, which seems to be some basic knowledge about JavaScript. However, I didn't know it. Could some one help me out? I want to create an instance of Circle. Circle constructor looks like following: var Circle = function(radius) { var _radius; // An exception is thrown at using member method setRadius. this.setRadius(radius); this.setRadius = function(value) { _radius = value; }; }; var circle = new Circle(5); An exception is thrown out saying that this.setRadius is undefined. I don't get what's going wrong here. Does the exception happen because the definition of setRadius is after its invocation? If I move setRadius's definition ahead of its invocation, everything goes fine. var Circle = function(radius) { var _radius; this.setRadius = function(value) { _radius = value; }; this.setRadius(radius); }; If setRadius is defined in the prototype, there is no problem at all. var Circle = function(radius) { this.radius; // It's OK to use the method on the prototype chain. this.setRadius(radius); }; Circle.prototype.setRadius = function(value) { this.radius = value; }; And I'm pretty sure a member method is able to use another member method which is defined after it. The following codes work pretty well. var Circle = function(radius) { var _radius = radius; this.enlarge = function(per) { this.setRadius(_radius*per); }; this.setRadius = function(value) { _radius = value; }; }; var circle = new Circle(5); circle.enlarge(1.1); So at creating the instance, why can't I use a member method? Javascript is an interpretation language. Hence, when I start new instance, the constructor Function is already interpreted and generated. Why is its member method still undefined?
has comment: http://stackoverflow.com/comment/46871943

http://stackoverflow.com/q/29282237
tagged with: javascript
type: Question
score: 0
has comment: http://stackoverflow.com/comment/46762459
has comment: http://stackoverflow.com/comment/46762790
has comment: http://stackoverflow.com/comment/46762691
has body: I have got a tiny problem, im creating a website and i want to give an image a max-height. The image may only have the same height of another div. You can check the layout here: http://bit.ly/1OAGsLR Its about the 1920x1080 image, and i needs to be the same height as the div with class box left to it. If right the image should scale well. But im trying all i know but i dont get it working, can someone get this working with CSS or do i need to use Javascript for this? Thanks in advance!
has title: Image max-height
tagged with: http://stackoverflow.com/tag/html
tagged with: css
answer count: 4
has comment: http://stackoverflow.com/comment/46762434
has comment: http://stackoverflow.com/comment/46762323
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46762537
has comment: http://stackoverflow.com/comment/46762953
has answer: http://stackoverflow.com/a/29282744
has answer: http://stackoverflow.com/a/29282596
has answer: http://stackoverflow.com/a/29282644
has answer: http://stackoverflow.com/a/29286815

http://stackoverflow.com/a/29365217
upvote count: 1
has body: I noticed that the code you posted closes the menu even when you click on one of the li elements in the menu - this would not be desirable surely, so it would be best to put a check on the target of the collapse event click and close/open only when the h3 element of the menu is clicked on. Second, what you are looking for here is the event.stopPropagation function. That way you can put event listeners on the toggle-menu class and also on document.documentElement - which would be the html element (you can put it on document.body but sometimes that doesn't fill the screen). So the menu event listener would toggle the open class and stop further propagation. The html event listener - which would now only be called if the menu event listener was not called first - would check if there are any open menus and if so, would remove the open class from all of them. This way you can have as many menus, and clicking anywhere outside any of an open menu (including another menu) closes it. Here is the JS code for your jsFiddle (I used [].slice.call to convert all menu elements to an array so that I could call a forEach function on them, I find this easier to read/write, but your method of counter also works of course): var html = document.documentElement, menus = [].slice.call(document.getElementsByClassName('toggle-menu')); function menuClick(e){ e.stopPropagation(); if(e.target.tagName.toLowerCase()=='h3'){ this.classList.toggle('open'); } var openMenus = document.querySelectorAll('.open.toggle-menu'); for(var i=0;i&lt;openMenus.length;i++){ if(openMenus[i]==this) continue; openMenus[i].classList.remove('open'); } } function bodyClick(e){ if(document.querySelector('.toggle-menu.open')){ menus.forEach(function(menu){ if(menu.classList.contains('open')) menu.classList.remove('open'); }); } } menus.forEach(function(menu){ menu.addEventListener('click',menuClick,false); }); html.addEventListener('click',bodyClick,false); If you want to have menus simultaneously open (clicking one s…
answers question: http://stackoverflow.com/q/29362936
score: 1
accepted answer of: http://stackoverflow.com/q/29362936
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/q/29241172
score: -1
has title: Google maps api creating heatmap based on state instead of geo coordinates
tagged with: google-maps
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/29241417
favorite count: 0
has comment: http://stackoverflow.com/comment/110708457
has body: Trying to create a heatmap by States and I'm basing my map on this sample: https://google-developers.appspot.com/maps/documentation/javascript/examples/full/layer-heatmap but I got a quick question, is it possible to provide google maps api with a state entry instead of coordinates? For example: Instead of: new google.maps.LatLng(37.765172, -122.417556), new google.maps.LatLng(37.765164, -122.418075), I would have something like... new google.maps.state("NY"), new google.maps.state("NJ"), etc.﻿
type: UnansweredQuestion
downvote count: 2
has comment: http://stackoverflow.com/comment/110707757
upvote count: 1
type: Question

http://stackoverflow.com/q/29359358
has answer: http://stackoverflow.com/a/29359393
tagged with: angularjs
linked to: http://stackoverflow.com/q/22570642
type: AnsweredQuestion
tagged with: protractor
tagged with: http://stackoverflow.com/tag/json
has title: Reading an updated input in a protractor test as a string
accepted answer: http://stackoverflow.com/a/29404601
type: Question
upvote count: 4
has body: I am trying to read an input for an operation in protractor. I'm trying to send an ajax request from within protractor. I need to send a unique value (which I'm calling groupCode) to a part of a JSON object that I want to send to the server. So first I tried setting up a hidden input that could be updated. I have tried: &lt;div style='hidden' &gt; &lt;input id="group-sendgrid-hidden-input" ng-model='groupCode' value='{{groupCode}}' ng-init='groupCode=dangdangdang' &gt; &lt;/div&gt; Also this attempt to read the model value: &lt;div style='hidden' &gt; &lt;input id="group-sendgrid-hidden-input" ng-model='groupCode' value='{{groupCode}}' ng-init='groupCode=dangdangdang' &gt; {{groupCode}} &lt;/div&gt; Now, I can see in the Angular console that this value updates as I except. Meaning that $scope.groupCode does resolve to 'dangdangdang'. So I don't thing this is the issue. From here, I'm hoping to read the groupCode string in a protractor test as followed: Here is some of what I've tried: var groupCodeModel = element(by.model('groupCode')); var groupCodeBinding = element(by.binding('groupCode')); var placeholder = groupCodeBinding.getText(); also in an attempt to get the value in a more direct way (I think) var groupCode = element( by.id('group-sendgrid-hidden-input') ).getAttribute('value'); // and then later I want to do this: var sendgridData = {envelope: 'what', test: groupCode}; The problem is that no matter what I try the value of the groupCode data never seems to resolve to a string. I'm not able to console.log(groupCode); This fails: var sendgridDataString = JSON.stringify(sendgridData); Every time I get something like this: { ptor_: { controlFlow: [Function], schedule: [Function], getSession: [Function], getCapabilities: [Function], quit: [Function], actions: [Function],.... And I'm sure the data I need is here, I'm just too new to protractor to figure it out. It is dope tech, however. Thank you. Edit: I have now also tried: var groupCode = element(by.id('group…
answer count: 2
downvote count: 0
tagged with: javascript
score: 4
linked to: http://stackoverflow.com/q/29396338
favorite count: 0
tagged with: ajax
possible better answer: http://stackoverflow.com/a/29359393
has answer: http://stackoverflow.com/a/29404601

http://stackoverflow.com/q/29245468
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29245515
accepted answer: http://stackoverflow.com/a/29245515
tagged with: angularjs
has body: I'm trying to build a web app kind of copy of a simple iPhone layout with just the home screen (showing "installed" apps) and an appstore showing all available apps. When in the app store and you click an app, I want to access that app (div's) ID and fire a function sending the ID as parameter. the function should simply add the ID to an array, and maybe (if possible) link to a different page. So far, i have this in my model: var dummyApp = angular.module("dummyApp", [ "ngRoute"]); .controller('appController', ['$scope', function($scope) { $scope.homeApps = [ {id:"1", name:"Dummy", link:"#/"}, {id:"2", name:"Dummy", link:"#/"}]; $scope.allApps = [ {id:"1", name:"Dummy", link:"#/"}, {id:"2", name:"Dummy", link:"#/"}, {id:"3", name:"Dummy", link:"#/"}]; $scope.addApp = function(id) { $scope.homeApps.push({id:id, name:"new app", link:"/#/"}); }; }]); in short, I want to click an element(part of the allApps array), send the addApp function and provide ID (maybe taken from allApps array if possible?) and push it to homeApps (apps to home screen) This should simulate pressing an app and then when you go back to homescreen it will appear there as it is in the array. my HTML looks as such: &lt;div ng-click="adApp('3');" class="app" style="background-image:url('icons/{{app.id}}.png');"&gt; &lt;/div&gt; Right now I am just sending a static "3" as an ID but you get the point :) Any help appriciated!
type: AnsweredQuestion
tagged with: angularjs-ng-click
has title: AngularJS - Click on object, access it's ID & fire a function with that ID as parameter
type: Question
score: 0
has comment: http://stackoverflow.com/comment/46704031
tagged with: arrays
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/46856618
comment on: http://stackoverflow.com/q/29333801
type: Comment
has text: @adeneo Can you please elaborate on this? Maybe with an example of how to do this?
score: 1
type: QuestionComment

http://stackoverflow.com/comment/46649722
type: QuestionComment
has text: Please show an example of the expected output. I can't tell from your code exactly what this is supposed to achieve.
type: Comment
comment on: http://stackoverflow.com/q/29220362
score: 0

http://stackoverflow.com/a/29341195
type: Answer
upvote count: 0
has comment: http://stackoverflow.com/comment/76389717
answers question: http://stackoverflow.com/q/29340525
downvote count: 3
has body: var inFloat = parseFloat("10").toFixed(2); console.log(inFloat);
score: -3

http://stackoverflow.com/a/29248099
answers question: http://stackoverflow.com/q/29248017
type: Answer
upvote count: 1
has body: You can try val(function) with old value + new text to append, $('.templatesAvailableFields').on('change', function() { var text = $('.templatesAvailableFields option:selected').text(); $('.template').val(function(ind,val){ return val+text; }); }); Live Demo
downvote count: 0
score: 1

http://stackoverflow.com/q/29364354
tagged with: twitter-bootstrap
type: UnansweredQuestion
has body: I have a modal that pop-up on my page on click. It is perfectly centered in a browser view and smaller views. In the moment I make the page small as for phones the modal goes down the page and I have to scroll to see it. How can I fix this? .nx-modal { position: absolute; padding: 20px; background-color: #fff; border-radius: 15px; z-index: 1050; width: 96%; } @* This is where dialog's content is loaded *@
tagged with: css
score: 1
has title: Bootstrap modal moves down the page when resizing the page for mobile
type: Question
has answer: http://stackoverflow.com/a/29364457
answer count: 1
tagged with: javascript
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
downvote count: 0

http://stackoverflow.com/a/29366066
score: 1
type: Answer
has body: Just check the button disabled attr or just the checkbox checked value and set classes accordingly. Below I have used the checkbox state. checkboxes.click(function () { submitButtShare.attr("disabled", !checkboxes.is(":checked")); if(checkboxes.is(":checked")) { submitButtShare.addClass('ifButtonEnabled') .removeClass('ifButtoDisabled'); } else { submitButtShare.addClass('ifButtoDisabled') .removeClass('ifButtonEnabled'); } });
upvote count: 1
has comment: http://stackoverflow.com/comment/46915283
has comment: http://stackoverflow.com/comment/46915397
answers question: http://stackoverflow.com/q/29365935
has comment: http://stackoverflow.com/comment/46915818
downvote count: 0

http://stackoverflow.com/a/29269144
has body: Replacing the text inside the node below: hello Can be accomplished as follows $("#testId").html("good bye"); Resulting in the html: good bye Similarly the text inside the node can be saved to a variable as follows: var myTest = $("#testId").html(); If you want to add to the text inside a node without deleting anything, this can be accomplished with the append function. Given the following html. hello The code: $("#testId").append(" world"); Will result in the html: hello world
has comment: http://stackoverflow.com/comment/46739811
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/29268989
score: 1
has comment: http://stackoverflow.com/comment/46740607
upvote count: 1

http://stackoverflow.com/a/29230890
has body: If the csv format fits your need, then it can be easily done like in this topic. Otherwise, you will have to parse manually your JSON to the 'XML' format of a Excel file (because I don't know any library doing this). In this case, you will have to study the Excel file format, which is explained in this MSDN blog. Cheers
downvote count: 0
answers question: http://stackoverflow.com/q/29230518
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/75157388
type: Answer

http://stackoverflow.com/comment/46774531
type: AnswerComment
comment on: http://stackoverflow.com/a/29288624
type: Comment
score: 1
has text: might be worth mentioning that the "old this" (the img tag) is `arguments[0].target` inside that function...

http://stackoverflow.com/comment/46763480
score: 1
comment on: http://stackoverflow.com/q/29282598
type: Comment
type: QuestionComment
has text: Shoot, that's going to be a problem, thanks

http://stackoverflow.com/q/29289322
has answer: http://stackoverflow.com/a/29289968
tagged with: meteor
accepted answer: http://stackoverflow.com/a/29289968
type: AnsweredQuestion
type: Question
has title: How do you pass a dynamically built string as a http header in HTTP.call with meteor?
has body: I'm stuck having to use a legacy web service that takes a username and password and returns xml indicating if the credentials are valid. The legacy service requires me to pass an http header with the request that contains the user's password. So, to get it to work, I had to hard code the password (actualUserPassword) in the header as follows: var urlToCall = "https://ourlegacyauthserver/auth?uid=" + username); var result = HTTP.call("GET", urlToCall, {headers:{"token:appname:127.0.0.1:actualUserPassword":""}}); This works when I hard code the proper password for the user on the server, but what I really need to do is build that header dynamically using the password variable, like this: var urlToCall = "https://ourlegacyauthserver/auth?uid=" + username); var headerString = "token:appname:127.0.0.1:" + password; var result = HTTP.call("GET", urlToCall, {headers: {headerString: ""}}); When I do this, the auth server does not see the header coming in. What is wrong? I'm just trying to replace the hard coded string: "token:appname:127.0.0.1:actualUserPassword" with a string variable I built using the actual password passed in.
answer count: 1
tagged with: javascript
score: 0

http://stackoverflow.com/q/29273636
answer count: 1
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/46746740
type: UnansweredQuestion
type: Question
has body: This is my CSS: .animated { transition: 1s; left: -400px; } I want to element after it class name has been set to .animated. and after it finish the transition I want to fire a function. Can someone please suggest me the idea?
has answer: http://stackoverflow.com/a/29274153
tagged with: css-animations
has comment: http://stackoverflow.com/comment/46746714
linked to: http://stackoverflow.com/q/2087510
has title: How can I fire a function after an HTML animation ended?

http://stackoverflow.com/comment/46802718
type: Comment
type: QuestionComment
score: 0
has text: You could do `$("#divLoginName input:text")`
comment on: http://stackoverflow.com/q/29304058

http://stackoverflow.com/q/29353573
has answer: http://stackoverflow.com/a/29384926
tagged with: cordova
has answer: http://stackoverflow.com/a/42856216
has body: I'm working on phonegap google maps plugin (v2) but I only get one marker. I would like to show multiple markers. Can you help me? Thanks, here is my code: &lt;script type="text/javascript"&gt; document.addEventListener("deviceready", function() { var mapDiv = document.getElementById("map_canvas"); const TEST = new plugin.google.maps.LatLng(41.3772614,2.167013,15); var map = plugin.google.maps.Map.getMap(mapDiv, { 'camera': { 'latLng': TEST, 'zoom': 17, } }); map.addEventListener(plugin.google.maps.event.MAP_READY, function() { map.addMarker({ 'position': TEST, 'title': "Aqui esta el test!", 'snippet': "Texto del snippet!", }, function(marker) { // marker.showInfoWindow(); // Show infowindow }); }); }); &lt;/script&gt;
type: AnsweredQuestion
has title: Multiple markers on Phonegap plugin google maps api v2
possible better answer: http://stackoverflow.com/a/42856216
has comment: http://stackoverflow.com/comment/46913496
accepted answer: http://stackoverflow.com/a/29384926
type: Question
answer count: 2
tagged with: google-maps-markers
has comment: http://stackoverflow.com/comment/46926705
tagged with: javascript
tagged with: phonegap-plugins
score: 0
tagged with: google-maps-api-2

http://stackoverflow.com/a/29303438
score: 0
answers question: http://stackoverflow.com/q/29303008
type: Answer
has comment: http://stackoverflow.com/comment/46801522
has comment: http://stackoverflow.com/comment/46801670
has body: What you are showing us is fundementally broken HTML (you should never have two radio buttons, in the same radio group, checked at the same time), but there is a way that you can work with it . . . While I don't normally suggest tying a function to the click event of a radio button, you could use that here to override the normal functionality for radio buttons and get the behavior that you want. $("[name='payment']").on("click", function() { $("[name='payment']").prop("checked", false); $(this).prop("checked", true); }); With that, no matter which radio button that you check, it will "de-check" both and then check the one that you clicked. The bizarre thing about this whole answer, is that I don't even have a browser that will show both radio buttons as checked, in order to properly test the scenerio. LOL
has comment: http://stackoverflow.com/comment/46801469
has comment: http://stackoverflow.com/comment/46801643

http://stackoverflow.com/q/29317083
accepted answer: http://stackoverflow.com/a/29332123
has comment: http://stackoverflow.com/comment/46826351
has body: I'm having some trouble figuring out how to render react components, as children inside other components on the serverside. On the client side in my index.js file I'd do something like: React.render( &lt;Panel title="Full Time Score"&gt; &lt;Graph /&gt; &lt;/Panel&gt;, document.getElementById('column-main') ); But on the server side I'm not getting any luck, is it possible to do something like this? or is this some kind of anti-pattern and I should always start off with the one parent component. What I'm trying to do is have a reusable panel component (it includes a button which toggles visibility) that I can put any content/components inside.
type: AnsweredQuestion
score: 0
possible better answer: http://stackoverflow.com/a/29317257
has answer: http://stackoverflow.com/a/29317257
has comment: http://stackoverflow.com/comment/46827732
type: Question
tagged with: reactjs
answer count: 2
tagged with: javascript
has answer: http://stackoverflow.com/a/29332123
has title: Render components inside other components with react.js

http://stackoverflow.com/q/29239564
tagged with: javascript
tagged with: jquery
score: 0
has answer: http://stackoverflow.com/a/29239667
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46685455
accepted answer: http://stackoverflow.com/a/29239667
tagged with: twitter-bootstrap
has title: Interval is not always cleared
type: Question
has body: I'm having a heck of time clearing a very simple interval. Sometimes it work and sometimes it doesn't. I set the interval up when I first launch a Bootstrap modal via: $('#myModal').on('shown.bs.modal', function (e) { getParticipants(); getParticipantsInt = setInterval(getParticipants, 15000); }); Then I attempt to clear the interval when a user confirms (via another modal) that they want to delete a user: $("#deleteBtn").click(function() { clearInterval( getParticipantsInt ); $(parent).closest('tr').remove(); // Remove the row test.dropUser(userId) .success(function(response){ $('#hangupPartModal').modal('hide'); setTimeout( function() { getParticipantsInt = setInterval(getMtgParticipants, 15000); }, 5000); }); }); The behavior I want is that as soon as the modal is shown, make a call to the method and then set up an interval to call that method every 15 seconds. When we delete a user, cancel the interval and basically wait another 20 seconds to restart it. Problem is that sometimes it's still being called before the 20 seconds is up. In addition, before I delete a user sometimes I can see the getParticipants() method 2 or 3 times in a row. What am I missing here? Setting/clearing intervals should be easy.
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46685421
answer count: 1

audio-streaming
tags question: http://stackoverflow.com/q/29285288
tag name: audio-streaming
type: Tag

http://stackoverflow.com/q/29311774
type: AnsweredQuestion
tagged with: knockout.js
has answer: http://stackoverflow.com/a/29344537
type: Question
accepted answer: http://stackoverflow.com/a/29344537
has title: Breeze does not save new entitites that has been edited
tagged with: javascript
has comment: http://stackoverflow.com/comment/46828164
score: 0
answer count: 1
tagged with: breeze
has comment: http://stackoverflow.com/comment/46833915
has body: I have a configuraiton page where I create, edit and delete different kind of things. Now the problem arises when you create a new enitity, and the choose to "EDIT" the very same. Then it wont pickup that there's been a change and alas nothing happens when i try to save. Bear in mind both save and delete works, aswell as editing an old entity. By old I mean that the system has refreshed everything once. I think is has to be something with the temp id, or the cache? The method running everything is the editCompanyType() which then runs Save() Short Version When I create a new entity, and then choose to edit it. It wont save the new edited value althoug the value itself updates on the screen. From my ViewModel I Run this when I create a New entity var companyTypeTemp = configunitofwork.configcompanytypesrepository.createEntity(); Loading my modal and returning the result. And saving if needed. var diag = new genericModal("", 'företagstyp'); diag.viewUrl = 'views/config/genericModal'; app.showDialog(diag).then(function (diagResult) { if (diagResult === 'update') { companyTypeTemp.company_type_text = diag.generic_type; Save(); } else { logger.log("Du gjorde inga ändringar!", null, "panel", true); } }); Saving goes here. function Save() { if (!configunitofwork.hasChanges()) { return true; } configunitofwork.commit() .then(function () { refreshCompanyTypes(companyTypes); logger.logSuccess("Företagstypen sparades!", null, "panel", true); }); return true; } Now when I try to edit THE NEWLY created entity it fails, it does not pickup any changes..? I bind my actions to the view var bindAction = function (view) { $(view).on('click', '.editCompanyType', function () { var company_type = ko.dataFor(this); editCompanyType(company_type); }); }; So when I click my entity I will run my edit method var editCompanyType = function (company_type) { var diag = new genericModal(company_type.company_type_text, 'företagstyp'); diag.viewUrl = 'views/config/genericModal'; app.showDialog(diag)…

http://stackoverflow.com/comment/61121838
score: 0
type: AnswerComment
has text: In many cases, I see that `setTimeout(function(){$(".input.input-search").focus()},0);` does the trick, while `$(".input.input-search").focus();` doesn't, even though both are essentially the same. Why might this be?
comment on: http://stackoverflow.com/a/29300935
type: Comment

http://stackoverflow.com/comment/46890004
type: AnswerComment
has text: I just meant "parenthesis".
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29350134

http://stackoverflow.com/comment/46765711
has text: That was the original plan, but backwards compatibility concerns mean the spec still contains a lot of support for "lax mode."
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29283935
score: 0

http://stackoverflow.com/q/29261031
favorite count: 0
has answer: http://stackoverflow.com/a/29350909
tagged with: css
has body: I am using Bing Maps to show map points on worldmap. The issue I am facing is, if the label (MapPoints[i].city) text is more than 9 characters(pushpin width; 60), it is truncating the text. If I increase the width from 60 to 160. The label shows completely, but the mappoint is moving to the left of the actual location. I have tried different combinations, but it does not help. I want to show the complete label, but don't want the pushpin to move away from actual location on the map. How do I do that? Thanks img = MapPoints[i].group + '.png'; var pushpin = new Microsoft.Maps.Pushpin(new Microsoft.Maps.Location(parseFloat(MapPoints[i].lat), parseFloat(MapPoints[i].lon)) , { icon: img, height: 50, width: 60, text: MapPoints[i].city, typeName: 'clrval' }); pushpin.Title = MapPoints[i].name; pushpin.description = MapPoints[i].desc; pushpin.cityID = MapPoints[i].cityID; pushpin.city = MapPoints[i].city; pushpin.typeName = 'clr'; dataLayer.push(pushpin); The CSS class is as follows .clrval div { color: blue !important; left: 5px !important; text-shadow: 1px 0px white, -1px 0px white, 0px -1px white, 0px 1px white; font: 12px arial,sans-serif !important; }
has title: Bing Map Pushpin width setting moves the pin away from the map location
upvote count: 1
has answer: http://stackoverflow.com/a/29261087
type: Question
accepted answer: http://stackoverflow.com/a/29350909
has answer: http://stackoverflow.com/a/29985687
type: AnsweredQuestion
score: 1
possible better answer: http://stackoverflow.com/a/29261087
tagged with: bing-maps
answer count: 3
downvote count: 0
tagged with: javascript

http://stackoverflow.com/q/29251134
has body: I am currently writing a basic Selenium test for a company I am an intern at, and this error have been bugging me for a while now. If I turn Javascript off on my test, it goes through fine, but as soon as I turn on Javascript for the test, it never completes. The test looks like this: public void Login() { driver.setJavascriptEnabled(true); driver.get("https://127.0.0.1:4433"); WebElement usernamefield = driver.findElement(By.id("username")); WebElement passwordfield = driver.findElement(By.id("password")); usernamefield.sendKeys(email); passwordfield.sendKeys(password); WebElement loginButton = driver.findElement(By.className("jsLoginSubmit")); loginButton.click(); driver.navigate().to("https://127.0.0.1:4433/?op=caselist"); assertTrue(driver.getTitle().contains("Overblik") &amp;&amp; driver.getTitle().contains(userid.toString())); System.out.println(email); driver.close(); } This test works just fine if Javascript is disabled. I am using this to instantiate the driver in my setUp() method: driver = new HtmlUnitDriver(); But here is the output from running the test with Javascript enabled: 09:40:35,162 ERROR StrictErrorReporter:79 - runtimeError: message=[The data necessary to complete this operation is not yet available.] sourceName=[https://127.0.0.1:4433/static/lib/jquery/jquery-1.11.1.min.js] line=[2] lineSource=[null] lineOffset=[0] 09:40:35,470 WARN DefaultCssErrorHandler:39 - CSS error: [21:23] Error in style rule. Invalid token ":". Was expecting one of: &lt;S&gt;, "}", &lt;COMMA&gt;, ";", "/", &lt;PLUS&gt;, "-", &lt;HASH&gt;, &lt;STRING&gt;, &lt;URI&gt;, "!", "inherit", &lt;EMS&gt;, &lt;EXS&gt;, &lt;LENGTH_PX&gt;, &lt;LENGTH_CM&gt;, &lt;LENGTH_MM&gt;, &lt;LENGTH_IN&gt;, &lt;LENGTH_PT&gt;, &lt;LENGTH_PC&gt;, &lt;ANGLE_DEG&gt;, &lt;ANGLE_RAD&gt;, &lt;ANGLE_GRAD&gt;, &lt;TIME_MS&gt;, &lt;TIME_S&gt;, &lt;FREQ_HZ&gt;, &lt;FREQ_KHZ&gt;, &lt;DIMENSION&gt;, &lt;PERCENTAGE&gt;, &lt;NUMBER&gt;, &lt;FUNCTION&gt;, &lt;IDENT&gt;. 09:40:35,471 WARN DefaultCssErrorHandle…
has comment: http://stackoverflow.com/comment/46710283
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46706377
has title: Javascript Breaks Selenium Tests
has comment: http://stackoverflow.com/comment/46707408
answer count: 0
tagged with: java
tagged with: selenium
type: Question
has comment: http://stackoverflow.com/comment/46708231
tagged with: javascript
has comment: http://stackoverflow.com/comment/46708182
has comment: http://stackoverflow.com/comment/46706974
has comment: http://stackoverflow.com/comment/46707476
score: 0
has comment: http://stackoverflow.com/comment/46707182

http://stackoverflow.com/q/29266129
has comment: http://stackoverflow.com/comment/46734059
has comment: http://stackoverflow.com/comment/46734196
answer count: 1
has comment: http://stackoverflow.com/comment/46734323
score: 0
has answer: http://stackoverflow.com/a/29266183
has comment: http://stackoverflow.com/comment/46734337
has comment: http://stackoverflow.com/comment/46734250
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46735160
has title: jQuery / sessionStorage: flicker effect on hidden element, hidden programmatically
has comment: http://stackoverflow.com/comment/46734110
has comment: http://stackoverflow.com/comment/46734499
has comment: http://stackoverflow.com/comment/46734226
has comment: http://stackoverflow.com/comment/46734379
has comment: http://stackoverflow.com/comment/46735205
has body: When the jQuery locates the sessionStorage entry, it adds a new class to my div. The actual code works fine, however each time i refresh the page the div first renders as a flicker, and then disappears. This is obviously due to the declaration of the function (ie div is loading before the function call, as expected). Without moving the function and jquery reference to the head, is it possible to avoid this flicker effect? Thanks &lt;body&gt; &lt;div class="browser-warning"&gt; Browser not supported.. &lt;/div&gt; &lt;script src="//code.jquery.com/jquery-1.11.2.min.js"&gt;&lt;/script&gt; &lt;script&gt; $(document).ready(function () { if (sessionStorage.getItem("browser-warningHidden") != null) { $(".browser-warning").addClass("is-hidden"); } }); &lt;/script&gt; &lt;/body&gt;
type: Question

http://stackoverflow.com/q/29367209
answer count: 1
tagged with: javascript
tagged with: geometry-surface
score: 0
tagged with: geometry
type: UnansweredQuestion
has title: Rectangular intersection scomposition
tagged with: maps
has body: TL;DR: Decompose the intersection of 2 intersecting rectangles in 3 rectangles, 1 of which is the intersected area. Hi all! I'm currently developing some stuff that needs to visualize some data on a map. What is happening now is that every time the users moves on the map i'm making a request to an api telling: give me all the data contained in this rectangular area (Ex ABCD) where each point is a Lat-Lng pair. This kind of request is made every time the user moves on the map and the new visualized area is not contained in the last visualized (Ex the user has made a zoom in) Unfortunately this kind of request is kinda heavy and i would like to make some optimization on this. Usually when the user moves on a map what is happening (Img A) is that the new area he want to visualize (Ex abcd rectangle) intersect the old visualized area (ABCD) for which i have already loaded the data So instead of requesting the whole new abcd rectangle it would be cool and less heavy to ask the api all the data contained in both AZcX + aXYb (Fig B) I'm struggling finding an algorithm to calculate given the 2 intersected rectangle (ABCD and abcd) this 2 rectangles. Any help will be appreciated, thanks User see and fecth data for this area A+------------+B | | | | | | D+------------+C Img A ( the user has moved to the new abcd area) a+-----------+c | | B | A+-----|------+ | | | | b+-----|-----+d | | | D+------------+C Img B a+-----X-----+c | | | B | A+-----Z------+ | | | | b+----Y|-----+d | | | D+------------+C
type: Question
has answer: http://stackoverflow.com/a/29648751

http://stackoverflow.com/q/29318057
linked to: http://stackoverflow.com/q/15717468
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29328014
type: Question
tagged with: three.js
tagged with: collada
answer count: 1
accepted answer: http://stackoverflow.com/a/29328014
linked to: http://stackoverflow.com/q/21200386
tagged with: blender
has body: I am using Three.js, version 71. I'm using Blender, version 2.73. I created a textured collada object (.dae file) using Blender, and now I want to load it into my three.js scene. So far, I can only load models that get exported from blender that have no textures on them. Here is how I create the textured collada object: In blender, I simply use the default cube. Using the settings on the right, I add a texture to the cube. Here is the texture I am putting onto the cube (NOTE: it is 2048 X 2048, so it's a power of 2): Here is an image of the cube in render mode to prove that the texture is on it: Here are the export settings I used when I exported the cube as a collada from Blender: Here is some code I used to try to load the textured collada: var loader = new THREE.ColladaLoader(); var localObject; loader.options.convertUpAxis = true; loader.load( './models/test_texture.dae', function ( collada ) { localObject = collada.scene; localObject.scale.x = localObject.scale.y = localObject.scale.z = 32; localObject.updateMatrix(); game.scene.add(localObject); } ); Here is the error I got: [.WebGLRenderingContext]GL ERROR :GL_INVALID_OPERATION : glDrawElements: attempt to access out of range vertices in attribute 2 I then googled that error message and someone said the I need to compute tangents. Here are my attempts at that and the errors I got: var loader = new THREE.ColladaLoader(); var localObject; loader.options.convertUpAxis = true; loader.load( './models/test_texture.dae', function ( collada ) { localObject = collada.scene; localObject.scale.x = localObject.scale.y = localObject.scale.z = 32; localObject.updateMatrix(); for (var i = collada.scene.children.length - 1; i &gt;= 0; i--) { var child = collada.scene.children[i]; // child.children[0] will give us the THREE.Mesh of the collada if ( child.colladaId == "Cube" ) { // ATTEMPT 1: Just tried computing tangets based on answer from neoRiley here: http://stackoverflow.com/questions/21200386/webgl-gl-error-gl-invalid-o…
score: 0
tagged with: 3d
has title: Unable to load textured Collada exported from blender using Three.js
linked to: http://stackoverflow.com/q/13988615
tagged with: javascript

http://stackoverflow.com/q/29303605
accepted answer: http://stackoverflow.com/a/29304548
has body: I am trying to reload a parent window (same domain) with javascript from within an iframe. window.parent.location.href = window.parent.location.href; does not work here for some reason (no javascript errors). I don't believe it is a problem with same origin policy, as the following works: window.parent.location.reload(); The problem with this option is if the last request was a POST, it gets reloaded as POST. Any ideas why the first option wouldn't work? Otherwise, is there another method that will reload the page without resubmitting any form data (e.g. perform a fresh GET request to the parent page URL)? I have also tried: top.frames.location.href = top.frames.location.href; window.opener.location.href = window.opener.location.href and various other iterations.
has answer: http://stackoverflow.com/a/29305679
tagged with: javascript
has comment: http://stackoverflow.com/comment/46802785
has title: Reload Parent Window without POST
type: AnsweredQuestion
downvote count: 0
score: 1
favorite count: 0
type: Question
has answer: http://stackoverflow.com/a/29304548
answer count: 2
has comment: http://stackoverflow.com/comment/46803001
tagged with: iframe
upvote count: 1
has comment: http://stackoverflow.com/comment/46802926
possible better answer: http://stackoverflow.com/a/29305679
has comment: http://stackoverflow.com/comment/46802840

http://stackoverflow.com/comment/46705878
type: AnswerComment
comment on: http://stackoverflow.com/a/29250656
type: Comment
has text: Great suggestion, however my `self.UserComments` array now has no data...I could be completely misinterpreting the way this should function.
score: 0

http://stackoverflow.com/comment/46853258
score: 0
type: Comment
has text: @DavidDubczak Mind to share it with us?
type: QuestionComment
comment on: http://stackoverflow.com/q/29325728

http://stackoverflow.com/comment/46914817
comment on: http://stackoverflow.com/q/29365710
type: Comment
type: QuestionComment
has text: I've made a [plunker](http://plnkr.co/edit/iO0R6G6PNDDvpwvSsAhM?p=preview) to try to figure out what the issue is. Not sure what you want to happen. The console is showing the raw characters for me.
score: 1

http://stackoverflow.com/comment/46845374
score: 0
comment on: http://stackoverflow.com/q/29327365
type: QuestionComment
type: Comment
has text: @Drakes, Stackoverflow goes haywire when I try to post my code Just because of indentation.. It displays a part of my code instead of showing it as a code

http://stackoverflow.com/comment/46667754
has text: You want `.children( 'a' ).on( 'click', function(e) {` part to work?
comment on: http://stackoverflow.com/q/29230276
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46829149
type: AnswerComment
has text: Yes it will give the correct difference as long as you maintain the zero indexing rule for months. You have to provide 0 for January and 11 for December.
type: Comment
comment on: http://stackoverflow.com/a/29314521
score: 0

http://stackoverflow.com/q/29368259
has answer: http://stackoverflow.com/a/29381459
downvote count: 1
has comment: http://stackoverflow.com/comment/46918548
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29368354
has comment: http://stackoverflow.com/comment/46918450
has body: I'm practicing some Javascript. I used a var to create an object (because before that I created a class) and now I'm trying to do the same, but instead of using a variable I want to use an array. While this is working: function start (){ var brick = new create_class_brick(10, 400, 10, 400, 0, 2.5, "brick"); window.setInterval(function(){brick.MOVE_BRICK();}, 25); the MOVE_BRICK function doesn't work here: function start (){ var i = 0; vector_bricks[i++] = new create_class_brick(300, 500, 800, 600, 0, 2.5, "brick"); vector_bricks[i++] = new create_class_brick(200, 200, 600, 300, 0, 2.5, "brick"); for ( i = 0; i&lt;vector_bricks.length; i++ ){ vector_bricks[i].create_brick(); vector_bricks[i].MOVE_BRICK(); } } Can anyone give me a hand?
type: Question
answer count: 2
upvote count: 1
tagged with: javascript
has title: Var working but stops when doing the same using an array
score: 0
has comment: http://stackoverflow.com/comment/46918467

http://stackoverflow.com/comment/46853113
has text: i see, i just did {{person.foo()}} and it worked, but u knew that!...why don't u make an answer and I'll accept it?
comment on: http://stackoverflow.com/q/29331739
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/46674840
comment on: http://stackoverflow.com/a/29234110
has text: Still, the `ret` returns all 3 tags.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/46919953
type: Comment
score: 0
comment on: http://stackoverflow.com/q/29369091
has text: You'd achieve the same thing if you'd use JSON.Parse. see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse If older browsers are important, you could utilize a library like JQuery's $.parseJSON. see https://api.jquery.com/jQuery.parseJSON/ . It can be quite difficult to strictly verify that the contents indeed. Of course JSON is generated at the server. But it usually contain database-data, leaving you vulnorable to JavaScript-injection.
type: QuestionComment

mask
tags question: http://stackoverflow.com/q/29357540
tags question: http://stackoverflow.com/q/29353966
type: Tag
tag name: mask

http://stackoverflow.com/a/29245323
type: Answer
downvote count: 0
score: 1
has body: Possibly, Selenium is going too fast through your DOM. Has happened with me several times and your element hasn't fully loaded into DOM. I am more familiar with the PHP/PHPUnit libraries available for Selenium, but perhaps you can introduce a temporary wait with a command similar to waitForElementPresent. Also, if you have control of the code, can you give a 'name' attribute to your input field as well? It could not hurt anything to do so.
answers question: http://stackoverflow.com/q/29245294
upvote count: 1

http://stackoverflow.com/comment/46809413
type: QuestionComment
has text: Duplicate of http://stackoverflow.com/q/23191193/497418
score: 0
comment on: http://stackoverflow.com/q/29307587
type: Comment

http://stackoverflow.com/a/29335567
has body: Use the setTimeout function to recursively call your printOut function, rather than a for loop which quickly sets off several setTimeouts. Waiting for the setTimeout to execute to call printOut again gives you a full delay between each setTimeout. To keep track of where the sequence is in the process, an index parameter is added to the printOut function, defaulting to "0". JSFiddle var timePerLetter = 2000; var newLineCharacter = '|'; function printOut(text, ii) { ii = ii | 0 setTimeout(function() { var txt = ( newLineCharacter === text[ii] )? '&lt;br&gt;': text[ii] $('#test').append(txt) printOut(text, ii+=1) }, timePerLetter) } printOut("HELLO ASDA| SD");
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/29335435
upvote count: 1
type: Answer

http://stackoverflow.com/a/29386561
has comment: http://stackoverflow.com/comment/46955205
type: Answer
has comment: http://stackoverflow.com/comment/46953052
answers question: http://stackoverflow.com/q/29372335
has body: So, after reading your question once.. Twice.. Trice.. I think you want this: (pro-tip: try to keep your questions as simple as possible, using pseudo-code if you must) $('.label-passive').parents('._row').hide(); If this isn't completely what you wanted, leave a comment and I'll try to improve the answer. Edit: Improved answer as OP improved his question: Maybe this will help you further then: $('.CollapseGroup1').each(function() { if ($(this).find(".label-passive").length != 0) $(this).hide(); });
has comment: http://stackoverflow.com/comment/46952944
score: 0

http://stackoverflow.com/a/42431005
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/29311190
downvote count: 0
has body: In my case I found that this was down to my firewall, AVG, blocking the connection attempt. The solution From Menu->Settings->Components choose Firewall Choose Network profiles For your current network adaptor change the profile to private (you have to establish whether this is a safe thing to do) Back on the Policies page check Allow all connections with friends in private mode With other firewall software you will have to find out just how you allow access to that port from other devices on the same network
type: Answer

node-mssql
tags question: http://stackoverflow.com/q/29233385
tag name: node-mssql
type: Tag

http://stackoverflow.com/comment/46854673
has text: what error is it throwing?
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/29332804

http://stackoverflow.com/comment/46677504
score: 0
type: AnswerComment
has text: The problem is your mime type. Can you check the network panel on the javascript console? You should see the request. Under the headers section, you should see the mime type. If it is still text/plain, then that is still your problem.
type: Comment
comment on: http://stackoverflow.com/a/29235318

http://stackoverflow.com/a/29247378
type: Answer
accepted answer of: http://stackoverflow.com/q/29247345
answers question: http://stackoverflow.com/q/29247345
score: 0
has body: it's unclear what caused the problem, may be u can put more detailed information. try this : xmlHttp.send("day=" + day + "&amp;time=" + time + "&amp;event_text=" + event_text); instead of xmlHttp.send("day=day&amp;time=time&amp;event_text=event_text");
type: AcceptedAnswer

http://stackoverflow.com/comment/46860087
type: Comment
has text: I don't think you can access a browser console from Cordova (you'd have to check on that), but if you can't, yes, it would make it harder to cheat (especially for children which your app will be targeted towards).
comment on: http://stackoverflow.com/q/29335812
score: 0
type: QuestionComment

http://stackoverflow.com/comment/46847870
type: AnswerComment
has text: Agreed as well, answered the question that was asked. Then gave extra information. Just because extra information was included, does not make it a comment of subject.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29326442

http://stackoverflow.com/q/29295183
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/29296368
accepted answer: http://stackoverflow.com/a/29295393
tagged with: http://stackoverflow.com/tag/html
tagged with: css
answer count: 4
has title: Make table content fit to width with table width: 100% set in css
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/7613541
possible better answer: http://stackoverflow.com/a/29295476
upvote count: 3
has answer: http://stackoverflow.com/a/29295476
type: Question
score: 3
has answer: http://stackoverflow.com/a/29295393
has body: Sample table Age 12 Gender Male Some long label Some long label value ... ... could be more... Without the width:100% content should fit to each column container but I would like to make the table expand across the whole page. Setting table width: 100% equally distributes the column. I would like to make each label (Labels: Age, Gender, Some long label) fit it's column container and the rest equally divided among themselves (Values: 12, Male, Some long label value). I know setting Age or setting it in css should do the job but I think this is counter productive especially if you have to do that with a lot of columns. Is there a way to accomplish this in css with lesser code, javascript or jquery maybe? Any hint or direction on how this can be done? Note: I've read this but I would like to avoid injecting width="%" inside html.
has answer: http://stackoverflow.com/a/29295273
downvote count: 0

http://stackoverflow.com/a/50437423
has body: If you use lodash library, you can achieve this by a one-liner function: Promise.allValues = async (object) =&gt; { return _.zipObject(_.keys(object), await Promise.all(_.values(object))) }
score: 14
downvote count: 11
answers question: http://stackoverflow.com/q/29292921
has comment: http://stackoverflow.com/comment/100982097
has comment: http://stackoverflow.com/comment/127792399
upvote count: 25
type: Answer

http://stackoverflow.com/a/29290688
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29290174
answers question: http://stackoverflow.com/q/29290174
type: Answer
has comment: http://stackoverflow.com/comment/46780354
score: 1
upvote count: 1
has body: This actually has nothing to do with observers - the cause is property access. Consider the following line: return (this.isFinished ? "SI" :"NON"); This is always going to return NON because this.isFinished is always falsy (it's undefined). Ember-Data doesn't put data directly on the model instances, it just puts computed properties there. this.isFinished doesn't exist. If you use Ember's get() method, it works fine: return (this.get('isFinished') ? "SI" :"NON"); As a general rule, always use get() when dealing with Ember objects. I know it's a little annoying at first, but you get used to it and it helps avoid a lot of issues.
type: AcceptedAnswer

http://stackoverflow.com/q/29269915
type: AnsweredQuestion
score: 1
type: Question
has answer: http://stackoverflow.com/a/29270785
downvote count: 0
tagged with: javascript
has body: I want to allow my users to upload their own dust templates. Right now I compile and store them in a database. I then load them from the database and execute them as needed. My platform server side is node.js. Could a user insert malicious data in a template that would arm my running node.js process? Infinite loops? Code Injection? Thanks
accepted answer: http://stackoverflow.com/a/29270785
answer count: 1
tagged with: dust.js
favorite count: 0
has title: dust.js are random user uploaded templates secure to execute server side?
upvote count: 1
tagged with: node.js

http://stackoverflow.com/comment/46813754
comment on: http://stackoverflow.com/a/29307626
score: 0
type: AnswerComment
has text: I have edited my original code so you can see what im currently working with, Im also using this in my header: does this have to be in the backend.php also? also does it matter where the backend.php file is saved?
type: Comment

http://stackoverflow.com/q/29357540
has title: Adding a Mask Overlay on top of Leaflet v0.8-dev
has answer: http://stackoverflow.com/a/30278773
favorite count: 0
upvote count: 2
type: UnansweredQuestion
tagged with: dictionary
has body: I'm trying to create a circular masked overlay using Leaflet 0.8 that is positioned over the users currently location, extending a radius of 1000 meters. Essentially making the map visible around the user (as a circle), and grayed out beyond 1000 meters Mockup: As the user zooms in/out on the map, the circle should resize accordingly. I tried using leaflet-maskcanvas, a plugin for Leaflet that looks like it would do exactly what I need, unfortunately with all refactoring done in Leaflet 0.8-dev, this plugin isn't compatible. Has anyone been able to achieve this effect successfully with Leaflet 0.8?
score: 2
tagged with: leaflet
tagged with: mask
type: Question
tagged with: javascript
tagged with: canvas
answer count: 1
downvote count: 0

http://stackoverflow.com/comment/46958705
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29390556
has text: I am not quite sure that I understood what you suggest. Could you make it more clear? Thank you for your time.

experimental-design
type: Tag
tags question: http://stackoverflow.com/q/29305644
tag name: experimental-design

http://stackoverflow.com/q/29229786
has comment: http://stackoverflow.com/comment/46666118
type: Question
has title: Preventing fade-out of any mouse-over div when a ajax get still update of that mouse-over element
has body: I have right side update box which display all new post and like of user followers . And when user mouse-over any one update, a another floating box display full post of that update (like facebook). Update box get all update after 5000 ms interval. I used this below script to display floating box. But my problem is when update box get new update then the floating box goes fade-out. That means the floating box only display for 5 second. I want whatever does happen on update box, floating box will not be fade-out until user want. I use share hosting, so all update create by Ajax GET with 5000ms interval. my floating box script: $(document).on('mouseenter', '.upbox', function () { var id = $(this).attr('id').replace('',''); $("#menu").fadeIn("slow"); $('.loader2').show(); $.get("uphover.php?id="+id, function(data) { $('#menu').empty().html(data); $('.loader2').hide(); }); });
score: 0
has comment: http://stackoverflow.com/comment/46683101
has comment: http://stackoverflow.com/comment/46683149
has comment: http://stackoverflow.com/comment/46666503
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/5052543
answer count: 0
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/46828566
has text: if you could provide a fiddle it would be very helpful
comment on: http://stackoverflow.com/q/29318340
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46698256
comment on: http://stackoverflow.com/a/29224459
score: 0
type: AnswerComment
type: Comment
has text: Yes, that is what I had in mind in doing this code. If isValidText returns false, it will be interpreted as true, and the line if(animating || !isValidText()) return false; will immediately return false and will not run the click function.

underscore.js
tags question: http://stackoverflow.com/q/29351262
tags question: http://stackoverflow.com/q/29243575
tags question: http://stackoverflow.com/q/29218772
tags question: http://stackoverflow.com/q/29284548
tags question: http://stackoverflow.com/q/29245671
type: Tag
tags question: http://stackoverflow.com/q/29258961
tags question: http://stackoverflow.com/q/29358258
tags question: http://stackoverflow.com/q/29294081
tags question: http://stackoverflow.com/q/29283475
tag name: underscore.js
tags question: http://stackoverflow.com/q/29242820
tags question: http://stackoverflow.com/q/29329847
tags question: http://stackoverflow.com/q/29282273
tags question: http://stackoverflow.com/q/29256700
tags question: http://stackoverflow.com/q/29314300
tags question: http://stackoverflow.com/q/29221938
tags question: http://stackoverflow.com/q/29283859
tags question: http://stackoverflow.com/q/29271715
tags question: http://stackoverflow.com/q/29330936
tags question: http://stackoverflow.com/q/29317059
tags question: http://stackoverflow.com/q/29347456
tags question: http://stackoverflow.com/q/29296452
tags question: http://stackoverflow.com/q/29282775
tags question: http://stackoverflow.com/q/29254570
tags question: http://stackoverflow.com/q/29235071
tags question: http://stackoverflow.com/q/29301501
tags question: http://stackoverflow.com/q/29350601
tags question: http://stackoverflow.com/q/29290896
tags question: http://stackoverflow.com/q/29328353
tags question: http://stackoverflow.com/q/29347584

http://stackoverflow.com/comment/46905911
comment on: http://stackoverflow.com/q/29340077
has text: Glad your problem solved :)
score: 0
type: QuestionComment
type: Comment

ruby-on-rails-4
type: Tag
tags question: http://stackoverflow.com/q/29240527
tags question: http://stackoverflow.com/q/29254604
tags question: http://stackoverflow.com/q/29303758
tags question: http://stackoverflow.com/q/29231374
tags question: http://stackoverflow.com/q/29244383
tags question: http://stackoverflow.com/q/29367648
tags question: http://stackoverflow.com/q/29240217
tags question: http://stackoverflow.com/q/29236518
tags question: http://stackoverflow.com/q/29222816
tags question: http://stackoverflow.com/q/29231892
tag name: ruby-on-rails-4
tags question: http://stackoverflow.com/q/29369825
tags question: http://stackoverflow.com/q/29233512

http://stackoverflow.com/comment/106488286
type: AnswerComment
type: Comment
has text: is there an way we can make rings interdependent? like in outer ring i need 4 sections and all of them have 2 subsections each!
score: 1
comment on: http://stackoverflow.com/a/33751574

http://stackoverflow.com/q/29371122
score: 0
answer count: 3
tagged with: slider
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46923708
has body: So i have coded a very simple slideshow with previous and next buttons. However, if you press the previous button the slider works but then slides onto a blank div... NOTE: let the slider load press the left grey button and then let the slideshow continue... there is a blank div How do i fix this problem, and what is causing the problem? JS fiddle: https://jsfiddle.net/z93tyrtx/ $("#slider &gt; div:gt(0)").hide(); // fade out current slide (first), fade in next slide and move first slide to end var nextSlide = function () { $("#slider &gt; div:first") .fadeOut(1000) .next() .fadeIn(1000) .end() .appendTo("#slider"); } var nextSlideTimer = setInterval(nextSlide, 5000); // fade out current slide (first) and move last slide to top and fade in $("#prev-button").click(function () { clearInterval(nextSlideTimer); $("#slider &gt; div:first") .fadeOut(1000); $("#slider &gt; div:last") .fadeIn(1000) .prependTo("#slider"); nextSlideTimer = setInterval(nextSlide, 5000) setTimeout(nextSlideTimer, 5000) }); $("#next-button").click(function () { clearInterval(nextSlideTimer); $("#slider &gt; div:first") .fadeOut(1000) .next() .fadeIn(1000) .end() .appendTo("#slider"); nextSlideTimer = setInterval(nextSlide, 5000) setTimeout(nextSlideTimer, 5000) });
has answer: http://stackoverflow.com/a/29371673
accepted answer: http://stackoverflow.com/a/29371673
has answer: http://stackoverflow.com/a/29372395
tagged with: css
type: AnsweredQuestion
has title: How to stop my blank div appearing after click of previous button?
has comment: http://stackoverflow.com/comment/46923641
type: Question
possible better answer: http://stackoverflow.com/a/29372395
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29372755
linked to: http://stackoverflow.com/q/729921

http://stackoverflow.com/comment/46885176
type: QuestionComment
comment on: http://stackoverflow.com/q/29308028
has text: @rgthree - They are actual date objects. My ajax call takes all the current parameters on the page (including the start and end dates) and makes a call to the server to return some data based on all those params. If I make an extra call it will be with invalid data (either start or end date will be temporarily incorrect) and so it would be a pointless call.
score: 0
type: Comment

http://stackoverflow.com/a/29350088
has comment: http://stackoverflow.com/comment/46885968
upvote count: 4
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46886451
accepted answer of: http://stackoverflow.com/q/29349929
type: Answer
has body: getSelection returns an object. You need to call toString() on it. $(document).ready(function () { var selection; $("#textarea").select(function () { selection = window.getSelection().toString(); }); $("#upper").click(function () { if (selection) { var upper = selection.toUpperCase(); var text = $("#textarea").text(); $("#textarea").html(text.replace(selection, upper)); } }); }); JSFiddle: http://jsfiddle.net/TrueBlueAussie/8syb2d8j/4/ Notes: your event handlers were nested (usually a bad idea) I added a check to ensure that there is a selection before trying to upppercase it. as, potentially, the text you highlight may occur more than one, using replace is actually not a great solution. Try highlight the second i and see what I mean. You should use the properties of the selection object instead to work out the exact part of the string that was selected, After browsing around for portable solutions, I found the jQuery TextRange plugin, which, based on the demo is more than enough for this problem.
answers question: http://stackoverflow.com/q/29349929
score: 4
has comment: http://stackoverflow.com/comment/46885859
has comment: http://stackoverflow.com/comment/46885935
has comment: http://stackoverflow.com/comment/46885897

http://stackoverflow.com/a/29226616
answers question: http://stackoverflow.com/q/29226572
type: AcceptedAnswer
downvote count: 0
has body: $("span.characters-count").text(); In our case you work with jQuery Object that has text method $(".characters-count")[0].text(); In this case you work with actual DOM element (like document.getElementByClassName('characters-count')[0]) that does not have text method
score: 4
type: Answer
accepted answer of: http://stackoverflow.com/q/29226572
upvote count: 4

http://stackoverflow.com/comment/46893334
score: 0
type: Comment
type: QuestionComment
has text: How can you check all 3 radio buttons? Only one button in a set can be checked.
comment on: http://stackoverflow.com/q/29354108

http://stackoverflow.com/q/29334900
downvote count: 0
has title: Unmount children not triggering componentWillUnmount
type: Question
score: 3
tagged with: javascript
upvote count: 3
tagged with: reactjs
answer count: 1
favorite count: 0
has body: The problem The React.unmountComponentAtNode within unmountInput of InputsList.jsx isn't triggering the componentWillUnmount within Input.jsx. The code This is the entire code of InputsList.jsx: //... getInitialState: function () { return { keyRefs: [] }; }, handleKeyRefs: function () { var index = 0; this.props.inputs.keys.forEach(function () { this.state.keyRefs.push('key-' + index++); }.bind(this)); }, componentWillMount: function () { this.handleKeyRefs(); }, render: function () { return ( &lt;section className="inputs"&gt; &lt;ul&gt; {this.props.inputs.keys.map(this.renderInput)} &lt;/ul&gt; &lt;/section&gt; ); }, renderInput: function (key, index) { return &lt;Input representation={key.representation} code={key.code} ref={this.state.keyRefs[index]} key={index} /&gt;; }, componentDidMount: function () { var inputs = this.props.inputs.keys , index = 0; $(window).on('keypress', function (event) { if (event.keyCode === inputs[0].code) { inputs.shift(); this.unmountInput(index++); }; }.bind(this)); }, unmountInput: function (index) { return React.unmountComponentAtNode(React.findDOMNode(this.refs['key-' + index])); } //... Input.jsx: var Input = React.createClass({ propTypes: { representation: React.PropTypes.string }, render: function () { return ( &lt;li className="input"&gt;{this.props.representation}&lt;/li&gt; ); }, componentWillUnmount: function () { console.log('unmounted!'); } }); module.exports = Input; Suggestions?
has answer: http://stackoverflow.com/a/29338954
accepted answer: http://stackoverflow.com/a/29338954
type: AnsweredQuestion

http://stackoverflow.com/a/29330452
upvote count: 31
downvote count: 1
has comment: http://stackoverflow.com/comment/46858143
answers question: http://stackoverflow.com/q/29329662
type: Answer
score: 30
has body: It will be a SyntaxError. According to this part of specification: Module : ModuleBody ModuleBody : ModuleItemList ModuleItemList : ModuleItem ModuleItemList ModuleItem ModuleItem : ImportDeclaration ExportDeclaration StatementListItem It means that module can contain only ImportDeclaration's, ExportDeclaration's or StatementListItem's. According to this StatementListItem could not contain ImportDeclaration nor ExportDeclaration. import myFunc1 from 'externalModule1'; is an import declaration, while: if (Math.random()&gt;0.5) { import myFunc2 from 'externalModule2'; } is a statement. So your code will result to a syntax error. What about "will they all be loaded before running the code?". This part of specification contain next sentence: NOTE: Before instantiating a module, all of the modules it requested must be available. So, yeah. They will all be loaded before running the code.

http://stackoverflow.com/q/29359031
tagged with: jquery
has comment: http://stackoverflow.com/comment/46902444
score: 0
tagged with: jquery-events
answer count: 1
has title: Unable to call JavaScript prototype function from angularjs
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46902435
has body: I am trying to call a JavaScript prototype function from ng-click of hyperlink as follows. But I am unable to fire the getInfo() function on link click. Am I missing any basics or doing wrong? This is my JS: $(document).ready(function () { function Apple() { this.type = "fff"; this.color = "red"; } Apple.prototype.getInfo = function () { alert( this.color + ' ' + this.type + ' apple'); }; var appl = new Apple(); }); This is my html: click
has answer: http://stackoverflow.com/a/29359049
type: Question
tagged with: javascript

http://stackoverflow.com/comment/46705319
comment on: http://stackoverflow.com/q/29250252
type: Comment
type: QuestionComment
has text: @D4V1D how should i know about the exact error. in script1 there is only scripts of social media and google analytics
score: 0

http://stackoverflow.com/a/29232053
answers question: http://stackoverflow.com/q/29231974
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29231974
score: 0
type: Answer
has body: Try binding the context, using bind (warning not IE8 compatible): $.each(elem, setCount.bind(this)) This makes the this-context inside each setCount-call, pointing to this from the event handler.

http://stackoverflow.com/q/29334058
type: Question
has title: How do redirect by click item in Angularjs?
has body: There is HTML code: In Jquery I can do: $('.item').click(function () { var url = $(this).attr('data-url'); redirect(url); }); How do this in Angular?
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29339147
linked to: http://stackoverflow.com/q/22592244
possible better answer: http://stackoverflow.com/a/29334109
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/29339147
tagged with: jquery
has answer: http://stackoverflow.com/a/29334109
tagged with: angularjs
type: AnsweredQuestion

http://stackoverflow.com/q/29263916
has body: I have a database server that will be running a script to generate this given file daily: {"data": [ {"variable":"var1","value": "123"}, {"variable":"var2","value": "456"}, {"variable":"var3","value": "789"}]} I am trying to parse this file to set three javascript variables for a HTML canvas element. So far, I'm thinking I'll parse the JSON file var JSONfile = './file.json'; var getData = JSON.parse(JSONfile); Then a for loop to assign the variables for (i = 0; i &lt; getData.length; i++) { var getData.variable=getData.Value; } And I'm hoping to get results of: var var1 = 123; var var2 = 456; var var3 = 789; But var getData.variable=getData.Value; breaks. What am I missing?
score: 1
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/29264726
has title: How can I assign a JavaScript variable by parsing a JSON file?
type: Question
has comment: http://stackoverflow.com/comment/46729821
has comment: http://stackoverflow.com/comment/46729867
tagged with: javascript
upvote count: 2
answer count: 1
downvote count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/46730576
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46730989

http://stackoverflow.com/comment/46676925
score: 0
type: Comment
type: QuestionComment
has text: Please clarify your question. What exactly do you mean by getting full URL link? Do you mean you want to know how to get the form values in PHP? Also, please include the form in your code. It makes it easier for us to understand what you're talking about.
comment on: http://stackoverflow.com/q/29235112

http://stackoverflow.com/comment/46702943
type: QuestionComment
has text: How many of the 's1', 's2' , 's3' ... classes will there be, infinite or a set maximum? And are they all contained in a div that acts as a wrapper or could you add one?
type: Comment
comment on: http://stackoverflow.com/q/29249074
score: 0

http://stackoverflow.com/a/29308855
has comment: http://stackoverflow.com/comment/46816786
accepted answer of: http://stackoverflow.com/q/29285286
score: 0
has body: I finally made it. Just follow this guide http://blogs.msdn.com/b/onenotedev/archive/2014/07/23/how-to-authenticate-with-microsoft-account-in-a-chrome-extension.aspx and you have the code here https://github.com/jameslau-MSFT/MSAuthFromChromeExtSample High-level Steps Here are the things you need to do at a high-level: Create a Client ID and make sure the API settings are set correctly. Set up your Chrome extension properly to use at least 1 content script. We will need it in #4 below. Create the UI in your Chrome extension to sign in, making sure you are setting the redirect URL properly to “https://login.live.com/oauth20_desktop.srf” and response type set to “token”. In your Chrome extension’s content script, watch for the popup window from the Microsoft Account sign in flow. At the right point in time, we will catch the auth_token, store it, and then close the popup window. Manifest should be something like this { "name": "MSAuthFromChromeExtSample", "short_name": "MSAChromeExt", "version": "1.0.0", "description": "Chrome extension that demonstrates how to authenticate against Microsoft Account.", /*"background":{ "page": "background.html" },*/ "browser_action": { /* "default_icon": { "19": "./assets/icons/icon-19.png", "38": "./assets/icons/icon-38.png" },*/ "default_title": "MSA Auth Sample", "default_popup": "./html/popup.html" }, "content_scripts": [ { "matches": ["*://*/*"], "js": ["lib/jquery.min.js", "js/script.js"], "run_at" : "document_end" } ], "permissions": ["history","tabs","storage", "webRequest", "notifications", "&lt;all_urls&gt;"], "manifest_version": 2, "update_url": "http://clients2.google.com/service/update2/crx", "content_security_policy": "script-src 'self' https://js.live.net; object-src 'self'" } A few things to point out: We included js/script.js as a content script. These scripts load each time a document is loaded in a window or tab. We need this to perform #4 above. We also included lib/jquery.min.js as a content script because I wante…
upvote count: 1
type: AcceptedAnswer
downvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/29285286

http://stackoverflow.com/q/29326111
linked to: http://stackoverflow.com/q/29164753
downvote count: 0
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/46928221
has body: I am trying to follow a tutorial on lynda.com which uses angularfire (angularjs firebase) except it uses stuff like $firebase.$asObject and such, which is now obsolete. I tried to look at the documentation as well as some other SOF questions, and I finally found something that worked, but it looks ugly and seems quite inefficient since the only way I found for it to work is to iterate through all the objects in an array returned from the database. This array holds all the users which are registered. This is how I got it to work, but can someone tell me the correct way to do it, because this does not seem like it should be it. var ref = new Firebase(FIREBASE_URL); var auth = firebaseAuth(ref); auth.$onAuth(function(authUser){ if(authUser){ var ref = new Firebase(FIREBASE_URL + 'users/'); var stuff = firebaseArray(ref); ref.on('value', function(snapshot) { if(snapshot.val() !== null) { var keys = Object.keys(snapshot.val()); for(var key in keys){ if(keys.hasOwnProperty(key)){ if(authUser.uid === snapshot.val()[keys[key]].registeredUser){ rootScope.currentUser = snapshot.val()[keys[key]]; } } } } else { console.log('location does not exist'); } }); var user = firebaseObject(ref); //console.log(user); rootScope.currentUser = user; } else { rootScope.currentUser = ''; } }); Here is what my firebase forge looks like: Thank you in advance!
has comment: http://stackoverflow.com/comment/46862657
has comment: http://stackoverflow.com/comment/46863069
tagged with: angularfire
favorite count: 0
has comment: http://stackoverflow.com/comment/46928256
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46855190
upvote count: 1
has title: getting single objects out of $angularfire/$firebase
has comment: http://stackoverflow.com/comment/46855249
tagged with: firebase
has answer: http://stackoverflow.com/a/29372685
score: 1
linked to: http://stackoverflow.com/q/29129341
type: Question
linked to: http://stackoverflow.com/q/29309537

http://stackoverflow.com/q/29354761
favorite count: 0
has title: Lost trying to create a stopwatch
has comment: http://stackoverflow.com/comment/46894921
upvote count: 1
has answer: http://stackoverflow.com/a/29355008
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46895076
score: 1
has body: I'm trying to self-taugh JavaScript and while doing some texts with a stopwatch I got lost into this problem. It's working but it's always starting on 95:34:47 instead of 00:00:00 This is what i tried so far. Time: I understand that I need to subtract an specific amount of time to match the timer accurately, however I can't figure out how to do it.
has answer: http://stackoverflow.com/a/29355003
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
linked to: http://stackoverflow.com/q/20318822
tagged with: stopwatch
possible better answer: http://stackoverflow.com/a/29355003
accepted answer: http://stackoverflow.com/a/29355008

http://stackoverflow.com/q/29344381
has answer: http://stackoverflow.com/a/29345371
type: UnansweredQuestion
has body: I want to stimulate automatic download using JavaScript. Below is my code. var a = document.createElement("a"); a.href = filepath; a.download = filename; a.click(); a.click() method is working fine with my Chrome browser but not working in IE 11/ 10 browser. Can anybody help me with this. Edit 1 : my requirement is simple. i want create anchor tag, add file path and my new file name and Click method it will download file with new name. it is working on Chrome browser but not working on IE browser. As per my finding IE does not support download attribute with anchor tag.
has comment: http://stackoverflow.com/comment/46912653
has comment: http://stackoverflow.com/comment/46876728
type: Question
tagged with: internet-explorer-11
has comment: http://stackoverflow.com/comment/46910241
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/46907739
upvote count: 1
answer count: 1
downvote count: 1
has title: Anchor tag click method not working in internet explore 11
favorite count: 0

http://stackoverflow.com/comment/46834530
type: Comment
comment on: http://stackoverflow.com/a/29312803
type: AnswerComment
has text: A couple of issues/caveats: 1: this will not allow the user to enter any spaces and will move the cursor forward one character every time spacebar is pressed. 2: If a user backspaces the first character of a word (other than the first) then the cursor will move to the back to the same position since the character before it will be a space.
score: 0

http://stackoverflow.com/comment/46832185
type: QuestionComment
has text: He clearly set data type 'html', but by all means make random guesses guys.
score: 0
type: Comment
comment on: http://stackoverflow.com/q/29320318

http://stackoverflow.com/a/29280050
score: 1
accepted answer of: http://stackoverflow.com/q/29279966
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/29279966
has comment: http://stackoverflow.com/comment/46758039
has body: you are iterating over all elements in the elements of dataArray. But then you print the index of dataArray. Try dataArray[key][i] or obj[i]
type: Answer
upvote count: 1

http://stackoverflow.com/a/29350661
has comment: http://stackoverflow.com/comment/46888608
answers question: http://stackoverflow.com/q/29350355
score: 2
downvote count: 0
has body: Spring is a little touchy when it comes to @RequestParam, POST body, and JSON content-type: it simply won't parse them. You can solve this problem one of three ways: Change the content-type to be application/x-www-form-urlencoded Change the two @RequestParam to be a single @RequestBody Map&lt;String, Object&gt; body, then use that Map to manually parse out your parameters. Set up a custom Argument Resolver that can parse JSON for your desired values. The second method is likely the easiest to change, but it loses you some of the automagic validation that Spring does for you.
has comment: http://stackoverflow.com/comment/46887609
upvote count: 2
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29350355
type: Answer
has comment: http://stackoverflow.com/comment/46887714

http://stackoverflow.com/q/29312833
answer count: 2
has answer: http://stackoverflow.com/a/29313405
has title: Extract specific values from multidimensional array javascript
has body: I have a multidimensional array seen below. I wish extract all the ingredients values from it, and then do an action with them, like count how many of each there are. var products = [ { name: "Sonoma", ingredients: ["artichoke", "sundried tomatoes", "mushrooms"], containsNuts: false }, { name: "Pizza Primavera", ingredients: ["roma", "sundried tomatoes", "goats cheese", "rosemary"], containsNuts: false }, { name: "South Of The Border", ingredients: ["black beans", "jalapenos", "mushrooms"], containsNuts: false }, { name: "Blue Moon", ingredients: ["blue cheese", "garlic", "walnuts"], containsNuts: true }, { name: "Taste Of Athens", ingredients: ["spinach", "kalamata olives", "sesame seeds"], containsNuts: true } ]; I have done this using a function from Underscore.js, _.flatten(), and the vanilla javascript function map(), but I had to use map() twice. Once for extracting all the ingredients, and then to make a hash style structure that counts up the number of times each ingredient occurs. I store these counts in a separate object, ingredientCount in this case. var ingredientCount = {}; _.flatten(products.map(function(x) { return x.ingredients; })).map(function(y){ return ingredientCount[y] = (ingredientCount[y] || 0) + 1; }); console.log(ingredientCount); will output the following list: { artichoke: 1, 'sundried tomatoes': 2, mushrooms: 2, roma: 1, 'goats cheese': 1, rosemary: 1, 'black beans': 1, jalapenos: 1, 'blue cheese': 1, garlic: 1, walnuts: 1, spinach: 1, 'kalamata olives': 1, 'sesame seeds': 1 } I have solved my problem, but I feel like there should be a cleaner, more efficient way to do this without using map() twice. Can anyone help me out? I apologize in advance if this is a duplicate question.
tagged with: higher-order-functions
has answer: http://stackoverflow.com/a/29313154
tagged with: multidimensional-array
type: UnansweredQuestion
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/46819425
score: 0

http://stackoverflow.com/comment/46889222
type: QuestionComment
has text: "Not working" means what? How about adding some example data to your question.
score: 2
comment on: http://stackoverflow.com/q/29351985
type: Comment

http://stackoverflow.com/comment/46780584
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29258925
has text: @slicedtoad That fork has fullcalendar with resource view sample, do you have any another solutions?

http://stackoverflow.com/comment/46866075
has text: edited. Though I suppose in the OP's question, the problem is really that one of the `ng-app`s isn't needed.
type: AnswerComment
type: Comment
score: 1
comment on: http://stackoverflow.com/a/29339098

http://stackoverflow.com/q/29359646
answer count: 0
type: UnansweredQuestion
upvote count: 1
tagged with: socket.io
type: Question
has title: Why does my socket.io code emit the message to everyone connected, when I specifically wrote socket.in(room)...?
has comment: http://stackoverflow.com/comment/46903669
has body: I am trying to set up a webrtc app. For now, it connects two people when they click connect. But if I have multiple connections open, and then when one of the people from the very first connection clicks disconnect, it literally disconnects EVERYONE who has a connection. I tried this with 3 connections, and disconnected the 2nd connection, and that only makes the 3rd connection disconnect, while the first is still connected. So basically, it's a downward spiral. If a connection disconnects, then all connections created AFTER that one connection also get to disconnect. But all connections before that connection are still active. I think it has something to do with the socket.io code, because in the console.log I am receiving the message from socket.io as someone in a totally different connection disconnects. Server code: socket.on("sessiondesc", function(sessiondesc) { if (sessiondesc == true || sessiondesc.type === 'answer') { //the random room is generated before the socket.on sessiondesc thing. socket.join(room) } socket.in(room).emit("sessiondesc", sessiondesc); }); socket.on("quit", function(quit) { socket.leave(room) }); This is client code: socket.on("sessiondesc", function(sessiondesc) { //stuff I do here with webrtc... like create offer, answer, and such. else if (sessiondesc == false) { pc.close(); pc = null; console.log("GOT THE FALSE SESSION DESC! GOT IT"); quit = true; socket.emit("quit", quit); } document.getElementById("disconnect").addEventListener("click", function(e) { console.log("The person clicked disconnect!"); quit = true; sessiondesc = false; socket.emit("sessiondesc", sessiondesc); socket.emit("quit", quit); pc.close(); pc = null; }); So basically on all the other connections that disconnect, I can see the console.log("GOT THE SESSION DESC") thing... And I'm thinking like, why are these other rooms getting this sessiondesc? They shouldn't be, I'm only emitting it to a specific room!
tagged with: webrtc
has comment: http://stackoverflow.com/comment/46934015
downvote count: 0
tagged with: javascript
score: 1
favorite count: 0
tagged with: p2p
has comment: http://stackoverflow.com/comment/46935430
has comment: http://stackoverflow.com/comment/46924636
tagged with: node.js
has comment: http://stackoverflow.com/comment/46903980

http://stackoverflow.com/comment/46790697
has text: @Grokify: Yes, and the statement "In my Javascript I check..." is still incorrect.
score: 0
comment on: http://stackoverflow.com/q/29297257
type: QuestionComment
type: Comment

http://stackoverflow.com/q/29367236
has answer: http://stackoverflow.com/a/29369782
tagged with: javascript
tagged with: ecmascript-6
has answer: http://stackoverflow.com/a/39609822
answer count: 3
downvote count: 0
tagged with: meteor
favorite count: 0
has body: I have recently discovered Meteor and I am struggling with using ES6 classes and imports in a new Meteor project. What I want to do is to have a complex structure of classes, which methods get called from Meteor events/methods/helpers. I've added Babel.js to the project by writing a command $ meteor add grigio:babel and it works properly. Example of what I am trying to achieve: in server/models/article.js: class Article { static all() { //returns all articles from db } } in server/methods/articles.js: Meteor.methods({ allArticles: { Article.all(); } }) Having just that raises ReferenceError: Article is not defined in a methods file, which is adequate. So I have got three options: write all classes in one file, append all classes to a global object or use a good module system like Browserify. Obviously, third option is better. But how do I use that? Babel converts export, import into Browserify by default and Meteor raises a require is not defined error on page refresh. After googling the problem I didn't find a clear solution on how to add Browserify to Meteor. Should I add a npm packages support to Meteor, add a npm package of browserify and add it manually to Meteor on every page where I import/export anything? Or should I use a completely different approach? How is this task usually handled in Meteor? Thank you!
tagged with: browserify
has answer: http://stackoverflow.com/a/31810937
type: UnansweredQuestion
tagged with: module
has title: How to properly use es6 classes in different files by importing them in Meteor?
has comment: http://stackoverflow.com/comment/51591340
score: 7
upvote count: 7
type: Question

http://stackoverflow.com/comment/46892066
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29352839
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/74130/discussion-between-pankajparkar-and-devesh-agrawal).

http://stackoverflow.com/q/29354171
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/46893404
has title: How to remove header and footer of a iframe on printing - javascript
tagged with: http://stackoverflow.com/tag/html
answer count: 0
type: UnansweredQuestion
tagged with: iframe
has body: I'm having a problem by trying to print a iframe on my page. Imagine that i have this: Some data.. I'm using this code (example) After this i put a button to print only what is inside the iframe, but when I print, it aways come with the default header and footer. How can I block this to happen? thanks.
has comment: http://stackoverflow.com/comment/46893547
score: 0
has comment: http://stackoverflow.com/comment/46893572
has comment: http://stackoverflow.com/comment/46893604

http://stackoverflow.com/comment/46795859
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/29300544
has text: i wrote that data.split("\n") error will be raising

http://stackoverflow.com/a/29283412
has body: i did something like this to fake a gif with fading animations: you could simply adjust it to your needs on an onclick handler instead of a setInterval function fakeGif(container, speed) { $(container).find('.active').css('z-index', 3); setInterval(function() { var $active = $(container).find('.active'); var $next = ($active.next().length &gt; 0) ? $active.next() : $(container).find('.gif').first(); $next.css('z-index',2);//move the next image up the pile $active.fadeOut(1000,function(){//fade out the top image $active.css('z-index',1).fadeIn(1000).removeClass('active');//reset the z-index and unhide the image $next.css('z-index',3).addClass('active');//make the next image the top one }); }, speed); } $('.gif--container').each(function(){ var time = $(this).attr('data-gif-time'); var container = $(this); $(this).find('.gif').first().addClass('active'); fakeGif(container,time); }); and the Html for this is simple: &lt;div class="gif--container" data-gif-time="3000"&gt; &lt;div class="gif image:parent fl"&gt; &lt;img src="whatever1.jpg" /&gt; &lt;/div&gt; &lt;div class="gif image:parent fl"&gt; &lt;img src="whatever2.jpg" /&gt; &lt;/div&gt; &lt;div class="gif image:parent fl"&gt; &lt;img src="whatever3.jpg" /&gt; &lt;/div&gt; &lt;/div&gt;
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29283025

http://stackoverflow.com/q/29342446
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/29342996
answer count: 2
upvote count: 1
tagged with: google-chrome-extension
possible better answer: http://stackoverflow.com/a/29342996
tagged with: jquery
favorite count: 0
accepted answer: http://stackoverflow.com/a/29345085
type: AnsweredQuestion
has title: Unable to use jquery in google chrome extension
has answer: http://stackoverflow.com/a/29345085
has body: I am trying to use jquery to make a post ajax call and I have tried almost all the solutions on SO but none seem to work. My manifest is: {"name": "__MSG_extName__", "version": "0.1", "manifest_version": 2, "description": "__MSG_extDesc__", "icons": {"16": "icon16.png", "128": "icon128.png"}, "background": {"persistent": false, "scripts": ["background.js"]}, "default_locale": "en", "content_scripts": [ { "matches": ["&lt;all_urls&gt;"], "js": ["jquery-2.1.3.js"] } ], "permissions": ["contextMenus", "downloads", "downloads.open", "tabs", "http://*/*", "https://*/*"]} The background.js file is like: chrome.downloads.onCreated.addListener(function(downloadItem) { console.log("Download Link is " + downloadItem.url) chrome.tabs.executeScript(null, { file: "jquery-2.1.3.js" }, function() { console.log("jquery is loaded"); var linkSync = { "document": { "downloadLink": downloadItem.url, "isSynced": false}, "safe": true }; $.post("url/to/post", linkSync, function( data ) { console.log("Success" + data ); }); }); }); The error that I am getting is: Download Link is http://www.mymp3song.com/files/download/id/33724 background.js:14 jquery is loaded extensions::uncaught_exception_handler:8 Error in response to tabs.executeScript: ReferenceError: $ is not defined at Object.callback (chrome-extension://kbhkaajolcelehoonafmkgaahfgphnok/background.js:22:2) at chrome-extension://kbhkaajolcelehoonafmkgaahfgphnok/background.js:13:16 As you may see, I have added the jquery.js both programmatically and in the manifest but none seem to work. Even if I remove either of them it does not work. Can someone point to me what I should do to make it work?
downvote count: 0
score: 1

http://stackoverflow.com/comment/46868600
type: QuestionComment
has text: Try this, var value=string.split("."); console.log(value[1]);
comment on: http://stackoverflow.com/q/29340440
score: 0
type: Comment

http://stackoverflow.com/q/29277681
score: 4
has answer: http://stackoverflow.com/a/29298942
accepted answer: http://stackoverflow.com/a/29298942
type: Question
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: scrollmagic
tagged with: http://stackoverflow.com/tag/html
upvote count: 4
tagged with: css
has title: ScrollMagic duration without padding
downvote count: 0
type: AnsweredQuestion
has body: This is the rough structure of my website: &lt;header&gt; &lt;section1&gt; &lt;section2&gt; &lt;section3&gt; &lt;footer&gt; I'm using a ScrollMagic scene to pin my header until section2 gets to the top of the window. To achieve that I set the duration of the scene to the header's height + section1 height. The problem is that ScrollMagic creates a div element around my header with a padding-bottom of exactly that duration. But I don't want that padding. I would like the header to be right on top of section1 and once I start scrolling to act as if it was fixed - but only until I get to section 2. At the moment section 2 gets to the top of the window (minus the header height) I want the scene to end and the header to scroll out. In fact everything works as it should when I set the duration to 0. But obviously that also lets my header stay there the whole time and not disappear once I get to section2. I hope that was understandable. Here is my code: var controller = new ScrollMagic.Controller(); var headerscroll = $("#header").height() + $("#section1").height() ; var headerScene = new ScrollMagic.Scene({ pushFollowers: false, duration: headerscroll, offset: 30 }) .setPin("#header"); controller.addScene([ headerScene ]);
favorite count: 0

http://stackoverflow.com/comment/46758812
type: QuestionComment
has text: Have you included `jQuery` properly?
score: 0
comment on: http://stackoverflow.com/q/29280442
type: Comment

http://stackoverflow.com/comment/46969298
type: Comment
comment on: http://stackoverflow.com/a/29319322
type: AnswerComment
score: 0
has text: @Robert It seems that the error is outside of the View and Controller. First, to make sure you setup Sencha correctly, try to run some code samples which can be found online. Second, if samples run without any problem. Add the other project files to question. Goodluck.

http://stackoverflow.com/comment/46911965
score: 1
has text: A demo would be great for this, that way we could test it and show you a demo of it after a fix. Think about creating a demo in JSFiddle.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29364402

http://stackoverflow.com/comment/46802929
type: Comment
comment on: http://stackoverflow.com/a/29304210
score: 0
type: AnswerComment
has text: This just outputs the numbers 0-3 instead of error messages.

http://stackoverflow.com/comment/46824834
type: Comment
has text: Far too many unknowns here without seeing some code
comment on: http://stackoverflow.com/q/29314884
score: 0
type: QuestionComment

http://stackoverflow.com/comment/46903736
type: QuestionComment
has text: `$("#refresh").load("test.php?page=tourneys&id=" + tournamentid + "&action=teams #refresh > *");` - it won't work is there is a text node as the direct child of refresh
score: 0
type: Comment
comment on: http://stackoverflow.com/q/29359776

http://stackoverflow.com/comment/46832229
type: QuestionComment
has text: I see, thank you. Is there any possibility you could you help me with an explicit way of doing this?
score: 0
comment on: http://stackoverflow.com/q/29320174
type: Comment

http://stackoverflow.com/a/29238304
downvote count: 0
type: Answer
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/29232286
has body: This should do it: function BoldBetweenTags() { var startTag = '{start}'; var endTag = '{end}' var body = DocumentApp.getActiveDocument().getBody(); var para = body.getParagraphs(); for(var i in para){ var from = para[i].findText(startTag); var to = para[i].findText(endTag,from); if((to != null &amp;&amp; from != null) &amp;&amp; ((to.getStartOffset()-1) - (from.getStartOffset()+startTag.length) &gt; 0) ){ para[i].editAsText().setBold(from.getStartOffset()+startTag.length, to.getStartOffset()-1, true); } } }
accepted answer of: http://stackoverflow.com/q/29232286
type: AcceptedAnswer

http://stackoverflow.com/comment/46653347
has text: *Prevent selection using keyboard* —the above doesn't meet this criterion. Use tab to focus the field, which selects the entire content by default, so the value can then be copied. I don't know why anyone would want to do this anyway.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29222158
type: Comment

http://stackoverflow.com/comment/46836887
type: Comment
has text: I'm using the code in the page especified in this question: http://stackoverflow.com/questions/29247511/how-can-i-enable-right-click-in-jquery
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29322924

http://stackoverflow.com/q/29221868
has comment: http://stackoverflow.com/comment/46654251
tagged with: css
has comment: http://stackoverflow.com/comment/46653787
downvote count: 0
tagged with: twitter-bootstrap
score: 1
has comment: http://stackoverflow.com/comment/46652794
has comment: http://stackoverflow.com/comment/46653006
type: Question
has body: I really like the Filtrify plugin with the multiple search categories like on this link http://luis-almeida.github.io/filtrify/movies.html by Luis. It is perfect for my project but I'm using bootstrap as a framework and this plugin uses version 1.7.1 of jquery and bootstrap needs 1.9.+. Is there a way so I can use both or is not possible? If not, do you guys know of similar plugin that I can use ? I need to be able to search multiple items and filter content by those items. My first try was to use the instafilta but then I can only search for one item at a time, unless I don't know how to configure it. So to be exact, the Filtrify demo that I posted is exactly what I need. This is the content of my project. I want to be able to search for for example Javascript and C++ and filter the users that have that in their list. https://i.sstatic.net/ntT2x.jpg This is my first post so I hope this is specific enough. Thanks in advance.
has comment: http://stackoverflow.com/comment/46653056
tagged with: javascript
has answer: http://stackoverflow.com/a/29221986
answer count: 3
has comment: http://stackoverflow.com/comment/46652802
upvote count: 1
has answer: http://stackoverflow.com/a/50918428
has title: Is there a way to use Filtrify that has outdated jquery with bootstrap that needs higher versions of jquery?
tagged with: jquery
has answer: http://stackoverflow.com/a/58967655
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46652680

http://stackoverflow.com/a/29255263
has body: This row hat to be replaced with: $(row).children().children().each(function () { updateElementIndex(this, prefix, formCount); $(this).val(""); $(row).children().children().children().each(function () { updateElementIndex(this, prefix, formCount); $(this).val(""); Since the HTML produced a div with 3 nested elements with the two .children() the replacement only reached to the lables and the controll but not to the input.
type: Answer
answers question: http://stackoverflow.com/q/29252714
score: 0
accepted answer of: http://stackoverflow.com/q/29252714
type: AcceptedAnswer

http://stackoverflow.com/q/29290640
tagged with: javascript
has title: JavaScript .call() function "this" value returning 3
has comment: http://stackoverflow.com/comment/46778310
has comment: http://stackoverflow.com/comment/46778331
accepted answer: http://stackoverflow.com/a/29290675
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/46778454
has comment: http://stackoverflow.com/comment/46778307
has answer: http://stackoverflow.com/a/29290675
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46778350
has body: I was reading about the JavaScript .call() method on MSDN and saw the following code: function callMe(arg1, arg2){ var s = ""; s += "this value: " + this; s += "&lt;br /&gt;"; for (i in callMe.arguments) { s += "arguments: " + callMe.arguments[i]; s += "&lt;br /&gt;"; } return s; } document.write("Original function: &lt;br/&gt;"); document.write(callMe(1, 2)); document.write("&lt;br/&gt;"); document.write("Function called with call: &lt;br/&gt;"); document.write(callMe.call(3, 4, 5)); // Output: // Original function: // this value: [object Window] // arguments: 1 // arguments: 2 // Function called with call: // this value: 3 // arguments: 4 // arguments: 5 From this document I understand that the purpose of .call() is: The call method is used to call a method on behalf of another object. It allows you to change the this object of a function from the original context to the new object specified by thisObj. The main code in question is: document.write(callMe.call(3, 4, 5)); Why does this return 3 as the this value? How is that the global object?
has comment: http://stackoverflow.com/comment/46779101
has comment: http://stackoverflow.com/comment/46815840
type: Question
has comment: http://stackoverflow.com/comment/46778349
has comment: http://stackoverflow.com/comment/46778775

http://stackoverflow.com/comment/46816160
has text: Maybe read [this question and answers](http://stackoverflow.com/questions/28250680/how-do-i-access-previous-promise-results-in-a-then-chain)?
comment on: http://stackoverflow.com/q/29309568
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46895066
comment on: http://stackoverflow.com/q/29349774
has text: Thanks, everyone. I, indeed, was reading the value of `data` too soon. Cheers!
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/a/29270998
answers question: http://stackoverflow.com/q/29270938
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29270938
type: Answer
score: 1
upvote count: 1
has body: I'll never recommend it if possible, but here the problem is when you are updating the scope values from outside of the digest cycle, angularjs will not run the watches associated with the scope properties, so the UI and other updates done by angular watches will not happen. One possible solution is to call Scope.$apply() which will help to execute angular life cycle methods. var str; $(document).ready(function () { str = '{"id":"1","name":"Nang Thang Hai","university":"Hutech University","gender":"true"},{"id":"2","name":"Gio Thang Chin","university":"Foreign Trade University","gender":"false"}'; angular.element('#angularController').controller().doSomthing(str); angular.element('#angularController').scope().$apply(); //angular.element('#angularController').controller() }); Demo: Fiddle

http://stackoverflow.com/a/29290213
type: Answer
answers question: http://stackoverflow.com/q/29290058
has body: Essentially, each time you call the array with your variables to be printed, you are calling the contents of the array in the position specified between the [ ]. It may be another array. That you can access as you would any other array. So, it would be:external_array[extrenal_array_index][internal_array_index]
score: 0

http://stackoverflow.com/comment/46712682
comment on: http://stackoverflow.com/q/29254862
type: Comment
type: QuestionComment
has text: you only can do it with javascript. php is all server side.
score: 1

http://stackoverflow.com/comment/46879014
type: QuestionComment
has text: But maybe you want `_.bar.print = (function(){ ... }).bind(this)` ?
comment on: http://stackoverflow.com/q/29346600
score: 0
type: Comment

twitter-bootstrap
tags question: http://stackoverflow.com/q/29337600
tags question: http://stackoverflow.com/q/29253431
tags question: http://stackoverflow.com/q/29357216
tags question: http://stackoverflow.com/q/29343623
tags question: http://stackoverflow.com/q/29331261
tag name: twitter-bootstrap
tags question: http://stackoverflow.com/q/29245335
tags question: http://stackoverflow.com/q/29338953
tags question: http://stackoverflow.com/q/29271508
tags question: http://stackoverflow.com/q/29226900
tags question: http://stackoverflow.com/q/29302324
tags question: http://stackoverflow.com/q/29239564
tags question: http://stackoverflow.com/q/29308129
tags question: http://stackoverflow.com/q/29222150
tags question: http://stackoverflow.com/q/29311545
tags question: http://stackoverflow.com/q/29323706
tags question: http://stackoverflow.com/q/29254821
tags question: http://stackoverflow.com/q/29371492
tags question: http://stackoverflow.com/q/29327958
tags question: http://stackoverflow.com/q/29306587
tags question: http://stackoverflow.com/q/29231147
tags question: http://stackoverflow.com/q/29229808
tags question: http://stackoverflow.com/q/29317400
tags question: http://stackoverflow.com/q/29251927
tags question: http://stackoverflow.com/q/29358339
tags question: http://stackoverflow.com/q/29283873
tags question: http://stackoverflow.com/q/29261489
tags question: http://stackoverflow.com/q/29233559
tags question: http://stackoverflow.com/q/29311764
tags question: http://stackoverflow.com/q/29284403
tags question: http://stackoverflow.com/q/29339746
tags question: http://stackoverflow.com/q/29307144
tags question: http://stackoverflow.com/q/29284569
tags question: http://stackoverflow.com/q/29266916
tags question: http://stackoverflow.com/q/29242074
tags question: http://stackoverflow.com/q/29316681
tags question: http://stackoverflow.com/q/29305971
tags question: http://stackoverflow.com/q/29225594
tags question: http://stackoverflow.com/q/29316340
tags question: http://stackoverflow.com/q/29227864
tags question: http://stackoverflow.com/q/29304460
tags question: http://stackoverflow.com/q/29364354
tags question: http://stackoverflow.com/q/29241134
tags question: http://stackoverflow.com/q/29239012
tags question: http://stackoverflow.com/q/29234405
tags question: http://stackoverflow.com/q/29226144
tags question: http://stackoverflow.com/q/29316706
tags question: http://stackoverflow.com/q/29218925
tags question: http://stackoverflow.com/q/29358151
tags question: http://stackoverflow.com/q/29280317
tags question: http://stackoverflow.com/q/29336966
tags question: http://stackoverflow.com/q/29339174
tags question: http://stackoverflow.com/q/29327102
tags question: http://stackoverflow.com/q/29361993
type: Tag
tags question: http://stackoverflow.com/q/29334766
tags question: http://stackoverflow.com/q/29336462
tags question: http://stackoverflow.com/q/29240675
tags question: http://stackoverflow.com/q/29297276
tags question: http://stackoverflow.com/q/29365677
tags question: http://stackoverflow.com/q/29366973
tags question: http://stackoverflow.com/q/29303478
tags question: http://stackoverflow.com/q/29234135
tags question: http://stackoverflow.com/q/29352356
tags question: http://stackoverflow.com/q/29231999
tags question: http://stackoverflow.com/q/29272187
tags question: http://stackoverflow.com/q/29369377
tags question: http://stackoverflow.com/q/29297906
tags question: http://stackoverflow.com/q/29221868
tags question: http://stackoverflow.com/q/29360634
tags question: http://stackoverflow.com/q/29324219
tags question: http://stackoverflow.com/q/29330765
tags question: http://stackoverflow.com/q/29249914
tags question: http://stackoverflow.com/q/29241042
tags question: http://stackoverflow.com/q/29360090
tags question: http://stackoverflow.com/q/29299263
tags question: http://stackoverflow.com/q/29253323
tags question: http://stackoverflow.com/q/29362520
tags question: http://stackoverflow.com/q/29229225
tags question: http://stackoverflow.com/q/29314909

http://stackoverflow.com/comment/46674081
has text: Are you talking about Classic ASP or ASP.net? Your talk of controls and repeaters suggests the latter.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29221661

http://stackoverflow.com/q/29367030
linked to: http://stackoverflow.com/q/13480214
accepted answer: http://stackoverflow.com/a/32187751
score: 2
tagged with: spyon
upvote count: 2
type: Question
has answer: http://stackoverflow.com/a/29367716
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46916784
tagged with: javascript
possible better answer: http://stackoverflow.com/a/29367716
has comment: http://stackoverflow.com/comment/52835458
has title: spyOn: Expected a spy, but got Function
answer count: 2
has answer: http://stackoverflow.com/a/32187751
has comment: http://stackoverflow.com/comment/46916845
has body: I'm creating some Javascript tests using Jasmine framework. I am trying to use the spyOn() method to ensure a specific function have been called. here is my code describe("Match a regular expression", function() { var text = "sometext"; //not important text; irrelevant value beforeEach(function () { spyOn(text, "match"); IsNumber(text); }); it("should verify that text.match have been called", function () { expect(text.match).toHaveBeenCalled(); }); }); but I'm getting an Expected a spy, but got Function error. I tried to remove the spyOn(text, "match"); line, and it gave the same error, it seems that the fucntion spyOn() is not working is it should. Any thought?
has comment: http://stackoverflow.com/comment/46916712
downvote count: 0
tagged with: jasmine
favorite count: 0

http://stackoverflow.com/q/29292709
has answer: http://stackoverflow.com/a/29293362
type: Question
has comment: http://stackoverflow.com/comment/46782093
has title: retain data in forms when going to another form and coming back again
tagged with: javascript
has comment: http://stackoverflow.com/comment/46782765
tagged with: forms
tagged with: ionic-framework
linked to: http://stackoverflow.com/q/8861181
answer count: 2
has comment: http://stackoverflow.com/comment/46782719
has comment: http://stackoverflow.com/comment/46782173
has body: I have a form and there i have included some text boxes and select boxes. I'm using ionic framework and angularjs. When completing this form and on submit goes to another page to enter a password. So i want to move back to the previous form i can always press back and come. But the problem is the data i entered is gone.i have to complete the form all over again. Is there a way to fix this? Thanks. On submit using below line i move into the password form $state.go('app.transpass');
has comment: http://stackoverflow.com/comment/46782466
tagged with: angularjs
has answer: http://stackoverflow.com/a/29294009
type: UnansweredQuestion
score: 0

http://stackoverflow.com/comment/46900562
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29357992
has text: Some reference: https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage

http://stackoverflow.com/q/29367648
upvote count: 0
tagged with: ruby-on-rails
type: Question
has answer: http://stackoverflow.com/a/29368678
tagged with: javascript
has title: Stuck on how to display an error message if no emp id is found
score: -1
tagged with: ruby-on-rails-4
answer count: 1
downvote count: 1
favorite count: 0
has body: Question is I have a query that looks at my emp_id text box once something is typed in it searches for the information tied to that emp_id which in my other table that it searches for its called ID.. If the emp_id matches the id in my visual model it will populate their first name and last name for them. I would like to know how I can get it to display an error if no emp_id matches an id in my visual model.... With what I have so far I get a nomethod error for first name for nil class in app/controller/populate_form which I im not sure why my guess is when it finds no match it thinks that its a nil and returns nothing..Im at a bit of a lose any help would be greatly appreciated thanks!! This is my visual model class Visual < ActiveRecord::Base establish_connection :vtest self.table_name = 'employee' Visual.inheritance_column = 'inheritance_type' belongs_to :user def emp_matches(x) (x.id.to_i == self.id.to_i ? true : false) end end This is my user controller that has the my populate form method class UserController < ApplicationController def populate_form @visual = Visual.find_by_id(params[:emp_id]) if @emp_matches == 'False' respond_to do |format| format.json { render json: @user.errors, status: :unprocessable_entity, flash[:error] => "Error No ID found." } end else @visual = Visual.find_by_id(params[:emp_id]) @emp_first_name = @visual.first_name @emp_last_name = @visual.last_name render :json => { :emp_first_name => @emp_first_name, :emp_last_name => @emp_last_name } end end And this is my view.. <%= f.text_field :emp_id, tabindex: 1, id: 'emp_id', autofocus: true, placeholder: t( 'login_label' ), class: 'form-control' %> <%= f.text_field :emp_first_name, tabindex: 1, id: 'emp_first_name', autofocus: true, placeholder: t( 'login_label' ), class: 'form-control' %> And here is my App.js $(document).ready(function(){ $('#emp_id').change(function() { var url = "/user/populate_form?emp_id="+$(this).val(); $.getJSON(url, function(data) { if(!(data.emp_first_name === und…
tagged with: ruby
type: UnansweredQuestion

http://stackoverflow.com/q/29227306
has comment: http://stackoverflow.com/comment/46670383
downvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
has body: I'm trying to deploy a nodeJS application in azure. In deployment i have the npm ERR! errno 47. Maybe can help that i had exceded the maximum character paths while developing, which i fixed it locally. All answers would be appreciate. Command: "D:\home\site\deployments\tools\deploy.cmd" Handling node.js deployment. KuduSync.NET from: 'D:\home\site\repository' to: 'D:\home\site\wwwroot' Copying file: 'index.js' Copying file: 'mmfrontend-crm-node.njsproj' Copying file: 'package.json' Node.js versions available on the platform are: 0.6.17, 0.6.20, 0.8.2, 0.8.19, 0.8.26, 0.8.27, 0.8.28, 0.10.5, 0.10.18, 0.10.21, 0.10.24, 0.10.26, 0.10.28, 0.10.29, 0.10.31, 0.10.32, 0.12.0. Selected node.js version 0.10.32. Use package.json file to choose a different version. Updating iisnode.yml at D:\home\site\wwwroot\iisnode.yml npm WARN package.json mmfrontend-crm-node@1.0.0 No description npm WARN package.json mmfrontend-crm-node@1.0.0 No repository field. npm WARN deprecated gulp-clean@0.3.1: use gulp-rimraf instead npm WARN engine imagemin@2.2.1: wanted: {"node":"&gt;=0.10.0","npm":"&gt;=2.1.5"} (current: {"node":"0.10.32","npm":"1.4.28"}) npm WARN optional dep failed, continuing imagemin-pngquant@4.0.0 npm WARN optional dep failed, continuing imagemin-optipng@4.2.0 npm WARN optional dep failed, continuing imagemin-jpegtran@4.1.0 npm WARN optional dep failed, continuing imagemin-gifsicle@4.1.0 npm ERR! EEXIST, open 'D:\local\AppData\npm-cache\5428a087-m-cache-wrappy-1-0-1-package-tgz.lock' File exists: D:\local\AppData\npm-cache\5428a087-m-cache-wrappy-1-0-1-package-tgz.lock Move it away, and try again. npm ERR! System Windows_NT 6.2.9200 npm ERR! command "D:\\Program Files (x86)\\nodejs\\0.10.32\\node.exe" "D:\\Program Files (x86)\\npm\\1.4.28\\node_modules\\npm\\bin\\npm-cli.js" "install" "--production" npm ERR! cwd D:\home\site\wwwroot npm ERR! node -v v0.10.32 npm ERR! npm -v 1.4.28 npm ERR! path D:\local\AppData\npm-cache\5428a087-m-cache-wrappy-1-0-1-package-tgz.lock npm ERR…
tagged with: azure
has title: Azure deploy error errno 47
type: UnansweredQuestion
upvote count: 1
tagged with: node.js
has answer: http://stackoverflow.com/a/35100997
score: 1
type: Question

http://stackoverflow.com/a/63886707
score: 0
answers question: http://stackoverflow.com/q/29292051
type: Answer
has body: Set a unique key to local storage during the build process I am using react static and loading up my own data file, in there i set the ID each time my content changes Then the frontend client reads the key with from local storage (if the key does not exist it must be the first visit of the browser) if the key from local storage does not match it means the content has changed fire line below to force reload window.replace(window.location.href + '?' + key) in my case i had to run this same line again a second latter like setTimeout( (window.replace(window.location.href + '?' + key))=&gt; {} , 1000) full code below: const reloadIfFilesChanged = (cnt: number = 0, manifest: IManifest) =&gt; { try { // will fail if window does not exist if (cnt &gt; 10) { return; } const id = localStorage.getItem('id'); if (!id) { localStorage.setItem('id', manifest.id); } else { if (id !== manifest.id) { // manifest has changed fire reload // and set new id localStorage.setItem('id', manifest.id); location.replace(window.location.href + '?' + manifest.id); setTimeout(() =&gt; { location.replace(window.location.href + '?' + manifest.id + '1'); }, 1000); } } } catch (e) { // tslint:disable-next-line:no-parameter-reassignment cnt++; setTimeout(() =&gt; reloadIfFilesChanged(cnt, manifest), 1000); } };

http://stackoverflow.com/comment/46650267
has text: @SWLim the tags show, but it looks like the src isn't being loaded. This is what I get back:
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29220122
score: 0

http://stackoverflow.com/q/29271720
type: Question
has body: We are working on a web java web application. We have used html pages for UI. We are facing an issue after deploying the application in tomcat server. An extra space is added around all the attributes. The sample code after deployment is as follows. Profile The original file in server is not having space but when i check in browser inspect element option it became as above. Please help me to solve this. Because of this problem the id attribute is not getting reffered
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/46743801
has comment: http://stackoverflow.com/comment/46743898
type: UnansweredQuestion
tagged with: css
has title: An extra space added around attributes in html page
has answer: http://stackoverflow.com/a/29271854

http://stackoverflow.com/q/29248054
score: 0
has answer: http://stackoverflow.com/a/29266523
tagged with: email
answer count: 1
type: UnansweredQuestion
type: Question
tagged with: outlook
has title: Sending Outlook Email to SQL Table using either Javascript or SQL Server
tagged with: database
has comment: http://stackoverflow.com/comment/46715087
has body: I have built some functionality in a mobile GIS application called GeoMedia Smart Client which allows the user to fill out email details in a form, which then opens Outlook to allow them to send the email. The functionality uses Javascript and XML workflows to populate the email with the values from the form as well as automatically populating asset details in the body. I have built a SQL Server table to save these emails with Date Sent, From, To, Subject, Body etc. This table is populated via a SQL trigger in Smart Client. The problem is, the user has the option of editing the email in Outlook or Smart Client. Any edits in Outlook won't be saved in the SQL table as the trigger only runs in Smart Client. Is there a way using either SQL or Javascript to send the Recipient, Subject, Body etc from the open email in Outlook to the SQL table? I realise Javascript is client side and SQL is server side. I know it's bad design having the ability to edit the email in either Smart Client or Outlook, but the other option using SMTP had it's own problems with our IT department and security issues allowing external Smart Client users access to the server. Hopefully that makes sense, Regards Josh
tagged with: javascript
tagged with: sql-server

http://stackoverflow.com/comment/46666112
comment on: http://stackoverflow.com/q/29222013
has text: It might be easier to create some type of popup instead of a separate page.
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/46701995
score: 0
comment on: http://stackoverflow.com/q/29248543
type: Comment
type: QuestionComment
has text: can you please add working fiddle ?

http://stackoverflow.com/a/33585501
has comment: http://stackoverflow.com/comment/55602335
answers question: http://stackoverflow.com/q/29313244
upvote count: 14
has comment: http://stackoverflow.com/comment/55555459
has body: We combined some of the code form react-native-keyboard-spacer and the code from @Sherlock to create a KeyboardHandler component that can be wrapped around any View with TextInput elements. Works like a charm! :-) /** * Handle resizing enclosed View and scrolling to input * Usage: * &lt;KeyboardHandler ref='kh' offset={50}&gt; * &lt;View&gt; * ... * &lt;TextInput ref='username' * onFocus={()=&gt;this.refs.kh.inputFocused(this,'username')}/&gt; * ... * &lt;/View&gt; * &lt;/KeyboardHandler&gt; * * offset is optional and defaults to 34 * Any other specified props will be passed on to ScrollView */ 'use strict'; var React=require('react-native'); var { ScrollView, View, DeviceEventEmitter, }=React; var myprops={ offset:34, } var KeyboardHandler=React.createClass({ propTypes:{ offset: React.PropTypes.number, }, getDefaultProps(){ return myprops; }, getInitialState(){ DeviceEventEmitter.addListener('keyboardDidShow',(frames)=&gt;{ if (!frames.endCoordinates) return; this.setState({keyboardSpace: frames.endCoordinates.height}); }); DeviceEventEmitter.addListener('keyboardWillHide',(frames)=&gt;{ this.setState({keyboardSpace:0}); }); this.scrollviewProps={ automaticallyAdjustContentInsets:true, scrollEventThrottle:200, }; // pass on any props we don't own to ScrollView Object.keys(this.props).filter((n)=&gt;{return n!='children'}) .forEach((e)=&gt;{if(!myprops[e])this.scrollviewProps[e]=this.props[e]}); return { keyboardSpace:0, }; }, render(){ return ( &lt;ScrollView ref='scrollView' {...this.scrollviewProps}&gt; {this.props.children} &lt;View style={{height:this.state.keyboardSpace}}&gt;&lt;/View&gt; &lt;/ScrollView&gt; ); }, inputFocused(_this,refName){ setTimeout(()=&gt;{ let scrollResponder=this.refs.scrollView.getScrollResponder(); scrollResponder.scrollResponderScrollNativeHandleToKeyboard( React.findNodeHandle(_this.refs[refName]), this.props.offset, //additionalOffset true ); }, 50); } }) // KeyboardHandler module.exports=KeyboardHandler;
type: Answer
has comment: http://stackoverflow.com/comment/62725109
score: 13
downvote count: 1

http://stackoverflow.com/a/29323929
answers question: http://stackoverflow.com/q/29292054
has body: This is a known issue, discussed in details here. I am using this solution (from Swavek) and it works well. Simply put, the issue arises when two guys manipulate the same DOM elements at the same time: Meteor, though reactivity The browser code responsible for managing the inside of the contenteditable div. The solution is to tell Meteor not to manipulate the inside of the contenteditable div, but to refresh the whole div instead. You do it like this: &lt;body&gt; {{&gt; hello}} &lt;/body&gt; &lt;template name="hello"&gt; {{{getContenteditableDiv}}} &lt;!-- Beware: triple brackets! --&gt; &lt;/template&gt; Template.hello.helpers({ getContenteditableDiv: function() { return '&lt;pre contentEditable="true"&gt;' + Session.get('text') + '&lt;/pre&gt;'; } });
has comment: http://stackoverflow.com/comment/46857519
has comment: http://stackoverflow.com/comment/46868112
has comment: http://stackoverflow.com/comment/46849957
upvote count: 1
has comment: http://stackoverflow.com/comment/46856229
has comment: http://stackoverflow.com/comment/46853308
type: AcceptedAnswer
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/29292054
type: Answer

http://stackoverflow.com/a/29339491
has comment: http://stackoverflow.com/comment/46868576
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/29338953
has comment: http://stackoverflow.com/comment/46868642
type: Answer
has comment: http://stackoverflow.com/comment/46868555
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/46868665
has body: Give this a try: // Display confirmation dialog $('td a.delete-slideshow-image').click(function (e) { window.tr = $(this).parents('tr'); // store the 'TR' in a global variable, no need for the keyword 'var' var imageId = $(this).data('id'); // use data-id='$image_id' in your HTML table var modal = '&lt;div id="deleteSlideshowConfirmation" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="dataConfirmLabel" aria-hidden="true"&gt;' + '&lt;div class="modal-dialog"&gt;' + '&lt;div class="modal-content"&gt;' + '&lt;div class="modal-header"&gt;' + '&lt;button type="button" class="close" data-dismiss="modal" aria-label="Close"&gt;&lt;span aria-hidden="true"&gt;&amp;times;&lt;/span&gt;&lt;/button&gt;' + '&lt;h4 class="modal-title"&gt;Delete Confirmation&lt;/h4&gt;' + '&lt;/div&gt;' + '&lt;div class="modal-body"&gt;&lt;/div&gt;' + '&lt;div class="modal-footer"&gt;' + '&lt;button class="btn" data-dismiss="modal" aria-hidden="true"&gt;Cancel&lt;/button&gt;' + '&lt;a class="btn btn-primary slideshowConfirmOk" data-id="' + imageId + '"&gt;Delete&lt;/a&gt;' + '&lt;/div&gt;' + '&lt;/div&gt;' + '&lt;/div&gt;' + '&lt;/div&gt;'; // put your modal content in a variable $(modal).find('.modal-body').text($(this).attr('data-confirm')); $(modal).modal({ // then use jQuery selector on that variable to make it show, no need for appending to the body show: true }); return false; e.preventDefault(); }); // separate the two click handlers $(document).on('click', 'a.slideshowConfirmOk', function () { // use $(document) to dyanmically bind the event on your confirm button var id = $(this).data('id'); // use data-id="'+imageId+'" in your modal var data = 'imageId=' + id; // var parent = $(this).parents('tr'); &lt;&lt; this is useless now console.log(data); $.ajax({ type: "POST", url: "delete_row.php", data: data, cache: false, success: function () { $('#deleteSlideshowConfirmation.modal').modal('hide'); // hide modal on ajax success window.tr.fadeOut('slow', function () { // use the …
has comment: http://stackoverflow.com/comment/46868730
has comment: http://stackoverflow.com/comment/46869716
accepted answer of: http://stackoverflow.com/q/29338953

http://stackoverflow.com/a/29250656
has comment: http://stackoverflow.com/comment/46705878
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46732634
accepted answer of: http://stackoverflow.com/q/29250529
answers question: http://stackoverflow.com/q/29250529
type: Answer
has body: You would need to put one in your viewModel. function viewModel() { var self = this; self.users = new Users({bla: 1}); // Now I can reference it. self.count = ko.computed(function(){ return self.users.UserComments().length; }); }
score: 1
upvote count: 1

http://stackoverflow.com/comment/46838617
comment on: http://stackoverflow.com/q/29323577
has text: I think your binding is correct and you can bind to `#carsTable` because it's in the DOM as soon as the DOM is ready. Please have a look at this [jsfiddle](http://jsfiddle.net/awolf2904/1uLco0L0/). I don't see your issue.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46865158
comment on: http://stackoverflow.com/q/29338684
has text: whoops, thanks for pointing that out. It is meant to be n = Math.pow(2,n)
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29321780
accepted answer: http://stackoverflow.com/a/29322150
has answer: http://stackoverflow.com/a/29324197
linked to: http://stackoverflow.com/q/12089752
linked to: http://stackoverflow.com/q/15174905
has body: I'm working on a chrome extension that uses jquery to parse the source of a page for specific things. In example I'm looking through Wikipedia to get the categories. I get the source of the page via chrome.tabs.executeScript(tabId, { code: "chrome.extension.sendMessage({action: 'getContentText', source: document.body.innerHTML, location: window.location});" }, function() { if (chrome.extension.lastError) console.log(chrome.extension.lastError.message); }); I am then listening for this message (successfully) and then use jquery to parse the source key of the object, like so if (request.action == "getContentText") { //console.log(request.source); $('#mw-normal-catlinks &gt; ul &gt; li &gt; a', request.source).each(function() { console.log("category", $(this).html()); }); } This works as expected and logs a list of all the category links innerHTML. However the issue happens from that jQuery selector that it tries to load the images that are contained in request.source. This results in errors such as GET chrome-extension://upload.wikimedia.org/wikipedia/commons/thumb/f/fc/Padlock-silver.svg/20px-Padlock-silver.svg.png net::ERR_FAILED These are valid links, however they are being called (unneeded) from my extension with the chrome-extension:// prefix (which is invalid). I'm not sure why jquery would try to evaluate/request images from within source using a selector
possible better answer: http://stackoverflow.com/a/29324197
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29330347
type: Question
tagged with: javascript
tagged with: jquery
linked to: http://stackoverflow.com/q/11229831
has title: jQuery on external text requesting images
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/29322150
tagged with: google-chrome-extension

http://stackoverflow.com/q/29370424
upvote count: 3
tagged with: match
has answer: http://stackoverflow.com/a/29370569
type: Question
linked to: http://stackoverflow.com/q/13594788
tagged with: object
score: 3
tagged with: javascript
duplicate of: http://stackoverflow.com/q/13594788
has comment: http://stackoverflow.com/comment/46922605
answer count: 2
has comment: http://stackoverflow.com/comment/46922193
tagged with: arrays
downvote count: 0
has title: Get an object from an array on predicate in Javascript
has answer: http://stackoverflow.com/a/29370554
favorite count: 0
has body: I have the following array of objects : var objs = [{id: 1, name: 'foo', ...}, {id: 2, name: 'bar', ...}, {id: 3, name: 'baz', ...}]; and this variable : var matcher = 'bar'; What is the easiest way to get the object that has the matcher equals to its name ? Using this matcher the result should be : {id: 2, name: 'bar', ...}
type: UnansweredQuestion

http://stackoverflow.com/q/29342839
has comment: http://stackoverflow.com/comment/46872522
has answer: http://stackoverflow.com/a/29342911
has comment: http://stackoverflow.com/comment/46872456
has comment: http://stackoverflow.com/comment/46872431
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/46872608
has body: I have written an AJAX script that saves form data and then displays a preview page of this data all in one click event. Here is the script: $('#ajax-preview').click(function(e) { var formData = $('#advertiser-edit-form').serializeArray(); $.ajax({ type: 'post' , url: "ajax-preview.php", data: formData, success: function(data, status, jqXHR) { previewURL = data; $('#ajax-preview').attr('href', previewURL); } }); }); The problem is that sometimes the PHP script does not manage to complete its saving routine before a user is taken to the preview page. In such case, the user would see unupdated data when he's taken to the preview page. Then he would have to reload the page to see the changes. How can I design the script so that a user is taken to the previewURL only after the AJAX updated the data?
accepted answer: http://stackoverflow.com/a/29342911
tagged with: php
score: 2
type: AnsweredQuestion
upvote count: 2
has title: Delay a click event until AJAX has completed
type: Question

http://stackoverflow.com/comment/46660572
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29226606
has text: sorry i had a type all that time innerHtml instead of innerHTML , thanks for pointing out.

http://stackoverflow.com/a/29241319
answers question: http://stackoverflow.com/q/29241134
type: Answer
has comment: http://stackoverflow.com/comment/46688857
has comment: http://stackoverflow.com/comment/46689413
has comment: http://stackoverflow.com/comment/46689171
score: 0
has comment: http://stackoverflow.com/comment/46689571
has comment: http://stackoverflow.com/comment/46689275
has comment: http://stackoverflow.com/comment/46689072
has body: As said, change the ID of the modal to not have a /, include the bootstrap.js and bootstrap.css, and add a data-target to your button. Register/Login ... See my fiddle: https://jsfiddle.net/2m4vxcxz/ See Bootstrap's Modal documentation: http://getbootstrap.com/javascript/#modals

http://stackoverflow.com/comment/46678957
type: QuestionComment
has text: you can may be add click event at other place. that is , $('#addressLookupBtn').click may be in one more than
comment on: http://stackoverflow.com/q/29236301
score: 0
type: Comment

http://stackoverflow.com/a/41560173
score: 7
upvote count: 7
has body: As of May 2016 they have added the realIndex property! Things to be aware of: 1.) the realIndex property is returned as a string instead of an integer (just in case you need to do math with it) 2.) the realIndex property starts with 0(as it should), unlike activeIndex in loop mode which in my case started with 1 https://github.com/nolimits4web/Swiper/pull/1697
answers question: http://stackoverflow.com/q/29348926
downvote count: 0
type: Answer

http://stackoverflow.com/comment/46673878
type: Comment
comment on: http://stackoverflow.com/a/29233093
has text: @rlemon, replacing text is not effective in this case because there could be nested html elements that would be removed with .text()
type: AnswerComment
score: 0

http://stackoverflow.com/a/29307717
type: Answer
has body: I need to hitch within the scope of the transition. This fixed it! this.myView.on("afterTransitionIn", lang.hitch(this, function() { console.log("Made it"); //alert("Made it after transition"); xhr("json/customer.json", { handleAs : "json" }).then(lang.hitch(this, function(data) { this._customerData.setData(data); })); }));
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29291464
answers question: http://stackoverflow.com/q/29291464

http://stackoverflow.com/a/29269966
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29269635
has comment: http://stackoverflow.com/comment/46741083
type: Answer
downvote count: 0
score: 3
has comment: http://stackoverflow.com/comment/46741175
upvote count: 3
accepted answer of: http://stackoverflow.com/q/29269635
has comment: http://stackoverflow.com/comment/46740990
has body: You need to use the json_encode constant JSON_HEX_APOS as the second parameter which will convert all single quotes ' to \u0027. : var t = &lt;?php echo json_encode($data,JSON_HEX_APOS);?&gt;; Then use encode () and decode () javascript functions to convert the text from each array entry back to readable text like this example http://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_unescape

http://stackoverflow.com/comment/79030294
comment on: http://stackoverflow.com/a/39728672
type: Comment
has text: Do you know how to do this in Objective-c?
score: 0
type: AnswerComment

http://stackoverflow.com/comment/46865472
type: Comment
type: QuestionComment
has text: Not really, you have missed some validate rules part in jquery. Like this `$("#formid).validate({rules: {firstname: "required"}});`
comment on: http://stackoverflow.com/q/29274618
score: 0

http://stackoverflow.com/a/29333901
has body: In my opinion you should use .run on your main module. angular.module('app').run(function(){ if(!isAuthenticated){ redirectToLoginView(); } }); More: https://docs.angularjs.org/guide/module
type: Answer
has comment: http://stackoverflow.com/comment/46857117
score: 0
answers question: http://stackoverflow.com/q/29333646

http://stackoverflow.com/comment/46971714
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29372796
has text: So I have to manipulate my date after taking it, as a string? (like replace '-' with '/' etc etc). Is there any straightforward way to achieve it?
score: 0

http://stackoverflow.com/q/29353037
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46891598
tagged with: css
has comment: http://stackoverflow.com/comment/46897262
has comment: http://stackoverflow.com/comment/46895213
has comment: http://stackoverflow.com/comment/124092287
answer count: 0
has comment: http://stackoverflow.com/comment/46896744
score: 1
has comment: http://stackoverflow.com/comment/46893784
has comment: http://stackoverflow.com/comment/46896854
upvote count: 1
type: Question
linked to: http://stackoverflow.com/q/36909764
has comment: http://stackoverflow.com/comment/46896182
has comment: http://stackoverflow.com/comment/46895691
downvote count: 0
has comment: http://stackoverflow.com/comment/46897905
tagged with: javascript
has comment: http://stackoverflow.com/comment/46895338
has comment: http://stackoverflow.com/comment/106426752
has title: border radius and mouseover events
has comment: http://stackoverflow.com/comment/46895230
has body: I have a SVG circle and a smaller CSS circle (done with border-radius: 50%) over it. The CSS circle has a mouseover and mouseout events to trigger some desired behavior when the mouse is on top of it. On some occasions, the inner CSS circle will contain an additional div and an img tag within it. The HTML code of the CSS circle appears then as such: 02:30 The problem is, that in that case the mouse events will be trigerred when the mouse is over the rectangular bounds of the circle, instead of just where it appears on the page. Now, the odd thing is that the events are bound to the circle (#top_circle), not to the img tag, and this works okay when the img tag is not there. It's important to say that the img tag has as well the border-radius: 50% and has no mouse events bound to it. Also something to note: The problem replicates on Chrome but not on FF. Here is the relevant CSS: .over_center { position:absolute; top: 50%; left:50%; height: 66%; width: 66%; margin-top: -33%; margin-left: -33%; text-align: center; background-position: center; background-size: 100%; } #top_circle { color: #111; border-radius: 50%; -webkit-border-radius: 50%; -moz-border-radius: 50%; background-color: #333; font-family: Century Gothic , Verdana, sans-serif; } #track_image_holder { width: 100%; height: 100%; border-radius: 50%; -webkit-border-radius: 50%; -moz-border-radius: 50%; } #track_image_holder > img { width: 100%; height: 100%; position: absolute; border-radius: 50%; -webkit-border-radius: 50%; -moz-border-radius: 50%; left: 0; z-index: 0; } #time_holder { width: 100%; height: 100%; border-radius: 50%; -webkit-border-radius: 50%; -moz-border-radius: 50%; position: absolute; left: 0; top: 0; text-shadow:1px 1px 1px #000; color:#fff; } #timer:hover { cursor: pointer; background:red; } And another small note: The entire project is jQuery free and must remain that way. There is a demo including the entire code here: http://memescloud.com/mediaplayer/ Here is some of the most relevant …
favorite count: 0
has comment: http://stackoverflow.com/comment/124092324
type: UnansweredQuestion

http://stackoverflow.com/q/29239433
tagged with: events
favorite count: 0
type: UnansweredQuestion
tagged with: onload
score: 2
downvote count: 0
has title: Turbolinks callback fully loaded page
has answer: http://stackoverflow.com/a/43074958
type: Question
upvote count: 2
tagged with: turbolinks
answer count: 1
tagged with: javascript
tagged with: jquery
has body: I have some images, third-party scripts, plugins (like Facebook and YouTube widgets) and iframes (like YouTube video) on my page, but I need to run a snippet only when all of these are fully loaded (after page change). Without Turbolinks I could solve like this: $(window).on('load', function() { // snippet goes here }); Is there any way to do this using Turbolinks? We can see page:load on the documentation, but it's "similar" to $(document).on('ready'), in other words, it's fired when the DOM is loaded, but not after scripts, images and iframes...

http://stackoverflow.com/comment/46689732
has text: That it's not possible. Check this: http://stackoverflow.com/questions/4951623/partially-bold-text-in-an-html-select
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29235395

http://stackoverflow.com/comment/114783780
comment on: http://stackoverflow.com/a/48098573
has text: @rasen58, they both do exactly the same thing. The advantage of `addEventListener` is that you can add `more than one event listener` to the load event. Please refer this answer for more details. https://stackoverflow.com/a/6348533/9695286
type: Comment
score: 1
type: AnswerComment

http://stackoverflow.com/q/29262548
has title: Angular service cache
has answer: http://stackoverflow.com/a/29264769
tagged with: service
tagged with: promise
tagged with: angularjs
has body: I'm trying to cache response from $http into an object for a session in angular, so once the initial call has been made, every other call to service.getCategories() (e.g), will get the data from the object rather than to the api. The service is being resolved at the route, but there is authentication, which will redirect to another route - calling service.getCategories() again. I'm attempting this by setting an init variable on call, then all other calls will direct to the populated object - but it seems to reset the service somehow, and the returned object gets populated twice, so there's double of everything. See below: var $ = require('jquery'); module.exports = angular.module('app.common.services.category', []) .factory('categoryService', ['$http', '$q', '$rootScope', function($http, $q, $rootScope) { // API Parameters var deferred = $q.defer(); // Services var Categories = { init: false, categories: [], index: 0, // Retrieve all data on load. // Loaded into an array for all other services // to use after init. getCategories: function(page) { if(!Categories.init) { $http.get('api/core/get_category_index') .then(function(result) { var data = result.data.categories; $.each(data, function(i, category) { category.index = Categories.index; Categories.categories.push(category); Categories.index++; }); Categories.init = true; return deferred.resolve(Categories.categories); }); // Return promise once catgories is resolved return deferred.promise; } else { return Categories.categories; } }, allCategories: function() { return Categories.categories; } } return Categories; }]);
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29264769
tagged with: caching
type: Question
answer count: 1
tagged with: javascript
score: 0

http://stackoverflow.com/q/29224281
has answer: http://stackoverflow.com/a/29224349
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
tagged with: xpath
has comment: http://stackoverflow.com/comment/46656909
upvote count: 4
possible better answer: http://stackoverflow.com/a/29224349
type: AnsweredQuestion
has body: #document I have a chatbox page, which was created by cbox.ws and I want to select elements on this page. I tried many ways to select the id tblmid in this web but I can't. Many ways was used such as get by name, find xpath then get by xpath, find and get them by css... but it didn't work. How can I get that element? I am using java. I tried get step by step get by id cont -> get by id fscont -> get by name cboxform but I can't go anymore, stuck here. WebElement inputName = driver.findElement(By.id("cont")); inputName = inputName.findElement(By.id("fscont")); inputName = inputName.findElement(By.name("cboxform")); Thanks a lot.
tagged with: java
tagged with: selenium
has comment: http://stackoverflow.com/comment/46656841
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/29224453
accepted answer: http://stackoverflow.com/a/29224453
has title: How can select web element selenium web driver with html source inside another html tag
downvote count: 0
tagged with: javascript
score: 4
linked to: http://stackoverflow.com/q/10879206

http://stackoverflow.com/a/29336010
upvote count: 3
answers question: http://stackoverflow.com/q/29335812
downvote count: 0
has comment: http://stackoverflow.com/comment/46861102
type: Answer
has comment: http://stackoverflow.com/comment/46860471
score: 3
has body: If you don't mind that people can do a "view source" on the webpage or use every browsers' developer tools to find out the answers or move on to the next tutorial or quiz, then you can use cookies to store the user's status. Or you can use the preferable Web Storage API. You might want to look at Firebase. Using just simple JavaScript on the web browser, you can have users with logins (or just allow them to login via Facebook or other services) very easily. And then you can store and retrieve data very easily as well, like quizzes, tutorials and results. This way nobody can see the answers even if they're adept at analyzing the webpage.

http://stackoverflow.com/a/29367743
has body: you can use the html5 data attribute xpto and with jQuery $("*").data("theNameYouWant", function(){ //do your stuff }); //in case you want a log of that value console.log($("*").data("theNameYouWant")); //this will return a log (in browser console), with all the elements values that contains the attribute "data-theNameYouWant"
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29367606

http://stackoverflow.com/comment/119566575
comment on: http://stackoverflow.com/a/29351508
has text: ikr @MooingDuck
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/46825396
type: Comment
type: QuestionComment
has text: Just want to know..Have your inserted Dropzone.js ? it may happen that you have forgot file to add..
comment on: http://stackoverflow.com/q/29316537
score: 0

http://stackoverflow.com/comment/46928036
type: Comment
comment on: http://stackoverflow.com/a/29373354
has text: try with : document.body.insertBefore(div, dragging[0].nextSibling);
type: AnswerComment
score: 0

http://stackoverflow.com/q/29280387
favorite count: 0
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/5999998
downvote count: 0
duplicate of: http://stackoverflow.com/q/5999998
has comment: http://stackoverflow.com/comment/46758681
has title: The best way to check if a variable is a function in javascript
has body: Which is a best way to check if a variable is a function? var cb = function () { return; } if (!!(cb &amp;&amp; cb.constructor &amp;&amp; cb.apply)) { cb.apply(somevar, [err, res]); } //VS if (!!(cb &amp;&amp; 'function' === typeof cb) { cb.apply(somevar, [err, res]); }
type: Question
score: 3
tagged with: javascript
has answer: http://stackoverflow.com/a/29280535
upvote count: 3
answer count: 2
has answer: http://stackoverflow.com/a/29280459

http://stackoverflow.com/comment/46710571
type: Comment
has text: As lines of code change, your answer will be better if you copy the details and explain your answer here. Also, `assign` is not a property, it's a function.
comment on: http://stackoverflow.com/a/29244989
score: 0
type: AnswerComment

http://stackoverflow.com/comment/46711618
score: 0
type: Comment
has text: Yeah thanks I guess it will help but I cant find out because now its giving. TypeError: this.initialize is undefined new.js:3
type: AnswerComment
comment on: http://stackoverflow.com/a/29254100

http://stackoverflow.com/q/29327978
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
tagged with: css
score: 2
answer count: 0
upvote count: 2
tagged with: ionic-framework
type: Question
tagged with: javascript
has body: I want to change the height of Ionic footer and use slide box. But Slide box implementation doesn't allow changing footer height. This is the normal height. You can see the bottom text: This is when I increased the height and if I scroll to bottom, the text is underneath the thick footer: So how I change the dimension of the slide box so that it's offset on bottom to account for the new footer height? My code: http://codepen.io/hawkphil/pen/Bybmgg HTML: Test Dynamic Slides BLUE This text is not showing YELLOW PINK Title! JS: angular.module('ionicApp', ['ionic']) .controller('SlideController', function($scope) { $scope.myActiveSlide = 1; }) CSS: .slider-slide { padding-top: 80px; color: #000; background-color: #fff; text-align: center; font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif; font-weight: 300; } .blue { background-color: blue; } .yellow { background-color: yellow; } .pink { background-color: pink; } .thick-footer { height: 90px!important; }
downvote count: 0
has title: Thick footer causing slide box missing bottom

http://stackoverflow.com/comment/46831032
comment on: http://stackoverflow.com/q/29286650
score: 0
type: Comment
type: QuestionComment
has text: using the Above code, there is no reponse from ajax, no output in the browser.I;m getting alert for fail fun(). But in the chrome debugger while running line by line code it hits the url and contents of the url is seen under network tab in chrome debugger. Headers shows status Code:200 OK and Preview displays the content of the url.

http://stackoverflow.com/q/29294899
tagged with: javascript
has answer: http://stackoverflow.com/a/29297044
accepted answer: http://stackoverflow.com/a/29297044
type: Question
score: 0
answer count: 1
tagged with: highcharts
tagged with: jquery
has body: In Highcharts, I am currently using tooltipRefresh to run a function that renders dynamic content within the current tooltip. For example, I am using: chart: { events: { tooltipRefresh: function (e) { createTableChartGauge(); } } } I only want createTableChartGauge() to be run if the hovered data is a specific colour. I tried logging e that is passed through the tooltipRefresh function, although that just contains all chart data and nothing specific to the hovered data set. How can I detect what element is currently be hovered so that I can render specific content per type?
has title: Highcharts tooltipRefresh check for hovered item
type: AnsweredQuestion

systemjs
tags question: http://stackoverflow.com/q/29358499
type: Tag
tag name: systemjs

http://stackoverflow.com/q/29361703
has body: So I have this component var LineItemRowsWrapper = React.createClass({ current_lineitem_count: 0, getAjaxData: function(){ var lineitem_data = []; for(var i = 0; i < this.current_lineitem_count; i++){ var data = this.refs['lineitem_'+i].getAjaxData(); lineitem_data.push(data) } return lineitem_data; }, getLineitems: function(){ var self = this; var lineitem_components = []; this.current_lineitem_count = 0; if(this.props.shoot){ var preview = this.props.preview; var lineitems = this.props.shoot.get_lineitems(); lineitem_components = lineitems.map(function (item, index) { var ref_str = 'lineitem_'+self.current_lineitem_count; self.current_lineitem_count++; return ( <LineItemRow item={item} key={index} ref={ref_str} preview={preview} onChange={self.props.onChange} /> ) }); } return lineitem_components; }, render: function() { var lineitems = this.getLineitems(); return ( {lineitems} ) } }) the first time lineitems are rendered the refs work like expected. But if I add a lineitem to this.props.shoot the refs object of this component does not change. So for example say I had an array of 3 lineitems [i1,i2,i3] this.refs would be {lineitem_0:{}, lineitem_1:{}, lineitem_2:{}} and when I update my lineitem array to be [i1,i2,i3,i4] this.refs does not change, it will still be {lineitem_0:{}, lineitem_1:{}, lineitem_2:{}} why doesn't the refs object update between renders? The LineItemRow components update properly so I know its not something wrong on that front. Any insights would be much appreciated! ____Edit____ (requested to add more code for context) var DocumentContent = React.createClass({ contextTypes: { router: React.PropTypes.func.isRequired }, getParams: function(){ return this.context.router.getCurrentParams() }, getInitialState: function() { return { shoot: ShootStore.get_shoot(this.getParams().shoot_id), } }, componentWillMount: function() { ShootStore.bind( 'change', this.onStoreUpdate ); }, componentWillUnmount: function() { ShootStore.unbind( 'change', this.on…
tagged with: render
tagged with: refs
has comment: http://stackoverflow.com/comment/46916384
type: Question
upvote count: 15
tagged with: reactjs
answer count: 2
has comment: http://stackoverflow.com/comment/46911576
has comment: http://stackoverflow.com/comment/46912702
has comment: http://stackoverflow.com/comment/46912017
tagged with: javascript
score: 15
has answer: http://stackoverflow.com/a/29642456
has comment: http://stackoverflow.com/comment/46912092
has comment: http://stackoverflow.com/comment/46916323
has title: React refs do not update between render
downvote count: 0
has comment: http://stackoverflow.com/comment/46911677
favorite count: 0
has comment: http://stackoverflow.com/comment/46912431
has answer: http://stackoverflow.com/a/33089928
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47323878
has comment: http://stackoverflow.com/comment/46913051

http://stackoverflow.com/a/29287111
has comment: http://stackoverflow.com/comment/46802216
answers question: http://stackoverflow.com/q/29281855
upvote count: 1
has body: You should be using .startOf('day') Keep in mind that midnight doesn't always exist for every day in every time zone. Some time zones spring forward for daylight saving time right at midnight, so for these zones the start of that day would be 1:00. Moment accounts for this with the startOf function.
has comment: http://stackoverflow.com/comment/46788920
has comment: http://stackoverflow.com/comment/46788669
has comment: http://stackoverflow.com/comment/46802330
type: Answer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/46802244

http://stackoverflow.com/q/29342455
has answer: http://stackoverflow.com/a/29344167
tagged with: firefox
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/29342971
has body: I'm having problem with getting CSS animation work properly in firefox browser. I've tried to use the "moz" - prefix, without success.The animation works as expected in chrome, see code below. var ss = document.styleSheets; var rec; var bg = document.getElementById('bg'); function getRule (name) { var indexArr = []; for(var i = 0; i<ss[0].cssRules.length; i++){ if(ss[0].cssRules[i].name !== "undefined" && ss[0].cssRules[i].name === name){ indexArr.push(i); } } return indexArr; } function swapNode(node){ tmp = node.cloneNode(false); node.parentNode.removeChild(node); rec = tmp; bg.appendChild(rec); } function modifyRule(element, name, val){ var browser = checkBrowser(); // if(element.style.webkitAnimationPlayState === "paused") // element.style.webkitAnimationPlayState = "running"; var indexes = getRule(name); var rule = []; if(indexes.length){ element.style.WebkitAnimationName = "none"; element.style.WebkitAnimationName = name; element.style.mozAnimationName = "none"; element.style.mozAnimationName = name; element.style.AnimationName = "none"; element.style.AnimationName = name; swapNode(element); if(name === "translate"){ rule[0] = "@-"+browser+"-keyframes "+name+" {"+ "0% {-"+browser+"-transform: "+name+"(0px);}"+ "50% {-"+browser+"-transform: "+name+"("+val+");}"+ "100% {-"+browser+"-transform: "+name+"(0px);}}"; rule[1] = "@keyframes "+name+" {"+ "0% {transform: "+name+"(0px);}"+ "50% {transform: "+name+"("+val+");}"+ "100% {transform: "+name+"(0px);}}"; } else{ rule[0] = "@-"+browser+"-keyframes "+name+" {"+ "100% {-"+browser+"-transform: "+name+"("+val+");}}"; rule[1] = "@keyframes "+name+" {"+ "100% {transform: "+name+"("+val+");}}"; } for(var i = 0; i<indexes.length; i++){ console.log(rule[i]); ss[0].deleteRule(indexes[i]); ss[0].insertRule(rule[i], indexes[i]); } } else{ console.log('err'); } } function stopAnim (element) { element.style.WebkitAnimationPlayState = "paused"; } function checkBrowser () { if(navigator.userAgent.indexOf("Chrome") != -1 ) { retu…
tagged with: css
has comment: http://stackoverflow.com/comment/46871847
has title: CSS animation in firefox not working
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29342971
type: Question
answer count: 2
possible better answer: http://stackoverflow.com/a/29344167

http://stackoverflow.com/q/29362304
type: UnansweredQuestion
has body: Is it possible to split one into 2 separate 's using jquery (div could be dynamically generated) This is the current code i am working with $(function() { $("#" + gend).click(function(e) { $("#" + gend).mousemove(function(event) { alert("mousemove"+gend); var x_begin =event.pageX; var y_begin = event.pageY; console.log("mouddd"+y_begin); delay(function(){ console.log("dragsss"+y_begin); splitDiv(gend,x_begin,y_begin); }, 100); }); var delay = (function(){ var timer = 0; return function(callback, ms){ clearTimeout (timer); timer = setTimeout(callback, ms); }; })();
tagged with: css
has comment: http://stackoverflow.com/comment/46908485
answer count: 0
type: Question
has comment: http://stackoverflow.com/comment/46910339
has comment: http://stackoverflow.com/comment/46908669
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46908463
score: 0
has comment: http://stackoverflow.com/comment/46908469
has title: Using jquery split the div
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46908345

http://stackoverflow.com/comment/46874761
has text: I solved it validating the fields for "my own" before switching from the first div to the second
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29329306

http://stackoverflow.com/a/29319493
has body: App Engine lets you read files just fine, just not write to them. Among the many alternatives to plain files that you can use if you need read/write functionality, the best two are usually: (A) the App Engine data store, for "files" of modest to moderate size; (B) Google Cloud Storage, for "files" that can potentially be quite large. Your use case seems to call for the former -- i.e, the datastore -- so I'll focus on that possibility. Define a model class for entities representing HTML you want to send in your response -- usually such "models" are best kept in a separate model.py file, to be imported from others of your Python files, but that's an issue of proper code organization, not of functionality. For the latter, whatever file you place it in, your code will be somewhat like: from google.appengine.ext import ndb class Page(ndb.Model): name = ndb.StringProperty() html = ndb.TextProperty() When you need to get a page by a certain name, your code will be something like: page = Page.query(Page.name == the_name).get() if page is None: page = Page(name=the_name, html=MAIN_PAGE_HTML1) page.put() and to set new, modified html content on an existing page page previously fetched, just page.html = new_html_content page.put() The put calls return a key which you may want to save (for example in memcache) if you want "strong consistency" (since key.get() is guaranteed to fetch the latest updated content, while getting from a query, without other precautions, might get a previously saved version of the data -- it only exhibits eventual consistency, not "immediate" updates). But it's hard to be more specific in offering advice about how you should best use the datastore without knowing much, much more about your exact requirements -- how do you determine exactly what page to display and/or update (that would be given by the name property in my example code, while it would have been given by the filename if you could have ordinary read/write files as you wished), what are you…
score: 7
answers question: http://stackoverflow.com/q/29319244
upvote count: 7
type: AcceptedAnswer
type: Answer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29319244

http://stackoverflow.com/comment/48652909
type: QuestionComment
comment on: http://stackoverflow.com/q/29290472
has text: Yes, I'd like to see an answer to this question as well. This could be very useful if for example you are switching git branches and `node_modules` is gitignored.
score: 1
type: Comment

http://stackoverflow.com/q/29236137
answer count: 2
has answer: http://stackoverflow.com/a/29236954
accepted answer: http://stackoverflow.com/a/29236954
tagged with: asp.net
has body: I'm trying to create an AJAX-Enabled WCF Service and an ASP.NET Client that Accesses the Service. The error I get is : Uncaught TypeError: undefined is not a function at this line: var service = new WcfService.Service1(); This is my asp.net code : <%@ Page Language="C#" AutoEventWireup="True" CodeBehind="GridView.aspx.cs" Inherits="ASPUserManager.Presentation.AspNetUI.GridView" %> Users GridView <%-- --%> <ajaxToolkit:ToolkitScriptManager ID="ScriptManager1" runat="server"></ajaxToolkit:ToolkitScriptManager> <asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server"> <asp:ServiceReference Path="~/Service1.svc" /> </asp:ScriptManagerProxy> Service1.svc.cs namespace WcfService { [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)] public class Service1 : IService1 { private ExceptionManager exManager; IApplicationService applicationService; public Service1() { this.applicationService = new ApplicationService(); } #region Members public UsersDTO GetUser(UsersDTO userDTO) { return this.Process(() => { return this.applicationService.GetUser(userDTO); }); } } IService1.cs namespace WcfService { [ServiceContract(Namespace = "WcfService")] public interface IService1 { [OperationContract] UsersDTO GetUser(UsersDTO userDTO); } } I hope I provided all necessary information to analyse this issue. If not please let me know. It would be great if someone could help me with this. I just can't see what could be the problem :)
tagged with: wcf
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29258816
has answer: http://stackoverflow.com/a/29258816
type: Question
tagged with: c#
tagged with: javascript
tagged with: jquery
has title: Uncaught TypeError: undefined is not a function when ASP.NET client accesses the Service
score: 0

http://stackoverflow.com/a/29309087
has comment: http://stackoverflow.com/comment/46813173
type: Answer
has body: I'm not sure I understood you quite well. Is it making a text be like a background image? To be behind of all the content and adjust according to the window size? If so, maybe this? div.text-bg-container { position:absolute; width:100% height:100%; font-size:80% z-index:-1; }
answers question: http://stackoverflow.com/q/29308820
score: 0

http://stackoverflow.com/comment/46849218
has text: Nice work, thank you. Generated and original sources are equal https://gist.github.com/silentroach/b33e7efd844d8ec97edf
comment on: http://stackoverflow.com/a/29320830
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/46863667
has text: So, what exactly doesn't work? Can you click on the link? What happens after?
comment on: http://stackoverflow.com/q/29335519
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46677411
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/29234069
type: Comment
has text: @StanislovasKalašnikovas and what about using the latest version of jQuery? http://code.jquery.com/jquery-2.1.3.min.js

http://stackoverflow.com/comment/46785652
has text: @amigo I think you are completely replacing my script with yours. I have just put the code where I changed your script. you need to replace that part only. i will edit my response
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/29294300
type: Comment

http://stackoverflow.com/comment/46806123
type: Comment
type: QuestionComment
has text: have you included requirejs file?
comment on: http://stackoverflow.com/q/29305889
score: 0

http://stackoverflow.com/q/29290646
has comment: http://stackoverflow.com/comment/46778353
accepted answer: http://stackoverflow.com/a/29290819
tagged with: php
has body: I have the following jQuery ajax call to a php script: actualHtml = $('div').html(); // could this line be causing an issue? $.ajax({ type: 'POST', url: 'save-html-css-action.php', data: { 'htmlTextToSave': htmlTextToSave, 'actualHtml': actualHtml, 'userId':userId }, success: function(msg){ alert(msg); } }); php: $htmlCssToSave = $_POST['htmlTextToSave']; $userId = $_POST['userId']; $actualHtml = $_POST['actualHtml']; $mysqli = new mysqli($servername, $sqlusername, $sqlpassword, $dbname); /* check connection */ if (mysqli_connect_errno()) { //printf("Connect failed: %s\n", mysqli_connect_error()); echo "Connection failed: ".mysqli_connect_error(); exit(); } $mysqli-&gt;query("INSERT INTO user_saved_data (user_html_css_code, dd_id, actual_html) values ('".$htmlCssToSave."',".$userId.",'".$actualHtml."')"); echo "success"; /* close connection */ $mysqli-&gt;close(); but when I check the database, the data isn't there. Am I doing something wrong in the jquery/php combo (meaning the ajax call)? I'm getting a javascript "success" alert, so it's hitting the script, but I'm not sure why the info isn't being inserted. The table datatypes are medium text for both the htmlcsstosave and the actualhtml columns, and int for userid (not the primary key, this is a foreign key to another table) so I added a an error alert and this is the output You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'margin-0'&gt; &lt;head&gt; &lt;/head&gt; &lt;body cl' at line 1
has title: jquery ajax to php script not saving data
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46778365
tagged with: mysql
upvote count: 1
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/29290819
has comment: http://stackoverflow.com/comment/46778459
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/46778441
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/29290689
favorite count: 0
tagged with: ajax
has answer: http://stackoverflow.com/a/29290689
has comment: http://stackoverflow.com/comment/46778603

http://stackoverflow.com/q/29368603
upvote count: 3
has comment: http://stackoverflow.com/comment/46919274
has comment: http://stackoverflow.com/comment/46919071
type: Question
linked to: http://stackoverflow.com/q/8253136
score: 3
linked to: http://stackoverflow.com/q/6449340
has comment: http://stackoverflow.com/comment/46919391
tagged with: javascript
has answer: http://stackoverflow.com/a/29370092
has title: Javascript get top domain from string
downvote count: 0
favorite count: 0
has body: I want to get the top domain from strings such as: domain.com -&gt; domain.com subdomain.domain.com -&gt; domain.com subdomain.domain.co.uk -&gt; domain.co.uk Have the following function so far: function gdn(h) { return h.substring(h.lastIndexOf(".", h.lastIndexOf(".") - 1) + 1); } Problem is that this does not work with co.uk domains. The return for: hello.domain.co.uk -&gt; co.uk Want it to be domain.co.uk Any ideas?
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29368707
has answer: http://stackoverflow.com/a/29368866
answer count: 4
has answer: http://stackoverflow.com/a/29370061

http://stackoverflow.com/comment/46687479
comment on: http://stackoverflow.com/q/29240498
has text: @nicael it's Flexbox, they're not positioned to left or right.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29276651
answers question: http://stackoverflow.com/q/29275955
score: 0
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/46752284
has comment: http://stackoverflow.com/comment/46751901
accepted answer of: http://stackoverflow.com/q/29275955
has body: First off, you need to provide the CSS and JavaScript for jQuery UI since you are using the $.datepicker plugin. Next, you created a variable called keycode, but you use it as keyCode. Case matters in JavaScript. var keycode = (event.keyCode ? event.keyCode : event.which); if (keyCode == 13) { $("#calculate").click(); } After those fixes, your code should work fine. Demo $(document).ready(function() { $("#vervaldatum").datepicker($.extend({}, $.datepicker.regional["nl-NL"], { changeMonth: true, changeYear: true })); $("#vervaldatum").val(new Date().toLocaleDateString()); $("#input").keypress(function(event) { var keyCode = (event.keyCode ? event.keyCode : event.which); if (keyCode == 13) { //enter press $("#calculate").click(); } }); $("#calculate").on("click", function() { var n = parseFloat($("#input").val()); if (n > 0) { var a = []; var r = 0; var k = c(n, 0, 1, a); var x = $("#vervaldatum").val(); if (x.length > 0) { x = x.split("-"); var z = Math.round((new Date().getTime() - new Date(x[2], x[1] - 1, x[0]).getTime()) / (1000 * 60 * 60 * 24)) - 1; if (z > 0) { r = ($("#typeklant").is(":checked") ? ct : ht); r = (((r / 364) * n) / 100) * z; } } var b = 0; if (!$("#btw").is(":checked")) { b = ((k * 1.21) - k); }; $("#original").html("€ " + n.toFixed(2)); $("#rente").html("€ " + r.toFixed(2)); $("#costs").html("€ " + k.toFixed(2)); $("#btwv").html("€ " + b.toFixed(2)); $("#total").html("€ " + (k + n + b + r).toFixed(2)); a.reverse(); for (j = 0; j <= a.length - 1; j++) { var o = (v[a.length - j - 1] / 100) * p[a.length - j - 1]; var i = (a[j] === "undefined" ? "0.00" : (a[j] > o ? o : a[j])); $("#schaal" + (j + 1)).html(i.toFixed(2)); } } }); }); var v = [800000, 190000, 5000, 2500, 2500]; var p = [0.5, 1.0, 5.0, 10.00, 15.00]; var min = 40; var max = 6675; var ht = 8.15; var ct = 3.00; function c(b, n, s, a) { for (i = v.length - s; i >= 0; i--) { var w = (v[i] >= b ? b : (s == v.length ? b : b - v[i])); if (w >= 0) { w = (b != w ? v[i] + (((b - v[i - 1]) % w) % …

http://stackoverflow.com/q/29290677
answer count: 1
has comment: http://stackoverflow.com/comment/46778426
favorite count: 0
has comment: http://stackoverflow.com/comment/46778409
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/29291326
has title: I'm trying to dynamically move elements up and down on my webpage. How do I do that?
tagged with: css
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46778638
has comment: http://stackoverflow.com/comment/46778455
tagged with: iframe
upvote count: 1
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/46778422
has comment: http://stackoverflow.com/comment/46779008
tagged with: javascript
has body: I have a webpage that has a list of iframe soundcloud music "boxes" that play music and I want to add buttons to the side of these iframes to move the boxes up and down based on people voting on them. Kinda like what reddit has. (I'm doing this for fun and have no intention of publishing this) I tried absolute positioning the iframes and then using javascript to move the up or down but realized that would be a disaster to try to code. What would be the best way of going about this? I'm relatively new to web development. (I used bootstrap to style the webpage) Here is the body of the html doc: An Ultimate Music List.
has answer: http://stackoverflow.com/a/29291326
score: 0

http://stackoverflow.com/q/29222498
has comment: http://stackoverflow.com/comment/46654377
has comment: http://stackoverflow.com/comment/46653944
answer count: 0
has comment: http://stackoverflow.com/comment/46653890
has comment: http://stackoverflow.com/comment/46653789
type: Question
tagged with: javascript
tagged with: jquery
score: 0
has body: I know my jQuery is working (my console.log statement prints) and I even got this code to run earlier. I disconnected from the internet and poof the jQuery scroll to top feature doesnt work. Here is the code $(document).ready(function(){ $('#back_to_top').on('click', function(){ $('html, body').animate({scrollTop:0}, 'slow'); window.scrollTo(0, 0); console.log('back to top tab clicked'); }); }); But the page doesnt animate when I click the tab, given either method in the code block. Thoughts? EDIT this block of code was preventing it from working, not sure why... html,body{ width: 100%; height: 100%; margin: 0px; padding: 0px; overflow-x: hidden; }
type: UnansweredQuestion
has title: jQuery scroll to top stopped working

http://stackoverflow.com/comment/46912392
has text: Clicks on an embedded svg aren't registered unless you include them in the svg itself. Although with jQuery, you might be able to get it to work with `.contents()`.
type: QuestionComment
comment on: http://stackoverflow.com/q/29364451
score: 0
type: Comment

http://stackoverflow.com/a/29408682
has body: This is the code you're looking for " onclick="alert(123) which should render as ATTACK Just guessing.
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29358900

http://stackoverflow.com/comment/88293974
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/32509639
has text: is it possible to add style for excel data using this way?

http://stackoverflow.com/comment/46755003
type: Comment
type: QuestionComment
has text: Honestly? no. You can iterate without printing it to the console. Does Javascript even function with an array with 200k items?
comment on: http://stackoverflow.com/q/29277964
score: 0

http://stackoverflow.com/comment/46787686
comment on: http://stackoverflow.com/q/29295733
has text: @ArunPJohny solved it. Answer so i can chose it.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/108999493
score: 13
comment on: http://stackoverflow.com/a/32790325
has text: @chovy you need to return the expect function, otherwise it won't work. I was banging my head for the past 30 minutes until I've noticed that I forgot to return, now it's working for me.
type: AnswerComment
type: Comment

http://stackoverflow.com/q/29331085
has comment: http://stackoverflow.com/comment/46851528
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/29332174
tagged with: session-storage
answer count: 4
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/1981673
score: 1
favorite count: 0
type: Question
has comment: http://stackoverflow.com/comment/46851457
has answer: http://stackoverflow.com/a/29331428
has title: How can I get this javascript var to work across HTML pages?
has answer: http://stackoverflow.com/a/29332174
upvote count: 2
possible better answer: http://stackoverflow.com/a/29331270
has answer: http://stackoverflow.com/a/29331270
has body: Page 1: Value X Value Y Continue Page 2: Page 2 always prints null. How can I fix this? (If both checkboxes were selected, we need page 2 to print 2, for example) Thanks! N.B. I know that there is an easy solution to this by having a form action write to an asp file and then reading that, but I can't create new files on this system.
downvote count: 1
has answer: http://stackoverflow.com/a/29331242

http://stackoverflow.com/comment/46986249
has text: Yes, If you are not using steaming means all the video byes will be receive in single chunk. To receive chunks i have provided a simple example if you are getting in chunks
type: AnswerComment
type: Comment
score: 0
comment on: http://stackoverflow.com/a/29360879

http://stackoverflow.com/comment/46677339
type: QuestionComment
comment on: http://stackoverflow.com/q/29235547
type: Comment
score: 2
has text: Building off of [sam's comment](http://stackoverflow.com/questions/29235547/javascript-add-class-not-working#comment46677213_29235547), if this isn't the intended functionality, then you may be able to wrap the code in a `window.scroll` event listener to get this working. http://stackoverflow.com/questions/14283205/jquery-window-scrolling-event

http://stackoverflow.com/comment/46866189
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29339311
score: 0
has text: I am asking you to help understand the code,its confusing I cant move forward

http://stackoverflow.com/a/29320857
type: Answer
score: 1
has body: 1. Required Imports: jQuery UI 1.7.x or higher (if you wish to support drag and drop). Always remember to check that the versions of jQuery and jQuery UI you are using are compatible. 2. Required CSS: You must set position:absolute on elements that you intend to be draggable. The reasoning for this is that all libraries implement dragging by manipulating the left and top properties of an element's style attribute. .drag-me { position: absolute; width: 230px; ... }
answers question: http://stackoverflow.com/q/29313218
accepted answer of: http://stackoverflow.com/q/29313218
upvote count: 1
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/46855959
has text: Thanks! It works. Could you please explain how it works?
type: Comment
comment on: http://stackoverflow.com/a/29333510
score: 0
type: AnswerComment

timer
tag name: timer
type: Tag
tags question: http://stackoverflow.com/q/29292394
tags question: http://stackoverflow.com/q/29349101

http://stackoverflow.com/comment/46727335
has text: but you have it inside a `document.ready` (thats what `$(function(){...})` is!) within a click function. What are you actually trying to do?
type: QuestionComment
type: Comment
score: 1
comment on: http://stackoverflow.com/q/29262582

http://stackoverflow.com/comment/46917029
type: Comment
comment on: http://stackoverflow.com/a/29367184
type: AnswerComment
has text: @ProDexorite It is printing to the table as Well. td.appendChild(document.createTextNode(word[j])); This line of code do so
score: 0

http://stackoverflow.com/comment/46925945
comment on: http://stackoverflow.com/a/29372435
type: AnswerComment
type: Comment
has text: Add a condition to test if your second array has empty property. And show the alert if its true.
score: 1

http://stackoverflow.com/comment/46915020
type: AnswerComment
score: 0
type: Comment
has text: I think instead of ' . ' you need to add ' : '
comment on: http://stackoverflow.com/a/29366040

http://stackoverflow.com/q/29237328
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29237461
tagged with: jquery
tagged with: ajax
score: 0
answer count: 1
has title: Pass a variable from controller to javascript in view
has answer: http://stackoverflow.com/a/29237461
has body: I'm trying to pass a variable from the controller to the view through JSON. The data that I want to check is available but if I try to access it like "data.status" it comes back as undefined. The code that I use in the controller is: public function checkserie(){ $data['status'] = 'success'; $this-&gt;output-&gt;set_output(json_encode($data, JSON_PRETTY_PRINT)); } And the code that I use in the view is: $.post('&lt;?php echo base_url("index.php/manageorderseries/checkserie")?&gt;', { name: $("#seriename").val()}).done(function(data) { alert(data.status); }); I also saw that when I replace "data.status" with just "data", I receive the following in my alert: {status: "success"} What did I miss to access the variable as "data.status"? Thanks in advance ! Kind regards, Jonas Vandevelde
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
tagged with: codeigniter
type: Question

http://stackoverflow.com/comment/46863759
score: 0
type: AnswerComment
has text: so...I've been able to download and extract the zip files, and run the 'koansrunner.html' file, which takes opens a chrome window with the pink boxes. After that I opened the "aboutexpects" file with notepad++, and changed the following line in the first function as you've suggested.......describe("About Expects", function() { // We shall contemplate truth by testing reality, via spec expectations. it("should expect true", function() { expect(true).toBeTruthy(); //This should be true });. I then went to the chrome browser to 'refresh', but nothing happens. Did I miss somehting?
type: Comment
comment on: http://stackoverflow.com/a/29269391

http://stackoverflow.com/q/29301223
tagged with: jquery
has title: hide show divs jquery with freewall.js
has body: I am using the freewall jquery plugin ( http://vnjs.net/www/project/freewall/ ) All working fine. Now I would like to add an option where people can select to show or hide a div. Also working fine. Example: http://www.surveydesigners.com/freewall/ If you click on the options in the "Question 1" you will see how it works. However it is not showing the layout I normally get when I leave my hide show divs option out (the first js script below). The reason is probably because I want todo wall.refresh() before the freewall is created. I changed the orders of this but it doesn't help. I assume it is something small but can't get it working. &lt;script type="text/javascript"&gt; $(function () { $('#id_radio1').click(function () { $('#div2').hide('fast'); $('#div1').show('fast'); }); $('#id_radio2').click(function () { $('#div1').show('slow'); $('#div2').show('fast'); }); $('#id_radio3').click(function () { $('#div1').hide('fast'); $('#div2').hide('fast'); }); wall.refresh(); }); &lt;/script&gt; &lt;script type="text/javascript"&gt; var colour = [ "rgb(142, 68, 173)", "rgb(243, 156, 18)", "rgb(135, 0, 0)", "rgb(211, 84, 0)", "rgb(0, 106, 63)", "rgb(192, 57, 43)", "rgb(39, 174, 96)", "rgb(41, 128, 185)" ]; $(".brick").each(function() { this.style.backgroundColor = colour[colour.length * Math.random() &lt;&lt; 0]; }); $(function() { var wall = new freewall("#freewall"); wall.reset({ selector: '.brick', animate: true, cellW: 160, cellH: 160, onResize: function() { wall.fitWidth(); } }); wall.addCustomEvent('onBlockLoad', function(setting){ console.log(setting); }); wall.fitWidth(); }); &lt;/script&gt;
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46797121
has comment: http://stackoverflow.com/comment/46828177
has comment: http://stackoverflow.com/comment/46828777
answer count: 0
type: Question
has comment: http://stackoverflow.com/comment/46797184
tagged with: javascript
score: 0

http://stackoverflow.com/a/29366413
answers question: http://stackoverflow.com/q/29366309
type: Answer
score: 0
has body: You just call the function at the end of your function first_function () { alert('whatever'); second_function(); }

http://stackoverflow.com/q/29337447
has comment: http://stackoverflow.com/comment/46863045
accepted answer: http://stackoverflow.com/a/29337480
score: 1
type: Question
upvote count: 1
has answer: http://stackoverflow.com/a/29337480
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
has title: How I create this jquery in a reusable way?
has body: I am using Bootstrap popovers with dynamic contents from my databese. In php, its creating dynamic classes for each popover. My question is, In jquery, do I need to call to triggering the popover separately? This is how I use jQuery to trigger the popovers - $(".image-info-popover-1").popover({ html : true, placement : 'left', trigger: 'hover', content: function() { return $('.popoverContent-1').html(); }, title: function() { return $('.popoverTitle-1').html(); } }); $(".image-info-popover-2").popover({ html : true, placement : 'left', trigger: 'hover', content: function() { return $('.popoverContent-2').html(); }, title: function() { return $('.popoverTitle-2').html(); } }); $(".image-info-popover-3").popover({ html : true, placement : 'left', trigger: 'hover', content: function() { return $('.popoverContent-3').html(); }, title: function() { return $('.popoverTitle-3').html(); } }); $(".image-info-popover-4").popover({ html : true, placement : 'left', trigger: 'hover', content: function() { return $('.popoverContent-4').html(); }, title: function() { return $('.popoverTitle-4').html(); } }); $(".image-info-popover-5").popover({ html : true, placement : 'left', trigger: 'hover', content: function() { return $('.popoverContent-5').html(); }, title: function() { return $('.popoverTitle-5').html(); } }); But this is not the best way If I have a list of popovers to triggering out. So anybody tell me the good way to do this in a reusable manner? Thank you.
downvote count: 0
tagged with: twitter-bootstrap
type: AnsweredQuestion

http://stackoverflow.com/q/29327597
score: 0
answer count: 1
has body: I have thousands of data populated in autocomplete. If type a letter say,a all the labels with character a are shown but I need result that either contains a as a single word or starts with character a. A little help here???
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29342573
has title: Custom filter at word level, not substring, in category autocomplete jQuery
type: Question
tagged with: autocomplete
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/46647340
type: QuestionComment
has text: Change `email: $('#email').val()` to `email : email` as you're passing the data in when you make the call.
score: 0
comment on: http://stackoverflow.com/q/29219013
type: Comment

http://stackoverflow.com/q/29263609
has answer: http://stackoverflow.com/a/29263643
type: Question
has comment: http://stackoverflow.com/comment/46729573
has title: Programmatically learn the results of spellcheck
answer count: 1
tagged with: javascript
favorite count: 0
has body: Hello is there a programmatically(js) way to learn the results of spellcheck='true'? E.g. if this textarea Has orthographically correct content?
score: 0
accepted answer: http://stackoverflow.com/a/29263643
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/317598
upvote count: 1
downvote count: 1
type: AnsweredQuestion

http://stackoverflow.com/comment/46765284
comment on: http://stackoverflow.com/q/29283507
score: 0
has text: @LagWagon I was actually looking forward for a javaScript/jQuery solution and what you explained seems like it could work, would you like to post it as an answer?
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46898467
type: QuestionComment
comment on: http://stackoverflow.com/q/29356457
type: Comment
has text: So, there is no problem now?
score: 0

http://stackoverflow.com/a/29278203
downvote count: 0
score: 5
type: Answer
upvote count: 5
accepted answer of: http://stackoverflow.com/q/29263549
answers question: http://stackoverflow.com/q/29263549
type: AcceptedAnswer
has body: As long as I remember, everything inside ... section is generated by sails. Try just to put your link after , so it will be like

http://stackoverflow.com/a/29328890
answers question: http://stackoverflow.com/q/29324651
score: 0
type: Answer
has body: As you store the cookie, you can use it information in PHP as well to repopulate the query filter and the checkboxes on the form <?php $checkboxes = array('checkbox1' => false, 'checkbox2' => false, 'checkbox3' => false, 'checkbox4' => false, ); if (isset($_COOKIE['elementValues'])) { /* Cookie values are stored like JSON */ $raw = json_decode($_COOKIE['elementValues'], true); //cast to array var_dump($raw); foreach($raw as $input_name => $value) { if (isset($checkboxes[$input_name])) { $checkboxes[$input_name] = $value; //true/false } } } var_dump($checkboxes); if (isset($_POST["checkbox1"]) || $checkboxes['checkbox1']) { $arguments[] = "AND `2kandunder` = 'yes'"; } if (isset($_POST["checkbox2"]) || $checkboxes['checkbox2']) { $arguments[] = "AND `2kto4k` = 'yes'"; } if (isset($_POST["checkbox3"]) || $checkboxes['checkbox3']) { $arguments[] = "AND 4kandup = 'yes'"; } $str = ''; if(!empty($arguments)) { $str = implode(' ',$arguments); } echo 'QUERY FILTER : ' . $str; ?> Checkbox state - Coookies <?php foreach($checkboxes as $input_name => $checked) { echo ' '; } ?>

charts
tags question: http://stackoverflow.com/q/29230383
tags question: http://stackoverflow.com/q/29256094
tags question: http://stackoverflow.com/q/29243205
tags question: http://stackoverflow.com/q/29363682
tags question: http://stackoverflow.com/q/29242440
tags question: http://stackoverflow.com/q/29355233
type: Tag
tags question: http://stackoverflow.com/q/29360592
tags question: http://stackoverflow.com/q/29283887
tags question: http://stackoverflow.com/q/29244837
tags question: http://stackoverflow.com/q/29369159
tags question: http://stackoverflow.com/q/29299315
tags question: http://stackoverflow.com/q/29305219
tag name: charts
tags question: http://stackoverflow.com/q/29299242
tags question: http://stackoverflow.com/q/29334826
tags question: http://stackoverflow.com/q/29256329
tags question: http://stackoverflow.com/q/29252451
tags question: http://stackoverflow.com/q/29345407
tags question: http://stackoverflow.com/q/29262013

http://stackoverflow.com/comment/46727716
score: 0
type: Comment
has text: "the JS interpreter will turn the first 0 into a Number object" -- where is that specified? There is no `ToObject()` call as far as I can see.
type: AnswerComment
comment on: http://stackoverflow.com/a/29251025

http://stackoverflow.com/comment/46777504
type: Comment
has text: Thanks for the clarification! This case is simplified, I am comparing one string to many other strings (5+) and was hoping for a way to do this concisely, but looks like breaking it out into several conditionals separated by "||" is the way to go
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29289929

http://stackoverflow.com/q/29292543
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/46781793
has comment: http://stackoverflow.com/comment/46810207
has comment: http://stackoverflow.com/comment/46781771
score: 0
has title: Why is my PHP script returning different results on similar inputs?
has body: Background: I am doing ajax calls to a PHP script which returns data to fill a form based on some file key a user inputs. This form is used so users may edit an incorrectly inputted file key from their original submission. Problem: If a user wanted to edit a file key, they input it into a text box, hit a button for an ajax pull, the form fills, they can then correct their mistakes and submit. However, if they try to edit the new file key again, the form will not fill and I am getting no results returned from the query. This is the php script I have been using to pull the data from the server. A sample file key might be: 10000010000-0D-MAN. This is a good response: 10000010000-0D-MAN,N/A,amibaguest,dfgfdgfd,Electrical This is the response I get on a newly edited file key: Nothing returned. Id: 20000010000-0D-MAN. Really baffled at the moment. If more information is needed, please let me know. $dbhandle = mysql_connect($hostname, $username, $password) or die("Unable to connect to MySQL"); $selected = mysql_select_db("database", $dbhandle) or die("Could not select database"); $id = $_GET['param']; if(isset($_GET['param'])) { $sql = sprintf("SELECT a.File_key, a.Name, a.Uploader, a.File_descriptor, b.keyword1 FROM files as a, keyword as b WHERE a.File_key='%s' AND a.File_key=b.File_key", mysql_real_escape_string($id)); $result = mysql_query($sql); if($result === FALSE) { echo mysql_error(); } if(mysql_num_rows($result)==1) { while($myrow = mysql_fetch_array($result)) { $file_key = $myrow["File_key"]; $name = $myrow["Name"]; $uploader = $myrow["Uploader"]; $file_desc = $myrow["File_descriptor"]; $keyword = $myrow["keyword1"]; $text_out .= $file_key.",".$name.",".$uploader.",".$file_desc.",".$keyword; }// end while } else { $text_out = " Nothing returned. Id: ".$id; }// end else }// endif echo $text_out;
tagged with: ajax
type: UnansweredQuestion
tagged with: php
answer count: 0
tagged with: mysql
tagged with: forms

http://stackoverflow.com/a/29289875
accepted answer of: http://stackoverflow.com/q/29288370
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29288370
type: Answer
has body: What I would recommend is to begin with reformatting a little. You should make each point look something like this: {"date":"1412121600000","values":["Long":100.0,"Short":100.0,"Combined" :100.0]} Then you can reference them with .date or .value. For example if "date" is supposed to be a value on the x axis you can go .attr('x',function(d){return d.date;}) with some Date.parse() function. Notice for example how Mike does it data.forEach(function(d) { d.date = parseDate(d.date); }); var parseDate = d3.time.format("%Y%m%d").parse; Here he has "date" as a column and can reference it as such. With JSON that is done as I showed you.
score: 0

http://stackoverflow.com/a/29220149
type: Answer
answers question: http://stackoverflow.com/q/29219491
has body: I think, that you should use some filter like that if you don't want to change your model: .filter('stateFilter', function() { return function(states, countryID) { var filtered = []; angular.forEach(states, function(state){ if(state.value === countryID) filtered.push(state); }); return filtered; }; }); to filter out all values that have value equal to selected country.value in first select control. To use that filter you need to modify your ng-repeat directive value in state select control: ng-options="state as state.label for data | stateFilter:correctlySelected"
downvote count: 0
score: 1
upvote count: 1

http://stackoverflow.com/q/29330989
upvote count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
has body: I've got a problem with filtering data from JSON file, which is an array of 20 objects. in my factory I have these two functions. function getData() { return $http .get('mock.json') .success(_handleData) .error(_handleError); } function _handleData(data) { var filteredData = _filterData(data, "name", "XYZ"); console.log('filteredData', filteredData); return filteredData; } and here console.log("filteredData") shows only filtered elements (i.e. 3 out of 20); next - in a service I've got this one on ng-click: var filterMe = function () { DataFactory .getData(_address) .success(_handleServiceData ); } where var _handleServiceData = function (data) { filtered = data; }; the thing is - why the 'data' in _handleServiceData shows all of the elements instead of these previously filtered? edit: here's the plunk - results are logged in console
tagged with: promise
has answer: http://stackoverflow.com/a/29331298
tagged with: angularjs
linked to: http://stackoverflow.com/q/23667086
type: AnsweredQuestion
has title: Filtering and $http promises in Angular
type: Question
possible better answer: http://stackoverflow.com/a/29331298
score: 1
has answer: http://stackoverflow.com/a/29331272
accepted answer: http://stackoverflow.com/a/29331272
answer count: 2

http://stackoverflow.com/comment/46645486
has text: This is unrelated but use `"use strict";` instead of `"use strict;"` or your code won't be parsed in strict mode.
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/29218226
type: Comment

http://stackoverflow.com/q/29225868
has answer: http://stackoverflow.com/a/29349933
type: Question
downvote count: 0
answer count: 1
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29349933
has comment: http://stackoverflow.com/comment/46678927
has comment: http://stackoverflow.com/comment/46868187
favorite count: 0
has body: I am creating a famo.us app in which header footer and content area is there. In content area different views are rendering using RenderController on action of each other and in each view different sub views are there. Events are communicating through java script using document.dispatchEvent() and addEventLiserner() method instead of famo.us events. I just want to ask that whether it is worth using this listener functions. As I have tried through famous events like setInputHandler, setOnputHandler, emit , addListener, pipe given in famo.us documentation, But I cannot able to communicate using this. The main question is the static app created by me is taking huge time when loaded from server and animations are running very slowly. Is there any solution for this. Actually code is too long dummy example is below. I am creating an application having header footer and content view. In Content view I am rendering different views using renderController. Content View define(function(require, exports, module) { var View = require('famous/core/View'); var Surface = require('famous/core/Surface'); var LoginView = require('views/login/LoginView'); var AccountsView = require('views/login/AccountsView'); //need to call on login function ContentView() { View.apply(this, arguments); var renderController = new RenderController({ inTransition: {curve: Easing.easeOut, duration: 1000}, outTransition: {curve: Easing.easeIn, duration: 1000}, overlap: true, }); var loginview = new LoginView(); renderController.show(loginview); //rendered initially this.add(renderController); document.addEventListener("showAccountsView",function(){ var accoutsView = new AccountsView() renderController.show(accoutsView); }.bind(this)); } }); Login View define(function(require, exports, module) { var View = require('famous/core/View'); var Surface = require('famous/core/Surface'); var InputSurface = require("famous/surfaces/InputSurface"); function LoginView() { View.apply(this, arguments); var loginBoxConta…
upvote count: 2
has title: How to communicate between two views( different js files) in Famo.us
score: 2
type: AnsweredQuestion
tagged with: famo.us
has comment: http://stackoverflow.com/comment/46846074

http://stackoverflow.com/a/29292243
has body: Maybe you can add hash to your client code file name. eg app-abcd23.js. So the browser will reload the file instead of get it from cache. or you can just add the hash to url.eg app.js?hash=abcd23 but some browser may still use the cached version. i know rails has assets-pipline to handle it, but i am not familiar with MEAN stack. there should be some package in npm for that purpose. And i dont think it is really necessary to use socket.io if you want to notify the user their client code is out of date. you can define your version in both html meta tag and js file,if mismatch, show a popup and tell the user to refresh.
type: Answer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/46782691
answers question: http://stackoverflow.com/q/29292051
has comment: http://stackoverflow.com/comment/46786428
upvote count: 1

http://stackoverflow.com/q/29311643
score: 0
has comment: http://stackoverflow.com/comment/46817293
answer count: 3
has answer: http://stackoverflow.com/a/29311678
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29311700
accepted answer: http://stackoverflow.com/a/29311678
has body: I am trying to create an image which is initially hidden - but reveals itself once the document has loaded completely via the JavaScript file. $(document).ready(function () { document.getElementById("theImage").style.visibility = "visible"; }); #theImage { visibility:hidden; } Kami Nelson Bio Bio for Kami Nelson Text Why is this not working? Thank you in advance.
tagged with: css
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29311691
has answer: http://stackoverflow.com/a/29311691
has comment: http://stackoverflow.com/comment/46816972
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/46816889
has title: Show image via javascript after page load

http://stackoverflow.com/a/29292599
score: 0
answers question: http://stackoverflow.com/q/29292362
type: Answer
has body: I have made a demo with your code, it works. Total: Pay You can check here: http://plnkr.co/edit/Uw5DlVpdTJYFPJ0I7jjB?p=preview
has comment: http://stackoverflow.com/comment/46781901

http://stackoverflow.com/q/29330426
has comment: http://stackoverflow.com/comment/46851124
tagged with: ajax
has comment: http://stackoverflow.com/comment/46850662
type: Question
tagged with: http://stackoverflow.com/tag/html
has body: I have a page where I show list of products alphabetically. The products are loaded dynamically using ajax when the user starts scrolling I have alphabet list on top of my page (A-Z), so when user clicks on any of the alphabet I need to scroll the page to the list of products starting with that alphabet The function works fine if the div is loaded already i.e if user has scrolled and products starting with D are loaded and then user click on the Alphabet D on the top of page. If the list of products with the alphabet D is not loaded then I load all the products from A-D whichever are yet to be loaded but I am not able to scroll to the top of the div where list of products starting with D. If any one has any pointers to solve the issue please help. Thanks in advance Following is code snippet for my javascript code $('.jump').click(function () { var alphabet = $(this).text(); var jumpToId = "#" + alphabet.toUpperCase(); var targetAlphabetAscii = alphabet.charCodeAt(0); if (targetAlphabetAscii >= nextAlphabet) { var current = ""; do { current = GetNextAlphabet(); //This function loads the list of products and appends //to a existing div on the page. GetProductData(current); } while (current != alphabet); } //The problem is here .. I dont get the offset because till the time the following //code is executed the div with the selector jumpToId is not loaded.. //so I get undefined error for .offset() method and cannot scroll var offset = $(jumpToId).offset(); offset.left -= 20; offset.top -= 20; $('html, body').animate({ scrollTop: offset.top, scrollLeft: offset.left }); }); The HTML anchors i.e the list of alphabets on top of page looks like this a b c d
accepted answer: http://stackoverflow.com/a/29330986
has comment: http://stackoverflow.com/comment/46851214
has comment: http://stackoverflow.com/comment/46850783
score: 0
has title: Jump to a div loaded using ajax
has comment: http://stackoverflow.com/comment/46851292
answer count: 1
has comment: http://stackoverflow.com/comment/46850305
tagged with: javascript
has comment: http://stackoverflow.com/comment/46850508
has comment: http://stackoverflow.com/comment/46850624
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29330986
tagged with: jquery
has comment: http://stackoverflow.com/comment/46850956

http://stackoverflow.com/comment/46690415
type: QuestionComment
has text: How about this http://www.sitepoint.com/javascript-custom-events/ ? It's not supported by IE9 and below though you could use https://msdn.microsoft.com/en-us/library/ie/ff975304%28v=vs.85%29.aspx for that
comment on: http://stackoverflow.com/q/29239326
score: 0
type: Comment

http://stackoverflow.com/comment/46888901
has text: Disable the submit button once pressed, like [http://jsfiddle.net/lshettyl/3e3bb3jj/2/](http://jsfiddle.net/lshettyl/3e3bb3jj/2/)
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29281656

http://stackoverflow.com/q/29231281
tagged with: oop
has answer: http://stackoverflow.com/a/36098559
tagged with: javascript
score: 4
answer count: 3
downvote count: 0
favorite count: 0
possible better answer: http://stackoverflow.com/a/35655456
has title: extending Phaser.js classes
upvote count: 4
has body: im working with Phaser framework , i want to create new class that hold all properties from sprite class in phaser so i tried doing this var mario = function(){ Phaser.Sprite.call(this); // inherit from sprite }; but there was an error "Uncaught TypeError: undefined is not a function" then i tried var mario = function(){ this.anything = ""; }; mario.prototype = new Phaser.Sprite(); OK it works but it called phaser constructor and i don't want to create sprite until i do var heroObj = new mario(); what should i do ?
has answer: http://stackoverflow.com/a/29231788
accepted answer: http://stackoverflow.com/a/29231788
has answer: http://stackoverflow.com/a/35655456
type: Question
tagged with: phaser-framework
type: AnsweredQuestion

http://stackoverflow.com/q/29339051
downvote count: 0
tagged with: select
has comment: http://stackoverflow.com/comment/46866803
has comment: http://stackoverflow.com/comment/46866781
has comment: http://stackoverflow.com/comment/46866222
possible better answer: http://stackoverflow.com/a/29339104
type: Question
score: 3
has comment: http://stackoverflow.com/comment/46866692
tagged with: javascript
has comment: http://stackoverflow.com/comment/46865785
has title: What is a better way to use less code to hide and display select menu content? javascript
has comment: http://stackoverflow.com/comment/46865740
has body: UPDATE The option values are not incremental, does that matter? Eg. one option could be apples, the next could be dog I have multiple drop down menus with multiple options and every time I select an option I display different information but in order to hide it to display a different option's information, I have to compare the current option's value and if it matches, hide it, then show the new option's information. As an example: drop-down select menu label option apple dog shoes javascript function showContent($i) { if($i=="apple"){ document.getElementById('apple').style.display = "inline-block"; document.getElementById('dog').style.display = "none"; document.getElementById('shoes').style.display = "none"; } if($i=="apple"){ document.getElementById('apple').style.display = "none"; document.getElementById('dog').style.display = "inline-block"; document.getElementById('shoes').style.display = "none"; } if($i=="apple"){ document.getElementById('apple').style.display = "none"; document.getElementById('dog').style.display = "none"; document.getElementById('shoes').style.display = "inline-block"; } } content to be displayed I am an apple I am a dog I am a pair of shoes As you can see, this can become a lot... I have like 20 options for one menu... 19 things to check if open and close, then open the actual one that you want to see.
has comment: http://stackoverflow.com/comment/46866957
upvote count: 3
has comment: http://stackoverflow.com/comment/46866309
has comment: http://stackoverflow.com/comment/46866357
has answer: http://stackoverflow.com/a/29339104
has comment: http://stackoverflow.com/comment/46865759
has comment: http://stackoverflow.com/comment/46866142
favorite count: 0
has answer: http://stackoverflow.com/a/29339181
has comment: http://stackoverflow.com/comment/46866773
has comment: http://stackoverflow.com/comment/46866547
has answer: http://stackoverflow.com/a/29339123
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/29339123
tagged with: css
answer count: 4
has answer: http://stackoverflow.com/a/29339336
type: AnsweredQuestion

http://stackoverflow.com/q/29225377
has answer: http://stackoverflow.com/a/29225460
answer count: 2
downvote count: 0
tagged with: jquery
possible better answer: http://stackoverflow.com/a/29225484
favorite count: 0
has answer: http://stackoverflow.com/a/29225484
upvote count: 2
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/29225460
score: 2
type: AnsweredQuestion
has body: HTML : &lt;input type="text" class="mytextbox"&gt; &lt;input type="text" class="mytextbox"&gt; &lt;input type="text" class="mytextbox"&gt; &lt;input type="text" class="mytextbox"&gt; &lt;input type="button" class="mybutton" value="focus next" onclick="focusNext()"&gt; &lt;input type="button" class="mybutton" value="focus prev" onclick="focusPrev()"&gt; JS code : //focused is getting last focused textfield var focused = null; $(".mytextbox").focus(function(){ focused = $(this); }); //focus next function focusNext(){ $(".mytextbox").each( //checking is this textbox focused if($(this)[0] == focused[0]){ $(this).next().focus(); //or $(this).next(".mytextbox").focus(); } ); } //focus prev function focusPrev(){ $(".mytextbox").each( //checking is this textbox focused if($(this)[0] == focused[0]){ $(this).prev().focus(); //or $(this).prev(".mytextbox").focus(); } ); } i think $(this).next() is not working.. is next() function not working in each ??? how can i focus next or previous text field when button clicked? Help me.. and thank you..
has title: how to focus next textfield when button clicked?
type: Question
tagged with: javascript

http://stackoverflow.com/q/29238965
has comment: http://stackoverflow.com/comment/46684915
has answer: http://stackoverflow.com/a/29482800
has comment: http://stackoverflow.com/comment/46685273
has title: Inconsistent behavior of document.write in chrome and firefox
has answer: http://stackoverflow.com/a/29471975
has comment: http://stackoverflow.com/comment/46684076
has comment: http://stackoverflow.com/comment/47025701
has comment: http://stackoverflow.com/comment/47051794
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46685825
has comment: http://stackoverflow.com/comment/46685372
tagged with: google-chrome
type: Question
has comment: http://stackoverflow.com/comment/46685134
has comment: http://stackoverflow.com/comment/46685482
upvote count: 6
tagged with: javascript
favorite count: 0
score: 4
answer count: 2
downvote count: 2
has body: Problem While executing multiple document.write, I notice that they dont modify the DOM immediately. The first document.write executes immediately, while the impact of others on the DOM is only visible at the end of that &lt;script&gt; block. In Chrome when I tested, it gives the results below. However in Firefox, the result is the same as Chrome if I just let this code run but different (see below) when I step through the code one statement at a time. Could someone explain this behavior? Code &lt;script&gt; document.write("&lt;script src='test.js'&gt;" + "&lt;/" + "script&gt;"); console.log(document.scripts.length); document.write("&lt;script src='test2.js'&gt;" + "&lt;/" + "script&gt;"); console.log(document.scripts.length); document.write("&lt;script src='test3.js'&gt;" + "&lt;/" + "script&gt;"); console.log(document.scripts.length); &lt;/script&gt; Chrome(v.41) Log 2 2 2 Firefox(v.36) Log (When stepping through the code in Dev Tools) 2 3 4 Update Original number of scripts in the DOM was 1 (the inline script written above). Chrome updated the DOM after first document.write but waited after that. Is that considered buggy behavior?

http://stackoverflow.com/q/29335369
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29335481
type: Question
has comment: http://stackoverflow.com/comment/46859356
upvote count: 4
has title: display array of objects in a dynamic table javascript
has comment: http://stackoverflow.com/comment/46859434
has comment: http://stackoverflow.com/comment/46859474
tagged with: arrays
downvote count: 0
has comment: http://stackoverflow.com/comment/46859466
answer count: 1
has body: I want to display an array of objects in a dynamic table using javascript. var rows=[{ name : "John", age:20, email: "xx@hotmail.com"}, { name : "Jack", age:50, email: "xxx@hotmail.com"}, { name : "Son", age:45, email: "xxxx@hotmail.com"} ........................etc ]; This is how it looks.I want to know how can I show this as a dynamic table.
tagged with: javascript
score: 4
linked to: http://stackoverflow.com/q/5180382
favorite count: 0
has comment: http://stackoverflow.com/comment/46859423
has comment: http://stackoverflow.com/comment/46859230
has comment: http://stackoverflow.com/comment/46859453
duplicate of: http://stackoverflow.com/q/5180382
has answer: http://stackoverflow.com/a/29335481

http://stackoverflow.com/comment/46903567
score: 0
comment on: http://stackoverflow.com/a/29359153
has text: @user2302401 Nps, please mark the answer correct (tick it) when you get a chance. A good place to nail down the basics is: http://meteortips.com/book/
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/46723936
comment on: http://stackoverflow.com/q/29260910
has text: Seems like you'd just switch to POST in such a case.
type: QuestionComment
type: Comment
score: 2

http://stackoverflow.com/comment/46776110
type: QuestionComment
comment on: http://stackoverflow.com/q/29289406
has text: Or any other form of navigation. It's a normal URL. What problem are you having.
score: 0
type: Comment

http://stackoverflow.com/q/29321442
has comment: http://stackoverflow.com/comment/46835420
tagged with: http://stackoverflow.com/tag/html
type: UnansweredQuestion
score: 1
has title: Firefox html5 validation anomaly with dynamic select options
upvote count: 1
has body: Here is a simple html5 form with two select controls. Changing the selection in the first select generates a new list of options for the second select. Both have the "required" attribute, and an initially selected blank option. The odd bit is that I get a red validation outline around the second select control, without submitting the form. No tool-tip with an error message, just the outline. -- Select1 -- Select1, Option1 Select1, Option2 Select1, Option3 Select1, Option4 Select1, Option5 -- Select2 -- (empty) -- Select3 -- Select3, Option1 Select3, Option2 Select3, Option3 Select3, Option4 Select3, Option5 fiddle here: https://jsfiddle.net/afg57g0u/1/ Run the code, and then select any option in the first select control. The second lights up red immediately, but the other required controls do not, so it's not validating the whole form, just the second select control (sort-of). This happens in Firefox 36.0.4. This does not happen on IE 11.0.17, Opera 28.0, Chrome 41.0.2272.101, or Safari 5.1.7 (duh). (on Win8 box) I can find no other mention online of a similar problem. I have tried numerous approaches to disable or work-around this problem, but no luck. Does anyone have any ideas? Is this a Firefox bug?
has comment: http://stackoverflow.com/comment/46834499
linked to: http://stackoverflow.com/q/5939341
has comment: http://stackoverflow.com/comment/46835167
tagged with: javascript
has comment: http://stackoverflow.com/comment/46835199
has comment: http://stackoverflow.com/comment/46834949
type: Question
has comment: http://stackoverflow.com/comment/46835104
has comment: http://stackoverflow.com/comment/46835446
tagged with: validation
answer count: 1
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/29322177
tagged with: html-select

http://stackoverflow.com/a/29257649
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29255673
answers question: http://stackoverflow.com/q/29255673
score: 0
type: Answer
has body: Using hover/mouseenter for animation is finnicky, but at least you'll have more control using CSS. Try this? .asd{ position: relative } .asd:hover{ animation: bounceText .5s; -webkit-animation: bounceText .5s; } @-webkit-keyframes bounceText { 0% {top: 0px;} 50% {top: 10px;} 100% {top: 0px;} } @keyframes bounceText { 0% {top: 0px;} 50% {top: 10px;} 100% {top: 0px;} }

http://stackoverflow.com/q/29341513
has comment: http://stackoverflow.com/comment/46870199
tagged with: heredoc
has title: Combining single and double quotes in JavaScript
has comment: http://stackoverflow.com/comment/46870539
type: Question
accepted answer: http://stackoverflow.com/a/29341609
tagged with: javascript
score: 0
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/46870137
has answer: http://stackoverflow.com/a/29341609
type: AnsweredQuestion
has body: I'm wondering if JavaScript has a writing format for using html elements that have both single and double quotes inside JavaScript functions. May be something like heredoc for javascript or it could be a function in jQuery. I couldn't find a solution to my problem and will try to describe it below: I am writing a web page on php. I have a page and there is a form in it. There is a jQuery function that appends select elements to a form. After appending, user selects some options and submit the form. (I really wanted to paste a whole code here to make it clearer, but there is a big amount of code which is not so nice, so I tried to simplify it for you, sorry for some bad code) I have a php variable like this one (select has onchange event, showUser is a function with AJAX request): $string = <<<EOT EOT; And there are many option in between and of course closing (I didn't write all the code to be shorter). A part of jQuery function that appends select to the form: $(wrapper).append(' <? echo $string; ?> Del '); My problem here is that in $string variable I have to use single and double quotes, and when it comes to append() function in jQuery I use quotes again. And all these give me error in browser's console Uncaught SyntaxError: Unexpected identifier, because of single quotes started at append(' , but ending at onchange=' . Is there are any smart solution for this? I thought that heredoc will be, I've googled and I think that actually there is no heredoc for javascript. May be some other formattings available?
has comment: http://stackoverflow.com/comment/46870139

http://stackoverflow.com/q/29349235
linked to: http://stackoverflow.com/q/9329446
type: Question
has title: Why is an i variable included in a loop definition if it's not being used therein?
possible better answer: http://stackoverflow.com/a/29349285
has answer: http://stackoverflow.com/a/29349294
has comment: http://stackoverflow.com/comment/46884059
has answer: http://stackoverflow.com/a/29349285
has answer: http://stackoverflow.com/a/29349299
has comment: http://stackoverflow.com/comment/46884111
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/29349266
has comment: http://stackoverflow.com/comment/46884727
has answer: http://stackoverflow.com/a/29349302
has comment: http://stackoverflow.com/comment/46884338
accepted answer: http://stackoverflow.com/a/29349266
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46884083
answer count: 5
upvote count: 3
score: 0
downvote count: 3
has body: I’m doing an exercise on Code School, and I don’t understand how the loop works. There is an i, but I don’t see it used. Normally you use it somewhere. Otherwise, what is the for loop for? var puzzlers = [ function(a) { return 8 * a - 10; }, function(a) { return (a - 3) * (a - 3) * (a - 3); }, function(a) { return a * a + 4; }, function(a) { return a % 5; } ]; var start = 2; var applyAndEmpty = function(input, queue) { var length = queue.length; for (var i = 0; i &lt; length; i++) { input = queue.shift()(input); } return input; }; alert(applyAndEmpty(start, puzzlers));

http://stackoverflow.com/a/29261095
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/46725745
score: 1
has comment: http://stackoverflow.com/comment/46727342
has body: It seems that the issues is checking the validity of the input on an event other then its model changing. Namely, you want to also check the validity if the condition changes. See the directive: This is much closer to what you are looking for. You don't seem to what to make the the max field invalid if the min field is being edited. Another check in the watch function can accomplish that. .directive('highThreshold', function() { return { require: 'ngModel', scope: { 'highThreshold': '=' }, link: function($scope, element, ctrl, ngModel) { $scope.$watch('highThreshold', function(){ var isValid = ngModel.$modelValue &lt; $scope.highThreshold; ngModel.$setValidity("highThreshold", isValid); }); ngModel.$validators.highThreshold = function(value) { return value &lt; $scope.highThreshold; }; } }; }) .directive('lowThreshold', function() { return { require: 'ngModel', scope: { 'lowThreshold': '=' }, link: function($scope, element, attrs, ngModel) { $scope.$watch('lowThreshold', function(){ var isValid = ngModel.$modelValue &gt; $scope.lowThreshold; ngModel.$setValidity("lowThreshold", isValid); }); ngModel.$validators.lowThreshold = function(value) { return value &gt; $scope.lowThreshold; }; } }; }); http://jsfiddle.net/dn9prtxx/ Sorry for not getting the question the first time :) Hope this helps!
answers question: http://stackoverflow.com/q/29260718
downvote count: 0
has comment: http://stackoverflow.com/comment/46730697
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46727780
accepted answer of: http://stackoverflow.com/q/29260718

http://stackoverflow.com/a/29291991
score: 0
has body: That shouldn't be very difficult to accomplish. 1) In order to update the grid every 3 seconds, use javascript setInterval and call the grid's update method: jQuery('#grid_id_here').yiiGridView('update'); 2) In the complete column, set it to "type" =&gt; "raw" and then you put as "value" something like "&lt;input type='checkbox' onclick='mark_complete('.$data-&gt;id.')'&gt;" 3) Define a javascript function that completes the task function mark_complete(id) { // 1. make here a ajax call that updates the task's complete field // 2. on the success of that ajax call place again the update command to update the grid }
has comment: http://stackoverflow.com/comment/47311717
type: Answer
answers question: http://stackoverflow.com/q/29281748

http://stackoverflow.com/q/29287153
upvote count: 9
has answer: http://stackoverflow.com/a/33605759
has answer: http://stackoverflow.com/a/64770335
linked to: http://stackoverflow.com/q/47545950
has answer: http://stackoverflow.com/a/29288585
has title: Detecting hover events over parts of a chart using Chart.js
possible better answer: http://stackoverflow.com/a/29625985
type: AnsweredQuestion
has body: I've made a pie chart using Chart.js, and I'd like to detect when a segment is hovered over. I've found plenty of documentation regarding manipulating the tooltips that appear when hovering over segments, but nothing regarding doing something else when a tooltip would appear. Is this possible?
has answer: http://stackoverflow.com/a/32842808
downvote count: 0
tagged with: chart.js
has answer: http://stackoverflow.com/a/37269390
type: Question
score: 9
has comment: http://stackoverflow.com/comment/46772049
has comment: http://stackoverflow.com/comment/46772091
tagged with: javascript
has answer: http://stackoverflow.com/a/29625985
answer count: 6
accepted answer: http://stackoverflow.com/a/29288585
favorite count: 0

http://stackoverflow.com/a/49916847
type: Answer
answers question: http://stackoverflow.com/q/29363067
score: 0
has body: Try adding JSON.stringify() onclick="myfunction("+JSON.stringify(data) +")"

browser
tags question: http://stackoverflow.com/q/29326697
tags question: http://stackoverflow.com/q/29323719
tags question: http://stackoverflow.com/q/29347903
tags question: http://stackoverflow.com/q/29371145
tags question: http://stackoverflow.com/q/29296733
tags question: http://stackoverflow.com/q/29299913
tags question: http://stackoverflow.com/q/29296730
tags question: http://stackoverflow.com/q/29331694
tags question: http://stackoverflow.com/q/29331123
tags question: http://stackoverflow.com/q/29353602
tags question: http://stackoverflow.com/q/29345481
tags question: http://stackoverflow.com/q/29257452
tag name: browser
tags question: http://stackoverflow.com/q/29369696
type: Tag
tags question: http://stackoverflow.com/q/29239758
tags question: http://stackoverflow.com/q/29299200

http://stackoverflow.com/a/29223137
answers question: http://stackoverflow.com/q/29220678
has body: You could simply use a single variable to hold your state. Note that I hard-coded the loops for the example since we're always dealing with three buttons. inputs = document.getElementsByTagName('input'); state = 0; for (var i = 0; i &lt; 3; i++) { (function(i) { inputs[i].addEventListener('click', function() { state ^= (i + 1); for (var j = 1; j &lt; 3; j++) { inputs[j - 1].classList.toggle('on', (j &amp; state)); } }); }(i)); } input { background: lightgray } input.side { background: red } input.on { background: limegreen } &lt;input type="button" class="side" value="toggle left" /&gt; &lt;input type="button" class="side" value="toggle right" /&gt; &lt;input type="button" value="toggle both" /&gt; If you're instead looking to turn both toggles on if one is already on, you can simply add a separate check for that. if (i &amp; 2) { state = ~~(state &gt; 0) * 3; }
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29220678
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/q/29218213
has comment: http://stackoverflow.com/comment/46645992
has comment: http://stackoverflow.com/comment/46645713
type: Question
has comment: http://stackoverflow.com/comment/46646391
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29219742
has comment: http://stackoverflow.com/comment/46646182
has comment: http://stackoverflow.com/comment/46645481
has comment: http://stackoverflow.com/comment/46645888
answer count: 2
has answer: http://stackoverflow.com/a/29218300
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46645688
has comment: http://stackoverflow.com/comment/46645790
has comment: http://stackoverflow.com/comment/46645842
has comment: http://stackoverflow.com/comment/46646131
has comment: http://stackoverflow.com/comment/46645384
has body: I have a form and I need to perform an action if a certain input is changed. In my jQuery, I have a three input fields set to a different variable e.g: var workOrderInput = jQuery(".work-order-select input"); var eventSchedulerInput = jQuery(".event-scheduler .gchoice_2_13_0 #choice_2_13_0"); var eventSchedulerSelect = jQuery(".event-scheduler select"); In order to find out if the input changes, I am using: jQuery([workOrderInput, eventSchedulerInput, eventSchedulerSelect]).each(function() { jQuery(this).change(function() { }); }); If one of the input fields changes, I would like to set a variable to the value of a hidden input field e.g. jQuery([workOrderInput, eventSchedulerInput, eventSchedulerSelect]).each(function() { jQuery(this).change(function() { var totalCost = jQuery(".signup-cost #field_2_22 #input_2_22").val(); console.log(totalCost); }); }); Right now, the totalCost variable gets set but only on the second click. For example, If I click on ".work-order-select input" nothing happen. Only when I click on another input does the variable get set and show up in the console. Edit: Here is my HTML Square Footage Under 50,000($29.00/mt)</option Under 75,000($49.00/mt) Under 100,000($59.00/mt) Right now, as soon as one of the radio buttons are select, or the drop down changes, the input value of #input_2_22 is updated. Using mouseup() also works...kind of. If I use: jQuery([workOrderInput, eventSchedulerInput, eventSchedulerSelect]).each(function() { jQuery(this).mouseup(function() { var totalCost = jQuery(".signup-cost #field_2_22 #input_2_22").val(); console.log(totalCost); }); }); The first radio button that is select returns nothing. It's literally an empty line in Chrome's web inspector. The second time I click on a radio button, the value of the previous radio button I clicked on is shown. Edit 2: All of the above is fixed with: jQuery("#choice_2_13_0, #choice_2_10_0, #choice_2_10_1, #choice_2_10_2").addClass("discount-class"); jQuery(".discount-class").c…
has title: Get val of input of any variable with jQuery
has comment: http://stackoverflow.com/comment/46645709
has comment: http://stackoverflow.com/comment/46645446
has comment: http://stackoverflow.com/comment/46646570
has comment: http://stackoverflow.com/comment/46646461
accepted answer: http://stackoverflow.com/a/29218300
score: 0
has answer: http://stackoverflow.com/a/29219742

http://stackoverflow.com/q/29260781
has comment: http://stackoverflow.com/comment/46731779
has title: Some tags working, some doesn't in vim with ctags (Javascript code)
has comment: http://stackoverflow.com/comment/46749271
tagged with: vim
answer count: 0
has comment: http://stackoverflow.com/comment/46732608
has comment: http://stackoverflow.com/comment/46749130
has body: I successfully generated tags file with ctags -R. I can go to function definitions with CTRL-] in vim, but not all of them are working (E426: tag not found: someFunction). I checked the content of tags file, and all the definitions are there. What is the problem? EDIT: The problem is that the semicolon (;) was missing in many places in the JavaScript-codebase. Browsers managed to interpret the code, but ctags generated tags file in a wrong way. I did a script that removed the unwanted prefixes from the identifiers and now it is working. But I also downloaded jsl and I'm removing (or adding) unwanted (or missing) semicolons. If this task will be finished, probably ctags will generate proper tags file.
type: Question
tagged with: ctags
has comment: http://stackoverflow.com/comment/46761502
tagged with: javascript
has comment: http://stackoverflow.com/comment/46751282
score: 0
has comment: http://stackoverflow.com/comment/46732850
has comment: http://stackoverflow.com/comment/46727663
has comment: http://stackoverflow.com/comment/46749659
has comment: http://stackoverflow.com/comment/46732550
has comment: http://stackoverflow.com/comment/46731860
has comment: http://stackoverflow.com/comment/46749050
type: UnansweredQuestion

http://stackoverflow.com/q/29359700
has comment: http://stackoverflow.com/comment/46903801
type: Question
has comment: http://stackoverflow.com/comment/46906411
has comment: http://stackoverflow.com/comment/46903817
tagged with: javascript
has title: What could cause a game loop to crash at a random time?
has comment: http://stackoverflow.com/comment/46903673
score: 0
has comment: http://stackoverflow.com/comment/46903769
tagged with: tetris
type: UnansweredQuestion
tagged with: 2d-games
has body: I'm working on a project where I'm writing the game Tetris to be played in a browser using Javascript. I'm having a problem where the game simply stops working. It doesn't give any error messages. It's as if the game pauses itself after a random amount of time (usually around 30 seconds), after which nothing happens. I'm using a game loop to manage the game. Here is the highest level section of code which manages the game. var cycle = function GameTick(elapsed){ if(menuStatus != "game"){ renderMenu(); updateMenu(); } if(menuStatus == "game"){ render(); update(); } requestAnimationFrame(cycle); } My first instinct says that after running this for a while, constantly calling new iterations of the GameTick function, it runs out of stack space, but I have no idea if this is correct. Thanks for your help, and I'd be happy to clarify anything that doesn't make sense. I know I haven't given you much to go on, but I'm not sure what else would help besides posting the entire game code (which is very long). EDIT: I'm posting my render and update functions as requested function update(){ var currentTime = performance.now(); currentTime = Math.trunc(currentTime); if((currentTime - beginTime) &gt; dropTime) { pieceMoved = movePieces(); } if(!pieceMoved &amp;&amp; (currentTime - beginTime) &gt; dropTime) //If no pieces can move { setPieceLocation(); handleFullRows(); spawnNewPiece(); console.log(pieceArray.length) } if(pieceArray.length &gt; 0) console.log(pieceArray[pieceArray.length - 1].color); if((currentTime - beginTime) &gt; dropTime) beginTime = performance.now(); } function render(){ //This function handles the rendering ctx.fillStyle = "white"; ctx.fillRect(0, 0, canvas.width, canvas.height); if(pieceArray.length &gt; 0) //This renders the current moving piece { for(var j = 0; j &lt; 4; j++) { drawColoredBlock(pieceArray[pieceArray.length - 1].color, pieceArray[pieceArray.length - 1].xCoordinates[j], pieceArray[pieceArray.length - 1].yCoordinates[j]); } } for(var i = 0; …
answer count: 0

http://stackoverflow.com/comment/46790938
type: Comment
comment on: http://stackoverflow.com/q/29297585
type: QuestionComment
has text: Nothing is displayed in the `error_log` file
score: 0

http://stackoverflow.com/comment/46855241
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29298492
has text: @runspired my version has a find function so i think it's kinda supported... or not?
score: 0

http://stackoverflow.com/a/29270628
has comment: http://stackoverflow.com/comment/46742770
score: 0
has body: I've solved your problem here: https://jsfiddle.net/evL4cc5q/ var lastIndex = ""; function listQ(){ var e = document.getElementById("list"); if(e.selectedIndex &gt; 0){ if(e.selectedIndex != lastIndex) { if("Blank Test" === e.options[e.selectedIndex].value) alert("yo"); lastIndex = e.selectedIndex; } else { lastIndex = ""; } } } document.getElementById("list").addEventListener("click",listQ);
answers question: http://stackoverflow.com/q/29269948
type: Answer

http://stackoverflow.com/comment/46827531
has text: What errors do you get?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29317741

http://stackoverflow.com/q/29331811
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/29331923
tagged with: angularjs
has title: How to pass "this" with ng-click?
type: Question
possible better answer: http://stackoverflow.com/a/29331828
has body: I think I have done this before but I forgot how to do it. Here is what I want to accomplish: In the html, I have this setup: &lt;md-card ng-repeat="card in cards" data-link="{{card.link}}" ng-click="showCardDes(this)"&gt; In my Angular script, I set this up: $scope.showCardDes = function(e) { var tempUrl = $(e).attr('data-link'); $mdDialog.show({ controller: DialogController, templateUrl: tempUrl, }); }; I also tried in html: &lt;md-card ng-repeat="card in cards" ng-click="showCardDes({{card.link}})"&gt; and in my Angular script: $scope.showCardDes = function(url) { $mdDialog.show({ controller: DialogController, templateUrl: url, }); }; I remember when I did it before it involved something with setting up a ng-model, but I seriously cannot find the documentation either online or in my hard drive. &gt;.&lt; I forgot to mention I also tried this: &lt;md-card ng-repeat="card in cards" class="noselect hietim {{card.size}}" data-link="{{card.link}}" ng-click="showCardDes($event)" md-ink-ripple&gt; And in my Angular Script I used: $scope.showCardDes = function(event) { var tempUrl = $(event.target).attr('data-link'); $mdDialog.show({ controller: DialogController, templateUrl: tempUrl, }); }; This will return: Uncaught TypeError: Cannot read property 'hasAttribute' of undefined
has answer: http://stackoverflow.com/a/29331828
has answer: http://stackoverflow.com/a/29331846
score: 4
answer count: 3
accepted answer: http://stackoverflow.com/a/29331923
upvote count: 4
type: AnsweredQuestion
downvote count: 0

acrobat
type: Tag
tag name: acrobat
tags question: http://stackoverflow.com/q/29337531

http://stackoverflow.com/q/29351144
has answer: http://stackoverflow.com/a/29351230
has body: Hi I have a "persons" Object that contains four "person" Objects [Object, Object, Object, Object] In turn, each these "person" Objects contain keys and values. How do I access these values in Javascript? Trying this to access their "name" field, for example, doesn't work: for(var person in data.persons) { var nameList = nameList + person.name; } I'm a JS newbie. Thanks!
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29351250
type: Question
has answer: http://stackoverflow.com/a/29351233
tagged with: javascript
score: 0
answer count: 3
accepted answer: http://stackoverflow.com/a/29351233
has title: How to access an Object in an Object in javascript
possible better answer: http://stackoverflow.com/a/29351230

http://stackoverflow.com/comment/46648909
has text: @Adjit You *can*. You *are*.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29219131
score: 0

settimeout
tags question: http://stackoverflow.com/q/29326937
tags question: http://stackoverflow.com/q/29332254
tags question: http://stackoverflow.com/q/29321356
tags question: http://stackoverflow.com/q/29287002
tags question: http://stackoverflow.com/q/29310798
type: Tag
tags question: http://stackoverflow.com/q/29341039
tag name: settimeout
tags question: http://stackoverflow.com/q/29348848

http://stackoverflow.com/comment/46765971
score: 0
type: AnswerComment
has text: I'll be sure to avoid your site with my `niet.absol@fake.email.addresses.website`
type: Comment
comment on: http://stackoverflow.com/a/29283972

http://stackoverflow.com/q/29238059
has answer: http://stackoverflow.com/a/29259099
score: 0
answer count: 3
has body: This splits the string as wanted but doesn't keep the seperator: "200 g Joghurt".split(/[0-9]?\s?[–|-]?\s?[0-9]+\s?g{0,1}\b/) ["", " Joghurt"] I have cases like this 100-200g 1g 240 - 1500 g This thread suggest to use a positive look ahead. Javascript and regex: split string and keep the separator But if I put it in it splits to much: "200 g Joghurt".split(/(?=[0-9]?\s?[–|-]?\s?[0-9]+\s?g{0,1}\b)/) ["2", "0", "0 g Joghurt"] Question: How to split that string above (numbers can be any number, Joghurt can be any word) after the numbers and g. e.g. ["200-400g", "joghurt"] EDIT: There are cases where I don't have the g e.g. 1 song song michael jackson song So just matching with the g does not work. The cases I put in the examples are the cases with an g. And the g is always combined with one number or a range of numbers. Sorry about the confusion. I want to split recipe ingredients into the ingredient and the amount. The g is gram, maybe that makes the use case more clear. EDIT 2: I also modified it a bit, the regex basically works as you can see in this example: https://regex101.com/r/rL7hY9/1 But it does not split it in a whole block. I also have this problem with my other regex cases, the match on regex101 is the whole group. But .split() does not split it in one part (with the positive lookahead).
has title: Split String With Regex, Keep Seperator
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29242245
has comment: http://stackoverflow.com/comment/46682628
tagged with: regex
has comment: http://stackoverflow.com/comment/46683029
has answer: http://stackoverflow.com/a/29241753
linked to: http://stackoverflow.com/q/4204210
has comment: http://stackoverflow.com/comment/46682671
type: Question
linked to: http://stackoverflow.com/q/12001953
tagged with: javascript

http://stackoverflow.com/comment/46847709
type: AnswerComment
type: Comment
has text: [output](http://jsbin.com/yudofuvali/1/edit?html,console,output) of the code working
comment on: http://stackoverflow.com/a/29329005
score: 0

http://stackoverflow.com/a/34122285
answers question: http://stackoverflow.com/q/29322973
has body: Since 0.14 this method won't work, so I built a static component that will make this simple for you guys. You can just paste this in or reference it as a component. This should be re-useable and it will allow you to add additional styles and properties as-if it were a standard component const BackgroundImage = ({ source, children, style, ...props }) => { return ( {children} ); } just paste this in and then you can use it like image and it should fit the entire size of the view it is in (so if it's the top view it will fill your screen. <Scene styles={styles} {...store} /> Click here for a Preview Image
upvote count: 4
downvote count: 0
score: 4
type: Answer

http://stackoverflow.com/q/29280825
score: 0
accepted answer: http://stackoverflow.com/a/29281038
answer count: 1
tagged with: javascript
tagged with: angularjs
has answer: http://stackoverflow.com/a/29281038
type: Question
type: AnsweredQuestion
tagged with: angular-ui-router
has body: I want to create dynamic navigation, that i can change navigation item by state, the problem is when i change the content, the navigation is cleared out, i already tried this solution but it seems not working on my cases Here is my plunker And here is my state configuration var app = angular.module('knax', ['ui.router', 'ui.bootstrap']); app.config( function($stateProvider) { $stateProvider.state('app', { views: { '@': { templateUrl: 'layout.html' }, 'navigation-layout@app': { templateUrl: 'navigation-layout.html' }, 'content-layout@app': { templateUrl: 'content-layout.html' } } }) .state('app.navigation-user', { views: { 'navigation': { templateUrl: 'navigation-user.html' } } }) .state('app.navigation-guest', { views: { 'navigation': { templateUrl: 'navigation-guest.html' } } }) .state('app.content', { url: '/content', views: { 'content': { templateUrl: 'content.html' } } }) .state('app.content2', { url: '/content2', views: { 'content': { templateUrl: 'content2.html' } } }); } ); app.run(function($state){ $state.go('app.navigation-user'); });
linked to: http://stackoverflow.com/q/25815505
has title: Persist state when changing to another state

http://stackoverflow.com/a/29250721
downvote count: 0
type: Answer
score: 2
upvote count: 2
has body: Your button value will not be submitted until you click on it. So either you trigger its click event $(document).ready(function(){ $("textarea").keyup(function(event){ if(event.keyCode == 13){ //$("form").submit(); $("#sendieButton").trigger("click"); } }); }); or check only textarea value isset or not in PHP if(isset($_POST['sendie'])){ $fromID = $brugernavn; $fromMsg = $_POST['sendie']; sendMsg($fromID, $fromMsg); };
answers question: http://stackoverflow.com/q/29250134
accepted answer of: http://stackoverflow.com/q/29250134
type: AcceptedAnswer

http://stackoverflow.com/a/29338209
has body: You can't use jquery function as obj already wrapped as DOM. Instead of using .data() or .attr(), try this native javascript code : obj.getAttribute("data-value");
score: 4
accepted answer of: http://stackoverflow.com/q/29338171
answers question: http://stackoverflow.com/q/29338171
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46864582
type: Answer
has comment: http://stackoverflow.com/comment/46864522
upvote count: 4
downvote count: 0

http://stackoverflow.com/comment/46870966
has text: A case of primitive vs object. Don't use `new Number`.
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/29342046

http://stackoverflow.com/comment/46739886
has text: http://www.cloudformatter.com/CSS2Pdf is Javascript that walks the browser DOM, extracts it and cleans it up abit and sends to a remote server for formatting. The remotes server uses XSL to convert the XML obtained from the DOM to XSL FO and onto PDF (or any other supported format).
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29267729

http://stackoverflow.com/comment/46797445
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29301375
has text: did you try `strokeText`
score: 0

http://stackoverflow.com/a/29348107
has comment: http://stackoverflow.com/comment/58431507
answers question: http://stackoverflow.com/q/29346642
accepted answer of: http://stackoverflow.com/q/29346642
has comment: http://stackoverflow.com/comment/46882470
has comment: http://stackoverflow.com/comment/46884700
has comment: http://stackoverflow.com/comment/46924265
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46882668
has comment: http://stackoverflow.com/comment/46883632
has body: You need to investigate why exactly your loading process is freezing the app for a few seconds, this sounds way too long. Memory Consider the size of your data, assuming that your 512x512 textures are only around 256kb in size each, for 2000 textures you're still trying to store 500MB (+ ~33% base64 overhead) of data in indexedDB which is currently limited to 5MB. So you'll have to load the textures on demand either way. Texture atlas / Megatextures: Using megatextures/a texture atlas will not be a feasible approach here. WebGL does not support the features necessary to impliment this in a memory efficient way. You would need to allocate a texture in maximum texture size(between 8k and 16k) and then tile your textures into it, keeping track of what textures are currently used so that you may update arbitrary parts of the atlas with new, required textures. Once you run out of atlas tiles you need to allocate a new atlas texture at maximum size and this is where you'll get real hiccups and crashes as you cant query how much GPU memory is available. Implementing an adaptive loading queue: var textureQueue = []; // on visible if (loadedTextures[textureID]) return object.texture = loadedTextures[textureID]; textureQueue.push(textureID); object.texture = loadingTexture; // each update var startLoading = window.performance.now(), currentTime = startLoading, loadID ; while( currentTime - startLoading &lt; 10/*ms*/ &amp;&amp; loadID = textureQueue.shift() ) { /** load and assign texture here **/ currentTime = window.performance.now(); }
type: Answer
has comment: http://stackoverflow.com/comment/46883283
has comment: http://stackoverflow.com/comment/46884916
has comment: http://stackoverflow.com/comment/46882558
has comment: http://stackoverflow.com/comment/46909860
score: 0

http://stackoverflow.com/comment/46776516
type: Comment
comment on: http://stackoverflow.com/a/29288866
has text: Thanks very much this was really helpful. I've actually got it working using a couple of if statements inside my success function but it seems a little sloppy so I'll almost certainly try and implement this instead
score: 0
type: AnswerComment

http://stackoverflow.com/comment/46726305
type: Comment
has text: Seems really roundabout to create an element just to get the markup for it.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29262134

c#
tags question: http://stackoverflow.com/q/29329018
tags question: http://stackoverflow.com/q/29299301
tags question: http://stackoverflow.com/q/29255117
tags question: http://stackoverflow.com/q/29261984
tags question: http://stackoverflow.com/q/29242548
tags question: http://stackoverflow.com/q/29285988
tags question: http://stackoverflow.com/q/29231066
tags question: http://stackoverflow.com/q/29372149
tags question: http://stackoverflow.com/q/29291557
tags question: http://stackoverflow.com/q/29260053
tag name: c#
tags question: http://stackoverflow.com/q/29317171
tags question: http://stackoverflow.com/q/29240256
tags question: http://stackoverflow.com/q/29356848
tags question: http://stackoverflow.com/q/29321363
tags question: http://stackoverflow.com/q/29231254
tags question: http://stackoverflow.com/q/29348970
tags question: http://stackoverflow.com/q/29365947
tags question: http://stackoverflow.com/q/29218880
tags question: http://stackoverflow.com/q/29357884
tags question: http://stackoverflow.com/q/29352208
tags question: http://stackoverflow.com/q/29293637
tags question: http://stackoverflow.com/q/29236137
tags question: http://stackoverflow.com/q/29281036
tags question: http://stackoverflow.com/q/29331795
tags question: http://stackoverflow.com/q/29302507
tags question: http://stackoverflow.com/q/29359761
tags question: http://stackoverflow.com/q/29291311
tags question: http://stackoverflow.com/q/29287311
tags question: http://stackoverflow.com/q/29284122
tags question: http://stackoverflow.com/q/29332844
tags question: http://stackoverflow.com/q/29279042
tags question: http://stackoverflow.com/q/29371607
tags question: http://stackoverflow.com/q/29257678
tags question: http://stackoverflow.com/q/29305900
tags question: http://stackoverflow.com/q/29269637
tags question: http://stackoverflow.com/q/29342454
tags question: http://stackoverflow.com/q/29331621
tags question: http://stackoverflow.com/q/29256642
tags question: http://stackoverflow.com/q/29227525
tags question: http://stackoverflow.com/q/29369506
tags question: http://stackoverflow.com/q/29274689
tags question: http://stackoverflow.com/q/29325354
tags question: http://stackoverflow.com/q/29276147
tags question: http://stackoverflow.com/q/29296661
tags question: http://stackoverflow.com/q/29316459
tags question: http://stackoverflow.com/q/29340891
tags question: http://stackoverflow.com/q/29298273
tags question: http://stackoverflow.com/q/29362633
tags question: http://stackoverflow.com/q/29299500
tags question: http://stackoverflow.com/q/29297826
tags question: http://stackoverflow.com/q/29288750
tags question: http://stackoverflow.com/q/29338759
tags question: http://stackoverflow.com/q/29279545
type: Tag
tags question: http://stackoverflow.com/q/29259104
tags question: http://stackoverflow.com/q/29261650
tags question: http://stackoverflow.com/q/29346288
tags question: http://stackoverflow.com/q/29277982
tags question: http://stackoverflow.com/q/29277661
tags question: http://stackoverflow.com/q/29304502
tags question: http://stackoverflow.com/q/29341678
tags question: http://stackoverflow.com/q/29279589
tags question: http://stackoverflow.com/q/29291265
tags question: http://stackoverflow.com/q/29323432
tags question: http://stackoverflow.com/q/29326727
tags question: http://stackoverflow.com/q/29256259
tags question: http://stackoverflow.com/q/29341806
tags question: http://stackoverflow.com/q/29260259
tags question: http://stackoverflow.com/q/29246467
tags question: http://stackoverflow.com/q/29289406
tags question: http://stackoverflow.com/q/29363167
tags question: http://stackoverflow.com/q/29295755
tags question: http://stackoverflow.com/q/29265050
tags question: http://stackoverflow.com/q/29338976

http://stackoverflow.com/q/29297257
upvote count: 31
has title: Which time zone does JavaScript `new Date()` use?
has answer: http://stackoverflow.com/a/29297335
tagged with: timezone-offset
has comment: http://stackoverflow.com/comment/46789833
favorite count: 0
has body: I have a C# application that return in JSON an expiration date of an authentication token like this: "expirationDate":"Fri, 27 Mar 2015 09:12:45 GMT" In my TypeScript I check that the date is still valid here: isAuthenticationExpired = (expirationDate: string): boolean =&gt; { var now = new Date().valueOf(); var exp: any = Date.parse(expirationDate).valueOf(); return exp - now &lt;= 0; }; What I would like to know is what time zone does new Date() use when it is returning a date?
has comment: http://stackoverflow.com/comment/46790697
tagged with: timezone
has answer: http://stackoverflow.com/a/29297355
answer count: 4
has answer: http://stackoverflow.com/a/29297375
accepted answer: http://stackoverflow.com/a/29297375
score: 31
tagged with: typescript
type: AnsweredQuestion
downvote count: 0
tagged with: date
has comment: http://stackoverflow.com/comment/46789846
type: Question
has comment: http://stackoverflow.com/comment/46790017
has answer: http://stackoverflow.com/a/29297897
has comment: http://stackoverflow.com/comment/46790268
tagged with: javascript
possible better answer: http://stackoverflow.com/a/29297355

http://stackoverflow.com/q/29361793
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
downvote count: 0
type: UnansweredQuestion
tagged with: mime-types
has title: HTML5 Validation error on Script?
has answer: http://stackoverflow.com/a/29361853
score: 2
has comment: http://stackoverflow.com/comment/46907417
type: Question
upvote count: 2
answer count: 1
tagged with: javascript
has body: I have strange error on my HTML5 validation Error: Bad value text for attribute type on element script: Subtype missing. From line 316, column 1; to line 316, column 40 e="1" /&gt;↩↩&lt;script id="viewModel" type="text"&gt;↩ { Syntax of MIME type: A media-type as defined in RFC 2616; that is, typically, a required type, followed by a "/" character, followed by a required subtype, optionally followed by one or more instances of a ";" character followed by a parameter. Examples: text/css, text/css;charset=utf-8. What i need to do to fix this error any idea?

http://stackoverflow.com/q/29230050
answer count: 4
has answer: http://stackoverflow.com/a/29230386
accepted answer: http://stackoverflow.com/a/29230386
has comment: http://stackoverflow.com/comment/46666636
has answer: http://stackoverflow.com/a/29230281
tagged with: css
has comment: http://stackoverflow.com/comment/46666866
has comment: http://stackoverflow.com/comment/46666711
type: AnsweredQuestion
has body: I want to make the Child Div of a fix width Parent 100% width, like so: I am aware that there are multiple questions about this, unfortunately none answer the underlining issue of content not displaying properly underneath the child DIV. I know that with CSS this is partially achievable: .child-div { position: absolute; left: 0; right: 0; } .parent-div { position: static; max-width: 900px; } I am working within a CMS which means I can't tailor the HTML to open and close the wrapper either which would be the correct solution to this of course. But I know there are people out there that would need to do it this way too for many other reasons. The other problem is that by using this method, all the content underneath the Child shows up behind the .child-div, it doesn't sit underneath. I understand that this because by making it absolute it no longer sits in the flow of the content. I understand why this wont work, but is there a solution using jQuery or Javascript instead? http://jsfiddle.net/d4tjkwnc/
has comment: http://stackoverflow.com/comment/46666992
type: Question
has comment: http://stackoverflow.com/comment/46667633
has answer: http://stackoverflow.com/a/29230362
tagged with: javascript
tagged with: jquery
score: 0
possible better answer: http://stackoverflow.com/a/29230231
has answer: http://stackoverflow.com/a/29230231
tagged with: http://stackoverflow.com/tag/html
has title: Make child DIV larger than parent DIV with jQuery

http://stackoverflow.com/q/29304311
has comment: http://stackoverflow.com/comment/46809866
has comment: http://stackoverflow.com/comment/46803171
has body: I got this input var input=[ "Axel", 4, 4.21, { name : 'Bob', age : 16 }, { type : 'fish', model : 'golden fish' }, [1,2,3], "John", { name : 'Peter', height: 1.90} ]; and the Result must be this one [ { name : 'Bob', age : 16 }, { type : 'fish', model : 'golden fish' }, { name : 'Peter', height: 1.90} ];
has comment: http://stackoverflow.com/comment/46803597
type: AnsweredQuestion
tagged with: object
has comment: http://stackoverflow.com/comment/46803391
type: Question
has comment: http://stackoverflow.com/comment/46803013
accepted answer: http://stackoverflow.com/a/29304452
answer count: 2
tagged with: arrays
tagged with: javascript
tagged with: integer
has title: How to remove "integer" array from object in JavaScript
possible better answer: http://stackoverflow.com/a/29304352
has answer: http://stackoverflow.com/a/29304452
score: 0
has answer: http://stackoverflow.com/a/29304352

http://stackoverflow.com/comment/46803231
type: QuestionComment
has text: @GregL - Native, but I'm not opposed to using jQuery or another library if that makes more sense. I can do everything I want with the HTML5 approach, but I would prefer to avoid the washed out look of the object while it is being moved.
comment on: http://stackoverflow.com/q/29293811
score: 0
type: Comment

http://stackoverflow.com/a/29331238
score: 0
answers question: http://stackoverflow.com/q/29331114
type: Answer
has comment: http://stackoverflow.com/comment/46859302
has body: JavaScript has a multitude of touch events available. On the Touch event object, you have an array of all touches, you can do what you want with those.

http://stackoverflow.com/a/29344743
has comment: http://stackoverflow.com/comment/46875701
score: 0
has comment: http://stackoverflow.com/comment/46876019
answers question: http://stackoverflow.com/q/29344663
type: Answer
has body: I believe you're overcomplicating things here, if all you want to do is to replace all those quotes, this will suffice: var str = "db.projects.insert({'projectid':'1001','projteamname':'DBTeam','amount':100})"; alert(str.replace(/'/g, '"'));

http://stackoverflow.com/comment/46770468
score: 0
type: AnswerComment
has text: Bergi, yes but that would require `startQueue` (or `emptyQueue`) to be in scope of the constructor, which is not necessarily the case.
comment on: http://stackoverflow.com/a/29284443
type: Comment

http://stackoverflow.com/q/29285988
tagged with: c#
has comment: http://stackoverflow.com/comment/46769834
has comment: http://stackoverflow.com/comment/46770016
answer count: 3
has answer: http://stackoverflow.com/a/29291777
tagged with: javascript
tagged with: jquery
tagged with: ajax
score: 0
has body: Recently i am facing an unknown problems. I am using customized dropdown list in MVC4 and populating data by ajax. It is working fine but problem is, it is not clearing data after successfully sending data to the controller. Here i tried the example.. &lt;select data-placeholder="Select a Brand..." style="width:254px;" name="brand" id="brand"&gt; &lt;option value=""&gt;&lt;/option&gt; &lt;/select&gt; $("#brand").select2({ width: 254 }); For clearing drop down list i have tried like this.. $("#brand").val(""); I have search many example refreshing data in drop down list but i failed. Please help me to solve the problem. Here i have shared my long code &lt;script type="text/javascript"&gt; $(document).ready(function () { $("#brand").select2({ width: 254 }); $.get('/Settings/Brands/', function (data) { $.each(data, function (index, c) { $('#brand').append('&lt;option value="' + c.id + '"&gt;' + c.name + '&lt;/option&gt;'); }); }); $('#btnAdd').live("click", function () { if (confirm("Do you want to Save?") == true) { $.ajax({ cache: false, async: false, type: "POST", url: "/Settings/ItemAdd/", dataType: "json", data: adata, success: function (data) { alert(data.msg); $('#list').trigger('reloadGrid'); }, error: function (data) { alert(data.msg); $('#list').trigger('reloadGrid'); } }); } $("#itemname").val(""); $("#batchNo").val(""); $("#desp").val(""); $("#brand").find("option").val(""); $("#ctg").val(""); $("#supplier").val(""); $("#unittype").val(""); $("#qty").val(""); $("#bprice").val(""); $("#sprice").val(""); $("#Edate").val(""); $("#qlimit").val(""); $("#vat").val(""); $("#icode").val(""); }); }); &lt;/script&gt;
has comment: http://stackoverflow.com/comment/46769527
tagged with: asp.net-mvc-4
has answer: http://stackoverflow.com/a/29286065
has answer: http://stackoverflow.com/a/29286051
type: UnansweredQuestion
type: Question
has title: How to clear dropdown options value?

http://stackoverflow.com/comment/46857852
has text: did an edit of my post. providing a fiddle you should try. let me know of your results.
comment on: http://stackoverflow.com/a/29291959
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/29298711
has title: How to shuffle divs but don't kill their events?
accepted answer: http://stackoverflow.com/a/29304820
has body: There is my script: $(document).ready(function() { $(".button-collapse").sideNav(); $('.dropdown-button').dropdown({ inDuration: 300, outDuration: 225, constrain_width: true, // Does not change width of dropdown to that of the activator hover: false, // Activate on click alignment: 'right', // Aligns dropdown to left or right edge (works with constrain_width) gutter: 0, // Spacing from edge belowOrigin: false // Displays dropdown below the button }); $("#shuffle").bind('click', shuffle); function shuffle() { $(".facts").each(function() { var divs = $(this).children('div'); for (var i = 0; i &lt; divs.length; i++) $(divs[i]).remove(); var i = divs.length; if (i == 0) return false; while (--i) { var j = Math.floor(Math.random() * (i + 1)); var tempi = divs[i]; var tempj = divs[j]; divs[i] = tempj; divs[j] = tempi; } for (var i = 0; i &lt; divs.length; i++) { $(divs[i]).appendTo(this); } }); } }); It shuffles all divs inside .facts by removing them and then appending, but, as far as I understood it kills all events, so the first part initializes components of materializecss, the second is a function to shuffle the elements. While elements are not shuffled dropdown works, as soon as you used Shuffle - Dropdown is not working ...
downvote count: 0
possible better answer: http://stackoverflow.com/a/29303024
has answer: http://stackoverflow.com/a/29304820
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/46792504
type: Question
has answer: http://stackoverflow.com/a/29303101
upvote count: 1
has answer: http://stackoverflow.com/a/29303024
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/46792448
answer count: 3

http://stackoverflow.com/comment/46716197
type: Comment
type: QuestionComment
score: 0
has text: Not too difficult to do what you want, but from my experience it's never going to work in IE. Maybe IE11, not sure... clicking anywhere but on the type=file (and redirecting the click event via javascript) results in an "untrusted" click, and the files will not submit in IE.
comment on: http://stackoverflow.com/q/29256737

http://stackoverflow.com/comment/46713700
has text: Thanks I got it. But is that too wrong. Means a little bit inaccurate upto 0.1% is ok. Is this that much wrong or more than that?
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/29250093

http://stackoverflow.com/comment/46914504
comment on: http://stackoverflow.com/q/29365805
has text: try to put ID attribute for input
type: Comment
score: 0
type: QuestionComment

http://stackoverflow.com/comment/46720726
has text: Thank you @wdberkeley for confirming this for me.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29241015

http://stackoverflow.com/comment/46829059
type: QuestionComment
score: 3
has text: `document.getElementById["billgen"]` is not correct usage, you're not invoking the method but attempting to look up a property. Instead, invoke `document.getElementById("billgen")`
comment on: http://stackoverflow.com/q/29318678
type: Comment

http://stackoverflow.com/comment/46792853
type: Comment
has text: Thanks for telling us about your problem, how can we help you?
comment on: http://stackoverflow.com/q/29252451
score: 0
type: QuestionComment

http://stackoverflow.com/comment/46661839
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29227095
has text: @alfasin yeah, I was doing that, but there was an additional use case where I need to validate precision. I am having an issue only getting the numbers between 0 and 1. I want to avoid matching those items.
score: 0

http://stackoverflow.com/comment/74117051
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/34209746
has text: @RameshPapaganti Perhaps Daylight Savings? For example PDT vs PST. Moment has been known to change the API between versions especially when it comes to localization. Let me know if you found the cause.
score: 0

http://stackoverflow.com/a/29307919
has comment: http://stackoverflow.com/comment/47023998
answers question: http://stackoverflow.com/q/29294484
score: 0
has body: As @doveyg stated, the first block of script is not needed. In fact, because tablesorter had already been initialized on that table, the options included in second block of code will be completely ignored, which is why the table isn't sorting. All you need is: $(function() { $("#myTable").tablesorter( {sortList: [[1,0],[2,0]] } ); } );
type: Answer

http://stackoverflow.com/a/29223335
type: Answer
answers question: http://stackoverflow.com/q/29223127
has comment: http://stackoverflow.com/comment/46655417
upvote count: 3
score: 3
type: AcceptedAnswer
downvote count: 0
has body: This malware is known as CryptoWall 3.0. See this article for more information.
accepted answer of: http://stackoverflow.com/q/29223127

http://stackoverflow.com/comment/102298052
score: 0
type: QuestionComment
type: Comment
has text: Possible duplicate of [Take photo when the camera is automatically focused](https://stackoverflow.com/questions/47637708/take-photo-when-the-camera-is-automatically-focused)
comment on: http://stackoverflow.com/q/29324556

http://stackoverflow.com/comment/113642603
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29298942
has text: I also had pushFollowers in the wrong place! Must not be documented super well, as I was searching the docs and also Google for a while!!
type: AnswerComment

http://stackoverflow.com/a/29248603
upvote count: 1
type: Answer
downvote count: 0
score: 1
has body: This might help you: var temp = "javascript:ShowExternal('http://www.hhgsurvey.com/CustomerSurveyReport.aspx?SurveyID=M3B9A8')"; trm = /\((.*)\)/i; console.log(temp.match(trm)[1]); It will give you output: 'http://www.hhgsurvey.com/CustomerSurveyReport.aspx?SurveyID=M3B9A8'
answers question: http://stackoverflow.com/q/29248492

http://stackoverflow.com/a/29360312
type: Answer
upvote count: 3
answers question: http://stackoverflow.com/q/29359823
has body: Use the options binding instead. self.title.choices = [ { "code": "MR", "name": "Mr" }, { "code": "MRS", "name": "Mrs" } ]; self.title.value = ko.observable('').extend({ required: true });
accepted answer of: http://stackoverflow.com/q/29359823
score: 3
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/70022752
type: Comment
has text: if calling localFunc doesn't throw an error when it calls myFunc1 then it demonstrates that imports are hoisted.
comment on: http://stackoverflow.com/a/29334761
score: 12
type: AnswerComment

http://stackoverflow.com/comment/46711406
type: Comment
type: QuestionComment
has text: `$timeout` does not return `getRandomImage` result, try move assigning inside timeout func like `$timeout(function(){$scope.image = getRandomImage();}, 3000);`
comment on: http://stackoverflow.com/q/29253927
score: 0

http://stackoverflow.com/comment/82037117
type: Comment
has text: Interesting. Looks like more discussion on the API here: https://groups.google.com/a/chromium.org/forum/#!topic/extensions-reviews/WoKXzxCcXIQ
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/29231025

http://stackoverflow.com/comment/46740531
comment on: http://stackoverflow.com/a/29266199
has text: @user3726872 From your client do an `$http.get` every 5 seconds or something.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/46896752
has text: It sounds like you could achieve this by some other method rather than using `transform`s, but we can't know unless we have some sample code to go off of.
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/29355524

http://stackoverflow.com/a/29295769
answers question: http://stackoverflow.com/q/29294790
score: 0
has comment: http://stackoverflow.com/comment/46787321
type: Answer
has body: var array = [1, 2, 3, 4, 1, 2, 3, 4]; var array2 = [2, 4, 6, 8, 10]; var emptyArray = []; for (var i = 0; i &lt; array.length; i++) { var something = array[i]; for (var j = 0; j &lt; array2.length; j++) { var value = array2[j]; if (something === value) { array2 = _.without(array2, value); break; } } }
has comment: http://stackoverflow.com/comment/46787272

http://stackoverflow.com/a/29344435
accepted answer of: http://stackoverflow.com/q/29299738
type: AcceptedAnswer
score: 0
type: Answer
has body: I have actually found out how to do it using the existing scroller following this question: Jquery knockout: Render template in-memory Basically, you use applyBindingsToNode(domelement, bindings), which will apply KO bindings to a nodeset, which importantly does not have to be connected to the DOM. So I can store the markup from my bound element as the template, then empty it, then for the element factory, create a temporary node set using jQuery, bind it using the above function, then return the HTML. Admittedly, this would probably be better off refactored to use a pure KO scroller, but this means I can continue to use the tested and familiar plugin, and the code might help people as this seems to be quite a common question theme. Here is the new code for the binding (markup is as above). ko.bindingHandlers.infiniteScroll = { init: function(el, f_valueaccessor, allbindings, viewmodel, bindingcontext) { if($.fn.infiniteScroll) { // Get current value of supplied value var field = f_valueaccessor(); var val = ko.unwrap(field); var options = {}; if(typeof(val.get) == 'function') options = val; else options.get = val; var template = $(el).html(); options.elementFactory = options.elementFactory || function(contentdata, obj, config) { // Need a root element for foreach to use as a container, as it removes the root element on binding. var newnodes = $('&lt;div&gt;' + template + '&lt;/div&gt;'); ko.applyBindingsToNode(newnodes[0], { foreach: contentdata }); return newnodes.html(); }; $(el) .empty() .infiniteScroll(options); return { controlsDescendantBindings: true }; } } };
answers question: http://stackoverflow.com/q/29299738

http://stackoverflow.com/comment/46887237
comment on: http://stackoverflow.com/q/29310565
score: 0
type: QuestionComment
has text: Cross-posted here: https://groups.google.com/forum/#!topic/firebase-talk/1XfkcOjkWEs
type: Comment

http://stackoverflow.com/q/29351583
tagged with: jquery
accepted answer: http://stackoverflow.com/a/29352840
score: 0
answer count: 1
has body: I have a select whose contents are filled in based on the selection of another select. I have verified that it works by using it myself. However, I'm having trouble testing it. Here's the test I have: @javascript When(/^I submit the form$/) do page.select @professor.name, from: 'Professor' page.fill_in 'title', with: "Test" page.fill_in 'content', with: "Test" sleep 5.seconds binding.pry page.click_button 'Submit' end In the pry session, when I query the contents of the select box with page.find('#course').text it returns "". In the test, the contents of the select box aren't being loaded. The javascript is simple: $(document).ready(function() { $('#professor').on('change', function() { id = $(this).find('option:selected').val(); path = window.location.origin + '/professors/' + id + '/courses'; $.ajax(path, { success: function(data, textStatus, jqXHR) { $('#course').empty(); data.forEach(function(course) { $('#course').append( '&lt;option value=' + course.id + '&gt;' + course.identifier + ': ' + course.name + '&lt;/option&gt;' ); }); } }); }); });
tagged with: ajax
tagged with: ruby-on-rails
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29352840
type: Question
tagged with: cucumber
has title: How to test content loaded by AJAX in rails app?
tagged with: javascript

http://stackoverflow.com/comment/46666278
type: Comment
comment on: http://stackoverflow.com/a/29229875
score: 1
has text: This is how I usually do it, too. Clean, short, and reasonably foolproof. +1
type: AnswerComment

http://stackoverflow.com/comment/115442631
comment on: http://stackoverflow.com/a/42518434
type: AnswerComment
type: Comment
score: 3
has text: This respects CORS unlike the winning answer.

http://stackoverflow.com/q/29305897
has answer: http://stackoverflow.com/a/29306384
has comment: http://stackoverflow.com/comment/46806172
upvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/46806594
has body: i have read many things here about how to prevent SQL injection also on other website and forums. Only thing is thats it makes me really confused on the way how to protect your website when writing stuff to the database. I'm creating as schol project something where there alot of input from the users wil be writte to the database, i'm currently check them by javascript if they contains iligal char. Then i use ajax to activate my controller, use the query in my model send it back to the view. But lets go on on my problem. If i validate a input first with javascript, (client-side), then server side with PHP. If i first check in php if the input contains iligal char like * '' `` > &lt;, that kind of things. What you whould use in a query for geting information from the database. Then escape the whitescpases since i don't want to have things with spaces on the website as users input. Then use mysqli_real_escape_string() on the input. Then send it to the query that will looks like this. /** * @param string * @param string * @return mixed */ public function updateUsername($oldUsername, $newUsername) { return $this-&gt;_db-&gt;query("UPDATE `users` SET `username` = :new_username WHERE `username` = :old_username", [':new_username' =&gt; $newUsername,':old_username' =&gt; $oldUsername]); } So 1 > Check using javascript 2 > Check by php on char like * &lt; > ' # 3 > using mysqli_real_escape_string() 4 > To the PDO query Is this a good way for prefending SQL injection, i really don't want to send my school project live in the air with SQL injection haha. Greetz, Also many thanks for reading my long story
has comment: http://stackoverflow.com/comment/46806273
has comment: http://stackoverflow.com/comment/46806573
tagged with: sql-injection
answer count: 1
tagged with: pdo
favorite count: 0
has comment: http://stackoverflow.com/comment/46806505
accepted answer: http://stackoverflow.com/a/29306384
has comment: http://stackoverflow.com/comment/46812794
has comment: http://stackoverflow.com/comment/46806753
has title: Is this a good way for SQL injection prevention
tagged with: php
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46807160
has comment: http://stackoverflow.com/comment/46806525
score: -1
tagged with: mysql
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/46806279
linked to: http://stackoverflow.com/q/60174

http://stackoverflow.com/q/29325003
tagged with: array-algorithms
linked to: http://stackoverflow.com/q/500504
tagged with: arrays
downvote count: 0
answer count: 1
favorite count: 0
tagged with: counting-sort
has comment: http://stackoverflow.com/comment/46840978
has body: I am trying to implement the counting sort algorithm. Based on the pseudocode from Introduction to Algorithms (and if you don't know it it's just a book), I came up with this code: var countingSort = function(array, array2, k){ var a = []; a.length = k; for(var i in a){ a[i] = 0; } for(var j in array){ a[array[j]] += 1; } for(var i in a){ a[i] += a[i - 1]; } for(var j = array.length; j &gt;= 0; j--){ array2[a[array[j]]] = array[j]; a[array[j]] -= 1; } }; When I use the function, however, my array stays the same (I put in all the arguments!) How to fix this? Can someone please explain what is going on?
has title: Counting Sort array values aren't changing
has answer: http://stackoverflow.com/a/29325552
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46840868
score: 1
upvote count: 1
type: Question
tagged with: javascript
tagged with: sorting
accepted answer: http://stackoverflow.com/a/29325552
has comment: http://stackoverflow.com/comment/46840843

http://stackoverflow.com/comment/46876241
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29344455
has text: It sounds like you should just be reading an introductory Ajax tutorial. I don't understand why you think you should be returning anything from a click event handler function.
score: 0

http://stackoverflow.com/q/29318741
has comment: http://stackoverflow.com/comment/46829192
has comment: http://stackoverflow.com/comment/46829317
type: Question
tagged with: javascript
tagged with: ajax
answer count: 1
downvote count: 0
favorite count: 0
accepted answer: http://stackoverflow.com/a/29318815
upvote count: 2
has title: AJAX Raw Javascript Basic
has body: i wonder why the open and send method when we using ajax comes at the end. Not before the responseText method function loadXMLDoc() { if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 &amp;&amp; xmlhttp.status==200) { document.getElementById("myDiv").innerHTML=xmlhttp.responseText; } } xmlhttp.open("GET","xmlhttp_info.txt",true); xmlhttp.send(); } i'm a bit confused with the open method which take the url of our data/file. And how could the xmlhttp.responsetext method now which file we're working with, since the code is at the bottom –
has answer: http://stackoverflow.com/a/29318815
score: 2
type: AnsweredQuestion

http://stackoverflow.com/q/29303478
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46801448
tagged with: twitter-bootstrap
has comment: http://stackoverflow.com/comment/46801654
downvote count: 1
has title: AngularJS dropdown multiselect not working
type: Question
score: 3
tagged with: javascript
upvote count: 4
answer count: 1
has body: I wanted to create a simple multi-select dropdown which displays days (mon,tue...sun), select all, unselect all...using angular JS, bootstrap,JS. I wanted to write controller in a way that if i select monday twice, it de-selects and remove it from the selected items....instead it is keep on adding the elements again and again...and unselect all is not working. I tried every other way and couldn't succeed. Plz help me or share any similar code that can give me a idea. PS: I don't want to use jQuery for this.
has answer: http://stackoverflow.com/a/29651394
tagged with: web
has comment: http://stackoverflow.com/comment/46810466
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion

http://stackoverflow.com/comment/46812050
type: Comment
comment on: http://stackoverflow.com/a/29308814
score: 1
type: AnswerComment
has text: @JamHam: There are some values which have a "default" property `length`. Strings and arrays for example. In that case yes, you can't have your own `length` property. However, it's perfectly fine to have a "plain" object with a length property, e.g. `{length: 42}`.

http://stackoverflow.com/comment/46871628
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29339599
has text: Problem can repoduced using http://www.ok-soft-gmbh.com/jqGrid/OK/dateInput_48_bootstrap.htm in latest Chrome in Windows 7 Clicks **exactly** in checkbox box are ignored

http://stackoverflow.com/comment/46697923
comment on: http://stackoverflow.com/a/29246019
has text: Works like a charm. In all seriousness, @skobaljic - you're Awesome. Thanks!
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/46675137
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29228908
type: Comment
has text: Nope, when you press space bar, there is still the error : Uncaught ReferenceError: ammo is not defined. Thank you for your help :)

http://stackoverflow.com/comment/46663203
type: QuestionComment
has text: Yes, got that now! Any idea on how to get it on to the next page?
score: 0
comment on: http://stackoverflow.com/q/29227926
type: Comment

list
type: Tag
tag name: list
tags question: http://stackoverflow.com/q/29303902
tags question: http://stackoverflow.com/q/29305285
tags question: http://stackoverflow.com/q/29336360
tags question: http://stackoverflow.com/q/29239847
tags question: http://stackoverflow.com/q/29331889
tags question: http://stackoverflow.com/q/29236739
tags question: http://stackoverflow.com/q/29297664
tags question: http://stackoverflow.com/q/29269948

http://stackoverflow.com/comment/46715761
type: QuestionComment
comment on: http://stackoverflow.com/q/29220972
has text: I built a Dojo spa application which contained multiple flows, tabs, grids, widgets and panels and I used the MVC approach with decent success.
score: 0
type: Comment

http://stackoverflow.com/comment/46739478
comment on: http://stackoverflow.com/q/29269039
score: 0
has text: Actually, this is a better duplicate: http://stackoverflow.com/q/15884096/218196
type: QuestionComment
type: Comment

http://stackoverflow.com/q/29219013
has comment: http://stackoverflow.com/comment/46647483
has comment: http://stackoverflow.com/comment/46647240
accepted answer: http://stackoverflow.com/a/29219328
answer count: 2
has comment: http://stackoverflow.com/comment/46647207
has comment: http://stackoverflow.com/comment/46647262
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/46647488
has title: form validation with ajax, php, and mysql
has comment: http://stackoverflow.com/comment/46647159
tagged with: jquery
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/46647139
tagged with: php
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29219328
tagged with: mysql
upvote count: 1
has answer: http://stackoverflow.com/a/29219238
type: Question
has comment: http://stackoverflow.com/comment/46647274
has body: I'm building a login form and want to instantly check to make sure the email address is one that's in my database. I've looked around and tried a bunch of different things to make this work, but I can't seem to get this working correctly. Here's the Form &lt;form&gt; &lt;input type="text" id="email" name="email" placeholder="Email Address" onblur="checkEmail(this.value);" onchange="checkEmail(this.value);"/&gt; &lt;input type="password" id="password" name="password" placeholder="Password"/&gt; &lt;input type="button" id="login-signup" value="Login / Sign Up"/&gt; &lt;/form&gt; Here's the Javascript. This is where I think the problem is. function checkEmail(email) { // check to see if the email exists in the database using PHP and MySQL $.ajax({ url: 'login.php', //the script to call to get data type: 'post', data: { email: $('#email').val() }, dataType: 'json', //data format success: function(response) { //on reception of reply if(response == 'match') { console.log('match'); } else if (response == 'no match') { console.log('no match'); } else if (response == 'error') { console.log('error'); } else { console.log('who knows'); } } }); } And here's login.php If I navigate to mywebsite.com/login.php?email=email then everything works correctly, so I know this is doing what I need it to. I imagine the problem is in my ajax $db_host = "host"; $db_user = "user"; $db_pass = "pass"; $db_name = "name"; $db = new PDO('mysql:host='.$db_host.';dbname='.$db_name, $db_user, $db_pass); if(isset($_GET['email'])) { $email = $_GET['email']; echo $email; } // Using prepared statements almost eliminates the possibility of SQL Injection. $preparedQuery = $db-&gt;prepare("SELECT * FROM `members` WHERE `email` = :email"); $preparedQuery-&gt;bindValue(":email", $email); $preparedQuery-&gt;execute(); // Retrieve the results from the database $user = $preparedQuery-&gt;fetch(PDO::FETCH_ASSOC); // If there is a user record print the user &amp; pass... if($user != ''){ echo 'match'; $_SESSION['e…
has comment: http://stackoverflow.com/comment/46647340
score: 1
has comment: http://stackoverflow.com/comment/46647332
possible better answer: http://stackoverflow.com/a/29219238
has comment: http://stackoverflow.com/comment/46647237

http://stackoverflow.com/q/29274674
type: AnsweredQuestion
has body: As quads faces are no longer supported in three.js. I am having trouble Raycast picking segments between 4 vertices points as a square as they are now made up of triangle faces. So my picking returns triangle shape not square: var faces = 10; var myplane = new THREE.Mesh( new THREE.PlaneGeometry(1000, 1000, faces, faces), new THREE.MeshNormalMaterial({ color: 0x993333, wireframe: false })); objects.push(myplane); scene.add(myplane); //raycast code if ( intersects.length &gt; 0 ) { _controls.noRotate = true; var face = intersects[0].face; var temp = intersects[0].object; var geo = temp.geometry; geo.vertices[face.a].z -= 20; geo.vertices[face.b].z -= 20; geo.vertices[face.c].z -= 20; //want other face verts below basically geo.vertices[face.d].z -= 20; geo.vertices[face.e].z -= 20; geo.vertices[face.f].z -= 20; geo.verticesNeedUpdate = true; if(intersects[ 0 ].faceIndex % 2 == 0){ // geo.vertices[intersects[0].faceIndex + 1].z = 40; // console.log("Even face Index: " + intersects[ 0 ].faceIndex); }else{ // console.log("Odd face Index: " + intersects[ 0 ].faceIndex -1); //geo.vertices[intersects[0].faceIndex - 1].z = 40, of course doest work } } Below is a 2d example for a better vsual... Currently I get the red out-come , but I'm wanting to pick like the green example:
score: 3
has title: Three.js ray picking face segments of plane / mesh v69
upvote count: 3
has comment: http://stackoverflow.com/comment/46836773
type: Question
has answer: http://stackoverflow.com/a/29356634
has comment: http://stackoverflow.com/comment/46860335
tagged with: javascript
has comment: http://stackoverflow.com/comment/46830427
has comment: http://stackoverflow.com/comment/46833598
answer count: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/46848267
accepted answer: http://stackoverflow.com/a/29356634
favorite count: 0
possible better answer: http://stackoverflow.com/a/37490972
has comment: http://stackoverflow.com/comment/46850173
tagged with: three.js
has comment: http://stackoverflow.com/comment/46830582
has answer: http://stackoverflow.com/a/37490972

http://stackoverflow.com/q/29287065
type: Question
has answer: http://stackoverflow.com/a/29287100
tagged with: javascript
tagged with: fullcalendar
has comment: http://stackoverflow.com/comment/46771444
has comment: http://stackoverflow.com/comment/46773141
has body: I am checking the variable wal, which I get from a PHP file with json_encode. If wal's value is under 100, it should render a calendar where selectable = false. Else, it should render a calendar where selectable = true. My code looks like this (fullCalendar is not included in this snippet): $(document).ready(function () { if (wal &lt; "100") { alert (wal); var calendar = $('#calendar').fullCalendar( { selectable: false, } }); } else { alert (wal); var calendar = $('#calendar').fullCalendar( { selectable: true,} }); }; } In one case, war = 120, so it should fire the else condition, but it still renders selectable = false. Where is my mistake? Edit 1 I changed if (wal &lt; 100) to if (parseInt(wal) &lt; 100). With wal = 120, it jumps into the else statement. But if I change war to a lower number (like wal = 60) it still jumps into the else statement, bypassing the first statement.
has title: jquery if else statement doesnt work
has comment: http://stackoverflow.com/comment/46773429
answer count: 1
downvote count: 0
tagged with: jquery
accepted answer: http://stackoverflow.com/a/29287100
favorite count: 0
has comment: http://stackoverflow.com/comment/46773214
has comment: http://stackoverflow.com/comment/46772963
tagged with: php
has comment: http://stackoverflow.com/comment/46772902
type: AnsweredQuestion
score: 2
upvote count: 2

http://stackoverflow.com/a/29330019
score: 0
answers question: http://stackoverflow.com/q/29329814
type: Answer
has body: I think the reason that the model does not show up in the scene when you try to add it outside of the loader, is because the loading is done asynchronous. This means, that while the loader is loading, the rest of the code will run. So if you try to add "Beech" to the scene directly after the loading function, it will not have finished loaded yet. var Beech; var loader = new THREE.JSONLoader(); loader.load( "./models/trees/Beech/Beech.json", function( geometry, materials ) { Beech = addMorphTree(geometry,materials,0.5); }); scene.add(Beech); // &lt;-- this will run before the function above is finished, //thereby adding a undefined variable to the scene. If you want more than one instance of the variable, maybe you can try the clone() function. Since Beech is a Mesh object, and Mesh inherits from Object3D, it can also use Object3D member functions. var Beech; var loader = new THREE.JSONLoader(); loader.load( "./models/trees/Beech/Beech.json", function( geometry, materials ) { Beech = addMorphTree(geometry,materials,0.5); for(var i=0;i&lt;5;i++){ scene.add(Beech.clone()) //creates 5 trees } });
accepted answer of: http://stackoverflow.com/q/29329814
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46860081

http://stackoverflow.com/q/29281591
tagged with: php
has title: “Undefined index: itemdetails” when sending JSON object from JavaScript to PHP
has comment: http://stackoverflow.com/comment/46761053
type: Question
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/46761135
score: 0
has body: Upon entering the quantity of an item and clicking the Add to Cart button the toShoppingCart() method is executed. This method will get the values of labels and text fields and insert them into a JSON object and pass it to the Order.php file. When sending the JSON object from JavaScript to PHP it returns an error: Undefined index: itemdetails Onearlist.html: &lt;html&gt; &lt;head&gt; &lt;title&gt;TODO supply a title&lt;/title&gt; &lt;meta charset="UTF-8"&gt; &lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt; &lt;/head&gt; &lt;body&gt; &lt;form action="Order.php"&gt; &lt;table border="2"&gt; &lt;tr&gt; &lt;td&gt; &lt;div style="padding: 40px"&gt;&lt;label id="id"&gt;001&lt;/label&gt; &lt;label id="name"&gt;SMS Audio street by 50 on-ear wired&lt;/label&gt; &amp;nbsp;&lt;label id="price"&gt;179.00$&lt;/label&gt;&amp;nbsp;Qty &lt;input type="text" id="qtytxt"&gt;&lt;input type="button" value="Add to Cart" onclick="toShoppingCart()" /&gt;&lt;/div&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;div style="padding: 40px"&gt;&lt;label id="id"&gt;002&lt;/label&gt;&lt;label id="name"&gt;Beats Solo2 on-ear wired&lt;/label&gt; &amp;nbsp;,&lt;label id="price"&gt;199.00$&lt;/label&gt; &amp;nbsp; Qty&lt;input type="text" id="qtytxt"&gt;&lt;input type="button" value="Add to Cart" onclick="toShoppingCart()" /&gt;&lt;/div&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;div style="padding: 60px"&gt;&lt;/div&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;input type="submit" value="Check Out"&gt; &lt;/form&gt; &lt;script type="text/javascript"&gt; function toShoppingCart() { console.log("toShoppingCart"); var id = document.getElementById("id").innerHTML; var name = document.getElementById("name").innerHTML; var qty = document.getElementById("qtytxt").value; var price = parseFloat(document.getElementById("price").innerHTML); console.log(id); console.log(name); console.log(qty); console.log(price); var request; var itemdata = { "id": id, "name": name,…
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29281846
type: UnansweredQuestion

http://stackoverflow.com/q/29314408
tagged with: css
has title: How do i fix following js so that on scroll there wont be any fluctuating effects in animation
has comment: http://stackoverflow.com/comment/46825847
answer count: 0
has comment: http://stackoverflow.com/comment/46821572
type: Question
tagged with: onscroll
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/46822055
tagged with: jquery
has comment: http://stackoverflow.com/comment/46822175
has body: $(window).bind('scroll', function() { if ($(window).scrollTop() &gt;0 &amp;&amp; $(window).scrollTop() &lt;720) { $('.terminator-text').animate({left: '50%',top:'50%',opacity:'1'}); $('.bug1').animate({ left: '14%' ,top:'16%',opacity:'1'}); $('.bug2').animate({ left: '73%',top:'20%',opacity:'1'}); $('.bug3').animate({ left: '21%',top:'70%',opacity:'1'}); $('.bug4').animate({ left: '65%',top:'46%',opacity:'1'}); $('.bug5').animate({ left: '17%',top:'40%',opacity:'1'}); $('.bug6').animate({ left: '53%',top:'69%',opacity:'1'}); $('.bug7').animate({ left: '58%',top:'52%',opacity:'1'}); } else { $('.terminator-text').animate({left: '50%',top:'50%',opacity:'0'}); $('.bug1').animate({ left: '50%',top:'50%',opacity:'0'}); $('.bug2').animate({ left: '50%',top:'50%',opacity:'0'}); $('.bug3').animate({ left: '50%',top:'50%',opacity:'0'}); $('.bug4').animate({ left: '50%',top:'50%',opacity:'0'}); $('.bug5').animate({ left: '50%',top:'50%',opacity:'0'}); $('.bug6').animate({ left: '50%',top:'50%',opacity:'0'}); $('.bug7').animate({ left: '50%',top:'50%',opacity:'0'}); } }); $(window).bind('scroll', function() { if ($(window).scrollTop() &gt;720 ) { $('.bug1').animate({ left: '5%' ,top:'8%',opacity:'1'}); $('.bug2').animate({ left: '80%',top:'10%',opacity:'1'}); $('.bug3').animate({ left: '12%',top:'78%',opacity:'1'}); $('.bug4').animate({ left: '77%',top:'48%',opacity:'1'}); $('.bug5').animate({ left: '5%',top:'53%',opacity:'1'}); $('.bug6').animate({ left: '58%',top:'77%',opacity:'1'}); $('.bug7').animate({ left: '68%',top:'59%',opacity:'1'}); } else { $('.terminator-text').animate({left: '50%',top:'50%',opacity:'1'}); $('.bug1').animate({ left: '14%' ,top:'16%',opacity:'1'}); $('.bug2').animate({ left: '73%',top:'20%',opacity:'1'}); $('.bug3').animate({ left: '21%',top:'70%',opacity:'1'}); $('.bug4').animate({ left: '65%',top:'46%',opacity:'1'}); $('.bug5').animate({ left: '17%',top:'40%',opacity:'1'}); $('.bug6').animate({ left: '53%',top:'69%',opacity:'1'}); $('.bug7').anima…
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/46845142
comment on: http://stackoverflow.com/q/29327503
type: Comment
type: QuestionComment
has text: `When i use this script data get crazy` - that's a very vague error description.
score: 2

http://stackoverflow.com/q/29260296
has body: I have defined a css like .slidingTag li:after { content: ''; z-index: 3; height: 6px; } I want to change the height attribute dynamically from JS. I can get the property using window.getComputedStyle(document.querySelector('.slidingTag'), 'li:after').getPropertyValue('height') But I do not know how to change the height attribute. I tried to use setProperty but it seems there is no such function available for pseudo-classes. Any ideas let me know.
possible better answer: http://stackoverflow.com/a/29263753
score: 13
has comment: http://stackoverflow.com/comment/46723673
has answer: http://stackoverflow.com/a/29261010
type: Question
has answer: http://stackoverflow.com/a/31189954
has comment: http://stackoverflow.com/comment/46722841
tagged with: javascript
upvote count: 13
has comment: http://stackoverflow.com/comment/134602694
has comment: http://stackoverflow.com/comment/46723061
duplicate of: http://stackoverflow.com/q/5041494
answer count: 3
tagged with: css-selectors
has answer: http://stackoverflow.com/a/29263753
favorite count: 0
has comment: http://stackoverflow.com/comment/46724022
has comment: http://stackoverflow.com/comment/46723107
linked to: http://stackoverflow.com/q/5041494
linked to: http://stackoverflow.com/q/9666527
tagged with: css
accepted answer: http://stackoverflow.com/a/29261010
type: AnsweredQuestion
downvote count: 0
has title: modify pseudo select :after in javascript

http://stackoverflow.com/a/29243093
type: Answer
downvote count: 0
has body: If that is all you want to do, use a simple (untested) one-liner like '&lt;ul&gt;&lt;li&gt;' + document.getElementsByClassName("fruit")[0].textContent.replace(',', '&lt;/li&gt;&lt;li&gt;') + '&lt;/li&gt;&lt;/ul&gt;'. On the other hand, if you want to re-use this in different places (dynamic class names, element types, etc) then you would want to refactor into a proper method.
answers question: http://stackoverflow.com/q/29243000
score: 1
upvote count: 1

http://stackoverflow.com/q/29229907
tagged with: ajax
type: UnansweredQuestion
has body: I have written a program in jsp to check whether an email address exist in database or not , if it exist it will give me "1" and if it does not exist it will give me default as "0" , which is working perfectly Now i want to call this url in my jquery and validate my email address , i have written some code in jquery but it is not working , my error message for email is working but for remote is not working. Please need some help $(document).ready(function () { $("#user_form").validate({ rules: { phone: { required: "true", minlength: "10" }, email: { required: "true", email: "true", remote: { url: 'validate_emailid_succes.jsp', type: "POST", data: { email: function () { return $("#email").val() } } } } }, messages: { email: { required: "Please enter your email address", email: "Please enter a valid email address", remote: jQuery.validator.format("Email ID is already taken") }, phone: "Please enter a 10 digit mobile number" } }); }); Need some guidance so that i can understand where i am going wrong. Thank You
has title: how to use jquery ajax validation using remote?
answer count: 0
score: 1
upvote count: 1
type: Question
tagged with: javascript
tagged with: jquery
downvote count: 0
favorite count: 0

http://stackoverflow.com/a/29231935
score: 2
accepted answer of: http://stackoverflow.com/q/29231761
type: AcceptedAnswer
downvote count: 0
has body: how to prevent the last itemId to be appended? idx is not equal to item's length? That's one of the two straight-forward ways, yes, which are that and slice: Doing the index thing is a bit easier if you use forEach instead of $.each (I'm assuming the JSON defines an array) because it gives you a reference to the array: JSON.parse(json).forEach(function(obj, idx, array) { if (idx &lt; array.length - 1 &amp;&amp; obj) { if (obj.itemId) { $('#somewhere').append('&lt;div id="' + obj.itemId + '"&gt;&lt;/div&gt;'); } } }); But if you prefer $.each: var data = JSON.parse(json); $.each(data, function(idx, obj) { if (idx &lt; data.length - 1 &amp;&amp; obj) { if (obj.itemId) { $('#somewhere').append('&lt;div id="' + obj.itemId + '"&gt;&lt;/div&gt;'); } } }); Alternately, you could use slice: JSON.parse(json).slice(0, -1).forEach(function(obj) { if (obj &amp;&amp; obj.itemId) { $('#somewhere').append('&lt;div id="' + obj.itemId + '"&gt;&lt;/div&gt;'); } }); Or: $.each(JSON.parse(json).slice(0, -1), function(idx, obj) { if (obj &amp;&amp; obj.itemId) { $('#somewhere').append('&lt;div id="' + obj.itemId + '"&gt;&lt;/div&gt;'); } }); (When you give slice a negative index, it's treated as an offset from the end.) No matter what you use, I'd probably lookup #something once and reuse the resulting jQuery object.
type: Answer
upvote count: 2
answers question: http://stackoverflow.com/q/29231761

http://stackoverflow.com/comment/46685715
type: Comment
has text: Thanks... but why this -1 i still not able to understand.
comment on: http://stackoverflow.com/a/29239525
score: 0
type: AnswerComment

http://stackoverflow.com/comment/65667041
type: AnswerComment
type: Comment
score: 2
has text: I can send data in that way but if I have more than one section in google form then how to send values of next section ?
comment on: http://stackoverflow.com/a/34090491

http://stackoverflow.com/comment/46720747
type: Comment
comment on: http://stackoverflow.com/a/29258906
type: AnswerComment
has text: okay thanks that worked (although does seem weird you can't do with buttons) but looking at your code that function will be written for every img element in the html - how do I restrict to just for the particular images I want it to occur for.
score: 0

http://stackoverflow.com/comment/46858921
has text: Accessing the dict variable from outside of the fillArray() function. Currently, it is null from anywhere else. I've updated the question to include more info.
type: Comment
comment on: http://stackoverflow.com/a/29335092
score: 0
type: AnswerComment

http://stackoverflow.com/a/29363748
has comment: http://stackoverflow.com/comment/46911217
downvote count: 0
has body: They use Local Storage. Using Chrome Developer Console I can go to the Resources tab and see that it stores that data using Local Storage after I click on "Save unfiled profile" - Google Translate.
type: Answer
has comment: http://stackoverflow.com/comment/46911506
upvote count: 2
answers question: http://stackoverflow.com/q/29363442
score: 2

http://stackoverflow.com/comment/46683357
comment on: http://stackoverflow.com/q/29238224
score: 0
type: Comment
type: QuestionComment
has text: no i want for example is variable x=2005, and someone types 2005 into input field...the javascript returns 2005.html.....if anything else...it returns else.html

http://stackoverflow.com/a/29256273
type: Answer
has comment: http://stackoverflow.com/comment/46737105
score: 0
answers question: http://stackoverflow.com/q/29246472
has body: My guess is that you recently added the type field to the embedded objects in items which is making Mongoose now think that items contains an array of strings instead of an array of objects like you have. To fix it, use an object to define the type for type in your schema like so: var ScheduleSchema = new mongoose.Schema({ hours: Number, items: [{ number: Number, minutes: Number, details: {description: String}, type: {type: String} }], userId: Number });

http://stackoverflow.com/comment/46723093
type: QuestionComment
comment on: http://stackoverflow.com/q/29260190
has text: @ChrisMoutray So far I haven't tried anything, because honestly I wouldn't even know where to begin.
score: 0
type: Comment

http://stackoverflow.com/comment/46745838
type: QuestionComment
comment on: http://stackoverflow.com/q/29272190
has text: XMLHttpRequest cannot load https://api-ssl.bitly.com/oauth/access_token. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:46887' is therefore not allowed access. The response had HTTP status code 405.
score: 0
type: Comment

http://stackoverflow.com/comment/46869635
score: 0
type: AnswerComment
has text: great news. happy to help, some times two eyes more can find the small invisible problem
comment on: http://stackoverflow.com/a/29341106
type: Comment

http://stackoverflow.com/a/29280103
has comment: http://stackoverflow.com/comment/46760878
answers question: http://stackoverflow.com/q/29272840
has comment: http://stackoverflow.com/comment/46759279
has comment: http://stackoverflow.com/comment/46759435
score: 4
has body: You can use RequireJS. It is documented here, but basically is just to add the following in the build.sbt pipelineStages := Seq(rjs) Then add this line to the file project/plugins.sbt addSbtPlugin("com.typesafe.sbt" % "sbt-rjs" % "1.0.7") As RequireJS website states Combines related scripts together into build layers and minifies them via UglifyJS (the default) or Closure Compiler (an option when using Java). Optimizes CSS by inlining CSS files referenced by @import and removing comments.
type: Answer
upvote count: 4
has comment: http://stackoverflow.com/comment/46759329
has comment: http://stackoverflow.com/comment/46759189
downvote count: 0

http://stackoverflow.com/comment/46756562
has text: Yes, I added it now. And no, just JavaScript. We're not allowed to use jQuery
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29276353
score: 0

http://stackoverflow.com/q/29220678
has answer: http://stackoverflow.com/a/29223137
has body: I have 3 buttons: button 1, button 2 and button 3. button 1 toggles show/hide of the left side. button 2 does the same but does the right side. Button 3 does both sides. What is the right way to do this? https://jsfiddle.net/anthony0perez/m9h2n1vk/2/ LIST MAP BOTH map side Block 3 Block 4 list side Block 5 Block 6 $(document).ready(function(){ $( "#both-map-button" ).click(function() { //alert('clicked both button'); $("#block-4, #block-3, #block-5, #block-6").hide(); $("#block-4, #block-3, #block-5, #block-6").addClass("acvite-btn"); $("#block-4, #block-3").show(); $("#block-5, #block-6").show(); }); $( "#map-map-button" ).click(function() { //alert('clicked map button'); $("#block-5").toggle(); $("#block-6").toggle(); }); $( "#list-map-button" ).click(function() { //alert('clicked list button'); $("#block-4").toggle(); $("#block-3").toggle(); }); });
upvote count: 1
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46651186
has comment: http://stackoverflow.com/comment/46651353
type: Question
has comment: http://stackoverflow.com/comment/46654619
accepted answer: http://stackoverflow.com/a/29223137
tagged with: javascript
tagged with: jquery
has title: 3 button Jquery on/off and both on/off
has comment: http://stackoverflow.com/comment/46651330
answer count: 1
downvote count: 0
score: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/46654676
has comment: http://stackoverflow.com/comment/46654611

http://stackoverflow.com/comment/46891738
comment on: http://stackoverflow.com/a/29310672
has text: Using `0.3.1`; @Pedro is correct about the reversion.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/81166902
comment on: http://stackoverflow.com/a/42046149
type: Comment
has text: I have tried this with endpoints API. If the API is unavailable (server down), callback function is not invoked at all. You can check the result in this fiddle where I used localhost for the endpoints URL: https://jsfiddle.net/yosj1d4z/
score: 0
type: AnswerComment

http://stackoverflow.com/a/33561053
type: Answer
upvote count: 21
downvote count: 1
has comment: http://stackoverflow.com/comment/61939547
score: 20
has comment: http://stackoverflow.com/comment/118459764
answers question: http://stackoverflow.com/q/29233896
has body: For a composite primary key, you should add "primaryKey: true" to all columns part of the primary key. Sequelize considers such columns to be part of a composite primary key.
has comment: http://stackoverflow.com/comment/118500150
has comment: http://stackoverflow.com/comment/86282068

http://stackoverflow.com/comment/46679128
type: Comment
has text: Yeah, I guess it's more of a preference. If you want to have two rows for every student then this sort of thing would have to be done.
comment on: http://stackoverflow.com/a/29235504
type: AnswerComment
score: 0

http://stackoverflow.com/a/29221539
score: 2
answers question: http://stackoverflow.com/q/29221467
downvote count: 0
has body: You need to clear the previous intervals before starting a new one. See a modified code example below: var cookies=0; var cookiesPerSecond=0; var interval = null; //Declare a variable to hold a reference to the interval function getCookie(){ cookies+=1; logAt("cookies","Cookies:"+cookies); }; var getOven=function(){ if(cookies&gt;=10){ cookies=cookies-90 cookiesPerSecond+=0.5; logAt("cookiesPerSecond","Cookies per second:"+cookiesPerSecond); // Check if a previous interval has been set, if so clear it. if (interval != null) { clearInterval(interval); } // Finally, set a new interval and store a reference to it in the variable interval = setInterval(function(){ cookies+=cookiesPerSecond; logAt("cookies","Cookies:"+cookies);},1000); } else{ alert("You do not have enough cookies!"); } };
upvote count: 2
type: Answer

http://stackoverflow.com/a/29270981
has comment: http://stackoverflow.com/comment/46745630
has body: The cleanest way would be to splice the array and pass in a subarray from the current index on. That way you still have one reference, and everything stays clean. But no, arrays in most higher level languages do not allow you to reference a single element and then get back to the array. It is dangerous for a number of reasons on those kinds of languages where the underlying data may not even be stored contiguously. JavaScript is no exception, and you can pass in an array and an index, or a subarray, but you can't pass in a reference to an element in the array and get back to the array after passing it in.
answers question: http://stackoverflow.com/q/29270488
upvote count: 1
type: Answer
downvote count: 0
score: 1

http://stackoverflow.com/a/29314996
has comment: http://stackoverflow.com/comment/46822723
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/46822780
answers question: http://stackoverflow.com/q/29314929
has comment: http://stackoverflow.com/comment/46822561
upvote count: 1
type: Answer
has body: ngOptions needs model in order to determine which option should be selected by default or which model to write selected object/value when selection changes. If there was no ngModel directive, it would be difficult to access selected value, and it potentially lead to bad-practice code when people either query DOM to determine the value or write their own directives for this purpose. In both cases this is not ideal as this type of things is the key idea of Angular form elements directives. Also don't forget that ngOptions in conjunction with ngModel allow developer to bind entire objects as the "value" of select elements, which would be tricky without ngModel. Finally, if for some reason one doesn't want to have any model on select (although it makes little sense), it's possible to render options with ngRepeat.

http://stackoverflow.com/q/29262987
accepted answer: http://stackoverflow.com/a/29263039
tagged with: javascript
favorite count: 0
tagged with: regex
has comment: http://stackoverflow.com/comment/46728096
possible better answer: http://stackoverflow.com/a/29263617
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29263617
downvote count: 2
has title: RegEx to accept numbers less then -50.0 or greater than 80.0
upvote count: 1
has answer: http://stackoverflow.com/a/29263039
type: Question
linked to: http://stackoverflow.com/q/29294046
score: -1
answer count: 2
has body: I'm trying to find a JavaScript regular expression to accept numbers less then -50.0 or greater than 80.0. Expression below does not work: /^([-][5][0]\.[0]|[-][0-4][0-9]\.[0-9]|[-][0-9]\.[0-9])|([0]\.[0]|[1-9]\.[0-9]|[0-7][0-9]\.[0-9]|[8][0]\.[0])$/

http://stackoverflow.com/comment/46733417
has text: Perhaps I'm being too harsh. It is a fairly trivial question though.
comment on: http://stackoverflow.com/a/29265621
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/46685485
type: Comment
score: 0
has text: @Sam done.. see plunker :)
comment on: http://stackoverflow.com/q/29238039
type: QuestionComment

http://stackoverflow.com/comment/46689707
comment on: http://stackoverflow.com/a/29241401
score: 0
type: Comment
has text: So, this is happening: when I leave the '"+challenger+"' part out, nothing gives any errors, but when I do add it, it gives me the error: `SyntaxError: Unexpected token }`, which makes no sense, since that is an empty line in my html page.
type: AnswerComment

http://stackoverflow.com/comment/46719132
comment on: http://stackoverflow.com/q/29258317
has text: Can you be more specific about what's wrong? Are you getting an error message? Nothing happens? The wrong thing happens?
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/comment/46832710
type: Comment
has text: Would there be an easy way to shift the object indexes back 1, after the 14? In the example I posted there was only 15 after the 14, but in the actual implementation there are many more.
comment on: http://stackoverflow.com/a/29320167
score: 0
type: AnswerComment

http://stackoverflow.com/a/29357010
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46898906
has comment: http://stackoverflow.com/comment/46898937
has body: I think you just have to append a new div to your container and make it draggable. var nDraggable = 3; $('#yourButton').click(function(){ nDraggable++; $("#container").append(' Drag me around '); $("#draggable-"+nDraggable).draggable(); }); Is this what are you looking for?
answers question: http://stackoverflow.com/q/29356916
type: Answer
score: 3
has comment: http://stackoverflow.com/comment/46898840
upvote count: 3
accepted answer of: http://stackoverflow.com/q/29356916
has comment: http://stackoverflow.com/comment/46899023

http://stackoverflow.com/comment/46774165
comment on: http://stackoverflow.com/q/29285286
type: Comment
type: QuestionComment
has text: The docs have an oauth sample.
score: 0

http://stackoverflow.com/a/29329015
has body: Assuming all of this is being emitted in a loop, then this should result in unique ID values: &lt;div id="sendtransfer&lt;?php echo $i; ?&gt;" class="send-new_message-transfer"&gt; And this should be identifying them by those unique ID values: $("#sendtransfer&lt;?php echo $i; ?&gt;").slideToggle(); That part is probably working. However, what about this? $('.callme').click(function(){ Every time you run that in your loop, you're adding a new click handler to the same set of matching elements. So any click on a .callme element is going to invoke every one of these click handlers. Take the JavaScript out of the loop. You should emit the markup in a loop, but should have one JavaScript handler for all similar elements and functionality. When that handler is invoked, dynamically determine which elements to show/hide/etc. So if you click on a .callme element, from that element how do you find the div to show? It's not clear from your code, but if they're arranged in some pattern then it should be identifiable. For example, if the .callme element is always just before the div then you can find that div: $(this).next('div[id^="sendtransfer"]').slideToggle(); This would identify the next element of type div where the ID begins with "sendtransfer". There are lots of selector options and lots of DOM traversal functions. You don't have to rely only on ID values. The idea is that there would be one click handler to perform one kind of action and any pattern needed to identify elements for that action would be performed in that handler. Rather than copying/pasting the same code over and over in a loop.
type: Answer
answers question: http://stackoverflow.com/q/29328898
score: 0
accepted answer of: http://stackoverflow.com/q/29328898
type: AcceptedAnswer

http://stackoverflow.com/q/29338624
has comment: http://stackoverflow.com/comment/46865130
tagged with: javascript
has comment: http://stackoverflow.com/comment/46865289
upvote count: 0
answer count: 1
has answer: http://stackoverflow.com/a/29384540
favorite count: 0
accepted answer: http://stackoverflow.com/a/29384540
tagged with: http://stackoverflow.com/tag/html
tagged with: css
score: -1
type: AnsweredQuestion
has title: Usage of Pause and Play buttons in html5
has body: &lt;table&gt; &lt;tr&gt; &lt;td&gt;&lt;div id="a"&gt;&amp;#65;&lt;/div&gt;&lt;/td&gt; &lt;td&gt;&lt;div class="n"&gt;&amp;#78;&lt;/div&gt;&lt;/td&gt; &lt;td&gt;&lt;div id="t"&gt;&amp;#84;&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; script function animateat() { document.getElementById('audioTag1').play(); document.getElementById('audioTag1').play(); $("#a").animate( { "top": "300px", "color": "white" }, 2000, function () { $("#t").animate({ "top": "300px", "color": "white" }, 2000,function () { $("#t").animate( { "left": "760px" },1000); } ); } html &lt;body onload="animatepaapa();"&gt; &lt;audio id="audioTag1" src="paara.wav" preload="auto"&gt; &lt;code&gt;audio&lt;/code&gt; I am developing a scene using HTML5, CSS and JS as shown above, in which I want to use the play, pause and as well as the replay button. If there is a way please suggest me.
has comment: http://stackoverflow.com/comment/46865073
downvote count: 1
has comment: http://stackoverflow.com/comment/46865095
type: Question
has comment: http://stackoverflow.com/comment/46865099

http://stackoverflow.com/comment/46895932
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/29355429
type: Comment
has text: `document.write` will NOT overwrite your document when used with a blocking script inline. It will do exactly what was requested.

http://stackoverflow.com/a/29230218
has comment: http://stackoverflow.com/comment/46667461
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29229922
has comment: http://stackoverflow.com/comment/46667774
has comment: http://stackoverflow.com/comment/46667745
has comment: http://stackoverflow.com/comment/46666914
upvote count: 2
has body: HTML &lt;html&gt; &lt;header&gt; &lt;title&gt;&lt;/title&gt; &lt;link rel="stylesheet" href="css/main.css" /&gt; &lt;link rel="stylesheet" href="" /&gt; &lt;meta charset="utf-8"&gt; &lt;!--- Fontene brukt på nettstedet --&gt; &lt;link href='http://fonts.googleapis.com/css?family=Open+Sans:300italic,400,600,300,700' rel='stylesheet' type='text/css'&gt; &lt;meta&gt; &lt;/header&gt; &lt;body&gt; &lt;div class="wrapper"&gt; &lt;div class="innerWrapper"&gt; &lt;div id="header"&gt; &lt;a href="#"&gt;Test&lt;span&gt;Page&lt;/span&gt;&lt;/a&gt; &lt;form action="" autocomplete="off"&gt; &lt;input type="text" value="Search..." id="search" style="padding: 3px; color:#666"&gt;&lt;/input&gt; &lt;input type="button" value="Go!" style="display:none; padding: 3px;" id="searchBtn"&gt;&lt;/input&gt; &lt;/form&gt; &lt;/div&gt; &lt;!--- 686px is min-width for desktop and tablet --&gt; &lt;div class="menu"&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="#"&gt;Home&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;Contact&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;Work&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;About&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;ul class="rigthUL"&gt; &lt;li&gt; &lt;a href="#" id="menu-item-left"&gt;Archive &amp;or;&lt;/a&gt; &lt;ul class="underMenu"&gt; &lt;li&gt;&lt;a href="#"&gt;December&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;January&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;February&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;March&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;April&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; &lt;div class="container-big"&gt; &lt;div class="blogPost generalBox"&gt; &lt;h2&gt;blogTest&lt;/h2&gt; &lt;p&gt; Lorem ipsum dolor sit amet, consectetur adipisicing elit. Repudiandae, culpa dolorem veritatis, incidunt nobis quae fugiat. Ex architecto illo soluta obcaecati in cumque, est voluptas earum voluptatibus aliquid sequi neque! Lorem ipsum dolor sit amet, consectetur adipisicing …
type: Answer
score: 2
accepted answer of: http://stackoverflow.com/q/29229922
downvote count: 0

http://stackoverflow.com/q/29239326
score: 0
tagged with: onchange
has comment: http://stackoverflow.com/comment/46689974
has title: trigger function when javascript dynamically fills a form field
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46684996
has comment: http://stackoverflow.com/comment/46690415
has comment: http://stackoverflow.com/comment/46720652
has body: I'm making a long form with lots of calculations done with javascript. I'm using onChange="myFunction();" on certain form fields to run calculation functions when necessary. This way, the user enters in a number and when they tab/click to the next field, it triggers a function which runs a calculation and dumps the result into another field. The problem I'm having is triggering functions based on values that are placed in fields via another function. When the user types in a number, the function triggers and everything is fine, but when a function dynamically inserts a value into a field, onChange won't trigger a function. Likewise with onFocus and onBlur as the field never receives or loses focus. Is there a way to trigger a function from a form field when another function inserts a value into that field?
answer count: 0
tagged with: forms
type: Question
tagged with: javascript

http://stackoverflow.com/comment/46815934
comment on: http://stackoverflow.com/a/29310971
has text: @Kyle Basically, a reference to certain elements is kept with the `$('#right')` object but those references are lost when you clear it out. [See this question](http://stackoverflow.com/questions/8314729/how-to-destroy-delete-active-accordion-using-jquery) for the correct way to destroy and recreate an accordion.
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/a/29261895
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29259706
answers question: http://stackoverflow.com/q/29259706
has comment: http://stackoverflow.com/comment/46822140
type: Answer
has comment: http://stackoverflow.com/comment/46726547
has body: To delete data from localstorage you use localStorage.removeItem('itemNam') example localStorage.setItem('name','hello'); to delete the name item from the localStorage you use localStorage.removeItem('name'); BUT IF YOUR QUESTION IS HOW TO DELETE DATA FROM JSON OBJECT THEN YOU HAVE TWO METHODS 1: changing the original json object delete originalJson.attributeName originalJson = {name:'myname',age:30};//our object to test with example : delete originalJson.age //in this case originalJson.age is no more available 2: don't change the original object and make another copy instead originalJson2 = JSON.stringify(originalJson); originalJson2 = JSON.parse(originalJson2); delete originalJson2.age //originalJson.age is available but originalJson2.age is not available here is the : jsfiddle
has comment: http://stackoverflow.com/comment/46726633
score: 1
has comment: http://stackoverflow.com/comment/46726150
upvote count: 1
has comment: http://stackoverflow.com/comment/46822124
has comment: http://stackoverflow.com/comment/46726084
type: AcceptedAnswer

http://stackoverflow.com/comment/46884092
type: Comment
has text: I like your solutions, what i needed was in fact a mix of both :) $('option[value="lol"]:selected').parent(); Thanks
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/29349085

http://stackoverflow.com/comment/67056235
type: Comment
comment on: http://stackoverflow.com/a/38286807
score: 0
type: AnswerComment
has text: Only way I could manager it was through a bottompadding approach triggered by `DeviceEventEmitter.addListener('keyboardDidShow', this.keyboardDidShow.bind(this));`

http://stackoverflow.com/q/29251129
possible better answer: http://stackoverflow.com/a/29251364
favorite count: 0
has answer: http://stackoverflow.com/a/29251364
has answer: http://stackoverflow.com/a/29251344
tagged with: angularjs
has body: I am beginner in Angularjs &lt;div ng-app&gt; &lt;input type="text" ng-model="Number"/&gt; &lt;/div&gt; I know can use {{Number.length}} to display input field length, But how detect length etc.. if (length == 0) { // do something } else if (length == 1) { // do something } Any advice would be highly appreciated.
accepted answer: http://stackoverflow.com/a/29251344
score: 2
upvote count: 2
type: Question
type: AnsweredQuestion
has title: Detect Input text length in angularjs
answer count: 2
downvote count: 0
tagged with: javascript

http://stackoverflow.com/a/29252359
type: Answer
score: 7
has body: You're overwriting the sportcial module in each file. Use the setter syntax angular.module("moduleName", [moduleDependencies, ..]) To create a module. If you want to add something to an existing module, you need to call the getter: angular.module("moduleName") So for example, you need to update your config file to: angular.module('sportcial').config(function configApp($ionicConfigProvider) { alert(1); $ionicConfigProvider.tabs.position('bottom'); });
upvote count: 7
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/29252294
accepted answer of: http://stackoverflow.com/q/29252294

http://stackoverflow.com/comment/46720052
type: Comment
score: 1
comment on: http://stackoverflow.com/a/29257886
type: AnswerComment
has text: @Jeremy, you nearly have the answer. Just change `$(xmlNode).text()` to `$(xmlNode).siblings('preis').text()`

http://stackoverflow.com/comment/46827922
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29317599
has text: @VadimPlăcintă I just tried it with the first three of your URLs. You're right, there are some errors, but the `page.content` is correctly written. It seems that some external JavaScript code cannot be loaded. I tried with PhantomJS 1.9.8 and 2.0.1 and the three html source files are written correctly, but then again I'm on windows. This shouldn't make a difference.

http://stackoverflow.com/comment/66829035
type: AnswerComment
has text: Now `import {findNodeHandle} from 'react-native'` http://stackoverflow.com/questions/37626851/undefined-is-not-a-functionreact-findnodehandle
comment on: http://stackoverflow.com/a/32593814
type: Comment
score: 6

http://stackoverflow.com/comment/46768875
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29270592
has text: `shopsNotInMalls = Locations.find({storeId: myStoreId, mallId: {$exists: false}});`

http://stackoverflow.com/q/29279863
tagged with: asp.net-mvc-4
answer count: 0
has body: I've html elements which will are in a form of arrays and I would like to POST them and hope that MVC can bind the data correctly the specified model, no luck this far. HTML 1 - with file upload, image position and description: ..and the Model part 1: public IEnumerable<VehicleImageModel> Images { get; set; } ..Here's what VehicleImageModel consists of (basically the 3 html inputs above): public class VehicleImageModel { [Display( Name = "Position" )] public Int32 Position { get; set; } [Display( Name = "Description" )] public String Description { get; set; } [Display( Name = "Image" )] public HttpPostedFileBase Image { get; set; } } In my jquery I've added traditional=true as most people have suggested and that didn't work either, like below: var options = { traditional: true, target: "#vehicle-list", // target element to be updated with server response beforeSubmit: function () { }, // pre-submit callback success: function () { } // post-submit callback }; $("#vehicle-form").ajaxForm(options); Is there something I'm missing maybe? Please help.
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46759654
has comment: http://stackoverflow.com/comment/46757734
type: Question
tagged with: asp.net-mvc
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/46759778
has comment: http://stackoverflow.com/comment/46780722
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46760396
has comment: http://stackoverflow.com/comment/46757913
has title: MVC post Array of values to Action using jquery AjaxForm

http://stackoverflow.com/comment/46802545
comment on: http://stackoverflow.com/q/29304015
score: 2
has text: Paths in JS loaded externally are relative to the page that loaded it — therefore you don't have to change your URL.
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29284538
has body: I have a blocker in my way, where I have to limit the users to enter characters more than the limit in a custom text area tag. In our application, we are counting ENTER as 5 characters and any other SPECIAL CHARACTERS as 5 characters too. Once the limit is reached, we are suppose to block the user to type in any more characters without any alerts. Here is what I have tried so far: function maxLengthVal(ele,length){ var textSize = ele.value.length; if(textSize &gt;= length){ ele.value = ele.value.substring(0, length); } } This is the function what i am calling on onKeyup and Onkeydown. Right now it is only counting the characters, but does not consider ENTER or SPECIAL CHARACTERS as 5 characters. I need a similar one, but with the 5 characters parsing in it. I am stuck on how to approach it. If someone can help that will be great.
upvote count: 1
has comment: http://stackoverflow.com/comment/46769183
has title: Character Limit In Text Area JavaScript - Special Case
type: AnsweredQuestion
score: 1
possible better answer: http://stackoverflow.com/a/29288985
type: Question
has answer: http://stackoverflow.com/a/29286373
accepted answer: http://stackoverflow.com/a/29286373
tagged with: javascript
has answer: http://stackoverflow.com/a/29288985
answer count: 2
downvote count: 0
favorite count: 0

http://stackoverflow.com/comment/46863417
type: Comment
comment on: http://stackoverflow.com/a/29337594
score: 1
type: AnswerComment
has text: I found [this page](http://bost.ocks.org/mike/join/) by Mike Bostock himself helpful with getting my head around that stuff.

http://stackoverflow.com/comment/46775465
type: Comment
type: QuestionComment
has text: `active_container` is just a string in the jQuery selector. Escape it. `$('container_div:gt('+active_container+')')`
score: 3
comment on: http://stackoverflow.com/q/29289078

http://stackoverflow.com/comment/46803750
comment on: http://stackoverflow.com/q/29301316
score: 0
type: Comment
type: QuestionComment
has text: Why would you avoid the `yield`s? They're the key element of the generator, and allow asynchronous resumption at all?

http://stackoverflow.com/comment/46783267
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29293289
has text: What are you really trying to achieve? It doesn't make sense to redirect people hundreds of times.

http://stackoverflow.com/q/29259687
answer count: 1
has title: jquery trigger works from click but no in on ready
type: UnansweredQuestion
has body: I have some checkboxes which trigger an ajax search. I want to check the boxes automatically and trigger the search. If I run the triggers from a button click, it works fine. But if I add them to the initial load function, the checkboxes are checked but the triggers don't work. Why? Here is the code first I uncheck all the boxes. jQuery( "[id^='radio_']" ).prop('checked', false ); Then I trigger checking certain boxes. jQuery('#radio_2155').trigger('click'); jQuery('#radio_1775').trigger('click'); Edit to clarify: this works when I click on ".entry-title" All the checkboxes are unchecked, certain boxes are checked and the search is triggered. jQuery('.entry-title').click( function(event){ jQuery( "[id^='radio_']" ).prop('checked', false ); jQuery('#radio_2155').trigger('click'); jQuery('#radio_1775').trigger('click'); } ); In this version, the alert works, the boxes are unchecked, and then certain boxes are checked, but they don't trigger the search. &lt;script type="text/javascript"&gt; jQuery(function(){ alert('this works'); jQuery( "[id^='radio_']" ).prop('checked', false ); jQuery('#radio_2155').trigger('click'); jQuery('#radio_1775').trigger('click'); }); &lt;/script&gt;
tagged with: triggers
has comment: http://stackoverflow.com/comment/46721707
has answer: http://stackoverflow.com/a/29260171
type: Question
has comment: http://stackoverflow.com/comment/46724411
tagged with: ready
tagged with: javascript
tagged with: jquery
tagged with: ajax
score: 0

http://stackoverflow.com/a/29238788
upvote count: 1
accepted answer of: http://stackoverflow.com/q/29238376
answers question: http://stackoverflow.com/q/29238376
has comment: http://stackoverflow.com/comment/46684262
has comment: http://stackoverflow.com/comment/46685975
type: AcceptedAnswer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/46685926
has body: If you want convert string to integer, you may use like that: var test = "10"; test = test - 0; And you make error in this $('#opdtestbill-discount').val()=0; I change your js code see http://jsfiddle.net/vitalik74/upLbpnmk/
type: Answer

http://stackoverflow.com/q/29358158
tagged with: polymer
score: 3
has title: How Do I Defer Polymer Binding?
downvote count: 0
tagged with: javascript
favorite count: 0
has body: So, a foreword - I am coming from using Angular. In Angular, you tend to use a lot of promises. Obviously Polymer does not prevent you from using an external promise library, however it is clearly built around classic event firing / callbacks. So, I am essentially trying to find a way to run logic in elements only once their wrapping element has reached a condition. I have an element named Secure-Page. This element can manipulate an external session object to tell it whether a user has logged in, and it performs login dialog functionality if the user is not logged in when they arrive on it. This element was created to gate pages on the client side if the user is attempting to access them without logging in. Basically it just prevents sending a bunch of failing ajax requests... in theory. In practice, I cannot find a simple way to have it prevent wrapped elements from loading / firing. I thought that using a conditional binding template would work, but it seems that the ready, attached and etc callbacks are being called whether the template is rendered or not. Example code: // in secure-page.html &lt;template if="{{session.UserId &amp;&amp; session.token}}"&gt; &lt;content&gt; &lt;/content&gt; &lt;/template&gt; // in my-account.html &lt;ac-crud id="http" session="{{session}}" endpoint="http://localhost:3000/api/v1/users" on-get-complete="{{updateData}}" on-put-complete="{{handleSuccess}}" &gt;&lt;/ac-crud&gt; .... &lt;script&gt; Polymer('my-account', { // even if I try any of the other callbacks all of them // are called even if the element is not rendered ready: function() { this.$.http.get({ params: { id: this.session.UserId } }); } ... I have not included the whole script files, but I don't think the rest are relevant. TLDR: I think I need a callback similar to ready, which is triggered when the element's template is actually bound. (Assuming that I am correct in thinking that so-called 'conditionally binding' templates actually do not bind until their conditions …
answer count: 0
upvote count: 3
type: UnansweredQuestion
type: Question

http://stackoverflow.com/a/42827178
has body: import React, { Component } from 'react'; import { Image, StyleSheet } from 'react-native'; export default class App extends Component { render() { return ( &lt;Image source={{uri: 'http://i.imgur.com/IGlBYaC.jpg'}} style={s.backgroundImage} /&gt; ); } } const s = StyleSheet.create({ backgroundImage: { flex: 1, width: null, height: null, } }); You can try it at: https://sketch.expo.io/B1EAShDie (from: github.com/Dorian/sketch-reactive-native-apps) Docs: https://facebook.github.io/react-native/docs/images.html#background-image-via-nesting
type: Answer
answers question: http://stackoverflow.com/q/29322973
score: 1
upvote count: 1
downvote count: 0

http://stackoverflow.com/q/29266787
has body: Is this possible? It works when baseUrl = "http://mashable.com" but won't work when I give it an IP address. $(document).ready(function () { baseUrl = "https://12.34.56.78:8000/"; $.ajax({ url: baseUrl, type: "get", dataType: "", success: function (data) { alert("Yeah we are om jere"); }); });
accepted answer: http://stackoverflow.com/a/29268041
tagged with: screen-scraping
has comment: http://stackoverflow.com/comment/46735302
has comment: http://stackoverflow.com/comment/46735365
type: AnsweredQuestion
downvote count: 0
tagged with: javascript
score: 1
tagged with: jquery
type: Question
has answer: http://stackoverflow.com/a/29268041
has comment: http://stackoverflow.com/comment/46737805
favorite count: 0
has title: Screen scraping a webserver using its IP address instead of its domain name
upvote count: 1
has comment: http://stackoverflow.com/comment/46735600
answer count: 1

http://stackoverflow.com/a/29370887
type: Answer
score: 2
upvote count: 2
has body: You need to use .html() for getting/setting the html of jquery DOM object: $('#sr').html(result); or use get() or deferring operator(which you already did and works) for converting to javascript DOM object and use its native methods and properties: $('#sr')[0].innerHTML = result; or $('#sr').get(0).innerHTML = result;
answers question: http://stackoverflow.com/q/29370859
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29370859

http://stackoverflow.com/a/29317143
score: 0
has body: If you give the console.log('foo') as a callback you will call the log return as a function. A solution is to put your console.log in a function: function callback(num, func) { for(var i = 0; i &lt; num; i++) func(); } callback(4, function(){ console.log("Hello2") });
type: Answer
answers question: http://stackoverflow.com/q/29317045

http://stackoverflow.com/comment/46899471
has text: That's great - how could I do that using $resource
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29352044
type: Comment

http://stackoverflow.com/q/29254807
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46712618
tagged with: console.log
answer count: 0
has title: What could cause console.log to not support method 'log'
type: Question
has body: All of a sudden, I am getting the following error when IE11 (not FF or Chrome) encounters console.log(ayb);. There is too much other JavaScript on the page, and I am only asking for hypothetical causes or a strategy to troubleshoot. When using console.log(ayb); without any other JavaScript on the page, it works as expected. Object doesn't support property or method 'log'
tagged with: internet-explorer
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/46713188
has comment: http://stackoverflow.com/comment/46712592

http://stackoverflow.com/q/29312504
tagged with: http://stackoverflow.com/tag/html
has body: I'm fairly certain I've done this before, but I can't find any documentation about it. I'm finding this issue is oddly hard to research. I'd like to display one version (A) of a bit of text on screen. However, when the text is copied, a different version of that text (B) is actually copied to the clipboard. In practice, A and B might be very similar, but the technique should allow for A and B to be completely different strings. For example, if I use a to display the following to the user: This is a really long... ...and the user selects the div and issues a "copy" on it, I would like the text that is placed on the clipboard to be: This is a really long bit of text that is too large to display on-screen, but should be fully intact when copy/pasted. (Of course, my app would separately take care of shortening the first instance of the string and adding the ellipses.) I seem to recall this being possible with simple HTML/CSS, but the details are eluding me... Thoughts?
tagged with: css
has comment: http://stackoverflow.com/comment/46818877
favorite count: 0
tagged with: clipboard
has title: Providing alternative text for copy/paste
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46818729
upvote count: 1
has answer: http://stackoverflow.com/a/72132715
linked to: http://stackoverflow.com/q/400212
has comment: http://stackoverflow.com/comment/46818590
has comment: http://stackoverflow.com/comment/46818619
type: Question
linked to: http://stackoverflow.com/q/17527870
answer count: 1
downvote count: 0
tagged with: javascript
score: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/46818742
linked to: http://stackoverflow.com/q/8820445

http://stackoverflow.com/comment/46898216
comment on: http://stackoverflow.com/q/29355946
has text: @whitebox it is not normally this ugly
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29325443
score: 1
has comment: http://stackoverflow.com/comment/46841652
type: Answer
has comment: http://stackoverflow.com/comment/46841593
has comment: http://stackoverflow.com/comment/46842610
upvote count: 1
answers question: http://stackoverflow.com/q/29325382
has body: For this kind of problem, generally, one starts a timer on enter and stop the timer on exit. example: var timerId; new Waypoint.Inview({ element: document.getElementById('target'), enter: function(direction) { timerId = setTimeout(function() { // Only do this if in view for 5 seconds }, 5000); }, exit: function(direction) { clearTimeout(timerId); } });
downvote count: 0

http://stackoverflow.com/comment/46848716
has text: I was just guessing why you were downvoted. However, if your title would have been: _Why can't I call a function stored in a hash table?_ or similar, then maybe it would have been easier to understand your problem. Anyway, first explaining your task, then your (not yet working) solution, and finally your problem is usually a good flow for a question.
comment on: http://stackoverflow.com/q/29329367
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/46677498
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29235588
has text: anonymous functions are like literal strings or numbers. You can debug better if you named your functions. It is a good practice to pass named functions instead of anonymous. No other difference besides named functions are more readable.

http://stackoverflow.com/comment/46645842
comment on: http://stackoverflow.com/q/29218213
score: 0
type: Comment
type: QuestionComment
has text: id's should be unique to a page it doesn't make sense to select them in this manner.

http://stackoverflow.com/comment/46786856
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29295228
has text: I see your answer but I don't see how you changed my original code save for the difference vs. without reference which doesn't matter as long as emptyArray remains empty at the start of each loop.

adsense
tags question: http://stackoverflow.com/q/29318583
tag name: adsense
type: Tag

http://stackoverflow.com/comment/46831101
score: 0
type: Comment
has text: thanks a lot. Do you think we also can take layers and show/hide them at will.
type: AnswerComment
comment on: http://stackoverflow.com/a/29319294

http://stackoverflow.com/comment/46807193
type: QuestionComment
has text: You should post the JavaScript that you're tried.
score: 1
comment on: http://stackoverflow.com/q/29306387
type: Comment

http://stackoverflow.com/comment/46795771
score: 0
comment on: http://stackoverflow.com/q/29300378
has text: A JS-only solution on modern browsers seems possible, Have a look at the [Geolocation API](https://developer.mozilla.org/en-US/docs/Web/API/Geolocation/Using_geolocation). To convert lat/lng pairs to country codes see [Google's ReverseGeocoding](https://developers.google.com/maps/documentation/geocoding/#ReverseGeocoding) (You'll have to extract the relevant info from the json/xml delivered). See Fabrizio Calderan's linked SO answer
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46762057
has text: please show your code, simply providing the input and output does not allow us to trouble shoot what is happening
comment on: http://stackoverflow.com/q/29282103
type: Comment
type: QuestionComment
score: 2

http://stackoverflow.com/comment/46698875
comment on: http://stackoverflow.com/q/29246640
score: 0
type: Comment
has text: Yes, that will make the scroll take 15 times as long.
type: QuestionComment

http://stackoverflow.com/comment/46807160
comment on: http://stackoverflow.com/q/29305897
has text: [The Great Escapism (Or: What You Need To Know To Work With Text Within Text)](http://kunststube.net/escapism/)
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46811392
score: 1
type: Comment
has text: Damn, he beat me to it. Here's a fiddle, check out the calc() for handling the size of the other elements. https://jsfiddle.net/fgsebpn2/1/
type: AnswerComment
comment on: http://stackoverflow.com/a/29308690

http://stackoverflow.com/comment/46796294
type: QuestionComment
score: 0
has text: what does the console say (hit f12)
comment on: http://stackoverflow.com/q/29299194
type: Comment

http://stackoverflow.com/q/29364250
has comment: http://stackoverflow.com/comment/46921366
answer count: 0
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47669542
tagged with: dom
type: Question
has body: Generally, the question is: how to use DOM selectors in AngularJS? More deeply: what is the recommended way to specify a DOM element, where some action should be done? Let's say, I've got a plugin or a component that does some magical stuff (animations, executes a flow, embeds something, etc.) and I need to decide where it will happen in the runtime? I'll compare it with Backbone. Angular is more declarative, whereas Backbone is imperative. In Backbone there is jQuery (or sth alternative), each Backbone.View has el.$, which is a jQuery selector engine that is bound not to global DOM, but to the View's sub-DOM tree. This is faster (no need to search elements globally), easier to maintain (won't find any DOM element outside the View) and convenient. I can pass the selector, such as #id or .class during runtime. And execute or open something manually, because Backbone is imperative. Now how about angular? Let's say I want to start a big and complex user-interface process: it consists of few forms and few views, navigated forward step by step, and eventually finished with ending view (job successful or sth alike). When one view is finished, it is reloaded (overlay/spinner) and another is loaded. I want to embed it into a specified DOM element, but I would like to define it during runtime, not to embed it as angular attribute. How does that conform to angular philosophy?
tagged with: jquery-selectors
has title: angularJS: how to specify DOM elements (selectors)?
tagged with: javascript
score: 0

http://stackoverflow.com/comment/46757680
comment on: http://stackoverflow.com/a/29265606
score: 0
type: AnswerComment
has text: Ya the refactoring is great much cleaner and easier to see whats going on as well an ensure the success/error callbacks are working
type: Comment

http://stackoverflow.com/a/47254712
answers question: http://stackoverflow.com/q/29270799
score: 0
type: Answer
has body: //jsfile.js //THIS METHOD RETURN THE name : value PAIR FROM //A SPECIFIED FORM ID OR FORM IN THE CURRENT SPHERE function formHandler(formID="") { try { if (formID === "") { //PICK UP THE FORM IN THE CURRENT SPHERE formElms document.querySelectorAll("input,select,textarea"); } else if(formID !== "") { //PICK UP THE NAMED FORM var formsElms = document.querySelectorAll("form"); formsElms.forEach(function(formElm) { if (formElm.id === formID) { formElms = document.querySelectorAll("#"+formID+" input, #"+formID+" select, #"+formID+" textarea"); } }); } if (formElms) { var retObjs = new Array(); if (formElms) { formElms.forEach(function(param) { retObjs.push({name : param.name, value: param.value}); }); } } return retObjs; } catch (e) { console.log(e); } } serverSideHandler(inda={}) { try { indata = inda; complUrl = "url.php"; $.ajax({ method: "POST", url: complUrl, data: indata }) .done(function(retData) { serverResponseHandler(retData);//Function To Callback }); } catch(ev) { console.log(ev); } } //url.php &lt;?php header("Access-Control-Allow-Origin: *"); header('Content-Type: text/json'); ini_set('memory_limit','1024M'); if (!empty($_POST)) { //Extract your form Inputs as follow $name = doSomeValidation($_POST['name']); //Do DB connections //Do your CRUD //DO OTHER ACTIONS }

http://stackoverflow.com/comment/46751089
comment on: http://stackoverflow.com/a/29275783
score: 0
type: Comment
has text: My console does not display anything at all with this solution. It seems that I am not in a standard case. Moreover, why the standard $('.done_by').each(function() { var test = $(this).text(); if(test.length <= 1){console.log("ok");} else console.log("NOK"); }); does not work either ?
type: AnswerComment

http://stackoverflow.com/comment/46837606
comment on: http://stackoverflow.com/q/29323352
score: 1
has text: Use `getElementsByTagName("P")` to set `hidden` attribute of ` ` elements appropriately.
type: QuestionComment
type: Comment

http://stackoverflow.com/a/29256468
has body: Assuming the link in the html link does not have other parameters and that you add a class to it so we can target it Register Then you need the following script $(function(){ var urlparams = window.location.search; $('.copy-url-params').prop('href', function(idx, current){ return current + urlparams; }); });
type: Answer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/29256253
accepted answer of: http://stackoverflow.com/q/29256253
upvote count: 1
has comment: http://stackoverflow.com/comment/46716223
type: AcceptedAnswer

http://stackoverflow.com/comment/46783272
comment on: http://stackoverflow.com/q/29293289
score: 0
type: Comment
type: QuestionComment
has text: Why exactly do you want to do this? What are you attempting to do?

http://stackoverflow.com/comment/46868124
type: Comment
comment on: http://stackoverflow.com/q/29340306
type: QuestionComment
score: 0
has text: @Pugazh Can I have that code ?

http://stackoverflow.com/comment/46856259
type: AnswerComment
comment on: http://stackoverflow.com/a/29306708
type: Comment
score: 1
has text: Ok, I now stronlgy assume when I return the coordinates of the main image it'll work properly with the transition. Unfortunately I am not experienced enough to figure this out on my own even after reading the code over and over again and reading documetation and [this snippet](http://javascript.info/tutorial/coordinates). Can this code be modified to return the coordinates of the main image instead of nothing?

http://stackoverflow.com/q/29308659
tagged with: http://stackoverflow.com/tag/html
has body: So currently i have 2 draggable images and two Div boxes. You can drag the images into the Div boxes and depending on what image you drop into a particular Div the border colour of that Div will change (green or red). What i want to do next is to have a button lets say "Next" that when you click on this button it will take you to another page BUT only if both DIV boxes have green borders, if this criteria isn't met then an alert should pop up. Sounds really weird i know but help would be very much appreciated :). My code is below: HTML: Validate images CSS: #Drop1 {width:70px;height:70px;padding:10px;border:1px solid#aaaaaa;} #Drop2 {width:70px;height:70px;padding:10px;border:1px solid#aaaaaa;} #Drop1.red-border, #Drop2.red-border { border: 1px solid red; } #Drop1.green-border, #Drop2.green-border { border: 1px solid green; } #Drop1.gray-border, #Drop2.gray-border { border: 1px solid darkgray; } JS: function allowDrop(ev) { ev.preventDefault(); } function drag(ev) { ev.dataTransfer.setData("text/html", ev.target.id); } function drop(ev) { ev.preventDefault(); var data=ev.dataTransfer.getData("Text/html"); var clone = document.getElementById(data).cloneNode(true); clone.id = clone.id + (new Date()).getMilliseconds(); ev.target.appendChild(clone); if (ev.target == document.getElementById("trash")) { var img = document.getElementById(data); img.parentNode.removeChild(img); } } function checkImages() { var drop1Elem = document.getElementById('Drop1'), drop2Elem = document.getElementById('Drop2'); if(drop1Elem.childNodes.length >= 1) { if(drop1Elem.childNodes[0].className === 'item1') { drop1Elem.className = 'red-border'; } else if(drop1Elem.childNodes[0].className === 'item2') { drop1Elem.className = 'green-border'; } else { drop1Elem.className = 'gray-border'; } } if(drop2Elem.childNodes.length >= 1) { if(drop2Elem.childNodes[0].className === 'item1') { drop2Elem.className = 'red-border'; } else if(drop2Elem.childNodes[0].className === 'item2') { drop2Elem.className = …
downvote count: 0
has title: Check if a condition is true if so proceed to next level if not throw an alert message
accepted answer: http://stackoverflow.com/a/29308748
score: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29308748
type: Question
upvote count: 1
answer count: 1
tagged with: javascript
favorite count: 0

http://stackoverflow.com/q/29359550
tagged with: javascript
has title: How to test if a varible is only letters and not abc1. alsoabout validating emails
score: 0
has comment: http://stackoverflow.com/comment/46903336
type: UnansweredQuestion
type: Question
has answer: http://stackoverflow.com/a/29359801
has comment: http://stackoverflow.com/comment/46903351
has body: So I am making a form that asks the user to input their first name and then their last name. Now, if they enter 123 or leave it blank an error will pop up. HOWEVER, if I type zack12, no error will pop up.. any idea how to fix it? var fName = document.getElementById("fName").value; if(fName=="" || !isNaN(fName)) { alert("PLEASE ENTER A FIRST NAME."); } Also I have to make sure when they enter their email, it was a @ in it as well as a dot (.). How do I go about that as I am confused. Thanks.
has answer: http://stackoverflow.com/a/29378635
answer count: 3
has comment: http://stackoverflow.com/comment/46903369
has answer: http://stackoverflow.com/a/29359598
tagged with: validation

http://stackoverflow.com/comment/46664909
type: AnswerComment
has text: Thank you for your explanation! It works now as expected. Also I know what I did wrong.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29228817

http://stackoverflow.com/comment/46829235
comment on: http://stackoverflow.com/a/29312214
type: AnswerComment
score: 0
type: Comment
has text: @LeonardDrapeza i just updated the snippet. for this you need to drop the **floa**t and use **display:inline-block** or **inline-table;** **text-align:center;** on parent will do the job then.

http://stackoverflow.com/comment/85883541
comment on: http://stackoverflow.com/a/32790325
score: 0
type: Comment
has text: Doesn't work here either, basically using exactly this code minus the property check and have applied the chai.use(...) too.
type: AnswerComment

http://stackoverflow.com/q/29359935
type: AnsweredQuestion
has title: Parse.Query and-combination issue
tagged with: pfquery
has answer: http://stackoverflow.com/a/29360109
accepted answer: http://stackoverflow.com/a/29360109
tagged with: ios
answer count: 1
tagged with: javascript
tagged with: parse-cloud-code
has body: In cloud code, I made a query using this sort of code: theMainQuery = new Parse.Query("myClass"); theMainQuery.equalTo("fieldOne", "champion"); theSubQuery = new Parse.Query("myClass"); theSubQuery.equalTo("fieldTwo", "USA"); the2ndSubQuery = new Parse.Query("myClass"); the2ndSubQuery.equalTo("fieldTwo", "BRASIL"); theSubQuery = Parse.Query.or(theSubQuery,the2ndSubQuery); theMainQuery = Parse.Query.and(theMainQuery,theSubQuery); In other words I want a query based on this condition: ((fieldOne equals "champion") and ((fieldTwo equals "USA") or (fieldTwo equals "BRASIL"))) In usual C style writing I want to select records matching: ((fieldOne == "champion") &amp;&amp; ((fieldTwo == "USA") || (fieldTwo == "BRASIL"))) The problem is that it does not work, I suppose my Parse.Query.and is wrong. Then how can I get the result I want? Of course, I would be happy to avoid reformulating the query in this long format: (((fieldOne == "champion") &amp;&amp; (fieldTwo == "USA")) || ((fieldOne == "champion") &amp;&amp; (fieldTwo == "BRASIL")))
score: 0
tagged with: parse-platform
type: Question

http://stackoverflow.com/q/29260803
score: 4
has comment: http://stackoverflow.com/comment/46723870
tagged with: http://stackoverflow.com/tag/json
answer count: 2
linked to: http://stackoverflow.com/q/964397
has title: Parse function inside Json
has answer: http://stackoverflow.com/a/29262051
tagged with: javascript
has body: I have this JSON as a result of the function JSON.stringify(): {"get":"function (f,g){'use strict';var h,i;if(i={},'string'==typeof f){if('object'==typeof g)for(h in g)i[h]=g[h];i.url=f}else if('object'==typeof f)for(h in f)i[h]=f[h];return i.type=i.type||d,i.oauthio={provider:a,tokens:b,request:c},e.http(i)}","post":"function (f,g){'use strict';var h,i;if(i={},'string'==typeof f){if('object'==typeof g)for(h in g)i[h]=g[h];i.url=f}else if('object'==typeof f)for(h in f)i[h]=f[h];return i.type=i.type||d,i.oauthio={provider:a,tokens:b,request:c},e.http(i)}"} How you can see there are functions inside values. I want to rebuild this JavaScript object, my goal is to remove the quotes in the risult but also the values; because functions, in this case, are recognized as string. I want something like this:{key : value} Now I get:{key : "value"}
has comment: http://stackoverflow.com/comment/46724051
upvote count: 4
type: AnsweredQuestion
tagged with: function
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/29261064
has comment: http://stackoverflow.com/comment/46724763
type: Question
accepted answer: http://stackoverflow.com/a/29262051
possible better answer: http://stackoverflow.com/a/29261064

http://stackoverflow.com/a/33915279
has body: Having version 5.1.0 of ChaiAsPromised, solution from Keithamus did not work for me - rejectedWith did not gave me the error object to assert, but "rejected" did: return expect(foo()) .to.be.rejected .and.be.an.instanceOf(Error) .and.have.property('code', 'EFOO'); For asserting multiple properties return expect(foo()) .to.be.rejected .then(function(error) { expect(error).to.have.property('name', 'my error message'); expect(error).to.have.property('code', 'EFOO'); });
type: Answer
score: 41
downvote count: 1
answers question: http://stackoverflow.com/q/29363455
upvote count: 42

http://stackoverflow.com/comment/47694009
comment on: http://stackoverflow.com/a/29324966
type: Comment
score: 0
type: AnswerComment
has text: @kar288 So, I could use a pos tagger like this https://code.google.com/p/jspos/ and get a tagged version of my sentences. Then I apply word-based comparison to this instead of sentence-based comparison on the result that jspos returns?

http://stackoverflow.com/comment/46712679
has text: Please share your tasktypes object. Hope the value in the option is 0,1,2 isntead of the strings
comment on: http://stackoverflow.com/q/29254821
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46753977
type: QuestionComment
comment on: http://stackoverflow.com/q/29273474
score: 0
has text: @Ian The isuue is I am using keepRatio property of free transform The issue is because of this. Don't know hot to maintain ratio for negative value
type: Comment

http://stackoverflow.com/q/29322971
has answer: http://stackoverflow.com/a/29323162
has body: I'm trying to make this donut clicker game, which is supposed to be similar to cookie clicker. When you select a item from the shop, a confirm is supposed to pop up to confirm that you want to buy the item. I've made the clicking easier in the code below. (you might want to make the code full screen) My question is, why do the confirm pop ups appear multiple times in a row? In my code, there is only one confirm when you click the item, so I really don't know what causes it. $(document).ready(function() { tacoClick(); }); function tacoClick() { //hide the items $(".item").hide(); //defining some store items var clickBonus1 = { price: 6, amount: 25, }; var clickBonus2 = { price: 75, amount: 10, }; var clickBonus5 = { price: 150, amount: 5, }; var autoClick = { price: 500, amount: 1, }; var autoBonus1 = { price: 700, amount: 10, }; var autoBonus2 = { price: 1000, amount: 10, }; var autoBonus5 = { price: 1200, amount: 5, }; var laser = { price: 2500, amount: 1, }; var battery = { price: 1500, amount: 666, }; var energyPotion = { price: 1500, amount: 20, }; var key = { price: 500000, amount: 1, }; //defining the player var player = { clicks: 0, money: 5, energy: 100, items: ["none"], clickAmount: 1, energyLost: 0.5, waitTime: 600000, }; //clicking! YAY :) $("#donut").click(function() { //adding num clicks, money, and taking away energy player.clicks += player.clickAmount; player.energy -= player.energyLost; player.money += player.clickAmount / 10; //showing player status on the status bar document.getElementById("clickNum").innerHTML = player.clicks; document.getElementById("playerEnergy").innerHTML = Math.floor(player.energy); document.getElementById("money").innerHTML = Math.floor(player.money); //tired mode if(player.energy < 1 && player.energy > -1) { alert("You ran out of energy! You'll have to wait ten more minutes until you can play again!"); $("body").fadeOut(); window.setTimeout(function revive() { $("body").fadeIn(); player.energy = 100; }, player.waitTime); } …
type: AnsweredQuestion
upvote count: 1
downvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/29323162
has comment: http://stackoverflow.com/comment/46838713
tagged with: javascript
tagged with: jquery
has title: Why are there several alerts popping up at the same time?
score: 0
tagged with: confirm
has comment: http://stackoverflow.com/comment/46836922
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/46841320

http://stackoverflow.com/a/29316721
score: -2
answers question: http://stackoverflow.com/q/29316518
downvote count: 2
has comment: http://stackoverflow.com/comment/46825731
has body: Your problem is Same-Origin-Policy. Basically javascript in a webpage can not access websites on another domain. This is why it is working from an adfly page, but not from google. An option would be to implement your skipper as a Chrome Extension, these can get access allowed to the websites you like.
upvote count: 0
type: Answer

http://stackoverflow.com/q/29315102
has comment: http://stackoverflow.com/comment/46822762
accepted answer: http://stackoverflow.com/a/29315182
has body: Sorry, I know the title might be strange. Basically, I have the code below: jQuery(document).ready(function($) { $('body.single article.project').addClass('grayscale'); }); The problem is that adding the class of grayscale on load initializes the plugin that corresponds to that class, which I don't want to do. I would like to add the class but not initialize the plugin. Would I have to somehow add the class a few milliseconds after load? How would I go about this?
has comment: http://stackoverflow.com/comment/46822669
type: Question
possible better answer: http://stackoverflow.com/a/29315191
has comment: http://stackoverflow.com/comment/46822632
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29315182
score: 0
has answer: http://stackoverflow.com/a/29315191
answer count: 2
has comment: http://stackoverflow.com/comment/46822621
has title: Use $(el).addClass('example'); but don't add on load?
type: AnsweredQuestion

http://stackoverflow.com/comment/46862588
type: AnswerComment
comment on: http://stackoverflow.com/a/29336991
score: 0
type: Comment
has text: To understand why it doesn't works look to the jsfiddle generated source code ! :) (Inspect the result with F12) And try your code with no wrap and with onLoad. Search for your calc() function and you will understand.

http://stackoverflow.com/comment/46902472
type: Comment
type: QuestionComment
has text: The CSS is doing that now, but the actual cart link isn't loading into .slicknav_menu, right?
comment on: http://stackoverflow.com/q/29358757
score: 0

http://stackoverflow.com/q/29281497
has body: I am using Ajax to call the C# from Javascript and load the data from database. I have used following article to show the pushpins and there infoboxes. http://blogs.msdn.com/b/rbrundritt/archive/2013/11/08/multiple-pushpins-and-infoboxes-in-bing-maps-v7.aspx?CommentPosted=true#commentmessage My code works great on IE 11 , when I have compatibility mode on, but when compatibility mode is off, the mouse click event is not being received by the Javascript function. I tried using Chrome and I had the same issue. &lt;%@ Page Title="" Language="C#" MasterPageFile="~/Maps.Master" AutoEventWireup="true" CodeBehind="BingMaps.aspx.cs" Inherits="MyMaps.secure.BingMaps" %&gt; .... &lt;asp:ScriptManager ID="ScriptManager" runat="server" EnablePageMethods="true" /&gt; &lt;asp:Literal ID="Literal1" runat="server"&gt; &lt;/asp:Literal&gt; var map = null, infobox, dataLayer; $(document).ready(function () { GetMap(); }); function GetMap() { // Initialize the map map = new Microsoft.Maps.Map(document.getElementById("MapHolder"), { credentials: "lincensekey", zoom: 2 }); dataLayer = new Microsoft.Maps.EntityCollection(); map.entities.push(dataLayer); var infoboxLayer = new Microsoft.Maps.EntityCollection(); map.entities.push(infoboxLayer); infobox = new Microsoft.Maps.Infobox(new Microsoft.Maps.Location(0, 0), { visible: false, offset: new Microsoft.Maps.Point(0, 20) }); infoboxLayer.push(infobox); PageMethods.GetLocations(RequestCompletedCallback, RequestFailedCallback); } function AddData(MapPoints) { for (var i = 0, len = MapPoints.length; i &lt; len; ++i) { var pushpin = new Microsoft.Maps.Pushpin(new Microsoft.Maps.Location(parseFloat(MapPoints[i].lat),parseFloat(MapPoints[i].lon)) , { icon: MapPoints[i].group, height: 50, width: 60, text: MapPoints[i].city }); pushpin.Title = MapPoints[i].name; pushpin.description = MapPoints[i].desc; Microsoft.Maps.Events.addHandler(pushpin, 'click', displayInfobox); dataLayer.push(pushpin); } } function displayInfobox(e) { if (e.targetType == '…
type: Question
tagged with: javascript
tagged with: jquery
tagged with: bing-maps
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/29281579
type: UnansweredQuestion
has title: Bing Maps on IE 11 browser, The mouse click event is only working when we have compatibility mode on
tagged with: css

http://stackoverflow.com/a/29340754
has comment: http://stackoverflow.com/comment/46870007
has comment: http://stackoverflow.com/comment/46870279
type: Answer
has body: The problem is in this line: scope.list = listOrdered; That line define a new list property on the chlid scope instead of changing the actual list, which is a property of the parent scope. (so doing scope.$parent.list = listOrdered works fine..). You can solve it by putting the list in an object, which will keep the referneces in sync: $scope.objList = { list: $filter('objToArr')(objData) }; var listOrdered = $filter('orderBy')(scope.objList.list, '-name'); //replace 'orderBy' with 'noFilter' -&gt; it works, but removes wrong item! listOrdered.splice(delIndex,1); scope.objList.list = listOrdered; In your HTML: &lt;li item-delete="{{ $index }}" ng-repeat="item in objList.list | orderBy:'-name'"&gt;{{ item.name }}&lt;/li&gt; Check this plunker
has comment: http://stackoverflow.com/comment/46871689
downvote count: 0
has comment: http://stackoverflow.com/comment/46870346
has comment: http://stackoverflow.com/comment/46869290
score: 1
has comment: http://stackoverflow.com/comment/46872004
has comment: http://stackoverflow.com/comment/46870671
answers question: http://stackoverflow.com/q/29334909
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29334909

http://stackoverflow.com/comment/46876354
type: AnswerComment
type: Comment
has text: Yeah, I figured that before looking at your answer and was about to post. Thanks anyways!
comment on: http://stackoverflow.com/a/29345085
score: 0

http://stackoverflow.com/a/29222307
accepted answer of: http://stackoverflow.com/q/29220837
has body: You just need to correct the code which access BrandList. Access it through the BrandMerchant array: $scope.searchFilter = function(row){ var mercChecked = getChecked($scope.merchantCheckboxes); var brandChecked = getChecked($scope.brandCheckboxes); if(mercChecked.length == 0 &amp;&amp; brandChecked.length == 0) return true; else{ if($scope.merchantCheckboxes[row.MerchantName]) return true; else{ return row.BrandMerchant[0].BrandList.split(/,\s*/).some(function(brand){ return $scope.brandCheckboxes[brand]; }); } } }; Also when you construct the BrandList Array for the right filter: _.each($scope.records, function(i){ if(i.BrandMerchant[0].BrandList) $scope.BrandList=_.union($scope.BrandList,i.BrandMerchant[0].BrandList.split(',' )); }); Check this fiddle.
answers question: http://stackoverflow.com/q/29220837
type: Answer
score: 0
type: AcceptedAnswer

http://stackoverflow.com/q/29262800
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/12144846
has comment: http://stackoverflow.com/comment/46730264
type: Question
has comment: http://stackoverflow.com/comment/46732347
has answer: http://stackoverflow.com/a/29264758
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46731017
has title: Using .jquery .on() without an event
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/46730286
has body: I have input elements that get appended to my HTML document that I need to get the value of. I understand that .on() should be used to get appended elements, but .on() expects an event to activate it, and I don't need an event. Below is the code. #save_design is on a different part of the page. #fields_cnt is the parent that holds all my appended forms. .reg_field is the element I'm trying to get the value of. The first child works because that form is present when the document is loaded, or in other words, it is not appended. The other children all returns values undefined, or false depending on the input type and the logic I'm applying to it. This leads me to believe that .on() or something close to it should be used. To clarify, I am trying to get the value of an appended input when #save_design is clicked. $('#save_design').click( function() { group_text[form_count] = $('#fields_cnt .field_group:nth-child(' + child + ') .reg_field').val(); I have tried replacing the originating click event as so. It has not worked. $('body').on('click', '#save_design', function(){ I have tried using .on() without an event or event object. It has also not worked. $('body').on('', '', function(){ group_text[form_count] = $('#fields_cnt .field_group:nth-child(' + child + ') .reg_field').val(); }); I have found a plugin that should work. JQuery selecting dynamically generated html without adding event (with live) This is not ideal, because as stated in the github readme, it is being rewritten. Also, the SO answer is 3 years old now, so it may no longer be the correct answer. https://github.com/brandonaaron/livequery I'd like to find a more direct solution. Is there a way to do this natively in jQuery? Is there a way to use .on() without an event, and if so, what's the appropriate syntax? UPDATE: Clarification: The input fields get appended when an add field button is pressed. Their values change after they are appended. I would prefer not to rerecord the value of an input, every tim…
type: UnansweredQuestion

animation
tags question: http://stackoverflow.com/q/29331194
tags question: http://stackoverflow.com/q/29242559
type: Tag
tags question: http://stackoverflow.com/q/29357731
tags question: http://stackoverflow.com/q/29319619
tag name: animation
tags question: http://stackoverflow.com/q/29250270
tags question: http://stackoverflow.com/q/29322698
tags question: http://stackoverflow.com/q/29368180
tags question: http://stackoverflow.com/q/29318807
tags question: http://stackoverflow.com/q/29341938
tags question: http://stackoverflow.com/q/29218554
tags question: http://stackoverflow.com/q/29327576
tags question: http://stackoverflow.com/q/29285230
tags question: http://stackoverflow.com/q/29223612
tags question: http://stackoverflow.com/q/29360813
tags question: http://stackoverflow.com/q/29285184
tags question: http://stackoverflow.com/q/29356065
tags question: http://stackoverflow.com/q/29307186

http://stackoverflow.com/comment/46845499
has text: Perhaps, close the `tr` tag here -> `data[i].email + " "`
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29327777

http://stackoverflow.com/q/29253703
has body: Email Management IT services provide all staff with email address. On creation of your email address you have access to various Google apps like Google drive, Google calendar etc. We also provide group mailing account creation User Account Creation Group Account Creation / Distribution List Deactivation of users and Group Accounts I would like to make email Management a link and when the link is clicked it displays these list. The list would not appear until the link is clicked then it drops it down. let me give an example of a site that has what i would like to implement. this is the link http://ist.mit.edu/services
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/29254082
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has title: How to make an anchor tag in HTML drop down a list
has comment: http://stackoverflow.com/comment/46710942
has answer: http://stackoverflow.com/a/29254024
type: Question
has comment: http://stackoverflow.com/comment/46711034
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/29354199
type: Question
score: 0
has answer: http://stackoverflow.com/a/29355011
has comment: http://stackoverflow.com/comment/46935956
answer count: 1
tagged with: tableau-api
has title: Referencing Multiple URLs on a Timer
tagged with: http://stackoverflow.com/tag/html
has body: I have a basic HTML/JavaScript query that references a URL. Instead of referencing a single URL, I'd like to reference 3, and have them cycle through on a timer. For example: currently I have URL1 = Dashboard1, and I would like there to be a URL2 = Dashboard2, and URL3 = Dashboard3. Here is my script: Thank you! edited my script, however when run it only plays the first URL of the three. Here is the edited script: Additional Edits:
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29355011
tagged with: javascript

http://stackoverflow.com/comment/46656249
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29223869
has text: Why are you mixing `setTimeout` with `requestAnimationFrame`??? And it's exactly the same error, with the very same solution.

http://stackoverflow.com/comment/46766613
has text: @amphetamachine ..want to make it Aligned to the bottom of the page
score: 0
comment on: http://stackoverflow.com/q/29283676
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/46715534
comment on: http://stackoverflow.com/q/29256335
score: 0
type: Comment
type: QuestionComment
has text: Your function isn't anywhere on that page

http://stackoverflow.com/comment/46647968
score: 1
type: Comment
comment on: http://stackoverflow.com/q/29219194
type: QuestionComment
has text: I'm not sure I understand. Can you update your question to add some images or mock-ups with what happens with fixed element that you would like to avoid, and what would be the desired outcome?

http://stackoverflow.com/q/29323705
tagged with: firebase
has body: I have a phonegap app on iOS using firebase for authentication. Logging in is done like so: var afterLogin = function(error, authData) { if (error) { console.log(error); messenger.error(error.message); return; } $scope.loggedIn = $auth.check(); $scope.$apply(); $sync.sync(); messenger.success('Logged in'); }; $scope.doLogin = function() { mixpanel.track('login'); if (!$scope.loginForm.email &amp;&amp; !$scope.loginForm.password) { messenger.error('Enter email and password then tap login'); return; } else if (!$scope.loginForm.email) { messenger.error('Enter your email then tap login'); return; } else if (!$scope.loginForm.password) { messenger.error('Enter your password then tap login'); return; } ref.authWithPassword({ email : $scope.loginForm.email, password : $scope.loginForm.password }, afterLogin); } I check a user's status like this: check: function() { var authData = ref.getAuth(); if (authData) { mixpanel.identify(authData.uid); mixpanel.people.set({ "$email": authData.password.email }); } return !!authData; } It works fine initially, but users get signed out and have to log in again after 12-24 hours of not using the app. Perhaps when the app is shunted out of memory? Obviously this is pretty frustrating, not sure what's causing this. The session length is set to 24 weeks, still having the problem. Firebase version: 2.1.2 Angular: 1.3.6 Log of localStorage after authenticating with username and password: Coming back a day later after being logged out: Contents of the cookie (same logged in or not, no firebase stuff in there):
has title: Regularly signed out when using firebase authWithPassword
has comment: http://stackoverflow.com/comment/47853389
tagged with: ionic-framework
has comment: http://stackoverflow.com/comment/47972815
type: Question
has comment: http://stackoverflow.com/comment/47973536
has comment: http://stackoverflow.com/comment/46925601
answer count: 1
tagged with: ios
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/48030016
has answer: http://stackoverflow.com/a/32869829
tagged with: cordova
type: UnansweredQuestion

http://stackoverflow.com/comment/46899726
has text: Welcome to StackOverflow! Please be sure to read our [ask] page to help you formulate a great question. You are much more likely to get a good answer from the community if you put some effort into your question. ALSO, it helps if you create an MCVE (http://stackoverflow.com/help/mcve) and add it to your question
comment on: http://stackoverflow.com/q/29357535
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/a/29248386
answers question: http://stackoverflow.com/q/29248017
score: 0
has body: You should control input value's with val() method // cache element var $select = $('.templatesAvailableFields'); $select.change( function() { $('.template').val($select[0].value); });
type: Answer

http://stackoverflow.com/q/29276996
answer count: 1
favorite count: 0
tagged with: forever
has comment: http://stackoverflow.com/comment/46752772
type: UnansweredQuestion
upvote count: 4
tagged with: node.js
has comment: http://stackoverflow.com/comment/46752640
downvote count: 0
has body: CentOs 6.5 using root acount, I have a working Node.js Express app: root@vps [/home/test/node]# npm start app.js &gt; test@0.0.1 start /home/test/node &gt; node ./bin/www app.js The app can be seen working on the internet browser. I stop the app and try to run it with forever: root@vps [/home/test/node]# forever start app.js warn: --minUptime not set. Defaulting to: 1000ms warn: --spinSleepTime not set. Your script will exit if it does not stay up for at least 1000ms info: Forever processing file: app.js root@vps [/home/test/node]# Throws a couple of warnings that should not be a problem and looks like it should be working but its not showing on the browser, forever list: root@vps [/home/test/node]# forever list info: Forever processes running data: uid command script forever pid id logfile uptime data: [0] OkGm /usr/local/bin/node app.js 32222 32227 /root/.forever/OkGm.log STOPPED root@vps [/home/test/node]# If I check OkGm.log: error: Forever detected script exited with code: 0 Why is the app not working when I run it with forever?
has answer: http://stackoverflow.com/a/29278136
type: Question
has comment: http://stackoverflow.com/comment/46753006
tagged with: javascript
score: 4
tagged with: express
has title: Node.js and Forever "exited with code: 0"

http://stackoverflow.com/comment/46863139
has text: how do I call this function?
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29337480

http://stackoverflow.com/q/29333366
accepted answer: http://stackoverflow.com/a/29333528
type: Question
has answer: http://stackoverflow.com/a/29333457
has comment: http://stackoverflow.com/comment/46856614
tagged with: function
has comment: http://stackoverflow.com/comment/46855645
has answer: http://stackoverflow.com/a/29334043
tagged with: javascript
has title: Javascript - How to get element that was clicked
score: 0
has body: I'm making a really simple photo gallery with thumbnails and I have a working code which changes the big image when a thumbnail is clicked. Now what I need is to add a green border to the thumbnail which is currently active. HTML: &lt;div id="gallery"&gt; &lt;div id="big"&gt; &lt;img align="center" src="big/pipe_big.jpg" alt="" id="image" /&gt; &lt;/div&gt; &lt;div id="small"&gt; &lt;img onclick="changeImage('pipe')" src="small/pipe_small.jpg" alt="" /&gt; &lt;img onclick="changeImage('leaves')" src="small/leaves_small.jpg" alt="" /&gt; &lt;img onclick="changeImage('orange')" src="small/orange_small.jpg" alt="" /&gt; &lt;img onclick="changeImage('xuangong')" src="small/xuangong_small.jpg" alt="" /&gt; &lt;/div&gt; &lt;div id="small"&gt; &lt;img onclick="changeImage('grave')" src="small/grave_small.jpg" alt="" /&gt; &lt;img onclick="changeImage('lotus')" src="small/lotus_small.jpg" alt="" /&gt; &lt;img onclick="changeImage('tibet_girl')" src="small/tibet_girl_small.jpg" alt="" /&gt; &lt;img onclick="changeImage('girl_water')" src="small/girl_water_small.jpg" alt="" /&gt; &lt;/div&gt; &lt;/div&gt; JS: function changeImage(x){ var image = document.getElementById('image'); var active_image = ?????????? if (x == 'pipe') { image.src = 'big/pipe_big.jpg'; } else if (x == 'leaves') { image.src = 'big/leaves_big.jpg'; } else if (x == 'orange') { image.src = 'big/orange_big.jpg'; } else if (x == 'xuangong') { image.src = 'big/xuangong_big.jpg'; } else if (x == 'grave') { image.src = 'big/grave_big.jpg'; } else if (x == 'lotus') { image.src = 'big/lotus_big.jpg'; } else if (x == 'tibet_girl') { image.src = 'big/tibet_girl_big.jpg'; } else if (x == 'girl_water') { image.src = 'big/girl_water_big.jpg'; } active_image.style.border = '2px solid green'; } So I need to find the element that triggered the function and put it into variable "active_image" so that the function "changeImage()" always changes the border to 2px solid green. And please no jQuery solutions, I need it to be J…
has answer: http://stackoverflow.com/a/29333528
answer count: 5
possible better answer: http://stackoverflow.com/a/29333433
has answer: http://stackoverflow.com/a/29333433
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29333517
has comment: http://stackoverflow.com/comment/46856507

http://stackoverflow.com/comment/52889236
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29241638
has text: How do you Stop the Track from playing?

http://stackoverflow.com/q/29295149
type: Question
has answer: http://stackoverflow.com/a/32635496
tagged with: google-analytics
has title: Google Analytics trackEvent for Internal Links not Working Correctly
score: 1
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
has body: I am using ga.js. My code is recording for some internal links but on the pages that I have tested the internal links of showed for total events of 1 when it should have been 50. I also look at real time reports in the events. All of my externals show up right away but my internals do not. I cannot figure out why everything works except for the internal links. My code is as follows, &lt;script type="text/javascript"&gt; if (typeof jQuery != 'undefined') { jQuery(document).ready(function ($) { var pdffiletype = /\.(pdf)$/i; var filetypes = /\.(zip|exe|doc*|xls*|ppt*|mp3)$/i; var baseHref = ''; if (jQuery('base').attr('href') != undefined) baseHref = jQuery('base').attr('href'); jQuery('a').each(function () { var href = jQuery(this).attr('href'); if (href &amp;&amp; (href.match(/^https?\:/i)) &amp;&amp; (!href.match(document.domain))) { jQuery(this).click(function () { var extLink = href.replace(/^https?\:\/\//i, ''); _gaq.push(['_trackEvent', 'External', 'Click', extLink]); if (jQuery(this).attr('target') != undefined &amp;&amp; jQuery(this).attr('target').toLowerCase() != '_blank') { setTimeout(function () { location.href = href; }, 200); return false; } }); } else if (href &amp;&amp; href.match(/^javascript\:/i)) { //do not track return true; } else if (href &amp;&amp; href.match(/^mailto\:/i)) { jQuery(this).click(function () { var mailLink = href.replace(/^mailto\:/i, ''); _gaq.push(['_trackEvent', 'Email', 'Click', mailLink]); }); } else if (href &amp;&amp; href.match(pdffiletype)) { jQuery(this).click(function () { var extension = (/[.]/.exec(href)) ? /[^.]+$/.exec(href) : undefined; var filePath = href; _gaq.push(['_trackEvent', 'PDF', 'Click', $(this).html(), 0]); if (jQuery(this).attr('target') != undefined &amp;&amp; jQuery(this).attr('target').toLowerCase() != '_blank') { setTimeout(function () { location.href = baseHref + href; }, 200); return false; } }); } else if (href &amp;&amp; href.match(filetypes)) { jQuery(this).click(function () { var extension =…
favorite count: 0
type: UnansweredQuestion
upvote count: 1

http://stackoverflow.com/a/29324170
upvote count: 1
has body: Try $(document).ready(function() { rotateThumbIcon(); }); function rotateThumbIcon() { var elem = $(".th-ho"); var thId = $("#" + elem[0].id + "Th"); elem.hover(function() { thId.animateRotate(0, 1000, "linear", function(){ console.log(this); }); }, function() { thId.animateRotate(-90, 1000, "linear", function() { console.log("complete"); }) }); } $.fn.animateRotate = function(angle, duration, easing, complete) { var args = $.speed(duration, easing, complete); args.step = function(now) { $(this).css("transform", "rotate(" + now + "deg)"); }; $(this).animate({deg: angle}, args); }; jsfiddle http://jsfiddle.net/r293oLdg/6/
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/29323970
score: 1

http://stackoverflow.com/comment/46776967
comment on: http://stackoverflow.com/q/29289913
score: 3
has text: Is not that hard, one way to solve it is to separate both elements in two separate arrays, sort them and then iterate through the unsorted array, if you find an integer, take an integer from the sorted integers array and if you find a String take it from the sorted Strings array
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46803263
comment on: http://stackoverflow.com/a/29304221
has text: I specifically mentioned a specific div in the title. I also included that div ID in the OP. This isn't mentioned in your code, therefore doesn't answer the question.
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/a/29305233
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29304902
answers question: http://stackoverflow.com/q/29304902
type: Answer
has comment: http://stackoverflow.com/comment/46896996
has body: If you happen to change the order of the html, for example place text area before the select box, it would not work. So as an alternative for the previous answer, you can wrap your groups into a div: NO YES and when you are going to display/hide the text areas, you can do: $(this).closest('.container').find('.text_area').show(); or $(this).closest('.container').find('.text_area').hide(); Here is a demo: http://jsfiddle.net/n1fjo6qu/13/

http://stackoverflow.com/comment/46834724
has text: The `require('js-string-escape');` was removed intentionally, as I was trying to get rid of an extra dependency...
type: Comment
comment on: http://stackoverflow.com/a/29320830
score: 0
type: AnswerComment

http://stackoverflow.com/q/29353725
tagged with: jquery
has answer: http://stackoverflow.com/a/29353962
favorite count: 0
accepted answer: http://stackoverflow.com/a/29353962
has body: I quite frankly run into this problem every time I try to code html or anything web related. &lt;script type="text/javascript" src="/js/jquery.js"&gt;&lt;/script&gt; Sometimes it works, sometimes it doesn't. I try a hard refresh, doesn't work. I try changing the file name sometimes. It may work for a few. I try a new page, it doesn't work. I'm really lost on what to do here. If I create a /js folder, and stick my freaking js files in it, what can I do so that it will pick up on them every time, without fail? This isn't related to other coding mistakes, because I'm taking code directly from working examples, and they do not work because of it not picking up on the jquery source file.
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/46892833
has comment: http://stackoverflow.com/comment/46893184
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46917604
type: Question
has comment: http://stackoverflow.com/comment/46892888
score: -1
has comment: http://stackoverflow.com/comment/46892719
has title: Why do my javascript and jquery source files consistently not load?
downvote count: 2
has comment: http://stackoverflow.com/comment/46892756
upvote count: 1
answer count: 1
tagged with: javascript
tagged with: web

http://stackoverflow.com/a/29331323
has comment: http://stackoverflow.com/comment/46851967
type: AcceptedAnswer
upvote count: 24
has comment: http://stackoverflow.com/comment/46852125
has comment: http://stackoverflow.com/comment/94754065
type: Answer
downvote count: 0
answers question: http://stackoverflow.com/q/29331261
has comment: http://stackoverflow.com/comment/59551969
has body: Add disabled class to the label like this Checkbox 1 (pre-checked) Checkbox 2 Checkbox 3 Here is a demo
accepted answer of: http://stackoverflow.com/q/29331261
has comment: http://stackoverflow.com/comment/59213857
score: 24

http://stackoverflow.com/a/29361937
type: Answer
downvote count: 1
score: -1
upvote count: 0
answers question: http://stackoverflow.com/q/29361804
has body: It is very common issue, do not need regex. Just simply replace a single quote in a string to double single quote. This is example. Just see the comment --This is double quote I used, because ally's wonderland not work at here. DECLARE @StringValueWithSingleQuote varchar( 50) = 'Ally''s wonderland' -- just see the magid, replace double single quote to single quote while displaing select @StringValueWithSingleQuote --This is actual you have to do select REPLACE( @StringValueWithSingleQuote , char(39) , Char(39)+Char(39) )

http://stackoverflow.com/comment/46796436
type: Comment
comment on: http://stackoverflow.com/q/29300829
has text: and don't use alerts!
score: 0
type: QuestionComment

http://stackoverflow.com/a/60557886
upvote count: 5
type: Answer
downvote count: 0
has body: This worked for me. Just simply return an array of strings as labels in tooltips. tooltips: { callbacks: { label: function(tooltipItem, data) { let label = "Line 1"; let label2 = "Line 2"; return [label, label2]; } } }
answers question: http://stackoverflow.com/q/29302392
score: 5

http://stackoverflow.com/q/29237606
score: 3
has body: i want to replace a word in a string: Input: "left.position.left = leftContent.left.posleft" Output: "a.position.left = content.left.posleft" Before "left" there shouldn´t be [a-zA-Z0-9.] and behind there shouldn´t be [a-zA-Z0-9]. This is my code I wrote so far: "left.position.left = leftContent.left.posleft".replace(new RegExp("left(?![a-zA-Z0-9])", "g"), "a") But it returns: "a.position.a = leftContent.a.posa" Could anybody help me?
tagged with: javascript
answer count: 1
downvote count: 0
favorite count: 0
tagged with: regex
type: AnsweredQuestion
has title: RegEx: Replace string between two non-matching strings
upvote count: 3
has answer: http://stackoverflow.com/a/29237843
type: Question
accepted answer: http://stackoverflow.com/a/29237843

http://stackoverflow.com/q/29364059
tagged with: javascript
tagged with: promise
has comment: http://stackoverflow.com/comment/46911902
has answer: http://stackoverflow.com/a/29364319
has comment: http://stackoverflow.com/comment/46911786
tagged with: asynchronous
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46913194
has comment: http://stackoverflow.com/comment/46912044
has body: I'm using PouchDB which is async and i'm new to async.. So if i get a Doc from pouchdb i have to use .then to see the actual result. Thats clear for me, but do i have to call .then every single time i want this value? For example i made a SettingsService where i can store my settings key / value style. // Get Setting settingsService.get = function(key) { return settingDB.get(key).catch(function (err) { console.log(err); }); }; When i wanna get the setting do i have to make every time this big .then block? // Get Time of Last Sync settingsService.get('lastSync').then(function (setting) { $scope.lastSync = setting.value; // now it's assigned isn't it? console.log(setting); }); //edit, but this is still is undefined.. so again use then? console.log($scope.lastSync); Now what if i want the same setting again little bit later in the code, do i everytime to repeat this .then stuff?
type: Question
has comment: http://stackoverflow.com/comment/46911433
has comment: http://stackoverflow.com/comment/46911381
accepted answer: http://stackoverflow.com/a/29364319
has title: beginner asynchronus JS - do i ever have to use "then" every time i want the value
score: 0
has comment: http://stackoverflow.com/comment/46911687
answer count: 1

http://stackoverflow.com/comment/46874163
type: Comment
comment on: http://stackoverflow.com/a/29343844
has text: Eg, i have another variable myvar=5 beside mylist. How would I access it inside?
type: AnswerComment
score: 0

http://stackoverflow.com/q/29287304
tagged with: jquery
score: 0
has answer: http://stackoverflow.com/a/29287499
has title: jquery restrict only < and > symbol in textbox
has comment: http://stackoverflow.com/comment/46772649
has answer: http://stackoverflow.com/a/29287468
type: UnansweredQuestion
has body: Code: $j("#&lt;%= txtGradingScale.ClientID%&gt;").bind("keypress", function (e) { var keyed = $j(this).val(); $j("#&lt;%= txtGradingScale.ClientID%&gt;").html (keyed.replace(/\&lt;&gt;/gi, '')); }); Have to restrict greter than and lesser than symbol in textbox while entering . above code is not working pls suggest the method .i tried keyCode and Charcode but it's not working
type: Question
answer count: 2
tagged with: javascript

http://stackoverflow.com/q/29281012
type: AnsweredQuestion
type: Question
has body: I have two different pages that need to use Isotope for a masonry layout. My current code controls one page... $(function(){ var $container = $('#photo-container'); $container.imagesLoaded( function(){ $container.isotope({ itemSelector : '.photo-item', masonry: { columnWidth: 380, isFitWidth: true } }); }); I need to add a second instance of the function for another page where the selectors are "#blog-container" and ".blog-item" (instead of #photo-container/.photo-item) I don't know how to write all this in one function so i can use isotope on two different pages. Any help appreciated.
score: 0
has answer: http://stackoverflow.com/a/29293165
answer count: 1
tagged with: javascript
tagged with: jquery-isotope
tagged with: jquery
has title: Jquery Isotope on two different pages with different target divs
accepted answer: http://stackoverflow.com/a/29293165

http://stackoverflow.com/comment/46810426
comment on: http://stackoverflow.com/q/29285286
has text: When you talk about the oauth extension sample are you talking about this https://developer.chrome.com/extensions/tut_oauth?
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/a/29347338
answers question: http://stackoverflow.com/q/29346736
has body: This is the expected behaviour and the asynchronous nature of how browsers work. The reason for this is because your browser does not wait after a server response before executing the next line of code. You can witness this when loading a webpage: you can start reading the text before the images are even shown sometimes. The code that executes in updateViewRangeControl (and expects fully loaded stores I assume) has to be ran in the load listener of your store, that is loaded in newEditorRequest. Check this out.
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29346736
type: Answer
has comment: http://stackoverflow.com/comment/46887621

http://stackoverflow.com/a/29370092
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/29368603
has body: Here this should do it for you: http://jsbin.com/rehaqifoca/1/edit?js,console var re = /([^.]+\.)?([^\.]+\..+)/; var str = 'subdomain.domain.co.uk'; var m = str.match(re); if (m.length &gt; 2) console.log(m[2]);
upvote count: 1
type: Answer

http://stackoverflow.com/comment/46915242
type: QuestionComment
comment on: http://stackoverflow.com/q/29364326
score: 0
has text: It should "just" work, since Iterm2 sets `TERM` to `xterm` by default, and that is what chalk checks for - see source https://github.com/sindresorhus/supports-color/blob/master/index.js
type: Comment

http://stackoverflow.com/q/29219813
answer count: 1
downvote count: 0
favorite count: 0
tagged with: angularjs
upvote count: 2
type: UnansweredQuestion
has body: I am trying to generate Excel (.xls) files from an AngularJS app using DocRaptor. I keep getting the following error, when trying just the simple POST request as described in DocRaptor's Getting Started documentation. Their documentation claims they support CORS requests. Any help will be greatly appreciated. Error Message in Chrome: OPTIONS https://docraptor.com/docs?user_credentials=my-api-key XMLHttpRequest cannot load https://docraptor.com/docs user_credentials=my-api-key. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8000' is therefore not allowed access. The response had HTTP status code 404. Here's the JavaScript code in my AngularJS controller: var forDocRaptor = { "doc" : { "test": true, "document_type": "pdf", //Just trying simple pdf for now "name": "adoc.pdf", "document_content": ' PDF generation test ', "strict": "none", "javascript": true, "tag": "tag", "async": false } } $scope.exportToExcel = function() { $http.post('https://docraptor.com/docs?user_credentials=my-api-key', forDocRaptor) .success(function(res) { console.log(res) }); }
has answer: http://stackoverflow.com/a/29775438
has title: Using DocRaptor web service with AngularJS?
type: Question
tagged with: javascript
score: 2

http://stackoverflow.com/comment/46721998
comment on: http://stackoverflow.com/a/29257886
type: AnswerComment
has text: The point is I have an Excel file with 4 different sheets and different prices. In sum 820. So I wrote a VBA Code to make another table. This sheet into xml data. I thought it is much easier if there are some price changes. Just make a "klick" and all datas will be changed. Export into xml and upload into web folder! I do not know how todo this all using JSON :/
score: 0
type: Comment

http://stackoverflow.com/q/29304502
tagged with: javascript
has answer: http://stackoverflow.com/a/29307832
has comment: http://stackoverflow.com/comment/46803460
has comment: http://stackoverflow.com/comment/46803786
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29307832
has comment: http://stackoverflow.com/comment/46803638
type: Question
has body: I have performed this action within a .js file without issue and I am wondering if I have to do something a little different from a .cshtml because I can't seem to find any other reason this is failing. Here is my js within my .cshtml file: mergeBtn.onclick = function (e) { e.preventDefault(); var url = '/api/publicpatron/student-no-validation?studentNo=' + studentNo.value; $.getJSON(url) .done(function (json) { if (json.errors) { toastr.error(json.message, '', { timeOut: 0, extendedTimeOut: 0 }) } else { //do something } }) .fail(function (jqxhr, textStatus, error) { var err = textStatus = ', ' + error; toastr.error(err, '', { timeOut: 0, extendedTimeOut: 0 }) }) } The code in the controller doesn't seem to be the issue as it never gets to the controller, I have verified I have the controller file name and function name correct in my URL. Any suggestions? Is this not possible from within a .cshtml file?? UPDATE: Here is the controller: file name: PublicPatronController [Authorize(Roles = "my-roles")] [ActionName("student-no-validation")] public dynamic IsStudentNoValid([FromUri] string studentNo) { dynamic results = new ExpandoObject(); if (studentNo == null) { results.error = true; results.message = "Invalid Student Number"; return results; } using (ADRoutineEntities db = new ADRoutineEntities()) { var exists = db.UserLinkages.Any(x =&gt; x.StudentNo == studentNo); if (!exists) { results.errors = true; results.message = string.Format("Student number {0} does not exist", studentNo); return results; } } results.ok = true; return results; } UPDATE 2: It does appear to be related to the controller somehow. I changed the url to a different apicontroller I use elsewhere and it worked fine. The issue seems to be related to the name of the apicontroller. When I change it to the name of an existing apicontroller but keep the actionname the same it works. Why would that be???
has title: Call Controller from .cshtml via getJSON
tagged with: razor
has comment: http://stackoverflow.com/comment/46803987
score: 0
tagged with: http://stackoverflow.com/tag/json
answer count: 1
has comment: http://stackoverflow.com/comment/46803727
tagged with: c#
tagged with: asp.net-mvc

http://stackoverflow.com/q/29361871
type: Question
has title: javascript - merging functions
has answer: http://stackoverflow.com/a/29414518
tagged with: javascript
has body: How can i integrate these functions into 1 single function so that i need not run them in each screens or script files of my project?? I have a function call in perspective script files.But nw i hv to integrate the function body into 1 single and put it inside a COMMON scrpit file that holds good fr all screens of my project... appzillon.app.currencyConversion = function() { var curData = appzillon.data.scrdata.Deposits; $.each(curData, function(i, obj) { var Amt = Number(obj.Amount); obj.Amount = (Number(Amt) * 1.490); }); appzillon.data.loadData(null); }; appzillon.app.currencyConversion = function() { var curData = appzillon.data.scrdata.Investments; $.each(curData, function(i, obj) { var Amt = Number(obj.Amount); obj.Amount = (Number(Amt) * 1.490); }); appzillon.data.loadData(null); }; appzillon.app.currencyConversion = function() { var curData = appzillon.data.scrdata.AccountDetails; $.each(curData, function(i, obj) { var Amt = Number(obj.Balance); obj.Balance = (Number(Amt) * 1.490); }); appzillon.data.loadData(null); }; appzillon.app.currencyConversion = function() { var curData = appzillon.data.scrdata.Accounts; $.each(curData, function(i, obj) { var Amt = Number(obj.Balance); obj.Balance = (Number(Amt) * 1.490); }); appzillon.data.loadData(null); }; appzillon.app.currencyConversion = function() { var curData = appzillon.data.scrdata.AccountDetails; $.each(curData, function(i, obj) { var Amt = Number(obj.LoanAmount); obj.LoanAmount = (Number(Amt) * 1.490); }); appzillon.data.loadData(null); };
score: 0
answer count: 2
tagged with: functional-programming
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/34395937
upvote count: 1
has comment: http://stackoverflow.com/comment/47003070
downvote count: 1

http://stackoverflow.com/comment/120713595
has text: Not particularly relevant anymore but was it acceptable to use for...in with non-enumerables before ES6? Found some old code that uses it like that, just curious really
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29286412

http://stackoverflow.com/comment/46740921
has text: ` `
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29269858
score: 1

http://stackoverflow.com/comment/46830038
score: 0
type: Comment
type: QuestionComment
has text: And @LShetty I think I just copied my structure wrong so I edited the id part of the feed_div out. It works fine and everything does exactly what it should. The only thing wrong with it is that after the for loop iterates through the first object in the array, the .prepend function prepends each object to the second position on the page instead of the first. So, the order is fine EXCEPT the order is: oldest, newest, new, old, older, oldest. It pins the first object in the array at the top and everything else under that is fine
comment on: http://stackoverflow.com/q/29315090

http://stackoverflow.com/q/29239400
linked to: http://stackoverflow.com/q/14028959
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has body: I am not sure what I did wrong. I am trying to make the first column display in my dropdown box but I keep generating an error. Can anyone see what I did wrong? Untitled Document
duplicate of: http://stackoverflow.com/q/14028959
has title: I keep getting an error Uncaught TypeError: Cannot read property 'option' of null
has comment: http://stackoverflow.com/comment/46685387
has answer: http://stackoverflow.com/a/29240766
downvote count: 1
type: Question
answer count: 2
upvote count: 0
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/46687468
has answer: http://stackoverflow.com/a/29240819
favorite count: 0

http://stackoverflow.com/q/29326211
upvote count: 2
type: UnansweredQuestion
tagged with: package
has answer: http://stackoverflow.com/a/29326263
tagged with: node.js
has comment: http://stackoverflow.com/comment/46843024
has body: I am trying to build a natural language processing bot using javascript and jQuery for the logic and node and express as the framework. I discovered a natural language processing facility that would be extremely useful for my project https://github.com/NaturalNode/natural unfortunately the documentation is sparse and I have only been using node for a couple of weeks. This is the code I have on my server side app.js var natural = require('natural'), tokenizer = new natural.WordTokenizer(); stemmer.attach(); var express = require("express"); app = express(); app.set("view engine", "ejs"); app.use(express.static(__dirname + '/public')); I am requiring the 'natural' module here but I am unable to use the methods that are outlined in the documentation. var natural = require('natural'), tokenizer = new natural.WordTokenizer(); console.log(tokenizer.tokenize("your dog has fleas.")); // [ 'your', 'dog', 'has', 'fleas' ] The method 'tokenizer' is undefined. I have done quite a bit of research on this and looked into using module.export and passing variables through the app.get function for the index.ejs page I am using but I have been unsuccessful so far. NOTE: The javascript file I am trying to use these methods in is located in the public/javascript directory while the app.js file is located in the main project directory. I have tried to require the 'natural' package directly in the javascript file I am trying to use the methods in but an error was thrown saying require is an undefined method. here is the package.json file: { "name": "JSAIN", "version": "1.0.0", "description": "", "main": "app.js", "scripts": { "test": "echo \"Error: no test specified\" &amp;&amp; exit 1" }, "author": "", "license": "ISC", "dependencies": { "ejs": "^2.3.1", "express": "^4.12.3", "natural": "^0.2.1", "underscore": "^1.8.2" } }
type: Question
has answer: http://stackoverflow.com/a/29326566
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
answer count: 3
tagged with: module
has answer: http://stackoverflow.com/a/29326471
has title: How do I require a node module in my client side javascript?
has comment: http://stackoverflow.com/comment/46842847
score: 2

http://stackoverflow.com/comment/46705497
has text: have you tried it using the for-in loop instead of the $.each function?
type: Comment
comment on: http://stackoverflow.com/a/29250219
score: 0
type: AnswerComment

http://stackoverflow.com/comment/46701731
has text: @Mahesh that is based on columns but I do not have any column here.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29246769

http://stackoverflow.com/comment/46975004
comment on: http://stackoverflow.com/a/29380101
score: 0
type: AnswerComment
type: Comment
has text: @user3687622 I believe this is out of scope for this question. I would suggest open a new question. It's pretty straight forward as shown in the answer. In the new question you could include the code you have problems with.

http://stackoverflow.com/a/29350570
answers question: http://stackoverflow.com/q/29291557
score: 0
has body: try to set your method static: [WebMethod] [ System.Web.Script.Services.ScriptMethodAttribute()] //[ScriptMethod(UseHttpGet = true, ResponseFormat = ResponseFormat.Xml)] public static string [] GetList() { return bl.Context.Items.Select(i=&gt;i.Name).ToArray(); }
type: Answer

http://stackoverflow.com/comment/46872639
score: 1
type: AnswerComment
has text: @SirWill: .fail I took from the documentation which you only pointed out. It will crash as you are just logging the error and not respawning the process. The link which i gave in the error, gives you a way to respawn the process. To respawn you can always used forever module
comment on: http://stackoverflow.com/a/29340453
type: Comment

http://stackoverflow.com/q/29240160
has answer: http://stackoverflow.com/a/29302909
tagged with: javascript
score: 0
answer count: 2
has title: Android button as WebView click link for Logout (or delete sessionId)
accepted answer: http://stackoverflow.com/a/29302909
tagged with: android
has answer: http://stackoverflow.com/a/29240235
type: AnsweredQuestion
tagged with: android-webview
has body: In my WebView android, I want the user to logout on button click or any other way. I don't want to show any webpage after clicking that button. After that app should auto-exit(System.exit(0) will do that) Click I want to send is: http://192.100.1.1:10000/app?service=direct/1/UserSummary/$UserBorder.logoutLink What's the best way of doing this?
possible better answer: http://stackoverflow.com/a/29240235
type: Question

http://stackoverflow.com/q/29372632
has title: replace all special character in string javascript....?
type: Question
has answer: http://stackoverflow.com/a/29372902
tagged with: javascript
upvote count: 2
has body: Why this does not replace ? code: var str = "fq$team$456$$$$fq$plrs$4789"; if(str.indexOf("$$$$")&gt;=0){ str = str.replace("$$$$","$$"); } // gives fq$team$456$fq$plrs$4789 // expected output = fq$team$456$$fq$plrs$4789
accepted answer: http://stackoverflow.com/a/29372844
answer count: 3
has answer: http://stackoverflow.com/a/29372855
has comment: http://stackoverflow.com/comment/46926242
favorite count: 0
has comment: http://stackoverflow.com/comment/46926553
has answer: http://stackoverflow.com/a/29372844
score: 2
type: AnsweredQuestion
downvote count: 0
possible better answer: http://stackoverflow.com/a/29372855

http://stackoverflow.com/q/29264911
tagged with: smalltalk
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/46732452
has body: Recently I started reading about Smalltalk and its way of development and I was quite impressed. I was wondering whether there is some sort of library that makes possible the same way of development in JavaScript. I found some libraries but they just reload the page or restarts a running node.js server. I'm interested in both client side and server side JavaScript libraries. Amber Smalltalk is nice but I'm looking for a way to do the same in JS. Edit: I'm looking for some sort of live editing of objects and prototypes and saving the changes to a file, or changing the contents of a file and the added methods are propagated to a running page or server. All this placed in an IDE similar to that of Pharo. What I found is that Meteor and Brackets support some kind of this functionality (live editing going from a source file to a browser).
tagged with: javascript
has answer: http://stackoverflow.com/a/29265265
has answer: http://stackoverflow.com/a/29274252
upvote count: 4
has comment: http://stackoverflow.com/comment/46731897
has answer: http://stackoverflow.com/a/29265688
favorite count: 0
type: UnansweredQuestion
answer count: 4
has answer: http://stackoverflow.com/a/29265581
score: 3
has title: JavaScript equivalent to Smalltalk development cycle

http://stackoverflow.com/a/29346711
accepted answer of: http://stackoverflow.com/q/29346528
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 1
answers question: http://stackoverflow.com/q/29346528
upvote count: 1
has body: You can provide a "replacer" function with special logic for your object type. Check out the docs here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#The_replacer_parameter An example from their docs: function replacer(key, value) { if (typeof value === "string") { return undefined; } return value; } var foo = {foundation: "Mozilla", model: "box", week: 45, transport: "car", month: 7}; var jsonString = JSON.stringify(foo, replacer);

http://stackoverflow.com/a/29904098
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/29368015
answers question: http://stackoverflow.com/q/29368015
has body: I found a very good solution to list all the global variables with the jsl command line tool: Here is the documentation I just have to put /*jsl:option explicit*/ into each file that I want to check. Then it is enough to run ./jsl -process &lt;someFile&gt; | grep 'undeclared identifier' It is also possible to use referenceFile that contains some intentional global variables /*jsl:import &lt;referenceFile&gt;*/ so these variables will not be listed.
score: 0

http://stackoverflow.com/comment/46695950
comment on: http://stackoverflow.com/a/29245096
score: 1
type: AnswerComment
has text: Your code definitely works, but I'm trying to avoid defining a bunch of functions outside of the dictionary scope though. I could just use the code I already have otherwise. Unfortunately the code I'm working with is quite a bit more complicated than the example, and I couldn't really define a bunch of functions without quickly making the code unreadable.
type: Comment

http://stackoverflow.com/comment/46693258
has text: so do i need to call only select in html ?
comment on: http://stackoverflow.com/a/29243665
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/29300356
has body: So, I guess there's actually two possible problems there. You are not returning the result of output.send T.rec(function(output) { //... composition here, full at: http://mohayonao.github.io/timbre.js/RecordingMode.html return output.send(synth); } This will enable the next handler on the promise chain to actually get the buffer value (if it indeed is returned synchronously by send). Can T.rec run in parallel? Do you want to record 5 songs at the same time? You should probably wait for one song to complete before recording the next. function generate() { var songtitle = generateSongTitle(); var songobject = generateSong(songtitle); return songobject; } var nextSong = $.when(); // or any empty promise wrapper for(var i=0;i&lt;5;i++){ nextSong = nextSong.then(generate); } This will generate 5 songs sequentially... in theory! Do tell me if it works :)
upvote count: 1
has comment: http://stackoverflow.com/comment/46860473
accepted answer of: http://stackoverflow.com/q/29258046
answers question: http://stackoverflow.com/q/29258046
type: AcceptedAnswer
downvote count: 0
score: 1
type: Answer

http://stackoverflow.com/comment/46797053
comment on: http://stackoverflow.com/a/29300868
has text: The $.getScript looks like it might do the trick, except for this being an angular app and the page being an anchor in the same page. getScript doesn't do a full load for links such as these. The page I am currently on is `http://localhost/app#!/foo/bar` and the page I want to get and run is `http://localhost/app#!/foo/bar/baz/123`
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/46772392
type: Comment
score: 2
type: AnswerComment
has text: needs something like `$("#errorText_"+id).html(data.["errorText_"+id]);`
comment on: http://stackoverflow.com/a/29287547

http://stackoverflow.com/a/29337594
has body: It seems like you already have a &lt;div&gt; inside the element with an ID of d3-sizemap-hr. The reason this is a problem is that you are only populating elements in the .enter() state, which will not occur for the existing div. I have the following recommendations: Always have a unique class for your dynamically added elements with D3 Have the minimum possible for the .enter() state, such as your .append() and then any other static styles that don't ever vary based on the data changing. Everything else goes in the update state.
accepted answer of: http://stackoverflow.com/q/29337471
answers question: http://stackoverflow.com/q/29337471
has comment: http://stackoverflow.com/comment/46863393
upvote count: 4
has comment: http://stackoverflow.com/comment/46864341
type: AcceptedAnswer
downvote count: 0
score: 4
has comment: http://stackoverflow.com/comment/46863417
type: Answer

http://stackoverflow.com/q/29366454
tagged with: javascript
score: 0
has body: I have created an application with two child object controller and a parent array controller. The route is also described in the same way. var App = Ember.Application.create({ LOG_TRANSITIONS: true }); App.Router.extend(function() { this.resource('parent', function() { this.route('child1', { path: '/' }); this.route('child2'); }); }); var ParenteRoute = Ember.Route.extend({ model: function() { //Got my model from here. }; }); var Child1Route = Ember.Route.extend({ model: function(){ return Ember.$.ajax('dummyUrl.com'); }, action:{ refreshData: function(){ var controller = this.controllerFor('parent.child1'); return Ember.$.ajax('dummyUrl.com').then(function(response){ return controller.send('updateModel' response); }); } } }); var ParentController = Ember.ArrayController.extend({ getFirstName: function() { return this.get('model').get('firstName'); }, getLastName: function() { return this.get('model').get('lastName'); } }); var Child1Controller = Ember.ObjectController.extend({ needs: ['ParentController'], getName: function() { return this.get('controllers.ParentController.getFirstName') }, updateName: function() { this.send('refreshData'); }.observes('controllers.ParentController.getLastName'), actions: { updateModel: function(response) { this.set('getName', response); } } }); var Child2Controller = Ember.ObjectController.extend({ needs: ['ParentController'], getFirstName: Ember.computed.alias('controllers.ParentController.getFirstName') }); &lt;!--Parent Template--!&gt; &lt;div&gt; &lt;input type='text' {{bind-attr value=getFirstName}}&gt; &lt;input type='text' {{bind-attr value=getLastName}}&gt; &lt;/div&gt; {{#link-to 'parent.child1'}}child1{{/link-to}} {{#link-to 'parent.child2'}}child2{{/link-to}} {{outlet}} &lt;!--child1 template--!&gt; &lt;div&gt; {{getName}} &lt;/div&gt; &lt;!--child2 template--!&gt; &lt;div&gt; {{getFirstName}} &lt;/div&gt; So the problem with the above code is that when I am in the index of parent controller then on change of getLastName …
tagged with: ember.js
answer count: 1
tagged with: ember-cli
type: UnansweredQuestion
has title: Ember: When child controllers are observing same property of Parent controller firing request simultaneously
has answer: http://stackoverflow.com/a/29370452
has comment: http://stackoverflow.com/comment/46919965
has comment: http://stackoverflow.com/comment/46918022
type: Question
has comment: http://stackoverflow.com/comment/46919830

http://stackoverflow.com/a/29349285
answers question: http://stackoverflow.com/q/29349235
type: Answer
upvote count: 6
score: 6
has body: It's used in the test to see if you have reached the end of the loop or not (the second part of the for statement).
downvote count: 0

http://stackoverflow.com/q/29302507
has comment: http://stackoverflow.com/comment/46799685
has comment: http://stackoverflow.com/comment/46799650
has comment: http://stackoverflow.com/comment/46799543
answer count: 1
has comment: http://stackoverflow.com/comment/46799644
favorite count: 0
has title: How do i stop my webpage from refreshing when i change the style:display of a div in JS?
has answer: http://stackoverflow.com/a/29302656
has comment: http://stackoverflow.com/comment/46799577
accepted answer: http://stackoverflow.com/a/29302656
downvote count: 1
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46799539
score: -1
has body: This is my piece of code that changes the style.display of my div: if (aBoolean &amp;&amp; bBoolean &amp;&amp; cBoolean) { document.getElementById("SubmitArea").style.display = block; } When this line of code fires it refreshes my webpage somehow, I dont know if that is suppose to happen or not. If it is how can I prevent it from doing so? And if it isn't what could be the cause of the refreshing? I am using asp.net with C#.
type: Question
has comment: http://stackoverflow.com/comment/46799628
tagged with: c#
upvote count: 0
tagged with: javascript
tagged with: show-hide

http://stackoverflow.com/q/29352971
has title: Canvas transform on cloth simulation + image
has answer: http://stackoverflow.com/a/29365798
type: AnsweredQuestion
has body: I'm using the verlet.js plugin in order create a cloth simulation on canvas with a texture image. The only thing (and the most important BTW) part that I haven't arrived is that I need skew the drawImage in order to make it fit the correct position. jsfiddle with the progress //Drawing the rectangle ctx.save(); ctx.beginPath(); ctx.moveTo(cloth.particles[i1].pos.x, cloth.particles[i1].pos.y); ctx.lineTo(cloth.particles[i1+1].pos.x, cloth.particles[i1+1].pos.y); ctx.lineTo(cloth.particles[i2].pos.x, cloth.particles[i2].pos.y); ctx.lineTo(cloth.particles[i2-1].pos.x, cloth.particles[i2-1].pos.y); ctx.lineTo(cloth.particles[i1].pos.x, cloth.particles[i1].pos.y); ctx.strokeStyle = "#fff"; ctx.stroke(); ctx.restore(); //Wrapping the image ctx.save(); var off = cloth.particles[i2].pos.x - cloth.particles[i1].pos.x; //THIS IS WHAT I TRY TO SOLVE TO FIT TO THE RECTANGLES //ctx.transform(1,0.5,0,1,0,0); ctx.drawImage(img, cloth.particles[i1].pos.x,cloth.particles[i1].pos.y, off, off, cloth.particles[i1].pos.x,cloth.particles[i1].pos.y, off ,off); ctx.restore(); } I have tried to adapt other cloth simulations but without success. Any clue where I could find some info to accomplish that?
tagged with: skew
has comment: http://stackoverflow.com/comment/46893705
accepted answer: http://stackoverflow.com/a/29365798
type: Question
tagged with: canvas
tagged with: javascript
score: 0
tagged with: html5-canvas
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/46892462

http://stackoverflow.com/a/29292252
has body: Learn to read the documentation and check your client side for errors (usually F12 in your browser and check the Console tab). It will save you from asking a question that can be answered in under a minute. The correct way is $(document).ready(function() { alert("HelloWorld"); }); Notice the lower case "d"? And the number of curly braces and parentheses are balanced. The shorthand equivalent for this is... $(function() { alert("HelloWorld"); });
downvote count: 1
answers question: http://stackoverflow.com/q/29292230
score: -1
upvote count: 0
type: Answer

http://stackoverflow.com/a/29372734
upvote count: 1
has body: Please see if it help for you.please use the 'label' property in your json object which the Autocompleter uses to find matches [{"ID":1,"Name":"david","label":"david"},{"ID":2,"Name":"Paul","label":"Paul"}]
type: Answer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/29371436

http://stackoverflow.com/q/29357891
has body: Is there anyway to send a UDP packet to a local port (and receive UDP packets from a local port) with Javascript? I don't want to have to run node.js, although there is a datagram object there. I'm using IE, so can't use the Mozsockets or chrome.udp.sockets objects. Could I host a swf in an iFrame and use flash to send from javascript (via Flash) to a local port, for example? That's the only think of so far.
answer count: 1
has answer: http://stackoverflow.com/a/29500518
accepted answer: http://stackoverflow.com/a/29500518
favorite count: 0
has title: UDP in Javascript for interprocess communication on localhost
tagged with: sockets
has comment: http://stackoverflow.com/comment/47090846
score: 2
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/18799364
downvote count: 0
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/47068325
has comment: http://stackoverflow.com/comment/47035487
upvote count: 2
tagged with: udp

http://stackoverflow.com/comment/46841460
type: Comment
has text: But it's worth noting that `for (; i--;)` is not the same as `for(;i!=0; i--)` because in the former case the `i--` is executed the first time you enter the loop whereas in the latter the `i--` is only executed at the end of each iteration.
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/29316418

http://stackoverflow.com/a/29324552
has body: You could accomplish the same thing using css. It is rotating 360 degrees, because fa-rotate-270 is already rotated 270 degrees. Snippet below: $(document).ready(function() { $('.th-ho').mouseenter(function() { $('.fa-thumbs-o-up').addClass('onhover'); }); $('.th-ho').mouseleave(function() { $('.fa-thumbs-o-up').removeClass('onhover'); }); }); .fa-thumbs-o-up.onhover { -ms-transform: rotate(360deg); /* IE 9 */ -webkit-transform: rotate(360deg); /* Chrome, Safari, Opera */ transform: rotate(360deg); } .fa-thumbs-o-up { -moz-transition: all 1s linear; /* Firefox */ -webkit-transition: all 1s linear; /* WebKit */ -o-transition: all 1s linear; /* Opera */ transition: all 1s linear; } Leistungen
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29323970
type: Answer
answers question: http://stackoverflow.com/q/29323970
score: 2
upvote count: 2

http://stackoverflow.com/q/29231249
answer count: 4
has title: PHP JS submit button
has body: I need to develop a submit button with js but as I have a register and a login bn on the same page So, when I press the register, it goes fine but if I press the login, the login uses the register files for example. &lt;form name="as" method="POST" action="loginpro.php"&gt; Username: &lt;input type="text" name="username" /&gt; &lt;br /&gt; &lt;br /&gt; Password: &lt;input type="password" name="password" /&gt; &lt;br /&gt; &lt;br /&gt; &lt;input style="font-size: 17px" type=button onClick="submitform()" value="Submit"/&gt; &lt;/form&gt; This is the code that I am using to make the login form and as you can see I call a file with the name loginpro.php where I have the php settings to ask the db the files that I need but when I execute it he is calling regpro.php that is the file that I am using for register take a look. &lt;form name="register" method="POST" action="regpro.php"&gt; Username: &lt;input type="text" name="username" /&gt; &lt;br /&gt; &lt;br /&gt; Email: &lt;input type="text" name="Email" /&gt; &lt;br /&gt; &lt;br /&gt; First Name: &lt;input type="text" name="fname" /&gt; &lt;br /&gt; &lt;br /&gt; Last Name: &lt;input type="text" name="lname" /&gt; &lt;br /&gt; &lt;br /&gt; Password: &lt;input type="password" name="password" /&gt; &lt;br /&gt; &lt;br /&gt; &lt;input style="font-size: 11px" type=button onClick="submitform()" value="Submit"/&gt; &lt;/form&gt;
has answer: http://stackoverflow.com/a/29231409
tagged with: forms
has comment: http://stackoverflow.com/comment/46668903
type: Question
has comment: http://stackoverflow.com/comment/46668949
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46669629
has answer: http://stackoverflow.com/a/29232004
score: 0
has answer: http://stackoverflow.com/a/29232244
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46668907
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29232370
tagged with: php

http://stackoverflow.com/a/29374436
has comment: http://stackoverflow.com/comment/46964655
downvote count: 0
has body: Check Stack Overflow first, like this for example: Existing Answer Link And to answer your question, console.log(functionName.toString());
type: Answer
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/29309154

http://stackoverflow.com/q/29363590
has comment: http://stackoverflow.com/comment/46910880
answer count: 2
has body: Have a basic angular app, HTML {{d.name}} {{d.description}} {{d.loremipsum}} JS: var app = angular.module('app', []); app.controller("mc", function($scope){ $scope.data = [{ 'name': 'asd', 'description': 'jiocioasdiasidjpoasdko', 'loremipsum': 'loremipsum' }, { 'name': 'qwe', 'description': 'poqwpeqwpe', 'loremipsum': 'loremipsum' }, { 'name': 'czxc', 'description': 'asdasdasd', 'loremipsum': 'loremipsum' }] }); I want to be able to search by both name and description, but not by loremipsum How can I do this? Example on JS BIN
downvote count: 0
tagged with: javascript
has title: Adding strict search to multiple fields with a single textbox
score: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/46910854
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/29363798
has comment: http://stackoverflow.com/comment/46910895
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29363795
has answer: http://stackoverflow.com/a/29363795
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/29363798

http://stackoverflow.com/q/29257183
has answer: http://stackoverflow.com/a/29257312
has title: AJAX: How to load an internal webpage on initial load?
answer count: 4
type: AnsweredQuestion
downvote count: 0
has comment: http://stackoverflow.com/comment/46717107
has answer: http://stackoverflow.com/a/29257295
type: Question
accepted answer: http://stackoverflow.com/a/29257434
has comment: http://stackoverflow.com/comment/46717066
score: 1
possible better answer: http://stackoverflow.com/a/29257295
has answer: http://stackoverflow.com/a/29257414
has body: I have my code for loading the pages into a Div. But how do I get it to load an internal page on the initial load. So when the website first loads it is not just a blank page. But "pages/index.php" will load inside the content area(apDiv2) instead of it being an empty blank page. $('.menu_nav').click(function() { var href = $(this).attr('href'); // I Assume that /loading.gif is the url to your gif file $('#apDiv2').empty().append($('&lt;img src="img/loader1.GIF" /&gt;')); $.ajax({ method: 'GET', url: href, success: function(content) { $('#apDiv2').html (content); } }); return false; });
has answer: http://stackoverflow.com/a/29257434
upvote count: 1
tagged with: javascript
favorite count: 0
tagged with: ajax

http://stackoverflow.com/q/29283336
downvote count: 0
tagged with: javascript
tagged with: webpack-style-loader
favorite count: 0
has title: webpack style-loader - import different styles on react components without overriding
has body: I have 2 React components which require styles inside: product list: import './list.css'; import React from 'react'; export default class List extends React.Component { ... } product details: import './details.css'; import React from 'react'; export default class Details extends React.Component { ... } And they have different styles which override one another, for simplicity lets assume it's background-color property on body: list.css body { background-color: #ddd; } details.css body { background-color: #f80; } What is actually happening - styles are kept on the page for both of the elements when bundled by webpack's style-loader: &lt;style type="text/css"&gt; body { background-color: #ddd; } body { background-color: #f80; } &lt;/style&gt; webpack configuration for loader: ... { test: /\.css$/, loader: 'style?singleton!css!cssnext' } That means that detail's style are active on list page as well. What's is the best strategy to keep them different? Is there a way for styles to be replaced?
type: UnansweredQuestion
score: 1
upvote count: 1
tagged with: styles
type: Question
has answer: http://stackoverflow.com/a/34940321
has answer: http://stackoverflow.com/a/37915712
tagged with: reactjs
answer count: 2
tagged with: webpack

http://stackoverflow.com/a/29372963
has comment: http://stackoverflow.com/comment/46926950
type: Answer
upvote count: 3
score: 3
answers question: http://stackoverflow.com/q/29367781
has body: a solution without javascript would be: http://jsfiddle.net/vsync/qu0q8qgc/ This is the default text CSS .tArea{ font:20px/1.2 arial; border:1px solid #CCC; padding:1em; margin:1em; height:5em; overflow:auto; &::before{ content:attr(data-fixedtitle); color:red; } > span{ float:left; color:red; } > p{ margin:0; padding:0; } }
downvote count: 0

http://stackoverflow.com/a/37308143
has body: I created this little function that helped me do more tricks with variable width elements inside a flex parent container, hope it helps some of the people that hit this thread, jquery selectors are not performance-wise written so modify as per your needs: function setFlexClasses(parent_selector) { //set parent jquery obj parent = $(parent_selector); //remove classes: flex-position-* , flex-row-* parent.find(' &gt; div').removeClass (function (index, css) { return (css.match (/(^|\s)(flex-position-.*|flex-row-.*)\S+/g) || []).join(' '); }); //set helper classes for first and last element of this "list" parent.find(' &gt; div:first-child').addClass('flex-position-first'); parent.find(' &gt; div:last-child').addClass('flex-position-last'); //initialize positioning variables var parent_offset = parent.offset(); var max_vertical_space = 0; var row_count = 0; //for each element in the query parent.find(' &gt; div').each(function (index) { //get element metrics var element_metrics = $(this).offset(); element_metrics.top -= parent_offset.top; element_metrics.left -= parent_offset.left; element_metrics.height = $(this).height(); element_metrics.vertical_space = element_metrics.height + element_metrics.top; //increment row_count if element is below previous elements and set helper classes for row[first|last] if(element_metrics.top &gt; max_vertical_space) { $(this).addClass('flex-position-rowfirst'); $(this).prev().addClass('flex-position-rowlast'); row_count++; } //reset max_vertical_space if needed if(element_metrics.vertical_space &gt; max_vertical_space) { max_vertical_space = element_metrics.vertical_space; } // $(this).addClass('flex-row-' + row_count); }); }
score: 3
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/29240498
upvote count: 3

http://stackoverflow.com/q/29344403
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/46875531
favorite count: 0
downvote count: 1
has answer: http://stackoverflow.com/a/29344454
accepted answer: http://stackoverflow.com/a/29344454
tagged with: escaping
type: AnsweredQuestion
score: -1
has body: i have a problem for link with escape... var linkregion= ''+'Description of Reg: '+numeroReg+''; document.getElementById('linkreg').innerHTML = linkregion; numeroReg is a number But when the document is ready, at the firs of link there are: "> See the image: http://i58.tinypic.com/2enm62f.png i hope can you help me :( Thanks
type: Question
has title: link with escape-sequence html
upvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/46873691
type: Comment
has text: when I leave only in the original code, then it is ok, but if I move up one level to div, the failure comes... the Details is not open down. What can be the problem?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29342524

http://stackoverflow.com/q/29229586
favorite count: 0
score: 2
type: AnsweredQuestion
downvote count: 0
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/29229740
has title: Get all input values from table excluding first column
type: Question
has body: I want to alert the input value of each row except the first column. Here is my code. $(document).ready(function() { $("#table tr:gt(0) td:gt(0) ").each(function() { a=$(this).find('input[type="text"]').val(); alert(a); }); }); While running this code all value alerted except "bbbb". (ie,ccccc ,dddd alerted.). I only need each rows second one column onwords. fiddle: https://jsfiddle.net/k1tfo5kb/
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/29229691
upvote count: 2
answer count: 2
possible better answer: http://stackoverflow.com/a/29229740
has answer: http://stackoverflow.com/a/29229691

http://stackoverflow.com/comment/46952144
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29384368
type: AnswerComment
has text: Then it will go to next screen even it has error validations. We should validate all server validations then only we have to move to next screen

http://stackoverflow.com/a/29329829
upvote count: 1
has comment: http://stackoverflow.com/comment/46849151
accepted answer of: http://stackoverflow.com/q/29329690
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/29329690
has comment: http://stackoverflow.com/comment/46849227
score: 1
type: Answer
has body: For dynamically added datepickers best way to do it something like this instead $('body').on('focus', '.datepicker', function(){ $(this).datepicker({ dateFormat: 'dd-mm-yy' } ); }).on('click', '.datepicker', function(){ $(this).datepicker({ dateFormat: 'dd-mm-yy' } ); }); Also, you are using same id for multiple inputs. Here is a demo Hope this helps.

http://stackoverflow.com/a/29251250
accepted answer of: http://stackoverflow.com/q/29250674
score: 0
type: AcceptedAnswer
has body: simplest solution (you may want to enhance that): var date = new Date(); var day = date.getDay(); var file = day + ".swf"; var url = "someDir/" + file; var el = document.getElementById('banner'); el.src = url; http://jsfiddle.net/27ewmpsb/
has comment: http://stackoverflow.com/comment/46711276
type: Answer
answers question: http://stackoverflow.com/q/29250674

http://stackoverflow.com/comment/46647573
type: AnswerComment
has text: Thx for answer! But what I can't understand - why such companies like Mozilla, Opera etc do not move forward this "day-one" For example why such language like ClojureScript could not replace JS ?
type: Comment
comment on: http://stackoverflow.com/a/29218532
score: 0

http://stackoverflow.com/q/29291265
type: Question
has title: Radio button stopped working after conversion from ASP.NET 1.1 to ASP.Net 3.5
tagged with: c#
tagged with: javascript
has answer: http://stackoverflow.com/a/29291340
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/46779438
tagged with: asp.net
favorite count: 0
accepted answer: http://stackoverflow.com/a/29291340
has comment: http://stackoverflow.com/comment/46779694
upvote count: 1
type: AnsweredQuestion
has body: [I'm posting our problem and solution below as an FYI. If you have an official statement from Microsoft or a representative organization about this issue, I'll mark that as an answer. Otherwise, my post below will serve as the answer]. The Problem: We took a ASP.Net 1.1 program and converted it to ASP.Net 3.5. The page initially displays correctly with one radio button selected by default and a list of items ("List A"). When we clicked the other radio button, it then displayed List B correctly. When we clicked the originally selected radio button, the first list, List A, would not redisplay. The radio buttons are part of a RadioButtonList control. What we did to debug: This is for a program which resides on a company intranet. Due to it being .Net 1.1, the program is heavily targeted towards Internet Explorer - the JavaScript doesn't run on other browsers. F12 developer tools brings up the JavaScript debugging console in Internet Explorer. Attaching to the IIS 7.5 process (w3wp.exe) with Visual Studio allowed us to view C# server code errors. What we found: AutoPostBack was set to true on the RadioButtonList, which contained the List items which were radio buttons. As a result ASP.Net + C# dynamically generates the doPostBack function in the "onclick" event of the radio button. HOWEVER: no doPostBack function for the onclick was being generated for the default selected radio button. I believe this is a bug in the ASP.Net 3.5 framework and the RadioButtonList control. edit: Removing solution from question and posting as answer to avoid question closing. Thanks @Jon P for the heads-up.
score: 1

http://stackoverflow.com/comment/46857392
type: Comment
comment on: http://stackoverflow.com/a/29328315
score: 0
type: AnswerComment
has text: Hello LShetty, thanks for your help. But when drop down menu goes to straight I mean horizontal , I want it drop vertical . As you can see when I move to cursor on link ( Forex Bonus ) it first it drops then goes horizontal . I want it vertical. Hope you will help in this too...

http://stackoverflow.com/q/29333584
has comment: http://stackoverflow.com/comment/46857795
upvote count: 17
has comment: http://stackoverflow.com/comment/46858258
type: AnsweredQuestion
tagged with: bigint
score: 17
type: Question
has body: I am trying to convert the following big int to a string in javascript with no success. My goal would end up with '582235852866076672' var foo = 582235852866076672; console.log(foo); // 582235852866076700 var baz = "'" + 582235852866076672 + "'"; console.log(baz); // '582235852866076700' var emptyString = 582235852866076672+''; console.log(emptyString); // 582235852866076700 var n = foo.toString(); console.log(n); // 582235852866076700 I figured the number was too big and was loosing precision as a result. I included the bigint library with no success: var bigint = require('bigint'); var bigintLibrary = bigint(582235852866076672).toString(); console.log(bigintLibrary); //582235852866076700 The method toSting in the bigint library states: "Print out the bigint instance in the requested base as a string." I appreciate all help and comments. Thanks.
downvote count: 0
tagged with: javascript
tagged with: string
has answer: http://stackoverflow.com/a/29333607
has answer: http://stackoverflow.com/a/68490991
has title: Javascript convert bigInt to string
has comment: http://stackoverflow.com/comment/46859199
answer count: 4
has answer: http://stackoverflow.com/a/55606756
tagged with: node.js
favorite count: 0
has answer: http://stackoverflow.com/a/55359482
possible better answer: http://stackoverflow.com/a/55606756
accepted answer: http://stackoverflow.com/a/29333607

http://stackoverflow.com/a/29234460
type: Answer
answers question: http://stackoverflow.com/q/29231143
score: 0
has body: For example, if you want to use the average values of each series to compare, you could this: 1) define your data for each series in an array 2) calculate the average of your 'required' series. 3) compare the average of each other series to that average, defining the color for each series accordingly along the lines of: var requiredAvg = getAvg(requiredData); var requiredColor = 'black'; var goodColor = getAvg(goodData) &gt; requiredAvg ? 'blue' : 'red'; example: http://jsfiddle.net/jlbriggs/te2zxo88/
has comment: http://stackoverflow.com/comment/46676473
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29231143

http://stackoverflow.com/comment/46765080
score: 0
comment on: http://stackoverflow.com/q/29283632
type: Comment
type: QuestionComment
has text: Um, why don;t you check to see if it is there before appending?

http://stackoverflow.com/comment/79998568
has text: @WagnerBertoliniJunior did you find a solution? For me, I need to get the nearbySearch places' website URLs which are only in the getDetails response :(
type: Comment
comment on: http://stackoverflow.com/a/29233980
score: 0
type: AnswerComment

http://stackoverflow.com/q/29266186
tagged with: http://stackoverflow.com/tag/html
tagged with: php
has body: Okay this is going to sound strange and hard to explain but here goes... I have an AJAX call which is to be invoked when the user logs into the website, this works perfectly invoking the call through an onload call. The problem I'm having is when I refresh the page, the AJAX function is being invoked but does not actually perform the AJAX call to the server so nothing is being returned. I then have a "Home" li element which can be clicked to call the Home page (which is the page that is being displayed upon logging in) so I click this link reloading the Home page and the function again executes perfectly with no problems. Nothing is returned only when I refresh the page with the browser. Can anybody hint on why this is happening?
tagged with: refresh
downvote count: 0
answer count: 0
score: 1
type: Question
tagged with: javascript
has title: AJAX call is being invoked but does not return results onload when page refresh
upvote count: 1
favorite count: 0
tagged with: ajax
type: UnansweredQuestion

http://stackoverflow.com/comment/46826966
score: 0
type: Comment
has text: As per @user3433831 stated in the comment, you have weird character in your code. Try deleting and rewriting the entire line. Works here: https://jsfiddle.net/dxxjk6sh/1/
type: AnswerComment
comment on: http://stackoverflow.com/a/29317272

http://stackoverflow.com/a/29348032
has body: Try this DEMO FIDDLE: #myDiv { position: fixed; top: 25%; left: 25%; width: 50%; height: 50%; overflow: hidden; background: red; } #myDiv img{ width: 100% height: 100%; }
has comment: http://stackoverflow.com/comment/46882173
answers question: http://stackoverflow.com/q/29347909
score: 0
has comment: http://stackoverflow.com/comment/46882272
type: Answer
has comment: http://stackoverflow.com/comment/46886757

http://stackoverflow.com/comment/46821645
type: Comment
comment on: http://stackoverflow.com/a/29314396
score: 1
has text: Fixed, you might need to pad with 0s , if you want.
type: AnswerComment

http://stackoverflow.com/comment/46894011
type: AnswerComment
score: 0
has text: @Pluto, totally missed that. thanks! Added the code to support what I said originally.
type: Comment
comment on: http://stackoverflow.com/a/29354183

http://stackoverflow.com/comment/46958299
has text: Also if I change `window.onload = initialize;` back to `$(document).ready(function () { initialize(); });` in your fiddle and click run, [it still displays a map](http://jsfiddle.net/uL2Lshu6/1/), meaning that this line can't be the problem. (It also means that the problem isn't in the scripting itself, but somewhere in the way I've tied everything together or a setting somewhere or something - thanks for helping me to narrow that down.)
comment on: http://stackoverflow.com/a/29388253
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/46760376
comment on: http://stackoverflow.com/q/29274687
score: 0
has text: let me understand you are setting the var `$100` to `"index.html"` then testing if it is equal to `"$100"`, same question for the var `$200`.
type: QuestionComment
type: Comment

http://stackoverflow.com/q/29256282
has body: I have a web application (using AngularJS) in which users can upload a profile picture and before saving the image they can adjust they photo with some cropping tool. The issue is that when I'm uploading photos taken with an iPhone in portrait mode, all this images are rotated 90 degrees. The only way that images are uploaded correctly is if the user takes the picture in landscape mode (iPhone oriented with volume buttons pointing down). I need a solution to make this work, no matter phone orientation when taking pictures. My example
has title: Remove exif in AngularJS at upload
has comment: http://stackoverflow.com/comment/46718687
type: Question
downvote count: 0
tagged with: javascript
linked to: http://stackoverflow.com/q/20600800
tagged with: http://stackoverflow.com/tag/html
tagged with: web
has comment: http://stackoverflow.com/comment/46720800
favorite count: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/46720125
type: UnansweredQuestion
upvote count: 1
answer count: 0
score: 1

http://stackoverflow.com/comment/46923851
score: 0
type: AnswerComment
has text: Hi thanks for the reply, I tried with "application/x-www-form-urlencoded" issue still persist, with respect to events, I thought "app.use(busboy())" takes care of that?
type: Comment
comment on: http://stackoverflow.com/a/29361817

http://stackoverflow.com/q/29231631
has body: I am using kendo window with AngularJS in the following way. HTML Code JavaScript Code $scope.confirmationWindowTemplate = 'Are you sure you want to delete? This data will not be recoverable, do you want to continue ? Yes No '; I have created a model in the script in the following way $scope.createProspectDetailModel = function(data) { $scope.prospectDetail.AccountId = data.AccountId; $scope.prospectDetail.BusinessType = data.BusinessType; $scope.prospectDetail.FirstName= data.FirstName; } The above code works. With the help of debugger I can verify that the values from the data field are going into each of the $scope.prospectDetail value. However, when I change my template into $scope.confirmationWindowTemplate = 'Are you sure you want to delete {{prospectdetail.FirstName}}' It doesn't work. I also tried $scope.confirmationWindowTemplate = 'Are you sure you want to delete {{#= prospectdetail.FirstName #}}' but it doesn't work as well. I have referred this link on SO but didn't help. I have searched a lot but still cannot find the solution to this. Any help would be appreciated.
tagged with: kendo-ui
linked to: http://stackoverflow.com/q/26288918
has title: Using AngularJS code in template property of kendo window
tagged with: angularjs
has answer: http://stackoverflow.com/a/29238311
type: AnsweredQuestion
type: Question
accepted answer: http://stackoverflow.com/a/29238311
tagged with: javascript
score: 0
answer count: 1

http://stackoverflow.com/a/29485104
score: 5
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/47236312
has comment: http://stackoverflow.com/comment/54212601
has comment: http://stackoverflow.com/comment/47241098
has body: You want a way to get the user's language code. Having that, you intend to render a partial with the language code as part of the name. Angular translate module has 2 service methods of interest: $translate.use() returns the user's active language. Unfortunately, if you call the service method before the language loads to the page, you may get null. $translate.proposedLanguage() returns the "intended language" -- meaning the value you would get calling $translate.use(), but this call will succeed even if the language hasn't loaded. Having this list of language codes, you can use them to create partials for languages you intend to support. Something like &lt;div ng-include="about-{{ $translate.proposedLanguage() }}.html"&gt; &lt;/div&gt;
type: Answer
upvote count: 5
accepted answer of: http://stackoverflow.com/q/29351156
answers question: http://stackoverflow.com/q/29351156
downvote count: 0
has comment: http://stackoverflow.com/comment/47241916
has comment: http://stackoverflow.com/comment/47236116
has comment: http://stackoverflow.com/comment/47234190

http://stackoverflow.com/comment/46833883
score: 0
type: Comment
has text: Great answer, that's it, the word is "extract". There must be a way to extract everything from the div "resultado", instead of getting stuff from each span.
comment on: http://stackoverflow.com/a/29321049
type: AnswerComment

http://stackoverflow.com/q/29295733
has comment: http://stackoverflow.com/comment/46787356
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29295836
has comment: http://stackoverflow.com/comment/46787284
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29296177
accepted answer: http://stackoverflow.com/a/29296177
has comment: http://stackoverflow.com/comment/46787259
downvote count: 1
possible better answer: http://stackoverflow.com/a/29295778
has title: Jquery appendTo Duplicating content multiple times
has comment: http://stackoverflow.com/comment/46787327
type: Question
has comment: http://stackoverflow.com/comment/46787124
has comment: http://stackoverflow.com/comment/46787307
has comment: http://stackoverflow.com/comment/46787390
has comment: http://stackoverflow.com/comment/46787641
score: -1
has body: Every time I use JQuery's AppendTo(), it duplicates the items that I want appended. And every time I load in the page with AJAX (which includes the script) it duplicates it even more times! It only works normal for the first time after the entire page is reloaded. $(" X ") .appendTo('.tbody'); Please note that I've also tried append(), and $('.tbody').html($('.tbody').html() + 'string'); and the same issue persists.
upvote count: 0
has comment: http://stackoverflow.com/comment/46787598
has comment: http://stackoverflow.com/comment/46787686
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/29295778
tagged with: ajax

http://stackoverflow.com/q/29294170
tagged with: jquery-ui
linked to: http://stackoverflow.com/q/501943
has body: I am stuck in between with my problem of "How to calculate the days between the dates excluding the Weekends(SAT,SUN) and the National Holidays." and really struggling to calculate the weekends and nationaldays holidays both as the same time. Any Help would be severely appreciated. I have arrived to the conclusion in my code , that i am getting the calculated days where i am able to exclude the weekends , but not the national holidays, I have tried to built but failed. Please let me know how to calculate both the weekends and national holidays simultaneously. This is my html code: Leave From To This is my script: Here is the link to jsfiddle: https://jsfiddle.net/8ww4noja/2/
answer count: 0
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
type: Question
tagged with: datepicker
has comment: http://stackoverflow.com/comment/46786353
has title: Calculating national holidays and weekends in jquery datepicker
has comment: http://stackoverflow.com/comment/46785076
score: 0
has comment: http://stackoverflow.com/comment/46784714
tagged with: jquery-ui-datepicker

http://stackoverflow.com/q/29328353
type: Question
type: AnsweredQuestion
tagged with: underscore.js
has answer: http://stackoverflow.com/a/29328582
answer count: 1
tagged with: arrays
tagged with: javascript
tagged with: sorting
has title: Underscore convert object to array and sort by key name
tagged with: momentjs
accepted answer: http://stackoverflow.com/a/29328582
score: 0
has body: I've been using the below code to transform a large list of dates in a array of counts which i can then use in a simple line chart. The issue i'm encountering is with sorting the values by the year and week number. When i have data such as [{201501: 20},{201502: 20},{201451: 20},{201452: 20}] i need to sort the array by the key name into the following format [{201451: 20},{201452: 20},{201501: 20},{201502: 20}]. They i simply discard the key with _.values() How do i go about ordering the array with underscore, i've tried a few things but i'm pretty lost at this point. var graphData = _.chain(thisYearFiltered) // map each string like '2014-01-01 00:00:00' using moment.js to the ISO Week. ISO weeks are used because they run Monday to Sunday .map(function(date){ return moment(date, "YYYY-MM-DD HH:mm:ss").isoWeekYear() + moment(date, "YYYY-MM-DD HH:mm:ss").isoWeek(); }) // Manipulate weeks numbers [201423,201423,201423,201423,201424] into a count for each like [{201423:4 },{201424:1}] .countBy(function(num) { //console.log(num); return num; }) // Pull out the values of the objects and discard the week number. [{23:4 },{24:1}] to [4,1] .values() .value(); I know this is all possible with underscore but i've hit a wall with this one so any suggestions would be welcome. I've looked into _.sortBy() but that seems to expect a named key to sort on and in my case the keys names are all different. Could i do something similar with the first key?

http://stackoverflow.com/a/29280056
answers question: http://stackoverflow.com/q/29279805
downvote count: 0
type: Answer
score: 2
upvote count: 2
has body: When keydown event occurs on the key you want to track, then store this information in a mapping or a flag somewhere. When keyup event occurs, then clear the flag for the given key. Then, on a timer, you could poll the state of the key mapping, and move the object for whatever key direction is being pressed. Possibly there is a better solution then polling, but I don't know of a way to test if a key is down other than polling. On keyup, would also need to check if needed to interrupt moving the object.

http://stackoverflow.com/q/29342611
score: 4
answer count: 2
has title: AngularJS $http redirect on status code
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/29342741
accepted answer: http://stackoverflow.com/a/29342741
possible better answer: http://stackoverflow.com/a/29342666
tagged with: angularjs
has answer: http://stackoverflow.com/a/29342666
tagged with: angular-http
upvote count: 4
type: AnsweredQuestion
downvote count: 0
has body: I have a angular application with many $http request and i want redirect the users on the login page if the server session expires (get 401). Does anyone know a solution witch works for all $http without adding .error() on every $http?
tagged with: angular-promise
tagged with: http
type: Question

dc.js
tag name: dc.js
tags question: http://stackoverflow.com/q/29292749
tags question: http://stackoverflow.com/q/29291256
tags question: http://stackoverflow.com/q/29278261
tags question: http://stackoverflow.com/q/29371256
tags question: http://stackoverflow.com/q/29343076
tags question: http://stackoverflow.com/q/29366872
tags question: http://stackoverflow.com/q/29360042
type: Tag
tags question: http://stackoverflow.com/q/29232203

http://stackoverflow.com/q/29366773
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/46934244
has comment: http://stackoverflow.com/comment/46933765
has title: Angular ui modal showing up at the bottom of the screen
has body: So I've been trying to get the modal window sin angular ui working, and I've been having difficulty. I'm still pretty new to this I added "angular-ui": null, "angular-bootstrap": "~0.12.0" to bower and ran bower install In the index.html, I added Currently I just have an ng-click set to open the modal window with $modal.open({ templateUrl: 'views/post-modal.html', controller: 'PostModalController', size: 'lg' }) My modal view is also pretty simple, just {{postInput}} So far it just adds the div to the bottom of the screen each time I click the link. I think its a problem with my styles, but I'm not sure. Thanks
answer count: 0
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46916135
has comment: http://stackoverflow.com/comment/46917177
type: Question
has comment: http://stackoverflow.com/comment/46935093
tagged with: javascript
has comment: http://stackoverflow.com/comment/46916368
score: 0

http://stackoverflow.com/comment/84891843
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/46209368
has text: what do the brackets around [event.target.name] indicate? Why are they required?
score: 9

http://stackoverflow.com/comment/46918698
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29354820
has text: Maybe it can be accomplished by others methods/techniques, but I didn't find anything out there that help in this point. Any tip would be greatly appreciated!

http://stackoverflow.com/a/29332174
type: AcceptedAnswer
type: Answer
has body: I found the solution. score was being parsed as something other than an Int for whatever reason. Using score = parseInt(score) + 1; solved the problem. Thanks to everyone who submitted answers! We got there in the end.
score: 0
accepted answer of: http://stackoverflow.com/q/29331085
answers question: http://stackoverflow.com/q/29331085
has comment: http://stackoverflow.com/comment/46855851

http://stackoverflow.com/a/29402565
score: 1
has comment: http://stackoverflow.com/comment/48873291
upvote count: 1
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/48874335
answers question: http://stackoverflow.com/q/29309958
type: Answer
accepted answer of: http://stackoverflow.com/q/29309958
has comment: http://stackoverflow.com/comment/49578619
has body: The problem ended up being the highcharts options in the directive were being cloned by JSON.parse(JSON.stringify(obj)), which cannot copy functions. I changed it to: function cloneObject(obj) { if (obj === null || typeof obj !== 'object') { return obj; } var temp = obj.constructor(); // give temp the original obj's constructor for (var key in obj) { temp[key] = cloneObject(obj[key]); } return temp; } And now the functions work.

http://stackoverflow.com/comment/46912403
has text: I don't see why it shouldn't work -- the data can certainly be modified after being read.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29362298
score: 0

http://stackoverflow.com/comment/46922494
score: 0
comment on: http://stackoverflow.com/a/29370755
type: AnswerComment
type: Comment
has text: would you please read my post again ? I know I can't do it on `document.location.hash` , I did it on `document.location`. It doesn't return an error, but it doesn't work

http://stackoverflow.com/q/29301879
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/46798927
tagged with: jquery
has comment: http://stackoverflow.com/comment/46799124
has comment: http://stackoverflow.com/comment/46798756
type: UnansweredQuestion
answer count: 0
has body: I do have following code 0"> @Html.LocalizeText(Resources.RT_GENERAL,"Sort") @Html.LocalizeText(Resources.RT_GENERAL,"Group") Function groupTabClicked: function (val) { GAForNewListingAndDetails('New AC Listing', 'Sale List GROUP Click', ''); saleListVM.showGroupsPanel(true); saleListVM.showSortPanel(false); saleListVM.altView(false); loadGroupSaleList(auctionGroupListVM.selectedGroupItem()); detailWidth(); }, sortTabClicked: function (val) { GAForNewListingAndDetails('New AC Listing', 'Sale List SORT Click', ''); saleListVM.showGroupsPanel(false); saleListVM.showSortPanel(true); saleListGroupTypeId = null; saleListGroupId = null; saleListGroupName = ""; saleListVM.DisplaySortByLane(true); saleListVM.DisplaySortByItem(true); initSaleListScroller(); detailWidth(); }, here In DOM element i.e.div with id=tab1 is to be hidden when groupTabClicked() is called and to be shown when sortTabClicked() is called
tagged with: knockout.js
type: Question
has title: How to set the data-bind=Visibility false using JQuery

http://stackoverflow.com/comment/46769378
type: QuestionComment
has text: Thanks! for your help. Yes and when I click on It on the console it takes me to the code!
comment on: http://stackoverflow.com/q/29285808
score: 0
type: Comment

http://stackoverflow.com/comment/46716662
has text: it's every keypress. For every keypress the scope changes.
comment on: http://stackoverflow.com/q/29256381
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29247978
accepted answer: http://stackoverflow.com/a/29257314
answer count: 1
tagged with: javascript
score: 0
tagged with: google-chrome-app
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46703065
has answer: http://stackoverflow.com/a/29257314
type: Question
has body: I'm building a Chrome App and I get from a XMLHTTPREQUEST a .png file that later is stored localy using the chrome.storage API so I can use it later in case that the person who is going to use the App can acces to it without a connection to internet. The problem is that in html you always need a url that specifies where the image is stored and I have tried everything to get an url out of that .png file stored in the chrome storage but nothing works. I'm asking for a way to get from that stored image an url to use in an html img. This is the code in which I get the .png file and store it in chrome's storage. var xhr = new XMLHttpRequest(); xhr.open('GET', 'http://siteurl.com/image.png', true); xhr.responseType = 'image/png'; xhr.onload = function(e) { chrome.storage.local.set({'iconImage':this.response}, function() { console.log('Image Saved'); }); }; xhr.send(); And this is the code that gets the image out of the storage. chrome.storage.local.get(function(image){ var img = image.iconImage; //here is where I need to create the url so I can use it to display the image in a &lt;img&gt; }); Thank you and sorry for my english if it is not understandable.
has title: Is there a way to get an url out of a chrome's storage image?

http://stackoverflow.com/comment/46898585
has text: Yes, that's what I'm looking for, but I am hoping for an "angular best practice" way of doing it. It seems like there should be something out there, what with the $sce and $sanitize providers
comment on: http://stackoverflow.com/q/29356801
type: QuestionComment
type: Comment
score: 1

http://stackoverflow.com/comment/46677312
type: QuestionComment
has text: Check here: _http://stackoverflow.com/questions/585945/how-to-align-content-of-a-div-to-the-bottom-with-css_
comment on: http://stackoverflow.com/q/29235608
score: 0
type: Comment

http://stackoverflow.com/comment/46757285
type: AnswerComment
has text: Right, you're almost there. So the pink boxes show the results of the changes you make to the JavaScript files. If you make the correct changes and then refresh that KoansRunner.html file, the pink boxes will turn green. For example, in the first koan (function) in the aboutExpects file, changing the value from "false" to "true" will give you correct result which you should then (after refreshing) see.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29269391

http://stackoverflow.com/comment/46780689
comment on: http://stackoverflow.com/a/29275190
type: AnswerComment
score: 0
has text: var keineSonderzeichen = /[^a-z0-9@-]/gi;
type: Comment

http://stackoverflow.com/q/29237200
tagged with: javascript
type: UnansweredQuestion
score: 1
tagged with: phonegap-plugins
type: Question
has title: Phonegap BarcodeScanner.js can't close on ios
has answer: http://stackoverflow.com/a/32509850
favorite count: 0
tagged with: cordova
upvote count: 1
answer count: 1
has body: thanks for helping ! I'm trying to use the last version of BarcodeScanner (https://github.com/wildabeast/BarcodeScanner/) with ponegap on ios with Xcode 6.2. It works greats and give me the good result when scanning, but when I try to leave camera mode by clicking 'cancel', it does not works ! I have searched everywhere, I can't find a solution :/ Here my code (very basic) html : js $("#scanButton").click(function(){ scanWithCordova(); }); function scanWithCordova(){ cordova.plugins.barcodeScanner.scan( function (result) { $('.content').html("We got a barcode\n" + "Result: " + result.text + "\n" + "Format: " + result.format + "\n" + "Cancelled: " + result.cancelled); }, function (error) { alert("Scanning failed: " + error); } ); }
tagged with: mobile
downvote count: 0
tagged with: ios

http://stackoverflow.com/q/29254928
score: 0
has body: How by Javascript compare date and time in two datetimepicker fields with actual datetime? In other words I need to consider if date and time in my form is after or before Now. I have two datetimepicker fields in my form: (I am using datetimepicker on http://xdsoft.net/jqplugins/datetimepicker/) Really not elegant way would be somethink like: var dateVal = $('#dtpckr-StartMainDateTime-Date').val(); var timeVal = $('#dtpckr-StartMainDateTime-Time').val(); var day = dateVal.toString().substr(0, 2); var month = dateVal.toString().substr(3, 2); var year = dateVal.toString().substr(6, 4); var hour = '00'; var minute = '00'; if (timeVal) { hour = timeVal.toString().substr(0, 2); minute = timeVal.toString().substr(3, 2); } var startDate = new Date(year, month - 1, day, hour, minute); var now = new Date(); if (startDate &gt; now) { console.log('future'); } else { console.log('current or past'); }
has comment: http://stackoverflow.com/comment/46715863
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/46712933
tagged with: datetimepicker
answer count: 1
has answer: http://stackoverflow.com/a/29255132
has title: How to compare date and time in two separated fields with actual date-time (by JavaScript)?
type: UnansweredQuestion

http://stackoverflow.com/comment/46678960
has text: Thanks, that's exactly what I was thinking of, but is this the way that this is usually done in Angular?
comment on: http://stackoverflow.com/a/29235504
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/46827668
has text: Well, what exactly did you try and how did it not work?
score: 0
comment on: http://stackoverflow.com/q/29301151
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/46902388
score: 0
type: Comment
type: QuestionComment
has text: @dmoz You have removed the quotes now, which gives syntax error. At the `pluginDir` string.
comment on: http://stackoverflow.com/q/29358757

http://stackoverflow.com/comment/46952653
type: AnswerComment
has text: I Understand what you mean to say but I need to refresh and get totally different data via service call up on change of the lastName of the parent controller property in the first child. So I came up with that code. And so only I put up the observer on the updateName method of the child1 controller. But when I move to Child 2 controller I don't want that kind of scenario. I do know that due to Ember's observer tag on the updateName method, it will get fired whether or not it is the active route, what I do want to know is whether there is any other way to avoid it and get what I desire in Ember
type: Comment
comment on: http://stackoverflow.com/a/29370452
score: 0

http://stackoverflow.com/q/29269858
score: 0
upvote count: 1
has comment: http://stackoverflow.com/comment/46740772
downvote count: 1
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46740810
has title: getting an attribute-value in a class using javascript
has comment: http://stackoverflow.com/comment/46740782
has comment: http://stackoverflow.com/comment/46740925
has body: I don't know if this question has been asked here on SO, i just don't know the right word. I have this input tag: How do I get the holdout's value of 7 from the class using javascript? This is because I wanted to add custom attributes but when the page is rendered, my custom attribute is not displayed. Some advised me to put them in a class instead. For example: when the page is rendered, the holdout is not included, therefore I cannot get the value.
type: Question
has comment: http://stackoverflow.com/comment/46740856
has answer: http://stackoverflow.com/a/29269904
has comment: http://stackoverflow.com/comment/46740921
has comment: http://stackoverflow.com/comment/46740889
answer count: 1
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/29269904
favorite count: 0

http://stackoverflow.com/a/29271184
has body: While you cannot extend console, you can wrap each of it's methods. The code below intercepts every logging method and records each call in a variable called log. var actualConsole = window.console; var c = window.console = {}; var log={}; for (var m in actualConsole){ if (typeof console[m] ==='object'){ c[m]=console[m]; }else if (typeof actualConsole[m] ==='function'){ c[m]=function () { var args = Array.prototype.slice.call(arguments); log[this]=log[this]||[]; log[this].push(args); actualConsole[this].apply(actualConsole,args); }.bind(m); }// else - nothing else expected } console.log('log',1); console.log('log',2); console.error('error',1); console.warn('warn',1); actualConsole.log('log:',log); Log looks like: {"log":[["log",1],["log",2]],"error":"error",1,"warn":"warn",1}
upvote count: 2
type: Answer
answers question: http://stackoverflow.com/q/29270807
score: 2
downvote count: 0

http://stackoverflow.com/a/29224737
score: 1
has body: I think the chief problem here is that you're attempting to get the energy from the device object, when it's actually stored in the data object. The keys you need to index into the data object are stored in device. Assuming you want the total energy_ac per room, what you need to do is: for each room: set hash.energy_ac = 0 for each device in room's energy_ac: for each channel in this device: add the energy of this device and channel to hash.energy_ac So for the one room in mappings (1301), the energy_ac should be 75. Its energy_ac is comprised of device 15062: channel ct1 (34), plus device 15063: channels ct1 (34) + ct2 (0) + ct3 (7). 34 + 34 + 7 = 75. Here's a JSFiddle with (what I think is) the implementation you intended. Also, I was getting console errors due to the _id values not being strings.
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/29224335
downvote count: 0

http://stackoverflow.com/a/29349085
type: Answer
has comment: http://stackoverflow.com/comment/46884092
accepted answer of: http://stackoverflow.com/q/29348956
has comment: http://stackoverflow.com/comment/46884132
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/29348956
has body: You could use a filter? $("select").filter(function() { return $(this).val() === "lol"; }); jsFiddle Example This is assuming you want all &lt;select&gt; elements where the lol option is actually selected. If you just wanted to check to see if the select contains the lol option, selected or not, you can use parent: $('option[value="lol"]').parent(); jsFiddle Example
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/46728487
type: Comment
type: QuestionComment
has text: There are lots of solutions, some are listed to the right of your post under the heading **Related**. Did you try any of those?
score: 0
comment on: http://stackoverflow.com/q/29262805

cookies
tags question: http://stackoverflow.com/q/29319391
tags question: http://stackoverflow.com/q/29357330
tags question: http://stackoverflow.com/q/29252307
tags question: http://stackoverflow.com/q/29343398
tags question: http://stackoverflow.com/q/29303661
tags question: http://stackoverflow.com/q/29236365
tags question: http://stackoverflow.com/q/29240325
type: Tag
tags question: http://stackoverflow.com/q/29367360
tags question: http://stackoverflow.com/q/29279589
tags question: http://stackoverflow.com/q/29241008
tags question: http://stackoverflow.com/q/29304469
tags question: http://stackoverflow.com/q/29243304
tag name: cookies
tags question: http://stackoverflow.com/q/29238293
tags question: http://stackoverflow.com/q/29225353
tags question: http://stackoverflow.com/q/29222044
tags question: http://stackoverflow.com/q/29268624
tags question: http://stackoverflow.com/q/29227784
tags question: http://stackoverflow.com/q/29373216
tags question: http://stackoverflow.com/q/29315719
tags question: http://stackoverflow.com/q/29249680
tags question: http://stackoverflow.com/q/29277344
tags question: http://stackoverflow.com/q/29291942
tags question: http://stackoverflow.com/q/29251702

http://stackoverflow.com/q/29309209
has comment: http://stackoverflow.com/comment/46812306
has answer: http://stackoverflow.com/a/29309328
has answer: http://stackoverflow.com/a/29309407
has body: I have something like this: $('#select1').on('change', function() {}) and it works fine. However, I need to run another function after the function has completed. I thought about taking the function contents, and putting it in a named function, then taking the second function and doing the same, and placing them in the anonymous function: $('#select1').on('change', function() { function1 (); function2 (); }); However, I was hoping there was another way. The above seems inconsistent with jQuery.
type: Question
tagged with: javascript
score: 4
upvote count: 4
has title: Run a function after an on.change event
answer count: 3
downvote count: 0
linked to: http://stackoverflow.com/q/5000415
tagged with: eventhandler
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29309283

http://stackoverflow.com/q/29369449
linked to: http://stackoverflow.com/q/220231
has title: Get index.html response headers
has comment: http://stackoverflow.com/comment/46920391
score: 5
upvote count: 6
has comment: http://stackoverflow.com/comment/46920388
has comment: http://stackoverflow.com/comment/46920390
has comment: http://stackoverflow.com/comment/46920359
has answer: http://stackoverflow.com/a/29369542
answer count: 1
downvote count: 1
tagged with: javascript
type: UnansweredQuestion
tagged with: response
has body: Note: Turns out this is a duplicate: Accessing the web page&#39;s HTTP Headers in JavaScript Is there a way to get the request headers for the index.html request? For example, this is a screenshot of me hitting google.com I would like to be able to get access to the Request Headers. Is this possible? What about for other javascript/css assets?
has comment: http://stackoverflow.com/comment/46920500
favorite count: 0
tagged with: response-headers
type: Question

http://stackoverflow.com/comment/46744606
type: AnswerComment
score: 0
type: Comment
has text: It does, it's some type of a fallback in case the sender didn't specify. Again, you didn't touch the problem, you're providing methods and solutions to a problem that doesn't exist.
comment on: http://stackoverflow.com/a/29257512

http://stackoverflow.com/comment/46725833
comment on: http://stackoverflow.com/a/29261899
has text: OK thanks, but what are the Bot specific UAs for the list of social bots I posted?
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/96929869
has text: @Michael No, the two snippets are not doing what the OP asked for. They are workarounds that use generators only for one of the aspects asked for. In general notice that this answer is about 4 years old and quite outdated. Async iterators are a thing today, and the second snippet approach has been deprecated by `async`/`await` for quite some time now.
comment on: http://stackoverflow.com/a/29281361
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/46698622
has text: Just seen your edit where you have added `[Bind(Prefix = "NewItem")]`, but in any case what are you trying to achieve with this?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29246467

http://stackoverflow.com/a/29359016
has comment: http://stackoverflow.com/comment/46902877
has body: http://jsfiddle.net/dtyohc28/6/ Try this, instead of using on('hide'), make your own function to control it. $('#dismissModal').click(function(){ $modal.css({top: 0, left: 0, transform: 'scale(0.1, 0.1)', opacity:'0'}); setTimeout(function(){ $('.modal').modal('hide') },750); });
type: Answer
answers question: http://stackoverflow.com/q/29358789
downvote count: 0
score: 1
upvote count: 1

http://stackoverflow.com/comment/46752260
type: Comment
type: QuestionComment
has text: if you intialize playerImg first, you can already attach an event on it, no need to wait for document load. Then, try to set its src after you attached the event (which is not the case here)
comment on: http://stackoverflow.com/q/29276855
score: 0

http://stackoverflow.com/q/29295602
type: Question
tagged with: internet-explorer-8
linked to: http://stackoverflow.com/q/33396580
has answer: http://stackoverflow.com/a/47545893
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/46787680
tagged with: javascript
has title: Json to CSV to download working in chrome but not working in IE browser
tagged with: export-to-csv
has body: Json to CSV to download working in chrome but not working in IE browser ? Any body have solution for this. Json Data : [ { "id":1, "name":"Johnson, Smith, and Jones Co.", "amount":345.33, "Remark":"Pays on time" }, { "id":2, "name":"Sam \"Mad Dog\" Smith", "amount":993.44, "Remark":"" }, { "id":3, "name":"Barney &amp; Company", "amount":0, "Remark":"Great to work with\nand always pays with cash." }, { "id":4, "name":"Johnson's Automotive", "amount":2344, "Remark":"" } ] Function : JSONToCSVConvertor = function (JSONData, Filename, ColumnDataTypes, ShowLabel) { var arrData = typeof JSONData != 'object' ? JSON.parse(JSONData) : JSONData; var array = ColumnDataTypes.split(','); var CSV = ''; var ColumnName = ColumnDataTypes.split(','); if (ShowLabel) { var row = ""; for (var x = 0; x &lt; array.length ; x++) { row += array[x].split('-')[1] + ','; } } row = row.slice(0, -1); //append Label row with line break CSV += row + '\r\n'; for (var i = 0; i &lt; arrData.length; i++) { var row = ""; for (Col = 0; Col &lt; array.length; Col++) { row += ('"' + arrData[i][array[Col].split('-')[0]] + '",').replace('""', '"'); } row.slice(0, row.length - 1); //add a line break after each row CSV += row + '\r\n'; } if (CSV == '') { alert("Invalid data"); return; } //Generate a file name var fileName = Filename; //Initialize file format you want csv or xls var uri = 'data:text/csv;charset=utf-8,' + escape(CSV); var link = document.createElement("a"); link.href = uri; //set the visibility hidden so it will not effect on your web-layout link.style = "visibility:hidden"; link.download = fileName + ".csv"; //this part will append the anchor tag and remove it after automatic click document.body.appendChild(link); link.click(); document.body.removeChild(link); };
answer count: 1
downvote count: 0
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46786917
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/46788428

http://stackoverflow.com/comment/120699854
has text: Great answer, but it has an issue. Conversion of numbers without decimal places will have wrong result. Eg. `R$ 2.393` will result `0.393`.
comment on: http://stackoverflow.com/a/65568607
type: Comment
score: 2
type: AnswerComment

http://stackoverflow.com/q/29363304
accepted answer: http://stackoverflow.com/a/29363355
type: Question
tagged with: jquery-ui
tagged with: autocomplete
tagged with: javascript
tagged with: jquery
score: 0
answer count: 1
has title: Angular JS and jQuery UI autocomplete feature
has answer: http://stackoverflow.com/a/29363355
tagged with: angularjs
type: AnsweredQuestion
has body: I am trying to build an autocomplete feature using pure angular but unfortunately UI is a bit tough to handle. I started building it with jQuery UI. Then I came across a Fiddle http://jsfiddle.net/sebmade/swfjT/light/ &lt;div ng-app='MyModule'&gt; &lt;div ng-controller='DefaultCtrl'&gt; &lt;input auto-complete ui-items="names" ng-model="selected"&gt; selected = {{selected}} &lt;/div&gt; &lt;/div&gt; function DefaultCtrl($scope) { $scope.names = ["john", "bill", "charlie", "robert", "alban", "oscar", "marie", "celine", "brad", "drew", "rebecca", "michel", "francis", "jean", "paul", "pierre", "nicolas", "alfred", "gerard", "louis", "albert", "edouard", "benoit", "guillaume", "nicolas", "joseph"]; } angular.module('MyModule', []).directive('autoComplete', function($timeout) { return function(scope, iElement, iAttrs) { iElement.autocomplete({ source: scope[iAttrs.uiItems], select: function() { $timeout(function() { iElement.trigger('input'); }, 0); } }); }; }); I want to show the options only after user has entered 3 valid characters. Thanks, Ankit Tanna

http://stackoverflow.com/q/29318332
tagged with: hashtag
upvote count: 3
type: Question
possible better answer: http://stackoverflow.com/a/29319298
accepted answer: http://stackoverflow.com/a/29318434
has answer: http://stackoverflow.com/a/29319298
tagged with: javascript
tagged with: replace
answer count: 2
has body: I am trying to convert hashtags into links within a micropost. I have implemented a gem called simple_hashtag which seems to work for the linking aspect of this. However, the gem works by extracting hashtags from the post and displaying them in their own loop. So, for example if my Micropost was: Today I went #snowboarding, it was #awesome The code to extract the tags is done as a loop, which means it has to be done outside of the content. &lt;p&gt;&lt;%= micropost.content %&gt;&lt;/p&gt; &lt;ul&gt; &lt;% micropost.hashtags.each do |hashtag| %&gt; &lt;li&gt;&lt;%= link_to hashtag.name, hashtag_path(hashtag.name) %&gt;&lt;/li&gt; &lt;% end %&gt; &lt;/ul&gt; This leaves the finished view looking like: Today I went #snowboarding, it was #awesome - snowboarding - awesome Is it possible to have the code scan the content and replace the hashtags with the links in place? I am wondering if there is a way to maybe collect the hashtags, convert them into links and then replace them in the content? I know I can scan the content and find the hashes using the following: &lt;% content = micropost.content %&gt; &lt;% hashes = content.scan(/#\w+/) %&gt; &lt;% hashes.each do |hash| %&gt; &lt;%= hash %&gt; &lt;% end %&gt; I would then like to use something like hash.gsub! or even Javascript, to replace the hashtags in the content with the links rather than having them listed below.
downvote count: 0
favorite count: 0
has title: Turning hashtags to links in place, in rails
tagged with: ruby
has answer: http://stackoverflow.com/a/29318434
tagged with: ruby-on-rails
type: AnsweredQuestion
score: 3

http://stackoverflow.com/comment/46810828
type: AnswerComment
comment on: http://stackoverflow.com/a/29308421
type: Comment
has text: But, how about support? At now ` ` is only supported in Chrome and Opera. So it's not solution to widely support at this time.
score: 0

http://stackoverflow.com/comment/46876782
comment on: http://stackoverflow.com/q/29345394
has text: Of course it cannot return the array, as it does asynchronously read a file. Use a callback instead (to be used as `mymodule.name(console.log)`).
type: Comment
type: QuestionComment
score: 2

http://stackoverflow.com/a/29238603
has comment: http://stackoverflow.com/comment/46684956
has comment: http://stackoverflow.com/comment/46684030
has comment: http://stackoverflow.com/comment/46684134
has body: you also need $scope.des = function() { return $scope.d() } Not sure what your trying todo, but if have just plunked this // Code goes here app = angular.module('myapp',[]); app.controller('main', function($scope) { $scope.desc = ""; $scope.stat = "test"; $scope.d = function() { for (var i = 0, len = $scope.stat.length; i &lt; len; i++) { if ($scope.stat[i].Id == $scope.selectedId &amp;&amp; $scope.statDate == $scope.stat[i].StatDate) { $scope.desc = $scope.stat[i].D; return $scope.stat[i].D; } } return ""; }; $scope.des = function() { return $scope.d() } }); And I get your issue, if I comment out // $scope.desc = $scope.stat[i].D; it works, but I presume that bit you need :) What are you trying todo? I think you are trying to change model as the view is changed. You might need a directive for this. This is part of something I did for datetime stuff .directive('formatteddate', function ($filter) { return { link: function (scope, element, attrs, ctrl) { ctrl.$parsers.unshift(function (viewValue) { This is the plunk of your code/html. http://plnkr.co/edit/3GjP7YVsKFIYAAJQwmOK?p=preview
type: Answer
has comment: http://stackoverflow.com/comment/46686658
has comment: http://stackoverflow.com/comment/46684911
answers question: http://stackoverflow.com/q/29238039
has comment: http://stackoverflow.com/comment/46685513
has comment: http://stackoverflow.com/comment/46684870
has comment: http://stackoverflow.com/comment/46683510
has comment: http://stackoverflow.com/comment/46705866
has comment: http://stackoverflow.com/comment/46685503
score: 0
has comment: http://stackoverflow.com/comment/46683471

http://stackoverflow.com/comment/46851477
type: Comment
type: QuestionComment
has text: I might be missing the point, but even when they are in the same array as they are now, the items.push lines are calling individually items with the Question label and then the Answers labeled Answer1, Answer 2, and so on. If I generated two separate arrays for Questions and Answers and then ran a similar function, wouldn't it still display the entire array of Questions and the entire array of Answers? My concern is that I only want to show one question + 4 answers at a time, if that makes any sense.
score: 0
comment on: http://stackoverflow.com/q/29331006

http://stackoverflow.com/comment/46882702
score: 0
type: QuestionComment
type: Comment
has text: Would you dont mind to review complete file? Its the code you are looking for in it. `function isFileViewableImage($filename) { $ext = strtolower(pathinfo($filename, PATHINFO_EXTENSION)); $viewableExtensions = array("jpeg", "jpg", "gif", "png"); return in_array($ext, $viewableExtensions); }`
comment on: http://stackoverflow.com/q/29348483

http://stackoverflow.com/comment/46928134
has text: I needed the two buttons because one is in each container, but this works beautifully! Thanks!
comment on: http://stackoverflow.com/a/29361273
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/46855011
comment on: http://stackoverflow.com/q/29332804
score: 0
has text: believe me, there was no error in console.. I am using chrome 38.. And how to verify that it entered the console??
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/75796706
has text: Here's a dupe question, with a ton of answers as well: https://stackoverflow.com/questions/784929/what-is-the-not-not-operator-in-javascript
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29312123
score: 3

http://stackoverflow.com/q/29351901
score: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29351962
tagged with: angularjs
type: UnansweredQuestion
has title: angularjs: controllers with routeproviders
type: Question
answer count: 1
tagged with: javascript
has body: I am trying to load two controllers dynamically using routeproviders in angularjs. But it only returns a blank page instead of showing the default page. What is the error I have done? The code is given below. Index.html location.html {{ loc.city }} customers.html {{ cust.name }} - {{ cust.country }} - Can help me with this working? Thanks!!!

http://stackoverflow.com/comment/46869208
type: AnswerComment
comment on: http://stackoverflow.com/a/29340727
type: Comment
has text: @ParkerSong This would the best way to do cod in angular way , Do upvote if you can.. Thanks :)
score: 0

http://stackoverflow.com/comment/46924000
type: QuestionComment
comment on: http://stackoverflow.com/q/29371065
has text: @Andy An object can't be itself and something else at the same time. In the case of strings, there is a special way that objects can be coerced into strings (as my answer shows). Please see my answer, and if that doesn't answer your question, please show us a use case that my answer wouldn't solve.
score: 0
type: Comment

http://stackoverflow.com/q/29281986
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46767772
has answer: http://stackoverflow.com/a/29282222
has answer: http://stackoverflow.com/a/29282102
has body: I am looking for a trick to put my website in fullscreen mode without human interaction. I've found some examples using HTML5's techniques, but all of then needs to be triggered by a human interaction. This website will be displayed in a TV ... I already think in load the website using a SWF file in fullscreen mode, but instead of going to this direction, I would like to stress all possibilities using just the default pattern (html, css and javascript)
has comment: http://stackoverflow.com/comment/46762102
type: Question
has answer: http://stackoverflow.com/a/29282049
has title: Run a website in fullscreen mode
linked to: http://stackoverflow.com/q/39068389
tagged with: javascript
score: 22
has answer: http://stackoverflow.com/a/48907625
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/30970886
favorite count: 0
has comment: http://stackoverflow.com/comment/46761887
accepted answer: http://stackoverflow.com/a/29282049
answer count: 5
possible better answer: http://stackoverflow.com/a/30970886
downvote count: 1
upvote count: 23
tagged with: fullscreen

http://stackoverflow.com/q/29261113
has body: I have been trying to bundle ReactJS as a commonJS module using browserify and gulp but whenever i run my code, I get a React is not defined error and being new to this, i haven't been able to find a proper solution to this error. Here is what the part with browserify looks like gulp.task('build', function(){ browserify({ entries: [path.ENTRY_POINT], transform: [reactify], }).require('react') .bundle() .pipe(source(path.MINIFIED_OUT)) .pipe(streamify(uglify(path.MINIFIED_OUT))) .pipe(gulp.dest(path.DEST_BUILD)); }); I have checked the bundle file generated and React is defined at the bottom of the page, not sure if that is supposed to mean anything but this is how i am calling React in my app.js file. var React = require('react'); var Parent = require('./parent.js'); React.render(&lt;Parent /&gt;, document.getElementById('app')); What is it that i need to do right to fix this ?
type: Question
has title: Gulp, browserify to use react as CommonJS not working. React is not defined
tagged with: javascript
score: 0
answer count: 1
tagged with: gulp
has answer: http://stackoverflow.com/a/29261654
tagged with: browserify
type: UnansweredQuestion

http://stackoverflow.com/a/29329005
has comment: http://stackoverflow.com/comment/46847740
accepted answer of: http://stackoverflow.com/q/29328929
score: 2
downvote count: 0
upvote count: 2
has comment: http://stackoverflow.com/comment/46847698
has comment: http://stackoverflow.com/comment/46847709
type: AcceptedAnswer
has body: You forgot the = after class. int main() { std::cout << "Hello, world!"; return 0; }
answers question: http://stackoverflow.com/q/29328929
type: Answer

http://stackoverflow.com/a/29312370
has body: You need to set the value of the textare as an empty string. You need to use .val() to set/get the value of form elements which includes textareas $(document).ready(function () { $("#bigtext").focus(function () { $(this).val(''); }); }); $("#bigtext").hide() hides the textarea itself, and it returns a jQuery object which does not have the innerHTML property so that part does not do anything If you want to display a default text in the textarea, it will be better to use placeholder.
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29312353

http://stackoverflow.com/a/29232545
score: 2
upvote count: 2
has body: if(App.ServisTanimId) { // This code will execute if App.ServisTanimId is defined } else { // If undefined } should work
has comment: http://stackoverflow.com/comment/46672395
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/29231254
answers question: http://stackoverflow.com/q/29231254

http://stackoverflow.com/q/29291496
type: Question
type: AnsweredQuestion
tagged with: javascript
has answer: http://stackoverflow.com/a/29292287
has body: I want to save an object called singleInfo in a column for qualifying parseObjects as shown below. The code below chooses the right objects to save to but it only saves data intended for the last object to all of the objects. I'm pretty sure it is a problem with how I'm doing the loops. I thought the promises would resolve this. I used a similar promise pattern in the past that provided good results but it's not working this time. I think it has something to do with the nested loops as before I only used this patter on a single loop. var func = function(){ var promise = Parse.Promise.as(); var array = []; var pairs = [parseObject, parseObject, parseObject]; var a = pairs.length; while(a--){ var pair = pairs[a]; var singles = [obj, obj, obj, obj, obj]; var b = singles.length; while(b--){ var single = singles[b]; if(single.value === pair.get('value')){ var singleInfo = {news: single.news, time: pair.get('time')} query.get(pair.id, { success: function (goal){ goal.set('newColumn', singleInfo); array.push(goal.save()); } }); } } promise.then(function(){ return Parse.Promise.when(array); }
tagged with: for-loop
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/46780263
favorite count: 0
tagged with: promise
has comment: http://stackoverflow.com/comment/46780175
tagged with: parse-platform
linked to: http://stackoverflow.com/q/29294790
has title: Saving within nested loops with promises
score: 1
tagged with: save
upvote count: 1
accepted answer: http://stackoverflow.com/a/29292287

http://stackoverflow.com/comment/46852674
has text: Ah, yes I thought I might use _.reduce toward the end. Thanks!
comment on: http://stackoverflow.com/a/29331437
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/46716538
comment on: http://stackoverflow.com/a/29256923
type: AnswerComment
has text: And when do you want it? as and when someone enters a n umber in one of the boxes? or on click of something?
score: 0
type: Comment

http://stackoverflow.com/a/29344842
type: Answer
has comment: http://stackoverflow.com/comment/46877028
answers question: http://stackoverflow.com/q/29344631
score: 0
has body: In your jquery script you have set it to post as name: input, so it will come as $_POST['input'] Add this to your backend.php, and you will get the time as unix epoch: if(isset($_POST['input'])) { $time = strtotime(preg_replace('/\(.*\)/i', '', $_POST['input'])); // $time contains unix epoch echo date("Y-m-d", $time); }
has comment: http://stackoverflow.com/comment/46876091

http://stackoverflow.com/comment/46800311
comment on: http://stackoverflow.com/a/29302164
has text: I am having trouble applying this to my example. I get what you are saying here but how would I call the equivalent of check.hello.bind(check) on the this?
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/29302617
has comment: http://stackoverflow.com/comment/46816706
has answer: http://stackoverflow.com/a/61736803
has body: Right now I use the b=AS:1000 in the offer SDP to set the upper limit(i.e. 1Mbps) for the upstream video to control the amount of video I am sending to the remote peer. I am looking into a different approach, so I was wondering if there is a way to control video frame rate on the fly of the current active video session? EDIT: I found out that getUserMedia supports minFrameRate and maxFrameRate parameters. So can I call getUserMedia while my peer connection is in session? Another similar use case, which find reasonable, is to be able to change the camera while I am already in a peer session? Without having to renegotiate SDPs, ICE, ... Is this doable?
answer count: 2
tagged with: webrtc
downvote count: 0
favorite count: 0
type: UnansweredQuestion
score: 7
upvote count: 7
has title: Control video send framerate on the fly in webrtc
type: Question
linked to: http://stackoverflow.com/q/63303684
has answer: http://stackoverflow.com/a/29359319
tagged with: javascript

http://stackoverflow.com/comment/46757168
type: QuestionComment
type: Comment
has text: Is there an alternative way to create a cookie, using c#, without restricting javascript access?
comment on: http://stackoverflow.com/q/29279589
score: 0

http://stackoverflow.com/q/29319391
accepted answer: http://stackoverflow.com/a/29319828
type: Question
has comment: http://stackoverflow.com/comment/46830448
tagged with: javascript
tagged with: jquery
score: 0
has title: check login and redirect before page load
has body: Is it possible using javascript to stop a page from loading and redirect if a cookie is not set. lets say the page index.html requires you to be logged in, and the only way to log in is via a cookie given by the page login.html how can i stop index.html loading and then redirect the user to login.html. Thanks in advance, i know how to do this in PHP but im having issues in javascript as it executes after the page loads and by then the user could just view-source:index.html to view the source code.
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/46830527
has answer: http://stackoverflow.com/a/29319828
has comment: http://stackoverflow.com/comment/46830395
has comment: http://stackoverflow.com/comment/46830408
linked to: http://stackoverflow.com/q/17420694
has comment: http://stackoverflow.com/comment/46830412
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46830489
tagged with: cookies
has comment: http://stackoverflow.com/comment/46830378

http://stackoverflow.com/comment/46861882
has text: Okay saw the error it was a typo. Okay thanks the answer was helpfull
comment on: http://stackoverflow.com/a/29336712
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/46750101
comment on: http://stackoverflow.com/a/29274646
type: AnswerComment
score: 0
has text: Hi Yuval your code is very useful for me. Thank you so much, but I need still more help from you. 1. Images and table not show in my content (ex: Location 1. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam. Lorem ipsum dolor sit amet, consectetur adipisicing elit Lorem ipsum dolor sit amet, consectetur adipisicing elit )
type: Comment

http://stackoverflow.com/comment/48376571
comment on: http://stackoverflow.com/a/29223794
has text: I'm using Google Chrome.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/46808131
comment on: http://stackoverflow.com/q/29306892
has text: Welcome to StackOverflow! Please be sure to read our [ask] page to help you formulate a great question. You are much more likely to get a good answer from the community if you put some effort into your question.
score: 1
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/46748429
comment on: http://stackoverflow.com/q/29274520
score: 0
type: Comment
type: QuestionComment
has text: What have your tried? Your fiddle has no javascript code.

http://stackoverflow.com/comment/46920374
type: AnswerComment
score: 0
type: Comment
has text: Nope, just used that as an example. I want to be able to get the accept-language header without making an additional http request.
comment on: http://stackoverflow.com/a/29369542

http://stackoverflow.com/comment/46680992
type: QuestionComment
comment on: http://stackoverflow.com/q/29234964
score: 0
has text: Have you tried [`fileSystem.root.getDirectory("...", {}, success, failure)`](http://docs.phonegap.com/en/edge/cordova_file_file.md.html#DirectoryEntry_getdirectory)? (I don't have a Cordova instance to test on, so I'm hesitant to post an answer.)
type: Comment

http://stackoverflow.com/comment/46716391
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29256853
has text: js supports lookaheads but not lookbehinds.

http://stackoverflow.com/q/29275704
has answer: http://stackoverflow.com/a/29275783
tagged with: javascript
type: UnansweredQuestion
has body: I have different span with the done_by class and I wanted to know if they are empty or not. $('.done_by').each(function() { var emptyTest = $(this).is(':empty'); console.log(emptyTest); }); And I have only 'false' responses. However I have the following code when I inspect my page As you can see some are filled and others are empty. But why did I have only false responses in my log console ? I tried with the .length attribute and if else statements but I have the same problem.
type: Question
score: 0
has title: Empty test failling
tagged with: php
answer count: 1

http://stackoverflow.com/q/29358458
has title: JavaScript: Is it possible to attach images/information to an array item?
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46901451
tagged with: web-scraping
has body: For example, say I want an array of songs which gets randomized, outputting a song title. var myArray = ['song1', 'song2', 'song3']; var random = myArray[Math.floor(Math.random() * myArray.length)]; document.write(random); but if I also wanted that songs album cover plus the description of the artist, is that possible? I imagine it is if I were to manually add each one individually to my code, but what if I wanted 1000's of songs?
linked to: http://stackoverflow.com/q/802854
score: -1
has comment: http://stackoverflow.com/comment/46901334
type: Question
has comment: http://stackoverflow.com/comment/46901477
answer count: 1
downvote count: 1
tagged with: arrays
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/29358629
has comment: http://stackoverflow.com/comment/46901428
upvote count: 0

http://stackoverflow.com/comment/46859137
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/29335256
has text: Can you fix you HTML, right now it's not very good.
type: Comment

http://stackoverflow.com/comment/46749265
score: 0
has text: Thanks for your reply, could you please let me which technology would support building these sort of applications?
comment on: http://stackoverflow.com/q/29271946
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46688242
has text: Well, the question has nothing to do with js or angular. Your code is invalid right now. Escape those quotes manually.
score: 0
comment on: http://stackoverflow.com/q/29240614
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29219068
has comment: http://stackoverflow.com/comment/46676686
score: 0
has body: The following demonstrates toggling the play state of a css animation to pause and play a marquee/slideshow/animation. The animation is using the background-position style declaration to change the displayed position of the background image, which is the following: // adapted from simurai's fiddle: http://jsfiddle.net/simurai/CGmCe/light/ var elm = document.querySelector("div.hi"); function pause() { console.log(elm); elm.className = "hi stop"; elm.onclick = play; } function play() { elm.className = "hi"; elm.onclick = pause; } elm.onclick = pause; .hi { width: 50px; height: 72px; background-image: url("http://s.cdpn.io/79/sprite-steps.png"); -webkit-animation: play 8s steps(1000) infinite; -moz-animation: play 8s steps(1000) infinite; -ms-animation: play 8s steps(1000) infinite; -o-animation: play 8s steps(1000) infinite; animation: play 8s steps(1000) infinite; } .hi.stop { -webkit-animation-play-state: paused; animation-play-state: paused; } @-webkit-keyframes play { from { background-position: 0px; } to { background-position: -500px; } } @-moz-keyframes play { from { background-position: 0px; } to { background-position: -500px; } } @-ms-keyframes play { from { background-position: 0px; } to { background-position: -500px; } } @-o-keyframes play { from { background-position: 0px; } to { background-position: -500px; } } @keyframes play { from { background-position: 0px; } to { background-position: -500px; } } &lt;div class="hi"&gt;&lt;/div&gt;
has comment: http://stackoverflow.com/comment/46656529
type: Answer
has comment: http://stackoverflow.com/comment/46676844
answers question: http://stackoverflow.com/q/29218278

http://stackoverflow.com/comment/46820583
type: QuestionComment
has text: @KA_lin is there any better way to set it in host.. the recommended solution is to check in each page.. but am searching for a solution to set a config once and not in the all pages.. thanks
comment on: http://stackoverflow.com/q/29302146
score: 0
type: Comment

http://stackoverflow.com/comment/46825996
score: 0
type: Comment
has text: Tried it, but it doesnt seem to be working, looks like the function call is not happening
type: AnswerComment
comment on: http://stackoverflow.com/a/29314383

http://stackoverflow.com/comment/46840505
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29323977
has text: @user2837167 I changed it to a *textarea* element so you can have multilines, made it *readonly*, and added some css styling to take off the borders and handle. I don't know any other way to dynamically select text so it can be copied to the clipboard. See the updated JSFiddle in the answer.

http://stackoverflow.com/comment/46786541
type: QuestionComment
has text: @LukeAdams I've tried that but the x and y aren't relative to the window so the popup opens in the wrong place
comment on: http://stackoverflow.com/q/29226561
score: 0
type: Comment

http://stackoverflow.com/comment/46710462
comment on: http://stackoverflow.com/a/29252594
score: 0
type: AnswerComment
has text: offset has the value 1 if 'a=' is present in cookie or -1 if it is not present. So its checking b is there or not? . So it make sense.
type: Comment

http://stackoverflow.com/q/29304920
has answer: http://stackoverflow.com/a/29434688
linked to: http://stackoverflow.com/q/17070238
linked to: http://stackoverflow.com/q/17887542
type: UnansweredQuestion
score: 3
tagged with: axis
downvote count: 0
tagged with: javascript
favorite count: 0
type: Question
has title: NVD3.js multichart with fixed x- and y-axis
linked to: http://stackoverflow.com/q/19048454
tagged with: nvd3.js
tagged with: d3.js
upvote count: 3
answer count: 1
has body: I´m using a NVD3.js multichart to display various data. Is it possible set a fixed range for the x- and y-axis. I´ve made a Plunker example: http://plnkr.co/edit/OLN87eIE21tImHktYIH6?p=preview var chart = nv.models.multiChart() .margin({top: 30, right: 60, bottom: 50, left: 70}) .color(d3.scale.category10().range()); chart.xAxis.tickFormat(function(d) { return d3.time.format('%H:%m')(new Date(d)); }); chart.yAxis1.tickFormat(d3.format(',.1f')); chart.yAxis2.tickFormat(d3.format(',.1f')); d3.select('#diagramChart svg') .datum(bpmData) .transition().duration(500).call(chart); I´d like to set the x-axis from 00:00 to 23:59 and stop it from resizing when one data is deselected. Same with the y-axis, but with other values. Is there a way to do this? Thanks!

http://stackoverflow.com/comment/46862240
type: Comment
comment on: http://stackoverflow.com/a/29336994
score: 0
type: AnswerComment
has text: Your syntax is fine. If there was something that was off in your syntax, we would have mentioned it.

http://stackoverflow.com/comment/46677759
score: 0
type: AnswerComment
has text: i changed my code to javascript. I hope this'll work, haven't tested it myself. @Peleke
type: Comment
comment on: http://stackoverflow.com/a/29234197

http://stackoverflow.com/comment/46832400
comment on: http://stackoverflow.com/a/29317172
has text: Thanks, but although it hides the bottom divs, the content within them still seems to show?
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/46691354
type: Comment
type: QuestionComment
score: 0
has text: No, the scope of this variable is within the function in which it is an argument of.
comment on: http://stackoverflow.com/q/29242640

http://stackoverflow.com/q/29294546
tagged with: javascript
score: 1
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/29383962
has answer: http://stackoverflow.com/a/29296342
tagged with: datepicker
has title: JQuery Datepicker does not work on IE 7
type: UnansweredQuestion
upvote count: 1
has body: I am using a Jquery Datetimepicker. Details of the Date Time Picker can be found at : DateTimePicker Details This date picker is set to appear on Click and is linked to input boxes. The Asp Code is mentioned below : &lt;link type=&quot;text/css&quot; href=&quot;css/jquery.datetimepicker.css&quot; rel=&quot;stylesheet&quot; /&gt; &lt;script type=&quot;text/javascript&quot; src=&quot;js/jquery-1.7.1.min.js&quot;&gt;&lt;/script&gt; &lt;script type=&quot;text/javascript&quot; src=&quot;js/jquery-ui-1.8.17.custom.min.js&quot;&gt;&lt;/script&gt; &lt;script src=&quot;js/jquery.datetimepicker.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt; &lt;script type=&quot;text/javascript&quot;&gt; $(document).ready(function () { /*DatePicker initializations*/ var DATEPICKER_FORMAT = 'm/d/Y'; var DATETIMEPICKER_FORMAT = 'm-d-Y H:i:s'; var TIMEPICKER_FORMAT = 'g:ia'; $(function () { $(&quot;.datepickerwithicon&quot;).datetimepicker({ format: DATEPICKER_FORMAT, datepicker: true, timepicker: false, step: 1, allowBlank: true, closeOnDateSelect: true, validateOnBlur: false }); $(&quot;.datetimepickerwithicon&quot;).datetimepicker({ format: DATETIMEPICKER_FORMAT, datepicker: true, timepicker: true, step: 5, allowBlank: true, closeOnDateSelect: true, validateOnBlur: false }); /* Append calendar icon image. */ $('.datepickerwithicon, .datetimepickerwithicon').each(function () { var dateInput = $(this); var newImgId = dateInput.attr('id') + '_icon'; $(&quot;&lt;img/&gt;&quot;, { &quot;src&quot;: &quot;Images/calendar-icon.png&quot;, &quot;class&quot;: &quot;ui-datepicker-trigger&quot;, &quot;id&quot;: newImgId }).insertAfter(dateInput); $('#' + newImgId).on('click', function () { dateInput.datetimepicker('show'); }); dateInput.click(function (event) { $('.xdsoft_datepicker.active .xdsoft_calendar').focus(); }); }); }); }); &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;form id=&quot;form1&quot; runat=&quot;server&quot;&gt; &lt;table&gt; &lt;tr&gt; &lt;td&gt; &lt;asp:Label ID=&quot;…
type: Question
has comment: http://stackoverflow.com/comment/46791439
tagged with: internet-explorer
answer count: 2
has comment: http://stackoverflow.com/comment/46865125
downvote count: 0

http://stackoverflow.com/comment/46733173
type: Comment
score: 0
comment on: http://stackoverflow.com/q/29264037
has text: I added an answer below utilizing jquery promises.
type: QuestionComment

http://stackoverflow.com/q/29241328
has answer: http://stackoverflow.com/a/29241585
tagged with: button
tagged with: javascript
tagged with: variables
tagged with: jquery
accepted answer: http://stackoverflow.com/a/29241401
type: Question
type: AnsweredQuestion
has title: variable in onclick function of dynamically created button
score: 0
answer count: 2
has body: Hy, Basically, I have a number of dynamically generated list items with a button in them. When I prepend the list item to the ul list, I have access to a variable that I want to pass when I click the button in the list items. But when I add the variable in the line of code shown below, it gives me a Uncaught ReferenceError: challenger is not defined error. How can I pass these variable along? JAVASCRIPT: window.GLOBAL_socket.on('challenged', function(data) { console.log("You have been challenged by the player " + data.challenger); var challenged = getUrlVars()['user']; var challenger = data.challenger; $("#challengesList").prepend(" You have been challenged by: " + data.challenger + " "); }); The onclick method is found on line 6. Thanks for your responses, Zeno
tagged with: dynamic
has answer: http://stackoverflow.com/a/29241401
possible better answer: http://stackoverflow.com/a/29241585

http://stackoverflow.com/comment/46875490
has text: Are there any side effects of this approach? Or the other approaches?
comment on: http://stackoverflow.com/a/29344603
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/29287311
accepted answer: http://stackoverflow.com/a/29288451
tagged with: datetime
answer count: 1
upvote count: 13
tagged with: asp.net-mvc-4
linked to: http://stackoverflow.com/q/2193012
has body: I want to know how I can pass datetime value through formdata and retrieve it in controller and convert it to DateTime in the controller I've tried as below: var formdata=new FormData(); fromDate = $('.from_date').datepicker('getUTCDate'); toDate = $('.to_date').datepicker('getUTCDate'); formdata.append("start", new Date(fromDate)); formdata.append("end", new Date(toDate)); and in $.ajax I am setting data:formdata in my controller I receive it as below: DateTime frmDate = Convert.ToDateTime(Request.Form["start"]).Date; DateTime toDate = Convert.ToDateTime(Request.Form["end"]).Date; But here I get a System.FormatException while trying to Convert to datetime and when I keep a watch for Request.Form["start"] then the value will be "Fri Mar 30 2015 05:30:00 GMT+0530 (Indian Standard Time)" but it considers it as string when retrieving from request. Is it possible to pass datetime type through Request?
tagged with: c#
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/29288451
linked to: http://stackoverflow.com/q/29293637
score: 13
type: AnsweredQuestion
tagged with: form-data
favorite count: 0
type: Question
has title: How to append datetime value to formdata and receive it in controller

http://stackoverflow.com/q/29306019
has comment: http://stackoverflow.com/comment/46806445
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has body: I was looking a solution to write one table, which comes from query to a DB in PHP, to a DIV, using Jquery. I'm not looking for the append's method, which I know works, but with append every time I press the button, which executes the query, the table is append to the document. The idea is not to load every time the page, but using the Jquery option, to send the post and get data back. Thank you. UPDATE &lt;script&gt; var values = {var1: 2, var2:"Hello"}; $.get("phpfile.php", values, function(data) { $('#id').append(data); }); Suppose that script is call from a "onclick()"; I don't want the append each time the data, but just write in a div.
score: -3
has answer: http://stackoverflow.com/a/29306173
tagged with: php
linked to: http://stackoverflow.com/q/10655424
linked to: http://stackoverflow.com/q/2202269
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29306146
has comment: http://stackoverflow.com/comment/46806615
has answer: http://stackoverflow.com/a/29306146
downvote count: 3
type: Question
has title: How to write a div with jquery or javascript?
answer count: 2
accepted answer: http://stackoverflow.com/a/29306173
upvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46806510
linked to: http://stackoverflow.com/q/5942105

http://stackoverflow.com/comment/46698316
type: AnswerComment
has text: It would, as long as the HTML structure never changes. But if he decides to change the layout he'd have to rewrite the code.
type: Comment
comment on: http://stackoverflow.com/a/29246112
score: 0

http://stackoverflow.com/a/29323522
answers question: http://stackoverflow.com/q/29323352
score: 0
type: Answer
has body: Try something like this.. $('.btn').click(function(a) { var filt = this.value.toLowerCase(); $('div p').hide(); $("div p").each(function() { var that = $(this); var text = that.text(); if (text.startsWith(filt)) that.show(); }); }); aas bas bass cas cass das eas fas gas

http://stackoverflow.com/q/29222745
tagged with: javascript
tagged with: browserify
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29222948
accepted answer: http://stackoverflow.com/a/29225075
has title: How do I exclude the "require('react')" from my Browserified bundle?
has answer: http://stackoverflow.com/a/29222948
favorite count: 0
has answer: http://stackoverflow.com/a/45845286
type: Question
linked to: http://stackoverflow.com/q/23125338
has body: I'm using Browserify to bundle a ReactJS application. All my components include a require("react") at the top. This causes Browserify to include the ReactJS source in my bundle. But I'd like to exclude it. How do I do that? Is this the right thing to do?
score: 18
has answer: http://stackoverflow.com/a/42602755
upvote count: 18
has answer: http://stackoverflow.com/a/29225075
tagged with: reactjs
answer count: 4
downvote count: 0

country
tag name: country
tags question: http://stackoverflow.com/q/29254740
type: Tag

http://stackoverflow.com/q/29354731
type: AnsweredQuestion
has title: view doesn't load when I mock backend
type: Question
tagged with: testing
tagged with: protractor
tagged with: javascript
has comment: http://stackoverflow.com/comment/46991645
linked to: http://stackoverflow.com/q/24946840
possible better answer: http://stackoverflow.com/a/29409335
has body: I'm trying to test one particular element of user interface. To do so I need particular request to my backend to respond with predefined data, but all other requests should pass through. Here's how I do it (coffee for more readability): describe 'select2 combobox widget', ()-&gt; httpBackendMock = () -&gt; angular.module 'httpBackendMock', ['ngMockE2E', 'fmAppApp'] .run ($httpBackend)-&gt; dummyCategories = [ {id: 1, name: 'foo', icon: '', user_id: 5}, {id: 2, name: 'bar', icon: '', user_id: 5}, {id: 3, name: 'baz', icon: '', user_id: 5}, {id: 4, name: 'quax', icon: '', user_id: 5} ] $httpBackend.whenGET '/api/categories' .respond ()-&gt; [200, dummyCategories] $httpBackend.whenGET /.*/ .passThrough() $httpBackend.whenGET /^\/views\// .passThrough() $httpBackend.whenGET /^\/scripts\/.*/ .passThrough() $httpBackend.whenGET /^\/scripts\// .passThrough() $httpBackend.whenGET /^\/bower_components\// .passThrough() $httpBackend.whenGET(/\.html$/).passThrough() browser .addMockModule 'httpBackendMock', httpBackendMock so basically what I do here is create new module on top of my application module fmAppApp and angular ngMockE2E and tell Protractor about it. And for the sake of completeness I'll show here one simple statement inside this describe block: it 'should allow user to type in anything', ()-&gt; browser.get 'http://localhost:9000/#/' element By.model 'category.selected' .click() input = element By.css '.ui-select-search' input.sendKeys 'newtestcategory' expect input.getAttribute('value') .toBe 'newtestcategory' when I run grunt protractor it opens browser, navigates to specified url (http://localhost:9000/#/) as it should and then I see blank page and spec failures with this error: NoSuchElementError: No element found using locator: by.model("category.selected") Unfortunately this message is all I have since I can't open firebug and see what went wrong for obvious reasons. I guess I could redirect logging from browser console somehow and see what is root of evil h…
has answer: http://stackoverflow.com/a/29409335
has answer: http://stackoverflow.com/a/29476675
answer count: 2
score: 2
downvote count: 0
tagged with: jasmine
favorite count: 0
tagged with: angularjs
upvote count: 2
accepted answer: http://stackoverflow.com/a/29476675

http://stackoverflow.com/comment/46844575
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29327085
has text: 1) You should cache the selector. 2) You probably can have a simpler check than the index === numberOfPhotos. 3) You may want to save the return value of that setInterval to stop it. I just wrote it as an example of how setInterval can solve your issue.

http://stackoverflow.com/a/29250354
answers question: http://stackoverflow.com/q/29250270
type: Answer
score: 3
has body: the best advice would be to use a CSS3. pretty easy no need for javascript: take a look at this for example: http://codeitdown.com/css-sprite-animations/ example here: http://jsfiddle.net/drukaman/ued7mLha/1/
has comment: http://stackoverflow.com/comment/46705032
downvote count: 0
has comment: http://stackoverflow.com/comment/46706812
upvote count: 3
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29250270

http://stackoverflow.com/comment/46671863
has text: Bit more info. First, [here's a screengrab](http://imgur.com/8OgHTPN) of it clearly on that line. Secondly, if I breakpoint that line, then hit play after it reaches the `debugger;` statement, it doesn't hit it. **However**, if I use F10 to step through the code, it goes into _both_ if blocks. Looks like a wierd bug in the firefox developer tools.
type: QuestionComment
comment on: http://stackoverflow.com/q/29232423
type: Comment
score: 3

http://stackoverflow.com/comment/46710816
has text: for safety i will use `LinkedHashMap` because the same order when i Initialize my map in controller I want it when i iterate over my map in javascript code
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29253474

http://stackoverflow.com/comment/46823728
comment on: http://stackoverflow.com/a/29315628
has text: I suggest you add `animation-timing-function: linear` and repeat the `red` color at the end.
type: AnswerComment
type: Comment
score: 2

http://stackoverflow.com/comment/46928368
type: QuestionComment
comment on: http://stackoverflow.com/q/29359177
has text: @Bergi thanks for that. I did think about that the first time through, but I revisited it, and read through Ben Alman's notes on the differences http://benalman.com/projects/jquery-throttle-debounce-plugin/, and I think you might be right - though, I think with a fast browser that can respond quickly, it minimizes the difference between the two.
type: Comment
score: 1

http://stackoverflow.com/comment/46731331
comment on: http://stackoverflow.com/a/29264307
type: AnswerComment
type: Comment
has text: Global matches via `.match()` [don't include groups in JavaScript](http://stackoverflow.com/questions/19913667/javascript-regex-global-match-groups). In addition, the regex should probably be changed to match a question mark _or an ampersands_ at the beginning. In addition, leave out any hash tags at the end in case of a fragment identifier in the URL. For instance: `/[?&]id=([^&#]+)/i`
score: 1

http://stackoverflow.com/comment/46925308
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29372234
score: 0
has text: And post the actual code here, "how many lines" notwithstanding. The question will be closed fairly quickly, otherwise.

http://stackoverflow.com/a/29455011
accepted answer of: http://stackoverflow.com/q/29359770
answers question: http://stackoverflow.com/q/29359770
has comment: http://stackoverflow.com/comment/47075114
type: AcceptedAnswer
score: 4
type: Answer
has body: Any new element injected in AngularJS element, that needs to be compile by using $compile service. After the compilation of angular directives &amp; scope variable binding will work. I'd suggest you to compile the table on loadComplete event of jqgrid, as this event event called when jqgrid fully gets render, &amp; also replace $.extend with angular.extend that will make code more readable in angular way. Pager element should also gone through compile cycle before appending it DOM. Directive (link function) link: function(scope, element, attrs) { scope.$watch('config', function(newValue) { element.children().empty(); var table = angular.element('&lt;table id="' + newValue.id + '"&gt;&lt;/table&gt;'); element.append($compile(table)(scope)); angular.extend(newValue, { jsonReader: { root: 'Rows', page: 'Page', total: 'Total', records: 'Records', repeatitems: false }, viewrecords: true, rowNum: 15, loadComplete: function() { //compiling DOM after table load $compile(angular.element('#' + newValue.id))(scope); }, rowList: [15, 30, 50], altRows: true }); if (newValue.pager) { var pager = angular.element('&lt;div id="' + newValue.pager + '"&gt;&lt;/table&gt;'); element.append($compile(pager)(scope)); angular.extend(newValue, { pager: '#' + newValue.pager, pagerpos: "center", recordpos: "right", pgbuttons: true, pginput: true }); } angular.element(table).jqGrid(newValue); }); } Working Plunkr Hope this could help you, still required any thing you can ask me anytime, Thanks.
upvote count: 4
has comment: http://stackoverflow.com/comment/47075125
downvote count: 0

http://stackoverflow.com/comment/46893475
score: 0
type: Comment
has text: okay brilliant thank you!! I see where i was confusing the system now! Thank you so much!
comment on: http://stackoverflow.com/a/29354091
type: AnswerComment

http://stackoverflow.com/comment/46867768
score: 0
type: Comment
type: QuestionComment
has text: try onchange for instead of onclick
comment on: http://stackoverflow.com/q/29339498

http://stackoverflow.com/a/29312368
has comment: http://stackoverflow.com/comment/46818245
score: 1
answers question: http://stackoverflow.com/q/29312328
upvote count: 1
type: Answer
downvote count: 0
has body: You could use an ajax function (js) to call your php function, and use it's output to be fed back into your javascript. A bit of jQuery code to give you an idea how this could work. $.ajax({ url: "http://example.com/somescript?value=1" }) .done(function( data ) { alert('php script returned: ' + data); });

http://stackoverflow.com/comment/46865240
comment on: http://stackoverflow.com/q/29338684
score: 0
type: Comment
type: QuestionComment
has text: If you need something that looks like "real" - implement a bubble sort. It's `O(N^2)`

http://stackoverflow.com/comment/46711952
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29253740
score: 0
has text: here is the link http://jsfiddle.net/A46UL/11/

http://stackoverflow.com/a/29315400
score: 6
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/29314823
accepted answer of: http://stackoverflow.com/q/29314823
type: Answer
upvote count: 6
has body: CasperJS is built on top of PhantomJS. PhantomJS has two contexts. The sandboxed page context that is accessible through evaluate() and the outer context which has access to require and phantom. Strangely enough, both contexts have access to window and document, but document doesn't mean anything in the outer context, because the DOM is empty. That is why querySelectorAll() doesn't find an element. The page DOM can only be accessed through evaluate(). So you need to execute your function in casper.evaluate(). The additional argument for your function is passed into evaluate() and not your function: function getLinks(findText) { ... } casper.then(function() { var myLinks = this.evaluate(getLinks, 'div.AjaxLink h3'); // THIS ... }); There is also an important note at the bottom of the evaluate page: Note: The arguments and the return value to the evaluate function must be a simple primitive object. The rule of thumb: if it can be serialized via JSON, then it is fine. Closures, functions, DOM nodes, etc. will not work!

http://stackoverflow.com/comment/46651289
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29220776
type: Comment
has text: Great - thanks so much. I will play around with that. Much bettter implementation.

http://stackoverflow.com/q/29243282
answer count: 0
has title: Interesting PL/SQL and Algorithmic analysis - trying to create a page
has comment: http://stackoverflow.com/comment/46696136
score: 1
upvote count: 1
type: Question
tagged with: graph
tagged with: algorithm
tagged with: javascript
has body: I have the following issue which I'm not really sure how to tackle. I'm trying to do this in APEX, and combine PL/SQL with JavaScript, HTML, CSS. I have: a list of raw materials with the duration of their production the list above includes also products made from the raw materials and the duration of the creating the products another list which is in fact a mapping that specifies what a product needs to be created (how many and which other products/raw materials) My goal is to create a way where someone says that he needs N pieces of product X and it would tell the user what raw materials he would need to create and how many. I'll give you an example: SE,TX,SS are raw materials D,FB are products SE takes 1.2 hours to create FB takes 1.8 hours to create D takes 2.7 hours to create TX takes 10.8 hours to create SS takes 14.4 hours to create 1 D = 1 FB + 1 SS 1 FB = 2 SE + 2 TX ------------------ 1 D = (2 SE + 2 TX) + 1 SS The user wants 4 D. He would need to create 8 SE, 8 TX, 4 SS. It would take him (but this is OPTIONAL): (D) 2.7 + (SE,TX,SS) max( (SE,TX) max(1.2,10.8) = 10.8, (SS) 14.4 ) = 14.4 = 17.1 hours What I've done so far is to build 2 tables. The Items table, where 4,7,8 are raw materials and 23,37 are products. ITEMS ITEM_ID NAME TIME 4 SE 1.2 7 TX 10.8 8 SS 14.4 23 FB 1.8 37 D 2.7 The Mapping table where I establish these relations: 1 D = 1 FB + 1 SS 1 FB = 2 SE + 2 TX MAPPING MAPPING_ID TO_BUILD_ITEM_ID REQ_ITEM_ID NO_OF_REQ_ITEM_ID 22 23 4 2 23 23 7 2 52 37 23 1 53 37 8 1 I've also created a view that kind of adds everything together: ID TO_BUILD ID_REQ REQ NO_REQ REQUIRED 4 SE - - 0 0x 7 TX - - 0 0x 8 SS - - 0 0x 23 FB 4 SE 2 2x SE 23 FB 7 TX 2 2x TX 37 D 8 SS 1 1x SS 37 D 23 FB 1 1x FB CREATE OR REPLACE FORCE VIEW "BIG_MAPPING" ("ID", "TO_BUILD", "ID_REQ", "REQ", "NO_REQ", "REQUIRED") AS SELECT i1.ITEM_ID ID, i1.NAME TO_BUILD, i2.ITEM_ID ID_REQ, i2.NAME REQ, m.NO_OF_REQ_ITEM_ID NO_REQ, m.NO_OF_REQ_ITEM_ID || 'x ' || i2.NAME REQUIRED FROM MAPPING m, IT…
tagged with: plsql
has comment: http://stackoverflow.com/comment/46694657
downvote count: 0
has comment: http://stackoverflow.com/comment/46696161
tagged with: oracle-apex
favorite count: 0
has comment: http://stackoverflow.com/comment/46694122
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46693840
has comment: http://stackoverflow.com/comment/46694880

http://stackoverflow.com/q/29265131
has comment: http://stackoverflow.com/comment/46732658
has body: I'm trying to get a random generator of text and images which should be super simple but I cannot for the life of me figure out why it's not working out. Any help is greatly appreciated! HTML Scroll Demo #1 Where would you live and what would you drive? CSS #container { width: 960px; margin-left: auto; margin-right: auto; border: gray solid; padding: auto; background-image: url(../images/house.jpg) no-repeat; } #text { font-size: 40px; text-align: left; } p { width: 100px; color: black; font-family: arial; font-size: 18px; text-align: left; } JQUERY $(document).ready(function(){ var car = ["limo", "golf cart", "pig"]; var images = ["house.jpg", "dumpster.jpg", "mansion.jpg"]; var x = images[Math.Floor(Math.random() * images.length)]; document.getElementById("text").innerHTML=car[x]; $('html').css({'background-image':'url(images/' + images [x] + ')'}); }); Thanks in advance!
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/46733120
tagged with: http://stackoverflow.com/tag/html
has title: Simple JQuery Array
tagged with: css
has comment: http://stackoverflow.com/comment/46733166
type: AnsweredQuestion
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/46732705
has comment: http://stackoverflow.com/comment/46732864
has comment: http://stackoverflow.com/comment/46732806
type: Question
has comment: http://stackoverflow.com/comment/46732972
has comment: http://stackoverflow.com/comment/46732786
tagged with: javascript
answer count: 1
tagged with: arrays
downvote count: 0
has answer: http://stackoverflow.com/a/29265191
accepted answer: http://stackoverflow.com/a/29265191

http://stackoverflow.com/q/29229338
has comment: http://stackoverflow.com/comment/46666754
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29231783
has comment: http://stackoverflow.com/comment/46665866
has comment: http://stackoverflow.com/comment/46667011
has comment: http://stackoverflow.com/comment/46665500
type: Question
has comment: http://stackoverflow.com/comment/46666236
has comment: http://stackoverflow.com/comment/46666868
tagged with: arrays
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/46667144
score: 0
has answer: http://stackoverflow.com/a/29231783
has comment: http://stackoverflow.com/comment/46665635
has comment: http://stackoverflow.com/comment/46666929
has comment: http://stackoverflow.com/comment/46665308
has title: Finding missing groups members in arrays
has body: I've got four lists - two for users and two for groups. I must check that in first users list they are users, which are not in second list. My code: importPackage(java.io); importPackage(java.lang); var list1 = "Han SOLO, Luke SKYWALKER, Darth VADER, Boba FETT".split(', ') ,list2 = "Luke SKYWALKER, Han SOLO, Lando CALRISSIAN, Boba FETT".split(', ') // group lists ,group1 = "Group1, Group1, Group1, Group2".split(', ') ,group2 = "Group1, Group1, Group2, Group2".split(', ') ,j = 0 ,msg = ""; for(var j = 0; j &lt; list2.length; j++) { if (list1.indexOf(list2[j]) == -1) msg = msg + list1[j] + " has been added to " + group1[j] + "&lt;br /&gt;"; } print(msg); The results of this code is: Darth VADER has been added to Group1 This result is good for me, but when I make that change: var list1 = "Han SOLO, Luke SKYWALKER, Darth VADER, Boba FETT".split(', ') ,list2 = "Luke SKYWALKER, Han SOLO, Darth VADER, Boba FETT".split(', ') // group lists ,group1 = "Group1, Group1, Group1, Group2".split(', ') ,group2 = "Group1, Group1, Group2, Group2".split(', ') result is empty, but it should be: Darth VADER has been added to Group1 I wonder what I should change, to correct this second script (where both users list are same).
has comment: http://stackoverflow.com/comment/46666648

http://stackoverflow.com/comment/46879073
comment on: http://stackoverflow.com/q/29346600
has text: http://jsfiddle.net/kqmp0o7r/
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29347959
has body: while (i &lt; theAgents[agentNumber].length) { var comm = theAgents[agentNumber][i][2]; commTotals += comm; console.log(commTotals); $(this).parent().find("#productionTotals").text(commTotals); i++ }; i should be less than length as it starts with 0.
score: 1
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/29347817
upvote count: 1

http://stackoverflow.com/q/29363626
has title: Javascript this.property undefined
tagged with: javascript
has body: I'm learning javascript and I can't figure out why this is not working? var obj = { a : 10, b : this.a } The 'b' property is undefined. How can I solve this problem?
score: 0
linked to: http://stackoverflow.com/q/133973
duplicate of: http://stackoverflow.com/q/4616202
tagged with: undefined
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46910706
linked to: http://stackoverflow.com/q/4616202
answer count: 0
has comment: http://stackoverflow.com/comment/46910806
type: Question
tagged with: object
has comment: http://stackoverflow.com/comment/46911104
has comment: http://stackoverflow.com/comment/46910917

http://stackoverflow.com/q/29291316
score: 5
has answer: http://stackoverflow.com/a/29413214
has answer: http://stackoverflow.com/a/29354290
possible better answer: http://stackoverflow.com/a/29291419
has comment: http://stackoverflow.com/comment/46779726
type: Question
has title: Return documents created since midnight
has answer: http://stackoverflow.com/a/29291419
has comment: http://stackoverflow.com/comment/46779742
has comment: http://stackoverflow.com/comment/47058637
upvote count: 5
answer count: 6
has comment: http://stackoverflow.com/comment/46779660
tagged with: mongodb
has comment: http://stackoverflow.com/comment/46779628
accepted answer: http://stackoverflow.com/a/29354290
downvote count: 0
has comment: http://stackoverflow.com/comment/46779600
tagged with: javascript
has comment: http://stackoverflow.com/comment/46779652
favorite count: 0
has comment: http://stackoverflow.com/comment/46779594
has answer: http://stackoverflow.com/a/29458721
has comment: http://stackoverflow.com/comment/46779705
has answer: http://stackoverflow.com/a/29423990
has body: I want to find all document's created since midnight, regardless of the users timezone. If the users on Pacific time, it should show all their documents since midnight Pacific. Same with Eastern time. I'm on Eastern time and this works for me: var d = new Date(); var midnight = d.setHours(0,0,0,0); // last midnight var count = Items.find({ username: Meteor.user().username, createdAt: { $gt: midnight } }).count(); But my client is on CST and it doesn't work for him. It instead shows documents created since like 10pm or 11pm CST the previous day. So this seems like a timezone issue for me.
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29412443

http://stackoverflow.com/a/29272688
downvote count: 0
upvote count: 2
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29272579
answers question: http://stackoverflow.com/q/29272579
type: Answer
has body: WHY? That's a global variable right? It is global, but for this particular tab/page instance. If you open that same page in other tab, javascript engine will initialize all variables, because it doesn't know that you have other tab. In your case you have multiple options. Perhaps, the most straightforward is to use serverside storage to preserve state. Or you can use simple cookies/localStorage approach, they are also shared by all pages on the same origin. I would go with WebStorage as simpler: function setData(val) { localStorage.checkVal = val; } function viewData() { return localStorage.checkVal; }
score: 2

http://stackoverflow.com/comment/46757703
score: 0
comment on: http://stackoverflow.com/q/29279751
type: Comment
type: QuestionComment
has text: Did you take a look at this answer: http://stackoverflow.com/a/15722372/3207406 ?

http://stackoverflow.com/comment/46849860
has text: actually u getting the length of the rows using `results.rows.length`. so what is the problem.
comment on: http://stackoverflow.com/a/29330028
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/46719647
score: 4
comment on: http://stackoverflow.com/q/29258672
has text: The first one is valid JS, the second one is a syntax error. However, assuming an expression context in both cases, the differences between them is the same as between `5` and `(5)` (none).
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29304283
has title: AngularJS Typeahead and $http request limiting
tagged with: typeahead
answer count: 1
tagged with: angularjs-bootstrap
tagged with: angularjs
type: UnansweredQuestion
type: Question
has answer: http://stackoverflow.com/a/29304424
tagged with: javascript
score: 0
has body: I'm trying to limit the amount of results Angular Bootstrap Typeahead returns when doing Async calls but it's not working at all. &lt;input type="text" ng-model="asyncSelected" placeholder="Locations loaded via $http" typeahead="address for address in getLocation($viewValue) | limitTo:3" typeahead-loading="loadingLocations" class="form-control"&gt; I added limitTo:3 to test it out in the Plunker example but it doesn't work, is there a way to do this or is this a bug in Typeahead? plnkr

http://stackoverflow.com/comment/46675181
score: 0
comment on: http://stackoverflow.com/q/29234495
has text: even webworkers are made to run in background without hanging browser, that while(running){} will hang it, the setTimeout will not act as a sleep in php, it is just a function call will not pause the while loop
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29391501
type: Answer
score: 0
has body: placed this in the view.php file: $PAGE-&gt;requires-&gt;js( new moodle_url($CFG-&gt;dirroot . '/mod/assign/myscript.js'));
answers question: http://stackoverflow.com/q/29373278

http://stackoverflow.com/comment/46845775
comment on: http://stackoverflow.com/q/29327922
has text: If it's a list, don't use a ` ` tag, use the ` ` (if unordered) or ` ` (if ordered) with ` ` as your list items.
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/q/29218820
downvote count: 0
favorite count: 0
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29218853
possible better answer: http://stackoverflow.com/a/29218855
accepted answer: http://stackoverflow.com/a/29218853
score: 1
upvote count: 1
has body: I'm having the following problem when I'm trying to access a data that has a key with a ".". data: { car.model: "Mercedez", car.color: "Blue" } //Javascript var model = result.data.car.model; var model = result.data.'car.model'; And I'm getting the following error: "Uncaught TypeError: Cannot read property 'model' of undefined" Is there a way i can read the car.model and car.color?
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/46646701
has title: How to access data with keyname with "."
answer count: 2
has answer: http://stackoverflow.com/a/29218855

http://stackoverflow.com/comment/46685128
type: AnswerComment
comment on: http://stackoverflow.com/a/29237814
score: 0
type: Comment
has text: Just an update, I put the following code in before calling the regex routine:

http://stackoverflow.com/a/29317789
has body: Lets step through it to help you visualise what is going on. When the interpreter reads your code, it evaluates function expressions inside-out. That is to say: callback(4, console.log("Hello")); // ^------------------^---- is evaluated before "callback" is called. A longer-form way of writing this which produces the same outcome would be: var result = console.log("Hello"); callback(4, result); The console.log function doesn't have a defined return value (or at least not a standardised one) - though incidentally all functions in javascript return something - when unspecified this value is literally undefined. So when you run your code you are essentially calling: callback(4, undefined); This means that inside callback, trying to call func as a function will result in: TypeError: undefined is not a function This is why you need to encapsulate your logic in a new function-closure - whereby func obtains a reference to a callable Function object. So How Can I Tidy Up My Code? Generally in simple cases like this, what you have done to solve the problem is perfectly acceptable but with more complex logic, you can often end up with several levels of nested callbacks (sometimes referred to as "callback-soup"). To improve readability where code reuse is common you can introduce a function-factory which hides away the nastiness, for example: function myLogger(message){ return function(){ console.log(message); } } callback(4, myLogger('hello'));
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29317045
score: 7
answers question: http://stackoverflow.com/q/29317045
upvote count: 7
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/a/29315678
score: 0
has body: You can use replace(',','') to take only numbers from string. var reverse = line[0].replace(',','').slice(0, parseInt(line[1],10)); var line = "1,2,3,4,5;2"; line = line.split(";"); console.log(line); var reverse = line[0].replace(',','').slice(0, parseInt(line[1],10)); console.log(reverse);
type: Answer
answers question: http://stackoverflow.com/q/29315642

keypress
tags question: http://stackoverflow.com/q/29283250
type: Tag
tag name: keypress

http://stackoverflow.com/comment/46943609
type: Comment
type: QuestionComment
has text: Phil, I'm not able to use the factory properly. I think there is an issue where I inject Data factory into FirstCtrl
comment on: http://stackoverflow.com/q/29360769
score: 0

http://stackoverflow.com/q/29275501
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/47051795
tagged with: oauth
answer count: 0
type: UnansweredQuestion
tagged with: facebook
has body: Time to reach out for some help! I have a site for which I am using Ajax and HistoryAPI for transitions between pages. This includes an integration with Facebook's OAuth API to populate short data capture forms for customers. This works great when visiting a page without the Ajax loading i.e. first visit or page refresh. But the Facebook integration is failing when I try it following an Ajax page load. When Facebook's dialogue box appears, it is blank and doesn't disappear. Using console.log I can see the position response from the API when I click the close button on the dialogue box. I can also see the userID and access_token returned when I close the dialogue box (visible via console.log). Here is my JS: $(document).ready(function() { functionOne(); functionTwo(); functionThree(); historyAPI(); }); function historyAPI() { String.prototype.decodeHTML = function() { return $("&lt;div&gt;", {html: "" + this}).html(); }; var $main = $("main"), init = function(href) { functionOne(); functionTwo(); functionThree(); }, ajaxLoad = function(html) { document.title = html.match(/&lt;title&gt;(.*?)&lt;\/title&gt;/)[1].trim().decodeHTML(); init(); }, loadPage = function(href) { $main.load(href + ' main&gt;*', ajaxLoad); $('html:not(:animated),body:not(:animated)').animate({ scrollTop: 0}); }; init(); $(window).on("popstate", function(e) { if (e.originalEvent.state !== null) { loadPage(location.href); } }); $(document).on('click', 'nav a', function() { var href = $(this).attr('href'); $(this).removeClass('active'); $('main').fadeOut(250); if (href.indexOf(document.domain) &gt; -1 || href.indexOf(':') === -1) { history.pushState({}, '', href); loadPage(href); return false; } }); } functionOne { // ... } functionTwo { // ... } functionThree { // ... } And my Facebook OAuth integration is handled by the following in a separate file: function statusChangeCallback(response) { if (response.status === 'connected') { } else if (response.status === 'not_authorized') { } else {} } funct…
upvote count: 1
has comment: http://stackoverflow.com/comment/52294550
score: 1
has comment: http://stackoverflow.com/comment/46973619
type: Question
has title: Facebook OAuth failing after Ajax / HistoryAPI page load
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46990904

http://stackoverflow.com/comment/46924623
type: Comment
comment on: http://stackoverflow.com/a/29371513
score: 0
type: AnswerComment
has text: @R3tep it's a matter of perspective. The template is easier to change. I could have left out HTML encoding but now it's general purpose and not tied to the given data set.

http://stackoverflow.com/a/29372253
score: 0
answers question: http://stackoverflow.com/q/29372055
has body: To keep from refreshing the page, and therefore reloading your JavaScript, you will probably want to look into an AJAX styled page. That way specific parts of the page can be reloaded or manipulated, JavaScript variables can be tweaked, but the entire page never reloads. If that is not a possibility, you will have to have your JavaScript send its current count when a link is clicked or form submitted, have your PHP catch that number, and then your PHP send the current count to your JavaScript when the page reloads.
type: Answer

http://stackoverflow.com/comment/46665346
score: 0
type: Comment
type: QuestionComment
has text: You can test this yourself here: https://jsperf.com/
comment on: http://stackoverflow.com/q/29229291

http://stackoverflow.com/a/29274956
has body: You should make order in your mind. The second function is PHP (server side), it searches for your results and then write that result in the $data variable and pass it to the view "media/search". So you should at least try to print out that variable to see if it works. To print it you can do in PHP: &lt;div id="results"&gt;&lt;?php echo $data?&gt;&lt;/div&gt;
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29274755

http://stackoverflow.com/comment/46924053
type: QuestionComment
comment on: http://stackoverflow.com/q/29292807
score: 0
has text: thanks for the quickly answer. Finally works but i don't know why doesn't works at the begining.
type: Comment

http://stackoverflow.com/comment/46647345
type: Comment
has text: It is working now... i just commented the data part from JQgrid with NavGrid in place(as mentioned by you), and after uncommneting the data part..it is all good.. Thank you Oleg :) ;)
type: AnswerComment
comment on: http://stackoverflow.com/a/29218644
score: 0

http://stackoverflow.com/q/29287550
tagged with: angularjs
answer count: 2
tagged with: angular-directive
linked to: http://stackoverflow.com/q/13892263
tagged with: angularjs-directive
has comment: http://stackoverflow.com/comment/46882343
has answer: http://stackoverflow.com/a/29349842
type: UnansweredQuestion
upvote count: 4
has answer: http://stackoverflow.com/a/29349752
downvote count: 0
tagged with: javascript
favorite count: 0
has title: angular directive clear field
type: Question
has body: I am trying to implement an angular directive in my ionic app to add an 'X' button to a text field that when clicked clears the text. The code is based on this repo: https://github.com/amageed/angular-resetfield I am unable to get the reset anonymous function called... I.e. the resetting log statement does not show, but the linking statement does: .directive('resetField', ['$compile', '$timeout', function($compile, $timeout) { return { require: 'ngModel', scope: {}, link: function(scope, el, attrs, ctrl) { console.log('linking '); // limit to input element of specific types var inputTypes = /text|search|tel|url|email|password/i; if (el[0].nodeName === "INPUT") { if (!inputTypes.test(attrs.type)) { throw new Error("Invalid input type for resetField: " + attrs.type); } } else if (el[0].nodeName !== "TEXTAREA") { throw new Error("resetField is limited to input and textarea elements"); } // compiled reset icon template var template = $compile('&lt;i ng-show="enabled" ng-click="reset();" class="icon ion-close reset-field-icon"&gt;&lt;/i&gt;')(scope); el.addClass("reset-field"); el.after(template); scope.reset = function() { console.log('resetting'); ctrl.$setViewValue(null); ctrl.$render(); $timeout(function() { el[0].focus(); }, 0, false); scope.enabled = false; }; el.bind('input', function() { scope.enabled = !ctrl.$isEmpty(el.val()); }) .bind('focus', function() { $timeout(function() { scope.enabled = !ctrl.$isEmpty(el.val()); scope.$apply(); }, 0, false); }) .bind('blur', function() { $timeout(function() { scope.enabled = false; scope.$apply(); }, 0, false); }); } }; }]); Here is the usage in HTML: &lt;input type="text" placeholder="Search" ng-model="query" autocorrect="off" reset-field&gt;
score: 4

http://stackoverflow.com/comment/46656157
score: 1
comment on: http://stackoverflow.com/a/29223797
type: AnswerComment
has text: @beta0x64 Seems [`e.which` is also deprecated](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/which).
type: Comment

url
tags question: http://stackoverflow.com/q/29243508
tags question: http://stackoverflow.com/q/29299053
tag name: url
tags question: http://stackoverflow.com/q/29250077
tags question: http://stackoverflow.com/q/29235112
tags question: http://stackoverflow.com/q/29237602
tags question: http://stackoverflow.com/q/29369577
tags question: http://stackoverflow.com/q/29260304
tags question: http://stackoverflow.com/q/29254862
tags question: http://stackoverflow.com/q/29348501
tags question: http://stackoverflow.com/q/29257906
tags question: http://stackoverflow.com/q/29360917
tags question: http://stackoverflow.com/q/29287102
tags question: http://stackoverflow.com/q/29260815
tags question: http://stackoverflow.com/q/29244768
tags question: http://stackoverflow.com/q/29317439
type: Tag

http://stackoverflow.com/q/29292809
downvote count: 0
tagged with: javascript
answer count: 1
tagged with: meteor
favorite count: 0
accepted answer: http://stackoverflow.com/a/29293971
has title: how do i stop a subscription in flow-router
type: AnsweredQuestion
score: 1
upvote count: 1
type: Question
tagged with: reactjs
has body: I am trying to load different 3rd party data based on the params on a route. The route doesn't change, just the param being send to it. I need to stop the subscription that is pulling in the data, clear the data, then send a new api request to populate the subscription. I'm using react-meteor with FlowRouter (and it works great!) -- view.jsx -- View = ReactMeteor.createClass({ getMeteorState: function(){ return { feed: Feed.find().fetch() } }, render: function(){ return ( {this.state.feed.map(function(post, i){ return &lt;ViewPost data={post} key={i} /&gt; })} ) } }) -- menu-list-item.jsx -- MenuListItem = ReactMeteor.createClass({ stopFeedSubscription: function(){ FlowRouter.stop('feedSub') Feed.remove({}) }, render: function(){ var route = "//view/"+this.props.data._id return ( &lt;li key={this.props.data._id} className="collection-item" data-post={this.props.data.name}&gt; &lt;a href="#" data-route={route} className="btn-post-list" onClick={this.stopFeedSubscription}&gt;{this.props.data.name}&lt;/a&gt; &lt;/li&gt; ) } }) When there is a click on the menu item, I want to stop any incoming data to that subscription and remove everything from it. When the /view/:id is re-rendered, a new call to the 3rd party api happens and it grabs new data. All of this works except that if data is still coming in when a menu item is clicked, it shows up in the new route which is supposed to display different data.
has answer: http://stackoverflow.com/a/29293971

http://stackoverflow.com/a/29290219
has body: It's because you're using a jQuery method, .attr(), on a non-jQuery object. $('.meteo')[0], becomes a native DOM element, and it doesn't have jQuery methods. You could use the .eq() method to access the the element by its index instead: $('.meteo').eq(h).attr('id', 'meteo' + h); You may also be able to change the id property directly: $('.meteo')[h].id = 'meteo' + h; or.. document.querySelectorAll('.meteo')[h].id = 'meteo' + h;
accepted answer of: http://stackoverflow.com/q/29290182
answers question: http://stackoverflow.com/q/29290182
type: Answer
score: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/46777540
has comment: http://stackoverflow.com/comment/46777676
upvote count: 3
type: AcceptedAnswer

http://stackoverflow.com/q/29329203
downvote count: 0
tagged with: javascript
tagged with: jquery
has body: How can I display my countdown timer in javascript alert box. alert box should be only one. The content in it must be changed. I want to saw the timer in alert box. for example. Here is my code. where should I put my javascript alert box. Please guide me towards this. Thanks in advance.
has answer: http://stackoverflow.com/a/29329417
answer count: 3
has title: javascript alert box which shows countdown timer
score: 3
possible better answer: http://stackoverflow.com/a/29329242
has answer: http://stackoverflow.com/a/29329242
has comment: http://stackoverflow.com/comment/46848129
favorite count: 0
has answer: http://stackoverflow.com/a/29329501
type: AnsweredQuestion
tagged with: alert
upvote count: 3
has comment: http://stackoverflow.com/comment/46848092
type: Question
accepted answer: http://stackoverflow.com/a/29329501
has comment: http://stackoverflow.com/comment/46848036

http://stackoverflow.com/q/29290356
has body: I have two nested database queries: db.query(query1, function (err, rows, fields) { if (!err) { console.log("outer rows.length: " + rows.length); function outer() { for (var i = 0; i &lt; rows.length; i++) { console.log(i + ". outer row"); function inner() { db.query(query2 + i + 1, function (error, r, f) { if (!error) { for (var j = 0; j &lt; r.length; j++) { console.log(j + ". inner row"); } } }); }; inner(); } } outer(); } }); I expect the log order to be... outer rows.length: 2 0. outer row 0. inner row 1. inner row 1. outer row 0. inner row However I get this result: outer rows.length: 2 0. outer row 1. outer row 0. inner row 1. inner row 0. inner row There are two inner rows which belong to 0. outer row und one inner row which belongs to 1. outer row. This code first logs all the outer rows, then all the inner rows. I´m looking for a way to prevent this. I think, the issue lies in the asynchronicity of the code. I have tried to fix it by putting function inner() into an immediately invoking function with the style ( function inner() { .. } )();, but this did not change anything. How can I determine that each inner row will be logged right after its corresponding outer row, just like in the first list? Any advice would be appreciated. Edit: It´s server-side JavaScript in Node.js using the node-mysql module.
tagged with: javascript
has comment: http://stackoverflow.com/comment/46778670
score: 0
tagged with: asynchronous
tagged with: node.js
type: UnansweredQuestion
has title: How to control the response order of a database query with JavaScript
tagged with: node-mysql
has answer: http://stackoverflow.com/a/29290414
tagged with: database
type: Question
answer count: 1

http://stackoverflow.com/a/29233936
has comment: http://stackoverflow.com/comment/46673879
has body: Why dont you use Math.pow function something like this, for (var base = 1;base &lt;=10;base++) {document.writeln("&lt;TR&gt;"); for (var count = 1; count &lt;=6; count++) { document.writeln( "&lt;TD&gt;" + Math.pow(base,count)+"&lt;/TD&gt;"); } document.writeln("&lt;/TR&gt;"); }
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29233778

http://stackoverflow.com/comment/46672583
type: AnswerComment
type: Comment
has text: Only replaces a single occurence
score: 1
comment on: http://stackoverflow.com/a/29233111

http://stackoverflow.com/comment/46690891
type: Comment
comment on: http://stackoverflow.com/a/29240538
type: AnswerComment
has text: Could you see if the code was triggered when your page loaded? Another option is to make myDiv1 style="display:block" by default. And add the id for the div in the variable that is tracking which div is open. Look at updated code.
score: 0

http://stackoverflow.com/comment/46745491
has text: @TienNguyen This is just for display `Next` div tag. It is not a problem
comment on: http://stackoverflow.com/q/29272384
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46758648
type: Comment
score: 3
has text: `c[10]` is add this value at position 10. Arrays run from 0 to their length, which means that that array has a length of 11.
comment on: http://stackoverflow.com/q/29280392
type: QuestionComment

http://stackoverflow.com/a/29981284
answers question: http://stackoverflow.com/q/29318898
score: 1
upvote count: 1
has body: You can find the subject like that : for (var headerIndex = 0; headerIndex &lt; resp.payload.headers.length; headerIndex++) { if (resp.payload.headers[headerIndex].name == 'Subject') { relateMailDetail.openMailSubject = msg.payload.headers[headerIndex].value; } if (resp.payload.headers[headerIndex].name == 'From') { relateMailDetail.from = msg.payload.headers[headerIndex].value; } if (resp.payload.headers[headerIndex].name == 'Date') { relateMailDetail.recieveDate = msg.payload.headers[headerIndex].value; } if (resp.payload.headers[headerIndex].name == 'To') { relateMailDetail.to = msg.payload.headers[headerIndex].value; } if (resp.payload.headers[headerIndex].name == 'Cc') { relateMailDetail.cc = msg.payload.headers[headerIndex].value; } if (resp.payload.headers[headerIndex].name == 'Reply-To') { relateMailDetail.replyTo = msg.payload.headers[headerIndex].value; } }
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/67934685
type: Answer
accepted answer of: http://stackoverflow.com/q/29318898

http://stackoverflow.com/q/29312969
tagged with: ajax
has comment: http://stackoverflow.com/comment/46819469
has answer: http://stackoverflow.com/a/29319658
has body: I have two forms, one for uploading a file and another for filling the form with information. I need to upload the file without refreshing the page first and then submit the form using ajax. And here are the codes: form_file Insert Employee AND HERE IS THE AJAX: I know how to submit data using ajax but I need help for how to upload a file using ajax without refreshing the page, and then take the name of that file, send it again with the form, and save it to database.
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46827753
has answer: http://stackoverflow.com/a/29313063
accepted answer: http://stackoverflow.com/a/29319658
tagged with: forms
type: Question
possible better answer: http://stackoverflow.com/a/29313063
score: 0
answer count: 2
tagged with: javascript
tagged with: jquery
has title: ajax upload file form

http://stackoverflow.com/comment/46823999
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29311511
has text: is this issue arising on mobile device or emulator???
score: 0

http://stackoverflow.com/a/29304424
score: 0
answers question: http://stackoverflow.com/q/29304283
has body: I think typeahead filters aren't working with async calls. See this thread : https://github.com/angular-ui/bootstrap/issues/993 It may be not as elegant, but you can filter results in the fetching function.
type: Answer

http://stackoverflow.com/a/29277341
upvote count: 1
has comment: http://stackoverflow.com/comment/46761966
has body: I also faced these problems here is how solve them First of all I identify what is different between two urls and in your case I can write this function toggleMe(btn){ btn.src = btn.src.indexOf("images/open.png")&gt;-1 ? btn.src.replace("images/open.png","images/close.png"):btn.src.replace("images/close.png","images/open.png"); }
downvote count: 0
has comment: http://stackoverflow.com/comment/46761713
has comment: http://stackoverflow.com/comment/46789722
type: Answer
answers question: http://stackoverflow.com/q/29277184
score: 1

http://stackoverflow.com/q/29354951
has body: I'm after some help regarding some coding within a Drupal site. I have page a, which has a list of services offered. page b has a contact form which has a contact form, and at the very top has a dropdown which contains a list of the services offered. What I'm after is that when a link is pressed on page a, the link that is pressed, sets the dropdown list value to the service that the link corresponds to. This is the code of the part of the form that I would like changing. Bike Enquiry General MOT Appointment Enquiry Restoration/Service Enquiry Sponsorship Other Any help would be greatly appreciated!
score: 1
has title: when link is pressed to set value in a dropdown list in a form on a different page
type: Question
linked to: http://stackoverflow.com/q/3724106
linked to: http://stackoverflow.com/q/901115
downvote count: 0
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/46895122
tagged with: jquery
has comment: http://stackoverflow.com/comment/46898239
has comment: http://stackoverflow.com/comment/46896118
favorite count: 0
has comment: http://stackoverflow.com/comment/46895208
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29356885
type: UnansweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/46895281
tagged with: drupal
tagged with: drupal-webform

http://stackoverflow.com/q/29370140
has comment: http://stackoverflow.com/comment/46923211
has body: I'm learning React and I have a specific example of trying to wire two components together through an interface. I have read most of the parent/child, child/parent and sibling component communication stackoverflow related questions and can't seem to find a proper answer. Say I have an App component that renders a Box and a Mover component. Quite simply, the Box has a move(x,y) function that I'd like the Mover to interface. However, the Mover doesn't have to be a child of Box (or any other relationship) -- specifically, I don't want the Box to pass down its own methods to the Mover. What I'd like to do in the App, is something like this: ... render: function() { return ( &lt;Box ref="box"/&gt; &lt;Mover box = {this.refs.box} /&gt; ) } .... However, you can't use refs in render() as clearly indicated in the docs and the box refs isn't defined anyways until it's mounted (so the box props won't work). I've thought of using an intermediate object: ... render: function() { var api = {box: undefined}; return ( &lt;Box api={api}/&gt; &lt;Mover api={api} /&gt; ) } .... Where Box sets itself in this.props.api in its componentDidMount method, but that's a little iffy. Another option would be to use the refs callback in the App to do the wiring, but that requires ugly glue code. Is there any other way to pass references to (yet uncreated) components between each other when rendering them? Or is there some more general design principle that I'm not adhering to?
favorite count: 0
has answer: http://stackoverflow.com/a/29390043
upvote count: 2
has title: Wiring between two child components
has comment: http://stackoverflow.com/comment/46923105
answer count: 1
has comment: http://stackoverflow.com/comment/46942600
tagged with: reactjs
score: 2
downvote count: 0
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46942038
type: Question

http://stackoverflow.com/comment/46882896
type: AnswerComment
comment on: http://stackoverflow.com/a/29339446
has text: Thanks for the reply, I updated the code with your suggestion and I pasted the results - the capture is still of the login page and not the "dashboard" page.
type: Comment
score: 0

http://stackoverflow.com/comment/46816725
score: 1
has text: Just as a tip: you can also convert numeric string numbers by prepending a plus in front of them, eg. `+"20" + +"100" = 120`, or `var xcrd = +document.getElementsByName("xco1")[0].value;` (just remember to add a space in front..)
type: Comment
comment on: http://stackoverflow.com/a/29308965
type: AnswerComment

http://stackoverflow.com/q/29284990
has body: I'm not sure what exactly is wrong with my code Empty NOW! Item OneRemove Item TwoRemove $('a.clear').click(function() { $(this).parent().remove(); if($('.list li').length == 0) { document.getElementById('placeHolder').style.display='block'; console.log('its empty now'); } return false; }); Let's say you removed the items from the list and li is now ZERO, I'm not sure why placeHolder doesn't actually display the placeHolder? I used console.log to make sure the length actually checked and it is a valid statement. Any suggestion on why getElementById not firing?
has comment: http://stackoverflow.com/comment/46767634
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/29285137
type: UnansweredQuestion
tagged with: css
has comment: http://stackoverflow.com/comment/46768604
type: Question
has title: placeHolder id not displaying using style.display
has comment: http://stackoverflow.com/comment/46768699
tagged with: javascript
has comment: http://stackoverflow.com/comment/46767674

http://stackoverflow.com/q/29292953
downvote count: 0
type: Question
upvote count: 2
linked to: http://stackoverflow.com/q/29251586
has title: jquery time-entry issues when multiple fields occur
answer count: 1
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/29293416
favorite count: 0
has comment: http://stackoverflow.com/comment/46782592
tagged with: time
has body: I have two time entry fields and two date fields in a form. Also there is a add more button to add more rows like this. Time-entry plugin is not working from second row onwards.Code is given below: Start Time: <button name="starttimenow" id="starttimenow" type="button" onclick="var currentDate = new Date(); var hours = currentDate.getHours(); var minutes = currentDate.getMinutes(); if(hours < 10) { hours = '0' + hours; } if(minutes < 10) { minutes = '0' + minutes; } $('#StartTime').val(hours + ':' + minutes);">Now Start Date: End Time: <button name="endtimenow" id="endtimenow" type="button" onclick="var currentDate = new Date(); var hours = currentDate.getHours(); var minutes = currentDate.getMinutes(); if(hours < 10) { hours = '0' + hours; } if(minutes < 10) { minutes = '0' + minutes; } $('#EndTime').val(hours + ':' + minutes);">Now End Date: I know I can change 'id' to 'class' in the lines: But there will be two classes and also the time-entry plugin is not working properly. Please help me to fix this. Thanks!
has answer: http://stackoverflow.com/a/29293416
score: 2
type: AnsweredQuestion

http://stackoverflow.com/comment/46655585
type: AnswerComment
comment on: http://stackoverflow.com/a/29223190
type: Comment
has text: Thanks for the solution @Rooster, really great that i get so many and fast solutions.
score: 0

d3.js
tags question: http://stackoverflow.com/q/29274612
tags question: http://stackoverflow.com/q/29219905
tags question: http://stackoverflow.com/q/29325040
tags question: http://stackoverflow.com/q/29277141
tags question: http://stackoverflow.com/q/29233368
tags question: http://stackoverflow.com/q/29362298
tags question: http://stackoverflow.com/q/29310184
tags question: http://stackoverflow.com/q/29362533
tags question: http://stackoverflow.com/q/29340190
tags question: http://stackoverflow.com/q/29371691
tags question: http://stackoverflow.com/q/29364194
tags question: http://stackoverflow.com/q/29369877
tags question: http://stackoverflow.com/q/29337042
tags question: http://stackoverflow.com/q/29251941
tags question: http://stackoverflow.com/q/29228428
tags question: http://stackoverflow.com/q/29267511
tags question: http://stackoverflow.com/q/29288370
tags question: http://stackoverflow.com/q/29278261
tags question: http://stackoverflow.com/q/29367420
tags question: http://stackoverflow.com/q/29267004
tags question: http://stackoverflow.com/q/29222662
tags question: http://stackoverflow.com/q/29261994
tags question: http://stackoverflow.com/q/29221075
tags question: http://stackoverflow.com/q/29321311
tags question: http://stackoverflow.com/q/29299315
tags question: http://stackoverflow.com/q/29360042
type: Tag
tags question: http://stackoverflow.com/q/29253081
tags question: http://stackoverflow.com/q/29346516
tags question: http://stackoverflow.com/q/29267238
tags question: http://stackoverflow.com/q/29225697
tags question: http://stackoverflow.com/q/29282120
tags question: http://stackoverflow.com/q/29273372
tags question: http://stackoverflow.com/q/29301151
tags question: http://stackoverflow.com/q/29254740
tags question: http://stackoverflow.com/q/29344672
tags question: http://stackoverflow.com/q/29312139
tags question: http://stackoverflow.com/q/29236117
tags question: http://stackoverflow.com/q/29255547
tags question: http://stackoverflow.com/q/29310862
tags question: http://stackoverflow.com/q/29369159
tags question: http://stackoverflow.com/q/29342670
tags question: http://stackoverflow.com/q/29238375
tags question: http://stackoverflow.com/q/29357160
tags question: http://stackoverflow.com/q/29229436
tags question: http://stackoverflow.com/q/29228850
tags question: http://stackoverflow.com/q/29301842
tags question: http://stackoverflow.com/q/29290814
tags question: http://stackoverflow.com/q/29322857
tags question: http://stackoverflow.com/q/29312024
tags question: http://stackoverflow.com/q/29349808
tag name: d3.js
tags question: http://stackoverflow.com/q/29282388
tags question: http://stackoverflow.com/q/29256675
tags question: http://stackoverflow.com/q/29359373
tags question: http://stackoverflow.com/q/29257809
tags question: http://stackoverflow.com/q/29243252
tags question: http://stackoverflow.com/q/29277771
tags question: http://stackoverflow.com/q/29339828
tags question: http://stackoverflow.com/q/29248342
tags question: http://stackoverflow.com/q/29292383
tags question: http://stackoverflow.com/q/29271654
tags question: http://stackoverflow.com/q/29316652
tags question: http://stackoverflow.com/q/29239350
tags question: http://stackoverflow.com/q/29287933
tags question: http://stackoverflow.com/q/29304920
tags question: http://stackoverflow.com/q/29259866
tags question: http://stackoverflow.com/q/29294044
tags question: http://stackoverflow.com/q/29337471
tags question: http://stackoverflow.com/q/29256329
tags question: http://stackoverflow.com/q/29307640
tags question: http://stackoverflow.com/q/29325495
tags question: http://stackoverflow.com/q/29238118
tags question: http://stackoverflow.com/q/29348782
tags question: http://stackoverflow.com/q/29310185
tags question: http://stackoverflow.com/q/29237330
tags question: http://stackoverflow.com/q/29309498
tags question: http://stackoverflow.com/q/29305824
tags question: http://stackoverflow.com/q/29276237

http://stackoverflow.com/comment/46892223
comment on: http://stackoverflow.com/q/29353032
type: QuestionComment
type: Comment
score: 1
has text: Which version of IE are you using ? I think IE8 had problems with span and display:none

http://stackoverflow.com/comment/46771017
type: QuestionComment
score: 0
has text: http://codepen.io/anon/pen/LEaPbE I am just wondering if there is a way for me to have the JS code in HTML. Instead of having 2 different files
comment on: http://stackoverflow.com/q/29286534
type: Comment

http://stackoverflow.com/comment/46868110
score: 0
type: Comment
type: AnswerComment
has text: Open Your Browser doesn't Support Required Component. This is the code which I am talking. I want google.com to open in the "main" frame
comment on: http://stackoverflow.com/a/29273043

http://stackoverflow.com/a/29368408
downvote count: 0
answers question: http://stackoverflow.com/q/29368077
type: Answer
has body: You create a table element and start to append the header elements and after the body rows like below. //create Table var table = document.createElement('table'); //create Table Header var header = ['Id', 'Color', 'Car' ]; var tr=document.createElement('tr'); for(var column in header) { var th=document.createElement('th'); th.innerHTML = header[column]; tr.appendChild(th) } table.appendChild(tr); //create Table Body var input = [ [8, 'Black', 'Lexus'], [9, 'Green', 'Mercedes'], [10, 'Brown', 'Cadillac'], [11, 'Gray', 'Porsche'] ]; for(var row in input) { var tr=document.createElement('tr'); for(var column in input[row]){ var td=document.createElement('td'); td.innerHTML = input[row][column]; tr.appendChild(td) } table.appendChild(tr); } // append Table document.body.appendChild(table);
upvote count: 1
score: 1

http://stackoverflow.com/q/29344120
tagged with: object
has comment: http://stackoverflow.com/comment/46885428
has comment: http://stackoverflow.com/comment/46903629
has comment: http://stackoverflow.com/comment/46889851
has comment: http://stackoverflow.com/comment/46903648
has comment: http://stackoverflow.com/comment/46890898
has comment: http://stackoverflow.com/comment/46884909
tagged with: javascript
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/29403377
accepted answer: http://stackoverflow.com/a/29403377
has comment: http://stackoverflow.com/comment/46889556
possible better answer: http://stackoverflow.com/a/29840467
has body: I'm trying to delete images off the server that's been there for more than 1 day, but for some reason it only deletes 20 images even though I set the limit to 1000. Here's the code: Parse.Cloud.job("deleteImages", function(request, status) { Parse.Cloud.useMasterKey(); //Get yesterday var ts = Math.round(new Date().getTime() / 1000); var tsYesterday = ts - (24 * 3600); var dateYesterday = new Date(tsYesterday*1000); //Query with limit 1000 var query = new Parse.Query("image"); query.lessThan("createdAt", dateYesterday); query.limit(1000); query.find({ success: function(result) { Parse.Object.destroyAll(result, { success: function() { status.success("Delete job completed"); console.log("Success"); }, error: function(error) { if (error.code == Parse.Error.AGGREGATE_ERROR) { for (var i = 0; i &lt; error.errors.length; i++) { console.log("Couldn't delete " + error.errors[i].object.id + "due to " + error.errors[i].message); status.error("Delete error :" + error); } } else { status.error("Delete error :" + error); console.log("Delete aborted because of " + error.message); } }, }); status.success("Delete job completed"); }, error: function(error) { status.error("Error in delete query error: " + error); alert('Error in delete query'); } }); }); Any help would be greatly appriciated! Thanks.
tagged with: parse-platform
has comment: http://stackoverflow.com/comment/46891371
has comment: http://stackoverflow.com/comment/46889714
has comment: http://stackoverflow.com/comment/46894210
has comment: http://stackoverflow.com/comment/46888969
tagged with: limit
has comment: http://stackoverflow.com/comment/46895730
has comment: http://stackoverflow.com/comment/46885011
has title: Parse javascript deleteAll() only deletes 20 objects even though my limit is 1000?
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46884722
has comment: http://stackoverflow.com/comment/46887701
has comment: http://stackoverflow.com/comment/46885834
has comment: http://stackoverflow.com/comment/46883979
has comment: http://stackoverflow.com/comment/46886124
has answer: http://stackoverflow.com/a/29840467
has comment: http://stackoverflow.com/comment/46895040
type: Question

http://stackoverflow.com/a/29290440
has comment: http://stackoverflow.com/comment/46784824
has comment: http://stackoverflow.com/comment/46795380
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/46785045
has body: Answers with lots of code is usually frowned on but this is a trivial solution as @imtheman pointed out in his answer. But not everything needs to be so concise. function makeOptionElement(value, title, selected) { var option = document.createElement('option'); option.value = value; if (selected) { option.setAttribute('selected', 'selected'); } option.innerHTML = title; return option; } function dataToOptions(data, selectedIndex) { var selectList = document.createElement('select'); data.forEach(function(item, index) { var isSelected = (index === selectedIndex); var option = makeOptionElement(item[0], item[1], isSelected); selectList.appendChild(option); }); return selectList; }
answers question: http://stackoverflow.com/q/29290058
downvote count: 0
has comment: http://stackoverflow.com/comment/46785265
type: Answer
has comment: http://stackoverflow.com/comment/46784947

http://stackoverflow.com/q/29255843
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29273131
has answer: http://stackoverflow.com/a/51857002
downvote count: 0
has answer: http://stackoverflow.com/a/70821794
tagged with: javascript
has answer: http://stackoverflow.com/a/78946844
favorite count: 0
type: Question
possible better answer: http://stackoverflow.com/a/51857002
score: 86
answer count: 11
accepted answer: http://stackoverflow.com/a/29273131
has answer: http://stackoverflow.com/a/63475968
has answer: http://stackoverflow.com/a/72195843
has comment: http://stackoverflow.com/comment/120700161
tagged with: localization
has answer: http://stackoverflow.com/a/54296697
has title: Is there a way to reverse the formatting by Intl.NumberFormat in JavaScript
tagged with: internationalization
has body: The Intl.NumberFormat (see Mozilla's doc) provides a nice way in Javascript to format numbers into a current locale`s version like this: new Intl.NumberFormat().format(3400); // returns "3.400" for German locale But I couldn't find a way to reverse this formatting. Is there something like new Intl.NumberFormat().unformat("3.400"); // returns 3400 for German locale Thanks for any help.
linked to: http://stackoverflow.com/q/55364947
has answer: http://stackoverflow.com/a/68950253
has answer: http://stackoverflow.com/a/33168651
upvote count: 86
has answer: http://stackoverflow.com/a/61808045
has answer: http://stackoverflow.com/a/65568607

http://stackoverflow.com/q/29342802
has comment: http://stackoverflow.com/comment/46872501
tagged with: jquery
type: UnansweredQuestion
has body: I found this light and great slider plugin https://raw.githubusercontent.com/ximan/swipeSlide/master/js/swipeSlide.js that work great in mobile but I also want it to be able to swipe in desktop. Then in the swipeSlide.js, I replaced this var events = ['touchstart','touchmove','touchend']; to this var events = ['mousedown','mousemove','mouseup']; but the behavior is not right. DEMO is here, to see it working u have to switch into mobile mode (using chrome inspection tool)
tagged with: zepto
has title: make this plugin able to swipe in desktop
answer count: 0
has comment: http://stackoverflow.com/comment/46872285
type: Question
tagged with: javascript
score: 0

http://stackoverflow.com/comment/46701123
score: 0
type: Comment
has text: I've updated my jsfiddle with multiple images and a zero-based array of images so you can see what i mean http://jsfiddle.net/ofekdkqp/1/
comment on: http://stackoverflow.com/a/29247746
type: AnswerComment

http://stackoverflow.com/a/29352666
has body: You can cache length for a slight speed improvement. If the keys in your array are identical for each element, you can get twice the speed (in Chrome) by caching Object.keys(options[0]), and iterating through that. Even if the keys aren't the same, you can still get approx. 25% increase in speed by iterating through Object.keys(options[i]). var options= []; for(var i = 0 ; i <= 1000 ; i++) { //create array of objects with random numbers options[i]= {}; for(var j = 0 ; j <= 5000 ; j++) { options[i][j]= Math.random(); } } var popOverOptions = {}; function keyin() { var timer= new Date(); for(var i = 0, leni = options.length ; i < leni; i++) { for(var key in options[i]) { popOverOptions[key] = options[i][key]; } } alert((new Date()-timer)/1000+' seconds'); } //keyin function objkeys(same) { var timer= new Date(), keys= Object.keys(options[0]); for(var i = 0, leni = options.length ; i < leni; i++) { if(!same) keys= Object.keys(options[i]); for(var key = 0, lenk = keys.length ; key < lenk ; key++) { popOverOptions[keys[key]] = options[i][keys[key]]; } } alert((new Date()-timer)/1000+' seconds'); } //objkeys key in options Object.keys, same keys per element Object.keys, different keys per element
score: 0
answers question: http://stackoverflow.com/q/29352105
type: Answer

http://stackoverflow.com/comment/46743240
has text: can you edit the fiddle create a better demo... also how is the li's populated
comment on: http://stackoverflow.com/q/29271295
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46837238
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/74014/discussion-between-guest271314-and-jfriend00).
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/29312732
type: Comment

http://stackoverflow.com/a/29293362
type: Answer
answers question: http://stackoverflow.com/q/29292709
has body: I don't use AngularJS, so I will approach with Javascript and jQuery. If Angular Service can give a solution for you, then go for it. ref. Clear all fields in a form upon going back with browser back button Modern browsers implement something known as back-forward cache (BFCache). When you hit back/forward button the actual page is not reloaded (and the scripts are never re-run). If you have to do something in case of user hitting back/forward keys -- listen for BFCache pageshow and pagehide events. A pseudo jQuery example: $(window).bind("pageshow", function() { // update hidden input field }); See more details for Gecko and WebKit implementations. With BFCache and sessionStorage, you can do on the form page, var input01 = $("#idName").val(); sessionStorage.input01 = input01; when you are back at it, $(window).bind("pageshow", function(){ $("#idNAme").val(sessionSotrage.input01); });
score: 0

http://stackoverflow.com/q/29258172
has title: How to find the first ancestor (of element table) without using multiple parent() call?
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29258207
type: Question
has comment: http://stackoverflow.com/comment/46718712
has comment: http://stackoverflow.com/comment/46718786
tagged with: javascript
tagged with: jquery
score: 0
has body: I have this structure: table &gt; thead &gt; tr &gt; th &gt; span I know $self is the span i clicked and that I can get the table with 4 parent() 's but how can I do it more smootly? It's like find() just up in the DOM, is that what closest() is for? var $table = $self.parent().parent().parent().parent();
accepted answer: http://stackoverflow.com/a/29258207
answer count: 1
has comment: http://stackoverflow.com/comment/46718727

http://stackoverflow.com/a/29223008
has body: This will depend upon several variables. How many simultaneous sockets is node.js configured to allow (this is a configuration option within node.js)? If all the requests are going to the same host, then how many simultaneous connections can that host handle? If the requests take a little time for the receiving server to process, how fast can it process each request and will it be able to process the last request in less time than your timeout value is set to? In general, it would be best to limit the number of simultaneous requests you send to the same host to something manageable like 5-10 because in most cases you won't actually get better throughput by sending more simultaneous requests, but you could exhaust some resources or hit timeouts with a lot of simultaneous requests. The actual max value is dependent upon a lot of configuration choices and specifics related to the type of request and would have to be discovered via testing.
type: Answer
accepted answer of: http://stackoverflow.com/q/29222929
score: 1
answers question: http://stackoverflow.com/q/29222929
upvote count: 1
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/29325819
answer count: 3
has body: I am trying to duplicate Expanding Text Areas Made Elegant Basically it explains how we can achieve something like fb comment box, where its size increases as text files the textarea. I have this in my index.html: And my test.js looks like: This doesn't really works. However if I move everything inside the js file to a script tag inside body then it works fine. So my index file would look like:
has title: Position of script tag in html
possible better answer: http://stackoverflow.com/a/29325875
tagged with: javascript
has answer: http://stackoverflow.com/a/29325875
tagged with: jquery
accepted answer: http://stackoverflow.com/a/29325899
linked to: http://stackoverflow.com/q/807878
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
type: Question
has answer: http://stackoverflow.com/a/29325932
has answer: http://stackoverflow.com/a/29325899
score: 0

http://stackoverflow.com/a/29353675
answers question: http://stackoverflow.com/q/29353625
type: Answer
score: 2
has body: You should bind the function to the parent div (and it is as main), which exist in the DOM and will exist, otherwise you can assign the function only to the elements, which already exist in DOM. $(document).ready(function() { $('#main').on("click","#a",function() { $(this).parent().append(' '); $(this).remove(); }) $('#main').on("click","#b",function() { $(this).parent().append(' '); $(this).remove(); }) });
has comment: http://stackoverflow.com/comment/46892500
upvote count: 3
type: AcceptedAnswer
downvote count: 1
accepted answer of: http://stackoverflow.com/q/29353625

http://stackoverflow.com/comment/100146766
type: AnswerComment
comment on: http://stackoverflow.com/a/29297375
has text: While the MDN page says "Date objects use a Unix Time Stamp, an integer value" and "A JavaScript date is fundamentally specified as the number of milliseconds that have elapsed since midnight on January 1, 1970, UTC", it also says both "When no parameters are provided, the newly-created Date object represents the current date and time, specified in the local time zone, as of the time of instantiation." and "It's important to keep in mind that the date and time is stored in the local time zone".
score: 0
type: Comment

http://stackoverflow.com/comment/46888535
type: Comment
score: 1
comment on: http://stackoverflow.com/q/29351471
type: QuestionComment
has text: Is there a reason you want to use foreach?

http://stackoverflow.com/a/29271536
score: 0
answers question: http://stackoverflow.com/q/29271377
type: Answer
has body: There are so many answered that you can use to achieve what you want. And you can try this one also. Here is some explanation. Basically, you need can use html5 data attribute to set the value to differentiate both button. When the button was clicked, you can check the value using condition as following code : HTML &lt;form&gt; &lt;input type="text" value="" id="name"/&gt; &lt;input type="submit" class="btn_submit" value="Submit validate" data-valid="yes"/&gt; &lt;input type="submit" class="btn_submit" value="Submit without validate" data-valid="no"/&gt; &lt;/form&gt; JS $(document).on('click', '.btn_submit', function(e){ e.preventDefault(); var data_valid = $(this).data('valid'); if(data_valid == "yes") { // doing your stuff here for validation like example below var input = $('#name').val(); if(input=="") { alert('required'); return; } // After the validation process finish, submit the form $('form').submit(); } else { // submit without validation $('form').submit(); } });

http://stackoverflow.com/comment/46776181
type: QuestionComment
comment on: http://stackoverflow.com/q/29269681
type: Comment
has text: I updated my question.. even after removing the first response.success(), still nothing.
score: 0

http://stackoverflow.com/q/29228371
tagged with: arrays
has comment: http://stackoverflow.com/comment/46663861
tagged with: javascript
tagged with: scope
upvote count: 3
answer count: 3
has title: Javascript array : problems with array declaration and access
has answer: http://stackoverflow.com/a/29231359
favorite count: 0
tagged with: declaration
has answer: http://stackoverflow.com/a/29228787
downvote count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29228908
has comment: http://stackoverflow.com/comment/46673844
score: 3
type: Question
has body: I'm currently working on a little project in order to learn the Js and the OOP. But I have a problem, let me explain the differents steps : 1) My constructor : function Ammo(ammoId,posX,posY){ this.id=ammoId; this.x=posX; this.y=posY; $('body').append('&lt;div class="ammo ammo'+this.id+'"&gt;&lt;/div&gt;'); } 2) Prototypes : Ammo.prototype.position = function(){ $('.ammo'+this.id).css({ 'top': this.y+"px", 'left': this.x+"px" }); } Ammo.prototype.ammomove = function(){ this.y-=1; this.position(); } 3) The call : ammo=[]; var a=1; function createAmmo(){ var ammoX=main.x; var ammoY=main.y; ammo[a] = new Ammo(a, ammoX, ammoY); ammo[a].position(); var animAmmo= setInterval("ammo["+a+"].ammomove()",5); a++; } createAmmo(); My program works perfectly. But when i declare my array with this syntax : var ammo = []; it doesn't work and i have the error "ammo is not defined", whereas this works : ammo = []; Anybody have an idea ? thx ! EDIT : here is my JsFiddle : https://jsfiddle.net/seabon/c057f1oj/ Press Space Bar for call createAmmo()

http://stackoverflow.com/q/29321742
has answer: http://stackoverflow.com/a/36008878
has comment: http://stackoverflow.com/comment/46837008
has answer: http://stackoverflow.com/a/48335220
has answer: http://stackoverflow.com/a/37230133
accepted answer: http://stackoverflow.com/a/29322242
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/50723285
has comment: http://stackoverflow.com/comment/134075900
has answer: http://stackoverflow.com/a/61902287
linked to: http://stackoverflow.com/q/9515704
has answer: http://stackoverflow.com/a/50204915
type: Question
tagged with: reactjs
has title: React - getting a component from a DOM element for debugging
upvote count: 112
possible better answer: http://stackoverflow.com/a/39165137
tagged with: javascript
has answer: http://stackoverflow.com/a/39165137
has answer: http://stackoverflow.com/a/44707025
has answer: http://stackoverflow.com/a/29322242
score: 112
has comment: http://stackoverflow.com/comment/46864453
linked to: http://stackoverflow.com/q/4532236
has comment: http://stackoverflow.com/comment/88455162
downvote count: 0
has body: For the purposes of debugging in the console, is there any mechanism available in React to use a DOM element instance to get the backing React component? This question has been asked previously in the context of using it in production code. However, my focus is on development builds for the purpose of debugging. I'm familiar with the Chrome debugging extension for React, however this isn't available in all browsers. Combining the DOM explorer and console it is easy to use the '$0' shortcut to access information about the highlighted DOM element. I would like to write code something like this in the debugging console: getComponentFromElement($0).props Even in a the React development build is there no mechanism to use maybe the element's ReactId to get at the component?
has comment: http://stackoverflow.com/comment/128057281
has comment: http://stackoverflow.com/comment/46835458
favorite count: 0
answer count: 9

http://stackoverflow.com/q/29343501
downvote count: 0
possible better answer: http://stackoverflow.com/a/29343659
has answer: http://stackoverflow.com/a/29343659
favorite count: 0
tagged with: angularjs
upvote count: 1
tagged with: css
has answer: http://stackoverflow.com/a/29343650
has title: Hiding elements until load has been completed (ng-cloak isn't what I needed)
type: AnsweredQuestion
score: 1
accepted answer: http://stackoverflow.com/a/29343650
type: Question
has body: I'm writing an AngularJS application, but I'm quite new to it, so in the code below, please point out any issues that you have. I do have my AngularJS application defines like that: var OfficeUIModule = angular.module('OfficeUI', ['ngSanitize']); Then, I do have a couple of services that loads data from various JSon files. But i won't post the code here, because I do believe that irrelevant. Then I do have my controller which basically looks like this: OfficeUIModule.controller('OfficeUIController', function($scope) { }); Now, I want the controller to execute some logic on startup and show a DIV element on it. Here's the case what I want to do: Show a Loading DIV element during initial setup. Show a Displaying DIV element when the initialization has been done. Let's say that in my controller I do have method to initialize the application: OfficeUIModule.controller('OfficeUIController', function($scope) { function Init() { // I'll load all the data from the services here. } }); In order to call this method on startup, I just define it in my controller like so: OfficeUIModule.controller('OfficeUIController', function($scope) { Init(); function Init() { // I'll load all the data from the services here. } }); And the HTML which I would like to use is the following: LOADING DISPLAYING When the page is initially loaded, I would like to show the element 'Loading'. When the page has been loaded, I would like to show the element 'Displaying'. In order to make this testable, I've changed my controller method Init to include a timeout of 5 seconds, just like below: OfficeUIModule.controller('OfficeUIController', function($scope) { Init(); function Init() { setTimeout(function() { alert('Page has been loaded. When you click OK the displaying DIV should be showed.'); }, 5000); } }); So, in this particular case, I would like to make sure that the page is being loaded, displaying the LOADING div and after 5 seconds, display the DISPLAYING div. I would also like not to see any flic…
tagged with: javascript
tagged with: jquery
answer count: 2
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/29341928
type: Answer
answers question: http://stackoverflow.com/q/29341687
has comment: http://stackoverflow.com/comment/46870806
has comment: http://stackoverflow.com/comment/46871146
has comment: http://stackoverflow.com/comment/46871616
has body: That's because the html element is stripped when the string is parsed: > $(' hi ') [​hi​​] i.e. the current collection contains an element that you are trying to find(). As the top-level a element doesn't (and can't) have a descendants the find() call will return an empty collection. From jQuery documentation: When passing in complex HTML, some browsers may not generate a DOM that exactly replicates the HTML source provided. As mentioned, jQuery uses the browser's .innerHTML property to parse the passed HTML and insert it into the current document. During this process, some browsers filter out certain elements such as , , or elements. As a result, the elements inserted may not be representative of the original string passed. edit: The second snippet can find() a element as when the html element is stripped the top-level element of the collection is a div element that does have a descendant.
score: 2
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29341687
upvote count: 2

http://stackoverflow.com/a/29367662
has comment: http://stackoverflow.com/comment/46917631
has comment: http://stackoverflow.com/comment/46918001
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46917593
accepted answer of: http://stackoverflow.com/q/29367539
type: Answer
answers question: http://stackoverflow.com/q/29367539
has comment: http://stackoverflow.com/comment/46917812
has body: thats fiddle with example: https://jsfiddle.net/03jqfx6g/ thats ans: var button = document.createElement("button"); button.dataset.detail = JSON.stringify(name); button.innerHTML = "Add To Basket" document.getElementById("homePageSection").appendChild(btn);
score: 0
has comment: http://stackoverflow.com/comment/46917720
has comment: http://stackoverflow.com/comment/46917688

http://stackoverflow.com/comment/46711873
type: QuestionComment
comment on: http://stackoverflow.com/q/29254349
score: 0
has text: @thefourtheye Making a very simple stacked bar chart. I have already a bar chart with just one value to show, but when was time to try to implement stacked values I reached that point that I need to go through many key-value. I know there are many charts out there, but I need some special visual effects that needs to be added, and I gone to do it for my self, success till stacked.
type: Comment

xamarin.android
type: Tag
tag name: xamarin.android
tags question: http://stackoverflow.com/q/29334279

http://stackoverflow.com/a/45845286
answers question: http://stackoverflow.com/q/29222745
upvote count: 0
score: -2
has body: You can also use the externals section in the webpack.config.js file. eg:- externals: { // require('jquery') is loaded externally and avaliable as jQuery "jquery": "jQuery" } See https://webpack.github.io/docs/library-and-externals.html
type: Answer
downvote count: 2

http://stackoverflow.com/comment/46723642
comment on: http://stackoverflow.com/q/29260664
type: QuestionComment
has text: Yes that is correct. I never moved anything except change the actual main folder name. I replaced the src as the absolute path and it still gives me the error.
score: 0
type: Comment

http://stackoverflow.com/a/29334993
score: 0
has body: try re-firing the keyup event once you add/delete row by calling $(".calculate-rows").keyup();
answers question: http://stackoverflow.com/q/29334694
type: Answer

http://stackoverflow.com/comment/46660020
has text: Good point, but I don't know the name of html page, HTML page is dynamically loaded in UIWebview.
comment on: http://stackoverflow.com/q/29226081
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/a/29282752
has comment: http://stackoverflow.com/comment/46765109
has comment: http://stackoverflow.com/comment/46765501
type: Answer
has body: It's a fairly convoluted way of adding one number to another number - a + b. It contains extra logic to parse a as a European-style number in string form (remove all the .s, take the part before the , and then reconstruct the result in European number format afterward (incorrectly if the a or the result is greater than 999999). It does not have the same logic in place for parsing b, so I would presume that b is being passed in as a number value rather than a string. function CompareAmounts(a, b) { var c = /^\-/gi; var d = ""; var e = ""; if (a.match(c)) { a = a.replace(c, ""); a = a.replace(".", ""); a = a.split(","); a[0] = (parseInt(a[0]) - parseInt(b)).toString(); if (parseInt(a[0]) &lt; 0) { a[0] = (a[0] * -1).toString(); } else { d = "-"; e = ""; } } else { a = a.replace(".", ""); a = a.split(","); a[0] = (parseInt(a[0]) + parseInt(b)).toString(); } if (a[0].length &gt; 3) { var f = a[0].substr(0, a[0].length - 3); var g = a[0].substr(a[0].length - 3, a[0].length); a[0] = f + "." + g; } a = d + a.toString() + e; return a; } snippet.log(CompareAmounts("1.234,55", 12)); snippet.log(CompareAmounts("-10", 5)); snippet.log(CompareAmounts("50.400,80", 100)); snippet.log(CompareAmounts("1.000.000,00", 1)); // incorrect result snippet.log(CompareAmounts("-50,80", 100)); // incorrect result &lt;!-- Provides the `snippet` object, see http://meta.stackexchange.com/a/242144/134069 --&gt; &lt;script src="http://tjcrowder.github.io/simple-snippets-console/snippet.js"&gt;&lt;/script&gt;
has comment: http://stackoverflow.com/comment/46765500
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/46765383
accepted answer of: http://stackoverflow.com/q/29282061
upvote count: 1
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29282061

http://stackoverflow.com/comment/46724213
has text: I did that because - d3.text(file, function (datasetText) - the first argument accepts something like "File.csv" If I put the whole path the processing of csv doesn't happen. How do I go about this? @RocketHazmat
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29260863

http://stackoverflow.com/a/29257073
accepted answer of: http://stackoverflow.com/q/29256940
type: Answer
has comment: http://stackoverflow.com/comment/46717508
has comment: http://stackoverflow.com/comment/46717648
has comment: http://stackoverflow.com/comment/46717626
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/46717289
has body: .closest traverse parent elements. Since audio is not a parent of .sharebtn, $(this).closest('audio') will return nothing. But .shareoptions is a sibling of .sharebtn, so just use .siblings() or .next(). $(this).next('.shareoptions').removeClass('hide');
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/29256940

http://stackoverflow.com/comment/46896400
type: AnswerComment
comment on: http://stackoverflow.com/a/29355677
type: Comment
has text: how does it will reload the controller?
score: 0

http://stackoverflow.com/comment/46784948
type: QuestionComment
type: Comment
has text: Its not matter, how many images in bottom side, i just want images scrolling in a loop (means not end on a particular point). i am talking about bottom slider which you can see on link or see in snippet.
comment on: http://stackoverflow.com/q/29294093
score: 0

http://stackoverflow.com/q/29248881
answer count: 2
has title: Anonymous define() module in library's dependencies causes breakage for library's dependents
has answer: http://stackoverflow.com/a/29638835
tagged with: browserify
has body: I'm working on a library that is used in a number of web applications. The library itself does not use RequireJS - it's written in node, and then bundled with browserify - however, some of its dependents are using a RequireJS shim to include the library. What we've found is that the RequireJS shim used by our dependents breaks with an "mismatched anonymous define()" error, if our library depends on a library that includes an anonymous define module, such as this one from the lodash source: // Define as an anonymous module so, through path mapping, it can be // referenced as the "underscore" module. define(function() { return _; }); I've found the RequireJS documentation on this problem; but all of its solutions seem to be with the assumption that the library importing the library with the anonymous module is using RequireJS, which isn't the case here. How can I deal with this so that the downstream libraries don't need to do any special handling in order to require our library? Ideally, it'd be nice if we don't have to add custom logic for every library that we use with an anonymous module definition in it, too.
possible better answer: http://stackoverflow.com/a/29932404
tagged with: requirejs
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29638835
tagged with: amd
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/29932404
score: 0

http://stackoverflow.com/comment/50228653
comment on: http://stackoverflow.com/q/29293452
type: QuestionComment
has text: I have the same question too
type: Comment
score: 0

http://stackoverflow.com/q/29331249
score: 7
has answer: http://stackoverflow.com/a/29332028
downvote count: 4
answer count: 3
has comment: http://stackoverflow.com/comment/46852371
tagged with: javascript
has comment: http://stackoverflow.com/comment/46852378
has answer: http://stackoverflow.com/a/29332271
has body: I have many CSS &amp; JS files. Ideally, I just want to use some command line tool to select all those css &amp; js files, and minify them into one file each. Any simple tools for this?
has comment: http://stackoverflow.com/comment/46851822
favorite count: 0
has title: Minify CSS / JS files and create one file using a command line
has comment: http://stackoverflow.com/comment/46851915
tagged with: minify
tagged with: css
upvote count: 11
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46852331
has answer: http://stackoverflow.com/a/35651772
type: Question
has comment: http://stackoverflow.com/comment/46851744
has comment: http://stackoverflow.com/comment/46851798
has comment: http://stackoverflow.com/comment/46851852

http://stackoverflow.com/q/29249741
type: Question
answer count: 2
downvote count: 0
has title: $(this) is alerting previous selected values in jquery
tagged with: javascript
score: 1
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/29249768
has body: I am using $(this) to get the current selected(clicked) element of a specific class .For the first time its coming fine i.e i am getting the selected element but as soon as i click on second time it is giving the alert of the old as well as new selection .I am not able to find out what is the issue.. Here is the code.. $('.l-one').click(function () { var tableName = $(this).text(); //Table Name Lable $("#lbl").text(tableName); //Panel $("#Perticulars").show(); $('.my-new-three').click(function () { var dishvalue = $(this).text(); //get the value of dish item and display in the table //console.log(dishvalue); alert(tableName); alert(dishvalue); if (localStorage.getItem(tableName) != null) { alert("b"); In the alert(tableName); i am getting alert of all the tables selected previously .Please help me to resolve this.. Thanks...
has comment: http://stackoverflow.com/comment/46703833
possible better answer: http://stackoverflow.com/a/29249814
has answer: http://stackoverflow.com/a/29249814
upvote count: 1
accepted answer: http://stackoverflow.com/a/29249768
type: AnsweredQuestion

http://stackoverflow.com/q/29362110
answer count: 2
tagged with: jquery
has answer: http://stackoverflow.com/a/29362187
has comment: http://stackoverflow.com/comment/46908521
has comment: http://stackoverflow.com/comment/46908192
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/16344354
has answer: http://stackoverflow.com/a/29362168
type: Question
possible better answer: http://stackoverflow.com/a/29362168
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29362187
has title: Text fade in and out jquery
has body: I have an issue. I have two text. On page load when first text fades out i want the second text to fade in same line and the second text should stay. Here is my fiddle http://jsfiddle.net/st6rxwjr/1/ Here is my code : Welcome to our site Company Name CSS: body { padding-top:30px;} .text2 { display: none; } div { font-size:30px; font-weight:bold; text-transform:uppercase; text-align:center; } JS : function fade() { $('.text1').fadeIn().delay(2000).fadeOut(); $('.text2').delay(2000).fadeIn(); } fade();
score: 0

http://stackoverflow.com/comment/46711157
has text: So what doesn't work as expected, what is the problem exactly? You're not even using $interval in the included code segments.
score: 1
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29253927

http://stackoverflow.com/a/29353285
downvote count: 0
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/29353043
type: Answer
has comment: http://stackoverflow.com/comment/46891804
has body: YTimes Our Story F 2.0 Riverrun

http://stackoverflow.com/comment/46857630
type: Comment
type: QuestionComment
has text: Yeah, it doesn't like that either. I'm really new to angular so this is confusing! No idea why it would only populate scope on the second click.
comment on: http://stackoverflow.com/q/29333681
score: 0

http://stackoverflow.com/q/29303561
has comment: http://stackoverflow.com/comment/46804207
has body: I want to write a computed so I can choose between text input and text from a select drop down, but somewhere down the route I´m stuck. I have an '' collecting my text string From a '' I can choose among 'Projects'. Then I have a checkbox which decides whether the text from the selected project should override my input-textstring. If the is empty. the selected project.title should set it. This is my code: HTML: <select data-bind="options: $root.Projects, optionsCaption: '< choose project >', optionsText: 'title', value: $root.selected"> Use project title as action I prefer: Project: To do: And my javascript: Project = function(data){ var self = this; self.id = data.id; self.title = ko.observable(data.title); }; var viewModel = function () { var self = this; self.Projects = ko.observableArray(); // data self.Projects.push(new Project({ id: 1, title: 'Friday night live' })); self.Projects.push(new Project({ id: 2, title: 'Saturday morning gym' })); self.selected = ko.observable(); self.toDoUseProjectTitle = ko.observable(false); self.toDoProjectAction = ko.computed(function () { var title; var project = self.selected(); if (project) { title = project.title(); } return title; }); self.toDo = ko.computed({ read: function (value) { if (self.selected()) { // not 'undefined' or null if (self.toDoUseProjectTitle() || value === null) { value = self.selected().title(); } } return value; }, write: function (value) { return value; }, owner: self }); }; ko.applyBindings(new viewModel()); Fiddle: http://jsfiddle.net/AsleG/srwr37k0/ Where do I go wrong?
has answer: http://stackoverflow.com/a/29305408
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46804299
tagged with: knockout.js
type: Question
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46803397
has title: How to make double input writeable ko.computed
score: 0
accepted answer: http://stackoverflow.com/a/29305408
answer count: 1

http://stackoverflow.com/comment/46859667
type: Comment
comment on: http://stackoverflow.com/q/29335032
type: QuestionComment
score: 0
has text: But id I want change variable angulars by Jquery, is possible?

http://stackoverflow.com/comment/46802151
score: 0
has text: You don't display or download 1Gb of data in browser. Basic solution would be to implement pagination and corresponding API to fetch only portions you need.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29303523

http://stackoverflow.com/comment/46660735
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/29226595
has text: can you please explain a bit in detail. I couldnt get fully.
type: Comment

http://stackoverflow.com/comment/46737176
has text: https://css-tricks.com/fighting-the-space-between-inline-block-elements/
comment on: http://stackoverflow.com/q/29267835
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/a/29273467
has comment: http://stackoverflow.com/comment/46746566
answers question: http://stackoverflow.com/q/29273254
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46747051
type: Answer
has body: xmlhttp.onreadystatechange is assigned within a conditional wrapper - it won't be assigned unless xmlhttp was already in readyState 4 and had status 200 (and that's not likely). Try swapping the lines if(xmlhttp.readyState==4 &amp;&amp; xmlhttp.status==200){ and xmlhttp.onreadystatechange=function(){
upvote count: 1
score: 1
accepted answer of: http://stackoverflow.com/q/29273254

http://stackoverflow.com/q/29296452
tagged with: backbone.js
has title: Populate Backbone Collection to table
has body: I already fetch JSON data but I have a difficulties on populating it on the table. Any help? I have already response json data: data Object { 4c064462f170f63d57f55ab55e6b36f1={...}, b4f68bc5c045d2e88840995a47f7ddf5={...}} 4c064462f170f63d57f55ab55e6b36f1 Object { rowid="4c064462f170f63d57f55ab55e6b36f1", id="1", qty="3", more...} b4f68bc5c045d2e88840995a47f7ddf5 Object { rowid="b4f68bc5c045d2e88840995a47f7ddf5", id="6", qty="2", more...} This is my JS Code var Feed = Backbone.Model.extend({ }); var Stream = Backbone.Collection.extend({ url: function () { return BASE_URL + 'api/remotejson'; }, model: Feed, parse: function (response) { var tags = response.data; return tags; } }); var FeedView = Backbone.View.extend({ tagName: "tr", template: $("#feedTemplate").html(), render: function () { var tmpl = _.template(this.template); this.$el.html(tmpl(this.model.toJSON())); return this; } }); var StreamView = Backbone.View.extend({ el: $("#main-section"), initialize: function () { this.collection = this.options.collection; this.render(); this.collection.on("add", this.renderFeed, this); }, render: function () { var that = this; this.collection.fetch({success: function () { _.each(that.collection.models, function (item) { that.renderFeed(item); }, this); } }); }, renderFeed: function (item) { var feedView = new FeedView({ model: item }); this.$el.find('#options-table tbody').append($(feedView.render().el).hide().fadeIn('slow')); }, loadMore: function () { this.collection.page += 10; this.render(); } }); This is my html template ID Quantity
type: UnansweredQuestion
tagged with: codeigniter
has comment: http://stackoverflow.com/comment/46789331
has answer: http://stackoverflow.com/a/29297262
tagged with: underscore.js
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/46789184
tagged with: javascript
has comment: http://stackoverflow.com/comment/46789362
has comment: http://stackoverflow.com/comment/46789401
type: Question
score: 0
has comment: http://stackoverflow.com/comment/46789294
has comment: http://stackoverflow.com/comment/46789416
has comment: http://stackoverflow.com/comment/46789417
answer count: 1

http://stackoverflow.com/q/29222634
has comment: http://stackoverflow.com/comment/46691296
upvote count: 2
has answer: http://stackoverflow.com/a/29245062
type: Question
has title: HTML/JS - Create a "double-level" of anchors
has comment: http://stackoverflow.com/comment/46695393
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46654068
answer count: 2
has answer: http://stackoverflow.com/a/29263176
downvote count: 0
tagged with: fullpage.js
favorite count: 0
has body: im developing a one-page-based website. The main page has vertical scrolling through a menu and sections/data-anchors. Now i'd need to put in one section an horizontal slider. To be more specific, i have div which is filled by a php script with one or more tables. If one table is enough for all informations, no problems. But if one table is not enough, i'd need to dynamically create an horizontal slider into the div, where each slide is another divwith a table inside. I have already done it (im not sure i want to post the code, i'd need to much lines). My problem is split the anchors of the main page with the anchors of the horizontal slider. Currently, im able to get XXX tables printed by a php script into an horizontal slider. The problem is that, if i want to go at "page 5" of the slider, clicking on the link i get the browser searching for a "page 5" into the main page instead of into the horizontal slider Hence, How i can split, keep separeted, the anchors of the main page and the anchors of the slider? Thanks. EDIT Im trying to use FullPage horizontal slider, since my main page too is based on FullPage.js. Im echoing from a php script both the slide div and the table div . The result structure is as follow: Hello I need a dynamic table below here!! well..now clicking on one of the links to navigate into the slides, i get "page mysite/#tables/slideX doesnt exist".. well.. if i try to set links like "mysite#tables/slideX" (so without the forward slash), i get no more errors but nothing happen. Where am i wrong with the creation of the sections/slides? how i can get a link like this http://alvarotrigo.com/fullPage/#secondPage/2 with the forward slash, which splits the sections links and page links? thanks
type: UnansweredQuestion
tagged with: php
tagged with: css
score: 2

http://stackoverflow.com/a/29319772
has comment: http://stackoverflow.com/comment/46831570
has body: I'd suggest, to add the with the relevant class: // iterates over each of the found elements: $('li a').append(function (i) { // i: the index of the current element/node in // the collection returned by the selector: // returning the created element to the append method: return $('', { // setting the className of the created element: 'class' : 'fa ' + iconsArray[i] }); }); var iconsArray = ['fa-search', 'fa-toggle-up', 'fa-link']; $('#nav li a').append(function(i) { return $('', { 'class': 'fa ' + iconsArray[i] }); }); Or, with plain JavaScript: var iconsArray = ['fa-search', 'fa-toggle-up', 'fa-link'], // using CSS notation with document.querySelectorAll() to // retrieve the relevant elements: navAnchors = document.querySelectorAll('#nav li a'), // using Array.prototype.slice() (with Function.prototype.call()) // to convert the NodeList to an array: navAnchorsArray = Array.prototype.slice.call(navAnchors, 0), // creating an element: iElem = document.createElement('i'), // an empty variable for use within the loop (later): clone; // all created elements need the 'fa' class for // font-awesome, so we add that here (once, for all), // using the HTMLElement.classList API: iElem.classList.add('fa'); // iterating over each of the elements held in the array: navAnchorsArray.forEach(function (anchor, index) { // cloning the created element (to avoid calling // document.createElement() multiple times): clone = iElem.cloneNode(); // adding the class-name from the iconsArray: clone.classList.add(iconsArray[index]); // appending the cloned/created to the : anchor.appendChild(clone); }); var iconsArray = ['fa-search', 'fa-toggle-up', 'fa-link'], navAnchors = document.querySelectorAll('#nav li a'), navAnchorsArray = Array.prototype.slice.call(navAnchors, 0), iElem = document.createElement('i'), clone; iElem.classList.add('fa'); navAnchorsArray.forEach(function (anchor, index) { clone = iElem.cloneNode(); clone.classList.add(iconsArray[index]); anchor.appendChild(clone); }); Refe…
answers question: http://stackoverflow.com/q/29319682
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/46831932
upvote count: 2
score: 2

http://stackoverflow.com/q/29300273
type: Question
has comment: http://stackoverflow.com/comment/46795348
tagged with: javascript
tagged with: jquery
tagged with: ajax
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/29300376
has body: In the code, .moneychoose is the div in moneychoose.jsp. $(".moneychoose") can not be selected in the ajax call. $("input[name='money']").on("click", function() { if ($("#money").find(".moneychoose")) { $(".moneychoose").remove(); } //append external html $.get("moneychoose.jsp", function (data) { $("#money").append(data); }); $.ajax({ type: "POST", url: "src/province_price.json", data: '', dataType: "json", async: "false", success: function(response) { console.log($(".moneychoose")); }, error: function(qXhr, status, error) { alert(status + ':' + error + ':' + qXhr.responseText); } }); }); But if i add console.log($(".moneychoose")) after "append external html", $(".moneychoose") in ajax call can be selected. why? however, the $(".moneychoose") after "append external html" still can not be selected. $("input[name='money']").on("click", function() { if ($("#money").find(".moneychoose")) { $(".moneychoose").remove(); } //append external html $.get("moneychoose.jsp", function (data) { $("#money").append(data); }); console.log($(".moneychoose")); $.ajax({ type: "POST", url: "src/province_price.json", data: '', dataType: "json", async: "false", success: function(response) { console.log($(".moneychoose")); }, error: function(qXhr, status, error) { alert(status + ':' + error + ':' + qXhr.responseText); } }); });
has title: jQuery select the appended element in an ajax call dose not work
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46795318
has comment: http://stackoverflow.com/comment/46795485
accepted answer: http://stackoverflow.com/a/29300376

http://stackoverflow.com/q/29328029
upvote count: 1
has comment: http://stackoverflow.com/comment/47301736
score: 1
tagged with: ui-automation
type: Question
tagged with: testing
answer count: 2
has comment: http://stackoverflow.com/comment/46866199
tagged with: javascript
has answer: http://stackoverflow.com/a/29371476
has answer: http://stackoverflow.com/a/34159986
has body: I'm quoting this example: casper.test.begin('Google search retrieves 10 or more results', 5, function suite(test) { ... }); casper.test.begin('Casperjs.org is first ranked', 1, function suite(test) { ... }); While executing the first test suite in this example, how do I skip to the test suite? I want to jump to "Casperjs.org is first ranked" test suite in the above example? Or in other words, is there a way to skip to the next available casper.test.begin() block? I have tried out test.skip() and the given documentation doesn't give me ideas on how to achieve the above.
downvote count: 0
has comment: http://stackoverflow.com/comment/47348965
has title: CasperJS - How to Skip to next test suite?
favorite count: 0
tagged with: casperjs
has comment: http://stackoverflow.com/comment/46848277
type: UnansweredQuestion

http://stackoverflow.com/q/29219194
has comment: http://stackoverflow.com/comment/46648718
has body: I'm trying to create a script that will keep divs fixed in their position no matter where they are on the screen when the page is scrolled... Basically, if a div is 50 px from the top, it will stay 50 px from the top of the current window. If a div is 0 px from the top, it will stay 0 px from the top. I don't want a fixed div because of the cut-off problems they have... So please don't recommended changing the position to 'position: fixed;'... A script I was working with was essentially doing the following: window.onscroll = function() { var elements = document.getElementsByClassName('sticky_div'); var doc = document.documentElement; for (i = 0; i &lt; elements.length; i++) { rect = elements[i].getBoundingClientRect(); if (doc.scrollTop &gt; rect.top) { elements.style.top = doc.scrollTop + rect.top; } else { elements.style.top - doc.scrollTop - rect.top; } } } I'm sorry if that actually comes out wrong. I accidentally deleted my original code... Either way, the above method caused to be too laggy and it would jump the headers and divs. Are there any other ways of doing this using less over-the-top processing to do? elements.style.top = doc.scrollTop; works very well but it won't allow for divs that are positioned elsewhere on the page... Here's a JSFiddle for the reason why I don't want to use fixed divs (try scrolling horizontally): https://jsfiddle.net/o27L3uss/
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46647476
has comment: http://stackoverflow.com/comment/46647855
has comment: http://stackoverflow.com/comment/46649211
favorite count: 0
upvote count: 2
has comment: http://stackoverflow.com/comment/46647448
type: UnansweredQuestion
tagged with: css
has title: Vanilla JS Sticky Divs?
answer count: 0
has comment: http://stackoverflow.com/comment/46647484
score: 1
has comment: http://stackoverflow.com/comment/46647968
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/46648967
tagged with: javascript

http://stackoverflow.com/comment/46698826
type: QuestionComment
has text: BTW that is an **object** not **Array**.
type: Comment
comment on: http://stackoverflow.com/q/29246725
score: 0

titanium
type: Tag
tags question: http://stackoverflow.com/q/29254339
tag name: titanium
tags question: http://stackoverflow.com/q/29249656

http://stackoverflow.com/comment/46862542
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29337127
has text: possible duplicate of [Javascript multidimentional array sorting by numerical order](http://stackoverflow.com/questions/8070452/javascript-multidimentional-array-sorting-by-numerical-order)
score: 0

computed-properties
type: Tag
tags question: http://stackoverflow.com/q/29280445
tag name: computed-properties

http://stackoverflow.com/a/29258207
has comment: http://stackoverflow.com/comment/46718928
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29258172
has comment: http://stackoverflow.com/comment/46719410
has comment: http://stackoverflow.com/comment/46718884
type: Answer
has comment: http://stackoverflow.com/comment/46719110
has body: You can use jQuery's .closest() function. Example: var $span = $('#mySpan'); var $span_table = $span.closest('table');
score: 3
has comment: http://stackoverflow.com/comment/46718934
upvote count: 3
has comment: http://stackoverflow.com/comment/46718924
answers question: http://stackoverflow.com/q/29258172

http://stackoverflow.com/a/29290085
has comment: http://stackoverflow.com/comment/46787260
has comment: http://stackoverflow.com/comment/46777415
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46777382
has body: To do this, you'll want to use String.fromCharCode() var es = ''; for (var i = 0; i &lt; 9999; ++i) { es = String.fromCharCode(i); // ... } The \uNNNN syntax only works with constant values inside the larger string constant. edit &mdash; an important comment below points out that due to the problematic UTF-16 implementation of JavaScript strings, .fromCharCode() has problems with characters outside the Basic Multilingual Plane. For that, the ES6 (ES2015) has String.fromCodePoint(), a similar function that does handle "astral" characters outside the 16-bit range. More on that here and in the link in the comment.
score: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/29290039
answers question: http://stackoverflow.com/q/29290039
has comment: http://stackoverflow.com/comment/46779164
upvote count: 1
has comment: http://stackoverflow.com/comment/46784000
downvote count: 1
has comment: http://stackoverflow.com/comment/46797179

http://stackoverflow.com/q/29289445
answer count: 2
has title: posting JSON object with jquery
has comment: http://stackoverflow.com/comment/46776031
tagged with: jquery
has answer: http://stackoverflow.com/a/29289504
has body: I have a JSON object: var formData = {"field1":field1, "oper1":oper1, "value1":value1, "field2":field2, "oper2":oper2, "value2":value2, "field3":field3, "oper3":oper3, "value3":value3}; and I'm trying to post it with $.post("&lt;%=request.getRequestURL().toString()%&gt;getXML.jsp", formData, function(response){getXML(response)}); I need the post to be formData = {json object} so I can get it from the request object with request.getParameter("formData"). However, everything is being posted by each key:value in the request, so I can't get the object by the formData name. I've tried stringifying the object and changing formData to {"formData":formData}in the jquery call, but nothing seems to be working. {"formData":formData} puts the parameters in this format: formData[field1] lname formData[field2] fname formData[field3] title formData[oper1] contain formData[oper2] contain formData[oper3] contain formData[value1] smith formData[value2] formData[value3] Is there a way to pass the object as the variable name "formData"?
has answer: http://stackoverflow.com/a/29304325
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29289504
tagged with: java
tagged with: http://stackoverflow.com/tag/json
type: Question
has comment: http://stackoverflow.com/comment/46776103
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29304325
score: 0

http://stackoverflow.com/q/29349746
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46887959
has comment: http://stackoverflow.com/comment/46885677
has comment: http://stackoverflow.com/comment/46886168
has answer: http://stackoverflow.com/a/34155722
tagged with: angularjs
type: Question
has title: Angular '$resource' definition supplies only one record instead of all
score: 0
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/46888443
answer count: 1
has body: I am using bourne as a json provider. I am trying to fetch all the data from a json file, but i am getting only single data... what is wrong here: $resource destination : angular.module('ContactsApp') .factory('Contact', function($resource){ return $resource('/api/contact/:id', {id:'@id'}, { 'update':{method:'PUT'} }); }) My controller : angular.module('ContactsApp') .controller('ListController', function($scope, Contact){ $scope.contacts = Contact.query(); //returns only one... $scope.fields = ['firstName', 'lastName']; $scope.sort = function (field) { $scope.sort.field = field; $scope.sort.order = !$scope.sort.order; } $scope.sort.field = 'firstName'; $scope.sort.order = false; })
has comment: http://stackoverflow.com/comment/46885944
tagged with: javascript

http://stackoverflow.com/comment/46780663
type: QuestionComment
type: Comment
score: 0
comment on: http://stackoverflow.com/q/29285151
has text: ` jQuery MultiSelect Plugin Tests ` You are using MultiSelect plugin, could you include a link to the page in which you get the code?

http://stackoverflow.com/a/33794651
answers question: http://stackoverflow.com/q/29334730
upvote count: 1
type: Answer
downvote count: 0
score: 1
has body: Not sure if you're still struggling with this or not, but try turning off turbolinks. Similar issue reported here

http://stackoverflow.com/comment/46709068
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29247444
score: 0
has text: try this http://jsfiddle.net/supercool/0bww2apv/4/ let me know just in-case . cheers

http://stackoverflow.com/a/29297897
has body: As other said, JavaScript uses clients system time, but you can create date object from server time, so every client will get the same current time. var date = new Date("&lt;?php echo date("Y-m-d H:i:s");?&gt;"); It will work only on page load. If you want to check later for dates still valid, then you need to synchronize current date with server date every couple of seconds.
upvote count: 3
type: Answer
downvote count: 1
score: 2
answers question: http://stackoverflow.com/q/29297257

http://stackoverflow.com/comment/46663936
type: Comment
comment on: http://stackoverflow.com/a/29226666
has text: @JoystanFernandes, Please clarify your problem statement. you want modal settings css?
type: AnswerComment
score: 0

http://stackoverflow.com/a/29341821
downvote count: 2
upvote count: 1
has body: You should read the documentation at Jquery docs about find() $('html').find('a'); Check this jsfiddle
type: Answer
answers question: http://stackoverflow.com/q/29341687
score: -1

http://stackoverflow.com/q/29265575
tagged with: floating-point
has answer: http://stackoverflow.com/a/29265695
type: Question
possible better answer: http://stackoverflow.com/a/29265711
tagged with: javascript
has answer: http://stackoverflow.com/a/29265711
has body: The user can provide any kind of data. I need to make sure the input string contains only floating point number. So I need to make sure the data contains only numbers or a dot (.) and return false if the input data has anything other than numbers or a dot. Can someone help me with the javascript regular expression? I tried searching a lot. But I could not find any help for my specific case. So this should return characters for cases like 12.09a23 aa12.12 abcd Update I donot want to see if the input string has floating point number. I want to see if the input has anything other than floating point number. For example, if the input has 12.3aa23, I want to show the input has aa so this is an invalid input.
answer count: 2
accepted answer: http://stackoverflow.com/a/29265695
has title: Javascript regular expression to find any character other than floating point numbers in the input
has comment: http://stackoverflow.com/comment/46734683
has comment: http://stackoverflow.com/comment/46735789
tagged with: regex
type: AnsweredQuestion
score: 0

http://stackoverflow.com/comment/46797520
comment on: http://stackoverflow.com/q/29301375
score: 1
has text: If the "virtual" pixel geometry of the ` ` does not match the aspect ratio of the physical geometry in the document, then things get weird.
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29352208
score: 1
upvote count: 1
tagged with: windows-phone-8
type: Question
tagged with: c#
tagged with: javascript
answer count: 1
downvote count: 0
favorite count: 0
tagged with: cordova
has answer: http://stackoverflow.com/a/29352692
accepted answer: http://stackoverflow.com/a/29352692
type: AnsweredQuestion
has body: It appears there is no way to fire a "function" when the app is closed and navigated to via a "Toast" not while the app is open. I realize that you can do this: protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e) { base.OnNavigatedTo(e); try { if (this.NavigationContext.QueryString["NavigatedFrom"] == "toast") // this is set on the server { this.CordovaView.StartPageUri = new Uri("//www/index.html#notification-page", UriKind.Relative); } } catch (KeyNotFoundException) { } } The problem is that this triggers the app to be reloaded and all localstorage is lost. We can't use query strings as it fires an error when the app loads. I'd like to try to do something like this in the callback: this.CordovaView.CordovaBrowser.InvokeScript("eval", new string[] { // some script here to callback to the JS level }); But this appears the CordovaView isn't fully loaded at this point, and don't actually fire the function on the app side. Is there anything I can do to "force" this to wait on Cordova to be fully loaded before it fires this?
has title: Cordova WP8 - Push Notifications Callback

http://stackoverflow.com/q/29255864
linked to: http://stackoverflow.com/q/16442016
has comment: http://stackoverflow.com/comment/46714909
tagged with: jquery
has comment: http://stackoverflow.com/comment/46714925
has comment: http://stackoverflow.com/comment/46714578
has title: Fixed header while scrolling down the website
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/29256438
accepted answer: http://stackoverflow.com/a/29256438
possible better answer: http://stackoverflow.com/a/29256176
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46714596
has answer: http://stackoverflow.com/a/29256176
has comment: http://stackoverflow.com/comment/46714768
tagged with: javascript
has comment: http://stackoverflow.com/comment/46714649
has body: I am designing a website, i am trying to have a fixed header and the header shrinking a bit while someone scroll down the website. HTML: Call Us today 0000-123456 | info@mysite.com Home About Us Our Services Our Work Contact Us Custom Website Design Content goes here We only use the latest and updated code to build your website and all the websites we build are mobile responsive, so your website will work across all mobile and tablet devices. Logo Design New business starting off to well established businesses, we can help enhance your businesses brand. Our services include logo design, business stationery, brochures, flyers, reports, newsletters and all your graphical needs. A logo is important for any business as it represents who you are and acts as your business branding, this is why it is vital to have a professional logo design so that it can leave a lasting impression on your customers CSS: body{ font-family:arial; font-size:13px; width:100%; margin:0; padding:0; } #seperator_top{ width:100%; height:5px; background-color:#7CBB00; } #headerwrapper{ width:100%; background-color:#000; height:auto; } #header{ width:950px; height:auto; margin:0 auto; overflow:auto; background-color:#000; color:#FFF; padding:15px; } #header_bottom{ width:100%; height:auto; background-color:#000; border-top:1px solid white; } #header_content{ width:950px; height:auto; margin:0 auto; overflow:auto; } #logo{ width:200px; float:left; } .menu{ float:right; width:550px; margin-left:100px; margin-top:20px; } .menu ul{ list-style:none; margin:0; padding:0; } .menu ul li a{ float:left; color:#FFF; padding:10px 10px 10px 10px; margin:5px; text-decoration:none; } .menu ul li a:hover{ background-color:#7CBB00; border-radius:5px; } .content{ width:950px; height:auto; margin:0 auto; } #website{ margin-top:30px; width:100%; height:auto; overflow:auto; } #website_left_content{ width:500px; height:auto; float:left; } #website_right_content{ width:400px; height:auto; float:right; } #logo_content{ ma…
type: Question
score: 0
answer count: 2

sapui5
tags question: http://stackoverflow.com/q/29302333
tag name: sapui5
type: Tag
tags question: http://stackoverflow.com/q/29255137
tags question: http://stackoverflow.com/q/29227978

http://stackoverflow.com/a/29237317
upvote count: 1
score: 1
downvote count: 0
answers question: http://stackoverflow.com/q/29237106
type: Answer
has body: Try this via jquery: $(".dropzone-width").on("click", function(){ $("#drop-zone-600").trigger("click"); });

http://stackoverflow.com/comment/46722811
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29258699
has text: You are right. toFixed is a better / simpler option here. The Math.round10 method is from the SO question provided.

http://stackoverflow.com/q/29314098
linked to: http://stackoverflow.com/q/9725882
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/csv
has body: I have a javascript function here (view page source) that converts all the simple-text content of a text box into Unicode Devnagri script, following a character substitution algorithm, and outputs to another text box. I want to take this to Excel / CSV file, where for the chosen cells or cell range, the content of each cell should be processed by this function. Is there a way to import a javascript function to excel and run it there? Like a macro or something : If I have to convert this to VBA code then how to do so? Or is there a way to import the CSV file to javascript, run the function on each cell and produce output CSV? Additional info: the use-case is for converting documents that use legacy Hindi fonts (where the font-face of an ASCII character was a hindi character.. if you don't have the font installed then you see gibberish) into Unicode that can be seen without needing the special font files. The character substitution is made a little complicated owing to special character-joins, and vowels (maatras) of the Devnagri script that can prefix or suffix the consonant, and so needs the Javascript function. Simple find-replace action doesn't work. EDIT: Upon trying out a proposed solution, I hit this roadblock with my 64-bit Office2010 installation : "scriptcontrol is a 32bit component only and will not run inside a 64bit process". Can you show how to do this in OpenOffice? Or Google Docs/Spreadsheets? Or can this be done by importing and processing the CSV/XLS in a webpage?
has answer: http://stackoverflow.com/a/29316420
tagged with: excel
type: Question
tagged with: javascript
linked to: http://stackoverflow.com/q/218181
score: 0
has title: Run javascript function on cells of CSV / excel file
answer count: 1
tagged with: vba

http://stackoverflow.com/q/29267930
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29309455
has body: Why am I getting the error Error in query: Invalid JSON string when attempting to create a chart from a spreadsheet using the Google example script from their documentation here? I can't figure it out. The only thing that I changed is the spreadsheet URL. The rest is directly from the documentation example. I provided all of my code below. Any help you guys could give would be greatly appreciated. Thanks, Brandon function doGet() { return HtmlService.createTemplateFromFile('index') .evaluate() .setSandboxMode(HtmlService.SandboxMode.NATIVE); }; function include(filename) { return HtmlService.createHtmlOutputFromFile(filename).getContent(); }; Data from a Spreadsheet <?!= include('Chart'); ?>
type: Question
tagged with: google-sheets
tagged with: google-visualization
tagged with: javascript
has title: Error in query: Invalid JSON string when Creating a Chart from a Spreadsheet? GAS
tagged with: google-apps-script
score: 0
accepted answer: http://stackoverflow.com/a/29309455
answer count: 1

http://stackoverflow.com/comment/46752129
has text: ok thats resizing the iframe, but its constanrly making the page longer
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29266882

http://stackoverflow.com/comment/46722517
type: QuestionComment
has text: Please add more detail than 'it doesn't work'. What have you tried to do to fix or debug it? Have you checked the console? Is jQuery.js included in the page? Has it loaded properly? Is you code running before DOMReady? Is the `alert()` showing, but the form is still being submit? Work with us here...
comment on: http://stackoverflow.com/q/29260145
score: 0
type: Comment

http://stackoverflow.com/q/29265501
tagged with: javascript
has answer: http://stackoverflow.com/a/29265643
has comment: http://stackoverflow.com/comment/46732831
has comment: http://stackoverflow.com/comment/46771669
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has body: My page starts (first thing after the &lt;body&gt; tag) with this: &lt;div id="wallpaper" style="width: 100%; height: 100%; position: fixed; left: 0px; top: 0px; z-index: -1;"&gt; &lt;img src="images/black-matte-1650-Lit-Etched.jpg" style="width: 100%; height: 100%;" alt=""&gt; &lt;/div&gt; This works fine on every browser except IE when it is in Compatibility View mode. Even most IE version display this correctly, but only if not in Compatibility View mode. The content is supposed to "hover" over the background image so that as the page scrolls, the content scrolls, but the background remains stationary. Instead, the rest of the page's contents are pushed down to the bottom of the background image, and they render from there. So, my page appears to be nothing but it's background image, and you have to scroll down to see the page content below it. Can anyone explain what is wrong, and how to fix this?
has comment: http://stackoverflow.com/comment/46732731
accepted answer: http://stackoverflow.com/a/29265643
has title: HTML Content pushed down below a fixed background image
tagged with: css
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46732882
score: 0
type: Question
has comment: http://stackoverflow.com/comment/46732875

http://stackoverflow.com/q/29296710
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has body: I had a googlemaps map covering my whole page and i wanted a cool menu showing up above the map. So i found this tutorial http://tympanus.net/codrops/2013/08/09/building-a-circular-navigation-with-css-transforms/ about a cool menu. My problem is that no the menu looks good and works as it should but somehow my maps is gone behind all this. It doesn't respond to z-index it is still behind everything. And it is not covering my whole screen anymore. Here is my googlemap: function initialize() { var mapCanvas = document.getElementById('map-canvas'); var mapOptions = { center: new google.maps.LatLng(0, 0), zoom: 4, mapTypeId: google.maps.MapTypeId.SATELLITE } var map = new google.maps.Map(mapCanvas, mapOptions); } google.maps.event.addDomListener(window, 'load', initialize); And here is the css for the map: #map-canvas { position:absolute; top:0; bottom:0; left:0; right:0; overflow:hidden; z-index:-1; } here is the menu html and js: - (function () { var button = document.getElementById('cn-button'), wrapper = document.getElementById('cn-wrapper'), overlay = document.getElementById('cn-overlay'); //open and close menu when the button is clicked var open = false; button.addEventListener('click', handler, false); button.addEventListener('focus', handler, false); wrapper.addEventListener('click', cnhandle, false); function cnhandle(e) { e.stopPropagation(); } function handler(e) { if (!e) var e = window.event; e.stopPropagation();//so that it doesn't trigger click event on document if (!open) { openNav(); } else { closeNav(); } } function openNav() { open = true; button.innerHTML = "-"; classie.add(overlay, 'on-overlay'); classie.add(wrapper, 'opened-nav'); } function closeNav() { open = false; button.innerHTML = "+"; classie.remove(overlay, 'on-overlay'); classie.remove(wrapper, 'opened-nav'); } document.addEventListener('click', closeNav); })(); How can i find out what is blocking the maps from creating as it should?
has comment: http://stackoverflow.com/comment/46789137
has comment: http://stackoverflow.com/comment/46788918
has comment: http://stackoverflow.com/comment/46789678
type: Question
has title: Google maps CSS problems
has answer: http://stackoverflow.com/a/29297215
tagged with: javascript
score: 0
tagged with: google-maps
has comment: http://stackoverflow.com/comment/46788987
answer count: 1

http://stackoverflow.com/q/29328910
has answer: http://stackoverflow.com/a/29346099
accepted answer: http://stackoverflow.com/a/29346099
answer count: 2
linked to: http://stackoverflow.com/q/9515704
has comment: http://stackoverflow.com/comment/46848089
score: 0
has comment: http://stackoverflow.com/comment/46847945
tagged with: youtube-api
has body: Working on a Chrome extension, injecting script to Youtube site itself, and listening to the player events using the Youtube player API. Injected script code: (you can run it in the console on a Youtube HTML5 video page and see that it works) var theYTplayer = document.getElementById('movie_player'); theYTplayer.addEventListener('onStateChange', function(){ console.log('--- player state has been changed'); }); When it comes to HTML5 videos, it all works great, but not in flash live streams. In Flash, for some reason all the GET functions returns errors, while the SET functions works good. GET: getPlayerState, isMuted, getVolume SET: playVideo, pauseVideo, mute, unMute, setVolume This may be a bug, so I reported about it here: issue #7043 You can test it on this live streaming video for example. If I'm doing something wrong then please let me know how it should be done. In case and it is a bug, then lets think of another way to detect whether the video is playing or not. I compared between the two DOMs and there is no any class being added when the state changes or anything else, the files ended to be match. Then I saw that when the video is playing Chrome adds the new extra favicon speaker to the tab, but that's only if there is sound, if the video is muted then the icon will not appear so this is no good. so do you may have any other ideas/workarounds how to detect if the video is playing or not please or fixing my code?
tagged with: javascript
has answer: http://stackoverflow.com/a/29334578
has comment: http://stackoverflow.com/comment/46848100
type: AnsweredQuestion
tagged with: google-chrome-extension
has title: Get flash video state in Youtube site - Chrome extension
possible better answer: http://stackoverflow.com/a/29334578
type: Question

http://stackoverflow.com/q/29371378
favorite count: 0
has body: I'm writing a bookmarklet that simply removes some content from a specific webpage. Now the thing is the webpage has "neverending scroll" pagination and you need to click the bookmarklet again and again after each page loads. Is it possible to catch web-page content update with a bookmarklet?
upvote count: 1
type: AnsweredQuestion
score: 1
accepted answer: http://stackoverflow.com/a/29371612
type: Question
tagged with: bookmarklet
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
has title: having a bookmarklet run in the background and act on page content update
linked to: http://stackoverflow.com/q/3219758
has answer: http://stackoverflow.com/a/29371612

http://stackoverflow.com/q/29256780
tagged with: javascript
tagged with: express
answer count: 2
upvote count: 1
favorite count: 0
type: UnansweredQuestion
has title: Express router.use not working
has answer: http://stackoverflow.com/a/29257512
tagged with: node.js
downvote count: 0
score: 1
has body: I used express-generator to generate the basic structure of an express app. I have this in routes/my.js: router.use('/update', function(req, res, next) { req.headers['content-type'] = 'application/json'; console.log('router use invoked'); next(); }); router.get('/update', function(req, res, next) { console.log('=== GET /my/update', req.body); }); router.post('/update', function(req, res, next) { console.log('=== POST /my/update', req.body); }); And in app.js I added: var my = require('./routes/my'); app.use('/', routes); app.use('/users', users); app.use('/my', my); It's working fine for GET, and the router middle-ware is actually working (console.log is called), but the headers is not being set to app/json (as the log message in post outputs the body to be empty). I can solve this by adding this before any other middle-ware app.use('/my/update', function(req, res, next) { req.headers['content-type'] = 'application/json'; next() }); And it works. I tried moving the app.use('my', my); line before any other middle-ware but it stopped working altogether. What can I do in order to give priority to my router.use?
type: Question
has answer: http://stackoverflow.com/a/29257042

http://stackoverflow.com/comment/74491131
comment on: http://stackoverflow.com/a/29340347
score: 0
type: AnswerComment
type: Comment
has text: How will you do this with multiple series data?

http://stackoverflow.com/q/29342845
has comment: http://stackoverflow.com/comment/46874710
type: Question
has title: How to delete one item by AngularJS?
accepted answer: http://stackoverflow.com/a/29342893
tagged with: javascript
score: 0
answer count: 1
has body: Hey guys I want to delete item by id in an AngularJS function. How can I get id from delete button? ID Name School Gender Email Update Delete {{student.id}} {{student.name}} {{student.school}} {{student.gender}} {{student.email}} Update Delete Controller: var myApp = angular.module('myApp', []); myApp.controller("myController", function ($scope) { $scope.deleteItem = function (id) { alert(id);//it doesn't show alert here }; }); I think the problem is here data-ng-click="deleteItem({{student.id}})". But when I check it shows me value data-ng-click="deleteItem(5).
tagged with: angularjs
has answer: http://stackoverflow.com/a/29342893
type: AnsweredQuestion

http://stackoverflow.com/comment/50876993
type: Comment
has text: hmm to sad it is not running. I posted some of my code as an update. Be aware, the part of `d3.json(...){ }` is using some variables/functions of global functions in my code.
comment on: http://stackoverflow.com/a/29434688
score: 0
type: AnswerComment

http://stackoverflow.com/q/29267441
linked to: http://stackoverflow.com/q/29133563
has title: How to display Facebook like button using React.js
type: Question
tagged with: reactjs
duplicate of: http://stackoverflow.com/q/29133563
tagged with: javascript
tagged with: facebook-like
has body: I wrote a like button class in react to display facebook like button in my blog posts var LikeButton = React.createClass( { render : function () { var url = "http://yahya.skaprer.com/p/" + this.props.obd; return ( ); } }); The button doesn't show up no matter what I do. I checked running FB in console to check whether the SDK is installed properly and yes it has. Is there any bug in my code or is this the wrong way?
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/46736464
type: UnansweredQuestion
tagged with: facebook
upvote count: 1
answer count: 0
score: 1

http://stackoverflow.com/comment/46827709
type: Comment
comment on: http://stackoverflow.com/q/29317908
score: 1
type: QuestionComment
has text: Technically possible, yes definitely. Feasible, maybe. Legally, my guess would be no, check their terms of service and their [usage policy](http://www.afreesms.com/aup).

http://stackoverflow.com/comment/47003098
type: Comment
has text: By the way, kudos for using leaflet for architectural rendering.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29382236

http://stackoverflow.com/comment/53824648
comment on: http://stackoverflow.com/a/29285330
type: Comment
has text: @greim: yes, both `export` and `import` declaration make it a module, they would be syntax errors elsewhere. But whether a javascript code file is interpreted as a script or as a module, only your transpiler/engine decides, you cannot know it by looking upon the code.
type: AnswerComment
score: 4

http://stackoverflow.com/comment/46728457
score: 0
type: QuestionComment
type: Comment
has text: Got it. Going to write up an answer for you now
comment on: http://stackoverflow.com/q/29258391

http://stackoverflow.com/comment/46791986
has text: Hi, First, I know the no such tag in HTML, but those tags are used in PHP to display particular content. I already manage to keep the bar tag by adding the extraAllowedContent line. The thing most of those tags are self-closing and ckeditor remove my self-closing tag. I need to keep them, to parse them in PHP after.
type: Comment
score: 0
comment on: http://stackoverflow.com/a/29298305
type: AnswerComment

http://stackoverflow.com/comment/46830691
type: AnswerComment
has text: @kyr: Yeah, `fs.exists` is deprecated, but apparently only because people abused it (using it together with `fs.open`). I think if your use case is appropriate, you may still use it.
score: 0
comment on: http://stackoverflow.com/a/29317649
type: Comment

http://stackoverflow.com/a/29366357
answers question: http://stackoverflow.com/q/29366198
upvote count: 1
downvote count: 0
type: AcceptedAnswer
score: 1
has body: I guess your question is, what happens when a new view is loaded in place of an old view, is it removed ? or is it just hidden using CSS? Answer is, the Old view is simply replaced by New view in the Dom, so old view is not there in the Dom.
type: Answer
accepted answer of: http://stackoverflow.com/q/29366198

http://stackoverflow.com/q/29312183
has answer: http://stackoverflow.com/a/29325010
accepted answer: http://stackoverflow.com/a/29325010
possible better answer: http://stackoverflow.com/a/29312198
type: Question
has comment: http://stackoverflow.com/comment/46818239
tagged with: javascript
tagged with: jquery
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/29312198
has body: I have a select list that I would like to display a different image in the same div each time the user changes the select list. Here's what I have so far: HTML &lt;div id="branches"&gt; &lt;h3&gt;British Columbia Old Age Pensioners' Organization &amp;mdash; Branches&lt;/h3&gt; &lt;select id="branch-number" class="form-control"&gt; &lt;optgroup label="British Columbia"&gt; &lt;option value="1"&gt;Branch 1&lt;/option&gt; &lt;option value="2"&gt;Branch 2&lt;/option&gt; &lt;option value="http://placehold.it/350x350"&gt;Branch 3&lt;/option&gt; &lt;option value="http://placehold.it/350x450"&gt;Branch 4&lt;/option&gt; &lt;/optgroup&gt; &lt;optgroup label="Alberta"&gt; &lt;option value="5"&gt;Branch 5&lt;/option&gt; &lt;option value="6"&gt;Branch 6&lt;/option&gt; ...etc... &lt;/select&gt; &lt;div id="img-window"&gt; &lt;img id="branch-img" src="http://placehold.it/350x150" class="img-responsive"&gt; &lt;/div&gt;&lt;!-- end img-window --&gt; &lt;/div&gt;&lt;!-- end branches --&gt; jQuery $(document).ready(function () { $('#branch-number').on('change', function () { alert('something happened'); // var branchVal = $('this').val(); var branchVal = $('option:selected').val(); switch (branchVal) { case 1: $('#branch-img').attr('src', 'http://placehold.it/150x150'); break; case 2: $('#branch-img').attr('src', 'http://placehold.it/250x250'); break; case 3: $('#branch-img').attr('src', 'http://placehold.it/350x350'); break; default: $('#branch-img').attr('src', 'http://placehold.it/1450x1450'); } }); }); Right now, nothing happens when the user changes the select list. I am trying to do this with an &lt;img&gt; tag instead of CSS so that for increased accessibility of the alt="" attribute. I'm just starting to get the hang of javascript / jQuery ... any help appreciated. Here's a fiddle: https://jsfiddle.net/r1fcvs7s/4/ edit: syntax should be all good now.
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has title: Obtaining value of select list each change with jQuery

data-uri
tags question: http://stackoverflow.com/q/29220493
type: Tag
tag name: data-uri

http://stackoverflow.com/q/29243759
type: Question
has title: Webrtc and socket.io: createanswer() always has an error. Why?. My code connects two peers, but only one of them knows about it?
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: p2p
has body: I am using socket.io and serving on node.js. Here is code from the client side: getUserMedia(constraints, handlemedia, error); function handlemedia(stream) { localStream = stream; attachMediaStream(localVideo, stream); socket = io.connect(); document.getElementById("connect").addEventListener("click", function(e){ remoteVideo = document.getElementById("remoteVideo"); console.log("We know what socket is.", socket); servers = {"iceServers": [{ "url": "stun:stun.l.google.com:19302"}]}; pc = new RTCPeerConnection(servers); pc.onicecandidate = console.log("GOT CANDIDATE"); pc.addStream(localStream); pc.onaddstream = function(event) { attachMediaStream(remoteVideo, event.stream); } function error() { console.log("An error occurred in the create offer section. "); } sdpconstraints = {'mandatory': { 'OfferToReceiveVideo':true }}; pc.createOffer(function(sessiondesc) { console.log("Socket attemp 2: ", socket); pc.setLocalDescription(sessiondesc); console.log("Offer: ", sessiondesc); console.log("local description was set. Don't worry."); socket.emit("sessiondesc", sessiondesc); }, error, sdpconstraints); socket.on("sessiondesc", function(sessiondesc) { console.log("WE GOT THE FUNCTION "); sdpconstraints = {'mandatory': { 'OfferToReceiveVideo':true }}; console.log("Your partner created an offer for you."); pc.createAnswer(function(sessiondesc) { console.log("Socket attemp at create answer section: ", socket); pc.setLocalDescription(sessiondesc); console.log("Session description: ", sessiondesc); console.log("Local desc for create answer section was set."); socket.emit("sessiondesc", sessiondesc); }, console.log("Error in create answer section occurred."), sdpconstraints); }); } } And here is the server code, using node.js and socket.io: var io = require('socket.io').listen(app); io.sockets.on('connection', function(socket, webkitRTCPeerConnection, client, id){ socket.on("sessiondesc", function(sessiondesc) { console.log("Emitting session desc RIGHT NOW"); socket.broadcast.emi…
tagged with: webrtc
favorite count: 0
has answer: http://stackoverflow.com/a/29245963
type: UnansweredQuestion
upvote count: 1
tagged with: node.js
score: 1
tagged with: socket.io

http://stackoverflow.com/comment/46773012
score: 0
has text: Like here http://jsfiddle.net/pj2dgr6j/
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29282120

http://stackoverflow.com/comment/46880598
score: 0
comment on: http://stackoverflow.com/q/29347154
type: QuestionComment
type: Comment
has text: @Jordi Castilla i m using eclipse java EE

http://stackoverflow.com/a/29359224
has comment: http://stackoverflow.com/comment/46902958
score: 2
accepted answer of: http://stackoverflow.com/q/29359204
answers question: http://stackoverflow.com/q/29359204
has comment: http://stackoverflow.com/comment/46903062
type: AcceptedAnswer
downvote count: 0
has body: Contact Us This will remove the href attribute: $("#Main4").removeAttr("href") Remember to do it on page load event like below: $(function() { $("#Main4").removeAttr("href") }); Or if you just want to remove the value of href then $("#Main4").attr("href", "") This will make Contact Us DEMO: $(function() { $("#Main4").removeAttr("href") }); Contact Us
has comment: http://stackoverflow.com/comment/46902951
upvote count: 2
type: Answer

http://stackoverflow.com/q/29256813
upvote count: 1
downvote count: 1
type: Question
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46716524
has title: How to give h1div+1 after give correct answer?
has body: I make a quiz with javascript and HTML. Now I want when you give a correct answer the h1divcirckel give plus 1. In my jsfiddle is the HTML and Javascript. The quiz doens't work in jsfiddle but it work in my website. https://jsfiddle.net/aveLph7h/ 145 Quiz Next And my javascript var questions = [{ question: "Wie vinden zichzelf het lekkerst?", choices: ["Vrouwen","Mannen"], correctAnswer:0 }, { question: "Wat doet meer pijn: wesp of bij?", choices: ["wesp","bij"], correctAnswer:0 },{ question: "What is 8*9?", choices: [72,99,108,134,156], correctAnswer:0 },{ question: "What is 1*7?", choices: [4,5,6,7,8], correctAnswer:3 },{ question: "What is 8*8?", choices: [20,30,40,50,64], correctAnswer:4 }]; function createQuestionElement(index) { var qDiv = document.createElement('div'); qDiv.setAttribute('id','question'); var question = document.createElement('p'); question.innerHTML = questions[index].question; qDiv.appendChild(question); qDiv.appendChild(createRadios(index)); return qDiv; } function createRadios(index) { var radioList = document.createElement('ul'); var str; for(var i=0; i<questions[index].choices.length ; i++){ var item = document.createElement('li'); var input = ' '; input += questions[index].choices[i]; item.innerHTML =input; radioList.appendChild(item); } return radioList; } var questionCounter = 0; var numCorrect = 0; var firstDiv = createQuestionElement(questionCounter); $('#quiz').append(firstDiv); var radios = document.getElementsByName('answer'); var button = document.getElementById('button'); $('#button').on('click', function() { if(radios[questions[questionCounter].correctAnswer].checked){ numCorrect++; } questionCounter++; $('#question').remove(); if(questionCounter<questions.length){ var nextDiv = createQuestionElement(questionCounter); $('#quiz').append(nextDiv); document.getElementById('quiz').appendChild(nextDiv); } else { document.getElementById('quiz').appendChild(displayScore()); } }); function displayScore() { var para = document.createEl…
accepted answer: http://stackoverflow.com/a/29256985
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/46716517
type: AnsweredQuestion
score: 0
has answer: http://stackoverflow.com/a/29256985

http://stackoverflow.com/comment/46791040
comment on: http://stackoverflow.com/a/29297640
type: Comment
has text: I tried the following(btw changed id names for HTML in meantime), but it's not giving me any results :/ ` `
score: 0
type: AnswerComment

http://stackoverflow.com/a/42681510
upvote count: 0
score: -1
type: Answer
has body: $$hashKey would not be needed if you use angular.equals because it ignores $* properties (and functions). expect(angular.equals(result, [{Id: 2, Name: 'Fire', Location: {x: 250, y: 200}}])).toBe(true); I'm adding this as an answer as I do not have enough rep to post a comment.
answers question: http://stackoverflow.com/q/29317865
downvote count: 1

http://stackoverflow.com/comment/46687958
type: Comment
comment on: http://stackoverflow.com/a/29240396
has text: Thank you sir... It almost solved the problem, so I think. Because, the paragraph content, which is supposed to be changed, is disappearing completely. Is there a problem with parsing the XML data from the AJAX object?
score: 0
type: AnswerComment

http://stackoverflow.com/comment/46647545
type: QuestionComment
has text: *"We use IE exclusively, the current version is IE11."* Does that mean you can rely on having IE11 (not IE9 or 10)?
score: 0
comment on: http://stackoverflow.com/q/29219256
type: Comment

http://stackoverflow.com/q/29273984
tagged with: web-component
downvote count: 0
favorite count: 0
type: UnansweredQuestion
score: 2
answer count: 0
upvote count: 2
type: Question
tagged with: polymer
tagged with: javascript
tagged with: google-web-designer
has title: add Polymer element to the Google Web Designer
has body: There is a possibility to add your custom element to the Google Web Designer. To do this it's needed to create some files : js file(required) - it's a custom element itself(registration and definition) css (optional) - styles,applied to the element manifest.json(required) - this file tells GWD how to use custom element As you see,GWD wants a js file,but when we creating element with Polymer we get HTML file.So question is: is it possible do tell GWD that we have HTML file not js so that GWD added this file using HTML Import? And if yes,how to do this? And another moment:there is polyfill to the custom elements,shadow dom and so on made by Polymer team webcomponents.js,when I add this file to GWD project all breaks. Do anybody knows what to do add this file in a write way?

http://stackoverflow.com/a/29318951
answers question: http://stackoverflow.com/q/29315787
score: 9
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46840532
upvote count: 9
type: Answer
downvote count: 0
has body: Here's an example of how to use TypeKit's WebFontLoader to allow fonts time to load before using them: // load google font == Monoton WebFontConfig = { google:{ families: ['Monoton'] }, active: function(){start();}, }; (function(){ var wf = document.createElement("script"); wf.src = 'https://ajax.googleapis.com/ajax/libs/webfont/1.5.10/webfont.js'; wf.async = 'true'; document.head.appendChild(wf); })(); var canvas=document.getElementById("canvas"); var ctx=canvas.getContext("2d"); var cw=canvas.width; var ch=canvas.height; function start(){ ctx.font = '50px Monoton'; ctx.textBaseline = 'top'; ctx.fillText('No', 20, 10); } body{ background-color: ivory; padding:10px; } #canvas{border:1px solid red;} &lt;canvas id="canvas" width=300 height=300&gt;&lt;/canvas&gt;
accepted answer of: http://stackoverflow.com/q/29315787
has comment: http://stackoverflow.com/comment/61975972

http://stackoverflow.com/q/29319912
score: 2
type: AnsweredQuestion
upvote count: 2
accepted answer: http://stackoverflow.com/a/29320186
type: Question
tagged with: harvest
tagged with: jquery-plugins
answer count: 2
has body: Anyone knows how to stop and reset Harvest's Tick counter jQuery plugin? I want to stop counter on specific number and reset to primary start up number. You can checkout my code here. HTML Markup: 5,000 jQuery Logic:
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29320186
favorite count: 0
has title: Stop and Reset Harvest's Tick Counter jQuery Plugin
possible better answer: http://stackoverflow.com/a/29320210
has answer: http://stackoverflow.com/a/29320210

http://stackoverflow.com/q/29370075
has body: I would like to parameterize my webdriverio specs from the Gruntfile.js. The goal is to specify the host, the port, a username a password and maybe other parameters in Grunt and read them from the spec file. Reading the Source Labs example from https://www.npmjs.com/package/grunt-webdriver#overview I set the host and the port in the options. But when configuring the port I got the following error: /Users/sandro/Developing/Projekte/sling/svn/contrib/explorers/resourceeditor/frontend/node_modules/grunt-webdriver/node_modules/webdriverio/lib/utils/PromiseHandler.js:154 throw error; RuntimeError: RuntimeError This is why I think there must be an other way to do that. My Gruntfile.js looks like that: module.exports = function(grunt) { var e2eTestSpecFolder = '../src/test/javascript/e2e/spec/**/*spec.js'; grunt.initConfig({ ... webdriver: { options: { host: 'localhost', port: 8080 }, chrome: { tests: [e2eTestSpecFolder], options: { // overwrite default settings desiredCapabilities: { browserName: 'chrome' } } }, firefox: { tests: [e2eTestSpecFolder], options: { // overwrite default settings desiredCapabilities: { browserName: 'firefox' } } } } }) ... grunt.registerTask('desktop_build', ['webdriver:chrome', 'webdriver:firefox']); }; Thanks in advance for any hints! Update: I use the following versions: grunt-cli: v0.1.13 grunt: v0.4.5 webdriver-manager: 3.0.0 grunt-webdriver: 0.4.8
downvote count: 0
has title: How to pass parameters from the Gruntfile.js to the webdriverio spec?
tagged with: javascript
tagged with: webdriver-io
answer count: 1
favorite count: 0
type: UnansweredQuestion
upvote count: 1
has answer: http://stackoverflow.com/a/29475453
has comment: http://stackoverflow.com/comment/47079447
score: 1
tagged with: gruntjs
type: Question
has comment: http://stackoverflow.com/comment/47111176

http://stackoverflow.com/q/29283700
has comment: http://stackoverflow.com/comment/46765449
has answer: http://stackoverflow.com/a/29283972
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29283824
has title: Handling HTML types 'email', 'url' with JavaScript
has comment: http://stackoverflow.com/comment/46765347
has answer: http://stackoverflow.com/a/29283824
has body: Having I would like to inform JavaScript whether the entered input is en e-mail or not. Same thing with 'url' and other HTML input types. Is there any 'flag' or whatsoever that signals if the HTML type requirement has been fulfilled?
tagged with: email-validation
type: Question
has comment: http://stackoverflow.com/comment/46765311
has answer: http://stackoverflow.com/a/29283829
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29283972
score: 0
answer count: 3
tagged with: validation
tagged with: http://stackoverflow.com/tag/html

google-flights
tags question: http://stackoverflow.com/q/29334997
type: Tag
tag name: google-flights

http://stackoverflow.com/comment/46719110
score: 2
has text: Your jQuery wrap of $span in the second like is redundant tought I think.
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29258207

http://stackoverflow.com/a/29221115
has body: Security restrictions prevent access to other files from documents served via file://. Run a web server and load the documents over HTTP instead.
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29218140
answers question: http://stackoverflow.com/q/29218140
type: Answer
upvote count: 1
score: 1

http://stackoverflow.com/comment/46697065
has text: Wow. That works! Post that as an answer and I'll accept it :)
score: 0
comment on: http://stackoverflow.com/q/29244569
type: Comment
type: QuestionComment

mapbox
tags question: http://stackoverflow.com/q/29366268
tags question: http://stackoverflow.com/q/29244960
type: Tag
tag name: mapbox

http://stackoverflow.com/comment/46884415
has text: @YuvalRoth I've updated my answer to show what your client side might look like, though it's dependent on what frameworks you choose to use and what data you need to fetch from the server. It's too broad of a topic to show you exactly everything you need to do, but I suggest you watch some videos about using jQuery AJAX and ASP.NET Web API and check out their documentation.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29349069

http://stackoverflow.com/q/29369159
tagged with: d3pie.js
has comment: http://stackoverflow.com/comment/46920575
upvote count: 2
score: 0
downvote count: 2
tagged with: pie-chart
accepted answer: http://stackoverflow.com/a/29370355
answer count: 1
has title: Striped background in d3pie.js
favorite count: 0
has body: We're using d3pie[http://d3pie.org/#generator-result] a library over d3 to generate the Pie Chart and like to know how to replace the background in it with stripes. If you look at the URL, http://d3pie.org/#generator-result, you can find that d3pie currently provides only three attributes related to the Data i.e. Label, Value and Color as below: { "label": "Test", "value": 311, "color": "#d96d6d" } Not sure how to change the plain background color to look like stripes. Tried out Linear Gradients as in Css instead of Hexagonal Values for Color Attribute but that doesn't help.
tagged with: d3.js
has answer: http://stackoverflow.com/a/29370355
linked to: http://stackoverflow.com/q/11962077
type: Question
type: AnsweredQuestion
tagged with: charts
tagged with: javascript

http://stackoverflow.com/q/29340245
score: 2
upvote count: 2
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29340968
has title: going through a nested object literal , without using a library
has comment: http://stackoverflow.com/comment/46869230
type: Question
linked to: http://stackoverflow.com/q/383692
linked to: http://stackoverflow.com/q/921789
downvote count: 0
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/46869870
favorite count: 0
linked to: http://stackoverflow.com/q/722668
has body: hey guys i am new to javascript and Jquery in general , and i am facinated by the usage of Object literals so far . now i was going through the source of bootstrap modal.js plugin and came across the following lines of code : var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' &amp;&amp; option) you can checkout this line of code on git too. now that line of code is creating a pretty complex object literal something that has a lot of 'Object' inside 'Object' inside 'Object' and so on .. basically a nested object literal . in order for me to totally understand that line of code its essential that i am be able to console.log the object literal. i saw a thread on SO here. now the solution i see in that answer to print out an Object literal is as follows : for (var key in validation_messages) { if (validation_messages.hasOwnProperty(key)) { var obj = validation_messages[key]; for (var prop in obj) { // important check that this is objects own property // not from prototype prop inherited if(obj.hasOwnProperty(prop)){ alert(prop + " = " + obj[prop]); } } } } now that solution works fine , if i have a object literal as follows : var validation_messages = { "key_1": { "your_name": "jimmy", "your_msg": "hello world" }, "key_2": { "your_name": "billy", "your_msg": "foo equals bar" } } but what if i have a object literal like the follows : var validation_messages = { "key_1": { "your_name": "jimmy", "your_msg": "hello world" }, "key_2": { "your_name": { "first_name" : "Ratan", "secound_name" : "Tata", }, "your_msg": "foo equals bar" } } i will get the following in the console : "your_name = jimmy" "your_msg = hello world" "your_name = [object Object]" "your_msg = foo equals bar" the problem is everytime the value of a key is an object , i want the loop to enter the object and print the key and values from there too , basically i want this to be recursive . i tried modifying the original code of what i found in that thread , but i barely know wha…

http://stackoverflow.com/comment/46777350
comment on: http://stackoverflow.com/a/29290052
score: 0
type: AnswerComment
has text: Sorry, not sure I understand how using tags helps? We don't want to use tagging, we want to add a class to the selected item.
type: Comment

http://stackoverflow.com/comment/46904272
type: QuestionComment
comment on: http://stackoverflow.com/q/29360013
has text: @guest271314 no that is part of the api, the first sample code is just part of the api that i need to use and is working just fine. In my second sample code you see where i call it with api.File.list
score: 0
type: Comment

http://stackoverflow.com/comment/46939037
type: AnswerComment
has text: @AbhishekSirari i have added my actual test code above.
type: Comment
comment on: http://stackoverflow.com/a/29316663
score: 0

http://stackoverflow.com/a/29312164
answers question: http://stackoverflow.com/q/29311531
type: Answer
score: 0
has body: Like what has been mentioned above you will need to set the breaking point for each of the sizes based on the screen width you want. For example using your JS.Fiddle if you add this CSS code: @media (max-width:767px){ #spring-vet-inner .sv-list:nth-child(odd) { border-right: 1px solid red; } } The border shows up correctly for your 2 column layout once the page container is shrunk down. You can see your updated JS Fiddle here. This should get you started. Hope that helps.

http://stackoverflow.com/q/29369512
upvote count: 1
has answer: http://stackoverflow.com/a/29370184
favorite count: 0
linked to: http://stackoverflow.com/q/19415394
has comment: http://stackoverflow.com/comment/46920774
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46922239
has comment: http://stackoverflow.com/comment/46921344
has answer: http://stackoverflow.com/a/41228130
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/46920727
has answer: http://stackoverflow.com/a/75981192
has title: Render HTML entities string in HTML with Angular
tagged with: ngsanitize
type: Question
linked to: http://stackoverflow.com/q/26064309
tagged with: javascript
tagged with: html-entities
answer count: 3
has body: I receive an HTML entities string from an API (like this "&amp;lt;p&amp;gt; Some text &amp;lt;br /&amp;gt;") and I would like it to be rendered as HTML. If I use the classical HTML solution with sanitize : .filter('html',function($sce){ return function(input){ return $sce.trustAsHtml(input); } }); I obtain &amp;lt;p&amp;gt; Some text &amp;lt;br /&amp;gt; as string instead of the &lt;p&gt; and &lt;br&gt; being interpreted as HTML. The only solution I see for now is to realize some replace and to apply the filter after. Is there a cleaner solution that avoids parsing the string twice?

http://stackoverflow.com/q/29282817
has comment: http://stackoverflow.com/comment/46763486
has title: running a "background task" in javascript
answer count: 1
downvote count: 0
favorite count: 0
tagged with: angularjs
tagged with: pdfmake
has comment: http://stackoverflow.com/comment/46763674
has answer: http://stackoverflow.com/a/29283013
type: AnsweredQuestion
has body: Is it possible, in Javascript, to run a function in background ? I am generating a pdf with pdfmake tool in an angularJS app, but the pdf generation is quite long (3-4 seconds) and during this time, the ui freeze completely. I would like to run a background task and force the pdf download without freezing the user ui, is it possible ? Here how I am running pdfmake (pdfmake and _ are custom factories): 'use strict'; angular.module('App') .service('CatalogPdfService', ['pdfmake', '_', '$q', '$filter', function (pdfmake, _, $q, $filter) { var $translate = $filter('translate'); var listDate = new Date(); return { download: download }; function download(data) { listDate = _.first(data).publishedOn; console.log('start download'); var deferred = $q.defer(); var filename = $translate('APP.EXPORT.pdf.catalog.title', {date: $filter('amDateFormat')(listDate, 'DDMMYYYY')}) + '.pdf'; create(data).download(filename, function () { console.log('end download'); deferred.resolve(); }); return deferred.promise; } function create(data) { // group data by category var dataByCategory = _.groupBy(data, function (d) { return d.category; }); // group categories data by subcategory _.forEach(dataByCategory, function (d, i) { dataByCategory[i] = _.groupBy(d, function (d) { return d.subcategory; }); }); var content = { table: { headerRows: 1, widths: ['*', 20, 10, 20, 20, 20, 20, 40, 20, 30], body: [ [ {text: $translate('APP.EXPORT.pdf.catalog.header.article') , style: 'headings', alignment: 'left'}, {text: $translate('APP.EXPORT.pdf.catalog.header.mine') , style: 'headings'}, {text: $translate('APP.EXPORT.pdf.catalog.header.rank') , style: 'headings'}, {text: $translate('APP.EXPORT.pdf.catalog.header.origin') , style: 'headings'}, {text: $translate('APP.EXPORT.pdf.catalog.header.transporter') , style: 'headings'}, {text: $translate('APP.EXPORT.pdf.catalog.header.culture') , style: 'headings'}, {text: $translate('APP.EXPORT.pdf.catalog.header.label') , style: 'headings'}, {text: $translate('AP…
score: 1
upvote count: 1
accepted answer: http://stackoverflow.com/a/29283013
type: Question
has comment: http://stackoverflow.com/comment/46763535
tagged with: javascript

http://stackoverflow.com/comment/46879719
type: AnswerComment
type: Comment
has text: @MarkPreston — Great. That means the problem you asked about is solved and you have a new problem. (Which is that the server you are making the request to is configured to send back an invalid CORS response).
score: 3
comment on: http://stackoverflow.com/a/29344528

http://stackoverflow.com/q/29286360
upvote count: 1
has answer: http://stackoverflow.com/a/29287523
type: Question
score: 1
accepted answer: http://stackoverflow.com/a/29287523
downvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
tagged with: extjs
has title: Dynamic store not loading data in combo box extjs
has body: I have two combo boxes say combo 1 and combo 2 that get populated with two different stores (say store 1 and store 2). The value in combo2 depends on what is selected in combo 1. I then query the server to get the array for combo2. In other words, my selection in combo1 determines the values for combo2. The code I have set up is not working and gives me a very generic error Error: Object doesn't support this action. I see the return values in the browser debugger so I know its not my ajax request. I think I am missing something small in the combo box that keeps the values from displaying. Please see the code below to get a better idea var store1 = Ext.create('Ext.data.ArrayStore', { model: 'store1model', autoLoad: true, autoDestroy: true, proxy: { type: 'ajax', url: 'backend.java' extraParams: { 'param1': param1 }, reader: { type: 'json' } } }); var store2 = Ext.create('Ext.data.ArrayStore', { model: 'store2model', autoLoad: true, autoDestroy: true, storeId: 'store2Id', proxy: 'memory', readre: { type: 'json' } }); var panel = Ext.create('Ext.form.Panel', { title: 'Panel', id: 'PanelId', url: 'backened.java', method: 'GET', items: [{ xtype: container, layout: 'column', items: [{ xtype: 'container', columnWidth: .5, layout: 'anchor', items: [{ xtype: 'combobox', fieldLabel: 'Combo1', name: 'Combo1', store: store1, displayField: 'name', valueField: 'name', anchor: '96%', listeners: { select: function(combo, records) { Ext.Ajax.request({ url: 'backend.java', method: 'GET', params: { "param2": combo.getValue() }, success: function(response) { var data = Ext.Msg.decode(response.responseText); store2.loadData(data); } }); } } }, { xtype: 'combobox', fieldLabel: 'Combo2', name: 'Combo2', id: 'Combo2', store: store2, displayField: 'someField', valueField: 'someField' }] }] }] }); After some searching I found may be I have to listen to event change in combo2. Not sure if that's correct and if it is how would that work? So I guess my question is two folds. Firstly, why wouldn…
tagged with: extjs4
tagged with: combobox
type: AnsweredQuestion

http://stackoverflow.com/a/29361315
has body: After reviewing the docs, it appears that the API endpoints (the Ticket API and the Users API) are separate, so I'm fairly sure you'd be unable to do this in one call. But you could use a second call to the Update User API to update the custom user_field of the Zendesk user.
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29339826
type: Answer
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/29339826

http://stackoverflow.com/comment/46651779
type: AnswerComment
comment on: http://stackoverflow.com/a/29221104
type: Comment
has text: Actually, I looked it up, and it wasn't added in 1.3, but 1.1.5: https://github.com/angular/angular.js/blob/master/CHANGELOG.md#115-triangle-squarification-2013-05-22
score: 0

http://stackoverflow.com/comment/46904931
has text: You asked how to add blank spaces in between characters in a string, so that's what I gave an example of. ;) I've never used AcroField before but based on what I see online..I'll update my example.
type: Comment
comment on: http://stackoverflow.com/a/29360350
score: 0
type: AnswerComment

http://stackoverflow.com/q/29240206
tagged with: cgi
upvote count: 1
has answer: http://stackoverflow.com/a/29240634
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/46687762
score: 0
has comment: http://stackoverflow.com/comment/46687230
answer count: 1
tagged with: javascript
tagged with: web
favorite count: 0
has title: Run C++ Program from my browser, send input & display output
tagged with: exec
has body: I want to send inputs to my server and want server to run my c++ program.Generate the output and respond me the output to be displayed on the browser.
tagged with: c++
has comment: http://stackoverflow.com/comment/46687017
type: UnansweredQuestion

http://stackoverflow.com/comment/46823907
comment on: http://stackoverflow.com/q/29315381
type: QuestionComment
has text: @Alan in your text, "The latest version of Java"
score: 0
type: Comment

http://stackoverflow.com/a/29354103
has comment: http://stackoverflow.com/comment/46893949
has comment: http://stackoverflow.com/comment/46893432
has comment: http://stackoverflow.com/comment/46893801
upvote count: 0
has comment: http://stackoverflow.com/comment/46893600
answers question: http://stackoverflow.com/q/29354023
type: Answer
score: -1
downvote count: 1
has body: Have you tried to just get back details from scope ? $scope.SaveDetails = function(){ $scope.details }

http://stackoverflow.com/a/29277905
score: 0
has body: See this answer: https://stackoverflow.com/a/13204818/1651713 It works fine with a force layout, e.g. var polygon = svg.selectAll('polygon') .data([nodes]) .enter() .append('polygon') .style('fill', 'green'); force.on('tick', function() { polygon.attr('points',function(d){ return d.map(function(d) { return [d.x,d.y].join(','); }).join(' '); }); });
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29276237
answers question: http://stackoverflow.com/q/29276237
type: Answer

http://stackoverflow.com/q/29224926
tagged with: jquery-easyui
type: UnansweredQuestion
has title: jquery easyui combobox data with sub-array
type: Question
score: 0
has body: Here is my sample code: Category My response data from url is: {"rows": [{"id":"4028b8814c4470d4014c4474ec4d0001","categoryName":"ASDFASDF","categoryDescription":"ASDFASDFASDF","status":"active","datetime":"2015-03-23T10:27:35.629+08:00"}, {"id":"4028b8814c41d8bd014c41dfd8dc0004","categoryName":"NO CATEGORY","categoryDescription":"NO CATEGORY","status":"active","datetime":"2015-03-23T10:27:35.629+08:00"},{"id":"4028b8814c4470d4014c447508e50002","categoryName":"ASDFASDF2","categoryDescription":"ASDFASDFASDF","status":"active","datetime":"2015-03-23T10:27:42.949+08:00"}, {"id":"4028b8814c4470d4014c447c2c4d0003","categoryName":"ASDFASDF","categoryDescription":"ASDFASDF","status":"active","datetime":"2015-03-23T10:35:30.765+08:00"}, {"id":"4028b8814c4470d4014c44a00d6e0004","categoryName":"TEST1","categoryDescription":"ADFASDFAFD","status":"active","datetime":"2015-03-23T11:14:42.154+08:00"}] ,"total":5,"item":""} As you can see, my data needed for the list is inside 'rows' array. Is there an option on jquery easyui combobox to just get the data inside 'rows'? Thanks, ModLoaded
answer count: 1
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29532693

rest
tags question: http://stackoverflow.com/q/29356889
tags question: http://stackoverflow.com/q/29289390
tags question: http://stackoverflow.com/q/29322904
tags question: http://stackoverflow.com/q/29297369
tags question: http://stackoverflow.com/q/29238841
tags question: http://stackoverflow.com/q/29318253
tags question: http://stackoverflow.com/q/29305049
tags question: http://stackoverflow.com/q/29228858
tags question: http://stackoverflow.com/q/29262495
tags question: http://stackoverflow.com/q/29248301
type: Tag
tags question: http://stackoverflow.com/q/29287660
tags question: http://stackoverflow.com/q/29256459
tag name: rest
tags question: http://stackoverflow.com/q/29278847
tags question: http://stackoverflow.com/q/29355484

http://stackoverflow.com/comment/46771819
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29287079
has text: Well that's correct for time zones west of GMT, but not east :) What you could do instead is add the timezone offset to the minutes value.
type: AnswerComment

http://stackoverflow.com/q/29322774
downvote count: 0
favorite count: 0
type: Question
upvote count: 2
answer count: 2
has body: I have been using google scripts for a week, and I have searched as much as I could to get the answer. Can someone please help me? I wrote a simple script to evaluate if a course is online based on the last three digits of a course number(i.e PSY-250-400). The script works fine, and I pushed the result into the end of the array. I don't know how to write back to google sheets. Below is what I have. Currently it will set the values based on the first result(online course). So all values are set to online. I am running it on 7 rows right now, but will need to run it on 20,000. function onlineonly(online){ var sheet = SpreadsheetApp.getActiveSheet(); var students = sheet.getRange('A2:D7').getValues(); var online = ["400","401","403","404","600"]; var m; var section; for(var i=0; i&lt;students.length; ++i){ section = students[i][3].substring(8,13); for(var j = 0;j&lt;online.length; j++){ if(section===online[j]){ section = m; } } if(section === m){ students[i].push("online"); } else { students[i].push("not online"); } var method = []; for(var k = 0; k&lt;students.length; k++){ if(students[i][4]=== "online"){ method = "online"; } else { method = "in person"; } sheet.getRange('c2:c7').setValue(method); } } }
has answer: http://stackoverflow.com/a/29323399
tagged with: google-sheets-api
tagged with: javascript
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29331903
has title: How to Setvalues off of an array google GAS for spreadsheets
tagged with: google-apps-script
score: 2

http://stackoverflow.com/a/30560581
has comment: http://stackoverflow.com/comment/51744367
downvote count: 0
has comment: http://stackoverflow.com/comment/56994297
has body: someClassInstance.constructor.name is exactly the correct way to do this. Transpilers may not support this, but it is the standard way per the specification. (The name property of functions declared via ClassDeclaration productions is set in 14.5.15, step 6.)
score: 260
has comment: http://stackoverflow.com/comment/49566713
has comment: http://stackoverflow.com/comment/51769707
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/49240982
accepted answer of: http://stackoverflow.com/q/29310530
answers question: http://stackoverflow.com/q/29310530
type: Answer
has comment: http://stackoverflow.com/comment/58805959
upvote count: 260
has comment: http://stackoverflow.com/comment/66956034
has comment: http://stackoverflow.com/comment/49216697

http://stackoverflow.com/a/29344906
has body: Look the code below. Now the "Matrix" is the array where as u can use this for your calculation
has comment: http://stackoverflow.com/comment/46877508
type: Answer
answers question: http://stackoverflow.com/q/29343728
has comment: http://stackoverflow.com/comment/46876692
score: 0

http://stackoverflow.com/q/29360321
has comment: http://stackoverflow.com/comment/46904951
type: Question
has comment: http://stackoverflow.com/comment/46904566
has comment: http://stackoverflow.com/comment/46983740
has title: In Javascript, when using an array.push method to add items to a list how do I get it to sort?
tagged with: javascript
has body: Edit: This is for use in PDF scripting. I use Acrobat pro but have been using Foxit as of late because it is much quicker than Acrobat. Below is the exact script I have to add items to a dropdown list titled TalentList. The following is the script in a button titled "Add new Talent" aray=[this.getField("TalentName").value];{aray.push(this.getField("TalentCost").value)} var x = aray[0] + "," + aray[1]; this.getField("TalentList").insertItemAt(this.getField("TalentNa me").value,x) {this.getField("TalentName").value="";} {this.getField("TalentCost").value="";} {this.getField("TalentName1").value=" ";} Where I have the fields TalentName and TalentCost and I input values into those then click the button to add them to the dropdown TalentList. The script works fine as is. But, the problem I am having is every time I add a new item it adds it to the top of the list and does not sort it when I want it to be sorted. Is there something I can add to the above script in the button to cause this to happen automatically every time? Please note that I have the "Sort Items" box checked in the properties of the TalentList dropdown. I believe I would use insertItemAt (as told by someone else) but I don't know the method or the correct parameter to use.
score: 0
tagged with: http://stackoverflow.com/tag/pdf
answer count: 1
has comment: http://stackoverflow.com/comment/46904658
has answer: http://stackoverflow.com/a/50026204
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46904593
linked to: http://stackoverflow.com/q/586182

http://stackoverflow.com/q/29255553
score: 0
answer count: 2
has title: Javascript: how to extract string from attribute via Regexp
has answer: http://stackoverflow.com/a/29255690
accepted answer: http://stackoverflow.com/a/29256774
has body: How can I extract the string from a certain data attribute via regexp. Button Button And my javascript is var Buttons = document.querySelectorAll([data-toggle="button"]); [].forEach.call(Buttons, function (item) { var data = item.getAttribute('data-'+INEEDTHIS+'-text') var option = INEEDTHIS return new Button(item,option); })
tagged with: regex
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29256774
possible better answer: http://stackoverflow.com/a/29255690
type: Question
tagged with: javascript

http://stackoverflow.com/q/29287441
has answer: http://stackoverflow.com/a/29287887
type: Question
has title: Hide Grouped Isotope Elements Headings
answer count: 1
tagged with: javascript
tagged with: jquery-isotope
tagged with: jquery
score: 0
has body: Using isotope to filter, and each element is within a specific group. Each element's group headings stack on top of another when filtering, and I'm not sure the best way to hide the titles when they're not active/selected. Each element is .person, but the headings also have .sub-head class. Is there a way to append .sub-head to itemSelector? Or add another var to filter? My js code: //***********DIRECTORY SCRIPTS*********** var $j = jQuery.noConflict(); $j('#directory').imagesLoaded( function() { var $container = $j('#directory'); filters = {}; $container.isotope({ itemSelector: '.person', layoutMode : 'fitRows' }); $j('.filter .button a').click(function(){ var $this = $j(this); if ( $this.hasClass('selected') ) { return; } var $optionSet = $this.parents('.option-set'); $optionSet.find('.selected').removeClass('selected'); $this.addClass('selected'); var group = $optionSet.attr('data-filter-group'); filters[ group ] = $this.attr('data-filter'); var isoFilters = []; for ( var prop in filters ) { isoFilters.push( filters[ prop ] ) } var selector = isoFilters.join(''); $container.isotope({ filter: selector }); return false; }); }); Below is a screenshot that shows how 'Research Faculty' is selected and the appropriate elements appear. But how can I hide the other headings? [Note: I am using this with php and WordPress queries, but think it's a js issue. I can share full source code if need be; didn't want to just dump it all here]
type: UnansweredQuestion

http://stackoverflow.com/comment/46813174
type: Comment
has text: Send it as a parameter `myFunc(this)` and, at the function, you add the class like `object.className += " myClass"`. this should work
type: AnswerComment
comment on: http://stackoverflow.com/a/29309549
score: 0

http://stackoverflow.com/q/29305869
answer count: 1
tagged with: socket.io
tagged with: javascript
has title: how to load config file to an angular Object
accepted answer: http://stackoverflow.com/a/29306763
type: AnsweredQuestion
tagged with: angularjs
type: Question
tagged with: fs
has body: I have a simple config page set up on my nodeJS server. 4 inputfields to store some IPs. those fields are bound to var formApp = angular.module('formApp', []) .controller('formController', function($scope) { $scope.formData = {}; loadConfig(); $scope.$watchCollection('formData',function() { saveConfig($scope); }); }); Every change in the model calls the saveConfig(), which saves the config on the server: function saveConfig($scope) { socket.emit('save_config', {config: $scope.formData}); } This seems to work. The Server correctly prints the content of the received object and there is no error in the saving process. Now i want to LOAD the config into the angular Model, everytime the page is opened. loadConfig() tells the server to load the config.json, parse it, and send it to the browser: socket.on('load_config', function(data) { console.log("[INFO] Config received:"); angular.element(document.getElementById('config')).scope().formData = data; }); but it doesn't seem to work.. on page refresh, all the fields are empty. besides, $scope.formData = {}; empties the object, so the config is immediately overwritten. how can i prevent this? (i don't know if this is actually the whole problem) Is there anything terribly wrong with my approach? Thanks UPDATE: It seems not to be completely wrong... on refresh, the inputs are empty, but if i start typing and console.log the formData Object, it seems to have loaded the values in a weird, nested way {"config":{"config":{"config":{"config":{},"ip2":"tzfrzftztrf","ip3":"ztu6tzzt6"},"ip2":"hhhkkizbi"},"ip2":"hhkkkkööö"},"ip3":"h"} this was 4 refreshes. So it seems to work somehow, but not load it correctly
tagged with: node.js
has answer: http://stackoverflow.com/a/29306763
score: 0

http://stackoverflow.com/comment/46920719
has text: 23, 1236], [19, 3000], [13, 3054], [19, 4000] this is the data that is not what i needed and not working. any thing else please
type: Comment
comment on: http://stackoverflow.com/a/29369033
score: 0
type: AnswerComment

http://stackoverflow.com/a/29502518
answers question: http://stackoverflow.com/q/29370995
score: 0
has body: Check if you have set up in you html file. That is what triggers the grunt uglyfy/css min task. Or you can just un-comment these tasks in your grunt config file and make sure they are un-comented in the buttom inside your build task. Good luck
type: Answer

http://stackoverflow.com/comment/46725638
comment on: http://stackoverflow.com/a/29261669
has text: I am expecting the value to be fetched to controller without passing in a parameter actually.
type: AnswerComment
type: Comment
score: 0

http://stackoverflow.com/comment/46769421
has text: And just highlights the problem in bootstrap.js: `if (!jQuery) { throw new Error("Bootstrap requires jQuery"); }` Instead of showing the problem inside the Html
comment on: http://stackoverflow.com/q/29285808
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/q/29304469
upvote count: 1
type: Question
tagged with: javascript
has body: So i'm loading my cookies onload, but when I originally create a cookie, it's not saving in Chrome. It works fine in Safari though until I quit and relaunch. Here's my JS relevent to the cookies: console.log("Raw Cookie: "+document.cookie) var serverIP = document.cookie.replace(/(?:(?:^|.*;\s*)serverIpCookie\s*\=\s*([^;]*).*$)|^.*$/, "$1"); var ipUI = false console.log("Cookie: "+serverIP) function checkCookie(){ if (serverIP == ''){ document.getElementById("serverInfoID").style.display='block'; }else if (!(serverIP == '')){ document.getElementById("serverInfoID").style.display='none'; updateDevice(9999); }; }; function getServerInfo(){ if (!(document.getElementById('usip').value == '')){ var now = new Date(); now.setMonth( now.getMonth() + 1) if (serverIP == ''){ serverIP = "ws://"+document.getElementById('usip').value+":8000"; document.cookie = "serverIpCookie=" + serverIP + ";"; document.cookie = "expires=" + now.toUTCString() + ";" }else{ serverIP = "ws://"+document.getElementById('usip').value+":8000"; document.cookie = "serverIpCookie=" + serverIP + ";"; document.cookie = "expires=" + now.toUTCString() + ";" } document.getElementById('usipButton').style.background="#f39c12"; updateDevice(9999, true); }; };
downvote count: 0
favorite count: 0
type: UnansweredQuestion
has title: JavaScript cookies not saving?
answer count: 0
tagged with: cookies
score: 1

http://stackoverflow.com/a/29295495
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/29252458
score: 3
answers question: http://stackoverflow.com/q/29252458
downvote count: 0
has body: My own solution: src\com\foo\HistoryLinkCombobox.java package com.foo; import org.zkoss.zk.ui.sys.ContentRenderer; import org.zkoss.zul.Combobox; public class HistoryLinkCombobox extends Combobox { public static final String PR_HISTORY_INDEX = "historyIndex"; private int _historyIndex; public int getHistoryIndex() { return _historyIndex; } public void setHistoryIndex( int historyIndex ) { if( _historyIndex == historyIndex ) return; _historyIndex = historyIndex; smartUpdate( PR_HISTORY_INDEX, _historyIndex ); } protected void renderProperties( ContentRenderer renderer ) throws java.io.IOException { super.renderProperties( renderer ); render( renderer, PR_HISTORY_INDEX, _historyIndex ); } } src\web\js\com\foo\HistoryLinkCombobox.js com.foo.HistoryLinkCombobox = zk.$extends(zul.inp.Combobox, { $define : { historyIndex : function(value) { if (this.desktop) this.clear(); } }, $init : function() { this.$supers('$init', arguments); this.setZclass('z-combobox'); }, open : function() { this._getItemsFromLocalStorage(); this.$supers('open', arguments); }, doBlur_ : function() { this.$super('doBlur_', arguments); this._storeInputInLocalStorage(); }, _getItemsFromLocalStorage : function() { if (!this._canUseLocalStorage()) return; var prevInputs = this._getPrevInputs(); for ( var i = 0; i < prevInputs.length; i++) { this._createComboitem(prevInputs[i]); } }, _createComboitem : function(lbl) { for ( var ci = this.firstChild; ci; ci = ci.nextSibling) if (ci.getLabel() == lbl) return; var item = new zul.inp.Comboitem({ label : lbl }); this.appendChild(item); }, _storeInputInLocalStorage : function() { if (!this._canUseLocalStorage()) return; var prevInputs = this._getPrevInputs(); var currentInput = this.getValue(); if (!currentInput || jq.inArray(currentInput, prevInputs) != -1) return; prevInputs.push(currentInput); localStorage[this._getStorageKey()] = prevInputs.toString(); }, _canUseLocalStorage : function() { return typeof (Storage) !== "undefined" && this.getHistoryIndex() …
upvote count: 3

http://stackoverflow.com/q/29340289
favorite count: 0
accepted answer: http://stackoverflow.com/a/29340556
score: 0
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46867978
tagged with: css
has comment: http://stackoverflow.com/comment/46868111
possible better answer: http://stackoverflow.com/a/29340412
has answer: http://stackoverflow.com/a/29340412
has body: I am trying to use CSS to center the ASlider Jquery plugin (http://varunnaik.github.io/A-Slider/) which I have embedded into the HTML code for my website. For the life of me I can't figure out how to do it! It seems adamant that it wants to stay on the left side of my page. I have tried using the float and display CSS elements; neither of them did anything. I even tried using margin and padding, and still nothing happened. Hell, I was desperate enough to see if text-align: center; would work but that didn't do anything either. Here is the script in CSS and HTML to include the ASlider: .aslider { margin: auto; float: center; }
has answer: http://stackoverflow.com/a/29341208
upvote count: 1
downvote count: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29340556
type: Question
has title: Horizontally Centering jQuery embedded in HTML using CSS
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/29362502
has comment: http://stackoverflow.com/comment/46908782
downvote count: 0
has comment: http://stackoverflow.com/comment/46908811
type: Answer
answers question: http://stackoverflow.com/q/29362406
has comment: http://stackoverflow.com/comment/46908768
has body: For the inner text in span, you can use jQuery html(): $(".chosen-single span").html('1 - Test Setup123'); Then you can append the div after the span, by using jquery insertAfter(): $('&lt;div&gt;&lt;b&gt;&lt;/b&gt;&lt;/div&gt;').insertAfter('.chosen-single span');
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/46908999

http://stackoverflow.com/q/29228977
linked to: http://stackoverflow.com/q/492809
type: UnansweredQuestion
score: 1
upvote count: 1
linked to: http://stackoverflow.com/q/802854
type: Question
has title: Responsive images with javascript document.write
tagged with: responsive-design
has answer: http://stackoverflow.com/a/29233364
has answer: http://stackoverflow.com/a/29229159
tagged with: image
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/29229105
favorite count: 0
has answer: http://stackoverflow.com/a/29229297
has body: I want to use a responsive image on my site, load a different resolution based on screen size, and have come up with a simple javascript approach, see below. Would there be any reason why NOT to use this solution? Thanks! &lt;script language="Javascript"&gt; var w=window.innerWidth; if (w&lt;=480){ document.write('&lt;img src="files/design/logo_480.jpg" '); }else if(w&lt;=768){ document.write('&lt;img src="files/design/logo_768.jpg" '); }else{ document.write('&lt;img src="files/design/logo_960.jpg" &gt;'); } &lt;/script&gt;
answer count: 4

http://stackoverflow.com/comment/46717967
type: Comment
comment on: http://stackoverflow.com/a/29255133
has text: @PeterJones `element(by.css('ul.firstmen > li > a'))` is an example of `scope.page.link`.
score: 0
type: AnswerComment

http://stackoverflow.com/q/29355128
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29356033
accepted answer: http://stackoverflow.com/a/29356033
type: Question
tagged with: canvas
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46895352
score: 0
tagged with: colors
has title: Javascript Canvas get color with getImageData(x, y, 1, 1).data
answer count: 1
has comment: http://stackoverflow.com/comment/46895376
has body: When I cogo a color getImageData ( x, y, 1 , 1) .data in the pc gives me a rgb, but when I do it on the phone I have different values, eg : pc: 255 255 255 Mobile : 255 254 255 Pc: 255 0 0 mobile: 255 2 0 Use colors to make certain decisions

http://stackoverflow.com/comment/46893572
comment on: http://stackoverflow.com/q/29354171
has text: how should we know? You haven't shown any html. you'd have to look at the page structure and figure it out.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29257679
tagged with: javascript
has comment: http://stackoverflow.com/comment/46717914
has answer: http://stackoverflow.com/a/29259446
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/46718215
tagged with: jquery
tagged with: angularjs
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46717915
has title: Reloading a controller on click from another controller in angularjs
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29257915
type: Question
has body: Below is my html code, I have a method in moreThanOne.html which makes variable show as true therefore it loads one.html for the first time and calls the init method of my controller. but whenever I change value of show again it does not reload the controller associated with one.html. So my requirement here is init() method of initiatePaymentCtrl should get call whenever I click a button associated with another controller, so that data refreshes on one.html 1"> Controller app.controller('initiatePaymentCtrl', function($scope, $http, paymentService) { function init() { alert('init'); var issuerId = paymentService.getIssuerId(); var paymentItemId = paymentService.getPaymentItemId(); $scope.paymentOptions = {}; if (typeof issuerId !== "undefined") { paymentService.getPaymentOptions(issuerId,paymentItemId).then( function(paymentOptions) { $scope.paymentOptions = paymentOptions; }); } } init(); $scope.initiateInitialPayment = function(){ paymentService.initiateInitialPayment(); } }); I cant use service as chances are there that data will not change on click
has comment: http://stackoverflow.com/comment/46717805

http://stackoverflow.com/q/29242799
has answer: http://stackoverflow.com/a/29242910
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has body: I've got a page with multiple divs and a javascript toggle in place that swaps the visible div when you click the links, but I'd like to have the first div already visible when the page loads (myDiv1 in the code below). Javascript here: &lt;script type="text/javascript"&gt; document.load = function(){ document.getElementById('myDiv1').style.display = 'block'; }; var currentActiveDiv; toggleDiv = function(id){ var domElement = document.getElementById(id); if (currentActiveDiv){ var elementToHide = document.getElementById(currentActiveDiv); elementToHide.style.display = 'none'; } domElement.style.display = 'block'; currentActiveDiv = id; }; &lt;/script&gt; HTML here: &lt;h3&gt;&lt;a href="#" id="first option" onclick="toggleDiv('myDiv1');" class="homeheader"&gt;Div1&lt;/a&gt; &lt;br&gt; &lt;a href="#" id="first option" onclick="toggleDiv('myDiv2');" class="homeheader"&gt;Div2&lt;/a&gt; &lt;br&gt; &lt;a href="#" id="first option" onclick="toggleDiv('myDiv3');" class="homeheader"&gt;Div3&lt;/a&gt; &lt;br&gt; &lt;a href="#" id="first option" onclick="toggleDiv('myDiv4');" class="homeheader"&gt;Div4&lt;/a&gt;&lt;/h3&gt; &lt;/td&gt; &lt;td width="50"&gt; &amp;nbsp; &lt;/td&gt; &lt;td width="500"&gt; &lt;br&gt; &lt;br&gt; &lt;div id="myDiv1" style="display:none;"&gt; &lt;p class=textwhheader&gt; Div 1 description. &lt;/p&gt; &lt;br&gt; &lt;a id='register' class="btn red pure-button pure-button-primary" style="font-size:13.33px; font-weight:700; line-height:26px; height:24px;vertical-align:middle;" href='mecplans.html' title="Click here to learn more."&gt; Learn More &lt;/a&gt; &lt;/div&gt; &lt;div id="myDiv2" style="display:none;"&gt; &lt;p class=textwhheader&gt; Div 2 description. &lt;/p&gt; &lt;br&gt; &lt;a id='register' class="btn red pure-button pure-button-primary" style="font-size:13.33px; font-weight:700; line-height:26px; height:24px;vertical-align:middle;" href='minimumplans.html' title="Click here to learn more."&gt; Learn More &lt;/a&gt; &lt;/div&gt; &lt;div id="…
type: AnsweredQuestion
score: 0
tagged with: toggle
type: Question
has comment: http://stackoverflow.com/comment/46691629
has answer: http://stackoverflow.com/a/29245651
tagged with: javascript
has comment: http://stackoverflow.com/comment/46691624
answer count: 2
accepted answer: http://stackoverflow.com/a/29245651
has title: Javascript toggle w/ multiple divs, first div initially visible
tagged with: visibility
possible better answer: http://stackoverflow.com/a/29242910

http://stackoverflow.com/q/29280624
type: Question
has title: Ajax and php, result in a div
has answer: http://stackoverflow.com/a/29281147
tagged with: javascript
has comment: http://stackoverflow.com/comment/46760010
score: 0
has answer: http://stackoverflow.com/a/29281250
answer count: 2
accepted answer: http://stackoverflow.com/a/29281250
has comment: http://stackoverflow.com/comment/46760102
tagged with: jquery
tagged with: ajax
possible better answer: http://stackoverflow.com/a/29281147
tagged with: php
has comment: http://stackoverflow.com/comment/46759099
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46759348
has comment: http://stackoverflow.com/comment/46759766
has body: I want show the result of my server page in the "result" div. This is my scheme: home.php <?php include_once 'core.login.php'; ?> myscripts.js $(document).ready(function() { $('#login').submit(function() { // catch the form's submit event $.ajax({ // create an AJAX call... data: $(this).serialize(), // get the form data type: $(this).attr('method'), // GET or POST url: $(this).attr('action'), // the file to call success: function(response) { // on success.. $('#result').html(response); // update the DIV } }); return false; // cancel original event to prevent form submitting }); }); core.login.php <?php // stuff about $db variable e other stupid things like $tool = new Tools etc... $email = $_POST["email"]; $password = $_POST["password"]; // Initializing login process if (isset($email) or isset($password)) { $tool->decode($email, $password, $db); } ?> Data login: Email: Password: class.php public function decode($email, $password, $db) { if ($stmt = $db->prepare("SELECT password FROM users WHERE email = ?")) { $stmt->bind_param('s', $email); $stmt->execute(); $stmt->store_result(); $stmt->bind_result($password_db); $stmt->fetch(); if ($stmt->num_rows == 1) { if ($password == $password_db) { echo "Success"; } else { echo "Error"; } } else { echo "Email didn't found!"; } } } Without AJAX if i start the code normally it work, it give me the correct echo result ( success or error ) but when i use AJAX, nothing happen. UPDATE Ok guys the problem was the action url, my core file is in the folder core/core.login.php, now it display the page in the result div, but the page core show me this now: Fatal error: Call to a member function decode() on a non-object in website on line 9 Maybe ajax don't pass the variables like object?
has comment: http://stackoverflow.com/comment/46761518

http://stackoverflow.com/q/29307910
score: 9
type: UnansweredQuestion
tagged with: node.js
has title: Sails.js get many to many association count
type: Question
tagged with: sails.js
upvote count: 9
downvote count: 0
has body: I have a model (user) that has an association with another model (phone). This association is many to many. The following call is built in to Sails and allows me to get all the phone records for a particular user: GET - /user/:userId/phones I would like to be able to implement pagination on that call but cannot figure out how to get the total number of results. I've tried overwriting the blueprints find.js and/or findOne.js in order to return the count but the call above doesn't seem to run through that logic.
tagged with: javascript
has answer: http://stackoverflow.com/a/29423551
answer count: 1
favorite count: 0

http://stackoverflow.com/comment/46840438
has text: Why would that cause another run through the loop? I would just hit the else statement and process it that way or throw an error. That wouldn't cause an infinite loop.
score: 0
comment on: http://stackoverflow.com/a/29324057
type: Comment
type: AnswerComment

http://stackoverflow.com/comment/46687247
type: QuestionComment
has text: it is just asynchronous...
score: 1
comment on: http://stackoverflow.com/q/29240558
type: Comment

http://stackoverflow.com/comment/46872206
comment on: http://stackoverflow.com/a/29340727
type: AnswerComment
score: 0
has text: @ParkerSong that is what you are trying to say..it'll mess you are making you service tightly coupled with particular controller..
type: Comment

http://stackoverflow.com/q/29336425
tagged with: boolean
has title: Logical && of an array of strings
answer count: 3
tagged with: arrays
downvote count: 0
score: 1
tagged with: string
has answer: http://stackoverflow.com/a/29336551
has body: I'm trying to take a JavaScript array of strings, and return a boolean value based on all the elements in it. A logical &amp;&amp; between non-empty strings should return true. I've found simple way to return a bool between two strings, using !!("String1" &amp;&amp; "String2"). However, if I had these two strings in an array like var myArr = ["String1","String2"], how would I go about doing this?
favorite count: 0
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29336517
accepted answer: http://stackoverflow.com/a/29336551
upvote count: 1
has answer: http://stackoverflow.com/a/29336435
type: Question
possible better answer: http://stackoverflow.com/a/29336517
tagged with: javascript

http://stackoverflow.com/comment/46739087
type: Comment
has text: You could also use getElementByTag
comment on: http://stackoverflow.com/a/29266891
type: AnswerComment
score: 0

http://stackoverflow.com/a/29303315
answers question: http://stackoverflow.com/q/29302891
has body: What about using document.currentScript.async? Source: https://developer.mozilla.org/en-US/docs/Web/API/Document/currentScript
score: 1
has comment: http://stackoverflow.com/comment/46801179
type: Answer
upvote count: 2
downvote count: 1

http://stackoverflow.com/a/29265621
has body: The point of fizzbuzz is to demonstrate elementary coding skill This exercise is testing that you can use a for loop, you understand elementary Boolean arithmetic and you can write a conditional. That's the purpose of this exercise. If you really need everything on it's own line, just skip the array altogether and console.log('Fizzbuzz') instead. Alternately create a string and append to that, making sure to write a newline character each time round the loop. Alternately, you could compose your array and join('\n'). I doubt you'd fail for not returning. That's not the spirit of fizzbuzz. To be frank though, if you're finding this hard, perhaps you are one of those people that Fizzbuzz is designed to eliminate. Harsh, sorry, there are other career options open to you. This should be a trivial 30 second job.
answers question: http://stackoverflow.com/q/29264397
score: 0
has comment: http://stackoverflow.com/comment/46734955
has comment: http://stackoverflow.com/comment/46733321
type: Answer
has comment: http://stackoverflow.com/comment/46733556
has comment: http://stackoverflow.com/comment/46733417

http://stackoverflow.com/comment/46766548
comment on: http://stackoverflow.com/a/29277216
type: AnswerComment
type: Comment
has text: Igor probably has the right answer above; I didn't realize this was all being generated by rails. I might look into it more if I have time, but I have no working knowledge of how rails generates ajax.
score: 0

http://stackoverflow.com/a/29256408
has body: You don't need a loop for this. All you need is a variable that keeps track of how many times the button has been clicked (or a magic one-liner like the answer provided by @naomik). var timesClicked = 0; In your onClick() method: var answer = prompt(questions[timesClicked]); // ask user a question, store the answer if(timesClicked &lt; questions.length) timesClicked++; else // optionally you can reset the counter after all the questions have been answered timesClicked = 0;
type: AcceptedAnswer
score: 0
answers question: http://stackoverflow.com/q/29256143
accepted answer of: http://stackoverflow.com/q/29256143
type: Answer

firefox
tags question: http://stackoverflow.com/q/29280106
tags question: http://stackoverflow.com/q/29222292
tags question: http://stackoverflow.com/q/29351560
tags question: http://stackoverflow.com/q/29351485
tags question: http://stackoverflow.com/q/29255267
tags question: http://stackoverflow.com/q/29322955
tags question: http://stackoverflow.com/q/29282885
tags question: http://stackoverflow.com/q/29291275
tags question: http://stackoverflow.com/q/29355141
tags question: http://stackoverflow.com/q/29347400
tags question: http://stackoverflow.com/q/29242346
tag name: firefox
tags question: http://stackoverflow.com/q/29232145
tags question: http://stackoverflow.com/q/29321356
tags question: http://stackoverflow.com/q/29282950
tags question: http://stackoverflow.com/q/29364533
type: Tag
tags question: http://stackoverflow.com/q/29344162
tags question: http://stackoverflow.com/q/29246871
tags question: http://stackoverflow.com/q/29258376
tags question: http://stackoverflow.com/q/29342455
tags question: http://stackoverflow.com/q/29244803
tags question: http://stackoverflow.com/q/29316712
tags question: http://stackoverflow.com/q/29329394
tags question: http://stackoverflow.com/q/29322250
tags question: http://stackoverflow.com/q/29247474
tags question: http://stackoverflow.com/q/29347373
tags question: http://stackoverflow.com/q/29231704
tags question: http://stackoverflow.com/q/29297426
tags question: http://stackoverflow.com/q/29289988
tags question: http://stackoverflow.com/q/29330867
tags question: http://stackoverflow.com/q/29320874
tags question: http://stackoverflow.com/q/29341696
tags question: http://stackoverflow.com/q/29227948
tags question: http://stackoverflow.com/q/29255294
tags question: http://stackoverflow.com/q/29250534
tags question: http://stackoverflow.com/q/29286752
tags question: http://stackoverflow.com/q/29238815
tags question: http://stackoverflow.com/q/29296061
tags question: http://stackoverflow.com/q/29299913
tags question: http://stackoverflow.com/q/29272324

http://stackoverflow.com/a/29234194
answers question: http://stackoverflow.com/q/29231101
score: 0
has body: Thanks to Ploko on OpenClassRoom : Il faut que tu le mettes dans les exports de ton module : module.exports = { superText: "lol" }; var test = require("./test.js").superText;
type: Answer

http://stackoverflow.com/a/29347833
answers question: http://stackoverflow.com/q/29347535
has comment: http://stackoverflow.com/comment/46881475
score: -1
has comment: http://stackoverflow.com/comment/46950024
type: Answer
has body: You can't pass the item itself but you should be able to pass the id and handle it in the controller: ID: {{item.id}} Type: {{item.type}} Version: {{item.metadata.version}} State: {{item.metadata.state}}
downvote count: 2
upvote count: 1

http://stackoverflow.com/comment/46895706
score: 0
has text: http://stackoverflow.com/a/2601273/717383
comment on: http://stackoverflow.com/q/29355297
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29226549
has title: JavaScript Object Scope - using object variables within object methods
type: Question
has body: I'm trying to understand JavaScript object syntax. I have a canvas element that I'm drawing to, and I want to change the pattern I draw to it. I expect it to work like this: pattern1 = { 'x':0, 'y':0, 'draw': function() { context.clearRect(0,0,w,h); context.save(); context.translate(this.x, this.y); context.fillText('Hello', 0, 0); context.restore(); this.x += 1; this.y += 1; } }; But this does not work. The 'x' and 'y' variables are not in the "this" scope. So instead of using this I refer to the object explicitly: 'pattern1.x' and 'pattern1.y'. But it seems like there should be a better way to do this. I'm not so much looking for a "solution" here as an explanation. Thanks.
has comment: http://stackoverflow.com/comment/46662079
answer count: 1
tagged with: closures
tagged with: javascript
tagged with: scope
score: 0
has comment: http://stackoverflow.com/comment/46867214
has answer: http://stackoverflow.com/a/29226765
tagged with: this
linked to: http://stackoverflow.com/q/13441307
linked to: http://stackoverflow.com/q/1600130
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46660463

http://stackoverflow.com/q/29334279
has body: I am having a really strange issue with a single user when using Xamarin.Auth for authentication. This user has a Samsung Galaxy S3. When they try to sign in to their account using Xamarin.Auth, the WebView which Xamarin.Auth uses to display the login page has no JavaScript enabled. This means that they are unable to click the sign-in button on the page, preventing them from signing in. I can provide code examples, however they do not differ much from the Xamarin.Auth examples/docs. Also, This issue is particular to this user in that I have tested my app with another Galaxy S3 and the authentication works as expected. I am really unsure as to how to debug this issue, any help would be appreciated. https://components.xamarin.com/view/xamarin.auth
tagged with: xamarin.auth
answer count: 0
score: 1
tagged with: xamarin.android
tagged with: authentication
upvote count: 1
type: Question
downvote count: 0
tagged with: javascript
tagged with: android
favorite count: 0
has title: Xamarin Android - Javascript not loading in WebView when using Xamarin.Auth
type: UnansweredQuestion

http://stackoverflow.com/comment/46900800
type: Comment
has text: Besides layout what is the other use-case for HTML tables you are considering?
comment on: http://stackoverflow.com/a/29357720
score: 0
type: AnswerComment

http://stackoverflow.com/comment/118500150
has text: You're right. OP would have marked this as an answer if this was the direct unblocking solution. This extends the right answer for cases where the primary key is composite. You clearly have not read the solution Ben Fortune provided.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/33561053

http://stackoverflow.com/comment/46940394
type: Comment
comment on: http://stackoverflow.com/a/29359161
score: 0
type: AnswerComment
has text: I know it's not very clean to do that and it is best to use some CSS classes BUT this answer is correct. So, downvoting without commenting why, it's not constructive...

http://stackoverflow.com/q/29235077
has answer: http://stackoverflow.com/a/29235111
type: AnsweredQuestion
has body: I have the following computed observable: self.getMovieDates = ko.computed(function() { $.ajax({ url: '/Utilities/UpdateTimesDropdown', data: { apiId: self.movieSelectedValue(), locationId: self.theatreSelectedValue() }, dataType: 'jsonp', success: function (data) { console.log(data.showtimes); return data.showtimes; } }); }, self); The html looks like this: &lt;select id="DateDD" data-bind="options: getMovieDates, optionsText: 'title', optionsValue: 'id', optionsCaption: 'Select Showdate', value: dateSelected"&gt;&lt;/select&gt; I can see in firebug that the ajax request is being made, I there are values being received. "console.log(data.showtimes)" looks like this: [Object { id="3/24/2015", title="Today (Tue, Mar 24, 2015)"}, Object { id="3/25/2015", title="Tomorrow (Wed, Mar 25, 2015)"}, Object { id="3/26/2015", title="Thu, Mar 26, 2015"}] Unfortunately, the drop down just does not get populated and I am running low on ideas, any thoughts?
accepted answer: http://stackoverflow.com/a/29235111
tagged with: knockout.js
type: Question
answer count: 1
tagged with: javascript
tagged with: ajax
score: 0
has title: dropdown not updated from computed observable

http://stackoverflow.com/q/29326921
answer count: 1
has title: Injector error no module found in angular.js?
tagged with: angularjs
type: UnansweredQuestion
tagged with: node.js
has comment: http://stackoverflow.com/comment/46844508
score: 0
type: Question
tagged with: sails.js
tagged with: javascript
has body: Hi i have been facing this issue for over a long time. I can able to found at the place,it is due to the ng-app in the html page. However i have the proper food module in js. What could the be the cause of this error? any idea? my code INDEX.HTML Scratchpad <!-- Stylesheets and Preprocessors ============================== You can always bring in CSS files manually with ` ` tags, or asynchronously using a solution like AMD (RequireJS). Or, if you like, you can take advantage of Sails' conventional asset pipeline (boilerplate Gruntfile). By default, stylesheets from your `assets/styles` folder are included here automatically (between STYLES and STYLES END). Both CSS (.css) and LESS (.less) are supported. In production, your styles will be minified and concatenated into a single file. To customize any part of the built-in behavior, just edit `tasks/pipeline.js`. For example, here are a few things you could do: + Change the order of your CSS files + Import stylesheets from other directories + Use a different or additional preprocessor, like SASS, SCSS or Stylus --> FoodForShare SAMPLE PAGE <!-- Client-side Javascript ======================== You can always bring in JS files manually with `script` tags, or asynchronously on the client using a solution like AMD (RequireJS). Or, if you like, you can take advantage of Sails' conventional asset pipeline (boilerplate Gruntfile). By default, files in your `assets/js` folder are included here automatically (between SCRIPTS and SCRIPTS END). Both JavaScript (.js) and CoffeeScript (.coffee) are supported. In production, your scripts will be minified and concatenated into a single file. To customize any part of the built-in behavior, just edit `tasks/pipeline.js`. For example, here are a few things you could do: + Change the order of your scripts + Import scripts from other directories + Use a different preprocessor, like TypeScript --> MAIN.JS /** * Defines module-scratchpadModule for the application *@dependencies: ui-router , A…
has answer: http://stackoverflow.com/a/29326934

http://stackoverflow.com/a/29329501
has body: Just make up your own :) $("#alert-wrapper").css({ 'zoom': 0.8, 'opacity':0 }).animate({ 'zoom': 1, 'opacity':1 },100) var end = new Date('04/01/2015'); var _second = 1000; var _minute = _second * 60; var _hour = _minute * 60; var _day = _hour * 24; var timer; var content = ""; function showRemaining() { var now = new Date(); var distance = end.getTime() - now.getTime(); if (distance &lt; 0) { clearInterval(timer); document.getElementById('countdown').innerHTML = 'EXPIRED!'; return; } var days = Math.floor(distance / _day); var hours = Math.floor((distance % _day) / _hour); var minutes = Math.floor((distance % _hour) / _minute); var seconds = Math.floor((distance % _minute) / _second); document.getElementById('countdown').innerHTML = days + 'days '; document.getElementById('countdown').innerHTML += hours + 'hrs '; document.getElementById('countdown').innerHTML += minutes + 'mins '; document.getElementById('countdown').innerHTML += seconds + 'secs'; } showRemaining(); // adding this so as to immediately show the time after alert is loaded timer = setInterval(showRemaining, 1000); #alert-wrapper{ border:1px solid black; height:120px; width:300px; padding:30px; padding-top:20px; position:relative; margin:0 auto; } #btn{ position:absolute; bottom:20px; right:20px; width:70px; height:30px; border:1px solid grey; background-color:white; } #btn:hover{ border:1px solid black; } #btn:active{ background-color:rgb(250,250,250); } &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt; &lt;div id="alert-wrapper"&gt; &lt;div id="countdown"&gt;&lt;/div&gt; &lt;input type="button" value="OK" id="btn" onclick="$(this).parent().animate({ 'zoom': 0.8, 'opacity':0 }, 100)"&gt; &lt;/div&gt;
type: Answer
has comment: http://stackoverflow.com/comment/46849187
has comment: http://stackoverflow.com/comment/46849176
upvote count: 1
accepted answer of: http://stackoverflow.com/q/29329203
score: 1
has comment: http://stackoverflow.com/comment/46849107
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46849253
downvote count: 0
answers question: http://stackoverflow.com/q/29329203

http://stackoverflow.com/q/29344619
type: Question
tagged with: function
upvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
has body: I have some problem with javascript/jQuery using Selectize.js $sel_professione; $(document).ready(function() { $sel_professione = $('#professioneCliente').selectize({ delimiter: ',', persist: false, create: function(input) { return { value: input, text: input } } }); $(document).on("click", "#b_Modifica", function() { $sel_professione.addOption({value:13,text:'foo'}); $sel_professione.selectize.addItem(13); $('#aggiungiCliente').modal('show'); }); When I try to modify $sel_professione from the onClick function I get an error from the javascript console: Uncaught TypeError: undefined is not a functionclienti.js:301 (anonymous function)jquery.js:3 m.event.dispatchjquery.js:3 m.event.add.r.handle I tried to move my onclick function inside the $.ready, but nothing changed. Some advice? Thanks all for the support that everytime you give me on this site :)
has comment: http://stackoverflow.com/comment/46876496
has comment: http://stackoverflow.com/comment/46875527
favorite count: 0
type: UnansweredQuestion
has title: Selectize select default value
has comment: http://stackoverflow.com/comment/46876002
tagged with: selectize.js
downvote count: 1
has answer: http://stackoverflow.com/a/29346324
has comment: http://stackoverflow.com/comment/46875396
score: -1
has comment: http://stackoverflow.com/comment/46876197

http://stackoverflow.com/q/29293629
type: AnsweredQuestion
has body: I have some jQuery code. How can I make it more simple? $(document).ready(function(){ $('.button1').hover(function() { $(".box-1").stop().animate({bottom:'0'}); $('.dul-1').stop().animate({top:'0px'}); }, function () { $(".box-1").stop().animate({bottom:'-100px'}); $('.dul-1').stop().animate({top:'-100px'}); } ); $('.button2').hover(function() { $(".box-2").stop().animate({bottom:'0'}); $('.dul-2').stop().animate({top:'0px'}); }, function () { $(".box-2").stop().animate({bottom:'-100px'}); $('.dul-2').stop().animate({top:'-100px'}); } ); }); fiddle link
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/29293664
accepted answer: http://stackoverflow.com/a/29293664
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0
upvote count: 1
has title: how to simplify animation jQuery code
favorite count: 0

http://stackoverflow.com/q/29275363
has comment: http://stackoverflow.com/comment/46750177
has title: Angular/Ionic: Keep all text in a separate file
answer count: 1
has body: I am building a mobile app using angular/ionic and am wondering if there is a recommended way of keeping ALL the text in a separate file. The idea being, during the testing phase it is quite easy for the content creator to make changes to the text in the app without going in the code.
tagged with: angularjs
type: Question
has answer: http://stackoverflow.com/a/29302908
score: 0
tagged with: ionic-framework
tagged with: javascript
type: UnansweredQuestion

http://stackoverflow.com/comment/46880787
score: 0
type: Comment
type: QuestionComment
has text: I need to test value of IsPosted column if `template = "booleanCheckboxFa"` if used for it. Test provided in code in queston works only in `formatter = "clickableCheckbox"` is used.
comment on: http://stackoverflow.com/q/29343222

http://stackoverflow.com/comment/46811217
comment on: http://stackoverflow.com/a/29269683
type: AnswerComment
has text: Thanks for that @Eric I got it in the end :)
score: 0
type: Comment

http://stackoverflow.com/comment/46731878
type: QuestionComment
comment on: http://stackoverflow.com/q/29263088
has text: You mean you're going to reduce over that collection, not over the groups?
score: 0
type: Comment

drupal-webform
tag name: drupal-webform
type: Tag
tags question: http://stackoverflow.com/q/29354951

http://stackoverflow.com/comment/46802442
type: Comment
has text: welll angular added the controller bla as blaCtrl and var vm = this; for a reason and all guides that u can see recomend using those instead of having controller as it is and using $scope. so the scope dosnt collide , with vm it wont collide and since this was added later on it seems abit odd to go back to the stuff angular had in the begining? why would they add something that abit longer if its worse then the stuff they already had ?
score: 0
comment on: http://stackoverflow.com/a/29303072
type: AnswerComment

http://stackoverflow.com/comment/46935170
comment on: http://stackoverflow.com/a/29361033
has text: Are your HTML/Javascript files statically hosted, or do you have a web server component running in some language?
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/q/29287235
tagged with: javascript
tagged with: jquery
score: 4
has answer: http://stackoverflow.com/a/29287326
favorite count: 0
has body: I'd like to affect all items in the array. The end result will be to decodeURIcomponent on each item. It's not working for me so I decided to change the value of each item to check the code. It doesn't change anything. Is there a better way of doing this, as really nested $.each functions seems a bit redundant to me. $(function() { var hResponse = []; hResponse.push("firstName", "lastName", "location"); var columns = []; columns.push({ "firstName": "Edward", "lastName": "Dane", "location": " Here" }, { "firstName": "Arthur", "lastName": "Dee", "location": "There" }, { "firstName": "Cherry", "lastName": "Red", "location": "OverHere" }); $.each(columns, function (key, value) { $.each(value, function (key1, value2) { value2 = "Meeeeep"; //value2 = decodeURIComponent(value2); }); }); $('#my-table').dynatable({ dataset: { records: columns } }); }); FirstName LastName
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29287326
linked to: http://stackoverflow.com/q/11922383
has comment: http://stackoverflow.com/comment/46771873
has comment: http://stackoverflow.com/comment/46771891
has title: Change nested object data with javascript
type: Question
upvote count: 4
has comment: http://stackoverflow.com/comment/46771868
linked to: http://stackoverflow.com/q/518000
answer count: 1
downvote count: 0

http://stackoverflow.com/q/29241643
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46689911
has comment: http://stackoverflow.com/comment/46798299
has comment: http://stackoverflow.com/comment/46799431
score: 1
has comment: http://stackoverflow.com/comment/46808867
tagged with: mysql
has comment: http://stackoverflow.com/comment/46732766
type: Question
has comment: http://stackoverflow.com/comment/46756448
answer count: 1
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/29241933
accepted answer: http://stackoverflow.com/a/29241933
has comment: http://stackoverflow.com/comment/46756860
favorite count: 0
linked to: http://stackoverflow.com/q/11237900
has comment: http://stackoverflow.com/comment/46735425
upvote count: 1
tagged with: php
has body: I am trying to make a dynamic dropdown when you select country, the state populates. I have all the information stored in two tables. How exactly do I do this? I have no problems doing the initial country list. But for states, I don't know how to handle javascript since that is client side and PHP is server side so the PHP would be executed before I get the countryID from the dropdown. Since I don't know how to code time travel, and I know I have seen this sort of thing before, how do I accomplish this? And I rather not download/pull all the data into an array since that is a total waste of memory so I figured a little sql, php, and javascript would work, but I am definitely missing something. Removed original source as it is now below. The database schema and information is below, if interested: mysql> show tables; +-----------------+ | Tables_in_earth | +-----------------+ | regions | | subregions | +-----------------+ 2 rows in set (0.01 sec) mysql> desc regions; +---------------+------------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +---------------+------------------+------+-----+---------+----------------+ | id | int(10) unsigned | NO | PRI | NULL | auto_increment | | country | varchar(45) | YES | | NULL | | | continent | varchar(45) | YES | | NULL | | | currency_code | varchar(45) | YES | | NULL | | | currency_name | varchar(45) | YES | | NULL | | | phone_prefix | varchar(45) | YES | | NULL | | +---------------+------------------+------+-----+---------+----------------+ 6 rows in set (0.00 sec) mysql> desc subregions; +-----------+------------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-----------+------------------+------+-----+---------+----------------+ | id | int(10) unsigned | NO | PRI | NULL | auto_increment | | region_id | int(10) unsigned | YES | MUL | NULL | | | name | varchar(45) | YES | | NULL | | | timezone | varchar(45) | YES | | NULL | | +--…
has title: Unable to dynamically populate dropdown with states from a country select

http://stackoverflow.com/comment/46796331
has text: You are also using a really old version of ember-data, I'm not sure queries were supported back then.
type: QuestionComment
comment on: http://stackoverflow.com/q/29298492
score: 2
type: Comment

http://stackoverflow.com/comment/46924117
type: AnswerComment
comment on: http://stackoverflow.com/a/29368170
score: 0
has text: Thanks for the guide, i've added what i need based on your fiddle here is the link: https://jsfiddle.net/ttwbxwon/66/ i'll marque this solved , thanks
type: Comment

http://stackoverflow.com/comment/46805195
type: Comment
type: QuestionComment
has text: Saving at periodic intervals would not work, since the accepted interval would be very short (every 5 seconds at most), and that would cause massive performance issues if we need to post back everything on the page every 5 seconds, and even then it is still not acceptable to the customer as data entered in between the 5 second save intervals would be lost if they navigate away.... Is there really no way to trigger this kind of save silently?
score: 0
comment on: http://stackoverflow.com/q/29287759

http://stackoverflow.com/comment/46787722
score: 0
type: Comment
has text: you _could_ do: `document.querySelectorAll("a[class='some class']")` if order was important
type: QuestionComment
comment on: http://stackoverflow.com/q/29296061

http://stackoverflow.com/a/29288816
type: Answer
answers question: http://stackoverflow.com/q/29288476
upvote count: 1
downvote count: 0
has body: Twitter widget iframe automatically creates a margin: 10px 0px; for the content. To remove this code, simply adding iframe {margin: 0 !important} to your css file would be enough. Working demo #column{ position: absolute; padding: 0; margin: 0; width: 500px; line-height: 0; } #div01{ position: relative; display: none; padding: 0; margin: 0; line-height: 0; background-color: blue; } #div02{ position: relative; display: none; padding: 0; margin: 0; line-height: 0; background-color: blue; } #div03{ position: relative; display: none; padding: 0; margin: 0; line-height: 0; background-color: blue; } iframe{margin:0 !important;}
score: 1

http://stackoverflow.com/comment/46961820
has text: @Chris there should be the button under the votedown button near the answer rating
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29373658

http://stackoverflow.com/comment/74073082
comment on: http://stackoverflow.com/a/38214280
type: Comment
has text: @PaulWhipp is that block mutates global state by assigning libs to window it's likely to cause an implicit dependency. Most obvious example are little jQuery plugins that are badly written (don't check for `define`, `require`/`exports`)
score: 0
type: AnswerComment

transclusion
type: Tag
tags question: http://stackoverflow.com/q/29284446
tags question: http://stackoverflow.com/q/29357821
tag name: transclusion
tags question: http://stackoverflow.com/q/29305161

http://stackoverflow.com/q/29286611
favorite count: 0
type: AnsweredQuestion
upvote count: 1
has answer: http://stackoverflow.com/a/29291784
type: Question
has title: Different actions for common components in FluxJS
tagged with: javascript
tagged with: reactjs
downvote count: 0
answer count: 1
tagged with: refluxjs
accepted answer: http://stackoverflow.com/a/29291784
score: 1
has body: In my flux application, I have a DropDown React component that renders itself with an array of Key Value Pairs. I'd like to have two different drop downs, one with Country Data, and another with City Data. In the Flux pattern, each dropdown would have a Selection Action that contains a payload of the selected value, which a corresponding store would use to update it's state. How do I specify which dropdown Selection action belongs to which store? I can create a wrapper component that is specific to each need i.e. CountryDropDown and CityDropDown, and have each create their own specific action CountrySelected and CitySelected but is that the idiomatic approach? If it is, how do I wire up the underlying DropDown component so that it's onChange handler fires the parent's action?
tagged with: reactjs-flux

binary-tree
tag name: binary-tree
type: Tag
tags question: http://stackoverflow.com/q/29324882

http://stackoverflow.com/q/29286395
score: 1
favorite count: 0
has title: Google trend widget into a Geckoboard
answer count: 0
type: UnansweredQuestion
upvote count: 1
type: Question
has body: I am looking to integrate a google trend widget into a Geckoboard dashboard. I know that Geckoboard integrates other google products such as GA or Adwords, but I haven't seen Google trends here. Although, Google trends provides some java script to plug a google trends graph into a HTLM page, can it be used in Geckoboard? I have been looking here https://developer.geckoboard.com/json#introduction, but couldn't find out if it was possible or not. I must confess I don't know how to code, but I am looking to know if it's (easily) feasible or not for someone who does know and what the main main steps would be for that. I believe it can be useful to any web marketing team who want to track clout of his brand compare to competitor. Thx in advance!
tagged with: javascript
tagged with: geckoboard
tagged with: dashboard
downvote count: 0
tagged with: google-trends

http://stackoverflow.com/q/29360769
type: AnsweredQuestion
has title: AngularJS controller throwing an error while injecting factory
score: 1
downvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/29360867
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/46905588
tagged with: controller
has comment: http://stackoverflow.com/comment/46943609
favorite count: 0
tagged with: angularjs
upvote count: 2
has answer: http://stackoverflow.com/a/29360867
has body: I'm new to Angular and I'm building my first angular app. I have my portfolio webpage where I want to get data from an external source and make it available to all the controllers. This is what I have for html: Mithun Mathew My js files: portfolioApp.js angular.module('portfolioApp',[]) .factory('Data', ['$scope', '$http', function DataFactory ($scope, $http) { var dataCtrl = this; $http({ method: 'GET', url: 'http://someurl/' }).success(function (data) { dataCtrl.data = data; console.log(data); }).error(function (error) { console.log("Hey! Something went wrong while loading. :("); }); return function(){ return dataCtrl.data; } }]); dataRetrieve.js angular.module('portfolioApp',[]) .controller('FirstCtrl', function(Data) { console.log('Hello'); console.log(Data()); }); Angular throws me an error when I inject Data into the controller. How do I get past this? I googled, watched YouTube videos and CodeSchool, and couldn't figure out why the error is thrown.

http://stackoverflow.com/q/29281469
type: UnansweredQuestion
has title: How to instantly fill in a text box on change using JQuery?
has answer: http://stackoverflow.com/a/29281592
has comment: http://stackoverflow.com/comment/46761641
has comment: http://stackoverflow.com/comment/46765010
tagged with: jquery
has comment: http://stackoverflow.com/comment/46760936
type: Question
has comment: http://stackoverflow.com/comment/46761204
has comment: http://stackoverflow.com/comment/46761572
answer count: 2
has body: I have a textbox which fills in the city. I have an autocomplete feature for that and its the standard autocomplete feature with data coming in from the db. The data coming in has city, state and country information.When the user selects the city from the autocomplete dropdown, it should populate the city, state and country. So I have an onchange on the city for this. The problem is that the state and country are filled only when I click on the respective textboxes and not instantly as it happens with on change. Code: $(".find-city").autocomplete(cityConfirmAutoCompleteOption); $(".find-city").autocomplete( "option", "appendTo", "#"+'button'+q.id ); $(".find-city").change(function(city) { $(".state").val(statecode); }); HTML: City State
has answer: http://stackoverflow.com/a/29282050
has comment: http://stackoverflow.com/comment/46761509
has comment: http://stackoverflow.com/comment/46761148
score: 0
has comment: http://stackoverflow.com/comment/46761708
tagged with: autocomplete
tagged with: javascript

http://stackoverflow.com/q/29225464
type: Question
tagged with: jquery-ui
has title: How to change IE browser logo?
tagged with: javascript
score: 0
has body: I run my application in IE Browser. Here when I enter my URL and run the application I want to display any other logo instead of IE logo. Here, Instead of this IE logo I want to display some other. How can I do this? This is only for when I will open my URL. In other cases want to display the default IE logo only. Please help me for do this.
tagged with: http://stackoverflow.com/tag/html
answer count: 4
favorite count: 0
has answer: http://stackoverflow.com/a/34430639
has answer: http://stackoverflow.com/a/29225535
has answer: http://stackoverflow.com/a/29225710
upvote count: 1
tagged with: css
type: AnsweredQuestion
tagged with: internet-explorer
possible better answer: http://stackoverflow.com/a/29225710
has answer: http://stackoverflow.com/a/39011725
downvote count: 1
accepted answer: http://stackoverflow.com/a/29225535

http://stackoverflow.com/a/29334109
score: 1
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/29334058
upvote count: 1
has comment: http://stackoverflow.com/comment/46857353
has body: If for some reason you don't want to wrap your &lt;div&gt;s in an &lt;a&gt;, you can just add an ng-click attribute to them and redirect in your controller code. If your redirect is internal, you should look into using the $location service, otherwise use the $window service.

http://stackoverflow.com/comment/46819041
has text: Also, inserting a digit to a field that is already full will insert an extra space after that field
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29312803
type: AnswerComment

http://stackoverflow.com/q/29255169
has answer: http://stackoverflow.com/a/37211838
tagged with: token
has answer: http://stackoverflow.com/a/29255446
type: UnansweredQuestion
has body: $.ajax({ url: 'https://api-ssl.bitly.com/oauth/access_token', type: 'POST', contentType: 'application/x-www-form-urlencoded', dataType: 'json', data: { Authorization: "Basic " + btoa('myusername' + ":" + 'mypassword@123') }, success: function (result) { console.log(result); }, error: function () { alert("Cannot get data"); } }); I am trying to get access token from bitly api by providing username and password but it is showing invalid_client_authorization error. Does any one have idea on the same? Bitly documentation : http://dev.bitly.com/authentication.html#resource_owner_credentials
tagged with: http://stackoverflow.com/tag/json
has title: how to get access token from bitly using password and username?
type: Question
score: 0
answer count: 2
tagged with: javascript
tagged with: jquery
tagged with: ajax

http://stackoverflow.com/comment/46875880
has text: i am using chrome and it clicks inside the box but does not sendKeys(). how can one make chrome work?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29314526
type: Comment

http://stackoverflow.com/q/29245335
score: 0
has comment: http://stackoverflow.com/comment/46696739
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46696455
has comment: http://stackoverflow.com/comment/46696295
answer count: 0
tagged with: twitter-bootstrap
has comment: http://stackoverflow.com/comment/46696495
has title: google analytics bootstrap page
type: Question
tagged with: google-analytics
has comment: http://stackoverflow.com/comment/46696496
tagged with: javascript
has comment: http://stackoverflow.com/comment/46696901
has comment: http://stackoverflow.com/comment/46696407
has body: I have inserted the google universal tracking code into my index.html based on Bootstrap Framework. It's like the following. However, in my Google analytics account it says the code was not installed. Anything wrong? &lt;/div&gt; &lt;/div&gt; &lt;script src="js/jquery-1.11.2.min.js"&gt;&lt;/script&gt; &lt;script src="js/bootstrap.min.js"&gt;&lt;/script&gt; &lt;script&gt; (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-3018197-1', 'auto'); ga('send', 'pageview'); &lt;/script&gt; &lt;/body&gt;

http://stackoverflow.com/a/29266615
has comment: http://stackoverflow.com/comment/46735129
score: 3
downvote count: 0
has body: I thought ice candidates were people who have opened a window Nope, that's where you're wrong. The ICE protocol is trying to establish a direct network connection between the two peers. This is a hard problem. There are many problems in regular networking topology to work around and many possible routes a direct connection could take. The ICE protocol uses a third party server (as in, somebody other than the two clients you're trying to connect) to probe possible network paths between both peers. That's what ICE candidates are. They're one suggestion how a connection may be established. The three parties keep probing and testing different possibilities until all are exhausted and/or a good direct connection has been established.
upvote count: 3
type: Answer
answers question: http://stackoverflow.com/q/29266417
has comment: http://stackoverflow.com/comment/46735407
has comment: http://stackoverflow.com/comment/46735207

http://stackoverflow.com/comment/46818225
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/29312328
has text: If you want to run the PHP script without submitting the form, use AJAX. Otherwise, put the value in a hidden input in the form, and when you submit the form the form the PHP code can increment it.

http://stackoverflow.com/comment/46727623
score: 0
type: Comment
type: QuestionComment
has text: The problem is now that the entire confirm doesnt show up when I enter the AJAX code, without the AJAX code the confrim works fine
comment on: http://stackoverflow.com/q/29262306

http://stackoverflow.com/q/29281660
has body: I need to change the image on an onmouseover event but how to set a break / interval for every image - here is my code so far: &lt;script&gt; function slide() { var islide=new Array("a.jpg","b.jpg","c.jpg"); var i; for(i=0;i&lt;islide.length;i++) { document.getElementById("slider").src= islide[i]; } } &lt;/script&gt; &lt;img src="c.jpg" onmouseover="slide()" id="slider"/&gt;
has answer: http://stackoverflow.com/a/29282185
has answer: http://stackoverflow.com/a/29281795
answer count: 2
has title: Changing the image in an onmouseover event and setting a break / interval for each one
tagged with: javascript
score: 0
tagged with: slider
type: UnansweredQuestion
type: Question

http://stackoverflow.com/comment/46693384
has text: It does though - I'm utilizing multiple classes with this button. `btn` , `btn-primary`, and `options` are all separate items in my `.css` file. So it loads different pieces of css based on what's in each. Your code DOES work - it just changes the value of ALL my buttons to `All` instead of just this one button.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29243698

http://stackoverflow.com/q/29344511
accepted answer: http://stackoverflow.com/a/29346038
tagged with: ember.js
type: AnsweredQuestion
score: 1
upvote count: 1
type: Question
has body: I'm learning Ember right now and i'm beeing a bit confused because of the Docu of Ember and the getting started example. In the Documentation it says: In Ember.js, templates get their properties from controllers, which decorate a model. And Templates are always connected to controllers, not models. But after doing the getting started guide i'm not sure if this is correct. I've uploaded the finished TodoMVC app here: https://github.com/Yannic92/stackOverflowExamples/tree/master/Ember/TodoMVC In the Index.html you'll find this template: My question refers to the 3rd Line: {{#each todo in model itemController="todo"}} The Controller todo is only needed to provide the actions for the todos. The data is accessable even without this controller. In my opinion there is the model directly connected with the template isn't it? Or is there a default Controller like the docu mentioned here? For convenience, Ember.js provides controllers that proxy properties from their models so that you can say {{name}} in your template rather than {{model.name}}.
tagged with: javascript
has answer: http://stackoverflow.com/a/29346038
answer count: 1
downvote count: 0
tagged with: templates
has title: Ember Documentation understanding - Model linked to Template or not?
favorite count: 0
tagged with: model

http://stackoverflow.com/a/29298280
has body: Try to use $(document).ready(function() { $('#btnSign').click(function() { InitiatePolling(); }); }); Anyway you should use browser developer tools and add a break point inside Poll function and check Call Stack tab to see from where it is being called.
type: Answer
answers question: http://stackoverflow.com/q/29298133
downvote count: 1
has comment: http://stackoverflow.com/comment/46794110
upvote count: 0
score: -1

http://stackoverflow.com/comment/46870880
has text: CodeDom may what are you finding. https://msdn.microsoft.com/en-us/library/y2k85ax6(v=vs.110).aspx
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29341806
score: 0

http://stackoverflow.com/a/30466759
downvote count: 0
has comment: http://stackoverflow.com/comment/49056781
has body: you can create a div with d3.js and add the attribute for flex... http://codepen.io/luarmr/pen/BNQYov var chart = d3.select("#rowChart"); var bar = chart.selectAll("div") .data(data) .enter().append("div") .attr('style',function(d,i){ return ( 'flex:' + d.Quantity + '; ' + 'background:' + color(i) + ';' ) }) The attr.style could improve. You can add the prefix for webkit http://caniuse.com/#search=flex Edit http://codepen.io/luarmr/pen/yNVZMN
has comment: http://stackoverflow.com/comment/49055736
has comment: http://stackoverflow.com/comment/49065663
has comment: http://stackoverflow.com/comment/49066887
score: 4
answers question: http://stackoverflow.com/q/29360042
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29360042
type: Answer
upvote count: 4
has comment: http://stackoverflow.com/comment/49014167

http://stackoverflow.com/comment/46744265
comment on: http://stackoverflow.com/q/29271867
type: Comment
has text: I suggest if you'd like help with your assignment, that you make it clear what the expected and actual results are. Currently as written, the question expects that we infer the problem and go from there. For instance, you say `"Can you just help me with my JavaScript. I also need a running total to appear in the grey div."` - help you with what exactly, and in addition to _what_? What is your problem calculating the running total? Do you not understand what it is? Do you get the wrong result? Do you not know where to start? Imagine reading your question with 0 knowledge of the assignment. :)
score: 0
type: QuestionComment

http://stackoverflow.com/a/29317571
type: Answer
answers question: http://stackoverflow.com/q/29301237
has comment: http://stackoverflow.com/comment/75608942
has body: You can use the Ext.getStore() method to get any store
score: 0
has comment: http://stackoverflow.com/comment/46833091
has comment: http://stackoverflow.com/comment/46832892

http://stackoverflow.com/comment/46706125
score: 0
type: QuestionComment
type: Comment
has text: any errors is console , can you tell us when you try to run it (published mode) .
comment on: http://stackoverflow.com/q/29249485

http://stackoverflow.com/q/29369866
tagged with: cordova
score: 6
tagged with: windows-phone-8
type: Question
has body: I am building a Windows mobile Application through Cordova. I have a Select menu where I have some 8 options which are to be displayed, of which the last option has lengthy text. These values are Static and are coming from Sqlite Database. Now the last option (Other [e.g. Donors;Corpora)is coming out and is not getting displayed completely as show in the picture. How do I word wrap the text there ? The css I am using is .disaster { word-wrap:break-word; } .disaster option{ word-wrap:break-word; } The Html code I am Using is &lt;select name="select-disaster" id="select-disaster" class="disaster"&gt;&lt;/select&gt; Based upon the id I am getting the select options from the Sqlite database. Please tell me how to do the Word wrap for this in Windows 8 Mobile Phone ?
linked to: http://stackoverflow.com/q/4746824
has title: Windows Mobile Cordova - Word Wrap Select Menu Option
tagged with: javascript
has comment: http://stackoverflow.com/comment/47914009
has answer: http://stackoverflow.com/a/29936268
answer count: 3
has answer: http://stackoverflow.com/a/29964058
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/29370531
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
upvote count: 6

http://stackoverflow.com/q/29353843
tagged with: gulp
downvote count: 0
tagged with: google-closure
has title: Debug code removal using Google Closure Compiler
accepted answer: http://stackoverflow.com/a/29375722
type: AnsweredQuestion
score: 1
tagged with: gruntjs
has answer: http://stackoverflow.com/a/29375722
type: Question
has body: If I run the following code through advanced optimization, I can still see the debug statements in the code. var log = console.info.bind(console); (function() { /** @const */ var DEBUG = false; log('Brady', createRank({ max: 100, debug: DEBUG })); })(); function createRank(options) { if (options.debug) { log('This should be in debug mode only'); } if(typeof alert == 'function'){ alert(options); } return (Math.random() * options.max) | 0; } output after Advanced mode compilation (function() { var a = console.info.bind(console), b = { max: 100, debug: !1 }; b.debug &amp;&amp; a("This should be in debug mode only"); "function" == typeof alert &amp;&amp; alert(b); a("Brady", Math.random() * b.max | 0); })(); How can we get rid of debug message with advanced mode? if the DEBUG variable is defined as global, and logging statements are enclosed like if (DEBUG) { log('debug message'); } then it would work but is there a way to make it work if we don't not want it as a global variable, and rather pass the value around to individual modules/functions via parameters.
tagged with: google-closure-compiler
upvote count: 1
answer count: 1
tagged with: javascript
favorite count: 0

http://stackoverflow.com/comment/46811708
has text: You shouldn't need any additional plugins. I made the assumption you're using the latest version (v1.10.5) of the datatables jQuery plugin (https://www.datatables.net/download/index)
type: Comment
comment on: http://stackoverflow.com/a/29305640
score: 0
type: AnswerComment

http://stackoverflow.com/a/29320365
downvote count: 0
has body: arr2.forEach(function( obj, i ) { arr1[ i ].child = [ obj ]; });
type: Answer
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/29320323

http://stackoverflow.com/comment/46676304
score: 0
type: Comment
type: QuestionComment
has text: Also, `value` is stored in the `SELECT` element, so you do `e.value`
comment on: http://stackoverflow.com/q/29234913

http://stackoverflow.com/comment/46839544
type: AnswerComment
comment on: http://stackoverflow.com/a/29324004
type: Comment
has text: Ah, sorry: it could be: `window.addEventListener('load', addListeners, false);`
score: 0

http://stackoverflow.com/comment/46893666
type: Comment
comment on: http://stackoverflow.com/a/29354193
type: AnswerComment
has text: Glad to see you figured it out :)...There is a lot more cool stuff around there. Good luck.
score: 0

http://stackoverflow.com/comment/46876399
score: 0
type: Comment
type: QuestionComment
has text: Can you check this once: http://stackoverflow.com/a/2730590/2451726
comment on: http://stackoverflow.com/q/29344923

http://stackoverflow.com/a/29305177
upvote count: 1
has comment: http://stackoverflow.com/comment/46807890
score: 1
has body: Judging by the code you show, which does not instantiate a ColorMark nor actually call create('red'), you seem to be thinking that Mocha does more that it actually does. What you put in the first argument of describe is primarily for your benefit. These are test suite titles. Mocha passes them to the reporters and the reporters display them but that's it. Here's how you can do it: var assert = require("assert"); function ColorMark(){ this.color = ""; var that = this; this.create = function(color){ that.color = color; console.log("Created a mark with " + that.color + " color"); }; } describe('ColorMark', function(){ describe('#create("red")', function(){ it('should create red mark',function(){ var cm = new ColorMark(); cm.create("red"); assert.equal(cm.color, "red"); }); }); });
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29298730
has comment: http://stackoverflow.com/comment/46807735
has comment: http://stackoverflow.com/comment/46807805
answers question: http://stackoverflow.com/q/29298730
type: Answer

http://stackoverflow.com/comment/46814036
type: QuestionComment
has text: Thanks @DanielA.White. The link given there http://bost.ocks.org/mike/shuffle/ is pretty helpful.
comment on: http://stackoverflow.com/q/29307874
score: 0
type: Comment

http://stackoverflow.com/a/29249116
has body: You can give appropriate message on form submit event through below function. you can even stop form submitting through event.preventDefault(); if you mentioned inside function. $( "form" ).submit(function( event ) { alert( "Handler for submit() called." ); window.location.href="another html page"; });
downvote count: 0
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/29248959
type: Answer

http://stackoverflow.com/q/29231143
has comment: http://stackoverflow.com/comment/46672824
has title: If statement for line colours
type: AnsweredQuestion
has body: Please can you assist.. I am currently making a chart which will have two lines within it, a total needed line(black) and a total collected line(red or green). I would like to add an if statement to the code which will identify whether the line will be green or red. It should be green when it is above the total needed black line and red when it falls below. In my code I have made provision for what it may look like given the scenario. $(function () { $('#container').highcharts({ title: { text: 'Total Contribution' }, xAxis: { categories: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'] }, labels: { items: [{ html: 'Student VS Total contribution', style: { left: '-10px', top: '0px', color: (Highcharts.theme && Highcharts.theme.textColor) || 'black' } }] }, series: [{ type: 'column', name: 'John', tooltip: { pointFormat: '{series.name}: R{point.y:.0f}' }, data: [3000, 2000, 1000, 3000, 4000, 6000, 7000, 8000, 7000, 9000, 6000, 9000] }, { type: 'line', name: 'Total Needed', lineColor: Highcharts.getOptions().colors[1], tooltip: { pointFormat: '{series.name}: R{point.y:.0f}' }, data: [1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000, 11000, 12000], marker: { lineWidth: 2, lineColor: Highcharts.getOptions().colors[1], fillColor: 'white' } }, { type: 'line', name: 'Total Collected - Good example', lineColor: Highcharts.getOptions().colors[6], tooltip: { pointFormat: '{series.name}: R{point.y:.0f}' }, data: [3000, 5000, 7000, 7000, 9000, 10500, 11000, 12000, 12000, 13000, 14000, 14000], marker: { lineWidth: 2, lineColor: Highcharts.getOptions().colors[6], fillColor: 'white' } }, { type: 'line', name: 'Total Collected - BAD example', // The data in the columns does not match - it is an example lineColor: Highcharts.getOptions().colors[8], tooltip: { pointFormat: '{series.name}: R{point.y:.0f}' }, data: [1000, 1000, 2000, 2000, 3000, 3000, 4500, 4500, 6000, 7000, 7000, 8000], marker: { lineW…
has answer: http://stackoverflow.com/a/29234460
tagged with: if-statement
type: Question
answer count: 1
tagged with: highcharts
has comment: http://stackoverflow.com/comment/46674171
tagged with: javascript
has comment: http://stackoverflow.com/comment/46671942
accepted answer: http://stackoverflow.com/a/29234460
score: 0
tagged with: colors

http://stackoverflow.com/comment/46729024
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29263495
score: 1
has text: In my experience, I normally `echo` a response, rather than `return` it. Try doing that and if necessary, calling `die()` immediately afterwards. Does that help?

http://stackoverflow.com/a/29263706
score: 0
has comment: http://stackoverflow.com/comment/46731329
answers question: http://stackoverflow.com/q/29263521
type: Answer
has body: By default, the Bootstrap (3.0+) dropdown menu only appears/disappears on click. This behavior would need to be overruled through CSS or JS. If you want to simply have the dropdown appear on hover while preserving the click to drop down functionality on mobile, something like this should suffice: ul.nav li.dropdown:hover &gt; ul.dropdown-menu { display: block; } Demonstration: http://www.bootply.com/tpCO1Nb4E8

http://stackoverflow.com/comment/61959395
type: Comment
comment on: http://stackoverflow.com/a/29255446
has text: This code sample does not work, but it does contain some key points. See my answer for a concise and working sample.
type: AnswerComment
score: 0

http://stackoverflow.com/a/29344577
answers question: http://stackoverflow.com/q/29320318
has body: After trying a lot of things (changing datatype json,html,..., method get, post...) I debugging with the address file:///C:/xampp/htdocs/traerdatos/index.html instead of http://localhost/traerdatos/index.html So the solution is to CHANGE THE ADDRESS TO LOCALHOST (Thanks to reformed that helps me with his vision) Novel error =)
type: Answer
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29320318

http://stackoverflow.com/q/29355141
favorite count: 0
tagged with: firefox-addon
tagged with: firefox-addon-sdk
tagged with: contextmenu
has body: Using the restartless extension and Add-on SDK, is it possible to remove Context Menu items that are already built-in? My goal is to build a plugin for context menu, which observes what items are mostly used and hides the rest into a submenu or something. And thus I would need to somehow remove already existing items from the menu (ie. View Image, Save Image As...). Is it possible? I'm a starter in FF addon world, so I would appreciate any direction in this matter. Thx.
answer count: 0
type: UnansweredQuestion
upvote count: 1
score: 1
type: Question
has title: Firefox addon SDK remove built-in context items
tagged with: firefox
downvote count: 0
tagged with: javascript

http://stackoverflow.com/q/29260399
answer count: 1
has title: jquery use input box content
accepted answer: http://stackoverflow.com/a/29260496
type: AnsweredQuestion
has body: I have a calling the ion.rangeslider jquery snippet like this... $("#rangeSlider").ionRangeSlider({ grid: true, from: +moment(today).format("X"), step: 86400, }); I am trying to replace 'from:' with the value of an input box like this... $("#rangeSlider").ionRangeSlider({ grid: true, from: jQuery( '.price_from').val(), step: 86400, }); But it's not working, I am pretty sure it is just a syntax issue can anyone show me where am I going wrong?
has comment: http://stackoverflow.com/comment/46723036
type: Question
has answer: http://stackoverflow.com/a/29260496
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/46723272

http://stackoverflow.com/comment/46682474
score: 0
type: Comment
type: QuestionComment
has text: I think you need to replace code from `clients.indexOf(client)` to `clients.indexOf($index)`. $index giving current position on which you called delete function.
comment on: http://stackoverflow.com/q/29237840

http://stackoverflow.com/comment/46792523
type: Comment
has text: var page = function(){ userService.paginate() .then(function(user){ $scope.pagination_data(user); console.log("count is",count); }); }; $scope.pagination_data = function(page_data){ count = page_data.data.count; }; console.log("outside count is",count);
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29298300

http://stackoverflow.com/comment/46919222
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/29364833
has text: Yes, I am sorry that i forgot to mention that as one of my troubleshooting steps and the result of it. If i save my code as UTF-8 instead of the default encoding used in visual studio (Western Europe (Windows) Codepage 1252) i get back "Ã¶". Apparantly it has an effect on the result, but not the desired.

http://stackoverflow.com/q/29349278
favorite count: 0
possible better answer: http://stackoverflow.com/a/29349461
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29349461
accepted answer: http://stackoverflow.com/a/29349370
downvote count: 0
score: 1
type: Question
has answer: http://stackoverflow.com/a/29349370
tagged with: jquery-deferred
tagged with: javascript
tagged with: jquery
has body: I'm trying to get progress notifications (deferred.notify) to propagate to a promise created by $.when: var d1 = $.Deferred(), d2 = $.Deferred(), w = $.when(d1, d2); w.progress(function(x) { $('pre').append(String(x)+'\n'); }); d2.notify('d2'); d1.notify('d1'); d2.notify('d2-2'); d1.notify('d1-2'); The progress callback sees undefined d1 d1 d1-2 What's going on?
answer count: 2
has title: Propagating progress notifications through $.when
upvote count: 1

http://stackoverflow.com/q/29286573
answer count: 2
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/46771681
has comment: http://stackoverflow.com/comment/46770609
accepted answer: http://stackoverflow.com/a/29286705
has title: init javascript object with array property with child objects
favorite count: 0
upvote count: 1
possible better answer: http://stackoverflow.com/a/29286618
has body: Is there a way to initialize a javascript object with an array of child objects in one line? How can I do the following in just on initialization line. var obj = {doc: 100, defaultrateid: 32, rates: [], }; obj.rates[31] = {rate: 101.00, name: "Rate 1"}; obj.rates[32] = {rate: 121.00, name: "Rate 2"}; Basically what I want is a single javascript object that has my user parameters. This object will be reused on multiple web forms. In the case of 'rates', the forms will have a dropdown to select a rate. The web forms have client side calculations that require the matching rate object based on the rate's unique id (e.g. 32). I'm trying to use a associative array instead of having to do looping for finding a match based on unique value.
has answer: http://stackoverflow.com/a/29286618
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/29286705
type: Question

http://stackoverflow.com/a/29371031
has comment: http://stackoverflow.com/comment/46926233
answers question: http://stackoverflow.com/q/29366872
type: Answer
has comment: http://stackoverflow.com/comment/46930506
score: 2
downvote count: 0
has body: .toFixed(2) returns a string, and as such your sortBy function is sorting a string. Therefore it is correct that "99" is ordered before "4000.46". Switching your sortBy function to return +d.Value; (the + forces a conversion back to a number) should fix your problem. A fixed version of the JSFiddle: https://jsfiddle.net/j9adz6bs/
upvote count: 2
accepted answer of: http://stackoverflow.com/q/29366872
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46930394

http://stackoverflow.com/comment/46700382
has text: I reopened the question. You probably want to add css as tag as well. It can be done with WebGL and canvas, it can be done using slices with 2D canvas, but the more efficient way is probably to do this using CSS 3D rotation/transform, though you loose the ability to save it as image.
comment on: http://stackoverflow.com/q/29247392
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29225628
upvote count: 1
has body: Try something like this: var d = new Date(); d.setFullYear(d.getFullYear() + 20); $("#DOB").datepicker({ format: 'yyyy-mm-dd', startDate: '-1000y', endDate:d, autoclose: true, todayHighlight: true });
answers question: http://stackoverflow.com/q/29225594
downvote count: 0
type: Answer
score: 1

http://stackoverflow.com/comment/46678077
has text: Thanks, but that also doesn't do anything. Maybe it is not possible!? The code of the logout button on the site is (Logout)
type: Comment
comment on: http://stackoverflow.com/a/29234197
score: 0
type: AnswerComment

http://stackoverflow.com/comment/46713684
comment on: http://stackoverflow.com/q/29254821
score: 0
type: Comment
type: QuestionComment
has text: Looks like you're using older version of angular. Try with 1.2 version plus

http://stackoverflow.com/a/29315041
answers question: http://stackoverflow.com/q/29283994
has body: How is the relationship between a component controller class and the component is formed. Is it simply based on the positioning that whatever class comes after a given component, it becomes the component controller class for the component defined before it. Yes. How does it works if you have multiple components in a single js file Have the structure: @Component ... class Foo ... @Component ... class Bar ... Is there such a thing as child components and in that case do these child components inherit something from parent components and more specifically from the component controller class of parent component. Components don't inherit. Components compose. Search inheritance vs. composition (but I sure you know this). Also see : https://github.com/Microsoft/TypeScript/issues/2249
type: Answer
score: 3
downvote count: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29283994
upvote count: 3

http://stackoverflow.com/comment/46789846
has text: It specifies the timezone name. Just run `new Date()` and see yourself
comment on: http://stackoverflow.com/q/29297257
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/comment/46903037
score: 0
type: AnswerComment
type: Comment
has text: @user3501278 You may be unfamiliar with what scope is. Your `appl` variable is only available within the document.ready function because you declared it there. So the scope of appl within the document.ready function. Novice programmers would put everything on glocal scope `window.appl = ...` but it would be best to not put anylthing on glocal scope (except the root namespace of your application). http://en.wikipedia.org/wiki/Scope_%28computer_science%29
comment on: http://stackoverflow.com/a/29359049

http://stackoverflow.com/q/29362819
type: Question
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46909570
score: 0
has answer: http://stackoverflow.com/a/29363045
answer count: 1
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46909314
has body: Hi I am new to angular and html programming. I am trying to initialize my angular app with the command in my html document. &lt;script type="text/javascript"&gt; angular.element(document).ready(function () { angular.bootstrap(document, ['MyApp']); }); &lt;/script&gt; This works locally when I dont have to download scripts from a separate server but when I do it breaks and I get the error. Uncaught Error: [$injector:modulerr] http://errors.angularjs.org/1.3.14/$injector/modulerr?p0=MyApp&amp;p1…gleapis.com%2Fajax%2Flibs%2Fangularjs%2F1.3.14%2Fangular.min.js%3A17%3A381) I am assuming this is because the scripts have not loaded before executing this call. So I am wondering if there is any command that I can use to run my bootstrap code in when all of the scripts have been loaded. Window.onload or $(document).ready does not work for me :( Here is my module declaration angular.module("myApp", ["ui.router"]) .config(["$locationProvider", ($locationProvider: any) =&gt; { $locationProvider.html5Mode(false).hashPrefix('!'); }]) .config(["$stateProvider", "$urlRouterProvider", ($stateProvider: any, $routeProvider:any ) =&gt; { $stateProvider .state("myapp", { url: '/:path', templateUrl: (stateParams) =&gt; { return '/Templates?path=' + stateParams.path; }, }) }]) .run(["$rootScope", "$state", ($rootScope, $state) =&gt; { $rootScope.$on("$stateChangeStart", (event, next, current) =&gt; { }) $rootScope.$on("$stateChangeSuccess", function (ev, to, toParams, from, fromParams) { }); $state.go("myapp", { path: 'MyApp.Session' }); }]); Any help would be appreciated. Thanks
has title: how to initialize angular when all scripts are done loading

http://stackoverflow.com/q/29373271
accepted answer: http://stackoverflow.com/a/29373581
type: Question
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0
has answer: http://stackoverflow.com/a/29373581
tagged with: http://stackoverflow.com/tag/html
tagged with: fullpage.js
has title: fullPage.js, scrollDelay not working
has body: ScrollDelay will not work using the following code placed correctly. What am I doing wrong? http://oskarvertetics.kaggteknik.se/portfolio/test2/ var scrollDelay = 500; Also, can not seem to figure out what is wrong with the navigation on the right side and in the slides.
tagged with: css
type: AnsweredQuestion

http://stackoverflow.com/a/29335449
upvote count: 26
accepted answer of: http://stackoverflow.com/q/29335411
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/29335411
type: Answer
has comment: http://stackoverflow.com/comment/78422768
has body: A look at Mozilla's documentation is helpful: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/reject Promise.reject("Testing static reject").then(function(reason) { // not called }, function(reason) { console.log(reason); // "Testing static reject" }); Promise.reject(new Error("fail")).then(function(error) { // not called }, function(error) { console.log(error); // Stacktrace }); It shows both strings and errors as valid "reasons" for a rejection. The main thing (I think) is that the "reason" should be meaningful. If a stack trace is helpful then it may be better to provide an error. If a simple string is all that's needed, then it will suffice.
score: 26

http://stackoverflow.com/q/29336924
tagged with: javascript
tagged with: gruntjs
score: 0
has body: I'm trying grunt uglify to minify a JavaScript file with a document, like below: JS: var _html = (function(){/*&lt;div id="test_id"&gt;...&lt;/div&gt;*/}).toString().match(/[^]*\/\*([^]*)\*\/;?\}$/)[1]; html = _html.... In order to maintain and change this easily, I'd like to remain here document. However, after I use grunt uglify, this document has been removed, and create DOM objects. How do I do this?
has answer: http://stackoverflow.com/a/29339031
has title: How to create minify JS with this document
answer count: 1
type: UnansweredQuestion
tagged with: minify
type: Question

http://stackoverflow.com/a/29249202
has body: Try utilizing jQuery UI .effect() $(function() { var div = $("div"); // `elem`: element to apply bounce effect, // `n`: number of bounce effects to apply to `elem` var bounce = function bounce(elem, n) { var fx = function fx(el) { return (el || $(this)) .effect({ effect: "bounce", easing: "swing", duration: 400, distance: window.innerHeight - (el.height() + el.offset().top * 1.5), direction: "down", times: 1 }).promise() }; return fx(elem).then.apply(elem, $.map(Array(n - 1), function() { return fx(elem) })); }; bounce(div, 1).then(function(el) { // do stuff when bounce effect complete console.log("complete", el) }); }); div { position: relative; width: 100px; height: 100px; background: rgb(212, 98, 44); border: 2px solid navy; border-radius: 50%; } &lt;link href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css" rel="stylesheet" /&gt; &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"&gt; &lt;/script&gt; &lt;script src="https://code.jquery.com/ui/1.11.4/jquery-ui.js"&gt;&lt;/script&gt; &lt;div&gt;&lt;/div&gt;
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29240985

http://stackoverflow.com/comment/46730697
type: Comment
has text: I edit my response, hopefully it is more helpful now. Essentially I added a $watch on the condition and rechecked the validity when the condition changes
type: AnswerComment
comment on: http://stackoverflow.com/a/29261095
score: 0

http://stackoverflow.com/q/29258672
has comment: http://stackoverflow.com/comment/46719761
has comment: http://stackoverflow.com/comment/46719647
has comment: http://stackoverflow.com/comment/46721740
score: 1
has answer: http://stackoverflow.com/a/29258834
has comment: http://stackoverflow.com/comment/46720060
type: Question
has answer: http://stackoverflow.com/a/29258856
tagged with: javascript
answer count: 3
upvote count: 1
linked to: http://stackoverflow.com/q/3384504
has title: What is the difference between two function signatures?
favorite count: 0
downvote count: 0
has body: I would like to ask that what the main difference between (function(){ .... .... })(); and function() { .... .... }();
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29258744

http://stackoverflow.com/q/29273334
tagged with: jasmine
has answer: http://stackoverflow.com/a/29275396
has title: How to unit test angular controller having multiple $resource calls
tagged with: angularjs
type: Question
has body: I have a controller that does multiple $resource calls to the backend when initialized. This works fine, but now I need to add unit tests with jasmine, and here comes the issue, I get an error when I try to save the state of an object inside the controller. At controller initialization I make 3 $resource calls to populate 3 dropdowns, after making the selections on the 3 dropdowns and input a value in another input text, I press submit(save) and my entity is saved. I do not have much experience with angular so I really need help, if other resources are required just ask and I will add them to this post. Thanks! Now I need to unit test this save function and I get an error: Chrome 41.0.2272 (Windows 7) permissionController should call the service successfully FAILED Error: Unexpected request: POST http://localhost:8080/webapp-1.0.0-SNAPSHOT/v1/actions/search No more request expected at $httpBackend (C:/_workspace/webapp/Platform/ui/src/main/uidev/node_modules/angular-mocks/angular-mocks.js:1220:9) at sendReq (C:/_workspace/webapp/Platform/ui/src/main/uidev/app/lib/js/angular.js:9628:9) at serverRequest (C:/_workspace/webapp/Platform/ui/src/main/uidev/app/lib/js/angular.js:9344:16) at processQueue (C:/_workspace/webapp/Platform/ui/src/main/uidev/app/lib/js/angular.js:13189:27) at C:/_workspace/webapp/Platform/ui/src/main/uidev/app/lib/js/angular.js:13205:27 at Scope.$eval (C:/_workspace/webapp/Platform/ui/src/main/uidev/app/lib/js/angular.js:14401:28) at Scope.$digest (C:/_workspace/webapp/Platform/ui/src/main/uidev/app/lib/js/angular.js:14217:31) at Function.$httpBackend.flush (C:/_workspace/webapp/Platform/ui/src/main/uidev/node_modules/angular-mocks/angular-mocks.js:1519:38) at Object.&lt;anonymous&gt; (C:/_workspace/webapp/Platform/ui/src/main/uidev/test/unit/authz/permission/create-permission-controller-test.js:28:21) This is the controller: angular.module('platform.authz').controller('permissionController', function($translatePartialLoader, PermissionService, Ac…
has answer: http://stackoverflow.com/a/29273655
possible better answer: http://stackoverflow.com/a/29275396
score: 0
answer count: 2
accepted answer: http://stackoverflow.com/a/29273655
tagged with: javascript
type: AnsweredQuestion

http://stackoverflow.com/q/29330572
has answer: http://stackoverflow.com/a/29330959
has title: How to change "size" of select when click on select?
upvote count: 3
score: 1
downvote count: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29330839
has answer: http://stackoverflow.com/a/29330642
type: Question
accepted answer: http://stackoverflow.com/a/29330959
possible better answer: http://stackoverflow.com/a/29331104
has answer: http://stackoverflow.com/a/29331104
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29330879
has comment: http://stackoverflow.com/comment/46855191
favorite count: 0
answer count: 5
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46850528
tagged with: css
has body: sorry for my bad english, i have a problem with select : Select the Reg Reg 1 Reg 2 Reg 3 Reg 4 Reg 5 Reg 6 Reg 7 Reg 8 Reg 9 Reg 10 I would like that when i click on select, the size of select changes in size="5", because when the document load the size is size="1" (and this is good) but if i click on select, it shows all ten options, and this is the problem... While, if i click on select, the size changes, is most beautiful. EDIT In future the form could have more 250 options, so is important that when the document load size is 1, and when i click the size is 5 .... the size must be "5" only when the select show options, and when an option is selected the size must be 1. The problem is that i don't know how made it, maybe with jquery? or only with css? Can you help me? Thanks!

http://stackoverflow.com/a/29236105
type: Answer
has body: Take a look at this Working Demo HTML &lt;div ng-app='myApp' ng-controller="myController"&gt; &lt;div ng-repeat="i in items"&gt; Number One:&lt;input type="text" ng-init="num1=0" ng-model="num1" /&gt; &lt;br&gt; Number Two:&lt;input type="text" ng-init="num2=0" ng-model="num2" /&gt; Total:&lt;input type="text" ng-model="inputs[i-1]" ng-value="inputs[i-1] =(num1*num2);" /&gt; &lt;br&gt; &lt;br&gt; &lt;/div&gt; &lt;input type="text" ng-value="getGrandTotal()" /&gt; &lt;/div&gt; SCRIPT var app = angular.module('myApp', []); app.controller('myController', function ($scope, $rootScope) { $scope.items = [1, 2, 3, 4]; $scope.inputs = []; $scope.getGrandTotal = function () { $scope.grantTotal = 0; for (var i = 0; i &lt; $scope.inputs.length; i++) { $scope.grantTotal = $scope.grantTotal + $scope.inputs[i]; } return $scope.grantTotal; }; }); Description $scope.inputs array will stores all the dynamic total values Since $scope.items = [1, 2, 3, 4]; and the ng-repeat="i in items" and I have put ng-model="inputs[i-1]" in such a way so that the four text field model will be like as shown below when i = 1, input[1 - 1] => input[0] => which will be the 1st total text field modal where it will store the first total when i = 2, input[1 - 2] => input[1] => which will be the 2nd total text field modal where it will store the second total when i = 3, input[1 - 3] => input[2] => which will be the 3rd total text field modal where it will store the third total when i = 4, input[1 - 4] => input[3] => which will be the 4th total text field modal where it will store the fourth total $scope.getGrandTotal function will iterate through $scope.inputs array and return the grand total sum. ng-value is an angular expression, whose value will be bound to the value attribute of the input element. ng-value is useful for binding dynamically generating values of text-field using ngRepeat
has comment: http://stackoverflow.com/comment/46701797
downvote count: 0
has comment: http://stackoverflow.com/comment/46678870
score: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29234544
has comment: http://stackoverflow.com/comment/46702013
answers question: http://stackoverflow.com/q/29234544
upvote count: 1

http://stackoverflow.com/comment/46788963
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/29280798
type: Comment
has text: Interesting - maybe your charts isn't initialized, like answer below? Or you don't have any data on the chart? Anyway, see [API](http://api.highcharts.com/highcharts#Axis.getExtremes) - demo works fine.

http://stackoverflow.com/comment/46684318
has text: @Bergi Yes that solved the problem, now I've something wrong in the signature. Thanks.
comment on: http://stackoverflow.com/q/29238841
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/46759404
type: Comment
has text: Okay ... on the asp:TextBox input I had to remove ReadOnly="true" and disabled="disabled" to get the data to be stored. Now if only I can find a way to disable the input from the user without using those controls. Thanks for your help.
comment on: http://stackoverflow.com/a/29241336
score: 0
type: AnswerComment

http://stackoverflow.com/q/29277052
has answer: http://stackoverflow.com/a/29277708
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46753052
has comment: http://stackoverflow.com/comment/46752623
has body: I have the problem that I want different callback routes for the same AJAX request because sometime it's necessary to use the same function (i.e. getting information about product ID or something similar). What works is something like this: function1() { $.ajax({ url: "test.html", context: document.body }).done(function() { route1function(); }); } function2() { $.ajax({ url: "test.html", // do the same crap here... context: document.body }).done(function() { route2function(); }); } function3() { $.ajax({ url: "test.html", // and here again *yawn* context: document.body }).done(function() { route3function(); }); } Copy &amp; Paste coding is evil, so my idea was to do something like: doMyAmazingStuff(iRoute) { $.ajax({ url: "test.html", context: document.body }).done(function() { switch(iRoute) { case 1: route1function(data); break; case 2: route2function(data); break; // and so on... } }); } Unfortunately, iRoute will NOT be passed to the .done function and is undefined. Any alternatives how to survive such variables? Copy / paste / paste / paste ... like in the first example is no option (and bad style as well). And making them global scoped (setting a shadow variable without declaring it with var) isn't a that good solution, I think.
score: 1
type: Question
has comment: http://stackoverflow.com/comment/46753538
upvote count: 1
has title: AJAX request with forked callback
downvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: ajax

http://stackoverflow.com/comment/46705661
comment on: http://stackoverflow.com/q/29249991
has text: @FloWin I fiddled with your fiddle. http://jsfiddle.net/rk57whzk/1/ should be the updated version that workes on my local apache. Could be a problem jsfiddle.net's side
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/comment/134602694
type: Comment
type: QuestionComment
score: 0
has text: A simple way: https://stackoverflow.com/a/76331479/15155291
comment on: http://stackoverflow.com/q/29260296

http://stackoverflow.com/comment/46887007
type: Comment
comment on: http://stackoverflow.com/a/29350728
has text: is that putting the values onto an existing object or creating a new object?
type: AnswerComment
score: 0

http://stackoverflow.com/a/29376998
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/29354268
type: Answer
has body: OK, this one is just stupid. After hours of digging through the JavaScript and monitoring the network traffic trying to figure out why the callback functions weren't executing... The click event that called my webservice was being generated by a submit button. Argh!
downvote count: 0

http://stackoverflow.com/comment/46648287
comment on: http://stackoverflow.com/q/29219582
has text: I would include them on the page and if needed run replace with the fadeout effect
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/46658248
score: 0
type: AnswerComment
has text: I see: Uncaught SyntaxError: Unexpected end of input
type: Comment
comment on: http://stackoverflow.com/a/29224511

http://stackoverflow.com/comment/46867558
score: 1
has text: You might want something like `myDropdown.find('option:first-child').attr('selected', 'selected')`
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29340096

http://stackoverflow.com/comment/46682655
score: 0
type: Comment
comment on: http://stackoverflow.com/q/29237972
has text: Removed all the comments. Don't know why I do it...just do, apologies.
type: QuestionComment

http://stackoverflow.com/comment/46937243
comment on: http://stackoverflow.com/a/29251025
has text: @tbh__ - Thx. Though I knew the general answer as to how this works from general experience in JS, I thought it a particularly interesting problem to actually find in the ECMAScript specification where the spec says it should do what it does. And, once you've learned how read that spec to look up one thing like this and sort through the grammar, it makes it easier to look up others.
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/q/29227429
has comment: http://stackoverflow.com/comment/46666842
has comment: http://stackoverflow.com/comment/46666135
answer count: 1
tagged with: javascript
score: 4
favorite count: 0
has comment: http://stackoverflow.com/comment/46666275
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46666264
has comment: http://stackoverflow.com/comment/46666383
type: UnansweredQuestion
has title: html embed tag video events
has body: I am using html embed tag to run my video.But I am facing problem to get its event, I want to call a function when a play or pause event is triggered. Also I want video is play when I clicked on play button. I need your help: My code is below - Play Elapsed Time:
downvote count: 1
tagged with: embed
type: Question
has answer: http://stackoverflow.com/a/29230520
tagged with: video
upvote count: 5
has comment: http://stackoverflow.com/comment/46666947

wordpress
tags question: http://stackoverflow.com/q/29288240
tags question: http://stackoverflow.com/q/29261253
tags question: http://stackoverflow.com/q/29244071
tags question: http://stackoverflow.com/q/29275316
tags question: http://stackoverflow.com/q/29348085
tags question: http://stackoverflow.com/q/29292332
tags question: http://stackoverflow.com/q/29328344
tags question: http://stackoverflow.com/q/29293979
tags question: http://stackoverflow.com/q/29311724
tags question: http://stackoverflow.com/q/29320958
tags question: http://stackoverflow.com/q/29343276
tags question: http://stackoverflow.com/q/29339214
tags question: http://stackoverflow.com/q/29219964
tags question: http://stackoverflow.com/q/29289925
tags question: http://stackoverflow.com/q/29349536
tags question: http://stackoverflow.com/q/29309230
tags question: http://stackoverflow.com/q/29238438
tags question: http://stackoverflow.com/q/29252982
tags question: http://stackoverflow.com/q/29347306
tag name: wordpress
tags question: http://stackoverflow.com/q/29361473
tags question: http://stackoverflow.com/q/29236739
tags question: http://stackoverflow.com/q/29348087
tags question: http://stackoverflow.com/q/29295808
tags question: http://stackoverflow.com/q/29287049
tags question: http://stackoverflow.com/q/29246759
tags question: http://stackoverflow.com/q/29280915
tags question: http://stackoverflow.com/q/29251469
tags question: http://stackoverflow.com/q/29314591
tags question: http://stackoverflow.com/q/29237435
tags question: http://stackoverflow.com/q/29366646
tags question: http://stackoverflow.com/q/29330274
tags question: http://stackoverflow.com/q/29328488
type: Tag
tags question: http://stackoverflow.com/q/29276841
tags question: http://stackoverflow.com/q/29260553

http://stackoverflow.com/comment/55866019
type: Comment
comment on: http://stackoverflow.com/a/29329183
score: 0
type: AnswerComment
has text: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIWebProgress.addProgressListener]"

http://stackoverflow.com/a/29257051
has body: Just noticed you updated that you do indeed want a sum, here is a fiddle with the total calculated on blur and when you remove a row, bind additional events as required (some tidy up is required, but this should get you started): http://jsfiddle.net/1ggaco1d/4/ The below code does the totaling: function total() { var total = 0; $(".number").each(function (idx, el) { var value = $(el).val(); if (value !== "") { total = total + parseFloat($(el).val()); } }); $("#added").text(total); }
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29256518
answers question: http://stackoverflow.com/q/29256518
type: Answer
upvote count: 1
score: 1

http://stackoverflow.com/q/29230233
accepted answer: http://stackoverflow.com/a/29230405
possible better answer: http://stackoverflow.com/a/29230308
tagged with: asp.net
has answer: http://stackoverflow.com/a/29230405
tagged with: webclient
tagged with: exe
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/18980957
has body: I face an issue for a client who need to launch an application from a ASP.Net website client side. For the moment the solution is using ActiveX, but we all want to find an other way to do this action. I read this links to find informations : Is it possible to run an .exe or .bat file on 'onclick' in HTML https://msdn.microsoft.com/en-us/library/aa767914%28v=vs.85%29.aspx I know that for security issues, browsers don't allow the launch of client applications, but did someone find a hack to do something like that and have a sample to post ? Have a good day
has answer: http://stackoverflow.com/a/29230308
type: Question
tagged with: javascript
score: 0
tagged with: batch-file
answer count: 2
has title: Lauching .bat or .exe client-side

http://stackoverflow.com/a/29370355
has body: You could use SVG pattern fill and mask to achieve this: http://jsfiddle.net/henbox/wt45qfkz/2/ The pattern is borrowed from this answer to a previous question. Mask and pattern are applied to each individual pie slice using: var arcs = vis.selectAll("g.slice") .data(pie).enter() .append("svg:g") .attr("class", "slice") .attr("style", "fill:url(#stripe);") .attr("style", "mask:url(#mask);"); However you may run in to trouble here when you add the label: If you put it into the same g element, the stripes will also be applied to the text
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29369159
downvote count: 0
answers question: http://stackoverflow.com/q/29369159
type: Answer
score: 3
upvote count: 3

http://stackoverflow.com/comment/56824687
type: Comment
comment on: http://stackoverflow.com/a/29312153
has text: @AtifGulzar No, you can parse the format in JavaScript if you want. You just need to get that data to your JavaScript somehow, and that's not going to work because of cross-origin restrictions. To get around that, a simple proxy on your origin will work.
score: 0
type: AnswerComment

http://stackoverflow.com/a/29298602
upvote count: 1
type: AcceptedAnswer
has body: Try to autoincrement with the += operator: $('.horizontal-scroll').on('click', '.horizontal-scroll-indicator', function() { $(this) .prev('.actionbar-inner') .animate({scrollLeft: '+=100'}); });
type: Answer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/29298575
accepted answer of: http://stackoverflow.com/q/29298575

http://stackoverflow.com/comment/46782769
type: Comment
has text: Wow! AppCache. I think it may be a bit much for what I'm after...especially as I see IE9 doesn't look to be supported and Firefox seems to require user consent. I really like the idea of the 'ghetto' solution though - checking an API endpoint at a set interval and calling window.location.reload( ) if necessary. Actually seems nice and simple to me...though I'm sure someone will tell me that I can do the same thing just as easily with socket.io....
type: AnswerComment
comment on: http://stackoverflow.com/a/29292546
score: 0

http://stackoverflow.com/comment/46871262
type: AnswerComment
has text: isn't process depreciated and only works in sync places?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29340453

http://stackoverflow.com/comment/46797764
type: QuestionComment
comment on: http://stackoverflow.com/q/29287835
score: 0
type: Comment
has text: There were no quotes in the string, I just joined the strings badly, see my answer. Thanks for help!

http://stackoverflow.com/q/29243454
favorite count: 0
has comment: http://stackoverflow.com/comment/46692900
tagged with: node.js
type: AnsweredQuestion
has body: var map = { mapSize: 100, // the size of a side data: new Array(this.mapSize * this.mapSize), getIndex: function(x, y) { return x * this.mapSize + y; }, getCoords: function(index) { var x = Math.floor(index/this.mapSize); return { x: x, y: index - (x * this.mapSize) } } }; This code gives me RangeError: Invalid array length. However when there is no calculation, like this: data: new Array(this.mapSize), it works. Could you explain me why is that happening?
accepted answer: http://stackoverflow.com/a/29243506
has title: Invalid array length when trying to create an array from calculation
score: 1
upvote count: 1
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/46692877
has comment: http://stackoverflow.com/comment/46693025
has answer: http://stackoverflow.com/a/29243506
tagged with: arrays
answer count: 1
downvote count: 0

http://stackoverflow.com/q/29296733
has comment: http://stackoverflow.com/comment/46789863
answer count: 1
favorite count: 0
type: AnsweredQuestion
score: 3
downvote count: 0
has body: I have a very simple piece of code that refreshes window after resize. $(window).resize(function() { location.reload(); }); When I try to open Print Preview Mode (Ctrl + P) in Chrome, it refreshes it as well. Any ideas how to avoid that behavior?
tagged with: google-chrome
type: Question
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29297406
accepted answer: http://stackoverflow.com/a/29297406
tagged with: browser
upvote count: 3
has title: $(window).resize() and Print Preview Mode
has comment: http://stackoverflow.com/comment/46789087

express
tags question: http://stackoverflow.com/q/29290567
tags question: http://stackoverflow.com/q/29283392
tags question: http://stackoverflow.com/q/29343131
tags question: http://stackoverflow.com/q/29249641
tags question: http://stackoverflow.com/q/29229289
tags question: http://stackoverflow.com/q/29345234
tags question: http://stackoverflow.com/q/29308600
tags question: http://stackoverflow.com/q/29334865
tags question: http://stackoverflow.com/q/29320363
tags question: http://stackoverflow.com/q/29341510
tags question: http://stackoverflow.com/q/29306139
tags question: http://stackoverflow.com/q/29229790
tags question: http://stackoverflow.com/q/29225335
tags question: http://stackoverflow.com/q/29340266
tags question: http://stackoverflow.com/q/29233339
tags question: http://stackoverflow.com/q/29371959
tags question: http://stackoverflow.com/q/29226286
tags question: http://stackoverflow.com/q/29369877
tags question: http://stackoverflow.com/q/29295428
tags question: http://stackoverflow.com/q/29357305
tags question: http://stackoverflow.com/q/29266510
tags question: http://stackoverflow.com/q/29236759
tags question: http://stackoverflow.com/q/29301568
tags question: http://stackoverflow.com/q/29269905
tags question: http://stackoverflow.com/q/29246309
tags question: http://stackoverflow.com/q/29275488
tag name: express
tags question: http://stackoverflow.com/q/29247550
tags question: http://stackoverflow.com/q/29222264
type: Tag
tags question: http://stackoverflow.com/q/29306705
tags question: http://stackoverflow.com/q/29239817
tags question: http://stackoverflow.com/q/29261733
tags question: http://stackoverflow.com/q/29243508
tags question: http://stackoverflow.com/q/29328028
tags question: http://stackoverflow.com/q/29310972
tags question: http://stackoverflow.com/q/29256780
tags question: http://stackoverflow.com/q/29342343
tags question: http://stackoverflow.com/q/29292285
tags question: http://stackoverflow.com/q/29276996

http://stackoverflow.com/comment/47088079
type: Comment
comment on: http://stackoverflow.com/a/29335809
has text: Thank you for the answer!! it seemed work but when I clicked one button, it shows all values of buttons in the box. it's checkbox not radio button sorry
score: 0
type: AnswerComment

http://stackoverflow.com/q/29357279
has answer: http://stackoverflow.com/a/29357445
tagged with: javascript
answer count: 3
downvote count: 0
tagged with: jquery
favorite count: 0
has title: Why does `foo()` work here?
has comment: http://stackoverflow.com/comment/46899316
has answer: http://stackoverflow.com/a/29357300
type: UnansweredQuestion
score: 1
upvote count: 1
has answer: http://stackoverflow.com/a/29357301
has comment: http://stackoverflow.com/comment/46899285
type: Question
has comment: http://stackoverflow.com/comment/46899232
has body: Here's a fiddle: https://jsfiddle.net/5k10h27j/ Why does foo() get called when set as an argument to an undefined function? function foo(){ alert('huh??'); } jQuery('#container').on('change', 'input', function(e){ console.log('change'); }).blahblah(foo());

http://stackoverflow.com/a/29357465
type: Answer
downvote count: 0
score: 6
has body: Seems I cant call the function within the argument of t.throws because it throws the error, duh. I believe this is the correct usage. t.throws(function(){ myFunction({}) })
has comment: http://stackoverflow.com/comment/54173448
upvote count: 6
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29357245
answers question: http://stackoverflow.com/q/29357245

http://stackoverflow.com/a/29297177
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29297117
type: Answer
has comment: http://stackoverflow.com/comment/46791412
answers question: http://stackoverflow.com/q/29297117
has body: resize events fire on the window object, not the body element. You're listening for it in the wrong place. window.addEventListener("resize",function(e){console.log("here", e.target)};
upvote count: 5
has comment: http://stackoverflow.com/comment/46791552
downvote count: 0
score: 5

http://stackoverflow.com/a/29283643
answers question: http://stackoverflow.com/q/29281650
has body: Try $.when.apply($, $.map(Array(1001), function(_, key) { return $.get("http://www.example.com/index.aspx?id=" + (key + 1) , function(res, textStatus, jqxhr) { var h = $(jqxhr.responseText).find("h1").text(); alert(h); }) }) );
score: 0
has comment: http://stackoverflow.com/comment/46766605
type: Answer

http://stackoverflow.com/comment/46934691
type: Comment
score: 0
comment on: http://stackoverflow.com/a/29353822
has text: Why do you need to check? Let `assign()` or `defaults()` merge it for you.
type: AnswerComment

tdd
tags question: http://stackoverflow.com/q/29298730
type: Tag
tag name: tdd

http://stackoverflow.com/comment/46715624
comment on: http://stackoverflow.com/q/29256335
type: Comment
has text: it seems the url of javascript file is wrong , check it
score: 0
type: QuestionComment

http://stackoverflow.com/comment/46888655
has text: Why do you think this would create an infinite lookup cycle?
comment on: http://stackoverflow.com/q/29351698
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46821237
has text: @NarendraSoni I have updated the question, your question has got me to do some more testing at my end and I have found another issue as well if a string starts with an int eg 7up. do you have any ideas?
comment on: http://stackoverflow.com/q/29312465
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/46885954
has text: I tried doing that, but this changes the prices to 10.00.. Here's the the whole JS code : http://pastebin.com/62PJFf8M
score: 0
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/29349903

http://stackoverflow.com/a/29275110
has comment: http://stackoverflow.com/comment/46755638
answers question: http://stackoverflow.com/q/29272384
has comment: http://stackoverflow.com/comment/46782355
has comment: http://stackoverflow.com/comment/46757577
has comment: http://stackoverflow.com/comment/46756064
score: 0
has comment: http://stackoverflow.com/comment/46754018
has comment: http://stackoverflow.com/comment/46750867
has comment: http://stackoverflow.com/comment/46782347
type: Answer
has comment: http://stackoverflow.com/comment/46755571
has body: Use the following code to scroll left. $('#next').click(function() { $('html, body').animate({ scrollLeft: 500 }, 800); }); Where 500 is the margin and 800 is speed. Edit: And if you want to move container to the left. Use the following code. $('#next').click(function() { $("#container").animate({ 'marginLeft': '-=450px' }, 500); });
upvote count: 1
downvote count: 1

http://stackoverflow.com/comment/46764392
comment on: http://stackoverflow.com/q/29282869
type: Comment
type: QuestionComment
has text: @JonathanLonowski indeed
score: 0

http://stackoverflow.com/a/29258158
type: Answer
answers question: http://stackoverflow.com/q/29258054
has comment: http://stackoverflow.com/comment/46718894
has body: $(document).ready(function(){ $("#date").click(function(){ start = $("#date_start").val(); end = $("#date_end").val(); $.ajax({ type: 'post', url: '/your_page_link/', data: {start : start, end : end}, success: function (res) { } }); }); }); In PHP: &lt;?php if(!empty($_POST)){ // If you are using same page, then it'll help you to detect ajax request. $start_date = $_POST['start']; $end_date = $_POST['end']; } ?&gt;
score: 0
has comment: http://stackoverflow.com/comment/46718860

http://stackoverflow.com/a/66640921
score: 11
downvote count: 0
answers question: http://stackoverflow.com/q/29363455
type: Answer
upvote count: 11
has body: In my case, since I was using chai-as-promised in an async function, all I had to do is add an await statement before expect(promise).to.be.rejectedWith(errorMessage), e.g: it('should reject', async () =&gt; { await expect(promise).to.be.rejectedWith(errorMessage); // ^^^^^ });

http://stackoverflow.com/q/29308441
favorite count: 0
score: 38
duplicate of: http://stackoverflow.com/q/30074107
upvote count: 38
has answer: http://stackoverflow.com/a/69506658
has answer: http://stackoverflow.com/a/63093786
tagged with: php
has answer: http://stackoverflow.com/a/66692957
has title: Using JavaScript to display Laravel's Variable
has comment: http://stackoverflow.com/comment/127760121
tagged with: laravel-5
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29308486
has answer: http://stackoverflow.com/a/63645220
linked to: http://stackoverflow.com/q/75150981
has comment: http://stackoverflow.com/comment/127696083
has answer: http://stackoverflow.com/a/58179530
tagged with: laravel-blade
has answer: http://stackoverflow.com/a/68103720
possible better answer: http://stackoverflow.com/a/38878240
tagged with: laravel
type: Question
has answer: http://stackoverflow.com/a/38878240
has answer: http://stackoverflow.com/a/36046175
tagged with: javascript
answer count: 11
has answer: http://stackoverflow.com/a/57640148
has answer: http://stackoverflow.com/a/29308486
has body: In my code I am using typeahead.js. I use Laravel 5 and I need to replace the var states with my {{ $jobs }} variable. I need to list all Job Titles as an array. In my controller I have $jobs = Job::all(['job_title']); I know the loop method in javascript but I dont know how to "link" my blade's variable in the javascript. Anyone knows how to? I have tried, in my.js var jobs = {{ $jobs }} But that wont work.
downvote count: 0
linked to: http://stackoverflow.com/q/30074107
has answer: http://stackoverflow.com/a/56316691

http://stackoverflow.com/comment/46821603
has text: Yep, have you had a look to the link provided? :)
comment on: http://stackoverflow.com/a/29314409
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/46764638
type: Comment
comment on: http://stackoverflow.com/q/29282626
type: QuestionComment
has text: @KJPrice quite sure. yes.
score: 0

http://stackoverflow.com/q/29264241
linked to: http://stackoverflow.com/q/19913667
score: 0
has answer: http://stackoverflow.com/a/29264307
answer count: 1
tagged with: regex
has title: Regular expression to determine URL video ID
tagged with: match
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29264307
type: Question
has body: I would like to use a regular expression to determine the video ID of NHL.com videos. Example urls are the following: 1. http://video.nhl.com/videocenter/console?id=789500&amp;catid=35 2. http://video.senators.nhl.com/videocenter/console?id=790130&amp;catid=1141 3. http://video.nhl.com/videocenter/?id=2013020884-605-h From these examples, the values I would need are as follows: 1. 789500 2. 790130 3. 2013020884-605-h I would like to use the match() function to obtain the ID following ?id=, the ID's can include characters that are alphanumeric, underscore, and dash.
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/29317301
upvote count: 13
answers question: http://stackoverflow.com/q/29316681
has comment: http://stackoverflow.com/comment/46827188
has body: The result property on the object that is returned by open is a promise that behaves exactly as you describe. In fact the example in the documentation at https://angular-ui.github.io/bootstrap/#/modal uses it: var modalInstance = $modal.open({ templateUrl: 'myModalContent.html', controller: 'ModalInstanceCtrl', size: size, resolve: { items: function () { return $scope.items; } } }); modalInstance.result.then(function (selectedItem) { $scope.selected = selectedItem; }, function () { $log.info('Modal dismissed at: ' + new Date()); }); Which can be seen working in this Plunker http://plnkr.co/edit/ro5Dnkg0p9wYWlMCRqlN?p=preview
accepted answer of: http://stackoverflow.com/q/29316681
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 13

http://stackoverflow.com/q/29226144
has comment: http://stackoverflow.com/comment/46659806
has answer: http://stackoverflow.com/a/29226358
has body: I want to use bootstrap and font-awesome. The document says just importint CDN. it is my simple codes. &lt;!DOCTYPE html&gt; &lt;html lang="ja"&gt; &lt;head&gt; &lt;meta charset="UTF-8" /&gt; &lt;link href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet"&gt; &lt;/head&gt; &lt;body&gt; &lt;i class="fa fa-flag"&gt;&lt;/i&gt; fa-flag &lt;/body&gt; &lt;/html&gt; However, flag icon didn't appear. Could you tell me how to fix it?
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/29226228
has comment: http://stackoverflow.com/comment/46659885
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46660272
has comment: http://stackoverflow.com/comment/46660262
has comment: http://stackoverflow.com/comment/46659907
tagged with: twitter-bootstrap
type: UnansweredQuestion
has title: bootstrap font-awesome can't work [using cdn]
tagged with: css

http://stackoverflow.com/comment/46885834
has text: I'm not using any webhooks, I just realized.
type: Comment
score: 0
comment on: http://stackoverflow.com/q/29344120
type: QuestionComment

http://stackoverflow.com/q/29340274
has comment: http://stackoverflow.com/comment/46867997
type: Question
has answer: http://stackoverflow.com/a/29340317
upvote count: 2
has answer: http://stackoverflow.com/a/29340313
has answer: http://stackoverflow.com/a/29340298
accepted answer: http://stackoverflow.com/a/29340313
tagged with: javascript
has comment: http://stackoverflow.com/comment/46868064
has answer: http://stackoverflow.com/a/29340325
possible better answer: http://stackoverflow.com/a/29340298
answer count: 4
has body: for (var i = 0; i &lt; res.length; i++) { if (res[i] != 'a' &amp;&amp; res[i] != '-b') { } else { // alert will triger multiple times here alert(); } } I loop through an array to check something, how can I run once in the else statement? if I put a function there, it will trigger multiple times.
score: 2
type: AnsweredQuestion
downvote count: 0
tagged with: jquery
has title: use one() within a for loop jquery
favorite count: 0

http://stackoverflow.com/q/29222834
tagged with: javascript
upvote count: 0
has comment: http://stackoverflow.com/comment/46654422
answer count: 1
has title: Change CSS background with JavaScript if the number in the class is above 0
favorite count: 0
has answer: http://stackoverflow.com/a/29223045
accepted answer: http://stackoverflow.com/a/29223045
score: -3
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/46654824
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46655116
has body: I have some sort of notification system. Currently displaying like "Messages: 0" Around the "0" there's a box made with CSS. I'd like to change the background of the CSS box with JavaScript if the number is above 0.
downvote count: 3
has comment: http://stackoverflow.com/comment/46654398
type: Question

http://stackoverflow.com/comment/46745760
score: 1
has text: Show us more code. Maybe you have an issue with your scope hierarchy.
comment on: http://stackoverflow.com/q/29273008
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29355896
type: AcceptedAnswer
type: Answer
answers question: http://stackoverflow.com/q/29260966
has body: I figured out my problem. I've been trying to pass a string to the contract method, and I kept getting bad request errors. Instead, I wrapped the Json string and sent it to an object instead of a string that I created on the server. I wrapped the JSON and sent it in the body of the ajax request.. var rawWebData = { WebCustomerID: customerId, WebCompanyID: companyId, WebComputerID: computerId, WebServiceOrders: completedServiceOrders }; var rawData = { webData: rawWebData }; var webData = JSON.stringify(rawData); try { $.ajax({ type: "POST", url: "MFSRemoteDataService/REST_SendCompletedServiceOrders", contentType: "application/json; charset=utf-8", dataType: "json", traditional: true, data: webData, success: function (data) { alert(JSON.stringify(data)); }, failure: function (errMsg) { alert(errMsg); } }); } catch (e) { alert(e); } }); Then I created a class to collect the data... [DataContract] public class WebServiceOrder { [DataMember] public Int32 WebCustomerID { get; set; } [DataMember] public Int32 WebCompanyID { get; set; } [DataMember] public Int32 WebComputerID { get; set; } [DataMember] public virtual List&lt;ServiceOrder&gt; WebServiceOrders { get; set; } } Then I changed the contract method to accept the object I created instead of a string. WCF deserialized the JSON string. [OperationContract] [WebInvoke(Method = "POST", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json, UriTemplate = "REST_SendCompletedServiceOrders", BodyStyle = WebMessageBodyStyle.WrappedRequest)] [FaultContract(typeof (Exception))] bool REST_SendCompletedServiceOrders(WebServiceOrder webData);
accepted answer of: http://stackoverflow.com/q/29260966
score: 0

http://stackoverflow.com/comment/46829777
score: 0
has text: Do you have any plnkr/fiddle for this?
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29316063

http://stackoverflow.com/a/29272204
score: 1
answers question: http://stackoverflow.com/q/29272165
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46772336
type: Answer
upvote count: 1
has body: Try something $.ajax({ url: "testcookie.php", type: "POST", data: { 'arr[]': JSON.stringify(arr) } });
accepted answer of: http://stackoverflow.com/q/29272165

http://stackoverflow.com/a/29363145
downvote count: 0
upvote count: 3
type: Answer
has body: As a JavaScript solution, you could get the number of .button children and set their width as 100% / number-of-chilren. var divs = $('#center').children('.button'); divs.width(100 / divs.length + '%'); .button { float:left; } test test test test However if Flexible box layout is an option, you could achieve the same result by adding display: flex to the container and flex: 1 to the children. #center { display: flex; } .button { flex: 1 } test test test test Vendor prefixes omitted due to brevity.
answers question: http://stackoverflow.com/q/29363008
score: 3

http://stackoverflow.com/a/29355900
answers question: http://stackoverflow.com/q/29224682
upvote count: 1
type: Answer
has body: So I went through and did some research on the server we're using. It turns out that I was correct in thinking that there was something wrong with how the library was parsing the information. Specifically, when the library puts everything together, it doesn't know what to do with an empty box and therefore immediately starts embedding other boxes inside of it- effectively destroying the code. Easy fix: just add an html comment inside of each empty box, and the program believe the is populated so it leaves it alone. Thank you everyone for your help and suggestions!
downvote count: 0
score: 1

http://stackoverflow.com/q/29242044
has comment: http://stackoverflow.com/comment/46690171
tagged with: ios
tagged with: javascript
tagged with: jquery
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/29242106
linked to: http://stackoverflow.com/q/4755505
tagged with: ipad
accepted answer: http://stackoverflow.com/a/29242633
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29242106
has answer: http://stackoverflow.com/a/29242633
has title: How to avoid "double touch" on an iPad using jQuery?
has body: I have a button that when pressed brings you to the top of the page and highlights a search input. It works fine except the iPad where the user has to click twice to force it to work. It is not a matter or recognizing a touch event, but making sure that the touch event fires on the first try. How can I avoid the "double touch" on an iPad? $('.my-button').click(function() { $("html, body").animate({ scrollTop: 0 }, 500); $('.search').addClass('highlighted'); });
type: Question

http://stackoverflow.com/comment/46700162
comment on: http://stackoverflow.com/a/29246841
score: 0
has text: try to remove the z-index of your top-bar. the reason is because your menu were overlapped by the top-bar.
type: AnswerComment
type: Comment

http://stackoverflow.com/q/29242350
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
has title: Javascript endless loop occurs for no apparent reason
favorite count: 0
has body: I was working on a search engine for my website when the screen froze. I am assuming that there is an endless loop, but I have not caught the error on any validation services. Can I get some help? &lt;input id="Query" value="Type search here"&gt;&lt;/input&gt; &lt;input id="button" type="submit" name="button" value="Search"/&gt; &lt;script&gt; var titles = ["Pacman", "Tu95", "Tank Trouble", "HTML", "Test", "Print", "Search"]; var links = ["http://www.mikeyrichards.co.vu/2015/03/pacman.html", "http://www.mikeyrichards.co.vu/p/tu95_23.html", "http://www.mikeyrichards.co.vu/p/tu95.html", "http://www.mikeyrichards.co.vu/2015/03/html-i-used-html-for-this-console.html", "http://www.mikeyrichards.co.vu/2015/03/test-post.html", "http://www.mikeyrichards.co.vu/2015/03/print-page.html", "http://www.mikeyrichards.co.vu/2015/03/search.html"]; var titleswork = []; var titlesworknumbers = []; document.getElementById('button').onclick = function() { titleswork = []; titlesworknumbers = []; if (document.getElementById("results")) { var clear = document.getElementById("results"); clear.parentNode.removeChild(clear); } var letterthroughdata = 0; var data = document.getElementById("Query").value; for (var i = 0; i &lt; titles.length; i++) { if (titles[i].length &lt; data.length) {} else { while (letterthroughdata &lt; data.length) { if (titles[i] === data[letterthroughdata]) { letterthroughdata++; } } if (letterthroughdata === data.length) { titleswork.push(titles[i]); titlesworknumbers.push(i); } } } }; console.log(titleswork); console.log(titlesworknumbers); var x = document.createElement("div"); x.setAttribute("id", "results"); for (var i = 0; i &lt; titleswork.length; i++) { var y = document.createTextNode(titleswork[i] + ": " + links[titlesworknumbers[i]]); x.appendChild(y); var brake = document.createElement("br"); x.appendChild(brake); var z = document.getElementById("post-body-2820145598585075365"); } z.appendChild(x); &lt;/script&gt;
tagged with: loops
answer count: 1
has answer: http://stackoverflow.com/a/29242403
downvote count: 5
has comment: http://stackoverflow.com/comment/46690774
has comment: http://stackoverflow.com/comment/46690690
upvote count: 0
score: -5
tagged with: javascript
type: Question
accepted answer: http://stackoverflow.com/a/29242403

flux
tag name: flux
tags question: http://stackoverflow.com/q/29331467
tags question: http://stackoverflow.com/q/29370988
type: Tag

http://stackoverflow.com/comment/46762495
has text: This is original OP's code, which I explained why it doesn't work. Then I added my working answer.
comment on: http://stackoverflow.com/a/29281929
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/comment/46730227
type: QuestionComment
type: Comment
score: 0
has text: Unfortunately, I'm not in such a luxurious position of power :/
comment on: http://stackoverflow.com/q/29263936

http://stackoverflow.com/q/29330063
has comment: http://stackoverflow.com/comment/46849668
tagged with: angularjs
has body: I've got a angular-chartjs barchart on my page: And I initialise it with some data: $scope.data= [ [1,2,3,4] ]; $scope.labels = [1,2,3,4]; $scope.series = ['field1']; And if I add a datapoint after a couple seconds, the chart happily updates: $timeout(function() { console.log('timeout'); $scope.labels.push(''); $scope.data[0].push(9); }, 2000); //the data gains a 9, and the chart updates and now has 5 bars, //rather than 4. But if I try to do the same thing inside of an async callback, something goes terribly wrong, and the chart fails to render altogether. $http.get( _url_ ).then(function(res) { $scope.labels.push(''); $scope.data[0].push(9); }); //perhaps something goes wrong behind the scenes with $scope.data //because the chart wont load now Why is it that doing stuff inside of the callback for the ajax request makes the chart unhappy? Edit: here's a plunker, but for some reason, it works fine in the plunker but not in the real application.
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46849824
answer count: 0
tagged with: chart.js
type: Question
has title: Why does angular-chartjs update works in $timeout callback but not in async callback?
has comment: http://stackoverflow.com/comment/46884544
has comment: http://stackoverflow.com/comment/46854034
has comment: http://stackoverflow.com/comment/46883607
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/46850056

http://stackoverflow.com/a/29293745
has comment: http://stackoverflow.com/comment/46827972
has comment: http://stackoverflow.com/comment/46802624
answers question: http://stackoverflow.com/q/29292921
has comment: http://stackoverflow.com/comment/46787614
has comment: http://stackoverflow.com/comment/46802414
score: 15
has comment: http://stackoverflow.com/comment/46787559
has comment: http://stackoverflow.com/comment/46828744
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46827995
has comment: http://stackoverflow.com/comment/46811717
has comment: http://stackoverflow.com/comment/46784481
has body: First of all: Scrap that Promise constructor, this usage is an antipattern! Now, to your actual problem: As you have correctly identified, you are missing the key for each value. You will need to pass it inside each promise, so that you can reconstruct the object after having awaited all items: function mapObjectToArray(obj, cb) { var res = []; for (var key in obj) res.push(cb(obj[key], key)); return res; } return Promise.all(mapObjectToArray(input, function(arg, key) { return getPromiseFor(arg, key).then(function(value) { return {key: key, value: value}; }); }).then(function(arr) { var obj = {}; for (var i=0; i&lt;arr.length; i++) obj[arr[i].key] = arr[i].value; return obj; }); Mightier libraries such as Bluebird will also provide this as a helper function, like Promise.props. Also, you shouldn't use that pseudo-recursive load function. You can simply chain promises together: ….then(function (resources) { return game.scripts.reduce(function(queue, script) { return queue.then(function() { return getScript(root + script); }); }, Promise.resolve()).then(function() { return resources; }); });
accepted answer of: http://stackoverflow.com/q/29292921
type: Answer
upvote count: 16
has comment: http://stackoverflow.com/comment/46784596
has comment: http://stackoverflow.com/comment/46803011
has comment: http://stackoverflow.com/comment/46802230
has comment: http://stackoverflow.com/comment/46825594
has comment: http://stackoverflow.com/comment/46787415
downvote count: 1
has comment: http://stackoverflow.com/comment/46828296

http://stackoverflow.com/q/29358342
type: AnsweredQuestion
has title: Using slideUp() and slideDown() in condition
upvote count: 0
type: Question
has comment: http://stackoverflow.com/comment/46901369
score: -2
tagged with: javascript
downvote count: 2
accepted answer: http://stackoverflow.com/a/29358475
answer count: 1
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/29358475
has body: div next head In an accordion, I'd like to check if the div next the head is slide up, it shows .img_plus (+) to head, else if div next head is slide down, it hide (+) and shows .img_minus (-)
has comment: http://stackoverflow.com/comment/46901236

http://stackoverflow.com/comment/46915149
has text: Hey Sachin, I am new to Javascript and Ajax can you please tell me where I am overwriting? And how can I send each every response to HTML? I want to show numeric values in the html. And I have multiple input types of same names but with different ID in HTML so that's why I need a Loop
comment on: http://stackoverflow.com/q/29366092
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46696427
type: AnswerComment
score: 0
type: Comment
has text: Oh I am sorry, you can use id instead. It was just an example . Or use `[type='password']` as `cssSelector`
comment on: http://stackoverflow.com/a/29245357

http://stackoverflow.com/q/29317918
score: 0
has answer: http://stackoverflow.com/a/29318029
answer count: 1
has body: for (var i = 0; i < tree.length; ++i) { if (tree[i].match(/^##/g)) { console.log(tree[i]) tree[i] = ' ' + tree[i].replace('/^## /gm', '') + ' ' console.log(tree[i]) tocItems.push(tree[i]) } } The first console.log(tree[i]) outputs ## Chapter 1 The second one outputs: ## Chapter 1 But it should output instead: Chapter 1 What am I doing wrong?
has comment: http://stackoverflow.com/comment/46827723
tagged with: regex
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29318029
has comment: http://stackoverflow.com/comment/46827705
has comment: http://stackoverflow.com/comment/46827695
type: Question
has title: Why isn't the following regex removing the ## characters?
tagged with: javascript

http://stackoverflow.com/a/29348757
downvote count: 0
upvote count: 7
type: Answer
accepted answer of: http://stackoverflow.com/q/29346882
score: 7
answers question: http://stackoverflow.com/q/29346882
has body: Using different $connection: var connection1 = $.connection('/first'); connection1.start(); var connection2 = $.connection('/second'); connection2.start(); Subscribing on multiple hubs: var connection1 = $.hubConnection("'http://server1.net/signalr"); var connection2 = $.hubConnection("http://server2.net/signalr"); var Hub1= connection1.createHubProxy('Hub1'); var Hub2= connection2.createHubProxy('Hub2'); connection1.start(); connection2.start(); Read more here: here at section Define method on client (without the generated proxy, or when adding after calling the start method)
type: AcceptedAnswer

http://stackoverflow.com/a/29302851
answers question: http://stackoverflow.com/q/29301316
has comment: http://stackoverflow.com/comment/46805333
type: Answer
has body: If it helps, I recently took the first release of the rogue written for UNIX in C and rewrote it for javascript to work in a browser. I used a technic called continuation to be able to wait for key entry by the user because in javascript the are no interrupts. So I would have a piece of C code like this: void function f() { // ... first part ch = getchar(); // ... second part } that would be transformed in function f(f_higher_cont) { // ... first part var ch = getchar(f_cont1); return; // the execution stops here function f_cont1 () { // ... second part f_higher_cont(); } } the continuation is then stored to be reuse on a keypressed event. With closures everything would be restarted where it stoped.
score: 0

http://stackoverflow.com/a/29342958
type: Answer
has comment: http://stackoverflow.com/comment/46909404
has comment: http://stackoverflow.com/comment/46908615
upvote count: 1
has comment: http://stackoverflow.com/comment/46924368
type: AcceptedAnswer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/29342575
accepted answer of: http://stackoverflow.com/q/29342575
has body: As you want to show the price of the item, i don't see it in the curren object structure. So i've modified the object structure a bit. Also i prefer using [] for array creation when compared to new Array. Similarly i don't prefer using eval, instead as the variables are globally available they are properties of window object. So you can use window[property] to get that particular array. But instead I would prefer creating a new object and attaching all properties to that object. So that you can avoid polluting the global namespace. Laptops=new Array({name : "HP", price : 200},{name : "Dell", price : 400},{name : "Apple", price : 400},{name : "Lenovo", price : 200}); Phones=new Array({name : "Samsung", price : 200},{name : "Nokia", price : 400},{name : "Apple", price : 400}); Tablets=new Array({name : "Apple", price : 200},{name : "Acer", price : 400},{name : "Lenovo", price : 400},{name : "Dell", price : 100}); PC=new Array({name : "Macnitosh", price : 200},{name : "Dell", price : 100}); $(function() { function populateSelect(){ var value = $("#cat").val(); if(value) { console.log("value"+window[value]); $("#item").html(""); $.each(window[value], function(index, val) { $("#item").append("&lt;option value='"+val.price+"'&gt;"+val.name+"&lt;/option&gt;"); }); } } $('#cat').change(function(){ populateSelect(); }); populateSelect(); $("body").on("change", "#item", function() { $("#price").val($(this).val()); }); }); DEMO

http://stackoverflow.com/a/29307620
upvote count: 3
accepted answer of: http://stackoverflow.com/q/29307587
answers question: http://stackoverflow.com/q/29307587
score: 3
type: AcceptedAnswer
has body: Use double quotes: var header = "ATO"; For some reason this doesn't work. I think the problem is the single or double quotes in the string. Yes. Consider the HTML that is generated: Name // ^ ^ // start end You can even see it through the syntax highlight. Now, escaping it via \ doesn't work either. \ is the escape characters JS strings. \' becomes ', so you get the same result. But even \\' wouldn't help because \ is not an escape character in HTML.
downvote count: 0
type: Answer

http://stackoverflow.com/a/29322242
answers question: http://stackoverflow.com/q/29321742
downvote count: 1
type: Answer
accepted answer of: http://stackoverflow.com/q/29321742
has comment: http://stackoverflow.com/comment/46836876
has body: I've just read through the docs, and afaik none of the externally-exposed APIs will let you directly go in and find a React component by ID. However, you can update your initial React.render() call and keep the return value somewhere, e.g.: window.searchRoot = React.render(React.createElement...... You can then reference searchRoot, and look through that directly, or traverse it using the React.addons.TestUtils. e.g. this will give you all the components: var componentsArray = React.addons.TestUtils.findAllInRenderedTree(window.searchRoot, function() { return true; }); There are several built-in methods for filtering this tree, or you can write your own function to only return components based on some check you write. More about TestUtils here: https://facebook.github.io/react/docs/test-utils.html
type: AcceptedAnswer
score: 18
upvote count: 19

http://stackoverflow.com/comment/46891555
comment on: http://stackoverflow.com/q/29349791
type: Comment
type: QuestionComment
has text: That's just an example you can set it to any environment you wish...
score: 0

http://stackoverflow.com/q/29246373
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/46722544
has comment: http://stackoverflow.com/comment/46698212
has comment: http://stackoverflow.com/comment/46714777
has comment: http://stackoverflow.com/comment/46698178
tagged with: http://stackoverflow.com/tag/html
has body: (EDIT: is there an event that has the same bubbling as a onmouseleave but for oncontextmenu?) This program is complex because it exchanges functions/code between iframes. However that isn't my problem. My problem is that I have a large amount of divs that are loaded into the document via xml, php, and ajax. Each div has a oncontextmenu event setup. Each div has an auto incrementing id set when the php echos the contents back via ajax. As you can see, each div has many other elements inside. My problem is that the script doesn't give the id when I click on the image or other elements inside the div. All in all I want to get the id when I click on the div or any elements inside it. If possible, could you explain a event capture/bubble solution? Here is that code: $xml = simplexml_load_file('xml/birds.xml'); foreach($xml->bird as $bird) { $images = explode(",",$bird->image); echo ' id.'">'; echo ''.$bird->name.''; echo ' '; echo $bird->fourLetterCode; echo ' '; echo " "; } Here is the javascript which adds the oncontextmenu event to all the divs: $('#birds').load('php/getBirds.php', function(){ var birdContainers = document.getElementsByClassName('birdContainers'); for(var i = 0; i != birdContainers.length; i++) { if (birdContainers[i].addEventListener) { birdContainers[i].addEventListener('contextmenu', function(e) {var mouseX = e.clientX || e.pageX; var mouseY = e.clientY || e.pageY; window.parent.document.getElementById('menu').style.left = mouseX+20+'px'; alert(e.target.id); window.parent.document.getElementById('menu').style.top = mouseY+100+'px'; window.parent.document.getElementById('menu').style.display = 'block'; this.style.borderColor = '#3B87FF'; e.preventDefault();}, true); birdContainers[i].addEventListener("dblclick", function(event){openBird(this.id);}, true); birdContainers[i].addEventListener("click", function(event){this.style.borderColor = '#3B87FF';}, true); } else if (birdContainers[i].attachEvent) { birdContainers[i].attachEvent("dblclick", functi…
has comment: http://stackoverflow.com/comment/46716521
has comment: http://stackoverflow.com/comment/46698371
has comment: http://stackoverflow.com/comment/46698163
has title: is there an event that has the same bubbling as a onmouseleave but for oncontextmenu?
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46698232
upvote count: 1
tagged with: php
tagged with: css
has comment: http://stackoverflow.com/comment/46698177
answer count: 0
score: 1
type: Question
has comment: http://stackoverflow.com/comment/46698143
has comment: http://stackoverflow.com/comment/46698526

http://stackoverflow.com/comment/46836034
type: Comment
has text: @jfriend00 If interpreting specification correctly, basically, appear to provide guidance for writing `js` ; when the actual language, or language implementation, is defined by the author of the particular implementation. See Conformance _"A conforming implementation of ECMAScript must provide and support all the types, values, objects, properties, functions, and program syntax and semantics described in this specification."_ At answer, `Production` would be `WhileStatement` `:` `// define stuff here utilizing Grammar`
score: 0
comment on: http://stackoverflow.com/a/29321580
type: AnswerComment

http://stackoverflow.com/comment/46919976
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29366556
has text: I can tell you you will end up with exceptions if view state is on. It's a really bad idea. Make the update panels smaller to minimize the amount transferred in each partial postback. The larger they are, the larger the response size. If it is the full page it won't really be a partial update.
score: 0

http://stackoverflow.com/a/29364155
answers question: http://stackoverflow.com/q/29364044
has body: You can use $(document).ready to execute functions when the dom is fully loaded: $(document).ready(function () { var val = parseInt($('#cenazatbi').val(), 10); if (val &lt; 150) { $("#tbi").css("display", "none"); } else if (val &gt; 150.01) { $("#tbi").css("display", "block"); } }); the function .parseInt() will strip all non-digit characters of your value and cast the string into an integer. As an alternative you can also use the Number()-function for this. Demo Reference .ready() parseInt() Number()
type: Answer
score: 0

http://stackoverflow.com/q/29220972
has comment: http://stackoverflow.com/comment/47322854
tagged with: javascript
has comment: http://stackoverflow.com/comment/46812496
score: 0
has comment: http://stackoverflow.com/comment/46715761
has title: The best strategies for implementing a dojo javascript client
answer count: 0
type: UnansweredQuestion
tagged with: dojo
tagged with: model-view-controller
type: Question
has body: I would like to discuss the best strategies for implementing dojo javascript client with you. I´m definitly new to dojo but familiar with js and webprogramming. My strategie now, after doing my dojo researches, would be the following: Build a GUI with dojo-Widgets (e.g. Borderlayout, Contentpane, Tabs, Buttons and so on). If there is no dojo-Widget, implement needed UI-Component by myself (e.g. div with onclick event as custom widget) Cluster combined widgets which are the same type have the same functionality and write them into a seperate html (e.g. Tabs in a Tabcontainer - here I would write a tabs.html containing Contentpanes with a href on all other tabs (tab1.html, tab2.html,.. etc)) Glue the widgets and clustered widgets together and write the needed controllers for them. (e.g. controller with combines buttons and the tabs in the tabcontainer -> e.g. button should open new tab). A controller could match to only on widget too. The model part could be some JSON received through an ajax request or better a dojo store. This described strategie would implement the MVC pattern. Would this be your rough strategie for implementing a dojo javascript client too? What is your way of implementation using dojo with all it`s power? Thx in advance.

http://stackoverflow.com/a/29249688
answers question: http://stackoverflow.com/q/29249612
score: 0
has body: try this $( document ).ready(function() { $( ".lender_field_code" ).change(function() { alert( $(this).find("option:selected").text() ); }); });
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46726170
accepted answer of: http://stackoverflow.com/q/29249612
has comment: http://stackoverflow.com/comment/46705917
has comment: http://stackoverflow.com/comment/46706914
type: Answer

http://stackoverflow.com/q/29324120
tagged with: javascript
score: 0
answer count: 1
has title: Hash Navgation w/ Ajax loads
has answer: http://stackoverflow.com/a/29324723
tagged with: jquery
tagged with: ajax
type: UnansweredQuestion
has body: I have a page which loads a DIV with different content when I click a link. function getAjax(myID,file,room){ room = typeof room !== 'undefined' ? room : 0; var myResult; var raNum = Math.floor((Math.random() * 100) + 1); $.ajax({ type: "POST", cache: false, async: false, url: '&lt;?php echo PATH;?&gt;ajax/'+file+'.php?num='+raNum+'&amp;lang=&lt;?php echo $_SESSION['lang'];?&gt;', data: {"id": myID, "room": room}, success: function(data){ window.location.hash = "TEST"; if ($('.infowin').css('visibility') === 'visible' &amp;&amp; file != 'infowin') { $('.infowin').hide(); $('.hName').html('&lt;?php echo RN_FE_TOP_INFOWIN_LOAD;?&gt;...').removeClass('green').removeClass('orange'); $('.infoWinContent').html(''); $('.awards').html(''); } myResult = data; }, error: function(data, errorThrown){ console.log('request failed :'+errorThrown); } }); return myResult; } The Link: $('.mReservation').on('click', function(e){ var raNum = Math.floor((Math.random() * 10000) + 1); e.preventDefault(); var hotel_id = "0"; var getPage = getAjax(hotel_id,"cancel"); $("#all-content").html(getPage).css("overflow-y","auto"); }); When I hit the BACK button of the browser it will always go to the previous page. Is there any way to have the back button "undo" the last jquery ajax call? I read something about #hashnavigation so I added this on ajax' success function: window.location.hash = "TEST"; It will add a #TEST to the URL, but it hitting BACK now only results in removing the hash. Is there any way to achieve that in jquery?
linked to: http://stackoverflow.com/q/11427258
tagged with: hashtag
type: Question

http://stackoverflow.com/a/29236986
type: AcceptedAnswer
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/29231370
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/29231370
has body: In 3D graphics all changes are only matrix transformations of the original mesh, which do not actually change this mesh. So my guess is that you need to apply the transformations to you objects prior to the export. try: .applyMatrix

http://stackoverflow.com/a/29342741
upvote count: 4
answers question: http://stackoverflow.com/q/29342611
downvote count: 0
has comment: http://stackoverflow.com/comment/47521097
type: AcceptedAnswer
has body: It would be better if you could use an http interceptor to redirect all detected 401 errors. // add an http interceptor via app.config app.config(function($$httpProvider) { $httpProvider.interceptors.push('my401Detector'); }); // interceptor logic. app.factory('my401Detector', function($location, $q) { return { responseError: function(response) { if(response.status === 401) { $location.path('/login'); return $q.reject(response); } else { return $q.reject(response); } } }; });
score: 4
accepted answer of: http://stackoverflow.com/q/29342611
type: Answer

http://stackoverflow.com/a/29280924
downvote count: 1
score: -1
upvote count: 0
has body: You need some form of JavaScript manipulation for this. It cant be done in PHP alone.
type: Answer
answers question: http://stackoverflow.com/q/29280686

http://stackoverflow.com/comment/46739176
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29268490
has text: Yes, something else must be interfering. Good luck.
type: AnswerComment

http://stackoverflow.com/q/29291657
has title: mongoose.js Model.remove only works once within a loop
tagged with: mongoose
tagged with: javascript
has body: I'm not sure if this is just my noviceness to asynchronous programming or an actual bug, but whenever I put Model.remove in a loop, it will only work on the first time and then not remove anymore. My goal is to just have one document in the collection after the function is run, so if there is different way to do that, that would great to know as well. Here is how my code looks: (part of server.js) var schema = new mongoose.Schema({ gifs: [String] }); var Gifs = mongoose.model('Gifs', schema); setInterval(function(){ request('http://www.reddit.com/r/gifs', function(error, response, html) { if (!error){ var $ = cheerio.load(html); $('a.title', '#siteTable').each(function(){ var url = $(this).attr('href'); urls.push(url); }); } //remove everything in the collection that matched to {}, which is everything //then in the callback save the document //currently know that this will in fact remove all documents within the model //however, it will only work on its first run Gifs.remove({},function(error){ console.log('removed all documents'); Gifs.create({gifs: urls}, function(error){ console.log("created new document"); }); }); }); }, 60000);
has answer: http://stackoverflow.com/a/29291915
tagged with: node.js
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29291915
type: Question
score: 0
tagged with: mongodb
answer count: 1

http://stackoverflow.com/a/29290513
score: 0
has body: You can escape new lines with a backslash \. So you would end each line like this: var codesnippet = "$('body').css('background-color', 'blue')\ .css('margin', '10px');"
type: Answer
answers question: http://stackoverflow.com/q/29290137

http://stackoverflow.com/a/29324231
upvote count: 1
has body: Capture the color in a variable, for example: color, and return it at the end of the function: getColor: function (feature) { var color = ''; var objectKeys = Object.keys(gidS); // use objectkeys to loop over all the object properties //use it to get the length for (var i = 0; i &lt; objectKeys.length; i++){ if(gidS[i][1]=="MT"){ color = "green"; } else if(gidS[i][1]=="IRU"){ color = "#780000"; //no images on this line } } return color; } By looping through every property of the object, and then returning, you're effectively getting the last possible matching "MT" or "IRU", if any. If you return out of the function as soon as you find a match, then your getting the first possible matching "MT" or "IRU". For example, given the set: [[435,'IRU'],[34324,'MT'],[343,'MT']] My method will return green, and your method will return #780000.
has comment: http://stackoverflow.com/comment/46839382
accepted answer of: http://stackoverflow.com/q/29324189
has comment: http://stackoverflow.com/comment/46839308
has comment: http://stackoverflow.com/comment/46839484
has comment: http://stackoverflow.com/comment/46839565
has comment: http://stackoverflow.com/comment/46839944
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46839564
answers question: http://stackoverflow.com/q/29324189
type: Answer
has comment: http://stackoverflow.com/comment/46839397
score: 1

http://stackoverflow.com/a/29311050
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/29311013
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/29311013
has body: Split your current location into an array using delimiter / Remove the last object in this array Join the objects into string taking / as delimiter location.href=location.href.split("/").slice(0,-1).join("/");
type: AcceptedAnswer

http://stackoverflow.com/a/29369699
score: 0
has comment: http://stackoverflow.com/comment/46921123
has body: indexOf returns -1 if not found. That is going to be truthy. You need to add a check for != -1 if (document.URL.indexOf("xxxx") != -1) {
type: Answer
answers question: http://stackoverflow.com/q/29369577

http://stackoverflow.com/comment/46884338
type: QuestionComment
comment on: http://stackoverflow.com/q/29349235
score: 1
has text: Knowing about `forEach` doesn't mean you'll always use it. A `for` loop is fine. They're faster. They're supported by IE8 (although forEach can be polyfilled easily enough). No need to pick on the older iteration method. ;)
type: Comment

http://stackoverflow.com/a/29303305
has comment: http://stackoverflow.com/comment/46803330
answers question: http://stackoverflow.com/q/29302506
type: Answer
accepted answer of: http://stackoverflow.com/q/29302506
score: 1
upvote count: 1
has body: Best practices can be summarized as 'data down', 'actions up'. You want to pass data down to your component and actions up to the parent as much as possible to isolate the child component from the parent so it can be used anywhere. Avoid sending data up through two way bindings as that will no longer be the default in Ember 2.0. (Bindings will be one way by default.) The main change to your jsbin I would make is instead of sending parentCtrl=this in your template, I would send down itemSelected=itemSelected. Then in your item component: isActive: Ember.computed('itemSelected', function() { if (this.get('itemSelected') !== null) { return this.get('itemSelected.description'); } else { return false; } }),
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/46721840
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29243343
score: 0
has text: ok, I got it. But it looks like that is more complicated that send directly that data inside the AJAX call. Thanks any way!

http://stackoverflow.com/comment/46725269
type: AnswerComment
comment on: http://stackoverflow.com/a/29261599
score: 0
type: Comment
has text: You're right. I was following this http://irlnathan.github.io/sailscasts/blog/2013/09/15/sailscasts-answers-ep1-question-about-using-a-service-to-allow-inheritance-in-a-model/ But it looks outdated now

http://stackoverflow.com/q/29265641
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29266247
has body: I am working on a website for a restaurant that has a header with the following tabs: "home" "menu" "about" I want to switch between the tabs while staying in the same page, but only changing the contents of it according to the chosen tab. I managed to do that with jQuery by hiding &lt;div&gt;s and showing the one I want by adding and removing classes. The problem is that whenever I refresh the page it returns to the main home page that are set to show when page is loaded. So my question is: is there a way to make the webpage refresh with the changed classes made???
answer count: 4
has title: Web development show/hide after refresh
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29265777
linked to: http://stackoverflow.com/q/2010892
type: Question
possible better answer: http://stackoverflow.com/a/29265935
has answer: http://stackoverflow.com/a/29265987
has comment: http://stackoverflow.com/comment/46735225
has answer: http://stackoverflow.com/a/29265935
tagged with: javascript
tagged with: show-hide
score: 0
accepted answer: http://stackoverflow.com/a/29266247
tagged with: web
tagged with: jquery

http://stackoverflow.com/comment/46843300
comment on: http://stackoverflow.com/a/29326401
type: AnswerComment
score: 0
has text: Looks like `var_dump($_COOKIE["elementValues"])` is a `JSON` string. You'll have to decode it.
type: Comment

http://stackoverflow.com/a/29241426
type: AcceptedAnswer
upvote count: 3
has body: You can do this : obj.prop = obj.prop + 1 || 1 This works just like your original code but with an OR statement, it will take the first option that is true. Since the object might not have the property, it'll return 'NaN' and then proceed to set the property to 1 since that is the other side of the OR statement. To avoid this case : obj.prop = (obj.prop &amp;&amp; obj.prop + 1) || 1
type: Answer
answers question: http://stackoverflow.com/q/29241380
has comment: http://stackoverflow.com/comment/46690168
accepted answer of: http://stackoverflow.com/q/29241380
score: 3
downvote count: 0

http://stackoverflow.com/q/29350206
score: 0
answer count: 1
tagged with: show-hide
has body: Can you help me to make a javascript function to: (1) show div contents in showarea when the two buttons are clicked, (2) replace content in the showarea if it contains show1/show2 (3) hide the content. Scenario: When the button SUB button is clicked, it'll show Show1's contents to the ShowArea, but when the DOM button is clicked, it'll replace the contents of ShowArea which is Show1 and display the contents of Show2. But when you click again the DOM button, it will now hide the ShowArea and it's border. Here is the sample code: SUB DOM Enter your ID NUMBER Enter your FACULTY ID These two functions is what I've created. replace function to replace the content and Open to show or hide the div. but the replace() only works for the DOM.. function replace(id,content) { var container = document.getElementById(id); container.innerHTML = content; } function Open(idMyDiv){ var objDiv = document.getElementById(idMyDiv); if(objDiv.style.display == "inline"){ objDiv.style.display = "none"; } else { objDiv.style.display = "inline"; } Thanks
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46886061
has comment: http://stackoverflow.com/comment/46888814
has answer: http://stackoverflow.com/a/29350319
has comment: http://stackoverflow.com/comment/46886261
has comment: http://stackoverflow.com/comment/46886000
type: Question
has comment: http://stackoverflow.com/comment/46886729
linked to: http://stackoverflow.com/q/6957443
tagged with: javascript
has comment: http://stackoverflow.com/comment/46886211
has title: How to Replace and Hide Div Contents Using Javascript
tagged with: replace

http://stackoverflow.com/a/29292578
answers question: http://stackoverflow.com/q/29292492
has comment: http://stackoverflow.com/comment/61160581
has body: using the old watcher plugin seems to resolve the issue for my needs. Done in my configuration via: plugins: [ new webpack.OldWatchingPlugin() ],
has comment: http://stackoverflow.com/comment/67953312
has comment: http://stackoverflow.com/comment/61651203
type: AcceptedAnswer
score: 47
has comment: http://stackoverflow.com/comment/53881636
type: Answer
has comment: http://stackoverflow.com/comment/48416616
accepted answer of: http://stackoverflow.com/q/29292492
upvote count: 47
has comment: http://stackoverflow.com/comment/64607907
downvote count: 0
has comment: http://stackoverflow.com/comment/63613615

http://stackoverflow.com/comment/46839805
has text: Yeah, but don't seem to work since it will have a fixed position on the viewport since it's outside the slides... :/
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29324419

http://stackoverflow.com/comment/46908456
has text: alert(" test1") coming fine.. when click share location popup in browser. but when i click not now popup in browser nothing happen means alert("tast2) not coming.. i put test2 in error function ..
score: 0
comment on: http://stackoverflow.com/a/29361974
type: Comment
type: AnswerComment

http://stackoverflow.com/q/29357884
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/29357953
accepted answer: http://stackoverflow.com/a/29357953
type: AnsweredQuestion
has body: I'm trying to execute a simple Javascript method on a web server generated by C#. I can get the web server to run and generate a simple web page with a button, but I can't seem to get the button to run the js . Using System; using System.Net; using System.Threading; using System.Linq; using System.Text; using System.Web; using System.Web.UI.WebControls; using System.Web.UI; using System.Web.UI.HtmlControls; //using System.Web.UI.Page; namespace SimpleWebServer { class Program { static void Main(string[] args) { WebServer ws = new WebServer(SendResponse, "http://localhost:8080/test/"); // ClientScript.RegisterStartupScript(page.GetType(), "hwa", "alert('Hello World');", true); Console.WriteLine("A simple webserver. Press a key to quit."); Console.ReadKey(); ws.Stop(); } public static string SendResponse(HttpListenerRequest request) { ws = WebServer; //return string.Format(" )"); ClientScript.RegisterStartupScript(page.GetType(), "hwa", "alert('Hello World');", true); return string.Format(" <script= alert('button click called'); )"); The JS script code is as follows: function buttonClicked() { alert('button click called'); } The Web Server code is as follows: using System; using System.Net; using System.Threading; using System.Linq; using System.Text; namespace SimpleWebServer { public class WebServer { private readonly HttpListener _listener = new HttpListener(); private readonly Func<HttpListenerRequest, string> _responderMethod; public WebServer(string[] prefixes, Func<HttpListenerRequest, string> method) { if (!HttpListener.IsSupported) throw new NotSupportedException( "Needs Windows XP SP2, Server 2003 or later."); // URI prefixes are required, for example // "http://localhost:8080/index/". if (prefixes == null || prefixes.Length == 0) throw new ArgumentException("prefixes"); // A responder method is required if (method == null) throw new ArgumentException("method"); foreach (string s in prefixes) _listener.Prefixes.Add(s); _responderMethod = method; _listener.St…
type: Question
tagged with: c#
has comment: http://stackoverflow.com/comment/46900361
linked to: http://stackoverflow.com/q/5731224
tagged with: webserver
has title: Run JavaScript method on Web Server using c#
score: 0
has comment: http://stackoverflow.com/comment/46900298

http://stackoverflow.com/comment/46698010
has text: Thank you. Thank you. I knew it was something simple I just couldn't see it after spending so long getting this far (spent 4 hours trying to do this through nested async calls before doing the research to find promises, and starting over with those). Again, thank you.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29246241

http://stackoverflow.com/q/29321647
has title: Webpack splitting code into separate modules included via npm, how to compile es6?
has answer: http://stackoverflow.com/a/29355410
favorite count: 0
tagged with: npm
tagged with: babeljs
type: AnsweredQuestion
score: 3
upvote count: 3
accepted answer: http://stackoverflow.com/a/29355410
type: Question
tagged with: ecmascript-6
has body: I'm trying to write a system of modular components that can be dynamically loaded at runtime with webpack. For example, when the user switches tabs, the code to display the content of the new tab should only load when the user clicks on that tab. Here is some of the code that accomplishes this (quite nicely, I might add): onrender(){ this.observe("route", (route) =&gt; { if(route.length&gt;0){ this.set("loading", true); this.get("pages."+route).loadComponent((component) =&gt; { this.components.Page = component.Component; this.set("loading", false); }); } }); }, data: { pages: { "#hello": { name: "Hello", loadComponent: (callback) =&gt; { require.ensure([], () =&gt; { callback(require("./page_component/hello/hello.js")); }); } }, "#world": { name: "World", loadComponent: (callback) =&gt; { require.ensure([], () =&gt; { callback(require("./page_component/world/world.js")); }); } }, "#activity": { name: "Individual Activity", loadComponent: (callback) =&gt; { require.ensure([], () =&gt; { callback(require("./page_component/individual_activity/assets/js/src/main.js")); }); } } } } I have gotten this working fabulously, with one caveat. I'm using ES6, and the babel-loader to load it. The modules containing the functionality, templates, styles etc. for the tabs all have to be directly contained within the directory structure of the app, like so (see: page_components directory): ├── assets │ ├── css │ ├── js │ │ ├── main.js │ │ └── page_components │ │ ├── hello │ │ ├── individual_activity │ │ └── world │ └── templates │ └── index.html ├── package.json └── webpack.config.js I would prefer each page component to be its own package, with a package.json, and included via for example: require("individial_activity"), for purposes of code organization. The problem is, it appears that webpack doesn't run external modules (such as the modules included via node_modules) through any loader, and as such I get errors about unexpected symbols when trying to load ES6 code. I tried such t…
tagged with: webpack
downvote count: 0
answer count: 1
tagged with: javascript

http://stackoverflow.com/q/29344464
answer count: 0
has comment: http://stackoverflow.com/comment/46875585
has comment: http://stackoverflow.com/comment/46876288
tagged with: dom
has comment: http://stackoverflow.com/comment/46912767
has comment: http://stackoverflow.com/comment/46875325
type: Question
has comment: http://stackoverflow.com/comment/46875442
tagged with: javascript
has body: I have being trying to parse a HTML file using the following code below, I have a html file passed into the core.Element.parse, which is then rendered to the view: this.newElement = core.Element.parse(html); this.view.getContent().append(this.newElement); html file looks like: Can someone tell me why the html, and css gets parsed but the javascript doesnt? When I inspect element the html is there and css but there is no sign of the javascript and nothing appears. Thanks in advance for any help!
has title: Can I parse Javascript inside HTML
score: 0
has comment: http://stackoverflow.com/comment/46886149
has comment: http://stackoverflow.com/comment/46890134
has comment: http://stackoverflow.com/comment/46875524
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css

http://stackoverflow.com/comment/46650626
comment on: http://stackoverflow.com/q/29220569
score: 0
type: Comment
type: QuestionComment
has text: Yes, same issue. IE adds exactly : multipart/form-data; boundary=---------------------------7dfc53b3091c @KevinB

http://stackoverflow.com/a/29279659
has body: I test it on ur page, its work! $(document).ready(function(){ $('body').on('click', 'input[type="checkbox"]', function(){ $this = $(this) var flag = true $.each($this.closest('ul').find('input'), function(){ if ($(this).prop('checked') == false){ flag = false} }); if(flag){ $this.closest('ul').closest('li').find('input').first().prop('checked', true); if ($this.closest('ul').closest('li').closest('ul').closest('li').length &gt; 0){ document.aa = $this.closest('ul').closest('li').closest('ul').closest('li').find('ul input') $.each( $this.closest('ul').closest('li').closest('ul').closest('li').find('ul input'), function(){ if ($(this).prop('checked') == false){ flag = false} }); if(flag){$this.closest('ul').closest('li').closest('ul').closest('li').find('input').first().prop('checked', true);} }} else{ parents = $this.parents('ul li'); parents.splice(0,1); for (var i = 0; i &lt; parents.length; i++) { $this = $(parents[i]); $this.find('label').first().find('input').prop('checked', false); }; } }); });
type: Answer
has comment: http://stackoverflow.com/comment/46760568
has comment: http://stackoverflow.com/comment/46757615
score: 0
has comment: http://stackoverflow.com/comment/46758435
has comment: http://stackoverflow.com/comment/46757629
has comment: http://stackoverflow.com/comment/46757552
answers question: http://stackoverflow.com/q/29278702

http://stackoverflow.com/comment/46811876
has text: So I have to put the js in my page.blade.php?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29308486
type: Comment

http://stackoverflow.com/comment/46884443
comment on: http://stackoverflow.com/a/29310823
score: 0
type: AnswerComment
type: Comment
has text: Yes, but how can I add it after the page loads, such as after receiving new data from a service? I have some products loading from a web service, so I need to add to the initial breadcrumb list after the initial page load.

http://stackoverflow.com/comment/46925180
has text: .clear() Deletes the entire content of your collection. Can you elaborate on what the situation is? Please provide more details on what is happening, such as log output and your code that is failing. For example, it could be that you are not using the APIs asynchronously and are running into race conditions, but I can't tell these things without the relevant code.
comment on: http://stackoverflow.com/q/29370476
type: Comment
type: QuestionComment
score: 2

lodash
tags question: http://stackoverflow.com/q/29366809
tags question: http://stackoverflow.com/q/29282273
tags question: http://stackoverflow.com/q/29284548
tags question: http://stackoverflow.com/q/29256700
tags question: http://stackoverflow.com/q/29242094
tags question: http://stackoverflow.com/q/29294081
tags question: http://stackoverflow.com/q/29352160
tag name: lodash
tags question: http://stackoverflow.com/q/29261449
tags question: http://stackoverflow.com/q/29236213
type: Tag
tags question: http://stackoverflow.com/q/29320817
tags question: http://stackoverflow.com/q/29258961
tags question: http://stackoverflow.com/q/29347584
tags question: http://stackoverflow.com/q/29322857
tags question: http://stackoverflow.com/q/29243575

http://stackoverflow.com/comment/57770312
has text: @FerTo http://stackoverflow.com/help/self-answer
comment on: http://stackoverflow.com/q/29345481
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/46889176
type: QuestionComment
type: Comment
has text: That query will never work. `'votes'` is a string. You want `\`votes\``.
score: 0
comment on: http://stackoverflow.com/q/29351871

http://stackoverflow.com/a/29364495
score: 0
type: AcceptedAnswer
type: Answer
has body: First you need to define a linear scale that would map the value of your node_size to an actual radius, as follows (example): r = d3.scale.linear().range([3,10]); Then specify as a domain, the values of your score parameter as follows (assuming DATA is your data structure) // first define your radius according to your formula specified in your question. DATA.forEach(function(d){ d.radius=10 - (d.score / 50); }) //Then, assign is as a domain of your radius function r.domain(d3.extent(DATA.map(function(d){return d.radius;}))) Finally, when plotting your data you should do something like this: .attr('r', function(d) {return r(d.radius)}); You could merge or optimize these steps, but I think it is a good start. Hope this helps.
accepted answer of: http://stackoverflow.com/q/29364194
answers question: http://stackoverflow.com/q/29364194

http://stackoverflow.com/q/29297671
accepted answer: http://stackoverflow.com/a/29297885
favorite count: 0
has body: In HTML, all elements share a set of global attributes, like class, id, the data- specification, a common set of Javascript events and a couple of things here and there. But how about SVG? I'm trying to build a trait in PHP able to represent the very core of a SVG element (so I can build every SVG object with this core set of attributes and add the specific attributes for that object in its own declaration). The SVG section in the Mozilla Developer Network has a full-blown page with lots of attributes, but the only core attributes, according to their documentation, are id, xml:base, xml:lang, xml:space I see the class attribute is on the navigation links, but not referred in the attributes category section, which confuses me a lot. Isn't the class attribute a global one like in HTML? And what about the Javascript events?
type: Question
has title: SVG - list of global attributes and events?
tagged with: http://stackoverflow.com/tag/html
tagged with: php
tagged with: traits
tagged with: http://stackoverflow.com/tag/svg
upvote count: 1
answer count: 1
has answer: http://stackoverflow.com/a/29297885
tagged with: javascript
type: AnsweredQuestion
downvote count: 0
score: 1

angular-ui-grid
tags question: http://stackoverflow.com/q/29333209
tags question: http://stackoverflow.com/q/29247032
tag name: angular-ui-grid
type: Tag

http://stackoverflow.com/comment/46774519
has text: do you have interest in a moderators opinion? http://meta.stackoverflow.com/questions/280478/why-not-w3schools-com/280484#280484
score: 4
comment on: http://stackoverflow.com/a/29282270
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/46852750
type: AnswerComment
has text: See also: http://stackoverflow.com/questions/23125338/how-do-i-use-browserify-with-external-dependencies
comment on: http://stackoverflow.com/a/29222948
type: Comment
score: 0

http://stackoverflow.com/a/29362463
answers question: http://stackoverflow.com/q/29362406
downvote count: 0
type: Answer
score: 2
upvote count: 2
has body: How about this? $(".chosen-single").html(yourHtml)

http://stackoverflow.com/q/29358267
has answer: http://stackoverflow.com/a/29387633
has answer: http://stackoverflow.com/a/29377068
has body: Is there a way to check whether a URL leads to a valid image or not before trying to load it into a createjs.Bitmap? I've been trying to catch the error of a bad URL (in Firefox), but for some reason that doesn't work. try { image = new createjs.Bitmap ( "image" ); } catch ( err ) { console.log ( "oops" ); return null; } When I run this code in Firefox the error still shows up in the console, and the logged message doesn't. My question is, then, is there a way to pre-validate the URL?
possible better answer: http://stackoverflow.com/a/29387633
has title: Catch bad URLs when using EaselJS bitmap
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29377068
tagged with: error-handling
type: Question
tagged with: javascript
tagged with: easeljs
score: 0
answer count: 2

http://stackoverflow.com/comment/46684353
type: Comment
has text: This makes sense. Think I still need to put it in a function that is called somewhere then?
type: AnswerComment
comment on: http://stackoverflow.com/a/29238995
score: 0

http://stackoverflow.com/a/29280544
has comment: http://stackoverflow.com/comment/46759205
type: Answer
has body: $( "span.notice" ).ready( ? I don't think so. The DOM can be ready, but you can't listen for a HTML element to be. Just remove this, and also the double &lt;script&gt; opening. &lt;script&gt; $( "span.notice" ).fadeOut( 1000, function() { $( this ).remove(); }); &lt;/script&gt;
has comment: http://stackoverflow.com/comment/46758991
answers question: http://stackoverflow.com/q/29280442
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/46759293
has comment: http://stackoverflow.com/comment/46759112
downvote count: 0
has comment: http://stackoverflow.com/comment/46758950
has comment: http://stackoverflow.com/comment/46758911

http://stackoverflow.com/a/29309872
score: 0
type: AcceptedAnswer
has body: I don't know of any tag to use to wrap all the elements, but you can assign them a special data attribute and get all of the meta tags with that attribute. I'm assuming you are using JavaScript since you mentioned XMLHttpRequest, but that could possibly be in some other language as-well. In the future please specify the language in the tags of the question. &lt;head&gt; &lt;meta name="unrelated"&gt; &lt;meta name="theme-color" data-theme&gt; &lt;meta name="theme-background" data-theme&gt; &lt;/head&gt; &lt;script&gt; var meta = document.head.getElementsByTagName('meta'); for(i = 0, l = meta.length; i &lt; l; ++i) { if(meta[i].hasAttribute('data-theme')) { // do something } } &lt;/script&gt;
accepted answer of: http://stackoverflow.com/q/29309804
type: Answer
answers question: http://stackoverflow.com/q/29309804
has comment: http://stackoverflow.com/comment/72604866

http://stackoverflow.com/q/29341687
has comment: http://stackoverflow.com/comment/46870646
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29341928
accepted answer: http://stackoverflow.com/a/29341928
answer count: 3
has comment: http://stackoverflow.com/comment/46870525
favorite count: 0
has title: JQuery working wierdly for function 'find':
possible better answer: http://stackoverflow.com/a/29341822
upvote count: 3
type: AnsweredQuestion
score: 3
has body: I have the following jQuery line: $(' hi ').find('a') I expect the result to be a wrapped set of one element. However the result is an empty array ([]). Why? -- EDIT -- For some reason the code below works. $(' hi ').find('a'); Why is this happening?
has comment: http://stackoverflow.com/comment/46870524
has comment: http://stackoverflow.com/comment/46870582
has comment: http://stackoverflow.com/comment/46870636
has comment: http://stackoverflow.com/comment/46870433
has answer: http://stackoverflow.com/a/29341821
has comment: http://stackoverflow.com/comment/46870684
type: Question
has answer: http://stackoverflow.com/a/29341822

http://stackoverflow.com/a/29265551
upvote count: 1
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: The correct answer is to pass a ChartOverride function as follows: var ContainingClass = React.createClass({ render: function() { return ( &lt;PieChart title={this.props.name} series={this.props.series} chartOverrides={this.chartOverrides()} /&gt; ); }, chartOverrides: function() { return { tooltip: { pointFormat: '{series.name}: &lt;b&gt;{point.percentage:.1f}%&lt;/b&gt;' }, } } });
accepted answer of: http://stackoverflow.com/q/29222442
answers question: http://stackoverflow.com/q/29222442
score: 1

http://stackoverflow.com/comment/46755493
comment on: http://stackoverflow.com/q/29278548
has text: @liquidflo - That didn't work.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29261812
has comment: http://stackoverflow.com/comment/46730820
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46726733
answers question: http://stackoverflow.com/q/29261449
upvote count: 2
accepted answer of: http://stackoverflow.com/q/29261449
type: Answer
has comment: http://stackoverflow.com/comment/46729405
score: 2
has body: concat and sort are your friends var arrayCombined = (arrayShort.concat(arrayLong).sort(function(a,b) { return (a.id &gt; b.id) ? 1 : ((a.id &lt; b.id) ? -1 : 0); })).sort(function(a,b) { return (a.name &gt; b.name) ? 1 : ((a.name &lt; b.name) ? -1 : 0); });; console.log(arrayCombined); here is the output [ { id: 'A', name: 'first' }, { id: 'A', name: 'firstSub1' }, { id: 'A', name: 'firstSub2' }, { id: 'A', name: 'firstSub3' }, { id: 'B', name: 'second' }, { id: 'B', name: 'secondSub1' }, { id: 'B', name: 'secondSub2' }, { id: 'B', name: 'secondSub3' }, { id: 'C', name: 'third' }, { id: 'C', name: 'thirdSub1' }, { id: 'C', name: 'thirdSub2' }, { id: 'C', name: 'thirdSub3' } ]

http://stackoverflow.com/comment/46783738
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29292546
has text: yea; you could do it with socket.io.. but that's a lot of overhead just for "realtime" code updates. Pinging the server on a timeout seems sufficient (and cheaper resources-wise; you don't have to worry about loads of open socket connections or worry about load balancing them as you scale up..) Unless, of course, your app already uses socket.io. Then it makes more sense.

http://stackoverflow.com/comment/46664246
has text: Yeah, or Chosen : http://harvesthq.github.io/chosen/
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29228661

http://stackoverflow.com/comment/46913949
comment on: http://stackoverflow.com/a/29363154
type: Comment
has text: can you be more specific about what you mean with "not smooth"?
type: AnswerComment
score: 0

http://stackoverflow.com/q/29313747
has body: I've been trying to save an image from a UIWebView when you press and hold over a visible element that happens to be an image. I'm struggling to find out how to convert the UILongPressGestureRecognizer's touch points into the points needed for the Javascript to get the correct position. I'm thinking it has something to do with the webView's scrollView's content inset, but I'm not quite sure. I'd appreciate any help offered. Code: - (void)longPress:(UILongPressGestureRecognizer *)sender { if (sender.state == UIGestureRecognizerStateBegan) { CGPoint pt = [sender locationInView:self.webView]; CGPoint offset; offset.x = [[self.webView stringByEvaluatingJavaScriptFromString:@"window.pageXOffset"]integerValue]; offset.y = [[self.webView stringByEvaluatingJavaScriptFromString:@"window.pageYOffset"]integerValue]; CGSize windowSize; windowSize.width = [[self.webView stringByEvaluatingJavaScriptFromString:@"window.innerWidth"]integerValue]; windowSize.height = [[self.webView stringByEvaluatingJavaScriptFromString:@"window.innerHeight"]integerValue]; CGFloat f = windowSize.width / self.webView.frame.size.width; pt.x = (pt.x * f); pt.y = (pt.y - self.webView.scrollView.contentInset.top) * f; NSString *js = [NSString stringWithFormat:@"document.elementFromPoint(%f, %f).tagName", pt.x, pt.y]; NSString *tagName = [self.webView stringByEvaluatingJavaScriptFromString:js]; if (tagName &amp;&amp; [tagName caseInsensitiveCompare:@"IMG"] == NSOrderedSame) { NSString *imgURL = [NSString stringWithFormat:@"document.elementFromPoint(%f, %f).src", pt.x, pt.y]; NSString *urlToDownload = [self.webView stringByEvaluatingJavaScriptFromString:imgURL]; NSArray *validImageTypes = @[@".jpg",@".jpeg",@".gif",@".tif",@".tiff",@".ico",@".bmp",@".bmpf",@".cur",@".xbm",@".png"]; for (NSString *sub in validImageTypes) { if (urlToDownload.length &gt;= sub.length) { NSString *extension = [urlToDownload substringFromIndex:MAX(urlToDownload.length - sub.length, 0)]; if ([extension caseInsensitiveCompare:sub]…
type: Question
accepted answer: http://stackoverflow.com/a/29398098
type: AnsweredQuestion
tagged with: uigesturerecognizer
has answer: http://stackoverflow.com/a/29398098
score: 0
tagged with: ios
answer count: 1
tagged with: javascript
tagged with: uiwebview
tagged with: objective-c
has title: Converting touch points in UIWebView to save content

http://stackoverflow.com/a/29239591
type: Answer
answers question: http://stackoverflow.com/q/29239122
accepted answer of: http://stackoverflow.com/q/29239122
score: 0
type: AcceptedAnswer
has body: $(".link_forward").click(function() { /* ... */ $("#forward_one_dialog").keypress(function(e) { if(e.keyCode == $.ui.keyCode.ENTER) { forward_one(); } }); /* ... */ }); You can see here that every time .link_forward is clicked, keypress is called. This call to keypress adds a handler to the #forward_one_dialog element. So each time it is clicked, another handler is added on top of the existing. This is the cause of your issue. Move this call to keypress outside of the click handler so that it is only applied once. If it must be called only after opening the dialog, then create a boolean to track if it has already been called and ensure it is only called once.

http://stackoverflow.com/q/29250955
has body: I have a JSON return by a PHP request. The result is: {"serials": {"4": [{"serial":"15990"},{"serial":"16536"}], "16": [{"serial":"13841"}] } } Could you please explain me how to read each serial value to show them on html Kind regards
type: Question
tagged with: http://stackoverflow.com/tag/json
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/29251033
answer count: 2
tagged with: arrays
has answer: http://stackoverflow.com/a/29251156
tagged with: multidimensional-array
type: UnansweredQuestion
tagged with: php
has title: Read datas from JSON array on HTML using JAVASCRIPT

http://stackoverflow.com/comment/46844726
comment on: http://stackoverflow.com/q/29327325
has text: Please help me how to call angularjs from jquery i want to have both these in my webapplication
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29329500
type: AnsweredQuestion
has body: I am using the Selectboxit js plugin on select fields on my page. When the page loads there is a slight delay where the default select box shows before the selectboxit style is applied. Is it possible to hide the default select box from showing until the selectboxit style is applied, and if so which class would need to be targeted in css?
accepted answer: http://stackoverflow.com/a/29329561
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/29329561
answer count: 1
has title: Selectboxit Load Time
tagged with: select
type: Question

http://stackoverflow.com/a/29321843
type: Answer
accepted answer of: http://stackoverflow.com/q/29320762
has body: Figured it out. Here's how I modified those functions: function hideAnnotationPreview(){ document.getElementById("annotation_preview").hide(); document.getElementById("annotation_preview_title").hide(); var dialog = jQuery("#create_annotation_dialog"); dialog.css("margin-left", -1 * dialog.width() / 2); } function showAnnotationPreview(){ document.getElementById("annotation_preview").show(); document.getElementById("annotation_preview_title").show(); var dialog = jQuery("#create_annotation_dialog"); dialog.css("margin-left", -1 * dialog.width() / 2); }
score: 0
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29320762

http://stackoverflow.com/a/29286294
downvote count: 0
answers question: http://stackoverflow.com/q/29285656
has body: you should be able to check the event in your bind directly: if(event.touches){ //touchy } else{ //no touchy }
type: Answer
has comment: http://stackoverflow.com/comment/46771762
upvote count: 1
has comment: http://stackoverflow.com/comment/46772093
score: 1

http://stackoverflow.com/a/29265265
has comment: http://stackoverflow.com/comment/46868495
downvote count: 0
has body: Take a look at SqueakJS: SqueakJS executes Squeak in a web page without a plugin. It is a fully capable virtual machine implemented in pure JavaScript running unmodified Squeak images. Squeak is a modern implementation of Smalltalk, the original dynamic object-oriented programming environment. It runs bit-identically on virtually any platform, and now in the web browser, too. https://bertfreudenberg.github.io/SqueakJS/
has comment: http://stackoverflow.com/comment/46775927
type: Answer
score: 1
answers question: http://stackoverflow.com/q/29264911
upvote count: 1
has comment: http://stackoverflow.com/comment/46732478

http://stackoverflow.com/comment/46896964
comment on: http://stackoverflow.com/q/29355773
score: 0
type: Comment
type: QuestionComment
has text: these would be radio check boxes. @bloodyKnuckles everything is being done on the same html page

http://stackoverflow.com/q/29369877
has comment: http://stackoverflow.com/comment/46924135
tagged with: express
score: 0
tagged with: pug
has title: Where to attach d3 visualization scripts in a jade file in node/express
tagged with: d3.js
type: UnansweredQuestion
tagged with: node.js
answer count: 0
has body: I am learning d3 visualization library and I understand how to use it on html. However my requirement is to use the library in Jade. The following works when invoked as a html //File: server.js (node) app.engine('html', require('ejs').renderFile); response.render('playg.html'); //File: play.html D3.js Playground According to d3 documentation, I am supposed to add the following code on the console window in Chrome var circleRadii = [40, 20, 10]; var svgContainer = d3.select("body").append("svg") .attr("width", 200) .attr("height", 200); var circles = svgContainer.selectAll("circle") .data(circleRadii) .enter() .append("circle"); var circleAttributes = circles .attr("cx", 50) .attr("cy", 50) .attr("r", function (d) { return d; }) .style("fill", function(d) { var returnColor; if (d === 40) { returnColor = "green"; } else if (d === 20) { returnColor = "purple"; } else if (d === 10) { returnColor = "red"; } return returnColor; }); All this work perfectly and yield the svg concentric circles on the browser. I now decided to switch over to Jade as this is my requirement. The following code does not work. There are no errors either. Please help! //File: server.js (node) response.render('chartex'); //File: chartex.jade doctype html html(lang="en") head title HEllO script(src='d3/d3.min.js') link(rel="stylesheet", href="css/playground.css", type="text/css") body p Hey! script var circleRadii = [40, 20, 10]; var svgContainer = d3.select("body").append("svg") .attr("width", 200) .attr("height", 200); var circles = svgContainer.selectAll("circle") .data(circleRadii) .enter() .append("circle"); var circleAttributes = circles .attr("cx", 50) .attr("cy", 50) .attr("r", function (d) { return d; }) .style("fill", function(d) { var returnColor; if (d === 40) { returnColor = "green"; } else if (d === 20) { returnColor = "purple"; } else if (d === 10) { returnColor = "red"; } return returnColor; });
has comment: http://stackoverflow.com/comment/46924015
type: Question
tagged with: javascript

http://stackoverflow.com/comment/47459539
type: AnswerComment
comment on: http://stackoverflow.com/a/29351542
type: Comment
has text: @TrueBlueAussie Thanks for your insights. I've made some updates, but actually have a question of my own (bottom of answer). Wonder if I should post it. Found a similar question, but doesn't really answer this.
score: 0

http://stackoverflow.com/comment/46766054
score: 1
comment on: http://stackoverflow.com/q/29284122
type: QuestionComment
has text: Definitely don't do it in `Page_Load`, that violates the [DRY principle](http://en.wikipedia.org/wiki/Don't_repeat_yourself). You can use `<location>` elements in your web.config to require authorization to certain pages or directories in your site, as described [here](http://weblogs.asp.net/gurusarkar/setting-authorization-rules-for-a-particular-page-or-folder-in-web-config).
type: Comment

http://stackoverflow.com/q/29309172
has title: Javascript: On OnChange event passing array variable to another function
score: 0
has comment: http://stackoverflow.com/comment/46812322
has comment: http://stackoverflow.com/comment/46812812
has body: In one JavaScript function, I am declaring an array variable arr1, and when user changes a dropdown value, arr1 is passed to another function named nat(), which appends the value to that array. If the user selects another item from drop down, it should call this same function nat() and append that value to the same array. So arr1[0] = 2 and arr1[1] = 2 Currently the problem is this: when I pass an array variable while selecting the dropdown, it's sending the array as a string to function nat(). I've tried all the different combinations. function function1(){ var table = document.getElementById("device1"); new arr1=new Array(); var row1 = table.insertRow(1); var cell1= row1.innerHTML = " Select Group FG PG SG "; } function nat(arr1){ arr1[arr1.length]=2; alert ("Value: "+ arr1[0]); } In alert arr1[0] is coming as "Undefined".
type: UnansweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/46812261
has answer: http://stackoverflow.com/a/29309223
has comment: http://stackoverflow.com/comment/46812387
answer count: 1
tagged with: javascript

http://stackoverflow.com/q/29249626
score: 1
type: Question
has body: I am implementing reCaptcha in my website, but i could not validate recaptcha on form submit. The form is getting submitted even if the recaptcha is not clicked. How to check whether the captcha is valid/checked or not The code snippet is : submit cancel NOTE : We are not using php in the application.
linked to: http://stackoverflow.com/q/27450562
tagged with: validation
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/47546619
tagged with: recaptcha
answer count: 0
type: UnansweredQuestion
upvote count: 1
has title: Google reCaptcha validation on form submit

http://stackoverflow.com/comment/46883358
score: 0
type: Comment
type: QuestionComment
has text: because in the first one your appending a (g) to the data > .data ().append("g") ....., the second your appending a 'g' element to the actual SVG
comment on: http://stackoverflow.com/q/29348782

http://stackoverflow.com/q/29251545
downvote count: 0
favorite count: 0
has body: I have javascript that onclick shows and hides element defining style.display = "inherit"; And style.display = "none";.. ' Hide ' function also is running when ESC button is pressed.. Everything works fine in CHROME, OPERA etc.. except FIREFOX.. window.onload=function() { document.body.onkeyup = key_event; } function showDiv() { document.getElementById('PhotoFull').style.display = "inherit"; event.stopPropagation(); } function hideDiv() { var target = event.target || event.srcElement; if (event.currentTarget == target) { document.getElementById('PhotoFull').style.display = "none"; } } function key_event(e) { if (e.keyCode == 27) hideDiv(); } showDiv() works, but hideDiv doesn't.. HTML: SOME CONTENT Here is the JSFIDDLE: http://jsfiddle.net/5e6ww93h/2/ Thanks for attention
has title: javascript() onclick hide element - doesn't work in firefox
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29251611
has comment: http://stackoverflow.com/comment/46707428
upvote count: 2
possible better answer: http://stackoverflow.com/a/29252696
has answer: http://stackoverflow.com/a/29252696
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/46708703
answer count: 2
score: 2
has answer: http://stackoverflow.com/a/29251611

http://stackoverflow.com/comment/46698087
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29246269
has text: `js` at OP appear to detach , append to same parent element ? Not certain about expected results ?

http://stackoverflow.com/a/65104552
downvote count: 0
type: Answer
has body: TLDR: document.hidden: returns true if tab is open and is not at all visible. Opening another chrome window and covering the open tab would make it return true document.hasFocus(): returns true if the tab is the open tab and no other window has focus. Opening a chrome window would make that window have focus, so the open tab in the background, although visible, would return false
answers question: http://stackoverflow.com/q/29331979
upvote count: 7
score: 7
has comment: http://stackoverflow.com/comment/130560483

http://stackoverflow.com/comment/46720967
type: Comment
type: QuestionComment
has text: What is your javascript that is calling `draggable()`? I'm willing to bet it is `$('#Cell').draggable()`, right?
score: 0
comment on: http://stackoverflow.com/q/29259033

http://stackoverflow.com/comment/46697120
comment on: http://stackoverflow.com/q/29245758
has text: It could probably only be done through post which JavaScript cannot access.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46743669
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29271587
score: 0
has text: Assign height value to the css max-height property for those divs.

http://stackoverflow.com/comment/46692355
comment on: http://stackoverflow.com/q/29242548
score: 0
has text: I thought of it too. I will surely try that soon enough! Thanks.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46742911
score: 0
type: Comment
has text: I tried adding this, but i still have no change when the window is under 321px.
type: AnswerComment
comment on: http://stackoverflow.com/a/29270605

http://stackoverflow.com/q/29339305
has title: Game of life in JavaScript - using Table
tagged with: javascript
type: UnansweredQuestion
tagged with: jquery
has body: I finished coding Conway's Game of Life in JavaScript and HTML table. logic cells in a table will be assigned with unique id's and based on the id operations(based 4 rules) take place. You can find the working code at Codepen or i have put the code below. The thing is it works well with any number of rows and 9 columns and if more than 9 columns are given their wont be unique id's so it works in undesired manner. Query Is their a way where i can assign the whole table with unique id's. Code block tableInitialization is the initialization part. (function(){ $(document).ready(function(){ var column = "", appendRow = "", inc = 1, selectedCells = [], toRemoveClass = [], toAddClass = [], maxValue; var tableInitialization = function(noOfRow, noOfColumn){ for(var row=1; row&lt;=noOfRow; row++){ for(var col=1; col&lt;=noOfColumn; col++){ column += "&lt;td id =" + inc+col + "&gt; &lt;/td&gt;"; } appendRow += "&lt;tr&gt;"+column+"&lt;/tr&gt;"; column= ""; inc++; } $(".table").append(appendRow); }; $("#submit").click(function(data){ var noOfRow = parseInt($("#rowNo").val()); var noOfColumn = parseInt($("#columnNo").val()); maxValue = parseInt(noOfRow.toString() + noOfColumn.toString()); if(isNaN(noOfRow) || isNaN(noOfColumn)){ alert("Please enter number"); } else { tableInitialization(noOfRow, noOfColumn); $("#container").hide(); $("td").click( function(data){ selectedCells.push(parseInt(this.id)); $(this).addClass("valid"); }); } }); var checkAgain = function(selectedCells){ var check = 0, toBeReplaced = [], inArray = [], livingCell; var currentNumber = 0; var north, northEast, East, southEast, south, southWest, west, northWest; for(var i=0; i&lt;selectedCells.length; i++){ check = 0; currentNumber = parseInt(selectedCells[i]); if($("#"+(currentNumber)).hasClass("valid")){ livingCell = true; } else { livingCell = false; } if(currentNumber &gt; 0 &amp;&amp; currentNumber &lt; maxValue){ /*North*/ if((currentNumber-10) &gt; 0 &amp;&amp; (currentNumber-10) &lt; maxValue){ if($("…
tagged with: http://stackoverflow.com/tag/html
tagged with: conways-game-of-life
type: Question
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/29339888

http://stackoverflow.com/comment/46791236
type: AnswerComment
has text: I posted you already some referenced like [the demo](http://www.ok-soft-gmbh.com/jqGrid/SimpleLocalGridWithAddClass.htm) from [the answer](http://stackoverflow.com/a/6048865/315935). The code of `cellattr` can depend on `datatype` which you use and from the format of input data. You don't posted the information.
comment on: http://stackoverflow.com/a/29294673
type: Comment
score: 0

http://stackoverflow.com/q/29276147
type: Question
tagged with: c#
has body: I have a HTTP handler (ASHX) which I am calling from UI side using JQuery $.ajax() function. The following things need to happen in this call: A form data is created in UI to upload a file to Handler.ashx. The AJAX request type used is POST. In the Handler.ashx, to display the execution status on UI, I need to send messages to UI which I am doing using Response.Write() function and then I am doing a Response.Flush(). In the UI end, I am using XHR's "message" event listener to listen to this data sent from server (Server Sent Events - SSE). The problem is that this event listener is not working and no data is getting passed to UI as event listener is not getting called at all. Below is my JQuery code: importAjaxCall = $.ajax({ xhr: function () { var xhr = new window.XMLHttpRequest(); $('#progressBar').show(); xhr.upload.addEventListener("progress", function (evt) { if (evt.lengthComputable) { var percentComplete = Math.round((evt.loaded / evt.total) * 100); $('#percentageImportComplete').text('' + percentComplete + '%'); $('#importStatus').css('width', percentComplete + '%'); } }, false); xhr.addEventListener("progress", function (evt) { if (evt.lengthComputable) { var percentComplete = evt.loaded / evt.total; } }, false); //This method doesn't get called for the SSE's passed xhr.addEventListener("message", function (event) { //Some execution to be done here based upon the message being passed //I am just doing an alert call for now alert(event.data); }, false); return xhr; }, type: 'post', url: "Handler.ashx", data: formData, processData: false, contentType: false, success: function (data) { //Some code to show success status to user }); And here is my Handler.ashx code: public class Handler : IHttpHandler { public void ProcessRequest (HttpContext context) { HttpResponse Response = context.Response; //SSE Sent to show that the code execution started Response.Write("data: Code Execution Started"); Response.Flush(); /********* Code to perform some sanity checks presen…
has answer: http://stackoverflow.com/a/29316663
tagged with: javascript
tagged with: jquery
tagged with: ajax
answer count: 1
downvote count: 0
score: 1
tagged with: asp.net
favorite count: 0
type: UnansweredQuestion
has title: ASP.net, JavaScript/JQuery - Server Sent Events (SSE) not working with ASHX Handler
upvote count: 1

http://stackoverflow.com/q/29273740
answer count: 2
has answer: http://stackoverflow.com/a/29274064
downvote count: 0
has comment: http://stackoverflow.com/comment/46747026
favorite count: 0
has answer: http://stackoverflow.com/a/29273900
has title: Max-height and nanoscroller + AngularJS NgRepeat
tagged with: angularjs
upvote count: 2
tagged with: http://stackoverflow.com/tag/html
tagged with: css
possible better answer: http://stackoverflow.com/a/29273900
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46746951
accepted answer: http://stackoverflow.com/a/29274064
type: Question
tagged with: javascript
has body: I'm trying to make a div that expands to a max-height using nanoScroller and ngrepeat of angularjs, but I can't make it work, here is the plunkr: Plunkr. If you change the _Array length to 5 you will see what I am saying. The height of the div doesn't adjust to the content... it stays at max-height when it should be shrinking to fit. Here is the HTML code: Title Here {{ $index }} and the directive to use nanoScroller: angular.module('myApp', []) .directive('postRender', postRender); postRender.$inject = ['$timeout']; function postRender($timeout) { return { link: function ($scope, iElm, iAttrs, controller) { $timeout(function () { jQuery('.nano').nanoScroller({ preventPageScrolling: true }) }, 100); } } } and my SCSS: * { box-sizing: border-box; } body, html { height: 100%; } #console { margin: 0 auto; max-height: 500px; height: 100%; width: 330px; opacity: 0.9; color: #FFF; header { padding: 15px; background: none repeat scroll 0 0 rgba(21, 21, 21, 0.8); } section { overflow: auto; background-color: #333; height: 100%; ul { list-style: none; margin: 0; padding: 0; & div { padding: 15px 15px; } li { margin-bottom: 5px; width: 100%; background-color: red; padding: 15px; } } } }
tagged with: nanoscroller

http://stackoverflow.com/comment/46886996
comment on: http://stackoverflow.com/a/29350742
type: Comment
has text: thanks for your support but I am not trying to bind anything.
type: AnswerComment
score: 0

http://stackoverflow.com/q/29282103
has comment: http://stackoverflow.com/comment/46762301
has comment: http://stackoverflow.com/comment/46762057
type: UnansweredQuestion
tagged with: php
has answer: http://stackoverflow.com/a/29284589
score: 0
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/46762282
has comment: http://stackoverflow.com/comment/46762354
has comment: http://stackoverflow.com/comment/46766964
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/46762098
has title: PHP's json_decode returns empty string (not NULL)
answer count: 1
has comment: http://stackoverflow.com/comment/46763404
has body: I am sending a stringified JSON through AJAX from the client to the server. However, PHP is unable to decode it even though it seems to be properly structured to me. I've been through answers to similar questions, in most questions json_decode returns NULL which is not the case here, instead it returns an empty string. What Javascript sends: {"columns":{"l1":{"name":"Impressions"},"l2":{"name":"Clicks"}},"domain":"Media Performance"} What PHP prints out (same thing with escaped quotes): {\"columns\":{\"l1\":{\"name\":\"Impressions\"},\"l2\":{\"name\":\"Clicks\"}},\"domain\":\"Media Performance\"} Can anyone see the issue here? It seems pretty straightforward but json_decode keeps returning an empty string. My apologies for not posting the code. Here is the AJAX (str is the JS string given above): $.ajax({ type: "POST", url: base + "handlers/createreport.php", data: { str: str } }) And here is createreport.php, there's no processing whatsoever: $str = $_POST['str']; echo $str; //prints out the string given above with escaped quotes echo json_decode($str); //empty string

http://stackoverflow.com/q/29298031
has comment: http://stackoverflow.com/comment/46792236
has comment: http://stackoverflow.com/comment/46793611
tagged with: java
type: Question
has comment: http://stackoverflow.com/comment/46792983
has answer: http://stackoverflow.com/a/29298400
tagged with: session
has title: 302 Response for session management from ajax request
tagged with: javascript
has body: I am trying to manage a user session by making an ajax request to java code repeatedly function sendSessionKeepAliveRequest() { $.get('${URL}/sessionKeepAlive?nd=' + new Date().getTime()); } and java code (spring framework used) handling this request: @RequestMapping("/sessionKeepAlive") public String dummySessionKeepAlive(HttpServletResponse response, HttpServletRequest request) { PrintWriter writer = null; try { writer = response.getWriter(); } catch (IOException e) { logger.error(e.getMessage()); } if (writer != null) { response.setContentType("application/json"); // Sending an empty JSON response. Gson gson = new Gson(); writer.write(gson.toJson("")); } return null; } Now the issue is some times were are getting 302 Found instead of 200 OK which makes jsessionid change and session got time out.I have tested in on IE and FF and both of the browser have same behaviour. Code is deployed on IBM websphere v7.0 Please help or any direction.Please feel free if any more inputs are required or I need to modify my question. Kind Regards
tagged with: ajax
score: 0
tagged with: websphere-7
answer count: 2
has answer: http://stackoverflow.com/a/29299483
type: UnansweredQuestion

http://stackoverflow.com/comment/46822317
comment on: http://stackoverflow.com/a/29314866
score: 0
has text: I did not want to add active to production by default because, I want to hit a change event on button - on page load. The change event will update some text boxes. I did not want to repeat code for filling those text boxes on page load and on change.
type: Comment
type: AnswerComment

http://stackoverflow.com/a/29263396
answers question: http://stackoverflow.com/q/29263239
downvote count: 0
has comment: http://stackoverflow.com/comment/46730683
type: Answer
upvote count: 1
has body: When I see var prefixed with $ in javascript, it just usually means the variable is storing some element that is already wrapped in jQuery. It's just a coding convention some people do.
score: 1
has comment: http://stackoverflow.com/comment/46728900

http://stackoverflow.com/comment/46867540
score: 0
has text: Yes, I don't want anything displayed initially, only the select menus, then selecting an option from a drop down menu displays that content, the next selection of any menu's option, hides the previous and displays the selected option's content. I know this is a pain... I'm okay with a lot of code for now, this is just a personal project but I will implement what you have written along with others in the future.
type: Comment
comment on: http://stackoverflow.com/a/29339123
type: AnswerComment

http://stackoverflow.com/a/29244335
answers question: http://stackoverflow.com/q/29244038
score: 0
type: AcceptedAnswer
has body: Several problems: The slash when setting height and width is wrong (either is 960 divided by something or just 960) The for loop is wrong: it should be for (i = 0; i &lt; x * x; i++) And the css thing is not going to apply since there are no .block elements when executed. You should probably move it into newGrid
type: Answer
has comment: http://stackoverflow.com/comment/46741967
accepted answer of: http://stackoverflow.com/q/29244038

http://stackoverflow.com/comment/46712261
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/29254371
has text: How exactly your printing feature work? What happens when print button is clicked?

http://stackoverflow.com/q/29222662
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/46654255
accepted answer: http://stackoverflow.com/a/29222981
possible better answer: http://stackoverflow.com/a/29222743
tagged with: http://stackoverflow.com/tag/csv
has comment: http://stackoverflow.com/comment/46654054
has answer: http://stackoverflow.com/a/29222981
type: AnsweredQuestion
downvote count: 0
tagged with: d3.js
has comment: http://stackoverflow.com/comment/46654072
has comment: http://stackoverflow.com/comment/46654484
has body: I am still new to javascript and d3 . I am trying to find the best way to combine multiple csv external files into d3 then do something with it. Currently I am using script like this below for one file. d3.csv("file1.csv",funciton(error,data) { // do something } Is there a way that I can concatenate file1.csv + file2.csv + .. file9.csv into one file something similar to this .. in d3 ? d3.csv( concat("file1.csv","file2,csv",..file9.csv") ,function(error,data) { // do something }
type: Question
has answer: http://stackoverflow.com/a/29222743
score: 1
has title: What is the best way to combine multiple csv files data input using d3.csv in d3.json ?
tagged with: http://stackoverflow.com/tag/json
answer count: 2
upvote count: 1

http://stackoverflow.com/a/29288653
answers question: http://stackoverflow.com/q/29288247
score: 0
has comment: http://stackoverflow.com/comment/46775381
has comment: http://stackoverflow.com/comment/46774593
type: Answer
has body: You could use jQuery see example below: function keyPress(char) { jQuery.event.trigger({ type : 'keypress', which : char.charCodeAt(0) }); }
has comment: http://stackoverflow.com/comment/46774977

http://stackoverflow.com/q/29220986
type: AnsweredQuestion
score: 3
upvote count: 3
has answer: http://stackoverflow.com/a/29221071
tagged with: media-queries
has title: How to only use jquery .css() on a specific media query?
type: Question
has answer: http://stackoverflow.com/a/29221281
downvote count: 0
tagged with: javascript
tagged with: jquery
answer count: 3
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
accepted answer: http://stackoverflow.com/a/29221281
has body: When a user's browser has a width of less than 1160px, a media query is setup to collapse my site's right sidebar. They can get it back by clicking on a little arrow and then it will overlap the content (absolute positioning). Anyway, I used the following jQuery to achieve this: $('.right_sidebar_preview').on('click', function() { $('.right_sidebar_preview').css('display', 'none'); $('.right_sidebar').css('display', 'block'); }); $('.right_sidebar').on('click', function() { $('.right_sidebar_preview').css('display', 'block'); $('.right_sidebar').css('display', 'none'); }); So basically I already have the preview hidden when the browser is larger than 1160px and the sidebar is visible, in the media query I have it set up so when it's below 1160px, the sidebar becomes invisible and the "sidebar preview" is shown which users can click to make it bigger. CSS: .right_sidebar { width: 242px; height: 100%; background-color: #d8e1ef; float: right; position: relative; } .right_sidebar_preview { display: none; } @media(max-width:1160px) { .right_sidebar { position: absolute; right: 0; display: none; } .right_sidebar_preview { display: block; background-color: #d8e1ef; position: absolute; right: 0; width: 15px; height: 100%; } } My question is, when I use the code above, let's say we're in the less than 1160px media query, I'll open the sidebar then collapse it again, and when I stretch my browser out to go back, it also closed the sidebar on the greater than 1160px media query. So is there anyway I can use .css() (or an alternative method) to point at a specific media query?
possible better answer: http://stackoverflow.com/a/29221091
has answer: http://stackoverflow.com/a/29221091
tagged with: css

http://stackoverflow.com/a/29281734
downvote count: 0
type: Answer
score: 1
upvote count: 1
has body: Looking through the source code, this does not seem to be possible. Of note is that there are no options for sticking text in the toggle button, and the only transclude tag does not relate to the toggle button either. You can of course fork their code and do it yourself, but I dont think its worth it.
answers question: http://stackoverflow.com/q/29280945

http://stackoverflow.com/q/29239350
tagged with: javascript
has body: I'm trying to create an interactive contents page using a D3 force graph. I'd wanted the link distance to be restricted either by a fixed value or a function but I have tried both and do not seem to have any effect. Any help would be greatly appreciated, I'm new to this and I'm trying a lot of different things out so I apologise for my messy code and any mistakes. Thanks in advance var w = 1000, h = 800; var palette = { "lightgray": "#819090", "gray": "#708284", "mediumgray": "#536870", "darkgray": "#475B62", "darkblue": "#0A2933", "darkerblue": "#042029", "paleryellow": "#FCF4DC", "white" :"#FFF" } d3.selection.prototype.moveToFront = function() { return this.each(function(){ this.parentNode.appendChild(this); }); }; var nodes = [ //Project Names {name: "POSSESSIVE"}, //0 {name: "SIMULACRUM"}, //1 {name: "VOTEBOX"},//2 {name: "GREAT EXPECTATIONS"},//3 {name: "SCIENCE BOOK"},//4 //Connectors {name: "Identity", target: [0,1]}, {name: "Production", target: [0, 1]}, {name: "Signification", target: [0, 1]}, {name: "Democracy", target: [1, 2]}, {name: "Citizenship", target: [1, 2]}, {name: "Media", target: [4, 3]}, {name: "Fatality", target: [0, 3]}, {name: "Consumption", target: [0, 3]}, //Possessive {name: "Language", target: [0]}, {name: "Permanence", target: [0]}, {name: "Simulation", target: [0]}, //Simulacrum {name: "Urban", target: [1]}, {name: "Nature", target: [1]}, {name: "Artificial", target: [1]}, {name: "Landscape", target: [1]}, //Life of a digital vote {name: "Live Event", target: [2]}, {name: "Platform", target: [2]}, {name: "Acessibility", target: [2]}, {name: "Visualization", target: [2]}, {name: "Information", target: [2]}, {name: "Transparency", target: [2]}, //Great Expectations {name: "Curation", target: [3]}, {name: "Obsolescence", target: [3]}, {name: "Death", target: [3]}, //Science Book {name: "Structure", target: [4]}, {name: "Object", target: [4]}, {name: "Book", target: [4]}, {name: "Editorial", target: [4]}, {name: "Quantum Physics", target:…
has title: Setting linkDistance in D3 has no effect
has answer: http://stackoverflow.com/a/29248011
has comment: http://stackoverflow.com/comment/46730975
tagged with: d3.js
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46686405
has comment: http://stackoverflow.com/comment/46730460
type: Question
score: 0
answer count: 1

http://stackoverflow.com/comment/46783069
score: 0
has text: Have you tried putting some parentheses in `( nmbStr === arguments.parameters[0] && comp === arguments.parameters[1] )` so that the parser would clearly separate the operands, like this `( ( nmbStr === arguments.parameters[0] ) && ( comp === arguments.parameters[1] ) )`
comment on: http://stackoverflow.com/q/29292807
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46717811
type: Comment
type: AnswerComment
has text: dint understand could you be more specific?
comment on: http://stackoverflow.com/a/29257086
score: 0

http://stackoverflow.com/comment/46805333
comment on: http://stackoverflow.com/a/29302851
type: AnswerComment
type: Comment
score: 1
has text: This is the way of doing regular async calls in javascript. What I am asking is a different thing. Any way, thank you very much for the answer.

http://stackoverflow.com/q/29333863
possible better answer: http://stackoverflow.com/a/29334044
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46856754
accepted answer: http://stackoverflow.com/a/29334059
type: Question
has answer: http://stackoverflow.com/a/29334059
tagged with: javascript
has answer: http://stackoverflow.com/a/29334044
has comment: http://stackoverflow.com/comment/46856768
score: 0
answer count: 2
has body: Here is my goal: When the user hovers a div of class "item" another div of class "menu" should appear overlaying the "item" div. The position of the "menu" div should be relative to the "item" div. When the user unhovers the item "div" the menu div should disappear. When the user mouses over the "menu" div the "menu" div the "menu" div should not disappear so that user can click a button in it. I am looking for a JavaScript and CSS solution. If you can help but you can only post a JQuery solution I will still appreciate it but I will have to translate it to straight JavaScript. So far I have tried: To make the "hover" div an absolutely positioned child of the document.body. This works for positioning, but hovering the "hover" div unhovers the "item" div and I don't know how to figure out that the new hovered div is the "hover" div. To make the "hover" div a absolutely or fixed positioned child of the "item" div. This places the "hover" div underneath the "item" div and style.top seems to have no effect on the "hover" div". To make the "hover" div a relatively positioned child of the "item" div. This places the "hover" div within the "item" div and increases the size of the "hover" div, which I don't want. Thank you for your help with this! Here is a JSFiddle that is a starting point for a solution https://jsfiddle.net/ypn5f1ng/ HTML content item 1 item 2 more content CSS body { background:green; } #content { z-index:100; width:500px; position:absolute; left:0px; right:0px; margin-left:auto; margin-right:auto; background:white; margin-top:10px; background:lightblue; padding:5px; } div.item { background:pink; margin:5px} div.hover { background:yellow; height:15px; width:100px; z-index:101; position:fixed } JavaScript function getElem(event) { if (!event) { event = window.event; } var elem = null; if (event.target) { elem = event.target; } else if (event.srcElement) { elem = event.srcElement; } if (elem && elem.nodeType == 3) { elem = elem.parentNode; } return elem; } …
has title: Trouble overlaying one div with another with JavaScript & CSS
tagged with: css

http://stackoverflow.com/q/29355654
has body: I have angular Timepicker I want to bind date from json object but my problem this is error Timepicker directive: "ng-model" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing an RFC2822 or ISO 8601 date.angular.js:11607 (anonymous function) the string in user.until = "2015-03-27T16:30:00" I have using moment js to convert to time I debug it is outputing 12:30 pm just I want to ask how can I bind time in json to Timepicker. I do't get it I' converting to date but Timepicker is complaining about it is not date object ? var app = angular.module('userUpdate'); EditUserController = function($scope, $modalInstance,user){ $scope.model = { personID: user.personID, until:user.until, status: 0, message: user.message } $scope.dt = moment.utc(user.until).local().format('MM/DD/YYYY'); $scope.tm = moment.utc(user.until).local().format('hh:mm a'); $scope.defaultStatus = '1'; $scope.clear = function(){ $scope.dt = null; }; $scope.open = function($event){ $event.preventDefault(); $event.stopPropagation(); $scope.opened = true; }; $scope.dateOptions = { formatYear: 'yy', startingDay: 1 }; //Timepicker Settings //$scope.time = new Date(); //$scope.currenTime = function () { // var time = new Date(); // var h = time.getHours(); // var m = time.getMinutes(); // if (m &lt; 10) { // m = '0' + m; // } // time = h + ':' + m; // $scope.tm = time; //} $scope.hstep = 1; $scope.mstep = 15; $scope.ismeridian = true; $scope.toggleMode = function(){ $scope.ismeridian = !$scope.ismeridian; }; var formatDateTimeData = function (date, time) { var until = ''; var dd = date.getDate(); var mm = date.getMonth() + 1; //January is 0! var yyyy = date.getFullYear(); var h = time.getHours(); var m = time.getMinutes(); if (dd &lt; 10) { dd = '0' + dd; } if (mm &lt; 10) { mm = '0' + mm; } if (m &lt; 10) { m = '0' + m; } until = mm + '/' + dd + '/' + yyyy + ' ' + h + ':' + m; return until; } $scope.ok = function (model){ var untilTemp = formatDateTimeData($scope.dt, …
type: Question
upvote count: 4
has title: convert from datetime to time and bind it to angular Timepicker?
downvote count: 0
tagged with: javascript
score: 4
has answer: http://stackoverflow.com/a/29356369
accepted answer: http://stackoverflow.com/a/29356369
answer count: 1
favorite count: 0
tagged with: angularjs
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json

http://stackoverflow.com/a/38415863
downvote count: 0
type: Answer
upvote count: 6
score: 6
has body: You can try doing the following npm uninstall nodemon npm install nodemon
answers question: http://stackoverflow.com/q/29323982

http://stackoverflow.com/q/29238651
upvote count: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29238859
score: 1
has answer: http://stackoverflow.com/a/29238889
type: Question
possible better answer: http://stackoverflow.com/a/29238859
accepted answer: http://stackoverflow.com/a/29238889
downvote count: 0
tagged with: javascript
tagged with: jquery
has title: Fade out animation with JQuery
has body: I have the following code that attempts to demonstrate and animate a dequeuing procedure of an aircraft takeoff queue. For every takeoff (or dequeue) which happens after 5 seconds, a box is supposed to fade out until all have faded out after the takeoff queue is empty. My problem is how do i link each plane dequeue to a box such that for every dequeue a box fades out? Here is the code snipet function airport() { this.takeoff_queue = ["KQA", "ERJ", "TOM", "DHL", "ETH"]; this.landing_queue = ["RWA", "KLM", "PAN", "FLY540", "JAMBO"]; console.log('DEPARTING', this.landing_queue, 'ARRIVING', this.takeoff_queue); } var departure = new airport(); var takeoff_interval = setInterval(function depart() { $("#box1").fadeOut(); if (departure.takeoff_queue.length != 0) { departure.takeoff_queue.shift() $("#box1").fadeOut(); console.log('DEPARTING', departure.takeoff_queue); } else { clearInterval(takeoff_interval); console.log('TAKEOFFS COMPLETE'); } }, 5000); SIMPLE SIMULATED TAKEOFF If this is a wrong approach kindly explain it to me.
has answer: http://stackoverflow.com/a/29239137
answer count: 3
favorite count: 0

http://stackoverflow.com/comment/46745106
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29272021
has text: It doesn't mean to change dynamically (mostly when `autoSize` is set to `false`). You may need to run the `$.fancybox.resize()` method programmatically every time you change the content length.

http://stackoverflow.com/a/67978228
type: Answer
score: 2
upvote count: 2
has body: For anyone stumbling across this question (most likely my future self) looking to "unescape" a previously escaped Javascript special characters, here's a hacky way to do it: newString = JSON.stringify(string).slice(1,-1) However this seems to only work for certain characters, like \t, \n, \r, \f, \b, \\, etc. To explain myself better, in the case of tabs, this will convert a tab character back into literal/raw string that is \t.
has comment: http://stackoverflow.com/comment/120151670
downvote count: 0
answers question: http://stackoverflow.com/q/29290039

http://stackoverflow.com/a/29324723
type: Answer
answers question: http://stackoverflow.com/q/29324120
has body: The History API has functions that allow you to manipulate browsing history on your site. Hash routes are a way of managing site content without refreshing the page. When the url hash updates, new content is loaded onto the page. There are libraries to handle this and they make use of the History API. Some libraries you can look into are described here.
score: 0

http://stackoverflow.com/comment/56261213
score: 0
comment on: http://stackoverflow.com/a/34241971
type: Comment
has text: @Popnoodles I didn't read or test the method of the asked person. Just started from the accepted answer and that won't work for me. Read second answer and its comments. Tried that idea in a simple form and it works for me. Your code is also works fine for me.
type: AnswerComment

http://stackoverflow.com/a/29349796
downvote count: 0
score: 1
type: Answer
answers question: http://stackoverflow.com/q/29348797
accepted answer of: http://stackoverflow.com/q/29348797
upvote count: 1
has body: as per documentation $broadcast is method of scope $scope.$broadcast(name, args); so in your case it should be $scope.$broadcast('datepickerUpdate', dtBODStartValue, dtBODStopValue); and then for listeners in child scopes $scope.$on('datapickerUpdate', function (event, dtBODStartValue, dtBODStopValue) { //do stuff on change })
has comment: http://stackoverflow.com/comment/46921362
type: AcceptedAnswer

http://stackoverflow.com/comment/46825847
has text: http://demo.tecmerch.com/pidilite/scroll/ see the effects here
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29314408
score: 0

http://stackoverflow.com/q/29352975
has comment: http://stackoverflow.com/comment/46891296
score: 1
possible better answer: http://stackoverflow.com/a/29360062
type: Question
has comment: http://stackoverflow.com/comment/46891373
has answer: http://stackoverflow.com/a/29360062
has comment: http://stackoverflow.com/comment/46891947
tagged with: javascript
has comment: http://stackoverflow.com/comment/46891336
has answer: http://stackoverflow.com/a/29354919
has comment: http://stackoverflow.com/comment/46891414
tagged with: ajax
has comment: http://stackoverflow.com/comment/46904293
answer count: 2
has comment: http://stackoverflow.com/comment/46891330
has comment: http://stackoverflow.com/comment/46891553
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
has comment: http://stackoverflow.com/comment/46895168
accepted answer: http://stackoverflow.com/a/29354919
favorite count: 0
has body: i have a script that i have written. But the not equal to operator is not working correctly if((ajax.responseText) != "success"){ alert("nice oneagain"); alert(ajax.responseText); _(submiit).style.display = "block"; _(status).innerHTML = ''; } else { alert("Complaint escalated"); _(status).innerHTML = 'Complaint escalated'; } here even though the server returns ajax.responseText = success then also it never goes in the else. and only the if part is executed evry time.
upvote count: 1
has title: javascript != not working
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46892032

http://stackoverflow.com/a/29304703
answers question: http://stackoverflow.com/q/29303456
score: 52
has body: If I understand your questions correctly, you want to render a different element in case of an "onClick" event. This is a great use case for react states. Take the following example React.createClass({ getInitialState : function() { return { showMe : false }; }, onClick : function() { this.setState({ showMe : true} ); }, render : function() { if(this.state.showMe) { return (&lt;div&gt; one div &lt;/div&gt;); } else { return (&lt;a onClick={this.onClick}&gt; press me &lt;/a&gt;); } } }) This will change the components state, and makes React render the div instead of the a-tag. When a components state is altered(using the setState method), React calculates if it needs to rerender itself, and in that case, which parts of the component it needs to rerender. More about states https://facebook.github.io/react/docs/interactivity-and-dynamic-uis.html
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/83434267
downvote count: 0
has comment: http://stackoverflow.com/comment/46804663
has comment: http://stackoverflow.com/comment/99582782
upvote count: 52
has comment: http://stackoverflow.com/comment/85110408
type: Answer
has comment: http://stackoverflow.com/comment/129754988
has comment: http://stackoverflow.com/comment/81100722
accepted answer of: http://stackoverflow.com/q/29303456

http://stackoverflow.com/q/29329394
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/29330852
type: Question
upvote count: 1
tagged with: firefox
tagged with: javascript
has body: I'm trying to develop my first Firefox add-on, which should open specified url in current tab after clicking toolabar button. It should also be able to modify headers, cookies, referrer, etc before making this request. I found this tutorial https://developer.mozilla.org/en-US/docs/Creating_Sandboxed_HTTP_Connections, about modyfing request headers, but it doesn't seem to work for me. My addon main.js looks like this: var {ToggleButton}= require("sdk/ui/button/toggle"); var { Cc, Cu, Ci, components } = require('chrome'); var channel; function StreamListener(function(data){console.log(data);}) { this.mCallbackFunc = aCallbackFunc; } StreamListener.prototype = { //code pasted from 'HTTP notifications' from previously mentioned link }; // get an listener var listener = new StreamListener(function(data){console.log(data)}); var button = ToggleButton({ id: "refresh-page", label: "Refresh Page", icon: { "16": "./icon-16.png", "32": "./icon-32.png", "64": "./icon-64.png" }, onChange: function (state) { if (state.checked === true) { // the IO service var ioService = Cc["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOService); // create an nsIURI var uri = ioService.newURI('http://google.com', null, null); var channel = ioService.newChannelFromURI(uri); channel.notificationCallbacks = listener; channel.open(listener, null); } } }); After clicking button in firefox toolbar nothing happens. No errors are thrown in console. I think I'm missing something here but not sure what. I've tried to add created channel to XMLHttpRequest (https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/Using_XMLHttpRequest), but it doesn't work for url's external to server. Any suggestions?
tagged with: firefox-addon
answer count: 1
tagged with: firefox-addon-sdk
favorite count: 0
has title: Firefox Add-on - How to make http request
accepted answer: http://stackoverflow.com/a/29330852
type: AnsweredQuestion

http://stackoverflow.com/q/29319176
has answer: http://stackoverflow.com/a/29319294
type: UnansweredQuestion
has title: Is it possible to display multi-page, multi-layer TIFF images using javascript in a webpage?
has body: We are thinking about a library which can get a TIFF image and display each page (frame) of TIFF file in a separate canvas element. Also some pages might have layers. We want to be able to show/hide layers at user's will. It is not necessary to tell me the complete solution or library. Just tell me if it is possible to accomplish all these requirements by javascript or we need to get help of server-side programming?
type: Question
tagged with: tiff
tagged with: libtiff.net
tagged with: libtiff
tagged with: javascript
score: 0
answer count: 1

http://stackoverflow.com/comment/46751301
type: AnswerComment
comment on: http://stackoverflow.com/a/29242146
has text: If there's no left or right child, you are either between rows (which you said should be ignored), *or* you're in the top or bottom padding of the parent, which I assume should *not* be ignored. So it may need a prepend or an append. I'll update when I get the chance.
score: 0
type: Comment

http://stackoverflow.com/comment/46699757
type: Comment
type: QuestionComment
score: 0
has text: @jfriend00 I was trying to use plain js since it's the fastest method; but I think you're right, the best solution would be to totally avoid saving reference to a variable; I think unique class names might work.
comment on: http://stackoverflow.com/q/29246874

http://stackoverflow.com/comment/46656909
type: Comment
type: QuestionComment
has text: If this is Java then you need to remove JavaScript. They're not the same.
score: 0
comment on: http://stackoverflow.com/q/29224281

http://stackoverflow.com/q/29330464
answer count: 1
downvote count: 0
linked to: http://stackoverflow.com/q/28808463
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29331094
score: 1
type: Question
tagged with: testing
tagged with: protractor
has body: After working with Eclipse/JUnit/webdriver for few months, and now, trying to come up to speed with Protractor, I am forced to fall back and submit some basic questions for you java/js experts. Why in Protractor, do I have to invoke direct reference of "browser.driver." when testing Non-Angular web pages versus in Eclipse/Junit/weddriver I just instantiate the webdriver object? In Protractor, when referencing the "browser.driver" directly, do I always have to use the element finder method "browser.driver.findElement"(by." or is the method overloaded such that "browser.driver.element(By." will also work?
tagged with: javascript
has title: Protractor basic fundamental questions - low on the learning curve
linked to: http://stackoverflow.com/q/20927652
upvote count: 1

http://stackoverflow.com/a/29323874
upvote count: 1
answers question: http://stackoverflow.com/q/29323788
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46838714
has body: You have typo error in your function. You are alerting nrField and appending nrFields with s at end. But if you need count for iteration or something simmilar, you can use arrays: &lt;input type="text" name="values[]" /&gt; and then in PHP foreach($_POST["values"] as $value) ...
type: Answer
accepted answer of: http://stackoverflow.com/q/29323788
score: 1

http://stackoverflow.com/comment/46782911
type: QuestionComment
has text: show what you didn't get right
score: 2
comment on: http://stackoverflow.com/q/29293272
type: Comment

http://stackoverflow.com/comment/46665397
type: Comment
type: QuestionComment
has text: can you post your code?
comment on: http://stackoverflow.com/q/29229325
score: 0

http://stackoverflow.com/q/29258825
type: Question
has comment: http://stackoverflow.com/comment/46721097
tagged with: javascript
has comment: http://stackoverflow.com/comment/46720601
has comment: http://stackoverflow.com/comment/46719945
has comment: http://stackoverflow.com/comment/46720090
has body: I cannot figure out why my ng-click inside of my directive will not fire the fooControls clickTest. Why is clickTest not firing and logging to the console? is there a better way of doing this? Directive app.directive('fooList', function () { return { restrict: 'E', templateUrl: './app/views/fooList.html', scope: { obj: "=" }, controller: 'fooController', controllerAs: 'b' }; }); Controler app.controller('fooController', ['$scope', function ($scope) { $scope.obj = []; $scope.ClickTest = function (num) {console.log(num);}; }]); HTML ClickTest EDIT The above html is a copy paste of foo-list. The full html is <html
has answer: http://stackoverflow.com/a/29259072
answer count: 1
downvote count: 0
favorite count: 0
has title: ng-click in angular directive
tagged with: angularjs
has comment: http://stackoverflow.com/comment/46720133
has comment: http://stackoverflow.com/comment/46719987
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46720612
accepted answer: http://stackoverflow.com/a/29259072
score: 1
upvote count: 1

http://stackoverflow.com/comment/46912446
comment on: http://stackoverflow.com/a/29362251
score: 0
type: AnswerComment
has text: it wont validate the spaces. It appears as though there is more than 10 digits
type: Comment

http://stackoverflow.com/q/29296920
answer count: 1
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29296958
upvote count: 0
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/46790085
type: Question
score: -2
has title: How to add data to the child node of a json
tagged with: javascript
has body: I want to add data {"address" : "http://ebay.com"} to the second child of this json data i.e in the bracket with the data "api" : "Ebay". How can I do that with jQuery? {"Amazon":[ {"price":"19,799.00","delivery":"FREE","api":"Amazon"}, {"price":"29,999","delivery":"FREE","api":"Ebay"} ] }
tagged with: jquery
downvote count: 2

http://stackoverflow.com/q/29254570
has body: I have the following kind of array. [{ tag:'a', href:"#", title:"test", children:[{ tag:"div", id:"nested-image", children:[{ tag:"img", src:"image.jpg" }] }] }] }] For rendering it I am using Underscore templates. I have used text plugin for loading templates I am using following function for rendering. compiledTpl: function(tpl, data) { var data = data || {}; var compiled = _.template(tpl); return compiled(data); }, From one of the templates I'm calling following function like this: Inside the template I am iterating data object: <%_.each(data),function(d){%> d.a d.b <%if(d.children.length>0){%> //call same template itself <%= _.compiledTpl(tpl1,{'data':data} ) %>//not sure how to do that <%}%> <%}%> If the function calls itself and everything is fine then it will not iterate through all the children of first level as in only one hierarchy will be there. It will not iterate through all children. I want to achieve something like this http://techdive.in/java/recursive-templates-underscore-js
has comment: http://stackoverflow.com/comment/46712818
has comment: http://stackoverflow.com/comment/46713408
favorite count: 0
tagged with: backbone.js
has title: Recursive Underscore template
answer count: 0
upvote count: 2
type: UnansweredQuestion
tagged with: underscore.js-templating
tagged with: recursion
score: 2
tagged with: underscore.js
linked to: http://stackoverflow.com/q/8067291
has comment: http://stackoverflow.com/comment/46712568
type: Question
has comment: http://stackoverflow.com/comment/46715032
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/46714886

http://stackoverflow.com/q/29253858
score: 2
has answer: http://stackoverflow.com/a/29253859
tagged with: source-maps
type: Question
tagged with: debugging
has title: How do I make eval'd javascript code accessible to the debugger?
tagged with: javascript
has body: I just spent a long time trying to figure out how to use source maps to get eval'd javascript code to show up in the debugger where I could put break points on it and stuff. I kept seeing hints that it was possible, but most of what I read had to do with source mapping minified code or CoffeeScript, and generally it all seemed impossibly complicated. But then I stumbled on the answer, which was ridiculously easy, and I'll answer my own question below.
tagged with: eval
downvote count: 0
answer count: 1
favorite count: 0
upvote count: 2
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/13129904

http://stackoverflow.com/a/29330912
has comment: http://stackoverflow.com/comment/46853721
score: 1
downvote count: 0
has body: Try this: HTML Calculator add mul div sub Calculate!! Result will be displayed here: JavaScript function calculate() { var first = document.getElementById('txt1').value; var sec = document.getElementById('txt2').value; var result; if (document.getElementById('rad1').checked) { result = parseInt(first) + parseInt(sec); } else if (document.getElementById('rad2').checked) { result = first * sec; } else if (document.getElementById('rad3').checked) { result = first / sec; } else if (document.getElementById('rad4').checked) { result = first - sec; } var resultP = document.getElementById('resultP'); resultP.innerHTML = result; return false;//this will prevent the default action }
has comment: http://stackoverflow.com/comment/46851199
has comment: http://stackoverflow.com/comment/46851099
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/29330786

http://stackoverflow.com/a/29336094
has body: Loop over each radio element and assign a click event handler. The radio button click handler first clears the mixbox, then loops over each radio element and puts checked radio button values in the mixbox. &lt;div id="rads"&gt; &lt;input type="radio" value="one" /&gt;1 &lt;input type="radio" value="two" /&gt;2 &lt;input type="radio" value="three" /&gt;3 &lt;/div&gt; &lt;div id="mixbox"&gt;&lt;/div&gt; &lt;script&gt; var rads = document.querySelectorAll('#rads input[type=radio]'); var mixbox = document.getElementById('mixbox'); Array.prototype.forEach.call(rads, function (elem) { elem.addEventListener('click', function (evt) { mixbox.innerHTML = ''; Array.prototype.forEach.call(rads, function (ele) { if ( ele.checked ) { mixbox.innerHTML += ele.value + '&lt;br&gt;'; } }) }) }) &lt;/script&gt; JSFiddle
type: Answer
answers question: http://stackoverflow.com/q/29335770
score: 0

http://stackoverflow.com/q/29221181
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/29221733
upvote count: 2
has answer: http://stackoverflow.com/a/29221223
has comment: http://stackoverflow.com/comment/46651295
score: 2
possible better answer: http://stackoverflow.com/a/29221733
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29221223
type: Question
has title: Output first 2 words from a string that contains 3 words
has body: I want to display the first 2 words from a string that contains 3 words (for example). I have the following code from my question. JSFIDDLE of code by zgood. $('select option').each(function(i, item){ var arr = $(item).text().split(' '); $(item).text(arr[0]); }); The code is working fine but displays only first word. I tried to make it display 2 words but I had no luck. So, if anyone can tell how to make it displays the first 2 words of my string, that would be great.
tagged with: arrays
tagged with: javascript
answer count: 2
linked to: http://stackoverflow.com/q/29112005
downvote count: 0

http://stackoverflow.com/comment/46707629
score: 0
type: Comment
type: QuestionComment
has text: @Molly as you are new to SO please consider [ask]
comment on: http://stackoverflow.com/q/29247162

http://stackoverflow.com/q/29346670
answer count: 2
downvote count: 0
has answer: http://stackoverflow.com/a/29346929
favorite count: 0
tagged with: angularjs
has body: What could be the best possible condition to check and display if the image path is undefined in AngularJS. I have tried like this: HTML: &lt;div ng-src="{{imageUrl}}" == "null" || src="img/avatar.png" &gt; CONTROLLER: $scope.imageUrl="125.178.1.127/uploads/image" +$scope.imageName; If $scope.imageName is undefined I have to load/show the default image img/avatar.png
has comment: http://stackoverflow.com/comment/46879304
type: AnsweredQuestion
has title: Replace with default image if image not found -angularjs
accepted answer: http://stackoverflow.com/a/29346929
linked to: http://stackoverflow.com/q/16310298
type: Question
has answer: http://stackoverflow.com/a/36962765
tagged with: javascript
score: 4
tagged with: image
possible better answer: http://stackoverflow.com/a/36962765
has comment: http://stackoverflow.com/comment/46879345
upvote count: 4

http://stackoverflow.com/comment/49463069
comment on: http://stackoverflow.com/a/29254531
has text: This is the correct answer for anyone authoring in ES 2015+. [It’s been standardized now.](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-additional-properties-of-the-object.prototype-object)
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/46849484
type: QuestionComment
has text: Guys the problem isn't the functions itself, is passing parameters to the class.
score: 0
comment on: http://stackoverflow.com/q/29329940
type: Comment

http://stackoverflow.com/comment/46884751
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29349536
has text: Yes, I found that in another tutorial on how to implement Isotope. But that one might be wrong...

file
type: Tag
tags question: http://stackoverflow.com/q/29224214
tags question: http://stackoverflow.com/q/29269681
tags question: http://stackoverflow.com/q/29267736
tag name: file
tags question: http://stackoverflow.com/q/29319433
tags question: http://stackoverflow.com/q/29223560
tags question: http://stackoverflow.com/q/29228641

magento
tags question: http://stackoverflow.com/q/29247520
tags question: http://stackoverflow.com/q/29272748
tags question: http://stackoverflow.com/q/29343096
tags question: http://stackoverflow.com/q/29274536
tags question: http://stackoverflow.com/q/29367566
tags question: http://stackoverflow.com/q/29269918
tag name: magento
tags question: http://stackoverflow.com/q/29373317
type: Tag
tags question: http://stackoverflow.com/q/29250942
tags question: http://stackoverflow.com/q/29249606

http://stackoverflow.com/q/29259235
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29259448
has comment: http://stackoverflow.com/comment/46720824
has comment: http://stackoverflow.com/comment/46721521
tagged with: forms
possible better answer: http://stackoverflow.com/a/29259459
type: Question
has title: Showing or Hiding a form(s) on radio button selection
has comment: http://stackoverflow.com/comment/46721124
has answer: http://stackoverflow.com/a/29259459
has comment: http://stackoverflow.com/comment/46720979
has comment: http://stackoverflow.com/comment/46727557
downvote count: 0
has comment: http://stackoverflow.com/comment/46725088
tagged with: javascript
has comment: http://stackoverflow.com/comment/46724695
has comment: http://stackoverflow.com/comment/46727762
favorite count: 0
accepted answer: http://stackoverflow.com/a/29259448
has comment: http://stackoverflow.com/comment/46727991
has answer: http://stackoverflow.com/a/29259993
answer count: 3
has comment: http://stackoverflow.com/comment/46727340
tagged with: http://stackoverflow.com/tag/html
score: 1
has body: I am working on a question and answer site and there is something that is troubling me. I have a page where the candidates can attempt for a test based on the subject in which they are majoring. So, when a candidate selects a subject, the form (in which the questions are) should be visible and all other forms should be hidden (I have multiple forms in one page). This section should be the size of that form (like I am using an iframe, I have noticed that even if keep one form visible, the page still consumes space as if all other form were visible). By default I have a div block with some contents in it. Here is my code : Questions Mathematics Physics Chemistry Biology Some contents 1. What is the formula for force Option 1 Option 2 Option 3 Option 4 1. What is the formula for force Option 1 Option 2 Option 3 Option 4 1. What is the formula for force Option 1 Option 2 Option 3 Option 4 1. What is the formula for force Option 1 Option 2 Option 3 Option 4 I know it can be done using javascript but I am not quite sure how do I do it, I have tried something: But it does not seem to work and I am really confused.
has comment: http://stackoverflow.com/comment/46723828
has comment: http://stackoverflow.com/comment/46720820
has comment: http://stackoverflow.com/comment/46721012
upvote count: 1

http://stackoverflow.com/a/29262155
accepted answer of: http://stackoverflow.com/q/29255547
type: AcceptedAnswer
downvote count: 0
upvote count: 2
type: Answer
score: 2
answers question: http://stackoverflow.com/q/29255547
has body: Have you tried applying a class to the text and only selecting those ones for removal? e.g. barChart.append("text") .attr('class','label') .text(function(d) { return d; }) then g.selectAll(".label").remove(); Incidentally, if not all of the elements are being deleted between updates, then instead of removing all of the elements, have you considered using enter() and exit() to bind the new data to the existing elements and only remove the elements that are changing? EDIT Like this: function bars(dataset) { var bar = g.selectAll(".bar").data(dataset); bar.exit().remove(); bar.enter().append("rect").attr("class", "bar"); bar .attr("x", function(d, i) { return i * 30 + 100; }) .attr("y", function(d) { return (height - 130) - d * 4;}) .attr("width", 25) .attr("height", function(d) { return d * 4; }); var label = g.selectAll(".label").data(dataset); label.exit().remove(); label.enter().append("text").attr("class", "label"); label .text(function(d) { return d; }) .attr("x", function(d, i) { return i * 30 + 103; }) .attr("y", function(d) { return (height - 130) - d/10 - 5;}) .attr("font-family", "sans-serif") .attr("font-size", "10px") .attr("fill", "darkgray"); }
has comment: http://stackoverflow.com/comment/46740142

http://stackoverflow.com/comment/46840714
has text: I use & before writing code. but not work it.
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29324924

http://stackoverflow.com/a/29252437
answers question: http://stackoverflow.com/q/29252202
type: AcceptedAnswer
upvote count: 3
type: Answer
downvote count: 0
score: 3
accepted answer of: http://stackoverflow.com/q/29252202
has body: You need to have a round method in this case and a special case for &lt; 2001 function r1(num) { if (num &lt;= 2000) { return 1; } return Math.ceil((num - 2000) / 1000) * .5 + 1 } test(1, 1); test(1999, 1); test(2000, 1); test(2001, 1.5); test(2500, 1.5); test(3000, 1.5); test(3001, 2); function test(num, result) { console.log(num, r1(num), r1(num) == result) } For the second case function r2(num) { return Math.ceil(num / 32) } test(1, 1); test(31, 1); test(32, 1); test(33, 2); test(64, 2); test(65, 3); test(97, 4); function test(num, result) { console.log(num, r2(num), r2(num) == result) }

http://stackoverflow.com/q/29271587
tagged with: http://stackoverflow.com/tag/html
answer count: 4
has answer: http://stackoverflow.com/a/29271648
favorite count: 0
has answer: http://stackoverflow.com/a/29272864
has body: Is it possible 1 div into 2 separate div's with equal height using with jQuery? Its dynamic content, so we don't know the exact height of the content. First find the outer div height and divide by 2 that outer div height(Using jQuery) Second insert two child div's along with outer div (Using jQuery) I already tried this below code:(Its word count method, but now I need content height method) Example: If outer div height is 100px, I will divide two inner divs with 50px(inner1) and 50px(inner2) height. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. to Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, …
has title: 1 div into 2 separate div's with equal height using with jQuery?
upvote count: 2
type: UnansweredQuestion
downvote count: 2
tagged with: css
has answer: http://stackoverflow.com/a/29274646
has comment: http://stackoverflow.com/comment/46743668
has comment: http://stackoverflow.com/comment/46744650
type: Question
has answer: http://stackoverflow.com/a/29273198
has comment: http://stackoverflow.com/comment/46743672
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46743669
linked to: http://stackoverflow.com/q/15161385
score: 0

http://stackoverflow.com/a/29303242
type: Answer
downvote count: 0
score: 1
has body: Try selecting second input by value $("input[value=paypal_ipn]").prop("checked", false);
answers question: http://stackoverflow.com/q/29303008
upvote count: 1

http://stackoverflow.com/comment/46891204
type: QuestionComment
has text: You are using very old version of Angular and AngularUI. Pretty sure this is the problem.
score: 2
comment on: http://stackoverflow.com/q/29352886
type: Comment

http://stackoverflow.com/a/29247871
has body: You can load webpage this way: NSString* htmlString= @" "; [self.webview loadHTMLString:htmlString baseURL:nil]; and then you can call any javascript function like this: [self.webview stringByEvaluatingJavaScriptFromString:@"func()"];
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29227619

http://stackoverflow.com/q/29238375
score: 0
has comment: http://stackoverflow.com/comment/46689375
answer count: 1
tagged with: javascript
tagged with: c3
type: UnansweredQuestion
has body: I'm using c3.js which is a "D3-based reusable chart library." I have also created my own legend for a donut chart with a pie chart inside. I want to link the legend and charts so that if I click a legend item, it'll trigger animation on both the legend div and the corresponding path element on the donut/pie chart, or vice versa (clicking on the pie/donut path will trigger animation on both). I know you can set onclick event listeners for the c3 items, but without any id I can't identify the corresponding legend div. Also, if I set a click handler on the legend divs, I won't know the corresponding path and I also don't know how to trigger c3's built in click animations. EDIT: I found that you can trigger a selected state (http://c3js.org/reference.html#api-select) but you must pass it an id. On my charts, there are no id's to pass in. Is there a way to set custom id's for each data point?
has title: C3 Trigger animation and assign id to paths
has answer: http://stackoverflow.com/a/29238711
tagged with: jquery
has comment: http://stackoverflow.com/comment/46688827
has comment: http://stackoverflow.com/comment/46683229
type: Question
tagged with: d3.js
tagged with: c3.js

http://stackoverflow.com/a/29359982
has body: &lt;script&gt; var form = $('#search'); var input = $('#search-keyword'); var results = $('#results'); $(document).ready(function() { $("#myBtn").on('click', function() { var symbol = $("#search-keyword").val(); var resultedData = $.getJSON("http://dev.markitondemand.com/Api/v2/quote/jsonp?symbol=" + symbol + "&amp;callback=?", function(info) { return info; }); var resultDiv = document.getElementById("results"); resultDiv.innerHTML += resultedData; }); }); &lt;/script&gt;
answers question: http://stackoverflow.com/q/29359399
score: 0
type: Answer

http://stackoverflow.com/comment/46844756
comment on: http://stackoverflow.com/q/29327365
has text: @SaiAshwin you need to be more specific as to _what's not working_ as in the fiddle, when you click on the button the value `Go!` gets set to the input!
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/a/29367909
accepted answer of: http://stackoverflow.com/q/29367267
answers question: http://stackoverflow.com/q/29367267
type: Answer
has body: Starting with version 4.3.2 jqGrid supports jQuery Events together with callbacks. At the time I spend many my time to create the corresponding pull request which was merge to the main code of jqGrid. Later in free jqGrid I changed internal code of jqGrid so that practically every callback have the corresponding jQuery event. The events are very important if you need to write common actions (common callbacks) which need be done on every grid of your project. Only using the events one can write jqGrid plugin which don't reserves any callbacks. The usage of events is very easy. It's important to understand that you can bind the events before jqGrid is created. It's especially important to do with events jqGridBeforeInitGrid (exist only in free jqGrid), jqGridInitGrid, jqGridGridComplete, jqGridAfterGridComplete, jqGridLoadComplete, jqGridAfterLoadComplete. I would recommend you to read the answer which describes the differences between gridComplete and loadComplete. I personally use almost only loadComplete, but the choice of the callback depend on your exact requirements. Let us you really need to use common gridComplete. Then you have choice to define some action after gridComplete used in the grid or before it. Depend on the choice you should use jqGridGridComplete or jqGridAfterGridComplete event. Let us jqGridAfterGridComplete is what you need. Then the code can looks as the following $("#grid0").bind("jqGridAfterGridComplete", function () { // the event handler will be executed AFTER gridComplete ... }); $("#grid0").jqGrid({ // common options which you need pager: "#pager0", gridComplete:function() { var $self = $(this), p = $self.jqGrid("getGridParam"), pager0Center = $(p.pager + "_center"); //$("#pager0_center"); ... } }); The above code will work in both jqGrid (starting with version 4.3.2) and free jqGrid. If you would need to use an event which have options, like jqGridAfterLoadComplete then you should add first additional Event parameter and use the typica…
has comment: http://stackoverflow.com/comment/46919338
has comment: http://stackoverflow.com/comment/46919591
upvote count: 2
has comment: http://stackoverflow.com/comment/46921168
score: 2
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/29329807
accepted answer of: http://stackoverflow.com/q/29329792
has body: nav is not id in your case, but a tag name. In this case, use: var e = document.getElementsByTagName(id)[0]; Or, more flexible solution: var e = document.querySelector(id); (also, as it's not id, you probably want to replace id parameter with tag, but that's just cosmetic :) )
answers question: http://stackoverflow.com/q/29329792
type: Answer
has comment: http://stackoverflow.com/comment/46849307
type: AcceptedAnswer
score: 0
has comment: http://stackoverflow.com/comment/46849371
has comment: http://stackoverflow.com/comment/46849291

http://stackoverflow.com/q/29344996
has comment: http://stackoverflow.com/comment/46876132
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
type: UnansweredQuestion
tagged with: css
tagged with: safari
score: 1
has answer: http://stackoverflow.com/a/29345229
upvote count: 1
has title: Open link on new tab not work on IE7-8 and safari all versions?
has body: Open link on new tab not work on IE7-8 and safari all versions ? can i use javascript , jquery to do thst ? CLICK HERE!! CLICK HERE!!
type: Question
downvote count: 0
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/29295018
answers question: http://stackoverflow.com/q/29294953
has comment: http://stackoverflow.com/comment/46786957
type: Answer
has comment: http://stackoverflow.com/comment/46786862
has body: You need to use Jquery for this var array = { 'x': { a: 'aaa', c: 'xxx' }, 'y': { b: 'bbb', d: 'yyy' } }; Use Jquery here $.post( '/herp.php', array, function(d) { // process response here });
has comment: http://stackoverflow.com/comment/46786224
score: 0
has comment: http://stackoverflow.com/comment/46786832
upvote count: 1
downvote count: 1

http://stackoverflow.com/comment/46723989
type: AnswerComment
has text: "the actual html I use is in the code I provided"...not really it's not. To help much more we'd need HTML such as the demo code I provide with base `ul / li` etc and internal elements applied dynamically"...just a demo is all we need.
type: Comment
comment on: http://stackoverflow.com/a/29259782
score: 0

http://stackoverflow.com/a/56596063
has body: I had similar situation but with single file. The problem was that the path of component had letter in different case instead of letters in directory path. Directory: components/UI/fields/ ERROR: (incorrect case of "F" in "Fields") import PrivacyField from 'components/UI/Fields/PrivacyField'; ... CORRECT: import PrivacyField from 'components/UI/fields/PrivacyField'; ...
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29292492

http://stackoverflow.com/q/29244741
type: Question
upvote count: 0
tagged with: javascript
linked to: http://stackoverflow.com/q/27551708
score: -1
answer count: 2
has comment: http://stackoverflow.com/comment/46695453
has body: I checked this question, but it wasn't very helpful because they're using ng-repeat differently. This is also not helpful. I have a form: &lt;label ng-repeat="option in options"&gt; &lt;input type="radio" ng-model="myObject.value" ng-value="option.key"&gt; &lt;/label&gt; My angular controller: options = { key: 'Option 1' val: 'Value 1' } $scope.myObject = { value: 'default option' } I would like this to set a default radio option. What's happening is that the last option in list is set as the default no matter what I try. I'm sure I don't understand why that is, so here I am. How do I set a default radio option and what's wrong with my current configuration? Thanks for your help.
has answer: http://stackoverflow.com/a/29245588
favorite count: 0
linked to: http://stackoverflow.com/q/25389701
has comment: http://stackoverflow.com/comment/46695269
tagged with: angularjs
has answer: http://stackoverflow.com/a/29245068
type: UnansweredQuestion
has title: Angular: How to use ngRepeat and set a default radio button option?
tagged with: forms
downvote count: 1

http://stackoverflow.com/q/29268989
downvote count: 0
score: 2
type: AnsweredQuestion
has title: Get text from div, add some more text, save as variable
has answer: http://stackoverflow.com/a/29269144
type: Question
upvote count: 2
has comment: http://stackoverflow.com/comment/46739678
has answer: http://stackoverflow.com/a/29269061
has answer: http://stackoverflow.com/a/29269021
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29269021
tagged with: jquery
favorite count: 0
has body: Here's what I've got: Something Then later: var 5popup= $('#fivearea').text(); This makes 5popup = "Something". However, I want to add some more text to what's in the div and save that as a variable. Psuedo-code: var 5popup= $('#fivearea').text()+"some additional text"; What's the correct way to do this?
answer count: 3
possible better answer: http://stackoverflow.com/a/29269144
linked to: http://stackoverflow.com/q/14504791

http://stackoverflow.com/comment/55711151
type: Comment
comment on: http://stackoverflow.com/a/29303629
score: 2
has text: For any googlers, it's worth checking out that github link; there are some suggestions on it (so possibly a solution for you).
type: AnswerComment

http://stackoverflow.com/comment/61975972
score: 1
comment on: http://stackoverflow.com/a/29318951
type: AnswerComment
type: Comment
has text: this question is being asked a lot, so far this is the working solution i have found, +1 for that :)

http://stackoverflow.com/comment/46745066
type: QuestionComment
has text: Javascript `window.onscroll` could be used for this but if you have something in place preventing a scroll then I don't think it will work. *Not 100% sure as I haven't locked the scroll and attempted to listen for scroll events* I would recommend displaying more relevant source code and your attempts.
comment on: http://stackoverflow.com/q/29272380
score: 0
type: Comment

http://stackoverflow.com/q/29259287
has answer: http://stackoverflow.com/a/33669316
tagged with: javascript
answer count: 2
tagged with: semantic-mediawiki
downvote count: 0
favorite count: 0
has title: Easiest way to run page-specific JavaScript on MediaWiki and/or SMW
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/13613379
has body: I have a MediaWiki up and running, and I added SemanticMediaWiki to be able to do some more stuff. Now I want the data that I added using SMW to generate some fancy graphics using JavaScript. My problem is as follows. I can't find much in the way of information how to embed JavaScript in MediaWiki. In my case, all I need is a way to call a JavaScript, that picks up an array from the ask array (SMW), take that data to generate some boxes with links and throw some CSS at it. So far I haven't even figured out a way of running it (other than throwing it in common.js, which isn't awfully helpful).
tagged with: mediawiki
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/55087904
has answer: http://stackoverflow.com/a/29904142
type: Question

http://stackoverflow.com/a/29229185
has body: Updated your Fiddle. Initially, you were only selecting the siblings (implies all under one parent). But you need to select across parents and hence siblings would not work. Instead you have to use a generic identifier - .clicked in this case. Just change the following line: var siblings = ($(this).siblings()); to: var siblings = $('.clicked');
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29229108
answers question: http://stackoverflow.com/q/29229108
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/a/29243927
has comment: http://stackoverflow.com/comment/46694615
type: Answer
answers question: http://stackoverflow.com/q/29243831
upvote count: 3
has body: That's what nodeValue does according to the specification, it returns this Comment - content of the comment Document - null DocumentFragment - null DocumentType - null Element - null NamedNodeMap - null EntityReference - null Notation - null ProcessingInstruction - entire content excluding the target Text - content of the text node Note that it returns null for anything but comments, textNodes and processing instruction, for all other node types null is explicitly returned. To get the text content of an Element node, use textContent (innerText for older IE), to get the HTML of an Element node, use innerHTML
score: 3
downvote count: 0

http://stackoverflow.com/a/29230596
has body: You need to make sure that you have your Client ID Mode set correctly, or the emitted text box will probably not have an ID of "txt". https://msdn.microsoft.com/en-us/library/system.web.ui.control.clientidmode%28v=vs.110%29.aspx &lt;asp:TextBox ID="txt" runat="server" ClientIDMode="Static" &gt;&lt;/asp:TextBox&gt; Another approach is to use CSS classes which can be very useful for re-use. &lt;asp:TextBox ID="txt" runat="server" CssClass="numbers-only" &gt;&lt;/asp:TextBox&gt; And your jQuery selector would be: $("input.numbers-only").on("paste", function(){ // do your stuff here });
upvote count: 1
type: Answer
has comment: http://stackoverflow.com/comment/46673086
downvote count: 0
has comment: http://stackoverflow.com/comment/46668205
answers question: http://stackoverflow.com/q/29230254
score: 1

http://stackoverflow.com/comment/46687561
comment on: http://stackoverflow.com/a/29221169
score: 0
type: AnswerComment
has text: Thank you for taking time answering my questions, I have better understanding now.
type: Comment

http://stackoverflow.com/comment/46776845
type: Comment
has text: No problem. :) This has burned me before as well.
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/29289786

http://stackoverflow.com/comment/46915005
comment on: http://stackoverflow.com/q/29365677
score: 0
type: Comment
type: QuestionComment
has text: did you use OnClientClick="showalertmsg();"

http://stackoverflow.com/comment/46714055
score: 0
comment on: http://stackoverflow.com/a/29233252
type: Comment
has text: I have replaced the code as suggested and now the validation gone through for slides but the same issue has occured for BulletNavigator (`jssor.slider.js:3325`) and ArrowNavigator (`jssor.slider.js:3363`). After replacing the navigator styles too with this suggested code the slider rendered with out any errors but the navigators are not visible. The navigators are generated with `Display:none` in style definition. The generated html code has been posted here with.
type: AnswerComment

http://stackoverflow.com/q/29291952
possible better answer: http://stackoverflow.com/a/29797676
has answer: http://stackoverflow.com/a/29797676
tagged with: javascript
tagged with: jquery
score: 22
tagged with: ajax
accepted answer: http://stackoverflow.com/a/29292309
has body: I got a problem I am submitting a simple form that has a small data and when I checked in the console tab the URL of ajax seems to be working but after the ajax was processed it will alert an error and it is redirected to my homepage and from the console tab I have this weird error: Uncaught exception: out of memory In my ajax I have this simple code only: $("#add-comment").on('click', function() { var id = $('input[name=\'review_id\']').val(); var customer_id = $('input[name=\'customer_id\']').val(); var $comment = $('textarea[name=\'user_comment\']').val(); var sample = "test"; $.ajax({ url: 'index.php?route=product/product/writeSubComment', type: 'post', dataType: 'json', data: { text: sample }, beforeSend: function() { }, success: function(data) { console.log(data.test); }, error: function() { alert('ERROR!!!'); } }); }); In my PHP controller I have this function public function writeSubComment() { $json = array(); $json['test'] = $this-&gt;request-&gt;post['text']; $this-&gt;response-&gt;addHeader('Content-Type: application/json'); $this-&gt;response-&gt;setOutput(json_encode($json)); }
answer count: 4
favorite count: 0
has answer: http://stackoverflow.com/a/29292309
has title: uncaught exception: out of memory in Ajax Process
has answer: http://stackoverflow.com/a/37540911
tagged with: php
upvote count: 22
type: AnsweredQuestion
downvote count: 0
has answer: http://stackoverflow.com/a/30084494
has comment: http://stackoverflow.com/comment/49496203
type: Question

http://stackoverflow.com/comment/46775017
type: AnswerComment
has text: Sure. I'll edit the question and post it as separate one by tomorrow. Right now time to sleep. It's too late here.. :)
type: Comment
comment on: http://stackoverflow.com/a/29288451
score: 0

http://stackoverflow.com/q/29218481
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29218559
has answer: http://stackoverflow.com/a/29218711
type: Question
has title: How to add onload to HTML without it being part of the body tag?
tagged with: javascript
has body: I was told to add a tag being generated in Joomla. I just need to add the onload=... between the body tags. Is there a way to add the onload=... by itself or must it be part of the tag? Thanks!
score: 0
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29218768
tagged with: joomla3.0

http://stackoverflow.com/comment/46907089
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29302619
type: Comment
has text: When i click on the tructure: Europe, all lines below Europe are also shown at same time. Becouse there is this line addClass. The point is, that those classes are already declared, when i click on Tab1 it's class active, when on Europe it's Class open, when on country (Italy) it's Class selected. Look at picture: http://postimg.org/image/6bun0m1hb/ So i need that king of script which will recognize which class is declared by click on Tag/Region/Country and wil write the result like this: Active (Tab1) Open (Europe) Selected (Italy)

http://stackoverflow.com/comment/46741660
score: 0
type: AnswerComment
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/73822/discussion-between-mohamedrias-and-break-the-law).
type: Comment
comment on: http://stackoverflow.com/a/29269904

http://stackoverflow.com/comment/46683276
score: 0
type: Comment
type: QuestionComment
has text: What you want is `if (document.getElementById("someNumber").value == 2005) { document.write("2005") } else { document.write("not 2005") }` , or what?
comment on: http://stackoverflow.com/q/29238224

http://stackoverflow.com/q/29284966
has answer: http://stackoverflow.com/a/29285743
type: Question
tagged with: http://stackoverflow.com/tag/html
has title: How to have a static onclick parameter in HTML button?
upvote count: 2
answer count: 2
has body: How can I dynamically create HTML buttons, in Javascript, that when users click on them they call a same function, but with a different parameters. For example: function a(param){console.log(param);}; for (int i = 0; i &lt; 10; i++) { button = document.createElement('button'); button.onclick = &lt;place a function that when button is clicked, calls function a with parameter i&gt;; } Can someone give me a clue?
has answer: http://stackoverflow.com/a/29285018
accepted answer: http://stackoverflow.com/a/29285018
score: 2
type: AnsweredQuestion
downvote count: 0
tagged with: javascript
possible better answer: http://stackoverflow.com/a/29285743
favorite count: 0

angularjs-filter
tags question: http://stackoverflow.com/q/29334909
tags question: http://stackoverflow.com/q/29250861
type: Tag
tag name: angularjs-filter
tags question: http://stackoverflow.com/q/29363155
tags question: http://stackoverflow.com/q/29282082

http://stackoverflow.com/q/29346582
has body: I think I am missing something very simple here. My onClick event in map function isnt firing. I put a test hello function to test it out and it still doesnt seem to work. Any help will be appreciated. window.PredictionContainer = React.createClass({ mixins:[PredictionWatchMixin(predictionItems)], **hello: function(){ alert("aasd"); },** render:function(){ var self = this; var matches = this.state.matches.map(function(match,i) { return ( Some dummy text here ) }); return ( <PredictionTabs tournament_id={this.props.tournament_id} onClick={this.updateEvent}/> {matches} ); } );
type: Question
has comment: http://stackoverflow.com/comment/46885642
has comment: http://stackoverflow.com/comment/46879924
score: 0
tagged with: reactjs
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/46885294
has answer: http://stackoverflow.com/a/35933347
type: UnansweredQuestion
has title: onClick event in map function of ReactJS not firing
tagged with: onclick

http://stackoverflow.com/comment/58079629
comment on: http://stackoverflow.com/a/29372163
has text: Also, the book I was going through at the time was an O'Reilly book "Programming Chrome Apps" http://shop.oreilly.com/product/0636920033776.do
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/46817374
type: QuestionComment
type: Comment
has text: first try to do it by yourself there are lots of guides on the internet, and when you have trouble with the code show us the code you've written.. here are some pretty good courses http://www.codecademy.com/ https://www.codeschool.com/
score: 0
comment on: http://stackoverflow.com/q/29311764

http://stackoverflow.com/a/29348676
has comment: http://stackoverflow.com/comment/46921039
type: Answer
upvote count: 4
downvote count: 0
has body: function randomDate(){ var startDate = new Date(2012,0,1).getTime(); var endDate = new Date(2015,0,1).getTime(); var spaces = (endDate - startDate); var timestamp = Math.round(Math.random() * spaces); timestamp += startDate; return new Date(timestamp); } function formatDate(date){ var month = randomDate().getMonth(); var day = randomDate().getDate(); month = month &lt; 10 ? '0' + month : month; day = day &lt; 10 ? '0' + day : day; return String(date.getFullYear()) + month + day; } console.log( randomDate() ); console.log( randomDate() ); console.log( randomDate() ); console.log( randomDate() ); //UPDATE: added with date format console.log( formatDate(randomDate()) );
accepted answer of: http://stackoverflow.com/q/29348433
answers question: http://stackoverflow.com/q/29348433
has comment: http://stackoverflow.com/comment/46884565
score: 4
has comment: http://stackoverflow.com/comment/46883619
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46884079

http://stackoverflow.com/comment/63225488
comment on: http://stackoverflow.com/a/29558893
type: AnswerComment
has text: @spinningarrow and I have hated this assign every dependency on the controller because it violates keeping scopes as small as necessary.
type: Comment
score: 2

http://stackoverflow.com/q/29318187
has answer: http://stackoverflow.com/a/29318258
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29318392
upvote count: 1
type: Question
has body: I have tried to remove an event handler with .off(), but it does not work. I want to remove all event handlers from one certain input: &lt;input type="file" id="file_upload" name="file_upload" size="50" /&gt; Here is what I have tried: $('#form').on('keyup change', ':input', function() { registerChange(); }); $('#form input[name=file_upload]').off(); $('#file_upload').off();
possible better answer: http://stackoverflow.com/a/29318237
tagged with: javascript
has answer: http://stackoverflow.com/a/29318237
has title: jQuery Problems with removing event handler with .off()
answer count: 3
has answer: http://stackoverflow.com/a/29318392
downvote count: 0
score: 1
tagged with: event-handling
tagged with: jquery
favorite count: 0

http://stackoverflow.com/comment/46835539
has text: Uhm, if Firefox does this by default, wouldn't the solution simply be to do nothing ?
comment on: http://stackoverflow.com/q/29322250
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29320474
favorite count: 0
has comment: http://stackoverflow.com/comment/46832336
has comment: http://stackoverflow.com/comment/46832435
has answer: http://stackoverflow.com/a/29320639
has comment: http://stackoverflow.com/comment/46832490
accepted answer: http://stackoverflow.com/a/29320583
score: -1
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29320639
downvote count: 1
type: Question
tagged with: object
has comment: http://stackoverflow.com/comment/46832344
has title: Using query URL in the form
has answer: http://stackoverflow.com/a/29320505
has answer: http://stackoverflow.com/a/29320583
answer count: 3
upvote count: 0
tagged with: javascript
has body: I am practicing on how to query url. But i could not get my expected output. Here is my code: Form 1: Save Value First Name: Form 2: Display First Name: So when i clicked submit button it will go to form 2 and will display the value that i typed in the form 1. Thank you for your help!

http://stackoverflow.com/comment/46734525
type: QuestionComment
comment on: http://stackoverflow.com/q/29266347
score: 0
has text: Since both languages have specifications that provide well-defined sets of reserved words (the ES5 specification covers 'strict' as well) it is as simple as `{reserved_js} - {reserved_java}`, trivial to do with many programs (I'd use LINQPad) once the sets are loaded. As such, I'm not really sure where this question is going.
type: Comment

http://stackoverflow.com/comment/46720409
comment on: http://stackoverflow.com/a/29258906
type: Comment
has text: Now remember to include jQuery in your project!
score: 0
type: AnswerComment

http://stackoverflow.com/q/29266883
accepted answer: http://stackoverflow.com/a/29267146
tagged with: javascript
score: 0
answer count: 1
has body: I don't think this is possible, but hey you never know. I'm curious if this is possible to do in common languages. My examples will be in JavaScript, but I'd be curious to know if this can be done in Python, PHP, Java, etc. Let's say there are two functions. var printX = function(x){ checkX(x, this); console.log(x); } var checkX = function(x, caller){ if (x &gt; 10){ caller.return; } } printX(5); //Prints 5 printX(15); //Doesn't print anything Obviously there are much better ways of expressing this, I'd just like to know if the concept is possible.
tagged with: return
tagged with: python
tagged with: php
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46735462
tagged with: stack
type: Question
has title: Can you call a function that returns in the context of the caller?
has answer: http://stackoverflow.com/a/29267146

http://stackoverflow.com/q/29333353
tagged with: php
type: AnsweredQuestion
upvote count: 0
accepted answer: http://stackoverflow.com/a/29335599
type: Question
has body: For this project, I'm pulling data from a database and inputting this data in the Google Maps API script. In this database, I have latitude and longitude values. I am inputting these values in the marker function of Google Maps, and having it loop this function according to the amount of items in the array. Here is the code NOTE: THE LATITUDE AND LONGITUDE VALUES YOU SEE ARE BEING PULLED FROM AN ARRAY IN PHP, I DON'T HAVE THAT CODE LISTED. I MERELY JUST POSTED THE SOURCE CODE FROM THE WEBSITE. var map= new google.maps.Map(document.getElementById("googleMap"), mapProp); var js_lats = ["41.047398","40.736641","40.816628","43.000000"]; var js_longs = ["-73.700974","-74.149620","-74.076141","-70.099998"]; var js_description = ["Come by and chill out, grab a snack, and watch some Netflix in this cozy dorm room in Big Haus.","Come check out the Red Bulls take on another MLS team!","Come check out the Giants and the Jets at this sports complex!","TEST"]; var i; for (i = 0; i &lt; js_lats.length; i++) { //document.write(js_lats.length); var marker = new google.maps.Marker({ position:new google.maps.LatLng(parseFloat(js_lats[i]),parseFloat(js_longs[i])) }); } marker.setMap(map); var infowindow = new google.maps.InfoWindow({ content: js_description[0] }); google.maps.event.addListener(marker, 'mouseover', function() { infowindow.open(map.this); }); google.maps.event.addListener(marker, 'mouseout', function() { infowindow.close(); }); infowindow.open(map,marker); } As you can see, it is pulling multiple values into the latitude and longitude arrays. And we are looping the marker function according to the amount of items in the array. However, it is not working and only showing one marker on the google map. Any help would be appreciated.
tagged with: google-maps
has answer: http://stackoverflow.com/a/29335599
tagged with: arrays
tagged with: javascript
score: -1
has title: Looping through markers in Google Maps API according to length of array in PHP
answer count: 1
downvote count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/46859538

http://stackoverflow.com/comment/46836897
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29321269
has text: Or better yet, this: membersList.innerHTML += '' + members[i].memberFirstName + ' ' + members[i].memberLastName + ' ' + members[i].memberEmail + ' ';

http://stackoverflow.com/a/29218532
has comment: http://stackoverflow.com/comment/46648051
score: 0
has comment: http://stackoverflow.com/comment/46647749
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29218478
type: Answer
has comment: http://stackoverflow.com/comment/46647573
has body: Because there are javascript interpreters on nearly every consumer device/computer/browser out there. If you make a new language, you normally have to compile it to machine code or ensure that users have your language runtime installed. Compile-to-JS languages sidestep this by compiling down to a language that already has the capability of running on billions of machines. This means that day-one someone can code in your language, and have it runnable almost anywhere.
answers question: http://stackoverflow.com/q/29218478

http://stackoverflow.com/q/29270938
has answer: http://stackoverflow.com/a/29271017
has comment: http://stackoverflow.com/comment/46742516
type: Question
possible better answer: http://stackoverflow.com/a/29270995
has answer: http://stackoverflow.com/a/29270998
has comment: http://stackoverflow.com/comment/46743001
has title: Can't get value from $scope from Jquery to Angular?
has answer: http://stackoverflow.com/a/29270995
tagged with: javascript
tagged with: jquery
score: 0
accepted answer: http://stackoverflow.com/a/29270998
has body: Hello Guys I am learner in AngularJS. I have problem with this. I want to ask you why it doesn't show me data to HTML page. When I press F12, it doesn't show me any errors...Why I can't set data for variable $scope=students ? Could someone explain to me why ? Thanks a lot :) ID Name University Gender {{student.id}} {{student.name}} {{student.university}} {{student.gender}}
tagged with: angularjs
answer count: 4
has answer: http://stackoverflow.com/a/29270997
type: AnsweredQuestion

http://stackoverflow.com/a/29225576
has body: There are multiple ways One is to use attribute starts with selector - it will be better if you can enhance this with a element selector like $('div[id^="task-title-modal-"]') if all the elements are divs $('[id^="task-title-modal-"]').editable({}) Another is to use a class like editable to all those elements then use a class selector $('.editable').editable({})
type: AcceptedAnswer
downvote count: 0
score: 1
type: Answer
answers question: http://stackoverflow.com/q/29225552
upvote count: 1
accepted answer of: http://stackoverflow.com/q/29225552
has comment: http://stackoverflow.com/comment/46659534

http://stackoverflow.com/q/29304909
favorite count: 0
has comment: http://stackoverflow.com/comment/46805284
has comment: http://stackoverflow.com/comment/46804355
has comment: http://stackoverflow.com/comment/46805581
has answer: http://stackoverflow.com/a/29305055
linked to: http://stackoverflow.com/q/3966678
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29305062
has comment: http://stackoverflow.com/comment/46804530
has comment: http://stackoverflow.com/comment/46804453
upvote count: 1
has comment: http://stackoverflow.com/comment/46804321
has body: Imagine you have the following three jQuery objects a, b, c, how would you for example set identical attributes on all of them without repeating too much code as I'm currently doing: a.attr({ "first": "sameFirst", "second": "sameSecond", "third": "sameThird", }); b.attr({ "first": "sameFirst", "second": "sameSecond", "third": "sameThird", }); c.attr({ "first": "sameFirst", "second": "sameSecond", "third": "sameThird", }); Isn't there something like: $(a, b, c).attr({ "first": "sameFirst", "second": "sameSecond", "third": "sameThird", }); ? EDIT: Now that I learned I can either use .add() or $() with an array of non-jQuery objects, I wonder why $(a, b, c) isn't supported because the other solutions to me seem unnecessarily verbose or convoluted.
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/46804863
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46805709
has comment: http://stackoverflow.com/comment/46806395
score: 0
has answer: http://stackoverflow.com/a/29305062
answer count: 3
has comment: http://stackoverflow.com/comment/46804618
accepted answer: http://stackoverflow.com/a/29305055
has title: How do I call a jQuery function on several jQuery objects?
has answer: http://stackoverflow.com/a/29305194

http://stackoverflow.com/comment/46733856
comment on: http://stackoverflow.com/a/29264433
score: 0
type: Comment
has text: Updated with the code for selecting the second child.
type: AnswerComment

http://stackoverflow.com/q/29322698
tagged with: javascript
tagged with: jquery
score: 0
answer count: 1
has body: I've looked at seemingly similar animate issues but none of them seems to quite get me to the solution. I am trying to animate a bubble sort loop to show the moving numbers but somehow this does not work. The loop, not animated, which works is: var locations = [ '1', '2', '3', '4', '5', '6', '7']; function bubbleSort2 () { do { swapped = false; for (var i = 0; i < locations.length-1; i++) { if (parseInt($('#' + locations[i]).text()) > parseInt($('#' + locations[i+1]).text())) { $('#' + locations[i] + '>p').appendTo($('#setaside')); $('#' + locations[i+1] + '>p').appendTo($('#' + locations[i] )); $('#setaside>p').appendTo($('#' + locations[i+1])); swapped = true; } } } while(swapped); } When I try to use the animation features, I am probably botching things. With various tweaks, I can get a single pass to animate correctly but not the loop. The non working loop, which might explain what I trying to do is: var locations = [ '1', '2', '3', '4', '5', '6', '7']; function bubbleSort2 () { do { swapped = false; for (var i = 0; i < locations.length-1; i++) { if (parseInt($('#' + locations[i]).text()) > parseInt($('#' + locations[i+1]).text())) { $('#' + locations[i]).fadeOut("slow", function(){ $('#' + locations[i] + '>p').appendTo($('#setaside')); }) ; $('#' + locations[i+1]).fadeOut("slow", function(){ $('#' + locations[i]).fadeIn("slow", function (){ $('#' + locations[i+1] + '>p').appendTo($('#' + locations[i] )); }) ; }) ; $('#' + locations[i+1]).fadeIn("slow", function (){ $('#' + locations[i+1] + '>p').appendTo($('#' + locations[i] )); }) ; $('#setaside>p').appendTo($('#' + locations[i+1])); swapped = true; } } } while(swapped); } The full HTML, which works, is: Bubble Sort 55 90 33 21 80 111 11 Would greatly appreciate your help.
has answer: http://stackoverflow.com/a/29325340
type: UnansweredQuestion
tagged with: animation
has title: jquery animate in loop not working
type: Question
has comment: http://stackoverflow.com/comment/46836433

http://stackoverflow.com/a/29234382
answers question: http://stackoverflow.com/q/29233454
score: 0
type: AcceptedAnswer
type: Answer
has body: In that example they are using a library called particle slider which takes an image and draws it in particles. See http://particleslider.com/ for more details. The exact method you want is here http://particleslider.com/documentation/api#ParticleSlider.getPixelFromImageData Going into how to write the library from scratch is probably a bit to advanced for a stackoverflow question :)
accepted answer of: http://stackoverflow.com/q/29233454

http://stackoverflow.com/q/29359357
tagged with: parameters
tagged with: google-analytics
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29359600
has body: I am creating a web application where I have pages with query parameters that change the content of that page based on the URL parameters. For example, https://www.youtube.com/watch?v=wvsboPUjrGc will load a certain video based on the query parameter. How can I configure Google Analytics to recognise all pages with URL parameters as separate pages, and therefore track them individually?
type: Question
has title: How to configure Google Analytics to track URL parameters as individual pages
answer count: 1
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29359600
score: 0

http://stackoverflow.com/q/29366440
accepted answer: http://stackoverflow.com/a/29366590
type: Question
has title: Call Stack while using setTimeout()
has comment: http://stackoverflow.com/comment/92490752
has answer: http://stackoverflow.com/a/29367229
downvote count: 0
tagged with: javascript
favorite count: 0
answer count: 3
has body: I am a bit confused about setTimeout.I want to confirm whether the output for the following code will always be: inside abc inside sample The code: function abc() { xyz(); // interactions and modifications in DOM $("#id1").append("something"); $("#id2").val("set something"); $("#id3").after("create some dynamic element"); // 10 to 20 interaction more... console.log('inside abc'); } function xyz() { setTimeout(function() { sample(); },0); } function sample() { console.log('inside sample') } It would be great,if somebody could explain the whole flow with the call stack.
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29366577
has answer: http://stackoverflow.com/a/29366590
upvote count: 2
linked to: http://stackoverflow.com/q/47585441
possible better answer: http://stackoverflow.com/a/29366577

http://stackoverflow.com/comment/46915313
comment on: http://stackoverflow.com/q/29366269
score: 0
type: QuestionComment
has text: You can consider this as setting a default value for `this.createjs`. The default value is an empty object `{}` if an existing value does not exist.
type: Comment

http://stackoverflow.com/comment/46714282
type: Comment
has text: Hi KungWaz it's sort of what I'm after..however is there a way to make this happen when a button is clicked instead? also the conditions are using image file formats..could i not use the image ID's instead?
comment on: http://stackoverflow.com/a/29255382
score: 0
type: AnswerComment

http://stackoverflow.com/comment/46869664
has text: I failed miserably trying to find matching parentheses PS: yep, I know you just took OP's expression, but still... :-)
comment on: http://stackoverflow.com/a/29341324
score: 1
type: AnswerComment
type: Comment

http://stackoverflow.com/a/29333010
type: Answer
accepted answer of: http://stackoverflow.com/q/29332892
upvote count: 1
score: 1
has body: wrap it in a function closure: for (i = 0; i &lt; friendsXML.length; i++) { (function(i) { friendListInDiv = document.createElement("p"); var link = document.createElement("a"); link.onclick = function() { openChat(friendsXML[i].textContent) }; var friendText = document .createTextNode(friendsXML[i].textContent + ":" + statusXML[i].textContent); link.appendChild(friendText); friendListInDiv.appendChild(link); friendDiv.appendChild(friendListInDiv); }(i)) } Your variables are getting hoisted to the outer scope, Javascript only has function level scoping.
answers question: http://stackoverflow.com/q/29332892
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/46803322
has text: posted this 49secs after you :) Just deleted mine and upvoted yours =D
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29304452
type: AnswerComment

http://stackoverflow.com/a/29316400
has body: The first parameter of the for loop has already been defined, so the initial comma is there to delimit it's place in the parameter list.
answers question: http://stackoverflow.com/q/29316378
type: Answer
has comment: http://stackoverflow.com/comment/46920482
has comment: http://stackoverflow.com/comment/46825261
has comment: http://stackoverflow.com/comment/46827164
score: 0
upvote count: 1
downvote count: 1

http://stackoverflow.com/q/29338823
has comment: http://stackoverflow.com/comment/46865758
has title: Click event on dynamic element fires after second click only - jquery
has comment: http://stackoverflow.com/comment/46865323
has comment: http://stackoverflow.com/comment/46865329
tagged with: javascript
has body: I am trying to execute a function when clicking on a dynamic element(does not exist on page load), here is my code: jQuery(document).ready(function(){ jQuery('body').off('click','.itemAttribute').on('click','.itemAttribute',function(){ var title = jQuery(this).find('img').attr('title'); jQuery(this).parent().parent().find('select').val(title).change(); }); }) However the code is only executed on second click.. HTML's of Dynamic element: static HTML: Please choose... UNIVERSITY BLUE/DARK UNIVERSITY RED/DARK Please help.. NOte: When adding an alert in the code, the alert is executed in first click, seems the problem is: jQuery(this).parent().parent().find('select').val(title).change(); :(
score: -1
answer count: 2
downvote count: 1
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/29339042
has comment: http://stackoverflow.com/comment/46865507
has comment: http://stackoverflow.com/comment/46865590
has comment: http://stackoverflow.com/comment/46865434
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46865310
has comment: http://stackoverflow.com/comment/46865575
has answer: http://stackoverflow.com/a/29339036
upvote count: 0
has comment: http://stackoverflow.com/comment/46865629
type: Question

http://stackoverflow.com/comment/46920099
comment on: http://stackoverflow.com/q/29369325
score: 0
type: Comment
has text: You're looking for AJAX or web sockets.
type: QuestionComment

http://stackoverflow.com/comment/46849942
comment on: http://stackoverflow.com/q/29319439
type: Comment
type: QuestionComment
has text: Exactly this is the problem. The three functions must have a clear execution order, because `c` waits for a value from `b` and `b` for a value from `a`. If `c` is called before `b`, `c` returns undefined.
score: 0

http://stackoverflow.com/a/29338100
upvote count: 5
accepted answer of: http://stackoverflow.com/q/29338081
score: 5
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/29338081
has body: There isn't really a shorter way to write an if statement in that way (which I will assume is what you're asking). However, there could be a few different ways to write this depending on how many things you want to check. Use a Switch statement There is a cleaner way when dealing with multiple cases that letter could be. This would be a switch statement and it would look like this: var text; switch (letter) { case "5544": text = "Abar, Marlon 1,800"; break; case "5545": text = "Pia, Darla 1,800"; break; // more cases default: text = "Incorrect Account Number"; break; } This reads a little better than an if else statement in some cases. The default keyword here acts as your else clause in an if else statement. The case acts as your different if statements if you will. Essentially, the switch statement above will fall through each of the cases it defines until it finds a case that matches letter (such as "5544"). If none matches, it hits the default case. The break keyword at the end of each case stops things from falling through to the next defined case once a match is found. This method could get cumbersome with more than 6 or 7 cases. Create an object and look up the value Now, a shorter way to get the value you want could be to define an object and get the value based on what has been entered like so: var letter = document.getElementById('selector').value; var obj = { '5544': 'Abar, Marlon 1,800' }; if (letter in obj) { // do something if found } else { // do something if not found } This could be an easy way to get a value if you have many values to check. Other thoughts As a side note to all of this, there are short hand if statements called ternary statements which you can find here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Conditional_Operator ... However, I would not recommend nesting these as it becomes very complicated and not very readable. Conclusion So, to reiterate the answer to your question: No, there isn't really a …
type: Answer
has comment: http://stackoverflow.com/comment/46865540
has comment: http://stackoverflow.com/comment/46865824

http://stackoverflow.com/comment/46785554
has text: @MokshShah Updated link is http://jsfiddle.net/fdq68tbc/2/
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29294094

http://stackoverflow.com/q/29329048
favorite count: 0
has body: I'm trying to use AngularJS in my webapp so dynamically create a menu and then populate the page based on the selection. I have created all the components needed, however it seems that since I split out my controllers I'm getting the following error. Any ideas why? Error: [ng:areq] http://errors.angularjs.org/1.3.15/ng/areq?p0=MenuCtrl&p1=not%20a%20function%2C%20got%20undefined The code I have is as follows: index.html Page Title {{menuItem.name}} js/app.js var myWebApp = angular.module('myWebApp', [ 'ngRoute', 'myWebAppControllers' ]); myWebApp.config(['$routeProvider', function($routeProvider) { $routeProvider. when('/', { redirectTo: '/home' }). when('/home', { templateUrl: '/partials/home.html', controller: 'HomeCtrl' }). otherwise({ templateUrl: '/partials/404.html', }); }]); js/controllers.js var myWebAppControllers = angular.module('myWebAppControllers', []); myWebAppControllers.controller('MenuCtrl', function ($scope, $location) { $scope.menuItems = [ { 'name': 'Home', 'path': '#/home' } ]; }); js/controllers/home.js var myWebAppControllers = angular.module('myWebAppControllers', []); myWebAppControllers.controller('HomeCtrl', function ($scope, $location) { $scope.title = "Home" });
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/29329076
upvote count: 1
type: AnsweredQuestion
score: 1
has title: AngularJS - Argument 'MenuCtrl' is not a function, got undefined
type: Question
tagged with: ng-controller
downvote count: 0
answer count: 1
has answer: http://stackoverflow.com/a/29329076
tagged with: javascript
has comment: http://stackoverflow.com/comment/46847772

http://stackoverflow.com/q/29307186
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46808631
has title: How do I start an animation after a previous one ends?
has comment: http://stackoverflow.com/comment/46808718
tagged with: html5-canvas
answer count: 1
has answer: http://stackoverflow.com/a/29308652
favorite count: 0
has comment: http://stackoverflow.com/comment/46808661
type: UnansweredQuestion
tagged with: animation
upvote count: 1
score: 1
has body: I have an animation function which plays all animations simultaneously. This is not something that's desired, I want to play each animation after the previous one ends. How would I do this? canvas = document.getElementById("test"); ctx = canvas.getContext("2d"); function animateLines(name, x1, y1, x2, y2, stroke, width, duration){ var count = 0; var ms = 10; duration = duration * ms; var counter; function countNumbers(){ ctx.beginPath(); ctx.moveTo(x1, y1); count += 1; if(x2 &gt; x1){ ctx.lineTo((x1 + count), y2); } else if(y2 &gt; y1){ ctx.lineTo(x1, (y1 + count)); } if((x1 &lt; x2) &amp;&amp; (count == x2)){ clearInterval(counter); } else if((y1 &lt; y2) &amp;&amp; (count == y2)){ clearInterval(counter); } ctx.lineWidth = width; ctx.strokeStyle = stroke; ctx.stroke(); } $("#pause").on("click", function(){ clearInterval(counter); }) $("#play").on("click", function(){ counter = setInterval(countNumbers, duration); }) } animateLines("Line", 0, 100, 100, 100, "white", 5, 3); animateLines("Line2", 150, 250, 350, 250, "red", 5, 2); animateLines("Line3", 100, 0, 100, 300, "blue", 5, 1); So basically, I want to hit play and have Line's animation start. When it finishes, have Line2 start and when it finishes, have Line3 start.
type: Question
tagged with: canvas
downvote count: 0
has comment: http://stackoverflow.com/comment/46808599

http://stackoverflow.com/comment/46779198
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29291034
has text: Why is this question tagged `jQuery` when you're not using it?

http://stackoverflow.com/comment/46723610
score: 2
has text: @AWM I found the conflicting part. I still had `Ember.Application.create` instead of `Ember.Application.extend`.. ugh crazy how one keyword can let you go so deep down the rabbit hole...
comment on: http://stackoverflow.com/q/29255957
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29314067
has comment: http://stackoverflow.com/comment/46871920
type: Answer
has body: You could try below logic, which will track visibilitychange event and check for document visibility. Code app.controller("myCtrl", function($scope, ngAudio, $window, $document) { $scope.src = "aud.mp3"; $scope.play = false; $scope.play = function() { $scope.audio = ngAudio.load('aud.mp3'); $scope.audio.play(); }; $scope.stop = function() { $scope.audio = ngAudio.load('aud.mp3'); $scope.audio.pause(); }; $document[0].addEventListener("visibilitychange", function() { var doucmentHidden = document.hidden; $scope.$apply(function() { //need to apply scope from events to run digest cycle if (doucmentHidden) $scope.stop(); else $scope.play(); }); }, false); }); Working Plunkr
score: 1
has comment: http://stackoverflow.com/comment/46871668
has comment: http://stackoverflow.com/comment/46821293
has comment: http://stackoverflow.com/comment/46821423
upvote count: 1
has comment: http://stackoverflow.com/comment/46822079
has comment: http://stackoverflow.com/comment/46822022
accepted answer of: http://stackoverflow.com/q/29313925
has comment: http://stackoverflow.com/comment/46821639
has comment: http://stackoverflow.com/comment/46821792
answers question: http://stackoverflow.com/q/29313925
has comment: http://stackoverflow.com/comment/46823277
has comment: http://stackoverflow.com/comment/46872250
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46821609
downvote count: 0
has comment: http://stackoverflow.com/comment/46871803
has comment: http://stackoverflow.com/comment/46871850

http://stackoverflow.com/comment/46795763
type: QuestionComment
score: 0
has text: as follows? has OP forgot do copy-paste?
comment on: http://stackoverflow.com/q/29300373
type: Comment

http://stackoverflow.com/comment/46908225
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/29362201
type: Comment
has text: Check now, I've updated the code. sorry for inconvenience. :)

http://stackoverflow.com/comment/46748522
score: 1
has text: `.options` is a *property*, not a *method*.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29274683

http://stackoverflow.com/comment/59971609
has text: Repeated question answer link. http://stackoverflow.com/a/25040472/2114046
type: QuestionComment
comment on: http://stackoverflow.com/q/29273022
type: Comment
score: 0

http://stackoverflow.com/a/29340972
type: Answer
has body: Are you trying to achieve this ?? HTML AngularJS Plunker Next {{value}} Controller var app = angular.module('plunker', []); app.controller('MainCtrl', function($scope) { $scope.Next = function (infodata) { $scope.value=infodata; }; }); Plnkr : http://plnkr.co/edit/X74FejDWVpxDRCB4v63n?p=preview
accepted answer of: http://stackoverflow.com/q/29340413
downvote count: 0
answers question: http://stackoverflow.com/q/29340413
score: 3
upvote count: 3
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46987433

http://stackoverflow.com/comment/46913998
has text: `edgeWidth` should be working, however there is a bug. Reported [here](https://github.com/highslide-software/highcharts.com/issues/4055) - thanks. As workaround, set `edgeColor: 'rgba(0,0,0,0)`. Demo: http://jsfiddle.net/hdghyz2x/
type: Comment
comment on: http://stackoverflow.com/q/29361122
score: 0
type: QuestionComment

http://stackoverflow.com/a/29366064
answers question: http://stackoverflow.com/q/29365278
type: Answer
has body: I've figured out the issue. I wasn't the developer that originally worked on this so it was a head scratcher to begin with. It turns out the resolution of iPads fell directly in between the mobile view port size and the desktop view port size so so I just need to place the mobile CSS inside a new media view port specifically designed for iPads. I'll post my findings but this should work (hopefully). EDIT Yep, so it turns out there was a media query that was set to big and fell between the two target sizes and the iPad size was right in the middle. So essentially it was just a display: block; that was outside a media query which meant all the CSS was missed and thus only displayed the text. Solved!
score: 0

http://stackoverflow.com/q/29285961
type: UnansweredQuestion
score: 0
has answer: http://stackoverflow.com/a/29286606
downvote count: 2
linked to: http://stackoverflow.com/q/11988547
has comment: http://stackoverflow.com/comment/46769982
has answer: http://stackoverflow.com/a/29286472
has comment: http://stackoverflow.com/comment/46769661
type: Question
tagged with: arrays
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/29286033
has title: Compare numeric values in javascript array
answer count: 3
has comment: http://stackoverflow.com/comment/46797864
has comment: http://stackoverflow.com/comment/46769460
upvote count: 2
has body: I have an array like below var nums = ["1", "2", "2", "3", "4", "4", "5"]; Here I am trying to compare the values in array and test whether the values are in ascending order or not. If two array values are same, I need to skip that. If order is like 1,3,2.. then I will throw an error that they are in wrong order. I want to use pure javascript here.

http://stackoverflow.com/a/29234361
has body: Use Array.prototype.slice(). The slice() method returns a shallow copy of a portion of an array into a new array object. var tree = data.slice();
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29234299
upvote count: 5
answers question: http://stackoverflow.com/q/29234299
type: Answer
downvote count: 0
score: 5

http://stackoverflow.com/q/29333479
downvote count: 0
has title: Limit a DIV to appear within another DIV of specific size
type: Question
tagged with: javascript
upvote count: 2
accepted answer: http://stackoverflow.com/a/29333677
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/29333677
has body: I'm currently working on this small project that randomly displays a div (#box) of 100px width and height. I want this div to appear ONLY in another div (#boxBorder) so it appears to be limited to a specific area on the page. Here is the content of my HTML: Test your reactions! Click the shape as fast as you can! Click score: 0s Total score: 0s Here is the CSS: #boxBorder { height: 500px; width: 500px; margin: 20px auto; left: 0; right: 0; background-color: white; border: 1px black solid; position: absolute; z-index: 0; } #box { margin: 0 auto; height: 100px; width: 100px; background-color: red; display: none; border-radius: 50px; position: relative; z-index: 1; } h1 { margin: 15px 0 0 0; } #directions { margin: 0; padding: 5px; font-size: 0.8em; } #scoreT, #scoreC { font-weight: bold; margin: 10px 50px 0 0; } #tScore, #cScore { font-weight: normal; } h1, #directions, #scoreT, #scoreC { width: 100%; text-align: center; } And lastly, the javascript function for random position: //Get random position function getRandomPos() { var pos = Math.floor((Math.random() * 500) + 1); console.log("POS: " + pos + "px"); return pos + "px"; } Which I call within a timeout method: setTimeout(function() { createdTime = Date.now(); console.log("make box: " + createdTime); document.getElementById("box").style.top=getRandomPos(); document.getElementById("box").style.left=getRandomPos(); document.getElementById("box").style.backgroundColor=getRandomColor(); document.getElementById("box").style.borderRadius=getRandomShape(); document.getElementById("box").style.display="block"; }, rTime); I'm not very skilled in positioning and I can't seem to get these two divs to align so that the #box div can recognize the size of the #boxBorder div and stay within those limits. Any help would be appreciated!
tagged with: http://stackoverflow.com/tag/html
tagged with: css
score: 2
type: AnsweredQuestion

http://stackoverflow.com/a/29354091
has comment: http://stackoverflow.com/comment/46893355
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/46893241
has comment: http://stackoverflow.com/comment/46893310
upvote count: 3
has comment: http://stackoverflow.com/comment/46893419
has comment: http://stackoverflow.com/comment/46893631
has comment: http://stackoverflow.com/comment/46893559
downvote count: 1
has body: You needed two variables. One that you use to build up the html string and one to hold each item from the results array. Change your code to this: function display(results) { article = document.getElementById("homeArticle"); var html = ''; for (var i = 0; i < results.length; i++){ var item = results[i]; var name = item.P_NAME; var description = item.P_DESCRIPTION; var price = item.P_PRICE; // next I add to the string that we want to place on the page html += ' Name:' + name + ' Description:' + description + ' Price:' + price + ' '; }; article.innerHTML = html; } That way you will append the html strings rather than overwrite the prior one. Also consider making sure that each html element has a unique id, you could do this by appending i to the id e.g. html += ' Name:' + name + ' Description:' + description + ' Price:' + price + ' ';
has comment: http://stackoverflow.com/comment/46893339
has comment: http://stackoverflow.com/comment/46893682
has comment: http://stackoverflow.com/comment/46893472
accepted answer of: http://stackoverflow.com/q/29354009
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46893703
answers question: http://stackoverflow.com/q/29354009
has comment: http://stackoverflow.com/comment/46893475
has comment: http://stackoverflow.com/comment/46893225
has comment: http://stackoverflow.com/comment/46893760

http://stackoverflow.com/q/29370459
has comment: http://stackoverflow.com/comment/46959720
has body: I have a meteor app that recently started stopped deploying b/c of an error that is thrown during the minifying stage of the build process. The console says: Segmentation fault 11 ... and then it just stops. The other day I removed a package that I no longer needed, and suddenly the app was able to build and minify successfully. Then yesterday I updated to Meteor 1.0.5 and the error returned. What I can do to figure out what's causing this?
answer count: 0
upvote count: 2
type: Question
has title: Meteor: segmentation fault 11 while minifying
tagged with: javascript
tagged with: segmentation-fault
score: 2
downvote count: 0
tagged with: minify
tagged with: meteor
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46925157

http://stackoverflow.com/comment/46735637
type: AnswerComment
has text: Why this got downvote? BTW, you can shorten/cache it even further http://jsfiddle.net/wzevjkb2/ :)
type: Comment
comment on: http://stackoverflow.com/a/29263755
score: 0

http://stackoverflow.com/comment/46748549
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29255137
score: 1
has text: I see thanks, write it as an answer then I can choose it

http://stackoverflow.com/a/29264292
has comment: http://stackoverflow.com/comment/46736654
has comment: http://stackoverflow.com/comment/46730520
accepted answer of: http://stackoverflow.com/q/29260364
has comment: http://stackoverflow.com/comment/46778959
has body: Giving the comments, I think this code will work. FB.login(function(response) { if (response.authResponse) { console.log('Welcome! Fetching your information.... '); FB.api('/me', function(response) { if (response.error) { console.log('Error - ' + response.error.message); } else { var userid = response.id; var userfirst_name = response.first_name; var userlast_name = response.last_name; var useremail = response.email; var userbirthday = response.birthday; var usergender = response.gender; $.ajax({ url: 'insertuserdetails.php', data: {'userid' : userid, 'userfirst_name' : userfirst_name, 'userlast_name' : userlast_name, 'useremail' : useremail, 'userbirthday' : userbirthday, 'usergender' : usergender}, type: "POST", }).done(function( msg ) { alert("php file called, A TUTORIAL COULD GO HERE"+msg); }); } }); } else { console.log('User cancelled login or did not fully authorize.'); } }, {scope: 'email user_birthday'}); So what this does is after the user authenticates (logs in / gives permission) then the api requests the information and calls your ajax request. I think by doing this the data will be available. Plus now you don't need to call this function, it just happens on user authentication. So now onto the last part of your question. You want to know if the insert occurred or if it failed you can do this by setting your sql query to a variable: $result = mysqli_query($conn, $sql); if (!$result) { $verify=0; } else{ $verify=1; } echo $verify;
has comment: http://stackoverflow.com/comment/46776705
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46777359
has comment: http://stackoverflow.com/comment/46776795
has comment: http://stackoverflow.com/comment/46780172
score: 0
has comment: http://stackoverflow.com/comment/46778061
answers question: http://stackoverflow.com/q/29260364
type: Answer
has comment: http://stackoverflow.com/comment/46735741

http://stackoverflow.com/comment/46666842
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29227429
has text: @akmozo - okay but akmozo when I add video tag it does not support my video from vimeo. code is -
score: 0

http://stackoverflow.com/q/29239496
has title: Temporary url for physical files in asp.net mvc
has answer: http://stackoverflow.com/a/29239932
tagged with: asp.net-mvc
type: Question
has comment: http://stackoverflow.com/comment/46685820
tagged with: javascript
tagged with: asp.net
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has body: I am going to add some kind of security in my site . So i was thinking that is this possible to have temporary url to physical files . Suppose i have a javascript file which is needed by my login page in order to run correctly . So can i do this something like dynamic suppose we have a url which is valid for current session of user when user logout that url gets expired . The main purpose is that i don't want to disclose real path to my file
has comment: http://stackoverflow.com/comment/46686181
has comment: http://stackoverflow.com/comment/46685949
type: UnansweredQuestion

http://stackoverflow.com/a/29335112
accepted answer of: http://stackoverflow.com/q/29334391
answers question: http://stackoverflow.com/q/29334391
has body: Issue was caused by code which i cleaned up while posting it to stack-overflow, it was related to calling wrong this within map function context.
type: AcceptedAnswer
score: 0
type: Answer

http://stackoverflow.com/a/29260444
has comment: http://stackoverflow.com/comment/46725838
answers question: http://stackoverflow.com/q/29260364
type: Answer
has comment: http://stackoverflow.com/comment/46729489
has comment: http://stackoverflow.com/comment/46724325
has comment: http://stackoverflow.com/comment/46735912
has comment: http://stackoverflow.com/comment/46726352
has comment: http://stackoverflow.com/comment/46726037
has comment: http://stackoverflow.com/comment/46756721
has comment: http://stackoverflow.com/comment/46729627
has body: Try putting your call in the document ready function. $(document).ready(function() { getUserDetails(); }); This will fire after the body has loaded fully (or more accurately, when the DOM is ready). http://learn.jquery.com/using-jquery-core/document-ready/
score: 0

http://stackoverflow.com/q/29346183
answer count: 0
upvote count: 2
linked to: http://stackoverflow.com/q/10837670
type: UnansweredQuestion
duplicate of: http://stackoverflow.com/q/10837670
has body: I'm currently playing around with large numbers in JavaScript and stumbled across something that I don't quite understand: From the Mozilla JavaScript Doc I found the following statement: The MAX_VALUE property has a value of approximately 1.79E+308. Values larger than MAX_VALUE are represented as "Infinity". Just for fun I hacked some lines in my Google Chrome console to see what would happen if I used a larger number than Number.MAX_VALUE and I was surprised by the result: Number.MAX_VALUE + 1 === Infinity returns false. Number.MAX_VALUE+Math.pow(10,291) === Infinity returns false. Number.MAX_VALUE+Math.pow(10,292) === Infinity returns true. Just by definition I would already expect the first example to return true. Why is that not the case? What am I missing?
type: Question
downvote count: 0
tagged with: javascript
favorite count: 0
has title: JavaScript Number.MAX_VALUE
score: 2

http://stackoverflow.com/q/29358850
favorite count: 0
tagged with: ajax
has answer: http://stackoverflow.com/a/29358989
tagged with: php
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29358878
score: 2
has body: While looking at tons of examples of how to get a PHP variable sent to a JavaScript file, I still haven't had success getting it. My PHP file is: $title = $json["title"]; echo json_encode($title); And my JavaScript file app.js is: $.ajax({ url : 'index.php', type : 'GET', data : film, dataType : 'json', success : function (data) { alert(data.title); console.log(data.title); }, }) I would like to know the right code to get the PHP $title variable to the ajax call in app.js. Thanks
upvote count: 2
has answer: http://stackoverflow.com/a/29358878
tagged with: http://stackoverflow.com/tag/json
has title: Can't get PHP variable to JavaScript file using AJAX
type: Question
accepted answer: http://stackoverflow.com/a/29358989
tagged with: javascript
answer count: 2
downvote count: 0
tagged with: jquery

http://stackoverflow.com/q/29271783
tagged with: jquery-plugins
has answer: http://stackoverflow.com/a/29271810
has title: By selecting a class, another div display none in jquery
has answer: http://stackoverflow.com/a/29271802
favorite count: 0
type: UnansweredQuestion
downvote count: 2
has body: jQuery(document).ready(function() { jQuery( "li.post_link_history.current" ).click(function() { jQuery( "div#rating-anchor" ).css( "display", "none !important" ); }); }); //or jQuery(document).ready(function() { if(jQuery('li.post_link_history.current').attr('class')=='current') { jQuery('div#rating-anchor').not(jQuery(this)).css('display','none !important'); } }); How can I "By selecting a class, another div display none in jquery"?
type: Question
has comment: http://stackoverflow.com/comment/46743939
answer count: 2
upvote count: 0
score: -2
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/46703333
has text: @Preeti did you try any of my solutions?
comment on: http://stackoverflow.com/q/29249106
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/q/29230917
has comment: http://stackoverflow.com/comment/46668471
has body: I have an issue with automatic name for input, I'll try to explain what i need to do. i have an id, that I get it from an external function. I need to use this numeric id to create another function like that. var id = 10; // this is the id (from external function) var value = "n"+bar.toString(); // (I try to cast the id as string) $("input[name="+value+"]").on('change', function() { // use the cast value to name my input. alert($("input[name="+value+"]:checked", "#myForm").val()); }); When I try to do that I get undefined, but when I change the id like that var id ="10" I get the correct answer, but I have a numeric input. Please help me figure out how to solve this problem.
score: 1
accepted answer: http://stackoverflow.com/a/29231317
has comment: http://stackoverflow.com/comment/46668291
has comment: http://stackoverflow.com/comment/46668244
type: Question
has comment: http://stackoverflow.com/comment/46668465
has answer: http://stackoverflow.com/a/29231317
tagged with: javascript
has comment: http://stackoverflow.com/comment/46668345
has title: dynamic name for an input with jQuery
answer count: 3
has comment: http://stackoverflow.com/comment/46668413
upvote count: 1
has comment: http://stackoverflow.com/comment/46668748
has answer: http://stackoverflow.com/a/29231132
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/46668447
has comment: http://stackoverflow.com/comment/46668276
possible better answer: http://stackoverflow.com/a/29231073
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46668547
has answer: http://stackoverflow.com/a/29231073
downvote count: 0

http://stackoverflow.com/comment/46885916
comment on: http://stackoverflow.com/a/29344813
score: 0
type: AnswerComment
type: Comment
has text: I can now confirm that the cause is modal not being in DOM when product_price.js is run, I tried `$(document).on('shown.bs.modal',function (){ productPrice(); });` And it worked! I need further checking the whole idea, as this fix appears to cause some other features in the modal don't work properly, but it seems the right direction. Thanks a lot.

http://stackoverflow.com/a/29219041
upvote count: 2
answers question: http://stackoverflow.com/q/29218953
type: Answer
has body: The regular expression looks for a string of one or more digits followed by any number of characters that aren't - up to the end of the string. Neither "ipsum-img-ffffff" nor "ipsum-img-efefef" match that. Personally I wouldn't do it with .split() anyway: var matched = /ipsum-img-(\d+)$/.exec(this.className); var number = matched &amp;&amp; matched[1] || null;
score: 2
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29218953

http://stackoverflow.com/a/29261669
has comment: http://stackoverflow.com/comment/46726089
score: 0
answers question: http://stackoverflow.com/q/29261507
has comment: http://stackoverflow.com/comment/47024907
type: Answer
has body: here it is how you can do that Save angular.module('myApp', []) .controller('MyController', function($scope){ $scope.value = false; $scope.list = [0, 1, 2, 3, 4]; $scope.save = function(argument) { $scope.value = argument; alert($scope.value); } });
has comment: http://stackoverflow.com/comment/46725638

http://stackoverflow.com/a/29322011
answers question: http://stackoverflow.com/q/29321811
type: Answer
has body: What you are trying to achieve is out of the scope of serialized object concept. Serialization is about presenting data in the most general way so both sender and the receiver of this serialized object will be able to understand in any programming language. The definition of this data type you are trying to represent is called 'Number' in JSON. You should parse or cast it to the type you need (this is part of the deserialization concept, and usually being done by the JSON parsing method).
score: 0

http://stackoverflow.com/q/29228163
has comment: http://stackoverflow.com/comment/46666474
has comment: http://stackoverflow.com/comment/46663154
tagged with: javascript
answer count: 6
has answer: http://stackoverflow.com/a/29228256
has answer: http://stackoverflow.com/a/29230666
has title: call javascript a function in html submit button
has comment: http://stackoverflow.com/comment/46670341
score: 3
has comment: http://stackoverflow.com/comment/46666600
accepted answer: http://stackoverflow.com/a/29230666
has comment: http://stackoverflow.com/comment/46663158
favorite count: 0
has body: I have a form which I want to hide or show dependent on the users decision. I got following functions in an external javascript file: function hide_element() { $("form").hide(); }; function show_element() { $("form").show(); }; and this is how I call those functions: show hide ... Unfortunately this does not work. Do you have any clues why this is the case?
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/11226489
has comment: http://stackoverflow.com/comment/46663365
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29228299
has answer: http://stackoverflow.com/a/29228239
has answer: http://stackoverflow.com/a/29228212
has answer: http://stackoverflow.com/a/29228255
downvote count: 1
type: Question
upvote count: 4
possible better answer: http://stackoverflow.com/a/29228212

http://stackoverflow.com/q/29312714
score: 2
type: AnsweredQuestion
tagged with: collections
type: Question
accepted answer: http://stackoverflow.com/a/29312767
tagged with: javascript
has title: Meteor publish/subscription not working from server folder
downvote count: 0
answer count: 1
tagged with: meteor
favorite count: 0
has answer: http://stackoverflow.com/a/29312767
upvote count: 2
has body: I've a simple meteor application I made for learning how to do CRUD operations. It works great but I'm having issues with the publish/subscribe of my collection and I can't for the life of me figure it out. My folder structure is /client /main.js /templates /public /server /main.js I've a main.js file in server folder with basic collection with a publish feature /server/main.js Dist = new Mongo.Collection('dist'); Meteor.publish('dist', function (){ var currentUser = this.userId; return Dist.find({owner: currentUser}); }); and under client folder a subscribe /client/main.js Meteor.subscribe('dist'); I've a for each loop in a template that is suppose to show the returned info for the user. When my servers main.js is in the server folder my template loop returns nothing but CRUD calls back to the server work fine. If I move the server main.js file into the root of my project everything works as intended. However, doesn't this defeat the purpose of publish/subscribe aspect: keeping the main collection on the server side while showing users only their own data from it? I can't figure out why this is happening after endless Google searches nothing seems to make a difference. Auto publish and insecure have been removed as well. The only third party package I believe is bootstrap for styling.

http://stackoverflow.com/a/29313327
answers question: http://stackoverflow.com/q/29312744
downvote count: 0
type: Answer
has body: This line: B.prototype = new A(); Says assign the prototype to an instance of A. If you leave out the constructor call, it's equivalent to this: B.prototype = Object.create(A.prototype); It means that B.prototype is pointing to an object cloned from A.prototype: Object.getPrototypeOf(B.prototype) === A.prototype // true But then in this line: A.prototype = new SuperA(); You are replacing the reference in A.prototype but B.prototype still points to the old one: var oldProto = A.prototype; A.prototype = new SuperA(); Object.getPrototypeOf(B.prototype) === A.prototype // false Object.getPrototypeOf(B.prototype) === oldProto // true This line works: alert(objectB.getA()); Because getA was added in the new A() call, so it adds a new slot to the existing prototype, instead of replacing the whole instance. And this: alert(objectB.getSuperA()); Doesn't work because SuperA is not in the prototype chain of B. This problem is very tricky. But actually JavaScript has a very simple model, but confusing by some of the language keywords (new/instanceof), and the strange use of functions (to resemble Java constructors): Property/method lookup always goes up in the prototype chain. That's all the inheritance that you have. "Clonning" (in terms of Object.create) means to create a new empty object, and set the prototype from the given object. Prototypes are just reference to objects, so you can add/change slots at any time. With only those two things you don't need the rest. And constructors -with some small internal differences- can be seen as a shortcut to: var newInstance = Object.create(SomeFunction.prototype); SomeFunction.constructor.apply(newInstance, arguments); To me the use of functions to create objects was a bad idea, if JavaScript only had Object.create from version 1 and no constructor functions, all the model is much easier to understand.
score: 1
upvote count: 1

http://stackoverflow.com/comment/46880168
type: AnswerComment
has text: After this code without the user.ensureAuthenticated parameter.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29346407

http://stackoverflow.com/comment/55452598
type: AnswerComment
type: Comment
has text: Works perfectly but could you please elaborate on these css ? what exactly is it doing ?
score: 0
comment on: http://stackoverflow.com/a/29339590

http://stackoverflow.com/a/29276490
has body: This should to the job $.ajax({ type: "POST", url: "someurl", data: {"tbl=" + tbl} }); http://api.jquery.com/jquery.getjson/ See here for documentation
type: Answer
has comment: http://stackoverflow.com/comment/46752153
score: 0
answers question: http://stackoverflow.com/q/29276195

http://stackoverflow.com/q/29234769
tagged with: javascript
tagged with: jquery
has title: Controller to jsp and viceversa java
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29236024
has answer: http://stackoverflow.com/a/30070511
tagged with: spring-mvc
tagged with: java
has body: I am facing issue from days and could not able to find a way to solve. Let me explain my problem, basically, I am receiving table object(table does not exist in DB but this table object is formed with a query across several tables) from DB to jsp which has several rows and displaying them in the UI. The code looks like below in jsp. <c:forEach items="${someinvoice}" var="invoice" varStatus="status"> //here invoice represents a row in table which looks like someinvoice[Name=Mobie , location= US, actualTransferDate=null, scanserialCode=234335,1237787, modelNum=MIC 898989 ] ${invoice.scanserialCode} ${invoice.modelNum} ${invoice.assetName} ${invoice.assettoLocation} ${invoice.actualTransferDate} </c:forEach> I am getting someinvoice from my controller as below. List<BeanClass> invoiceData = service.Dao(); model.addAttribute("someinvoice", invoiceData); Now, if i check some rows from the displayed table on UI and click submit button should result a new page which should show selected rows only in table format. For this, when submit button clicked i took the checked rows into controller as below. String[] checkeditems = request.getParameterValues("case");//here case represents all the checked rows in the page and checkeditems represents a list of row objects as String. My real problem is, I can not able to convert this String array to my bean class type, so that i can easily send these checked rows to another jsp which displays after submit button clicked. This is irritating me for a while. Can any one help me here, I struck here for a while. Thanks.
type: Question
score: 0
answer count: 2
tagged with: jsp

http://stackoverflow.com/q/29266113
has answer: http://stackoverflow.com/a/29266249
type: Question
answer count: 2
tagged with: javascript
score: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/29266298
has title: progress handler in angularjs
type: UnansweredQuestion
has body: I've implemented a progress handler in plain javascript, I'm wondering how can I achieve the same using angular data binding feature. HTML &lt;div class="progress-bar"&gt;&lt;/div&gt; plain javascript: progressBar.style.width = progress + "%"; how can this be translated in angular world, suppose I've an angular app already instantiated and I can set the variable in $scope $scope.progress = progress; what I'm not clear how to databind this to width property of progress-bar (div)

http://stackoverflow.com/q/29258317
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/29258414
tagged with: jquery
has title: Scroll Function not working
score: 0
has body: i need help my stuff isn't working i'm not sure why. It's a scroll function that moves a navigation bar 20 px down if the window isn't at the top of document. And its supposed to move back 20px once the window is scrolled to the top. Ascension Entertainment
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46719132
tagged with: scripting
answer count: 1
type: UnansweredQuestion

http://stackoverflow.com/a/29281038
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29280825
answers question: http://stackoverflow.com/q/29280825
type: Answer
score: 1
upvote count: 1
has body: I would recommend using ui-router-extras and its sticky:true property.
downvote count: 0
has comment: http://stackoverflow.com/comment/46765554

mediawiki-extensions
tag name: mediawiki-extensions
type: Tag
tags question: http://stackoverflow.com/q/29303370

http://stackoverflow.com/a/29299147
answers question: http://stackoverflow.com/q/29298746
has comment: http://stackoverflow.com/comment/46795324
type: Answer
accepted answer of: http://stackoverflow.com/q/29298746
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/46793309
has body: I think you are looking for the new ES6 Object.assign function. Of course there's a simpler fix to your problem - just don't access and set properties, copy their property descriptors: function extractPrototype(clazz) { var proto = {}; for (var key in clazz.prototype) { Object.defineProperty(proto, key, Object.getOwnPropertyDescriptor(clazz.prototype, key)); } return proto; }
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46793207
has comment: http://stackoverflow.com/comment/46802073

http://stackoverflow.com/q/29362600
has body: I've written a simple Login form with no actual server. Just a hard coded login credentials. And if they credentials are matching on angular controller function then I need to show another HTML page. On '/login.html', following code is written Login IGraph Welcome to IGraph Login Forgot password? Do not have an account? Create an account And in 'login.js' the code is following : (function(){ var app = angular.module('login',[]); app.controller('LoginController', ['$scope','$location', function($scope,$location) { $scope.loginUser = function(user){ if(user.username == 'demo' && user.password == 'demo'){ $location.href('/afterLogin.html'); } else{ alert('Wrong credentials') } } }]); })(); But on $location.href('/afterLogin.html'); , it does nothing. Even there is no error. What could be the cause?
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46908969
score: 1
linked to: http://stackoverflow.com/q/18875467
has answer: http://stackoverflow.com/a/29363506
has comment: http://stackoverflow.com/comment/46908882
upvote count: 1
has comment: http://stackoverflow.com/comment/46912578
type: Question
tagged with: angularjs-routing
has title: Redirect to another HTML page in Angular JS
has answer: http://stackoverflow.com/a/29363393
tagged with: javascript
has comment: http://stackoverflow.com/comment/46908867
answer count: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/46909674
favorite count: 0
has comment: http://stackoverflow.com/comment/46912628
tagged with: angularjs
possible better answer: http://stackoverflow.com/a/29363393
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29362621
accepted answer: http://stackoverflow.com/a/29362621

http://stackoverflow.com/a/29264039
has body: if($scope.processRating.inherentRiskRatingKey === 'null' || $scope.processRating.finalOutcomeInherentRiskRatingKey ==='null' || $scope.processRating.controlEffectivenessRatingComputeKey ==='null') { $scope.showEditdisForm = false; } should be : if(!$scope.processRating.inherentRiskRatingKey || !$scope.processRating.finalOutcomeInherentRiskRatingKey || !$scope.processRating.controlEffectivenessRatingComputeKey ) { $scope.showEditdisForm = false; }
answers question: http://stackoverflow.com/q/29262774
type: Answer
downvote count: 0
score: 1
upvote count: 1

http://stackoverflow.com/comment/46838710
score: 0
type: AnswerComment
has text: Thanks for the help. Adding a duration to the toggle effect did not help. However, when I used `slideToggle` or `fadeOut` I had better results. The only standing problem I have is that the button when given any of these effects just lightens in color, then vanishes. The email input does work; so that's good. Is there any way you could help with the button not working properly?
comment on: http://stackoverflow.com/a/29323913
type: Comment

vb6
type: Tag
tag name: vb6
tags question: http://stackoverflow.com/q/29289869

http://stackoverflow.com/comment/46766904
score: 0
type: Comment
comment on: http://stackoverflow.com/q/29284548
type: QuestionComment
has text: and btw , in Javascript Strings ARE objects. correct title would be : convert query into a key-value object

http://stackoverflow.com/comment/46807910
type: QuestionComment
comment on: http://stackoverflow.com/q/29303746
score: 0
has text: @KarimMamdouh above comments are related to the SO community. This community is composed of people who shares problems/solutions/attempts to solve problems/etc so, that's why the comment. This is not a community about "please solve my issue". People here post questions about a problem they have, the attempts they made to solve them and code they used, you question actually is not a question, it lacks everything lol
type: Comment

http://stackoverflow.com/a/29324523
type: Answer
score: 1
upvote count: 1
has body: Intro: The for statement creates a loop that consists of three optional expressions Source: Mozilla JavaScript Docs Background: You are referring to initialization, which is an expression or variable declaration. It's almost always used to initialize a counter variable that allows us to iterate through a collection as you've shown. This expression may optionally declare new variables with the var keyword. These variables are not local to the loop, i.e. they are in the same scope the for loop is in. The result of this expression is discarded. In JavaScript, variables can hold different data types, and in the case of a counter variable, JavaScript treats the variable as a number. Answer: The reason one can optionally declare a new variable (or not at all, as you've highlighted) is due to the nature of the JavaScript programming language. You've hit upon an important aspect of the language that deals with variables and scope. "To var or not to var" Please see this other post about using var or not using it at all to understand more... What is the function of the var keyword and when to use it (or omit it)?
downvote count: 0
answers question: http://stackoverflow.com/q/29324332

http://stackoverflow.com/comment/46734200
has text: I know of the forever library but its purpose is different: "The purpose of Forever is to keep a child process (such as your node.js web server) running continuously and automatically restart it when it exits unexpectedly." Thanks for your effort though.
type: Comment
comment on: http://stackoverflow.com/a/29265581
score: 0
type: AnswerComment

http://stackoverflow.com/comment/46657493
type: Comment
has text: Im using ' '
comment on: http://stackoverflow.com/a/29224672
score: 0
type: AnswerComment

http://stackoverflow.com/q/29232201
has answer: http://stackoverflow.com/a/29274048
tagged with: javascript
tagged with: controller
score: 0
answer count: 1
tagged with: angularjs
type: UnansweredQuestion
has title: Angular JS / Ruby on Rails - controller not recognised error
has body: I've been following the Thinkster tutorial for implementing an Angular JS / Ruby on Rails app and have run into a little difficulty. My controllers aren't being recognised, despite being listed in the page's sources when inspecting the content. This is highlighted through the console error Error: [ng:areq] Argument 'NavCtrl' is not a function, got undefined. I've tried everything I've been able to find online, to no avail. My only guess at present is it's due to the version of Angular, Rails, a gem, dependency - or something I just haven't considered. Or it's a typo, but I'm not spotting it! The end result is a blank page loading, except for the nav bar's content, which renders with no controller logic. I'll show some code below, and if anything else is needed for an answer, let me know. Here's application.html.erb: Angular JS <%= stylesheet_link_tag 'application', media: 'all' %> <%= javascript_include_tag 'application' %> <%= csrf_meta_tags %> DEBUG app.js which contains the app module and the view config: angular.module('flapperNews', ['ui.router', 'templates', 'Devise']) .config([ '$stateProvider', '$urlRouterProvider', function($stateProvider, $urlRouterProvider) { $stateProvider .state('home', { url: '/home', templateUrl: 'home/_home.html', controller: 'MainCtrl' }) .state('posts', { url: '/posts/{id}', templateUrl: 'posts/_posts.html', controller: 'PostsCtrl' }) .state('login', { url: '/login', templateUrl: 'auth/_login.html', controller: 'AuthCtrl', onEnter: ['$state', 'Auth', function($state, Auth) { Auth.currentUser().then(function (){ $state.go('home'); }); }] }) .state('register', { url: '/register', templateUrl: 'auth/_register.html', controller: 'AuthCtrl', onEnter: ['$state', 'Auth', function($state, Auth) { Auth.currentUser().then(function (){ $state.go('home'); }); }] }); $urlRouterProvider.otherwise('home'); }]); It's worth noting, between the two files above, is at least rendering some Angular content, while the shows 'nothing at all' (irrelevant …
tagged with: ruby-on-rails
type: Question
tagged with: angular-ui-router

http://stackoverflow.com/q/29272952
type: UnansweredQuestion
has body: I have two application name "appserver" and "ftpserver" both on same tomcat server. like this: appserver: "http://myapplication.org/appserver" ftpserver: "http://myapplication.org/ftpserver" appserver is the main application of my project and I want to "upload" &amp; "get" some files to/from ftpserver. so how do i can get the url/path of the ftpserver in Java, JSP, &amp; java script??
tagged with: path
linked to: http://stackoverflow.com/q/4721279
downvote count: 0
score: 1
tagged with: java
type: Question
has title: how to access data from another web application
tagged with: context.xml
tagged with: jsp
tagged with: javascript
has answer: http://stackoverflow.com/a/29273184
upvote count: 1
answer count: 1
favorite count: 0

http://stackoverflow.com/comment/46674725
has text: Even with the var it works perfectly, I updated your [**fiddle**](https://jsfiddle.net/c057f1oj/1/).
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29228908
type: AnswerComment

http://stackoverflow.com/q/29280189
tagged with: generator
has body: I have a hard time understanding generators. But I think what I'm trying to do should be possible. I have an object Topic that has access to Pages. Originally Topic was implemented such that Pages would be retrieved through a callback. var Topic = function( id ) { var repository = new PageRepository(); this.id = id; this.getAllPages = function( callback ) { repository.getAllPagesByTopicId( this.id, function( result ) { var pages = []; while( result.hasNext() ) { pages.push( result.next() ); } callback( pages ); } ); } } var topic = new Topic( 1 ); topic.getAllPages( function( pages ) { console.log( pages ) // received Page instances } ); Now, let's assume I cannot refactor PageRepository's callback mechanism, but I do want to refactor Topic such that I can access it's pages through a generator, in stead of through a callback. Is that doable, without too much hastle? I know I can iterate generator values with a for...of statement, like: var topic = new Topic( 1 ); for( let page of topic.pages() ) { // create the generator console.log( page ); // received next Page } ... so I came up of with something like the following: var Topic = function( id ) { ... this.pages = function*() { // refactored getAllPages () to a generator function pages() repository.getAllPagesByTopicId( this.id, function( result ) { while( result.hasNext() ) { yield result.next(); // yield the next Page } } ); } } However, this doesn't work, probably because yield is called from within the callback. Then, based my (poor) understandings of this article (from "To use a generator ..." onward), I thought this might work: var Topic = function( id ) { ... this.pages = function*() { let gen = function*() {}(); // create an inner generator // not actually sure why the following wrapper function is needed // but something similar is used in mentioned article yield function() { repository.getAllPagesByTopicId( this.id, function( result ) { while( result.hasNext() ) { gen.next( result.next() ); // call next() …
has answer: http://stackoverflow.com/a/29281361
tagged with: ecmascript-6
score: 2
downvote count: 0
tagged with: javascript
tagged with: callback
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29281361
tagged with: asynchronous
favorite count: 0
type: Question
upvote count: 2
linked to: http://stackoverflow.com/q/23551418
has title: How can I convert this async callback to a generator?
answer count: 1

http://stackoverflow.com/q/29308142
has answer: http://stackoverflow.com/a/29308217
accepted answer: http://stackoverflow.com/a/29308217
has comment: http://stackoverflow.com/comment/46810367
has comment: http://stackoverflow.com/comment/46810415
downvote count: 0
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29308246
score: 1
has comment: http://stackoverflow.com/comment/46810362
type: Question
answer count: 2
upvote count: 1
duplicate of: http://stackoverflow.com/q/14028959
tagged with: javascript
favorite count: 0
linked to: http://stackoverflow.com/q/14028959
has title: Why will this code not work? I have spent a long time trying to figure this out
has answer: http://stackoverflow.com/a/29308246
has body: This is the start of my JavaScript Code var para = document.createElement("p"); var node = document.createTextNode("This is new."); para.appendChild(node); var element = document.getElementById("test"); element.appendChild(para); Below is the body &lt;div id="test"&gt; &lt;/div&gt; P.S. I am fairly new to JavaScript and thank you for your time.

http://stackoverflow.com/a/29323954
has comment: http://stackoverflow.com/comment/46883960
has body: evaluate() is the sandboxed page context. Anything inside of it doesn't have access to variables defined outside and this refers to window of the page and not casper. You don't need the evaluate() function here, since you don't access the page context. The other thing is that casper.resourceExists() works on the resource meta data such as URL and request headers. It seems that you want to check the content of the resource. If you used casper.thenOpen() or casper.open() to open the RSS feed, then you can check with casper.getPageContent(), if the text exists. The actual problem with your code is that you mix synchronous and asynchronous code in a way that won't work. waitFor() is the wrong tool for the job, because you need to reload in the middle of its execution, but the check function is called so fast that there probably won't be a complete page load to actually test it. You need to recursively check whether the document is changed to your liking. var tokenTrials = 0, tokenFound = false; function matchToken(){ if (this.getPageContent().indexOf(token) === -1) { // token was not found tokenTrials++; if (tokenTrials &lt; 50) { this.reload().wait(1000).then(matchToken); } } else { tokenFound = true; } } casper.then(matchToken).then(function(){ test.assertTrue(tokenFound, "Token was found after " + tokenTrials + " trials"); });
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46932291
has comment: http://stackoverflow.com/comment/46931000
type: Answer
has comment: http://stackoverflow.com/comment/46928903
has comment: http://stackoverflow.com/comment/46883998
has comment: http://stackoverflow.com/comment/46932778
has comment: http://stackoverflow.com/comment/46884031
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/46933021
accepted answer of: http://stackoverflow.com/q/29323534
has comment: http://stackoverflow.com/comment/46930692
answers question: http://stackoverflow.com/q/29323534

http://stackoverflow.com/a/29373328
type: AcceptedAnswer
upvote count: 3
has body: This would work: $('.multiplyBtn').click(function() { // you had multiplyBtn spelled wrong here var cur = $('.multiplyBtn').index($(this)); // get index of clicked btn var factor = $('.multiple').eq(cur).data('factor'); // get factor from matching input var multiple = $('.multiple').eq(cur).val(); // get value from matching input answer = (Number(factor) * Number(multiple)); // make sure both are numbers then multiply alert(answer); }); enter value for multiple here Click here to multiply these numbers enter value for multiple here Click here to multiply these numbers
type: Answer
accepted answer of: http://stackoverflow.com/q/29372966
answers question: http://stackoverflow.com/q/29372966
downvote count: 0
score: 3
has comment: http://stackoverflow.com/comment/46928570

http://stackoverflow.com/q/29314420
downvote count: 1
type: Question
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/46821598
has answer: http://stackoverflow.com/a/29314593
upvote count: 0
answer count: 1
favorite count: 0
has body: I want to put text which is typed by user but it's not working. If I type "new menu", the result is "$('#input_type').text()" instead of "new menu". What should I do?? Here is the code $("#plus_list").before("&lt;a href='#' class='list-group-item'&gt; $('#input_type').text() &lt;/a&gt;"); As far as I know $("#plus_list").before("&lt;a href='#' class='list-group-item'&gt; here what you want to show &lt;/a&gt;"); is working but I am coufusing how to put vaule not string.
type: UnansweredQuestion
has title: How can I add vaule in the Javascript String?

http://stackoverflow.com/q/29269677
type: Question
tagged with: mongodb
has answer: http://stackoverflow.com/a/29271147
has comment: http://stackoverflow.com/comment/46939141
tagged with: javascript
has body: Currently in my meteor app I want to be able to restrict database CRUD operations to only document owners, or for example if they have the admin permission. I am using the meteor alanning:roles package, could someone please explain how I could best leverage this package for restricting who can create, read or update documents based on their roles, or if they are the owner of the document?
tagged with: security
score: 0
answer count: 2
tagged with: meteor
has comment: http://stackoverflow.com/comment/46931287
has comment: http://stackoverflow.com/comment/46764637
tagged with: permissions
has answer: http://stackoverflow.com/a/29271873
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29271873
has title: Meteor restrict CRUD operations to admins or the document owner
possible better answer: http://stackoverflow.com/a/29271147

http://stackoverflow.com/q/29372154
has title: trying to use data detail in buttons but getting a unexpected error
type: Question
answer count: 2
tagged with: javascript
has body: I am using the following code which displays my items from a database on the screen. I have tried adding a button to each of them using data detail as this is how i am passing data through local storage. However when i run this code i get an error message with an unexpected { in the html += line, can you not do this? function display(results) { article = document.getElementById("homeArticle"); var html = ''; for (var i = 0; i < results.length; i++){ var item = results[i]; var name = item.P_NAME; var description = item.P_DESCRIPTION; var price = item.P_PRICE; var quant = item.P_QUANTITY; // next I add to the string that we want to place on the page html += ' Name: ' + name + ' Description: ' + description + ' Price: £' + price + ' Quantity: ' + quant + ' Bananas '; }; article.innerHTML = html; } function getItems() { var xhr = new XMLHttpRequest(); xhr.onload = function() { var results = JSON.parse(this.responseText); display(results.rows); }; xhr.open("GET", "displayData.php"); xhr.send(); } window.addEventListener("load", getItems);
score: 0
has answer: http://stackoverflow.com/a/29372262
accepted answer: http://stackoverflow.com/a/29372236
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29372262
has answer: http://stackoverflow.com/a/29372236

http://stackoverflow.com/comment/46680271
type: QuestionComment
comment on: http://stackoverflow.com/q/29236889
type: Comment
has text: I see no reason why it should be working on Chrome. Can you create a jsFiddle.net example, or a stack snippet?
score: 0

http://stackoverflow.com/comment/46680803
type: Comment
has text: @BenjaminRay Try sending the Query over and over again in the fiddle! XD. Perhaps check if element already exists or not? :P
comment on: http://stackoverflow.com/a/29237045
score: 0
type: AnswerComment

http://stackoverflow.com/a/29348974
type: Answer
score: 1
has body: There is no option to put controller by its URL in the directive definition. However if you define your controller in DOM template you could use controller: 'myController as myCtrl' in directive definition
upvote count: 1
downvote count: 0
answers question: http://stackoverflow.com/q/29348764

http://stackoverflow.com/comment/46766665
has text: You'll want to have a look at my answer :-)
comment on: http://stackoverflow.com/a/29279147
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/46761896
score: 0
type: Comment
type: QuestionComment
has text: can you add jsfiddle?
comment on: http://stackoverflow.com/q/29282013

variables
tag name: variables
tags question: http://stackoverflow.com/q/29339580
tags question: http://stackoverflow.com/q/29360894
tags question: http://stackoverflow.com/q/29312328
tags question: http://stackoverflow.com/q/29361569
tags question: http://stackoverflow.com/q/29277474
tags question: http://stackoverflow.com/q/29333255
tags question: http://stackoverflow.com/q/29226339
tags question: http://stackoverflow.com/q/29321661
tags question: http://stackoverflow.com/q/29349125
tags question: http://stackoverflow.com/q/29264106
tags question: http://stackoverflow.com/q/29353502
tags question: http://stackoverflow.com/q/29265720
tags question: http://stackoverflow.com/q/29341285
tags question: http://stackoverflow.com/q/29362633
tags question: http://stackoverflow.com/q/29231101
type: Tag
tags question: http://stackoverflow.com/q/29237617
tags question: http://stackoverflow.com/q/29289055
tags question: http://stackoverflow.com/q/29242640
tags question: http://stackoverflow.com/q/29325067
tags question: http://stackoverflow.com/q/29279092
tags question: http://stackoverflow.com/q/29357931
tags question: http://stackoverflow.com/q/29246269
tags question: http://stackoverflow.com/q/29311311
tags question: http://stackoverflow.com/q/29351770
tags question: http://stackoverflow.com/q/29266726
tags question: http://stackoverflow.com/q/29254740
tags question: http://stackoverflow.com/q/29241328
tags question: http://stackoverflow.com/q/29250743
tags question: http://stackoverflow.com/q/29323223
tags question: http://stackoverflow.com/q/29304105

http://stackoverflow.com/q/29285184
has title: Why is my script running the animation, but not showing it?
tagged with: canvas
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29287927
score: 0
answer count: 1
tagged with: animation
has comment: http://stackoverflow.com/comment/46768055
has comment: http://stackoverflow.com/comment/46767985
has body: I am trying to do a simple animation on a line. The basic goal here is that when I click on the canvas, the line goes from being a point to being a certain amount of pixels tall. However, when I click on the canvas, the script shows that the animation started and completed(the callback function is called at the end), but I don't actually see the animation happening. Can anyone tell me why? Function creates each animated line, appends it to the document, and sets the style function animatedLine(name, x1, y1, width, height, stroke, duration){ this.name = name; this.x1 = x1; this.y1 = y1; this.stroke = stroke; this.width = width; this.height = height, this.duration = duration; $("body").append("&lt;div id='" +this.name +"'&gt;&lt;/div&gt;"); $("#" +this.name).css({"position": "absolute", "top": this.y1 +"px", "left": this.x1 +"px", "backgroundColor": this.stroke, "width": this.width +"px", "height": this.y1 +"px", "z-index": 5}); } Creates an new animatedLine object var line1 = new animatedLine("R01", 0, 0, 5, 100, "black", 3); Creates the timeline var timeline = new TimelineLite(); Creates the timeline animation, this is clearly happening because onComplete function is being called timeline.to(line1, line1.duration, {"height": line1.height +"px", onComplete: function(){ Once the animation has completed, "hello" is printed to the console console.log("hello"); } }); $("#schematic_holder").on("click", function(){ timeline.play(); }) Something to note, the background is a canvas element and its position is set to absolute and z-index is set to 0, so the line should be layering itself on top of the canvas, which it is doing.
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29287927
type: Question

http://stackoverflow.com/comment/46756148
type: Comment
type: QuestionComment
has text: Liam, I said without using Internet Explorer; not any browser. There are ways to launch exe programs in ONLY Internet Explorer, and I don't want to use those.
comment on: http://stackoverflow.com/q/29275278
score: 0

http://stackoverflow.com/a/29259993
score: 0
has comment: http://stackoverflow.com/comment/46745450
type: Answer
has body: Demo link http://jsfiddle.net/dmxecnu8/ JSCODE HTML CODE Mathematics Physics Chemistry Biology Some contents 1. Maths Option 1 Option 2 Option 3 Option 4 1. Physics Option 1 Option 2 Option 3 Option 4 1. Chemistry Option 1 Option 2 Option 3 Option 4 1. Biology Option 1 Option 2 Option 3 Option 4 I updated your code here. here is the jsfiddle link http://jsfiddle.net/dmxecnu8/
answers question: http://stackoverflow.com/q/29259235
has comment: http://stackoverflow.com/comment/46723950

http://stackoverflow.com/comment/116410310
score: 0
type: AnswerComment
has text: Please add explanation
comment on: http://stackoverflow.com/a/65839345
type: Comment

http://stackoverflow.com/comment/46885265
type: QuestionComment
has text: http://jsfiddle.net/svaidhyanath/pmy4q84o/ is this what you were looking for?
comment on: http://stackoverflow.com/q/29349464
score: 0
type: Comment

http://stackoverflow.com/comment/69744796
type: QuestionComment
has text: Chrome Beta 56 does ship with a first draft of the Image Capture API. See the release info: http://www.androidpolice.com/2016/12/14/chrome-56-beta-adds-official-web-bluetooth-api-support-experiential-webvr-apk-download/
score: 1
comment on: http://stackoverflow.com/q/29324556
type: Comment

http://stackoverflow.com/a/29270559
has body: How about this : $( ' ' , { class : 'btn btn-default', type : 'button', id : 'test1', html : '' })
answers question: http://stackoverflow.com/q/29270531
has comment: http://stackoverflow.com/comment/46741952
type: Answer
score: 0

http://stackoverflow.com/q/29299725
has comment: http://stackoverflow.com/comment/46794728
answer count: 1
has body: How can I refractor my code to get rid of this error from JSLinter? I tried moving the entire function out to a var but the code wasn't able to run after that. for (i = 0; i &lt; timeDifference; i++) { timestamp ++; console.log(timestamp); energyDatum.find({timestamp: timestamp}).toArray(function(err, result) { var data = {}; result.forEach(function(element) { data[element.deviceId] = element; }); var roomRawData = []; mappings.forEach(function(room) { var hash = {}; hash.floor = room.floor; hash.name = room.name; hash.room_type = room.room_type; hash.energy_ac = sumApplianceEnergy('energy_ac', room, data); hash.energy_light = sumApplianceEnergy('energy_light', room, data); hash.energy_socket_1 = sumApplianceEnergy('energy_socket_1', room, data); hash.energy_socket_2 = sumApplianceEnergy('energy_socket_2', room, data); hash.energy_socket_3 = sumApplianceEnergy('energy_socket_3', room, data); hash.energy_total = hash.energy_ac + hash.energy_light + hash.energy_socket_1 + hash.energy_socket_2 + hash.energy_socket_3; hash.timestamp = timestamp; roomRawData.push(hash); }); roomRaw.insert(roomRawData, {w:1}, function(err, result) { console.log('done'); }); }); lastTimestamp.update({_id: timestampId}, {timestamp: timestamp}); }
has comment: http://stackoverflow.com/comment/46794531
has comment: http://stackoverflow.com/comment/46794540
has title: javascript "don't make function in a loop"
has answer: http://stackoverflow.com/a/29300091
type: AnsweredQuestion
tagged with: javascript
type: Question
accepted answer: http://stackoverflow.com/a/29300091
score: 0

http://stackoverflow.com/q/29228457
tagged with: internet-explorer
answer count: 1
tagged with: .net
has answer: http://stackoverflow.com/a/29451944
tagged with: javascript
has body: I've been searching for a previous version of this question on Stackoverflow, but I couldn't find it. I imagine though that this must have been asked 100's of times, so I'm probably using the wrong searchterms. My problem is that I have a very busy webpage. A lot of elements are loaded. After this happens the CSS is loaded and the JS does some stuff. This all causes a lot of stuttering which looks very messy. I've made a capture of it and uploaded it here: http://gfycat.com/WearyPrestigiousFlea Any solution would be fine, but I do need the postbacks. I need the information in my querystring for a lot of reasons. This page is too complex to fix everything with Ajax. I do not need advice on that matter. However: if there is a trick to mask the loading, or to make it smoother, please share your knowledge :-) Edit: In answer to one of the comments below: There were no errors. I'm using IE9, which does not have the setting "Pre-load content before refreshing screen" as IE11 does (along with other reasonable browsers). Right now I added "Display: none;" to the body tag and "$("body").show();" in document.ready. It looks a lot better, but still get a lot of "white" between postbacks.
has comment: http://stackoverflow.com/comment/47068878
score: 0
type: UnansweredQuestion
has title: Make internet explorer load fluently without flickering
has comment: http://stackoverflow.com/comment/46698407
type: Question

http://stackoverflow.com/comment/46710097
has text: put your code on jsfiddle.net. It would be easy to solve your problem.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29253323
score: 3

http://stackoverflow.com/comment/46662742
score: 1
comment on: http://stackoverflow.com/q/29227850
has text: In your code `fadeIn` and `fadeOut` speed is set as 200 milliseconds. Setting the value to 0 removes the delay. Ex. `.fadeIn(0)`
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29304659
has comment: http://stackoverflow.com/comment/46803993
possible better answer: http://stackoverflow.com/a/29304732
has comment: http://stackoverflow.com/comment/46804311
has answer: http://stackoverflow.com/a/29304732
score: 0
answer count: 2
accepted answer: http://stackoverflow.com/a/29305047
has comment: http://stackoverflow.com/comment/46803700
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/46803781
has body: I have the following data: {"20":{"id":20,"name":"Book 1"}, "31":{"id":31,"name":"Book 2"}, "1021":{"id":1021,"name":"Book 3"} } Is there a way that I could get the id of the first object or the object with the lowest id value, which in this case is 20 with javascript?
has title: How to get the first/lowest value of an object with Javascript?
tagged with: javascript
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29305047
favorite count: 0
has comment: http://stackoverflow.com/comment/46804376
type: Question

date
tags question: http://stackoverflow.com/q/29225594
tags question: http://stackoverflow.com/q/29302302
tags question: http://stackoverflow.com/q/29370475
tag name: date
tags question: http://stackoverflow.com/q/29286834
tags question: http://stackoverflow.com/q/29252972
tags question: http://stackoverflow.com/q/29220467
tags question: http://stackoverflow.com/q/29355325
tags question: http://stackoverflow.com/q/29326057
tags question: http://stackoverflow.com/q/29369599
tags question: http://stackoverflow.com/q/29261984
tags question: http://stackoverflow.com/q/29372796
type: Tag
tags question: http://stackoverflow.com/q/29328766
tags question: http://stackoverflow.com/q/29356871
tags question: http://stackoverflow.com/q/29314331
tags question: http://stackoverflow.com/q/29297257
tags question: http://stackoverflow.com/q/29242440

http://stackoverflow.com/q/29270060
score: 2
has body: I have an unordered list with 4 items inside. On mouse hover it should grow to 100% of the ul's width, and all the 'noun hovered li' should shrink to 0% width. When mouse leaves they all should go back to their initial state of 25% width. Something like: css #menu2{ overflow: hidden; padding-left: 0; padding-right: 0; margin: 0; } .color{ display: inline-block; position: relative; list-style: none; float: left; height: 110px; margin-right: 0; width: 25%; background-color: blue; cursor: pointer; } .stateHovered{ width: 100%; transition: all 500ms ease-out; background-color: #FAA500; } .stateOff{ width: 0; } The js function addListeners(){ document.getElementById('menu2').children.addEventListener("mouseover", toggleClassFunction); function toggleClassFunction() { for(i = 0; i < menu2.length; i++) { if(menu2[i] !=this) { menu2[i].className = "stateOff"; }else if(menu2[i] === this){ menu2[i].className = "stateHovered"; }else { menu2[i].className = "color"; } } } } window.addEventListener("load", addListeners); the end result, doesn't work ..
type: Question
answer count: 1
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/46741250
has comment: http://stackoverflow.com/comment/46742271
has title: How to toggle between 3 classes on hover js
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
upvote count: 2
type: UnansweredQuestion
tagged with: css
has comment: http://stackoverflow.com/comment/46741508
has answer: http://stackoverflow.com/a/29270268

http://stackoverflow.com/comment/46691782
has text: Well, this is more involved than I envisioned. Thanks all for the help.
comment on: http://stackoverflow.com/a/29241617
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/29337948
has body: In Java, if I do this int value = 3; int incr = value++; incr is 4 but in JavaScript, int value = 3; int incr = value++; incr is 3 in order for incr to be 4 in JS I have to do int incr = ++value; why is this?
upvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/46864026
tagged with: javascript
favorite count: 0
accepted answer: http://stackoverflow.com/a/29337970
score: -1
downvote count: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29337970
tagged with: java
has title: Java vs JavaScript increment operator
type: Question

http://stackoverflow.com/a/29290705
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/29290521
has body: You can use CSS3 transition property to animate the image containers like so: .showc { display: inline-block; height: 100%; position: relative; width: 100%; transition: all 0.6s ease-in-out; } Then your left or right directional onclick handler change the margin-left value of the first .showc.
downvote count: 0
type: Answer

http://stackoverflow.com/comment/46783771
type: AnswerComment
comment on: http://stackoverflow.com/a/29293722
has text: still getting undefined index
type: Comment
score: 0

http://stackoverflow.com/q/29218787
has body: I have a dropdown menu "Names". Right now, Im populating it with the firstName of employees. The first names of the employees is the data which is added at run time. Now I want to display the options in the dropdown as "(firstName) (lastName)" Is there a way to do this using jquery. Im able to retrive both the firstName and lastName from the database. Current Jquery Code for the dropdown: $('.employeeName').prepend("&lt;option value=''&gt;&lt;/option&gt;").val(''); for(i=0;i&lt;data.length;i++){ if(data[i].firstName) $('.employeeName').append('&lt;option&gt;' + data[i].firstName + '&lt;/option&gt;'); }
has answer: http://stackoverflow.com/a/29223044
type: Question
tagged with: javascript
answer count: 2
upvote count: 1
accepted answer: http://stackoverflow.com/a/29218989
tagged with: drop-down-menu
tagged with: jquery
has comment: http://stackoverflow.com/comment/46646625
has title: How to combine two fields to be displayed as options in a dropdown menu using jquery?
favorite count: 0
has comment: http://stackoverflow.com/comment/46646672
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29218989
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46646698
downvote count: 0
score: 1
possible better answer: http://stackoverflow.com/a/29223044

http://stackoverflow.com/a/29322544
type: AcceptedAnswer
has body: Quickest way is by wrapping it into a service/factory and exposing only the needed functions to the consumer. Note that you probably don't have to export all functions, which results in a much cleaner service. angular.module('myApp').factory('myGapi', function() { // Paste functions here function handleClientLoad() {} function makeApiCall() {} // ... return { // Expose the function to the consumers makeApiCall: makeApiCall }; }); // Consume the myGapi service angular.module('myApp').controller('MyController', function($scope, myGapi) { $scope.click = function() { myGapi.makeApiCall(); }; });
downvote count: 0
has comment: http://stackoverflow.com/comment/46837245
accepted answer of: http://stackoverflow.com/q/29322435
answers question: http://stackoverflow.com/q/29322435
has comment: http://stackoverflow.com/comment/46839068
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/46837036
score: 1
has comment: http://stackoverflow.com/comment/46837990
has comment: http://stackoverflow.com/comment/46837816

http://stackoverflow.com/comment/46924119
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29348633
has text: Yes and Tim's solution has worked: casper.then(function() { this.sendKeys('input#ct_s1_pickup_loc','Barcelone',{reset: true,keepFocus: true}); });
score: 0

http://stackoverflow.com/comment/46799577
has text: This line in and of itself is not enough to cause the refresh. We need more code, or more context about this page.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29302507
score: 0

http://stackoverflow.com/q/29345519
has answer: http://stackoverflow.com/a/29345667
has comment: http://stackoverflow.com/comment/46877008
tagged with: php
type: AnsweredQuestion
score: 2
tagged with: smarty
has answer: http://stackoverflow.com/a/29345653
has answer: http://stackoverflow.com/a/29345644
type: Question
accepted answer: http://stackoverflow.com/a/29345667
linked to: http://stackoverflow.com/q/1285514
downvote count: 0
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/29345644
answer count: 3
favorite count: 0
has title: Pass value from PHP to JS with Smarty?
has body: How to pass a value from php to javascript? I'm working with smarty and i tried this but js seems to take it as a a string. The value is set to 20. $smarty->assign('settings', $settings); //$settings is an array $settings is coming from an file, basically it are some settings. i want to select an option in an html doc with that value but it is not working. 5 10 20 and in the js file then: $(document).ready(function() { $('#entrys').val("{$settings['frontendEntrys']}"); }); But no option is selected then not even the first or default value and if i try to print {$settings['frontendEntrys']} it's also not working. It just seems to be taken as a string. BTW: Is it a good way to pass some settings with smarty or generally? How can i pass the values if i don't use smarty? Would this be correct? Is this a good way, if it's done in an html file?
upvote count: 2

http://stackoverflow.com/comment/46672712
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29233174
has text: @planet260 I did. Didn't find anything like this.
score: 0

http://stackoverflow.com/a/29323921
upvote count: 3
answers question: http://stackoverflow.com/q/29323614
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46838601
has comment: http://stackoverflow.com/comment/46838873
type: Answer
score: 3
downvote count: 0
has body: Create enemies array and push to it: var enemies = []; setInterval(function(){ enemies.push({ x: Math.ceil(Math.random() * canvasWidth), y: Math.ceil(Math.random() * canvasHeight) }); }, 5000);
accepted answer of: http://stackoverflow.com/q/29323614

http://stackoverflow.com/q/29220122
has body: I'm working on a weather app as a personal project. I have the bases of the app done where I make a HTTP get request to the Yahoo Weather API and it returns the data I want. However I'm stuck on the next step, getting icons to load with the current conditions. I setup a JSON file in my "models" folder and it looks like this: [ { "code": 32, "icon": "img/sunny.png", "text": "Sunny" }, { "code": 26, "icon": "img/cloudy.png", "text": "Cloudy" } ] And here's my request for that in my main controller (Not sure if I'm doing it right). $http.get('models/conditions.json') .success(function(data) { vm.condition = data; }).error(function(err) { console.log(err); }); In the view I'm using a combination of the ng-if and ng-src directives to try to load the icons. Again, I don't I'm doing it right. &lt;img ng-if="main.place.item.conditons.code === main.conditions.code" ng-src="{{main.conditions.icon}}"&gt; Any ideas on how I can get this to work? Am I on the right track? Thanks for any answers!
has comment: http://stackoverflow.com/comment/46649392
tagged with: http://stackoverflow.com/tag/json
score: -1
has title: How to load icon for specific weather condition? (AngularJS)
type: Question
has comment: http://stackoverflow.com/comment/46650760
has comment: http://stackoverflow.com/comment/46651018
answer count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/46649634
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/46650267
has comment: http://stackoverflow.com/comment/46649546
has comment: http://stackoverflow.com/comment/46650009
upvote count: 0
tagged with: angularjs
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29221261
has comment: http://stackoverflow.com/comment/46650566

http://stackoverflow.com/q/29322820
has comment: http://stackoverflow.com/comment/46836938
has body: I am trying to create a jQuery plugin. When configuring the plugin, I wish to define an object which will be posted via Ajax. One of the properties in the object value2 is based on the element which the plugin was applied to (a.myClass), and I thought I would try something like the following: post:{value1:1,value2:function(t){return $(t).data('id');},value3:3} But, within the plugin, the object is equal to { value1=1, value3=3, value2=function()}, and if posted, value2 is sent as undefined. I've found that I could access the value using settings.post.value2(this), however, I don't know how this helps me. I suppose I could loop through the object and evaluate each property, but this just doesn't seem right. What is the proper way of doing this? Thank you http://jsbin.com/sedoqeluni/1/ editSelect hello hello
has title: Accessing and evaluating configuration values within jQuery plugin
has comment: http://stackoverflow.com/comment/46836902
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29322954
type: Question
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/29322954
linked to: http://stackoverflow.com/q/5999998
score: 0
answer count: 1

http://stackoverflow.com/q/29243854
type: AnsweredQuestion
has body: In my angularjs apps, I usually parse a JSON string by using angular.fromJson, like so: var myObject=angular.fromJSON(jsonString); However, it seems that I would obtain the same result by using $scope.$eval: var myObject=$scope.$eval(jsonString); See this fiddle Or by using vanilla javaScript, like so: var myObject=JSON.parse(jsonString); Is there any particular reason to use angular.fromJSON rather than JSON.parse? Is there any possible issue when using $scope.$eval to parse a JSON string?
downvote count: 0
accepted answer: http://stackoverflow.com/a/29243863
score: 23
type: Question
has answer: http://stackoverflow.com/a/29243863
tagged with: http://stackoverflow.com/tag/json
has title: Difference between angular.fromJson and $scope.$eval when applied to JSON string
has answer: http://stackoverflow.com/a/38559602
answer count: 2
possible better answer: http://stackoverflow.com/a/38559602
upvote count: 23
tagged with: javascript
favorite count: 0
tagged with: angularjs

http://stackoverflow.com/q/29311842
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29318284
has body: I have a form and a json file. I want to push data entered into the form elements and create new json objects within the main array. &lt;html ng-app="example"&gt; &lt;div ng-controller="ListController"&gt; &lt;form name="myform" ng-submit="addThis()"&gt; &lt;input type="text" ng-model="model1"&gt; &lt;input type="text" ng-model="model2"&gt; &lt;/form&gt; &lt;/div&gt; &lt;/html&gt; JS: var app = angular.module('example', []); app.controller('ListController', ["$scope", "$http", function($scope) { $http.get("_/js/data.json").success(function(data) { $scope.mydata = data; }); $scope.addThis = function() { $scope.mydata.push({ model1:$scope.mydata.keyname1, model2:$scope.mydata.keyname2 }); }; }]); What am I doing wrong?
type: Question
has title: $scope.data.push into json angular
tagged with: http://stackoverflow.com/tag/json
score: 2
answer count: 1
tagged with: push
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: angularjs
upvote count: 2

http://stackoverflow.com/comment/46909936
has text: If I clicked hires button it is 50 then I clicked print1015 it's 10 and then all prices stay 10.00. Why is that?
type: Comment
comment on: http://stackoverflow.com/a/29349903
score: 0
type: AnswerComment

http://stackoverflow.com/q/29271517
has answer: http://stackoverflow.com/a/29271542
has answer: http://stackoverflow.com/a/29271694
type: Question
has answer: http://stackoverflow.com/a/29271631
has answer: http://stackoverflow.com/a/29271820
has body: My concept is this: There is div-1 and div-2. div-2 will be hidden and the div-1 will be shown. There is a button in the shown div-1. After clicking the button the div-1 will be hidden and the div-2 will be shown. Here is my code: REPORT A SUSPICIOUS MEDICINE Next Report But the code isn't working :/ Please help me by correcting the code.
downvote count: 0
answer count: 7
tagged with: javascript
tagged with: jquery
tagged with: show-hide
has comment: http://stackoverflow.com/comment/46743752
favorite count: 0
has answer: http://stackoverflow.com/a/29271679
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46743659
has answer: http://stackoverflow.com/a/29271670
has comment: http://stackoverflow.com/comment/46743982
upvote count: 2
has answer: http://stackoverflow.com/a/29271603
type: UnansweredQuestion
has title: jQuery: Hide a div. After clicking a button show that div and hide another one
score: 2
has comment: http://stackoverflow.com/comment/46743709
has comment: http://stackoverflow.com/comment/46744182

http://stackoverflow.com/q/29373303
answer count: 0
tagged with: javascript
type: UnansweredQuestion
has body: I have a web page that I wish the content to be able to be resized by the user. The table gets created from php so it can be less than the available area, often it will be more. The fiddle I made has more content than the available area (this post would not permit it due to the size) and it expands off the bottom of the screen. I got the width to resize properly but the fiddle does not show it. The problem can be reporduced with the css from the fiddle and the html there or the html here with the row for the table copied about 20 times. I would like a scrollbar when the data exceeds the available screen area and the table to fit the content area. I can only get the scroolbar to show up if I change the height from 100% to a fixed pixel length. But then it will not resize. I was able to resize the content with javascript but can not puzzle out how to fix the table. I tried style.height and offsetheight but offsetheight is read only and style.height changes but the table does not. Here is the fiddle. Here's the code: Whole Number Whole Nbr Type Size Revision Other Nbr Sheet Nbr Of Sheets Frame Nbr Of Frames Doc Title Volume Note Prnt Obs FilePath FileName FileExtension Base Doc Acc Doc Nbr CommonSubDirectory LatestImage SS8618 DD A 4 7 12 1 1 BONDING, ADHESIVE, OF ACOUSTIC INTERIOR 63642 No No 200312ACD\52819 0060 PDF Yes \CDVolumes 0
type: Question
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46927959
tagged with: php
tagged with: css
has title: How to size a table to fill the available area?
has comment: http://stackoverflow.com/comment/46935646
score: 0
has comment: http://stackoverflow.com/comment/46929254

http://stackoverflow.com/comment/46920427
has text: Updated (changed `$(this)` to `$('div')` in the condition). Check the updated Fiddle.
type: AnswerComment
comment on: http://stackoverflow.com/a/29369432
score: 0
type: Comment

http://stackoverflow.com/a/29227309
answers question: http://stackoverflow.com/q/29227150
accepted answer of: http://stackoverflow.com/q/29227150
upvote count: 3
type: AcceptedAnswer
has body: Here's a way to use $.getScript() to load multiple files using a counter: function getScripts(list, fn) { var cntr = list.length; for (var i = 0; i &lt; list.length; i++) { $.getScript(list[i], function() { --cntr; if (cntr === 0) { fn(); } }); } } getScripts(["file1.js", "file2.js"], function() { // all scripts loaded here }); Here's a way using promises: function getScripts(list) { var promises = []; for (var i = 0; i &lt; list.length; i++) { promises.push($.getScript(list[i])); } return $.when.apply($, promises); } getScripts(["file1.js", "file2.js"]).then(function() { // all scripts loaded here }); You can use these same concepts for your CSS files.
type: Answer
downvote count: 0
score: 3

http://stackoverflow.com/q/29230742
has answer: http://stackoverflow.com/a/29231885
answer count: 2
has title: Find all variations of word with eBay api
has comment: http://stackoverflow.com/comment/46778922
accepted answer: http://stackoverflow.com/a/29231885
score: 2
type: AnsweredQuestion
downvote count: 0
tagged with: javascript
favorite count: 0
possible better answer: http://stackoverflow.com/a/29429813
type: Question
has body: I would like to implement this : If the input is "diamond" it needs to search eBay for every variation of the word diamond beginning with d. (Daimond, diaomnd etc) to look for people who have listed things incorrectly. Like this website: auctionbloopers.com. I have tried to use api. I am stuck here. I don't know how I can find all the variations. My code: Search: eBay.com eBay.at eBay.be eBay.ca eBay.ch eBay.uk eBay.au eBay.de eBay.es eBay.fr eBay.ie eBay.it eBay.nl
has answer: http://stackoverflow.com/a/29429813
tagged with: ebay-api
upvote count: 2

http://stackoverflow.com/a/34947212
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29360561
has body: Please try using disablePan: false jQuery(document).ready(function($) { $section = $("#my-zoom"); var $panzoom = $section.find('.panzoom').panzoom({ $zoomIn: $section.find(".zoom-in"), $zoomOut: $section.find(".zoom-out"), $zoomRange: $section.find(".zoom-range"), $reset: $section.find(".reset"), startTransform: 'scale(0.95)', maxScale: 1.3, disablePan: false, increment: 0.1, contain: true, }).panzoom('zoom', true); }); This works for me

http://stackoverflow.com/q/29274030
has comment: http://stackoverflow.com/comment/46747391
upvote count: 1
type: Question
tagged with: javascript
has body: Is it possible to find all elements that are NOT inside another element with CSS selector? // finding all links with class test var a = document.querySelectorAll('a.test'); // finding all links with class test insode div class box var a = document.querySelectorAll('div.box a.test'); // finding all links with class test that are NOT inside div class box (not working) var a = document.querySelectorAll(':not(.box) a.test'); var a = document.querySelectorAll('div:not(.box) a.test');
downvote count: 0
favorite count: 0
linked to: http://stackoverflow.com/q/14900763
has title: CSS Selector: Finding elements NOT child of another element
type: UnansweredQuestion
duplicate of: http://stackoverflow.com/q/14900763
tagged with: css
answer count: 0
score: 1
has comment: http://stackoverflow.com/comment/46747448

http://stackoverflow.com/comment/46777351
score: 0
type: QuestionComment
type: Comment
has text: This is not JSON. This is a nested JavaScript object/array. JSON is **language-independent**, **textual** data representation, much like XML, YAML or CSV.
comment on: http://stackoverflow.com/q/29290111

http://stackoverflow.com/comment/46759702
has text: thanks master for the reply, i was waiting for it :) i already inspected so well your demo page. Indeed, my php script now creates the fpslidesContainer div with "width: '.$slides*100).' %" and then the sldie fp-slide divs (with "width: '.(100/$slides).'%" .. but, even doing so, it doesnt work. It seems the page is not able to split anchors inside the page and inside a section. Divs are populated by a php script called by a js function.. i will try to populate divs with php directly. Thanks in advance.
type: Comment
score: 0
comment on: http://stackoverflow.com/a/29263176
type: AnswerComment

http://stackoverflow.com/comment/46778975
has text: Are you sure `this` is the form?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29290498

http://stackoverflow.com/a/42978647
score: 4
upvote count: 4
answers question: http://stackoverflow.com/q/29253464
downvote count: 0
has body: This problem is usualy caused by the shadow near point is too close to your object. For better understanding try to do the follow: after you create your light you can add a camera helper to show you the bounderies of the light. var spotLight = new THREE.SpotLight(0xffffff, 0.3, 0, Math.PI / 2); spotLight.position.set(0, 100, 0); sunLight.castShadow = true; var shadowCameraHelper = new THREE.CameraHelper(spotLight.shadow.camera); shadowCameraHelper.visible = true; Kepp changing these two values untile you reach your goal. spotLight.shadow.camera.near = 50; spotLight.shadow.camera.far = 150; Keep in mind that the more you set spotLight.shadow.camera.far the more that shadow will be fuzzy and blury. You can always check the threejs on this example threejs example
type: Answer

semantic-mediawiki
tag name: semantic-mediawiki
type: Tag
tags question: http://stackoverflow.com/q/29259287

http://stackoverflow.com/comment/46687246
type: QuestionComment
has text: The problem is probably that `strings` is not defined. Hey, these error messages, they are often quite helpful. Why do you think `strings` would be defined. Where do you think it is coming from? What is it supposed to contain? It would be undefined whether or not you are trying to send data with ajax.
score: 0
comment on: http://stackoverflow.com/q/29240504
type: Comment

http://stackoverflow.com/a/29266671
has body: global.js should be loaded after jQuery
answers question: http://stackoverflow.com/q/29266614
accepted answer of: http://stackoverflow.com/q/29266614
upvote count: 1
type: AcceptedAnswer
type: Answer
downvote count: 0
score: 1

http://stackoverflow.com/comment/46855851
type: AnswerComment
score: 0
type: Comment
has text: Out of curiosity, does it now work in Internet Explorer and Safari?
comment on: http://stackoverflow.com/a/29332174

http://stackoverflow.com/a/29243683
score: 1
has body: Try using the new date function var dateString = 'Mar 10, 2015'; new Date(date_string)
upvote count: 1
answers question: http://stackoverflow.com/q/29243645
downvote count: 0
type: Answer

http://stackoverflow.com/comment/46870820
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29341933
type: AnswerComment
has text: When supplying a completely different way of doing the task, best to explain to the OP "why" you did it that way :) (also that can be reduced to a single line using text with a function.

http://stackoverflow.com/comment/46649692
type: QuestionComment
has text: php is only executed in files that contain a php extension (i.e. `.php`, `.phtml`, `.php5`, etc.) since your php is not in a php file, the webserver won't execute this code. A better thing to do would be to create an AJAX request to pull that data in asynchronously from the server where php CAN be executed
comment on: http://stackoverflow.com/q/29220230
score: 0
type: Comment

http://stackoverflow.com/q/29283475
has answer: http://stackoverflow.com/a/29286554
has title: Javascript, simplifying object transformation
upvote count: 3
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29285923
tagged with: underscore.js
has body: So I have a function that takes an object and turns it into a (slightly) different one. I did a first take of it to just get it working, and now I would like to simplify this function, I feel like I could cut down a bit but could use some help doing it. So the object gets passed in like so {"module1":{"calender":["yes","no","maybe"]}} and gets spit out like so {module1: "calender,yes,no,maybe"} So here is what I have now : function(obj) { for (i in obj) { for (p in obj[i]) { var decodeModule = encodeURIComponent(decodeURIComponent(i)); var newObj = {}; var frontOf = encodeURIComponent(p); var backOf = "" //needs work var lastItem = obj[i][p][obj[i][p].length - 1]; for (y in obj[i][p]) { if (obj[i][p][y] == lastItem) { //replace "," in last item backOf += encodeURIComponent(decodeURIComponent(obj[i][p][y])); } else { backOf += encodeURIComponent(decodeURIComponent(obj[i][p][y])) + ","; } }; newObj[decodeModule] = frontOf + "," + backOf; } } return newObj; } So I already know that I don't need to loop the second loop ( for (p in obj[i]) ) because that level will always only have 1 item. Other than that I am a bit stuck on how to clean this bit up - it was suggested to me to maybe check out .reduce or .map to use less code? I am also using underscore in my code, if it would help here. Would LOVE it if someone could help me make this a bit more elegant. Thanks for reading!
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
favorite count: 0
score: 3

http://stackoverflow.com/q/29329520
type: Question
score: 0
answer count: 3
upvote count: 1
downvote count: 1
has answer: http://stackoverflow.com/a/29330006
tagged with: javascript
tagged with: jquery
favorite count: 0
linked to: http://stackoverflow.com/q/2610497
has body: I have a login page in which there are 3 input elements. When on onblur if this element is empty i want to change the placeholder value. This changed placeholder value should be in different color(ex:red). How to achieve this?
tagged with: http://stackoverflow.com/tag/html
has title: how to change placeholder color with javascript when onblur event occured?
has answer: http://stackoverflow.com/a/41393823
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46848625
has answer: http://stackoverflow.com/a/29329609

jquery-plugins
tags question: http://stackoverflow.com/q/29332148
tags question: http://stackoverflow.com/q/29308147
tags question: http://stackoverflow.com/q/29282626
tags question: http://stackoverflow.com/q/29242474
type: Tag
tags question: http://stackoverflow.com/q/29345278
tags question: http://stackoverflow.com/q/29304556
tags question: http://stackoverflow.com/q/29319912
tag name: jquery-plugins
tags question: http://stackoverflow.com/q/29271783
tags question: http://stackoverflow.com/q/29372796
tags question: http://stackoverflow.com/q/29246634
tags question: http://stackoverflow.com/q/29253565
tags question: http://stackoverflow.com/q/29298356

http://stackoverflow.com/q/29358555
has comment: http://stackoverflow.com/comment/46901558
favorite count: 0
has answer: http://stackoverflow.com/a/29360630
upvote count: 2
has comment: http://stackoverflow.com/comment/46904057
accepted answer: http://stackoverflow.com/a/29360630
type: AnsweredQuestion
score: 0
downvote count: 2
has body: I'm calling on any Canvas experts for help! I need a jQuery/Canvas plugin fixed. I’m pretty weak on the Canvas side of things. Basically I want to be able to blur out an image, which I have done using this Canvas script: http://www.quasimondo.com/BoxBlurForCanvas/FastBlur2Demo.html https://github.com/Quasimondo/QuasimondoJS/blob/master/blur/StackBoxBlur.js But it doesn’t work with an image hosted on another domain (I have everything on app.example.com and api.example.com). So I need it updated to respect CORS/crossOrigin. I have documented the issue with the original developer, but I doubt he is going to fix it (been years since he touched it in a major way). It would probably be easy hours work for a Canvas guru. The plugin works by calling this: stackBoxBlurImage( sourceImageID, targetCanvasID, radius, blurAlphaChannel, iterations ); I have tried doing this: var img = document.getElementById( imageID ); img.crossOrigin = ''; var w = img.naturalWidth; var h = img.naturalHeight; But it doesn't fix the issue. Ideally I'd like to be able to feed in a $('.image') (or just a URL, as I don't need the un-blurred image messing up the DOM), and $('.canvas') element, rather than two ID's. That way it could be a little easier to switch out the blurred image on an event (like blurring out an image when the menu opens etc). If it matters, I'm using this in an Ember app. I don't want to use some sort of PHP proxy script either, seems like the hack way to go. UPDATE I've added an example of it breaking here: http://dev.rickanddrew.com/ And the image is here. If you look at response header, CORS is setup correctly I think: http://image.rickanddrew.com/image.jpg ANSWER Thanks to Ken below, I figured it out! This is the way I have it running now: function stackBoxBlurImage( imageURL, $canvasObj, radius, blurAlphaChannel, iterations ) { // Cache vars var img = document.createElement('img'); var canvas = $canvasObj[0]; // Make it work with CORS img.crossOrigin = ''; img.src = imageURL…
has comment: http://stackoverflow.com/comment/46903893
type: Question
tagged with: canvas
has title: Challenge: Fix a Canvas plugin to work with CORS?
tagged with: javascript
has comment: http://stackoverflow.com/comment/46904165
tagged with: jquery
tagged with: cors
answer count: 1

http://stackoverflow.com/q/29364957
accepted answer: http://stackoverflow.com/a/29366805
tagged with: angularjs-scope
answer count: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/46914184
favorite count: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/29366805
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29365275
score: 1
has answer: http://stackoverflow.com/a/29365275
has title: AngularJS: directive with HTML and angular expressions, "compile" the contents with the outer scope
upvote count: 1
has comment: http://stackoverflow.com/comment/46913442
type: Question
tagged with: angularjs-directive
has body: I'm new to AngularJS, sorry if I don't use the correct words for naming things. I'm trying to implement a directive that can accept any kind of text (including HTML tags and angular expressions). This directive needs to treat that text and do some stuff with it: for example, if it finds any image inside of it, the image is downloaded and the original URL is replaced with the local URL. I need to "compile" the contents of the directive since some images might be in scope variables (ng-src="{{whatever}}"). I cannot know the names of the scope variables. I've read a lot of stuff about directives, transclude, shared/isolated scope, $compile, etc. but I can't make it work and the more I read the more confused I get. I decided to start with a simple case: a directive that gets a simple angular expression (please notice that the 'whatever' name can change): &lt;format-text&gt;{{whatever}}&lt;/format-text&gt; I want to get the text inside the 'whatever' variable inside of the directive. I tried a lot of things, but I can't get it to work. This is my latest test: angular.module('mymodule').directive('formatText', function($compile) { return { restrict: 'E', scope: true, transclude: true, link: function(scope, element, attrs, ctrl, transclude) { transclude(scope, function(clone, outerScope) { var template = '&lt;span&gt;'+clone.html()+'&lt;/span&gt;'; var compiled = $compile(template)(outerScope); console.log(compiled.html()); }); } }; }); This directive writes the following in the console: {{whatever}} and I'd like to get the contents of the variable. The variable 'whatever' is defined in the scope and it's resolved ok in the view. Anyone knows how can I achieve what I'm trying to do? EDIT: I created a jsfiddle for it, I don't know why the 'whatever' contents aren't written in the HTML but if you look at the console you'll see that inside compiled.html() the angular expression isn't replaced. http://jsfiddle.net/8ngcwxen/ Thank you!
has comment: http://stackoverflow.com/comment/46913184
tagged with: javascript

http://stackoverflow.com/q/29358499
score: 3
tagged with: javascript
upvote count: 3
tagged with: ecmascript-6
answer count: 1
has body: I have a module written in pure ES6 that I would like to leverage in a separate web application. The module's entry point is main.js and contains the following: main.js export { A } from './a'; export { B } from './b'; export { C } from './c'; When I use systemJS to import this main.js, it then attempts to resolve these dependencies local to the web application, not the module. GET http://localhost:9000/dist/a.js 404 (Not Found) I see there's support for relative dynamic loading already, but it involves passing an extra function to the System.import function, which I'm not using--I'm using ES6 syntax. Are there any examples or best practices of how to do this? Please and thank you.
favorite count: 0
has answer: http://stackoverflow.com/a/29688689
accepted answer: http://stackoverflow.com/a/29688689
type: AnsweredQuestion
downvote count: 0
has title: Relative Dynamic Loading with systemJS, using ES6/Babel syntax
tagged with: babeljs
type: Question
tagged with: systemjs

http://stackoverflow.com/a/29321231
has body: The problem is here: range.on('input', function() { // this sets the html content of all elements with class range-value // to the value of the slider that is being moved value.html(this.value); }); The fix that I am showing simply moves the span tag into the div, this is just one way of knowing what .range-value belongs to witch slider. Also since value="1" is hard coded into the range sliders, you can also just have the span tags start with the same value 1 $('.input-range').on('input', function() { $(this).next('.range-value').html(this.value); }); 1 1 I have removed the CSS and most of the HTML from the answer as it is not relevant to the problem, but to see it working in the full form here is a demo
upvote count: 4
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29321046
score: 4
answers question: http://stackoverflow.com/q/29321046
type: Answer
has comment: http://stackoverflow.com/comment/46834061

http://stackoverflow.com/q/29329336
has body: I use jQuery Validate plugin for a form. By now I have not succeeded in validating my custom radio buttons. I have read many posts on how to solve this problem, for example using ignore, but this has not helped. Here comes my little code: HTML selection #1 selection #2 JS $('#my-form').validate({ rules: { myText: { required: true }, myRadio: { required: true } }, errorClass: 'error_validate', errorPlacement: function (label, element) { label.insertAfter(element); } }); JSFIDDLE with CSS: https://jsfiddle.net/d0nf4pqf/ Anybody knows how to enable validation for the radio buttons?
favorite count: 0
type: UnansweredQuestion
downvote count: 1
has answer: http://stackoverflow.com/a/29329423
has title: jQuery Validate does not work on custom radio buttons
upvote count: 5
tagged with: jquery-validate
type: Question
answer count: 1
tagged with: javascript
tagged with: jquery
score: 4
has comment: http://stackoverflow.com/comment/46848399
has comment: http://stackoverflow.com/comment/46848396

http://stackoverflow.com/a/29964058
answers question: http://stackoverflow.com/q/29369866
score: 0
has body: A simple implementation for this can be done using the plugin See demo , very good link
type: Answer

http://stackoverflow.com/q/29276660
answer count: 3
has comment: http://stackoverflow.com/comment/46751956
has comment: http://stackoverflow.com/comment/46762797
has body: I am trying to download a File from google drive using Google SDK API using node.js. But I am unable to write/save file at server side - node.js Code:- var GoogleTokenProvider = require("refresh-token").GoogleTokenProvider, async = require('async'), fs = require("fs"), request = require('request'), _accessToken; var _XMLHttpRequest = require("xmlhttprequest").XMLHttpRequest; var https = require('https'); const CLIENT_ID = ""; const CLIENT_SECRET = ""; const REFRESH_TOKEN = ''; const ENDPOINT_OF_GDRIVE = 'https://www.googleapis.com/drive/v2'; async.waterfall([ //----------------------------- // Obtain a new access token //----------------------------- function(callback) { var tokenProvider = new GoogleTokenProvider({ 'refresh_token': REFRESH_TOKEN, 'client_id': CLIENT_ID, 'client_secret': CLIENT_SECRET }); tokenProvider.getToken(callback); }, //-------------------------------------------- // Retrieve the children in a specified folder // // ref: https://developers.google.com/drive/v2/reference/files/children/list //------------------------------------------- function(accessToken, callback) { _accessToken = accessToken; request.get({ 'url': ENDPOINT_OF_GDRIVE + '/files?' + "q='root' in parents and (mimeType = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document')", 'qs': { 'access_token': accessToken } }, callback); }, //---------------------------- // Parse the response //---------------------------- function(response, body, callback) { var list = JSON.parse(body); if (list.error) { return callback(list.error); } callback(null, list.items[0]); }, //------------------------------------------- // Get the file information of the children. // // ref: https://developers.google.com/drive/v2/reference/files/get //------------------------------------------- function(children, callback) { var xhr = new _XMLHttpRequest(); xhr.open('GET', children.downloadUrl); xhr.setRequestHeader('Authorization', 'Bearer ' + _accessToken); xhr.onload = function() { console…
has answer: http://stackoverflow.com/a/34141409
accepted answer: http://stackoverflow.com/a/29296405
tagged with: javascript
score: 6
has comment: http://stackoverflow.com/comment/61272664
linked to: http://stackoverflow.com/q/1021086
has title: Unable to download file from Google Drive using API - node.js
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29362085
downvote count: 0
has answer: http://stackoverflow.com/a/29362085
has comment: http://stackoverflow.com/comment/46778894
favorite count: 0
tagged with: google-drive-api
type: Question
linked to: http://stackoverflow.com/q/11944932
linked to: http://stackoverflow.com/q/11906904
upvote count: 6
tagged with: node.js
has comment: http://stackoverflow.com/comment/46785019
has answer: http://stackoverflow.com/a/29296405

http://stackoverflow.com/comment/46778036
score: 0
type: AnswerComment
type: Comment
has text: The reason this works in the jsBin is that jsBin does not return an error for the POST request, and the `.then()` function only adds success handlers with the way it has been used here.
comment on: http://stackoverflow.com/a/29290328

http://stackoverflow.com/q/29283923
type: Question
has answer: http://stackoverflow.com/a/29284130
has answer: http://stackoverflow.com/a/29284217
has title: JQuery - Dynamically created element css not working
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/29284217
answer count: 3
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
has answer: http://stackoverflow.com/a/29284259
favorite count: 0
tagged with: css
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/7051219
score: 1
has body: I have created a table dynamically using JQuery. But I cant able to apply css for the created table column. Here the sample link in codepen codepen. I want set width:100px for 1st column. Plese help me in this. Thanks in advance...
upvote count: 1
possible better answer: http://stackoverflow.com/a/29284130

http://stackoverflow.com/comment/46740966
type: QuestionComment
comment on: http://stackoverflow.com/q/29269978
has text: move countdown() outside the document ready method
score: 0
type: Comment

http://stackoverflow.com/comment/46884690
comment on: http://stackoverflow.com/q/29349473
type: Comment
type: QuestionComment
has text: `$getId = echo '';`??
score: 0

http://stackoverflow.com/comment/46737678
score: 0
comment on: http://stackoverflow.com/a/29268017
type: Comment
type: AnswerComment
has text: This seem to do no difference for me.

http://stackoverflow.com/comment/46684074
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29238438
has text: it works, but I'm not sure that it is the right way..

http://stackoverflow.com/q/29258170
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29258560
tagged with: angularjs
has title: Need to stop click again with angularjs
has comment: http://stackoverflow.com/comment/46719124
has comment: http://stackoverflow.com/comment/46719441
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46718898
type: Question
has comment: http://stackoverflow.com/comment/46718763
score: 0
has answer: http://stackoverflow.com/a/29258560
answer count: 1
has body: when user clicks the button it shows the spinner icon until finish the task.But still user can click the button again.How can I stop it ? Spinner directive HTML Send

http://stackoverflow.com/comment/47313183
comment on: http://stackoverflow.com/q/29281750
type: Comment
has text: @Cerbrus I think both `.attr()` and `.data()` methods of fetching HTML5 `data-` attributes are legit. The only issue is that `.data()` does not allow for writing (which OP doesn't need in this case, but good to know), and that it fetches the value at runtime and dynamic changes to the attribute value will not be reflected in `.data()`, but will do so in `.attr()`.
score: 0
type: QuestionComment

http://stackoverflow.com/comment/46848493
comment on: http://stackoverflow.com/q/29329367
has text: I didn't downvote, but maybe it would be helpful if you explain at the beginning of your question what you are trying to achieve and why you are doing what you are doing...
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/46829530
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/29318888
has text: Where is the "html div" on page 1 or page 2? If it's on page 2 then you'll need to pass the text and operation in the query string of the call to page 2.
type: Comment

http://stackoverflow.com/comment/82356400
score: 0
comment on: http://stackoverflow.com/a/45177550
type: AnswerComment
has text: Shouldn't this be called `allValues` instead, or even better, make `Promise.all` accept object parameters and behave this way?
type: Comment

http://stackoverflow.com/a/29270570
score: 1
has body: Please check out this recording library: https://github.com/mattdiamond/Recorderjs And an implementation of it on this blog post: http://www.smartjava.org/content/record-audio-using-webrtc-chrome-and-speech-recognition-websockets
accepted answer of: http://stackoverflow.com/q/29268780
answers question: http://stackoverflow.com/q/29268780
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46747371
type: Answer
has comment: http://stackoverflow.com/comment/46744688
downvote count: 0

http://stackoverflow.com/q/29248017
accepted answer: http://stackoverflow.com/a/29248033
type: Question
answer count: 8
score: 5
has answer: http://stackoverflow.com/a/29248212
downvote count: 0
has title: jQuery SELECT with Textarea
tagged with: javascript
possible better answer: http://stackoverflow.com/a/29248099
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/29248386
has answer: http://stackoverflow.com/a/29248211
has answer: http://stackoverflow.com/a/29248099
has answer: http://stackoverflow.com/a/29248109
has answer: http://stackoverflow.com/a/29248048
has answer: http://stackoverflow.com/a/29248078
has body: Just wondering if someone can help me on a problem, I don't fully undersand why it doesn't work. I have this fiddle, http://jsfiddle.net/uomt99zp/ What it is doing: When you select from the drop down box, insert that word into the textarea. Which it DOES, when the textarea isn't "touched". If you type something into the box, and then try to select an item, it doesn't work. I'm not sure why this doesn't update the textarea. Perhaps someone can shed some light on this issue? Select One Test1 Test2 Test3 $('.templatesAvailableFields').on('change', function() { var text = $('.templatesAvailableFields option:selected').text(); $('.template').append(text); });
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29248033
has comment: http://stackoverflow.com/comment/46701187
upvote count: 5

http://stackoverflow.com/comment/46888537
type: Comment
comment on: http://stackoverflow.com/q/29351601
has text: come to think of it, I could just pass in the 2 values i need though the URL, seems a bit unneeded though. still dont know how to get the actual form title to display though
score: 0
type: QuestionComment

http://stackoverflow.com/a/29305032
downvote count: 0
has body: use $(this).next(): $(".show").change(function () { if ($(this).val() == "1") { $(this).next(".text_area").show(); } else { $(this).next(".text_area").hide(); } }); You have to make use of keyword this. $(this) works within the event of context of your selector. As you have class name as a selector, so you should note that it returns a collection. It means if you have more than one element then it will refer to all and this refers to the event applied on the current selector in the collection.
answers question: http://stackoverflow.com/q/29304902
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/a/38048145
score: -2
answers question: http://stackoverflow.com/q/29299704
has comment: http://stackoverflow.com/comment/63535588
downvote count: 2
has body: To detect the operating system on the client machine, your script can analyze the value of navigator.appVersion or navigator.userAgent. Below is a simple example of a script that sets the variable OSName to reflect the actual client OS. for example, var OSName="Unknown OS"; if (navigator.appVersion.indexOf("Win")!=-1) OSName="Windows"; if (navigator.appVersion.indexOf("Mac")!=-1) OSName="MacOS"; if (navigator.appVersion.indexOf("X11")!=-1) OSName="UNIX"; if (navigator.appVersion.indexOf("Linux")!=-1) OSName="Linux"; document.write('Your OS: '+OSName);
type: Answer
upvote count: 0

http://stackoverflow.com/comment/46731960
score: 0
type: Comment
type: QuestionComment
has text: @Alex, how you check that `myService` is _undefined_, i small change your fiddle, but seems that all work: [fiddle](https://jsfiddle.net/yz9spfob/2/)
comment on: http://stackoverflow.com/q/29264525

http://stackoverflow.com/q/29373336
has comment: http://stackoverflow.com/comment/46933892
tagged with: promise
has title: Testing promises and sync functions that throw errors
tagged with: node.js
type: AnsweredQuestion
tagged with: bluebird
has comment: http://stackoverflow.com/comment/46933101
tagged with: unit-testing
type: Question
has comment: http://stackoverflow.com/comment/46933436
has comment: http://stackoverflow.com/comment/46933162
has body: I'm trying to build and test a function at the same time. Testing makes sense and I love it in theory, but when It comes down to it it always is a pain in the behind. I have a function that takes a string and throws errors when something goes awry if all goes well it's going to return the original text argument and therefore a truthy value, if not it should be caught by the promise it's either in or itself as the promise. This is the test / what I actually want to do (which doesn't work). var main = require("./index.js") var Promise = require("bluebird") var mocha = require("mocha") var chai = require("chai") var chaiPromise = require("chai-as-promised") chai.use(chaiPromise) var shouldThrow = [ "random", // invalid non-flag "--random", // invalid flag "--random string", //invalid flag "--wallpaper", // invalid flag w/ match "--notify", // invalid flag w/ match "wallpaper", // valid non-flag missing option(s) image "wallpaper image.jpg" // invalid flag value "wallpaper http://cdn.shopify.com/s/files/1/0031/5352/t/28/assets/holstee-calendar-2015-03-flow-desktop.jpg?12375621748379006621", // invalid flag value "wallpaper //cdn.shopify.com/s/files/1/0031/5352/t/28/assets/favicon.ico?12375621748379006621", // invalid flag value "wallpaper http://cdn.shopify.com/s/files/1/0031/5352/t/28/assets/favicon.ico?12375621748379006621", // invalid flag value "wallpaper https://cdn.shopify.com/s/files/1/0031/5352/t/28/assets/favicon.ico?12375621748379006621", // invalid flag value "wallpaper https://cdn.example.com/s/files/1/0031/5352/files/holstee_logo_2.png?4803", // invalid flag value "wallpaper https://cdn.shopify.com/s/files/1/0031/5352/t/28/assets/holstee-calendar-2015-03-flow-desktop.jpg?12375621748379006621 --queue", // invalid flag value "wallpaper https://cdn.shopify.com/s/files/1/0031/5352/t/28/assets/holstee-calendar-2015-03-flow-desktop.jpg?12375621748379006621 --queue "+moment().subtract(1, "month").format("YYYY-MM-DD-HH-mm"), // invalid flag value "wallpaper https:/…
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/46931063
has answer: http://stackoverflow.com/a/36491400
accepted answer: http://stackoverflow.com/a/36491400
score: 0
has comment: http://stackoverflow.com/comment/46933367

http://stackoverflow.com/q/29342558
tagged with: mysql
type: Question
has body: I am creating a custom MySQL database query UI. Inside this UI I have a Query Builder interface that I would like to dynamically append query properties based on the user selections in order to create a dynamic query. Please see the below picture for a visual description From the picture above I would like to append CHARACTER_SET after the FROM and append as asterisk when ALL is selected from the table and so forth with the key being the positions where I place the generated variables. How can I achieve this with JQuery? My JavaScript Selecting a Table $(document).on("change", ".tbl_list", function () { var tbls = new Array(); $("input:checkbox[name='tbl[]']:checked").each(function () { tbls.push($(this).val()); }); var tbl = tbls.join('|'); var db = window.sessionStorage.getItem("db"); $.ajax({ type: "POST", url: "ajax2.php", data: { tbl: tbl, db: db }, success: function (html) { console.log(html); $("#tblField").html(html).show(); } }); }); Selecting All option $(document).on("click", ".tblall", function () { if (this.checked) { // Iterate each checkbox $('.tblst').each(function () { this.checked = true; }); } else { $('.tblst').each(function () { this.checked = false; }); } }); EDIT As requested HTML for my DIVs Table Selector while ( $row = mysqli_fetch_array ( $tbl_list ) ) { ?> <input type="checkbox" name="tbl[]" class="tbl_list" value="<?php echo $row [0]; ?>" /> <?php echo $row [0]; ?> Query Builder Query Builder SELECT FROM What I have tried so far Using .append I can add data to the end of the paragraph so this would be ideal for my Table name. However its a function and i'm not sure how I would implement the code below into my select table function. $("#qryView > p").append(" " tblName);
has comment: http://stackoverflow.com/comment/46873483
has comment: http://stackoverflow.com/comment/46874031
has comment: http://stackoverflow.com/comment/46874483
answer count: 1
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/29344096
tagged with: ajax
score: 0
has comment: http://stackoverflow.com/comment/46873856
has comment: http://stackoverflow.com/comment/46873129
has answer: http://stackoverflow.com/a/29344096
type: AnsweredQuestion
has title: Dynamic Query Builder

http://stackoverflow.com/comment/46723195
has text: It's not an issue with the node, and neither is it a trivial issue. It is because the `.data()` attribute can only be used to **read** HTML5 data attributes and to access the jQuery data object. If you want to modify the DOM value, you have to stick to `.attr()`
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29260292
score: 0

http://stackoverflow.com/q/29315829
type: Question
tagged with: http://stackoverflow.com/tag/json
has title: How do I change the value of a key in localStorage inside JSON?
score: 0
answer count: 1
tagged with: javascript
has body: I've got a calendar. Events in the calendar are written as JSON and stored in localStorage like following: key = events //All events as Object value = { "Date":"31-3-2015", "Event":"Football match", "Participants":"Italy - Germany", "Description":"Support our team with your friends!"}, "Date":"2-4-2015", "Event":"First-night play", "Participants":"Famous actors", "Description":"Going out to the theatre with my gf"} etc... I can also change each line of an event in the calendar. But then I need a new value to be stored in localStorage. E.g. //Old version ""Date":"2-4-2015", "Event":"First-night play", "Participants":"Famous actors", "Description":"Going out to the theatre with my gf"} //Edited version "Date":"2-4-2015", "Event":"First-night play", "Participants":"Famous actors", "Description":"Let my gf visit the play alone"} Here's my function to add new events or to edit the existing ones: var addNewEvent = function() { var events = JSON.parse(localStorage.getItem('events')) || []; events.push( {Date: storageNewDate, Event: storageEvent, Participants: storageParticipants, Description: storageDescription}); localStorage.setItem('events', JSON.stringify(events)); }; But it works only ones for localStorage (if you decide to replace an existing event with new one it won't reset localStorage), though visually you'll see your new event in the calendar cell. So, how do I refer let's say to "Description" ("Event"? "Participants"?...) in localStorage in my case to re-set the value?
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29316030
tagged with: local-storage

http://stackoverflow.com/a/29286472
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/29285961
type: Answer
has body: I would loop through each pair of items using parseInt() to get the numeric value out of the strings and after the loop, compare the value of the incremented index to the number of pairs. EDIT: As suggested by Rick Hitchcock, instead of breaking from the loop, we can just return false if any pair is not ascending or equal and true if the whole loop went through. function isAscending(array) { for (var i = 0; i &lt; (array.length - 1); i++) { if (parseInt(array[i]) &gt; parseInt(array[i+1])) { return false; } } return true; }
upvote count: 1
has comment: http://stackoverflow.com/comment/46771144

http://stackoverflow.com/a/29309560
downvote count: 0
has comment: http://stackoverflow.com/comment/46813221
accepted answer of: http://stackoverflow.com/q/29309447
has comment: http://stackoverflow.com/comment/46813086
has comment: http://stackoverflow.com/comment/46812965
score: 3
answers question: http://stackoverflow.com/q/29309447
has comment: http://stackoverflow.com/comment/46813147
has body: Use a loop. var result = []; var rows = text.split('\n'); for (var r = 0; r &lt; rows.length; r++) { var items = rows[r].split(','); var item = {}; item.code = items[0]; item.name = items[1]; result.push(item); } console.log(result); jsFiddle To get the code just test like this: if (item.state == state &amp;&amp; item.county == county) return item.code;
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46812991
upvote count: 3
has comment: http://stackoverflow.com/comment/46813054
type: Answer
has comment: http://stackoverflow.com/comment/46813121

http://stackoverflow.com/q/29286651
tagged with: javascript
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/46776150
has title: How to make select onchange event happen when page loads?
has answer: http://stackoverflow.com/a/29286721
tagged with: http://stackoverflow.com/tag/html
tagged with: php
linked to: http://stackoverflow.com/q/2490825
has comment: http://stackoverflow.com/comment/46772002
has comment: http://stackoverflow.com/comment/46775957
has comment: http://stackoverflow.com/comment/46771129
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46771336
has body: The code (below) works fine when the user chooses a dropdown option, but the first option is populated by php based on previous pages. How can I get the onchange event for the select to happen when the page loads, picking up the php added value and acting on it? <?php $value = $_GET["value"]; if (!$value){ $value = 'Y'; } ?> See more?&nbsp <option value='<?php echo $value; ?>'><?php echo $value; ?> Y N Additional content goes here
type: Question
has answer: http://stackoverflow.com/a/29296283
accepted answer: http://stackoverflow.com/a/29296283
possible better answer: http://stackoverflow.com/a/29286721
has comment: http://stackoverflow.com/comment/46770704

http://stackoverflow.com/a/29342228
has body: You can use the function closest() for this: $("#title1").closest('.root').find('.price').text(); Demo A second possibility is the use of the parents()-function: $("#title1").parents('.root').find('.price').text(); Demo 2 Reference .closest() .parents()
upvote count: 5
type: Answer
has comment: http://stackoverflow.com/comment/46871390
downvote count: 0
score: 5
answers question: http://stackoverflow.com/q/29342190

http://stackoverflow.com/comment/46720721
type: Comment
has text: I just do foo($scope.form);
type: QuestionComment
comment on: http://stackoverflow.com/q/29259154
score: 0

http://stackoverflow.com/comment/46845826
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29257102
has text: Awesome, thanks again! As for d3.js, I don't know, I guess I'm just not comfortable with the level of complexity in the code. UPDATE: Just came across http://dimplejs.org -- maybe I should just go with that?
score: 0

http://stackoverflow.com/tag/csv
type: Tag
tag name: csv
tags question: http://stackoverflow.com/q/29314098
tags question: http://stackoverflow.com/q/29344291
tags question: http://stackoverflow.com/q/29282765
tags question: http://stackoverflow.com/q/29303523
tags question: http://stackoverflow.com/q/29222662
tags question: http://stackoverflow.com/q/29219704
tags question: http://stackoverflow.com/q/29260863
tags question: http://stackoverflow.com/q/29349808
tags question: http://stackoverflow.com/q/29309498
tags question: http://stackoverflow.com/q/29260103

http://stackoverflow.com/q/29307498
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/46809364
favorite count: 0
accepted answer: http://stackoverflow.com/a/29307579
has comment: http://stackoverflow.com/comment/46809120
type: AnsweredQuestion
has title: loop is not breaking when return statement used
score: 1
has body: I am trying to return an object based on some conditions i.e if some condition is satisfied I want to break the loop and return the object back to the called function. below is my code. function someFun(that,filterID,columnSelctedID) { $.each(that.filters,function(i,filter) { if(filter.id==filterID) { $.each(filter.filters,function(j,column) { if(column.id==$('#' + columnSelctedID + ' .rule-filter-container-column select').val()) { return column; } }); } }); }
has comment: http://stackoverflow.com/comment/46830906
upvote count: 1
has comment: http://stackoverflow.com/comment/46809071
has comment: http://stackoverflow.com/comment/46809086
type: Question
has comment: http://stackoverflow.com/comment/46809203
has answer: http://stackoverflow.com/a/29307579
linked to: http://stackoverflow.com/q/8224375
has comment: http://stackoverflow.com/comment/46809159
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46809224

scope
tags question: http://stackoverflow.com/q/29314921
tags question: http://stackoverflow.com/q/29257743
tags question: http://stackoverflow.com/q/29372659
tags question: http://stackoverflow.com/q/29323223
tags question: http://stackoverflow.com/q/29293105
tags question: http://stackoverflow.com/q/29323476
tags question: http://stackoverflow.com/q/29309568
tag name: scope
tags question: http://stackoverflow.com/q/29253542
tags question: http://stackoverflow.com/q/29228371
tags question: http://stackoverflow.com/q/29226549
tags question: http://stackoverflow.com/q/29269000
type: Tag
tags question: http://stackoverflow.com/q/29242640
tags question: http://stackoverflow.com/q/29238708
tags question: http://stackoverflow.com/q/29271026
tags question: http://stackoverflow.com/q/29282412
tags question: http://stackoverflow.com/q/29246269
tags question: http://stackoverflow.com/q/29321785

http://stackoverflow.com/a/29244025
type: Answer
has comment: http://stackoverflow.com/comment/46694871
has comment: http://stackoverflow.com/comment/46694093
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29243280
has body: Is this basically what you're trying to do? https://jsfiddle.net/02o6a583/3/ $('.slider').slider({ values: [0, 100], slide: function(event, ui){ $('.expand-me').css('width', ui.value + '%'); } });
score: 0
answers question: http://stackoverflow.com/q/29243280

http://stackoverflow.com/comment/136844310
type: AnswerComment
comment on: http://stackoverflow.com/a/29223148
type: Comment
has text: With a good image this could do the trick!
score: 0

http://stackoverflow.com/comment/46696126
score: 0
comment on: http://stackoverflow.com/q/29244569
type: Comment
type: QuestionComment
has text: Oh oh I see - your "download" link sets the Content-Disposition header, right? OK, never mind then. In any case, I'd still look at the HTTP request information to confirm that your outgoing HTTP request contains what you think it does.

http://stackoverflow.com/a/29345497
downvote count: 0
has body: In the provider function, you cannot inject any service or factory. This can only be done at the "$get" method. this.$get = function($injector) { return function(exception,cause){ var rScope = $injector.get('$rootScope'); rScope.$broadcast('exception',exception, cause); } };
answers question: http://stackoverflow.com/q/29345395
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/comment/46718712
comment on: http://stackoverflow.com/q/29258172
score: 0
type: QuestionComment
type: Comment
has text: $self.parents("table:first"); ?

dom
tags question: http://stackoverflow.com/q/29219467
type: Tag
tags question: http://stackoverflow.com/q/29331979
tags question: http://stackoverflow.com/q/29291088
tags question: http://stackoverflow.com/q/29300901
tags question: http://stackoverflow.com/q/29356838
tags question: http://stackoverflow.com/q/29307215
tags question: http://stackoverflow.com/q/29225451
tags question: http://stackoverflow.com/q/29302891
tags question: http://stackoverflow.com/q/29236397
tags question: http://stackoverflow.com/q/29269471
tags question: http://stackoverflow.com/q/29313513
tags question: http://stackoverflow.com/q/29280306
tags question: http://stackoverflow.com/q/29260117
tags question: http://stackoverflow.com/q/29248914
tags question: http://stackoverflow.com/q/29249913
tags question: http://stackoverflow.com/q/29337600
tags question: http://stackoverflow.com/q/29273391
tags question: http://stackoverflow.com/q/29344464
tags question: http://stackoverflow.com/q/29323082
tags question: http://stackoverflow.com/q/29344988
tag name: dom
tags question: http://stackoverflow.com/q/29366639
tags question: http://stackoverflow.com/q/29220995
tags question: http://stackoverflow.com/q/29293785
tags question: http://stackoverflow.com/q/29372118
tags question: http://stackoverflow.com/q/29278660
tags question: http://stackoverflow.com/q/29372694
tags question: http://stackoverflow.com/q/29300629
tags question: http://stackoverflow.com/q/29223186
tags question: http://stackoverflow.com/q/29244294
tags question: http://stackoverflow.com/q/29371124
tags question: http://stackoverflow.com/q/29364250
tags question: http://stackoverflow.com/q/29353043
tags question: http://stackoverflow.com/q/29222279
tags question: http://stackoverflow.com/q/29269000

http://stackoverflow.com/comment/46776592
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29289581
type: AnswerComment
has text: Ahh yup that fixed it. Cheers.

http://stackoverflow.com/q/29267829
has comment: http://stackoverflow.com/comment/46737941
has comment: http://stackoverflow.com/comment/46737795
has comment: http://stackoverflow.com/comment/46737355
upvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/46738158
has comment: http://stackoverflow.com/comment/46737566
tagged with: jquery
favorite count: 0
tagged with: ajax
tagged with: php
has answer: http://stackoverflow.com/a/29347695
accepted answer: http://stackoverflow.com/a/29347695
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46737429
has title: Running PHP script in background - how to check his state by using AJAX?
has body: I have PHP script and it's running in background. How can I check his state? I want to create simply progress bar. My idea: when I send AJAX request to file A.php this file add to session param and wait some time for answer. Script B.php (this script running in background) when running check this param and if exists create another with answer about his state. Any better ideas?
downvote count: 1
type: Question
tagged with: javascript
score: -1

http://stackoverflow.com/q/29356745
favorite count: 0
has comment: http://stackoverflow.com/comment/46898730
has comment: http://stackoverflow.com/comment/46898921
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29380328
has comment: http://stackoverflow.com/comment/46898746
has comment: http://stackoverflow.com/comment/46901629
has comment: http://stackoverflow.com/comment/46901618
linked to: http://stackoverflow.com/q/29343055
has comment: http://stackoverflow.com/comment/46900894
upvote count: 1
has comment: http://stackoverflow.com/comment/46899991
has body: The attached HTML renders very quickly in Chrome and Mozzilla browsers. If I try to load it in IE11 I get several timeout errors and after 30 seconds the map finally renders. I have tried all kinds of settings in IE11 with no luck. When I run with developer tools on in debugger mode. I get the error InvalidValueError:not a string in the following function 3 times function wf(a,b){return function(c){if(a(c))return c;throw qf(b||""+c);}}function xf(a){var b=arguments;return function(a){for(var d=[],e=0,f=b[H];e<f;++e){var g=b[e];try{(g.Ff||g)(a)}catch(h){if(!(h instanceof pf))throw h;d[F](h.message);continue}return(g.then||g)(a)}throw qf(d[rd]("; and "));}}function yf(a,b){return function(c){return b(a(c))}}function zf(a){return function(b){return null==b?b:a(b)}}function Af(a){return function(b){if(b&&null!=b[a])return b;throw qf("no "+a+" property");}} After hitting F5 to continue three times the MAP finally renders. Here is the HTML. Google Maps JavaScript API v3 Example: Optimized Directions
type: Question
tagged with: internet-explorer
linked to: http://stackoverflow.com/q/29344714
tagged with: javascript
has comment: http://stackoverflow.com/comment/46900861
has comment: http://stackoverflow.com/comment/46898820
tagged with: google-maps-api-3
answer count: 1
downvote count: 0
score: 1
has title: Google maps taking a long time to render in ie11

http://stackoverflow.com/comment/46657879
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29224933
has text: `[object Object]` is not an error. It's the string representation of an object. See: `console.log(String({foo: 42}));`. Just the property of the object that you want to access.

http://stackoverflow.com/q/29247632
linked to: http://stackoverflow.com/q/2787679
tagged with: javascript
has body: I have problem. I want to reload/refresh page.php in specific time, ex at 07.45 not every duration time, ex every 5 minutes. I'm not finding yet until now. Maybe in php or javascript or other solutions. Please help me.
score: 0
has title: How to reload page.php on certain time, ex: at 07.45. Not duration time, ex: every 5 seconds
has comment: http://stackoverflow.com/comment/46700365
answer count: 1
type: UnansweredQuestion
tagged with: php
has answer: http://stackoverflow.com/a/29247790
type: Question

http://stackoverflow.com/a/29246704
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/29246485
has body: The "nothing to repeat" error comes from improper escaping of metacharacters. Both ^ and * are consider special characters meaning the beginning of string anchor and * is a repetition operator. To literally match these characters, you need to properly escape them. /&amp;\^\*/g If you're looking to replace those characters anywhere, consider using a character class. /[&amp;^*]/g
downvote count: 0

http://stackoverflow.com/a/29260972
type: Answer
answers question: http://stackoverflow.com/q/29260190
has comment: http://stackoverflow.com/comment/46725557
has body: Ok how about something like this: https://jsfiddle.net/8uf8o7zj/ var input = "green apple pie recipe"; var sentances = [ "green apple pie recipe", "green apple pie", "apple pie recipe", "green apple", "pie recipe", "apple pie", "green", "apple", "pie", "recipe"]; var count = input.split(' ').length; var pattern = input.split(' ').join('|'); var r = new RegExp(pattern,'g'); var output = []; sentances.forEach(function (sentance) { var matches = sentance.match(r); output.push({ 'sentance' : sentance, 'percentage' : (matches) ? (matches.length / count) * 100 : 0, toString: function () { return this.sentance + ' - '+ this.percentage + '%' } }); }); output.forEach(function (result) { alert(result.toString()); });
accepted answer of: http://stackoverflow.com/q/29260190
score: 0
has comment: http://stackoverflow.com/comment/46724285
type: AcceptedAnswer

http://stackoverflow.com/q/29267758
has comment: http://stackoverflow.com/comment/46737185
type: AnsweredQuestion
upvote count: 1
has body: I have a div inside another div. the parent has a particular class name that doesn't specifically have any css applied to it. the child element has css applied to it, specifically it's background color. so it looks like this... &lt;div id='myparent' class='someclass'&gt; &lt;div id='mychild' class='somebgcolor'&gt;&lt;/div&gt; &lt;/div&gt; what I want to do is change the background color of the child div when the class of the parent div is changed. so I'm changing the class of the parent with this javascript... document.getElementById('myparent').className = 'someotherclass'; and in my css... .someclass .somebgcolor { background-color: #369; } .someotherclass .somebgcolor { background-color: #401; } but it doesn't work. for starters, the initial background color isn't even applied, and no background color is applied when i update the class of the parent div. am i missing something fundamental to the way applying css to nested elements works?
type: Question
has answer: http://stackoverflow.com/a/29267847
tagged with: javascript
has title: change css attributes of child when parent class is changed
has comment: http://stackoverflow.com/comment/46737052
answer count: 1
downvote count: 0
score: 1
favorite count: 0
accepted answer: http://stackoverflow.com/a/29267847
tagged with: http://stackoverflow.com/tag/html
tagged with: css

http://stackoverflow.com/q/29225266
has answer: http://stackoverflow.com/a/29225346
has title: Name cannot begin with the ' ' character in jquery if else condition
favorite count: 0
type: UnansweredQuestion
tagged with: bxslider
score: -3
has answer: http://stackoverflow.com/a/29225430
answer count: 4
has comment: http://stackoverflow.com/comment/46658497
upvote count: 0
has comment: http://stackoverflow.com/comment/46679156
has answer: http://stackoverflow.com/a/29225462
has comment: http://stackoverflow.com/comment/46658709
has body: I am just trying to check the window width and based on the width I change some values using jQuery. &lt;script&gt; $(document).ready(function () { var windowsize = $(window).width(); if (windowsize &lt; 480) { //DO SOMETHING }); } else { //DO SOMETHING } }); &lt;/script&gt; I'm receiving the following error: Name cannot begin with the ' ' character, hexadecimal value 0x20. Line 365, position 28 Only the if else condition having the error.
type: Question
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29225420
has comment: http://stackoverflow.com/comment/46658702
downvote count: 3
has comment: http://stackoverflow.com/comment/46658516

http://stackoverflow.com/comment/46761362
has text: did you set $tool to the class from your class.php?? `$tool = new Class()`
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29281250
type: AnswerComment

http://stackoverflow.com/comment/46882985
comment on: http://stackoverflow.com/a/29348607
score: 0
type: AnswerComment
has text: Maybe I don't understand. How large do you want the div? `max-height:100%` won't make it larger than the page.
type: Comment

http://stackoverflow.com/comment/46837948
comment on: http://stackoverflow.com/q/29323115
score: 0
type: Comment
type: QuestionComment
has text: @TiagoMartins null's solution works.

http://stackoverflow.com/comment/46871075
has text: Could I use single quotes on $(wrapper).append(' <? echo $string; ?> '); ? I have auto generating code with many double code inside, so I prefer to use single quotes in jQuery function
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29341609

http://stackoverflow.com/q/29290179
has title: angular - hiding form
type: Question
has comment: http://stackoverflow.com/comment/46777972
tagged with: javascript
has body: I have a &lt;h4&gt; that has an item Title, if you click on the title then it turns into a textbox with submit and cancel buttons. I have all that working , my problem is Trying to hide the form after the ajax reguest html: &lt;div class="col-xs-12" ng-show="editThis"&gt; &lt;div class="col-xs-8"&gt; &lt;input type="text" class="form-control" ng-model="topic.TopicName" /&gt; &lt;/div&gt; &lt;div class="col-xs-2 pull-right"&gt; &lt;input type="button" class="btn-xs btn-success btn" ng-click="editDetails(topic)" value="submit" /&gt; &lt;/div&gt; &lt;div class="col-xs-2 pull-right"&gt; &lt;input type="button" class="btn btn-xs btn-danger" value="cancel" ng-click="editThis = false" /&gt; &lt;/div&gt; see I use $scope.editThis to determine weather to show the or the i do not know why this is not working. $http.post("/MyVault/EditTopic", { topicEditId: item.VaultTopicId, topicEditName: item.TopicName, topicEditDescription: item.TopicDescription }) .then(function(data, status, headers, confis) { $scope.editThis = false; // never gets reflected in view });
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/46777714
accepted answer: http://stackoverflow.com/a/29290328
tagged with: angularjs
has comment: http://stackoverflow.com/comment/46777646
has comment: http://stackoverflow.com/comment/46777737
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29290328

http://stackoverflow.com/a/29352935
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/46908170
upvote count: 2
has comment: http://stackoverflow.com/comment/46902643
has body: Use the combination of lodash functions: _.forEach and _.assign: _.forEach($scope.var1, function(varObject) { //find object with the same mapped_field var finalArrayItem = _.find($scope.final, {mapped_field: varObject.mapped_field}); if (finalArrayItem) { //merge objects _.assign(finalArrayItem, varObject); } else { $scope.final.push(varObject); } }); Link to jsbin
has comment: http://stackoverflow.com/comment/46908895
downvote count: 0
answers question: http://stackoverflow.com/q/29352160

http://stackoverflow.com/a/29344803
type: Answer
answers question: http://stackoverflow.com/q/29343925
score: 2
has comment: http://stackoverflow.com/comment/46877202
downvote count: 0
upvote count: 2
has body: I suppose your first code is wrong: var currentsound; function play_pause(player) { if (currentsound) { currentsound.pause(); currentsound = null; // currentsound should be reset and return from functions to prevent playing again return; } var myAudio = document.getElementById(player); myAudio.play(); currentsound = myAudio; myAudio.currentTime = 0; //myAudio.play(); // duplicated code } To toggle an image it's not nessasary to mix the code. Just call the second functions from first one with some modifications: function toggleIcon(playing) { var image = document.getElementById('image') if (playing) { image.src = "play.png"; } else { image.src = "pause.png"; } } And call it from first function: function play_pause(player) { if (currentsound) { currentsound.pause(); currentsound = null; toggleIcon(false); // &lt;----- toggleIcon false return; } var myAudio = document.getElementById(player); myAudio.play(); currentsound = myAudio; myAudio.currentTime = 0; toggleIcon(true); // &lt;----- toggleIcon true } Or even better - use events pause and play and do not touch play_pause function: document.getElementById("myAudio2").onpause = function() { toggleIcon(false); }; document.getElementById("myAudio2").onplay = function() { toggleIcon(true); };
has comment: http://stackoverflow.com/comment/46877669

http://stackoverflow.com/comment/46821572
type: Comment
comment on: http://stackoverflow.com/q/29314408
has text: Style Css for the above bugs .bug1 ,.bug2 ,.bug3 ,.bug4 ,.bug5 ,.bug6 ,.bug7 { position: fixed; top: 50%; left: 50%; }
score: 0
type: QuestionComment

http://stackoverflow.com/a/29325863
type: Answer
has comment: http://stackoverflow.com/comment/46842277
has comment: http://stackoverflow.com/comment/46842410
has body: You are using &amp;&amp; and it will not execute the second condition if the first condition fails. If you want to execute both the functions still then execute the functions first and store the result in a variable and then compare them. function foo() { var result = false; if (/*condition is true*/) result = true; return result; } function bar() { var result = false; if (/*condition is true*/) result = true; return result; } var firstResult = foo(), secondResult = bar(); if(firstResult &amp;&amp; secondResult) { }
has comment: http://stackoverflow.com/comment/46842246
answers question: http://stackoverflow.com/q/29325842
has comment: http://stackoverflow.com/comment/46842429
score: 0
has comment: http://stackoverflow.com/comment/46842243
has comment: http://stackoverflow.com/comment/46842239
has comment: http://stackoverflow.com/comment/46842318
has comment: http://stackoverflow.com/comment/46842303

http://stackoverflow.com/a/29222981
answers question: http://stackoverflow.com/q/29222662
type: AcceptedAnswer
type: Answer
upvote count: 4
downvote count: 0
has body: Here is a solution just using d3. You can see it in action in this Plunkr. The Javascript code is: function multiCsv(files, callback) { var results = []; var error = ""; var filesLength = (files || []).length; var callbackInvoked = false; for (var i = 0; i &lt; filesLength; i++) { (function(url) { d3.csv(url, function(data) { if (data === null) { error += "Error retrieving \"" + url + "\"\n"; } else { results.push(data); } // all files retrieved or an error occurred if (!callbackInvoked &amp;&amp; (error || results.length === filesLength)) { if (error) { callback(error, null); // might want to send partial results here } else { callback(null, d3.merge(results)); } callbackInvoked = true; } }); })(files[i]); } } You would use it like so: multiCsv(["file1.csv", "file2.csv", "file3.csv"], function (err, results) { if (err) { alert(err); return; } var ul = document.createElement('ul'); for (var i = 0, len = results.length; i &lt; len; i++) { var li = document.createElement('li'); li.textContent = results[i].FirstName + ' ' + results[i].LastName + ', ' + results[i].Age; ul.appendChild(li); } document.body.appendChild(ul); }); (This just adds a &lt;ul&gt; to the page with the contents of the merged array). I haven't comprehensively tested this function, so YMMV. But it worked for my simple test case in Chrome.
accepted answer of: http://stackoverflow.com/q/29222662
score: 4

http://stackoverflow.com/a/30935457
upvote count: 3
score: 3
has body: What I did is using a hidden field for Credit Card Number and Save the actual credit card number in it then clear the actual Credit Card number from screen by JScript.
downvote count: 0
answers question: http://stackoverflow.com/q/29260833
type: Answer

http://stackoverflow.com/a/29338275
has body: This is tricky and simple at the same time. It's not because you are running $http or $.ajax asynchronously, bus has to do with the fact that the scope of the dialog is not updated. Here: $mdDialog.show({ controller: DialogController, templateUrl: 'detail.html', scope: $scope, });
accepted answer of: http://stackoverflow.com/q/29336340
type: Answer
score: 3
has comment: http://stackoverflow.com/comment/47831981
upvote count: 3
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/29336340

openlayers-3
type: Tag
tags question: http://stackoverflow.com/q/29333183
tags question: http://stackoverflow.com/q/29279117
tag name: openlayers-3
tags question: http://stackoverflow.com/q/29258151
tags question: http://stackoverflow.com/q/29351335
tags question: http://stackoverflow.com/q/29240516

http://stackoverflow.com/q/29344714
tagged with: javascript
tagged with: google-maps-api-3
has comment: http://stackoverflow.com/comment/46901654
favorite count: 0
has body: this is my first post, so I hope I'm in the right place. I've created a local html page with a map using google maps API v3.0. It works fine on Chrome and Firefox but not on IE. When I try to open the map, the browser remains stuck on a white page loding the maps for more than 30/40 seconds. Once the maps appears everything is ok. The same happens with the example provided by google (https://developers.google.com/maps/documentation/javascript/examples/map-simple) I've searched on google for hours but I didn't find any solution. Any help would be very appreciate.
has comment: http://stackoverflow.com/comment/46923460
has answer: http://stackoverflow.com/a/29354768
type: UnansweredQuestion
upvote count: 1
has title: gmaps API v3 very slow loading on IE
linked to: http://stackoverflow.com/q/29343055
tagged with: internet-explorer
score: 1
duplicate of: http://stackoverflow.com/q/29343055
type: Question
answer count: 1
downvote count: 0

http://stackoverflow.com/a/29322490
accepted answer of: http://stackoverflow.com/q/29322279
answers question: http://stackoverflow.com/q/29322279
type: Answer
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/46836399
has body: I came up with this: $(document).ready(function(){ $("#fb").click(function(){ var num=prompt('please enter a number'); var convertedNum = +num; fizzbuzz(convertedNum); }); }); function fizzbuzz(max) { for (var i=1; i <= max; i++) { if (i % 15 == 0) $("#fizz").append(' FizzBuzz '); else if (i % 3 == 0) $("#fizz").append(' Fizz '); else if (i % 5 == 0) $("#fizz").append(' Buzz '); else $("#fizz").append(" " + i + " "); } }
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/46839686
score: 0
type: Comment
has text: @dkar: It depends. What exactly are you trying to do. Depending on what you want your code is either correct to use return or incorrect. Since you say you don't want it like that we can assume it's incorrect. But you don't mention what the result should be.
type: AnswerComment
comment on: http://stackoverflow.com/a/29324216

http://stackoverflow.com/a/55634188
answers question: http://stackoverflow.com/q/29254145
type: Answer
downvote count: 0
score: 1
has body: In your js file, $("#linked_url").click(function() { window.open("https://www.linkedin.com/shareArticle?mini=true&amp;url=" + $(this).data("url") +"&amp;title=",'', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=300,width=600'); return false; });
upvote count: 1

http://stackoverflow.com/q/29273008
has title: AngularJS: $scope is not updated after function
tagged with: angularjs
upvote count: 2
answer count: 5
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46745844
has comment: http://stackoverflow.com/comment/46745968
has answer: http://stackoverflow.com/a/29273305
has comment: http://stackoverflow.com/comment/46746150
has comment: http://stackoverflow.com/comment/46746116
has comment: http://stackoverflow.com/comment/46745900
has comment: http://stackoverflow.com/comment/46746233
score: 1
has comment: http://stackoverflow.com/comment/46746199
has answer: http://stackoverflow.com/a/29273109
has comment: http://stackoverflow.com/comment/46745802
tagged with: angularjs-scope
has answer: http://stackoverflow.com/a/29273233
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/29273515
has comment: http://stackoverflow.com/comment/46745983
has comment: http://stackoverflow.com/comment/46746369
has answer: http://stackoverflow.com/a/29273752
has body: I want to update a number in the controller. So I have a controller with this. $scope.someNumber = 5; $scope.addNumber = function(){ $scope.someNumber ++; console.log($scope.someNumber); // This outputs 6, 7, 8, etc } Then I show that number, and it works when I refresh the page. {{someNumber}} Now I want to call addNumber() when I click something. This div is inside some code that's being repeated with ng-repeat. Add +1! The click works because addNumber() outputs the correct new number. But for some reason the span is not updated with the new value and always shows 5. I've called $scope.$apply() but I get $apply already in progress error. I'm new to Angular, I guess I must be missing something very obvious. Edit: I've added the click to the span, and now it is updated. {{someNumber}} What does this mean?
has comment: http://stackoverflow.com/comment/46746442
tagged with: javascript
has comment: http://stackoverflow.com/comment/46746271
has comment: http://stackoverflow.com/comment/46745760
has comment: http://stackoverflow.com/comment/46746411
favorite count: 0

http://stackoverflow.com/comment/46674312
score: 1
has text: thanks I was expecting that the library had an event for this.Shame of them!
comment on: http://stackoverflow.com/a/29233998
type: AnswerComment
type: Comment

http://stackoverflow.com/q/29295380
downvote count: 1
has body: Suppose i have Method written in Java script in GWT(JSNI) which accept the wrapper data type Integer and i need to convert into Primitive Data type inside JS. public static native void nativeMethod(Integer index)/*-{ // how to check the null values //how to convert into primitive type }-*/; Any Suggestion?
has comment: http://stackoverflow.com/comment/46789981
possible better answer: http://stackoverflow.com/a/29298137
tagged with: gwt
type: AnsweredQuestion
tagged with: java
tagged with: javascript
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/29297218
favorite count: 0
has title: How to Convert Integer to int in javascript
has comment: http://stackoverflow.com/comment/46786533
has comment: http://stackoverflow.com/comment/46786486
has comment: http://stackoverflow.com/comment/46786516
has answer: http://stackoverflow.com/a/29298137
upvote count: 2
accepted answer: http://stackoverflow.com/a/29297218
score: 1
has comment: http://stackoverflow.com/comment/46786599

http://stackoverflow.com/a/29229543
accepted answer of: http://stackoverflow.com/q/29225660
type: Answer
has body: Finally fixed the issue... The solution is to first shut down the tinymce instance (id needed!) tinymce.execCommand('mceRemoveControl',true,'editor_id'); then do the DOM action and reinit the tinymce instance tinymce.execCommand('mceAddControl',true,'editor_id');
upvote count: 4
downvote count: 0
score: 4
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29225660
has comment: http://stackoverflow.com/comment/126049407
has comment: http://stackoverflow.com/comment/86125775

http://stackoverflow.com/q/29266602
has title: Javascript : When having pressed 2 keys simultaneously down, leaving one of them influences the listener of the other too
tagged with: javascript
upvote count: 1
answer count: 1
favorite count: 0
tagged with: three.js
type: AnsweredQuestion
has body: I am creating a webGL game, using Three.js library. I am creating movement in the space with keyboard arrows. I want to enable user to simultaneously rotating and moving by pressing the left-right arrow together with the up-down arrow. For this reason, I have created a map holding the status of all needed keys. The used code is the following : var keyMap = []; document.addEventListener("keydown", onDocumentKeyDown, true); document.addEventListener("keyup", onDocumentKeyUp, true); function onDocumentKeyDown(event){ var keyCode = event.keyCode; keyMap[keyCode] = true; executeMovement(); } function onDocumentKeyUp(event){ var keyCode = event.keyCode; keyMap[keyCode] = false; executeMovement(); } function executeMovement(){ var cameraNeck = cameraEquipment.getNeck(); if(keyMap[37] == true){ //rotate left } if(keyMap[39] == true){ //rotate right } if(keyMap[38] == true){ //move front } if(keyMap[40] == true){ //move back } It works, meaning that when a user holds down 2 keys in the same time, he moves and rotates simultaneously. However, it has the following problem. For example, let assume the user presses first the up arrow, and then (without leaving it), he presses the left arrow. If he then leaves the button that was pressed first (up arrow), everything works as expected and the user is left rotating left. However, if the user leaves the button pressed last (left arrow), the user then stops moving and rotating both. It seems that in the sequence of key presses, the event of 'keyUp' of the one button triggers 'keyUp' for the other one, or something like that. I have tried many different ways of debugging and I have started considering the possibility that there is something wrong with the whole implementation.
downvote count: 0
score: 1
type: Question
has answer: http://stackoverflow.com/a/29275183
accepted answer: http://stackoverflow.com/a/29275183

http://stackoverflow.com/comment/46926370
has text: Why would you declare the function on every frame?
score: 2
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29372854

http://stackoverflow.com/a/29222151
type: Answer
has body: This is a classic case of failing to use the ng-model Golden Rule of Thumb: Always have a "." in your ng-model expression If you store the newStudy as a property of an object on the $scope in registerCtrl, it will work fine. e.g. In registerCtrl: $scope.data = { newStudy: "AAAA" }; // instead of $scope.newStudy = "AAAA"; In the template, change it to: &lt;div class="container-fluid margin-top-md"&gt; &lt;input type="text" ng-model="data.newStudy"/&gt; &lt;i class="fa fa fa-plus-square" ng-click="addStudy(data.newStudy)"&gt;&lt;/i&gt; &lt;ul&gt; &lt;li ng-repeat="study in studies"&gt; &lt;input type="text" ng-model="study.title"/&gt; &lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; A possibly better alternative is to use the controller as syntax. Look it up, it will help eliminate these kinds of errors because you will then be referring to registerCtrl.newStudy instead of just newStudy in your ng-model expression.
accepted answer of: http://stackoverflow.com/q/29222031
answers question: http://stackoverflow.com/q/29222031
type: AcceptedAnswer
score: 0

http://stackoverflow.com/a/29285923
upvote count: 2
score: 2
has comment: http://stackoverflow.com/comment/46780858
has comment: http://stackoverflow.com/comment/46809802
has comment: http://stackoverflow.com/comment/46797066
has body: Ok, this was an interesting exercise. After I completed it I was like "Why are we doing this again?" :) I reduce the property value to a string and then did a replace using a regex and _.map to replace each match. http://codepen.io/anon/pen/VYgodo I know this as well can be improved. Someone tear it apart please!! var input = { "module1": { "calender": ["yes", "no", "maybe"] }, "module2": { "falender": ["yes", "no", "jein"] } }; //output: {module1: "calender,yes,no,maybe"} function reduceObj(obj) { newObj = {}; _.each(obj, function (value, key, list) { var r = new RegExp(/(?:^({).*(:\[).*(\]})$)/); //reduce property value to string and replace using regex newObj[key] = JSON.stringify(list[key]).replace(r, function (match, p1, p2, p3, p4, p5, offset, string) { //this may be the only way to replace each capture _.map([p1, p2, p3, p4], function (value, index, list) { match = match.replace(value, ""); }); //end map //replace double quote with comma and single quote with nothing return match.replace(/\"\"/g, ',').replace(/\"/g, ""); }); //end replace }); //end each return newObj; }; $(document).ready(function () { console.log(reduceObj(input)); $('#output').html(JSON.stringify(reduceObj(input))); });
downvote count: 0
answers question: http://stackoverflow.com/q/29283475
type: Answer

http://stackoverflow.com/q/29371597
favorite count: 0
answer count: 3
possible better answer: http://stackoverflow.com/a/29371897
has answer: http://stackoverflow.com/a/29371897
downvote count: 0
score: 6
has comment: http://stackoverflow.com/comment/46924040
has answer: http://stackoverflow.com/a/29371725
accepted answer: http://stackoverflow.com/a/29371627
type: AnsweredQuestion
upvote count: 6
has answer: http://stackoverflow.com/a/29371627
type: Question
has body: This code is not working: function autoScrub() { checkLength = document.querySelectorAll("input[type=checkbox]"); for (var i=0; i &lt; checkLength.length; i++) { if (checkLength[i].attr('data-z') === 1) { checkLength[i].checked = true; } } } Each of my checkboxes has a data-z attribute of either 1 or 0. I'd like to auto-check all of the checkboxes that have a data-z attribute of 1. The code is breaking at if (checkLength[i].attr('data-z') === 1) { as apparently I cannot read the data-attribute this way. Apart from this the rest of the code works fine. I can use checkLength[i].checked = true; and it will check all of the checkboxes, I just can't reference its data-attribute correctly in an if statement and I'm not sure how to. Any ideas? Update I screwed around with two of the solutions below and finally came up with: function autoScrub() { $("input:checkbox").each(function() { if ($(this).data("z") == 0) { $(this).prop('checked', true).trigger('change'); } }); } and this worked. Thank you everyone for your help!
has title: select checkboxes with javascript based on html-5 data attribute
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/29256869
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/46716492
downvote count: 0
has body: Firefox, Chrome allow triggering click event on input file elements. In this case a native filechooser dialog will be shown. IE (any versions) doesn't allow such behavior. IE allows choosing file only by user click on Browse button. So it is impossible to open a filechooser dialog on a separate anchor click directly.
has comment: http://stackoverflow.com/comment/46716376
answers question: http://stackoverflow.com/q/29256737
type: Answer

http://stackoverflow.com/a/29268535
has comment: http://stackoverflow.com/comment/112766635
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/108332418
score: 47
upvote count: 47
has comment: http://stackoverflow.com/comment/122490538
type: Answer
has comment: http://stackoverflow.com/comment/115606848
has comment: http://stackoverflow.com/comment/127345744
has comment: http://stackoverflow.com/comment/112816793
accepted answer of: http://stackoverflow.com/q/29265389
has comment: http://stackoverflow.com/comment/111054751
answers question: http://stackoverflow.com/q/29265389
has comment: http://stackoverflow.com/comment/108299816
has body: It's impossible to calculate the difference between two arbitrary time zones. You can only calculate a difference for a specific moment in time. It's currently 4 hours difference between London and New York (writing this on Mar 25, 2015). But it was 5 hours difference a few weeks ago, and it will be 5 a few weeks from now. Each time zone switches offsets for daylight saving time at a different point in time. This is true in the general case between two time zones. However some time zones either switch exactly at the same time, or don't switch at all. There is always one hour between London and Paris, because they switch at the same moment in time. There are always 3 hours between Arizona and Hawaii, because neither have DST. Keep in mind that in the United States, each time zone that uses DST actually switches at a different moment in time. They all switch at 2:00 AM in their local time, but not at the same universal moment in time. So between Chicago and New York, there is usually 1 hour apart But for two brief periods each year they are either 2 hours apart, or have the same exact time. See also "Time Zone != Offset" in the timezone tag wiki. Now with regard to moment-timezone, you said in comments: The web server is in the Eastern time zone; we're in Central. I need the difference in the user's timezone and the server. The time zone of the web server is irrelevant. You should be able to host from anywhere in the world without affecting your application. If you can't, then you're doing it wrong. You can get the current time difference between your time zone (US Central time) and the user's. You don't even need to know the user's exact time zone for this, if the code is running in the browser: var now = moment(); var localOffset = now.utcOffset(); now.tz("America/Chicago"); // your time zone, not necessarily the server's var centralOffset = now.utcOffset(); var diffInMinutes = localOffset - centralOffset; If instead the code was running on the server (in a node.js …

http://stackoverflow.com/q/29304807
has comment: http://stackoverflow.com/comment/46804080
has comment: http://stackoverflow.com/comment/46804401
has body: I couldnt find the right answer for my case. var inputs = $("root :input[typeof]"); // looping thru elements inputs.each(function(index) { var name = $(this).attr('name'); // get element by name (or by id) var value = $(this).val(); // get element value // How do I capture radio button (or checkbox) group // element in this loop? And how do I get a checked value of such group? // Note, in here $(this) should be the radio button group element } So, the question is in code comment. How inside that loop get a value of radio button group element? In HTML if you refer to such group by name you will automatically get the value of checked radio button in that group. How do you do that in jQuery, when $(this) is current element in the loop? Thanks
has comment: http://stackoverflow.com/comment/46807371
has comment: http://stackoverflow.com/comment/46835276
has answer: http://stackoverflow.com/a/29304907
type: Question
has answer: http://stackoverflow.com/a/29304865
tagged with: javascript
tagged with: jquery
score: 0
answer count: 2
has title: How to get value of radio button group in jQuery?
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/18043452
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46804101

http://stackoverflow.com/q/29353778
tagged with: keydown
upvote count: 1
type: AnsweredQuestion
has body: Need some help figuring out what's wrong with my second function. JSfiddle here: JSfiddle //add an outline on click function addOutline(){ box1.classList.toggle('selected'); } box1.addEventListener('click', addOutline, false); //change shape on element with class "selected" when "e" is pressed function changeShape (event) { var arr = document.getElementsByClassName("selected"); var key = event.keyCode; for(var i = 0; i &lt; arr.length; i++) { if(key === 69 &amp;&amp; arr[i].className === "selected") { box1.classList.toggle('circle'); } } } document.addEventListener("keydown", changeShape, false); Basically what i'm trying to do is, when the key "e" is pressed AND if the elements className is equal to "selected" then the div "box" should toggle the circle class (from the css). I got it to work with only the keyDown, but when trying to add the className statement to the function, it wont work. Check the jsfiddle at the top to make more sense of this. Any ideas?
has answer: http://stackoverflow.com/a/29354111
has answer: http://stackoverflow.com/a/29353842
score: 1
type: Question
possible better answer: http://stackoverflow.com/a/29353842
has answer: http://stackoverflow.com/a/29353972
downvote count: 0
has title: JavaScript - Toggle css style on keyDown
tagged with: javascript
favorite count: 0
accepted answer: http://stackoverflow.com/a/29353972
has answer: http://stackoverflow.com/a/29353849
has comment: http://stackoverflow.com/comment/46892851
answer count: 4

http://stackoverflow.com/a/29269904
accepted answer of: http://stackoverflow.com/q/29269858
has comment: http://stackoverflow.com/comment/46741180
answers question: http://stackoverflow.com/q/29269858
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46741295
has comment: http://stackoverflow.com/comment/46741654
has comment: http://stackoverflow.com/comment/46741660
has comment: http://stackoverflow.com/comment/46741168
has comment: http://stackoverflow.com/comment/46741208
upvote count: 2
has comment: http://stackoverflow.com/comment/46741264
has comment: http://stackoverflow.com/comment/46741467
type: Answer
has body: var inputBox = document.querySelector(".inputbox"), classname = inputBox.className, regEx = /holdout-(\d+)/, holdoutValue = classname.match(regEx)[1]; It will return you 7 To set that as attribute in your input box: inputBox.setAttribute("data-holdout",holdoutValue); it's recommended to use data-holdout instead of holdout.
score: 2
has comment: http://stackoverflow.com/comment/46741277

http://stackoverflow.com/q/29237479
score: 0
has title: how can i display the start date, the end date and the duration from the lightbox in dhtmlx gantt?
linked to: http://stackoverflow.com/q/29438891
has body: in my web application J2EE i'm using dhtmlx to display gantt chart, i displayed the value of description from the lightbox alert(gantt.getLightboxSection("description").getValue()) i don't know how to display the other fields, i used alert(gantt.getLightboxSection("time").getValue()); but i had [object object]. how can i display the start_date, end_date and the duration from the lightbox ? here the picture of the lightbox
has answer: http://stackoverflow.com/a/29310291
tagged with: dhtmlx
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29310291
type: Question
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/46739874
has text: I made those changes but the error is still the same. This might not be clear in my first post but the first and second blocks of code are two separate functions so I was thinking that the elements created in the first function don't exist outside of that function which is why I'm getting null errors.
comment on: http://stackoverflow.com/q/29269000
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29235504
has comment: http://stackoverflow.com/comment/46677205
type: AcceptedAnswer
type: Answer
answers question: http://stackoverflow.com/q/29235406
has comment: http://stackoverflow.com/comment/46678616
score: 2
accepted answer of: http://stackoverflow.com/q/29235406
has comment: http://stackoverflow.com/comment/46678960
has body: Hopefully, you have your controller set up. Your $scope.showDetails method should look something like: $scope.showRow = []; $scope.showDetails = function (idx) { $scope.showRow[idx] = true; } And then, change ng-hide="true" to ng-hide="showRow". {{ $index + 1 }} {{ student.name }} {{ student.age }} Edit: used changes suggested by @AviadP. This will take into account multiple students.
has comment: http://stackoverflow.com/comment/46679128
downvote count: 0
upvote count: 2

http://stackoverflow.com/q/29258440
tagged with: node.js
linked to: http://stackoverflow.com/q/8553957
has comment: http://stackoverflow.com/comment/46719469
has comment: http://stackoverflow.com/comment/46720818
has comment: http://stackoverflow.com/comment/46720310
answer count: 0
has comment: http://stackoverflow.com/comment/48684603
has comment: http://stackoverflow.com/comment/50163850
has comment: http://stackoverflow.com/comment/46720101
type: Question
has comment: http://stackoverflow.com/comment/46720722
tagged with: mongodb
downvote count: 0
tagged with: amazon-ec2
has comment: http://stackoverflow.com/comment/46719971
has title: Error: listen EADDRINUSE nodejs
tagged with: javascript
has body: I have deployed MEAN stack on an EC2 ubuntu machine. I have written a crawler script that creates a child process for every URL I feed it and crawls and returns back the data to the parent. I don't really have a clue of where the following error occurs. Error: listen EADDRINUSE at exports._errnoException (util.js:746:11) at Agent.Server._listen2 (net.js:1129:14) at listen (net.js:1155:10) at Agent.Server.listen (net.js:1240:5) at Object.start (_debugger_agent.js:20:9) at startup (node.js:86:9) at node.js:814:3 Each child process returns an object which I print in the console and in between which I get a lot of above error. My script is very large and I don't know where this error occurs and so I am unable to post any code. The server is running fine on port 8000. netstat -tpln shows only mongodb and ssh process occupying ports 27017 and 22 respectively. I have also tried changing the server ports but the same problem persists. How do I find due to which port this error occurs? How do I find which line of code triggers this error? Any input would be really appreciated. Thanks in advance.
has comment: http://stackoverflow.com/comment/46719807
has comment: http://stackoverflow.com/comment/46747086
has comment: http://stackoverflow.com/comment/46720407
score: 1
has comment: http://stackoverflow.com/comment/46719740
has comment: http://stackoverflow.com/comment/46720697
favorite count: 0
linked to: http://stackoverflow.com/q/9898372
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46720417
upvote count: 1

http://stackoverflow.com/comment/46881541
has text: in my fiddle example data is selected correctly... check it... http://jsfiddle.net/jHvmg/322/
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29347596
type: Comment

http://stackoverflow.com/q/29246269
score: 0
tagged with: jquery-events
answer count: 2
has title: Caching variables for events without making them global
tagged with: variables
tagged with: jquery
has body: You can say that this would apply to most events but in my case the change event for select boxes. I have two select boxes. I want to insert/re-insert depending the options from the select box depending on which option is selected within the first select box. I've managed to do this but with the caveat of making a global variable for the options I want to manipulate. Is there a way to do this within the event or some sort've workaround where the variable isn't global? HTML Motorcycle Bicycle Unicycle Four Speed Three Speed Two Speed One Speed JS $(function() { var options = $(".remove"); $("#vehicles").on("change", function() { if ($("option:selected").attr("value") == "unicycle") { options.detach(); } else { $("#speeds").append(options) } }); }); JSFiddle
has answer: http://stackoverflow.com/a/29246406
tagged with: scope
has comment: http://stackoverflow.com/comment/46698035
possible better answer: http://stackoverflow.com/a/29246406
has comment: http://stackoverflow.com/comment/46698132
has answer: http://stackoverflow.com/a/29246566
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46698087
accepted answer: http://stackoverflow.com/a/29246566
tagged with: javascript
has comment: http://stackoverflow.com/comment/46698612
has comment: http://stackoverflow.com/comment/46698061
has comment: http://stackoverflow.com/comment/46698207
type: Question

http://stackoverflow.com/comment/46945310
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29366902
has text: hey so can you tell me any other api so that i can get upto 10 results
score: 0

http://stackoverflow.com/comment/46678163
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29235988
score: 0
has text: How "it doesn't work"? Any errors in JS console?

http://stackoverflow.com/a/29311058
type: Answer
upvote count: 6
score: 6
has comment: http://stackoverflow.com/comment/46815868
has comment: http://stackoverflow.com/comment/46815828
has comment: http://stackoverflow.com/comment/46815847
has comment: http://stackoverflow.com/comment/46817628
accepted answer of: http://stackoverflow.com/q/29311021
answers question: http://stackoverflow.com/q/29311021
has comment: http://stackoverflow.com/comment/46825859
has body: if (typeof game_loop != 'undefined') if the variable game_loop is not undefined clearInterval(game_loop); clear the existing interval whose id is game_loop game_loop = setInterval(paint, 60); call paint every 60 milliseconds and store the interval id in game_loop. Ideally for clarity the code would be written as: if (game_loop !== undefined) { clearInterval(game_loop); } game_loop = setInterval(paint, 60); typeof xyz !== 'undefined' is used to avoid a possible bug when window.undefined is overridden, but no one should ever override window.undefined, so I wouldn't worry about it.
has comment: http://stackoverflow.com/comment/46816514
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/29321551
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29321578
has title: what's the benefits of using `resolve` in angular route modules
answer count: 1
downvote count: 0
has body: Both ngRoute and UI Router provide resolve method on url definitions which should resolve before the route is loaded. I've seen a lot of pages explaining how to use it but almost none define benefits for using it. At the moment, I clearly see one good fit usage of it, which is to prevent not authorized access to views/data. This usage is more related to security. In the examples I've seen it's mostly used to get and inject initial data into controller, but I can also easily do that using service within a controller. So why use resolve? Moreover, by using resolve I should handle rejected promise when data is not available for some reason. The controller which should receive that data won't even be initialized and so I should handle routeChangeFailed event on $rootScope to decide how to proceed. Besides, I also somehow should pass information on what route failed and why. So again, two questions: 1) What's the benefits of using resolve method for data retrieval? 2) What are the common approaches to handling rejections/failed data retrieval situations? PS. Any good read about the topic is highly appreciated.
favorite count: 0
tagged with: angularjs
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/29321578
upvote count: 1

http://stackoverflow.com/comment/46786599
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29295380
has text: Yeah, I answered for both because GWT lets you do most of your coding in Java and produces JavaScript/HTML/CSS. So I don't know where the OP needs to do the conversion. :-)
score: 0

http://stackoverflow.com/comment/46794225
score: 0
type: AnswerComment
has text: doesn't prevent the var res = <%= PollResponse() %>; line from being executed on every postback.
type: Comment
comment on: http://stackoverflow.com/a/29298361

http://stackoverflow.com/comment/46746771
score: 0
has text: If you want to access Translate programmatically, you should use the [API](https://cloud.google.com/translate/), not their html frontend (which is both technically cumbersome and a violation of their TOS).
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29273391

http://stackoverflow.com/comment/46724732
type: AnswerComment
comment on: http://stackoverflow.com/a/29261182
type: Comment
has text: as I said, in your success callback you're overriding the method :). Remove the code in the callback (or at least the assignment) and it should work a second time.
score: 0

http://stackoverflow.com/comment/46764529
has text: I also tested the JSON string at [JSONLint.com](http://jsonlint.com/) and it returned Valid JSON.
score: 0
comment on: http://stackoverflow.com/a/29265563
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/46761995
comment on: http://stackoverflow.com/a/29281975
score: 0
type: AnswerComment
type: Comment
has text: What sense should that make?

http://stackoverflow.com/comment/46770645
type: AnswerComment
has text: Thanks, this helped me a lot. I will be sure to not make this mistake again and remember thats what the error messages I got mean! Thanks!
type: Comment
comment on: http://stackoverflow.com/a/29273936
score: 1

http://stackoverflow.com/comment/46896496
comment on: http://stackoverflow.com/q/29355726
has text: You can keep track of the number of clicks in your click event and then do something special on the fifth click or even clicks that divide evenly into 5.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29309498
has answer: http://stackoverflow.com/a/29335833
type: Question
answer count: 2
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/csv
has title: How can I send a csv file to d3.js in Django?
has body: I am currently using Django+D3.js. And the template(viewCSV.html) contain a js function which need a csv file: d3.text("{{ file }}", function(data) { var parsedCSV = d3.csv.parseRows(data); var container = d3.select("body") .append("table") .selectAll("tr") .data(parsedCSV).enter() .append("tr") .selectAll("td") .data(function(d) { return d; }).enter() .append("td") .text(function(d) { return d; }); }); Without using Django, the function should be d3.text("train.csv", function(data) {...} Now I write following codes in my views.py def viewCSV(request): fp = open('train.csv', 'rb') data = fp.read() variables = RequestContext('viewCSV.html', {'file': data}) t = get_template('viewCSV.html') output = t.render(variables) return HttpResponse(output) By the way, the viewCSV.html and train.csv are in the same folder under the Django project. When I run the server, and visit the url, I got AttributeError at /viewCSV/ 'str' object has no attribute 'META' I just want let the js read the csv file. I don't know how to implement it. Can any one help me with this question? Thanks in advance.
tagged with: d3.js
type: UnansweredQuestion
tagged with: django
tagged with: python
has answer: http://stackoverflow.com/a/29309820

http://stackoverflow.com/comment/46823336
score: 4
comment on: http://stackoverflow.com/q/29315474
type: QuestionComment
type: Comment
has text: Try something yourself first, show what you did and what went wrong

http://stackoverflow.com/a/29324898
has comment: http://stackoverflow.com/comment/46840830
has body: A quick google search for "Remove Awesomium.net Scroll Bars" yeiled the following result: How To Hide Scroll Bars In A WPF Webcontrol Another few searches, and I found a solution for your second problem: How To Inject Javascript On Document Ready Of Any Page Scroll automatically to the bottom of the page
has comment: http://stackoverflow.com/comment/46840836
answers question: http://stackoverflow.com/q/29324877
score: 0
has comment: http://stackoverflow.com/comment/75251186
type: Answer

http://stackoverflow.com/comment/90504732
score: 0
type: Comment
comment on: http://stackoverflow.com/a/32790325
type: AnswerComment
has text: -1 for not punning it up with "If you're using chai-as-promised (as promised in the question)", but +2 for the clear, concise answer. One thing I'd like addressed, though, is whether or not `rejected` will do the same.

http://stackoverflow.com/comment/46839859
type: QuestionComment
comment on: http://stackoverflow.com/q/29318601
score: 0
has text: In fact, I wish the interaction (download box) because will alert the user that the connection is down, so he know will have to save the work in HD to restart later, by an upload of the saved work. So if I do create a blob, how do I launch a download box? There is no blob.download method...
type: Comment

http://stackoverflow.com/q/29343398
answer count: 1
has answer: http://stackoverflow.com/a/29356938
type: UnansweredQuestion
tagged with: cookies
score: 0
tagged with: onedrive
type: Question
tagged with: javascript
has title: Signing out doesn't change wl_auth cookie value in onedrive?
has body: I followed the Javascript in Interactive Live SDK to enable Onedrive in My Web App and it's working fine. But, following the above method sets a wl_auth cookie in the specified redirect domain. which contains the details of the user who was signed in during the time. When I sign out the user and sign in with a different account the value of the old cookie still remains and I was only able to attach files from the old user not the new account. I have to follow the tedious process of deleting the cookies everytime to sign n a new user. I have seen a Javascript method to subscribe to a logout event in Microsoft account. It is called WL.Event.subscribe. And I attach the following code to subscribe to a logout event, WL.Event.subscribe("auth.logout", onLogout); function onLogout() { WL.logout(); } I try Logging out of my old account and logged in with different account . still the problem persists. why? Any help is kindly appreciated. Thank you! Note: I don't have signin button in my Web app. When the User clicks "Attach from Onedrive" button for the first time they will be asked for sign in information. if they are signed in already they will be redirected to the Onedrive file Picker(till the cookie doesn't expire).

http://stackoverflow.com/q/29246047
tagged with: mysql
upvote count: 0
has answer: http://stackoverflow.com/a/29246358
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: .htaccess
favorite count: 0
has body: I am doing a PHP, MySQL CMS based website for one of my clients. Currently we have three languages English, French and Flemish. How can we achieve that, whenever we refresh the page, the url like About.php --> http://www.url.com/about (For Eng) About.php --> http://www.url.com/fr/about (For French) I am using javascript for language seleciton, since i don't have enough knowledge in php. Header.php <img src="<?php echo SITE_PATH_COMMON; ?>images/lan-en.gif" alt="">ENG <img src="<?php echo SITE_PATH_COMMON; ?>images/lan-en.gif" alt="">ENG <img src="<?php echo SITE_PATH_COMMON; ?>images/lan-fr.gif" alt="">FRE <img src="<?php echo SITE_PATH_COMMON; ?>images/lan-fl.gif" alt="">FLE Javascript: $(".lang_container ul li a").click(function() { var text = $(this).html(); var text1 = $(this).text(); $(".lang_container > a").html(text); $(".lang_container ul").hide(); updateQuery(text1); }); function updateQuery(e) { dataString = e; var siteStatus = $('#siteStatus').val(); var ourLocation = window.location.pathname.split('/').pop(); str = ""; if ((siteStatus=='1') && (dataString=="Eng")) { str = ""; } else if ((siteStatus=='1') && (dataString=="Fre")) { str = "fr/"; } else if ((siteStatus=='1') && (dataString=="Fle")) { str = "fl/"; } window.location.href="http://192.168.1.16:8066/"+str+ourLocation; } Thanks in Advance...
score: -1
accepted answer: http://stackoverflow.com/a/29246358
tagged with: php
downvote count: 1
has title: PHP change the website content through language selection
type: Question
type: AnsweredQuestion

http://stackoverflow.com/comment/46772002
type: Comment
type: QuestionComment
has text: `document.body.onload` is an option.
comment on: http://stackoverflow.com/q/29286651
score: 0

http://stackoverflow.com/comment/46874739
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29344217
has text: be clear with your specifiactions

http://stackoverflow.com/comment/46924068
score: 0
has text: That is very helpful, whenever the page loads the script runs so I now know that the task is possible... The main issue I am having is getting the server to recognize the button click and run the JS file/command whenever this happens, any idea how this might be possible? I'm currently reading into http listeners etc in an attempt to solve it myself, will post back here if I manage to get anything...
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29357953

http://stackoverflow.com/a/29282075
accepted answer of: http://stackoverflow.com/q/29282013
score: 0
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29282013
has comment: http://stackoverflow.com/comment/46773827
type: Answer
has body: The form variable in your change event is the event itself NOT the form. Use this to retrieve the parent form: var categoryEditForms = $('form.category-edit-block'); categoryEditForms.change(function() { var submitButton = $(this).parents("form").find('button[type=submit]'); }); A better idea would be to delegate your events though so you only have one event, something like: categoryEditForms.on("change", function() { var submitButton = $(this).parents("form").find('button[type=submit]'); });
has comment: http://stackoverflow.com/comment/46765244

http://stackoverflow.com/a/29280726
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/29280306
answers question: http://stackoverflow.com/q/29280306
has body: You are calling those 2 lines inside of $.fn.addRootNode. $.fn is a reference to jQuery.prototype. So, what you did was add a function called addRootNode to jQuery objects. You basically created a "jQuery plugin". Inside that function, this is a jQuery object because you are calling a function that's part of the jQuery prototype. You're doing $('#yourElement').addRootNode() somewhere, so this is is the jQuery object addRootNode was called on. Doing $(this) does nothing since this is already a jQuery object. jQuery knows this and just returns the same object.
score: 0

parse-platform
tags question: http://stackoverflow.com/q/29359935
tags question: http://stackoverflow.com/q/29342332
type: Tag
tags question: http://stackoverflow.com/q/29235898
tags question: http://stackoverflow.com/q/29337456
tags question: http://stackoverflow.com/q/29356764
tags question: http://stackoverflow.com/q/29302766
tags question: http://stackoverflow.com/q/29262317
tags question: http://stackoverflow.com/q/29321655
tags question: http://stackoverflow.com/q/29344120
tags question: http://stackoverflow.com/q/29283859
tags question: http://stackoverflow.com/q/29317180
tags question: http://stackoverflow.com/q/29292074
tags question: http://stackoverflow.com/q/29250404
tags question: http://stackoverflow.com/q/29363762
tags question: http://stackoverflow.com/q/29259007
tags question: http://stackoverflow.com/q/29291496
tags question: http://stackoverflow.com/q/29229045
tags question: http://stackoverflow.com/q/29269681
tag name: parse-platform

http://stackoverflow.com/comment/46830791
has text: Have you any errors in the console?
type: QuestionComment
comment on: http://stackoverflow.com/q/29319451
score: 0
type: Comment

http://stackoverflow.com/q/29353728
answer count: 2
has title: Exporting a class with ES6 (Babel)
has body: I'm writing some frontend code with ECMAScript 6 (transpiled with BabelJS, and then browserified with Browserify) so that I can have a class in one file, export it and import it in another file. The way I'm doing this is: export class Game { constructor(settings) { ... } } And then on the file that imports the class I do: import {Game} from "../../lib/pentagine_browserified.js"; var myGame = new Game(settings); I then compile it with grunt, this is my Gruntfile: module.exports = function(grunt) { "use strict"; grunt.loadNpmTasks('grunt-babel'); grunt.loadNpmTasks('grunt-browserify'); grunt.initConfig({ "babel": { options: { sourceMap: false }, dist: { files: { "lib/pentagine_babel.js": "lib/pentagine.js", "demos/helicopter_game/PlayState_babel.js": "demos/helicopter_game/PlayState.js" } } }, "browserify": { dist: { files: { "lib/pentagine_browserified.js": "lib/pentagine_babel.js", "demos/helicopter_game/PlayState_browserified.js": "demos/helicopter_game/PlayState_babel.js" } } } }); grunt.registerTask("default", ["babel", "browserify"]); }; However, on the new Game( call, I get the following error: Uncaught TypeError: undefined is not a function As so, what I did was analyse the generated code by Babel and Browserify and I found this line on PlayState_browserified.js: var Game = require("../../lib/pentagine_browserified.js").Game; I decided to print the require output: console.log(require("../../lib/pentagine_browserified.js")); And it is nothing but an empty object. I decided to check out the pentagine_browserified.js file: var Game = exports.Game = (function () { It seems like it is correctly exporting the class, but for some other reason it is not being required on the other file. Also, I'm sure the file is being required properly because changing the string "../../lib/pentagine_browserified.js" spits out a Not Found error, so it is going for the right file, that I'm sure about.
downvote count: 0
tagged with: javascript
possible better answer: http://stackoverflow.com/a/34666194
tagged with: browserify
linked to: http://stackoverflow.com/q/28661499
favorite count: 0
has comment: http://stackoverflow.com/comment/79930041
upvote count: 31
has answer: http://stackoverflow.com/a/29417086
tagged with: babeljs
accepted answer: http://stackoverflow.com/a/29417086
has answer: http://stackoverflow.com/a/34666194
type: Question
score: 31
type: AnsweredQuestion
tagged with: gruntjs
tagged with: ecmascript-6

http://stackoverflow.com/q/29271805
downvote count: 2
has answer: http://stackoverflow.com/a/29271915
score: -2
has comment: http://stackoverflow.com/comment/46744036
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46744015
answer count: 3
has comment: http://stackoverflow.com/comment/46744065
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29272007
has body: I want two 50% width div from 1300px and subtract 200px using jQuery or javascript. I'm new in this world, so help me out. Thanks
has title: 50% width div using jQuery or Javascript
upvote count: 0
has answer: http://stackoverflow.com/a/29272046
type: Question

http://stackoverflow.com/comment/46674798
comment on: http://stackoverflow.com/q/29228644
score: 0
has text: So, you have your answer?
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29271820
answers question: http://stackoverflow.com/q/29271517
downvote count: 0
score: 1
type: Answer
upvote count: 1
has body: Put jquery link just above your script Please replace this:- Next Report with:- Next Report So try this code:- REPORT A SUSPICIOUS MEDICINE Next Report
has comment: http://stackoverflow.com/comment/46743988

postback
tag name: postback
type: Tag
tags question: http://stackoverflow.com/q/29317844

http://stackoverflow.com/q/29363665
has body: I have a simple video tag: &lt;video id="video-1" poster="img/video/poster-1.jpg" preload="none"&gt; &lt;source src="http://player.vimeo.com/external/the_video-id" type="video/mp4"&gt; &lt;/video&gt; I play it via a javascript button $('[data-play-video]').click(function(){ var video_id = $(this).data('playVideo'); var video_control = $(video_id)[0]; video_control.play(); }); The video plays inline on the desktop and in the full-screen player on iPhone. On iPad it plays inline, but I want it to play full-screen in the default iOS video player—the same as on the iPhone. How can I achieve this? I am aware of the webkit-playsinline attribute which may be used to force the video to play inline on the iPhone. (HTML5 inline video on iPhone vs iPad/Browser) and (Can I avoid the native fullscreen video player with HTML5 on iPhone or android?) I, however, want the opposite: to play the video in the default-for-iPhone full-screen format on all iOS and Android devices.
type: AnsweredQuestion
upvote count: 3
has answer: http://stackoverflow.com/a/29363964
type: Question
tagged with: fullscreen
has title: Force full-screen HTML5 video playback on iPad and Android tablets?
linked to: http://stackoverflow.com/q/5054560
tagged with: ios
downvote count: 0
tagged with: javascript
tagged with: html5-video
accepted answer: http://stackoverflow.com/a/29363964
score: 3
answer count: 1
tagged with: ipad
favorite count: 0
linked to: http://stackoverflow.com/q/3699552

http://stackoverflow.com/q/29235071
possible better answer: http://stackoverflow.com/a/29235801
tagged with: underscore.js
tagged with: http://stackoverflow.com/tag/json
downvote count: 1
type: Question
tagged with: javascript
has body: I have a json response in the form : some_array = [{ ios: "110" rate_pl: "PlanC" ref_site: "N/A" reservation_id: "12709034" },{ ios: "121" rate_pl: "SomePlan" ref_site: "FB" reservation_id: "1273034 },{ ios: "141" rate_pl: "PlanC" ref_site: "Tweet" reservation_id: "143034 }]; How do i group a particular attribute say 'rate_pl' and also add the values if the ios which related to that particular rate_pl. example --> Result should be: someObject = [ {PlanC: ['ios':251]}, //(110+141 = 251) {SomePlan: ['ios':121]} ];
has comment: http://stackoverflow.com/comment/46676525
has comment: http://stackoverflow.com/comment/46676390
score: 0
has title: sorting and manipulating json objects , javascript
has answer: http://stackoverflow.com/a/29240623
answer count: 3
has answer: http://stackoverflow.com/a/29235801
upvote count: 1
tagged with: arrays
linked to: http://stackoverflow.com/q/3390396
favorite count: 0
has comment: http://stackoverflow.com/comment/46677226
accepted answer: http://stackoverflow.com/a/29235742
tagged with: angularjs
has comment: http://stackoverflow.com/comment/46676680
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29235742

http://stackoverflow.com/comment/46801482
type: Comment
has text: Thanks a lot for the help, I was so focused on the CSS not working and didn't realize it could have been my HTML
comment on: http://stackoverflow.com/a/29270144
score: 0
type: AnswerComment

http://stackoverflow.com/q/29282869
tagged with: javascript
score: 4
has comment: http://stackoverflow.com/comment/46763655
downvote count: 0
answer count: 1
tagged with: asynchronous
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/106507667
has title: Synchronous XHR deprecation
upvote count: 4
has comment: http://stackoverflow.com/comment/46763589
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46763897
has comment: http://stackoverflow.com/comment/46764459
has comment: http://stackoverflow.com/comment/46764392
has comment: http://stackoverflow.com/comment/46763977
type: Question
has body: According to xhr specs async: false is deprecated and modern user agents should start to warn about or even to throw exception. Synchronous XMLHttpRequest outside of workers is in the process of being removed from the web platform as it has detrimental effects to the end user's experience. (This is a long process that takes many years.) Developers must not pass false for the async argument when the JavaScript global environment is a document environment. User agents are strongly encouraged to warn about such usage in developer tools and may experiment with throwing an InvalidAccessError exception when it occurs. I understand and agree with argument about "detrimental" effects. The main point about this deprecation is you can solve any of your tasks with async XHR. However, I can see at least two applications of sync XHR in browser: 1) window.onbeforeunload. Any async xhr is useless here since browser tab will close immediately. Example of usage XHR in onbeforeunload event is document "lock". User opened document in new tab and document is locked by him now. Everyone can view this doc in read-only. Then user closes tab and document should unlock. I don't see any solution with async request, until user agent is guaranted that async request will be performed, and, even more, will not be aborted after tab close. 2) click event on anchor (&lt;a&gt; tag). It's close to previous case because it's also closes current window in creates new one in the same tab. Let's say I just want to track click on critical links on page (but I beleive there are more noble examples of this event synchronous usage). The one workaround is to do e.preventDefault() in handler and then assign location manually, but this can break middle mouse button behavior (force open new tab). The questions are: 1) Are user agents must complete async XHR even when tab is already closed? 2) Are there more smart solutions for my examples?
tagged with: synchronous
has comment: http://stackoverflow.com/comment/46763759
has comment: http://stackoverflow.com/comment/46763659
has answer: http://stackoverflow.com/a/33534065
accepted answer: http://stackoverflow.com/a/33534065

http://stackoverflow.com/q/29264124
has comment: http://stackoverflow.com/comment/46731722
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/29264433
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46733429
type: AnsweredQuestion
tagged with: onclick
accepted answer: http://stackoverflow.com/a/29264433
has body: I have a jQueryUI sortable list of li-Buttons with following markup: 6. Clip Copy 3.mov (00min17sec) These Items are dragged from another list, where their onclick has its good use Now everytime the list is sorted (or a new item is inserted), i want to overwrite the onclick, so that the items in THIS list have a different function (in fact, it's going to be a playlist, that's why the onclick-command can't be the same as in the file-list) i can't figure out how exactly to do this. This is called on every list-update: function updatePlaylist () { var list = $("#tracks"); list.children(':not(.placeholder)').each(function(index) { console.log($(this).childNodes[1].text()); // to check if it works //$(this).children[1].attr("onclick","play_clip:" + index); }); }; so, in plain: i want to set the onclick of each li > span > button to "play_clip6" etc. i've tried it with children[1] and childnodes[1], but they all print undefined. i suppose it's something about the scope of "this", or some other thing i've overlooked.. but shouldn't this work? i'm stuck :( thanks
type: Question
has title: Changing the onclick of every element in a
tagged with: jquery-ui

http://stackoverflow.com/q/29302905
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has title: jQuery/Ajax - Redirect to another page after succes message
has comment: http://stackoverflow.com/comment/46800370
has answer: http://stackoverflow.com/a/29309919
favorite count: 0
tagged with: ajax
upvote count: 2
has answer: http://stackoverflow.com/a/29303161
has body: I want to redirect the user after filling up the contact form and the success message appears. Here's the HTML code: &lt;div id="wpm_download_1" style="display: inline;"&gt; The link to the file(s) has been emailed to you. &lt;/div&gt; and here's the JavaScript I'm trying: function() { var isDownloaded = jQuery('#wpm_download_1').text(); if (typeof obj.isDownloaded != 'undefined'){ window.location = 'http://google.com'; } } Basically, I want to redirect the user when this message appears after sending form data through AJAX: The link to the file(s) has been emailed to you..
has comment: http://stackoverflow.com/comment/46800582
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29309919
possible better answer: http://stackoverflow.com/a/29303095
has answer: http://stackoverflow.com/a/29303095
type: Question
score: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46800425

http://stackoverflow.com/comment/46678657
has text: So those 3 lines must be there ? and there is nothing we can do, unless, I decide to move out of easy-piechat.js. Right ?
comment on: http://stackoverflow.com/a/29222072
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/47003074
type: AnswerComment
score: 0
type: Comment
has text: Updated my answer with link to a revised fiddle.
comment on: http://stackoverflow.com/a/29382236

http://stackoverflow.com/q/29343521
favorite count: 0
has comment: http://stackoverflow.com/comment/46873453
type: UnansweredQuestion
downvote count: 2
has answer: http://stackoverflow.com/a/29345214
has comment: http://stackoverflow.com/comment/46873741
has comment: http://stackoverflow.com/comment/46873653
tagged with: java
has comment: http://stackoverflow.com/comment/46874707
type: Question
upvote count: 0
has comment: http://stackoverflow.com/comment/46873609
score: -2
tagged with: javascript
tagged with: jquery
has title: i need java code to open html code onclick event
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has body: I have banner HTML code if people goes to click on a text, the click should open my banner HTML page. I need a clickable text to open my HTML page. Below is my banner HTML page, i need clickable text for below banner HTML. so i need java code to open below html page on click event.

http://stackoverflow.com/comment/46883205
score: 1
has text: There is [a simpler cross-browser approach](http://stackoverflow.com/questions/1014203/best-way-to-use-googles-hosted-jquery-but-fall-back-to-my-hosted-library-on-go) to providing a local fallback for CDNs, which you should be doing anyway.
comment on: http://stackoverflow.com/q/29348679
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46780410
type: Comment
has text: thank you, i guess there is no other way to do it! I got to write a function to blur only for mobile devices....thanks!
comment on: http://stackoverflow.com/a/29291678
score: 0
type: AnswerComment

http://stackoverflow.com/a/29327086
downvote count: 0
answers question: http://stackoverflow.com/q/29326971
type: Answer
score: 1
has body: First thing, there is an error in your if condition. .href returns the absolute path, such as http://www.domain.com/yourpage.html#special1. So, you have few ways to do that, like below. if(link.href.indexOf("#special1") !== -1 || link.href.indexOf("#special2") !== -1) {} if(link.href.match(/\#special[1-2]/i) !== null) {} if(link.attr("href") === "#special1" || link.attr("href") === "#special2") {} So, your code could also be written as: var $links = $('#main-nav a'); $links.filter(function() { return this.href.match(/\#special[1-2]/i) === null }).prop("href", function() { return this.href + "-en"; });
upvote count: 1

http://stackoverflow.com/a/29247505
has body: try this hope its working for you var farm = document.getElementById("farm").innerHTML; farm = parseInt(farm + x); document.getElementById("farm").innerHTML = parseInt(farm);}
type: Answer
has comment: http://stackoverflow.com/comment/46700073
answers question: http://stackoverflow.com/q/29247466
has comment: http://stackoverflow.com/comment/46700099
score: 0

http://stackoverflow.com/a/29263740
upvote count: 1
downvote count: 1
answers question: http://stackoverflow.com/q/29263521
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29263521
has body: You can also use Jquery: https://jsfiddle.net/2w4n7pho/ &lt;script&gt; $(function(){ $("li.dropdown").hover(function(){ $(this).toggleClass("open"); }); }); &lt;/script&gt;
type: Answer

http://stackoverflow.com/a/29265378
has body: Is this even a good idea? It depends on the application needs and how it's structured. If you have so many variables and your JavaScript heavily needs them then it makes sense. Otherwise having duplicates in both environments can be considered too. Which should be the pre-compiled source? (js or less) JavaScript as LESS compiler also understands JavaScript; however, JSON, in this case is the best option. Does something like this already exist? You could create a json file and import it in your LESS file. In JavaScript the file can be easily loaded by using Ajax.
answers question: http://stackoverflow.com/q/29265232
type: Answer
score: 1
upvote count: 1
downvote count: 0

http://stackoverflow.com/q/29322857
has comment: http://stackoverflow.com/comment/46836696
has comment: http://stackoverflow.com/comment/46839121
has comment: http://stackoverflow.com/comment/46837399
type: AnsweredQuestion
upvote count: 0
has comment: http://stackoverflow.com/comment/46838059
has title: flatten and uneven array into an object
score: -1
type: Question
tagged with: arrays
has comment: http://stackoverflow.com/comment/46838084
tagged with: javascript
has answer: http://stackoverflow.com/a/29323682
has body: I have this Array and Object representing the same data: arrayExample = [ {name: "max", age: 21}, {name: "max.David", age: 27}, {name: "max.Sylvia"}, {name: "max.David.Jeff"}, {name: "max.Sylvia.Anna", age: 20}, {name: "max.David.Buffy"}, {name: "max.Sylvia.Craig"}, {name: "max.Sylvia.Robin"} ]; ObjectExample = { name: "max", age: 21, children: [ { name: "Sylvia", children: [ {name: "Craig"}, {name: "Robin"}, {name: "Anna", age: 20} ] }, { name: "David", age: 27, children: [ {name: "Jeff"}, {name: "Buffy"} ] } ] }; my objective is to extend the Array class to have 2 functions flatten which transform the objectExample into the arrayExample and uneven which do the opposite, I'm thinking maybe lodash would help here but I still didn't find the correct way to do this here's where I'm now: to flatten from objectExample to arrayExample first the objectExample structure must be specific meaning the parents must share a property with all their children sure the parents and children could have other property that should be ported to the proper item in the new arrayExample, also for the uneven function it should create an object that all the parents share the same property with their children and other property should be copied respectively. To give my use case for this I'm trying to make a d3js tree layout of angular ui router in my application that will be generated from the routes JSON file since I make the routes in a JSON file. update: my specific problem is that I need to create a d3js tree layout for angular-ui-router configurations states object which I can extract into a json file as I said before, the structure for the ui-router is like the arrayExample, and the required structure for the d3js tree layout is like the objectExample, one way to go about this is to manually rewrite it and it wont take too much time but that solution is not what I want I need to make a build task for this for generic routes that will always have the name attribute in their config object…
accepted answer: http://stackoverflow.com/a/29323682
has comment: http://stackoverflow.com/comment/46838478
answer count: 1
downvote count: 1
tagged with: lodash
favorite count: 0
tagged with: d3.js
has comment: http://stackoverflow.com/comment/46837736

http://stackoverflow.com/a/29245308
has comment: http://stackoverflow.com/comment/46696338
has comment: http://stackoverflow.com/comment/46696508
has body: Review your all CSS and make sure not contain any of these tag/tricks -webkit-transform: translateZ(0px); -webkit-transform: translate3d(0,0,0); -webkit-perspective: 1000; But if your problem persist, try change. -webkit-overflow-scrolling: auto; Or you can assign z-index for the div element. I hope I helped.
type: Answer
answers question: http://stackoverflow.com/q/29243842
has comment: http://stackoverflow.com/comment/46696811
has comment: http://stackoverflow.com/comment/46696450
score: 0

http://stackoverflow.com/a/33089928
has body: Under the section "Caution" in the react documentation about refs https://facebook.github.io/react/docs/more-about-refs.html "Never access refs inside of any component's render method - or while any component's render method is even running anywhere in the call stack." Which is exactly what you're doing. Instead you should store state about the component in this.state or properties of the component in this.props
answers question: http://stackoverflow.com/q/29361703
upvote count: 14
type: Answer
downvote count: 0
score: 14

http://stackoverflow.com/q/29338790
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46902429
tagged with: skype
has comment: http://stackoverflow.com/comment/46901300
has body: I am new to JSON, in fact Javascript. I actually found the code from someone and try to implement this for what I am trying to do. On my javascript I have: function signin(var1,var2) { Signin('login.htm?var1=' + var1 + '&amp;var2=' + var2); } function skypeme(var1, var2) { $.ajax({ url: "skypeme.cfc", dataType: "json", data: {a:var1, b:var2}, success: function(userData) { if(userData.LOGIN == 'true' &amp;&amp; userData.ID!='') { window.location = 'skype:'+userData.ID+'?chat'; } else { signin(var1,var2); } } }); } And on my skypeme.cfc: &lt;cfcomponent output="false"&gt; &lt;cffunction name="cfskypeme" access="remote" returnformat="JSON" output="false"&gt; &lt;cfargument name="a" required="true"&gt; &lt;cfargument name="b" required="true"&gt; &lt;cfset var stReturn = structNew()&gt; &lt;cfset stReturn.LOGIN=false&gt; &lt;cfset stReturn.ID=""&gt; if user login check database for skypeid &lt;cfif skypelist.recordcount eq 1&gt; &lt;cfset stReturn.LOGIN=true&gt; &lt;cfset stReturn.ID=skypelist.skype&gt; &lt;/cfif&gt; &lt;cfreturn SerializeJSON(stReturn)&gt; if user not login &lt;cfreturn SerializeJSON(stReturn)&gt; &lt;/cffunction&gt; &lt;/cfcomponent&gt; What I want to do is call the cfc and check if user is login, if not call the signin function. If the user is already signed in, check the database. If skype id is found, kick up skype, if not do nothing. But what is happening is when I called the skypme() function from my html, nothing happen. No error but skype doesn't start. What is the right way of passing the JSON value from cffunction so that it can be executed on the javasctipt side? I have tried many ways but just can't get it to work. Please help. Thank you.
tagged with: coldfusion
has comment: http://stackoverflow.com/comment/46947827
score: 2
has comment: http://stackoverflow.com/comment/46883390
has answer: http://stackoverflow.com/a/29685659
tagged with: http://stackoverflow.com/tag/json
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/46878275
has comment: http://stackoverflow.com/comment/47047072
upvote count: 3
has comment: http://stackoverflow.com/comment/46901216
has title: How to pass JSON from CFFUNCTION
answer count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/46902020
has comment: http://stackoverflow.com/comment/46865496
tagged with: jquery
favorite count: 0

http://stackoverflow.com/a/29305154
answers question: http://stackoverflow.com/q/29228104
score: 0
has comment: http://stackoverflow.com/comment/46832180
has comment: http://stackoverflow.com/comment/51186264
type: Answer
has comment: http://stackoverflow.com/comment/51208680
has body: The demo was insufficient in this case. You also need to attach an event listener to the button to trigger the slideout effect. Here's a quick demo: http://jsfiddle.net/therouxdown/ma4pvg5p/3/ document.querySelector('#panel button').addEventListener('click', function() { slideout.toggle(); }); Hope that helps!

http://stackoverflow.com/comment/46831778
comment on: http://stackoverflow.com/a/29320150
type: Comment
type: AnswerComment
has text: I'd personally change the array you're pushing (`[$(this).find("title").text(), ... ("thirdTitle").text()]`) to an object, like this: `{title: $(this).find("title").text() ...`
score: 0

http://stackoverflow.com/a/29235429
has body: I'm not sure what your definition of "API" is. I assume you mean that you simply don't want to make extra calls to the server. You can return any information needed by your client-side code your response to Fine Uploader's upload success POST. The parameters will be made available to your onComplete callback handler. There are also a large number of API methods that may be of use, including one to retrieve the file name.
answers question: http://stackoverflow.com/q/29234214
score: 0
type: Answer

http://stackoverflow.com/a/29325720
type: Answer
has comment: http://stackoverflow.com/comment/46850100
has comment: http://stackoverflow.com/comment/46842106
has comment: http://stackoverflow.com/comment/46850853
has comment: http://stackoverflow.com/comment/46842122
has body: please Try this: $.ajax({ url: 'your url', global: false, type: 'POST', data: {}, async: false, success: function() {} });
has comment: http://stackoverflow.com/comment/46851152
answers question: http://stackoverflow.com/q/29325672
score: 0
has comment: http://stackoverflow.com/comment/46850937

http://stackoverflow.com/q/29283813
has title: onClick() Not Working
score: 0
answer count: 2
upvote count: 1
tagged with: google-chrome
has answer: http://stackoverflow.com/a/29283872
downvote count: 1
tagged with: onclick
has comment: http://stackoverflow.com/comment/46765458
has answer: http://stackoverflow.com/a/29283882
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29283872
tagged with: javascript
has body: I have two links on my html page which when clicked runs a script using 'onClick'. the code worked perfectly before but after I added some code then removed it, it has stopped working. Link Change Log Options.js document.getElementById('log').addEventListener('click', showLog); function showLog() { var log = window.open("", "title", "srollbars=0, width=440, height=620"); var src = "../changelog/changelog.txt"; log.document.write(' '); } The code seems slightly finicky. Thanks for any help!
possible better answer: http://stackoverflow.com/a/29283882
type: Question
favorite count: 0

http://stackoverflow.com/comment/46878364
comment on: http://stackoverflow.com/a/29346140
type: Comment
score: 0
type: AnswerComment
has text: Ok, what is your slider ?

http://stackoverflow.com/comment/46711950
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29254432
has text: you declare `cells` as _array_ but assing one object
score: 0

http://stackoverflow.com/a/29306169
score: 4
upvote count: 4
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29306052
type: Answer
has body: This should work: $('button').click(function(){ console.log($(this).closest('li').find('input[name="url"]').val()) }) You need to use $(this) within the click function to refer to that specific element and then traverse the DOM accordingly (multiple ways to skin a cat on this one) to get the hidden input. jsFiddle example
answers question: http://stackoverflow.com/q/29306052

http://stackoverflow.com/a/29257042
type: Answer
has comment: http://stackoverflow.com/comment/46716857
has comment: http://stackoverflow.com/comment/46717385
answers question: http://stackoverflow.com/q/29256780
score: 0
has body: You're adding the header to the request object, not the response. Also the below is the preferred way to do it. router.use('/update', function(req, res, next) { res.header('content-type', 'application/json'); console.log('router use invoked'); next(); });
has comment: http://stackoverflow.com/comment/46716826

http://stackoverflow.com/comment/46840992
score: 0
type: Comment
has text: Does it need any software requirements? Coz I think parseInt() doesn't work for me.
comment on: http://stackoverflow.com/a/29324887
type: AnswerComment

http://stackoverflow.com/q/29240452
linked to: http://stackoverflow.com/q/13735869
has comment: http://stackoverflow.com/comment/46687905
tagged with: javascript
tagged with: jquery
tagged with: ajax
has answer: http://stackoverflow.com/a/29244494
has comment: http://stackoverflow.com/comment/46687892
score: 0
has comment: http://stackoverflow.com/comment/46687365
has comment: http://stackoverflow.com/comment/46687178
answer count: 1
has comment: http://stackoverflow.com/comment/46687330
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46687341
upvote count: 1
has comment: http://stackoverflow.com/comment/46687928
downvote count: 1
has comment: http://stackoverflow.com/comment/46687118
has comment: http://stackoverflow.com/comment/46687286
has comment: http://stackoverflow.com/comment/46690522
has body: I can use jQuery for fast drafting / prototyping but I can not YET implement it on our production servers. I need assistance with getting the plain javascript version of the following to work. In the plain javascript version submit.php is not receiving the json data. Original jQuery: $.ajax({ type: "POST", url: "submit.php", data: json, dataType: "json", success: function(json){ alert('success'); } }); Plain javascript: var xmlhttp; if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp = new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.open("POST","submit.php",true); xmlhttp.setRequestHeader("Content-Type", "application/json; charset=UTF-8"); xmlhttp.send(json); xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 &amp;&amp; xmlhttp.status==200) { alert('success'); } }
tagged with: http://stackoverflow.com/tag/json
has title: Convert jQuery .ajax with dataType: json to plain javascript
type: Question
has comment: http://stackoverflow.com/comment/46687163

http://stackoverflow.com/a/29222610
has comment: http://stackoverflow.com/comment/61655368
has body: See the following generic data function. Use $.data(obj) to get all metadata attributed to any object, $.data(obj, key) to get the metadata with a given key attributed to an object, and $.data(obj, key, val) to set the metadata with a given key to an object. There may be issues with collisions of native object attributes like setting something with a key of 'toString' or 'hasOwnProperty'. window.$ = { data: function(obj, key, val) { if(!obj) { return this._data; } else if(!key) { if(!(obj in this._data)) { return {}; } return this._data[obj]; } else if(arguments.length &lt; 3) { if(!(obj in this._data)) { return undefined; } return this._data[obj][key]; } else { if(!(obj in this._data)) { this._data[obj] = {}; } this._data[obj][key] = val; } }, _data: {} }; Here's an example of how it's used: $.data(document.body); // Returns {} because no data has been set for this object $.data(document.body, 'lastUpdate', new Date());//Sets 'lastUpdate' of obj to current time $.data(document.body, 'lastUpdate'); // Gets previously set time $.data(document.body); // Gets object of all data, including 'lastUpdate' time $.data(document.body, 'nonexistant'); // Returns undefined because property was never set $.data(); // Returns all metadata
downvote count: 1
has comment: http://stackoverflow.com/comment/61663997
answers question: http://stackoverflow.com/q/29222027
type: Answer
upvote count: 4
has comment: http://stackoverflow.com/comment/46654219
has comment: http://stackoverflow.com/comment/46678383
score: 3

http://stackoverflow.com/comment/46782424
type: QuestionComment
comment on: http://stackoverflow.com/q/29292921
score: 0
has text: Yup. That is one way of solving this problem.
type: Comment

http://stackoverflow.com/a/29282037
score: 1
upvote count: 1
has body: Your $('.delete_loop').on('ajax:success', function () { ... }); event assignment is inside the code invoked during "delete" operation. Every time you delete, you add a new 'ajax:success' event handler. All these event handlers are executed on subsequent "delete"s. Move the above event assignment inside $(document).ready(function() { ... });
has comment: http://stackoverflow.com/comment/46765779
downvote count: 0
answers question: http://stackoverflow.com/q/29276722
type: Answer

http://stackoverflow.com/comment/46897164
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29355297
has text: @Pointy I modified the code and look at my problem now.

http://stackoverflow.com/a/29309549
has comment: http://stackoverflow.com/comment/46813174
type: Answer
has comment: http://stackoverflow.com/comment/46813347
has body: why don't you try css hover? like: .myClass{ height: 100px; transition: 1s; } .myClass:hover{ height: 200px; } at the click event you call a javascript function like: function myFunc(object){ object.className += "myClass"; }
has comment: http://stackoverflow.com/comment/46813445
has comment: http://stackoverflow.com/comment/46812958
score: 0
answers question: http://stackoverflow.com/q/29309495
has comment: http://stackoverflow.com/comment/46813060
has comment: http://stackoverflow.com/comment/46813180
has comment: http://stackoverflow.com/comment/46813212

http://stackoverflow.com/a/29357596
has body: And using jQuery, you could do the following. function addElems(ele, howMany, append) { var $items = $(); for (var i = 0; i < howMany; i++) { var $ele = $("<" + ele + "/>"); typeof append !== "undefined" && $ele.append(append); $items = $items.add($ele); } return $items; } var $table = $("#myTable").append(" "); var $trs = addElems('tr', 16); $table.append($trs); $table.find("tbody > tr").each(function() { var $tds = addElems('td', 16, " My Div "); $(this).append($tds); });
type: Answer
answers question: http://stackoverflow.com/q/29357100
score: 0

http://stackoverflow.com/comment/46702361
type: AnswerComment
score: 0
has text: No problem, the 'on' event handler will take care of it...!! Please check it and let me know if you face any problem.
type: Comment
comment on: http://stackoverflow.com/a/29231778

http://stackoverflow.com/comment/46660423
type: Comment
comment on: http://stackoverflow.com/a/29226346
has text: @Lakshmi:- Indeed. You just escaped the /
type: AnswerComment
score: 0

http://stackoverflow.com/q/29226618
has title: Simple javascript 'new' keyword
downvote count: 1
tagged with: object
type: AnsweredQuestion
upvote count: 3
tagged with: new-operator
has body: I created simple object var myobject={ sum:function(){ console.log('sum') }, sub:function(){ console.log('sub') } } then i created new object from the above object like:- var newmyobject=new Object(myobject); Finally i added a property to new object like:- newmyobject.mult=function(){ console.log('multi'); } Now problem is that when i do console.log(myobject); console.log(newmyobject); Both are showing same result. I was expecting "mult()" should only be in newmyobject.
has answer: http://stackoverflow.com/a/29226660
has comment: http://stackoverflow.com/comment/46660660
type: Question
score: 2
answer count: 1
has comment: http://stackoverflow.com/comment/46660609
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/46660765
accepted answer: http://stackoverflow.com/a/29226660
has comment: http://stackoverflow.com/comment/46660727

http://stackoverflow.com/comment/46669666
has text: Side note: `appendTo` accepts a selector, no need for the `$()` around `#somewhere`. Though I'd probably do `$("#somewhere").append(temp)` instead.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29231761

http://stackoverflow.com/comment/46869197
type: QuestionComment
has text: Yes, Already tryed, doesn't work
score: 0
comment on: http://stackoverflow.com/q/29340773
type: Comment

http://stackoverflow.com/q/29278480
type: AnsweredQuestion
tagged with: object
has answer: http://stackoverflow.com/a/29278664
tagged with: http://stackoverflow.com/tag/json
type: Question
score: 0
has body: I have an array of objects, an example of a few of them being [ { "lang_code": "eng", "site_language": "1", "name": "English" }, { "lang_code": "afr", "site_language": "1", "name": "Afrikaans" }, { "lang_code": "ale", "site_language": "0", "name": "Aleut" }, ] I want to be able to search the whole array for a specific lang_code, let's say I use eng. I want to search the whole array for eng. If it's there, I want it to return English, if not, I want it to return invalid. Any ideas on this?
has title: Array of objects
accepted answer: http://stackoverflow.com/a/29278843
possible better answer: http://stackoverflow.com/a/29278580
has comment: http://stackoverflow.com/comment/46754930
tagged with: arrays
tagged with: javascript
has answer: http://stackoverflow.com/a/29278580
favorite count: 0
has answer: http://stackoverflow.com/a/29278566
answer count: 5
has answer: http://stackoverflow.com/a/29278625
has answer: http://stackoverflow.com/a/29278843
upvote count: 1
downvote count: 1

http://stackoverflow.com/q/29275543
tagged with: checkbox
possible better answer: http://stackoverflow.com/a/29275599
upvote count: 1
has answer: http://stackoverflow.com/a/29275599
has answer: http://stackoverflow.com/a/29275628
has answer: http://stackoverflow.com/a/29275598
has answer: http://stackoverflow.com/a/29275629
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/46750209
has answer: http://stackoverflow.com/a/29275607
has answer: http://stackoverflow.com/a/29275643
type: Question
has title: Select all checkboxes on click of radio button
downvote count: 0
has answer: http://stackoverflow.com/a/29275603
accepted answer: http://stackoverflow.com/a/29275598
has body: I have worked out how on clicking the radio button how to check a checkbox on my page, however this selects on the ID of the checkbox. The checkboxes on my page a dynamically generated with an id number on the end. &lt;input type="checkbox" certificate="false" id="gridcb0" siteid="23445" value="72278" class="custom selector"&gt; Option One&lt;br /&gt; &lt;input type="checkbox" certificate="false" id="gridcb1" siteid="23445" value="72278" class="custom selector"&gt; Option Two&lt;br /&gt; &lt;input type="checkbox" certificate="false" id="gridcb2" siteid="23445" value="72278" class="custom selector"&gt; Option Three&lt;br /&gt; &lt;input type="checkbox" certificate="false" id="gridcb3" siteid="23445" value="72278" class="custom selector"&gt; Option Four&lt;br /&gt; &lt;input type="checkbox" certificate="false" id="gridcb4" siteid="23445" value="72278" class="custom selector"&gt; Option Five&lt;br /&gt; &lt;input type="radio" id="op5" value="1" name="options2" class="custom"&gt; Select All As you can see the IDs are gridcb0 to gridcb5 however the number on the end could go on in the hundreds. Here my JS jQuery('#op5').click(function(){ jQuery('#gridcb0').attr('checked', true); }); At the moment this will only select the top checkbox, how can change this JS so I cycle through and check all the required checkboxes?
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29275624
favorite count: 0
answer count: 9
has answer: http://stackoverflow.com/a/29275954
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/29272934
has answer: http://stackoverflow.com/a/29273083
accepted answer: http://stackoverflow.com/a/29273083
answer count: 2
has body: I'm using time picker to select only time in my app. The problem is that I need to set min and max time limits from the string. For example I have: var min = '10:15:12'; var max = '19:15:12'; How to properly create date from it and append limits to already initialized time picker ?
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29273051
score: 0
tagged with: datetimepicker
has title: How to set minimum and maximum time in timepicker?
possible better answer: http://stackoverflow.com/a/29273051
type: Question
type: AnsweredQuestion
tagged with: jquery-ui

http://stackoverflow.com/q/29342551
has answer: http://stackoverflow.com/a/29342629
has answer: http://stackoverflow.com/a/29342639
accepted answer: http://stackoverflow.com/a/29342639
has title: Import a script in another in jquery
answer count: 4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29342681
type: Question
has body: I have contactus.js in whitch is defined the sendMail(to) function. I have main.js: ... $('#ContactUs').click(function(){ // how to execute /contactus.js, and when done, send mail? sendMail(to); }); ... However, as main.js is used in every HTML page of the site, I didn't like to include contactus.js before main.js, in order do not load a useless script. I need to load (execute) contactus.js only when a click on the #contactus was made. EDIT: I added a Fiddle here, to demonstrate the effect: $(function() { console.log("ready!"); $('#submit').click(function() { console.log("click start"); $.getScript("http://parsleyjs.org/dist/parsley.js", function() { console.log("the object is: " + window.parsley); }); console.log("click end"); }); }); submit I expect "window.parsley" be defined, but is not...
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29342648
score: 0
has comment: http://stackoverflow.com/comment/46873758
possible better answer: http://stackoverflow.com/a/29342629

http://stackoverflow.com/comment/78806425
type: Comment
comment on: http://stackoverflow.com/a/35981159
score: 1
type: AnswerComment
has text: Doesn't do anything on RN 42.

http://stackoverflow.com/comment/46833764
type: Comment
comment on: http://stackoverflow.com/q/29321232
score: 0
type: QuestionComment
has text: The best way would probably be to not retrieve the full number until the button is clicked, then retrieve it with an AJAX request.

http://stackoverflow.com/q/29277632
type: AnsweredQuestion
has title: Html handling with JavaScript - fails on exceed
has answer: http://stackoverflow.com/a/29277857
upvote count: 1
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29277857
has body: I'm having trouble with handling HTML pattern attribute. I would like to change the color of indicator basing on pattern fulfifllment. It doesn't go green until the input is 3 characters long but it fails to turn red again when it exceeds 20 chars. Here's the HTML code: Imię and the Javascript function: function checkInput(id, name) { var input = document.getElementById(id); isValid = input.value.search(new RegExp(input.getAttribute('pattern'))) >= 0; var c = document.getElementById(name); var ctx = c.getContext("2d"); if (isValid) ctx.fillStyle = "green"; else ctx.fillStyle = "red"; ctx.fill(); } the line isValid = input.value.search(new RegExp(input.getAttribute('pattern'))) >= 0; was taken from Javascript fallback for the HTML5 "pattern" attribute on EDIT: The circle is drawn on page load by: function drawCicle(elementid) { var c = document.getElementById(elementid); var ctx = c.getContext("2d"); ctx.beginPath(); ctx.arc(15, 15, 10, 0, 2 * Math.PI); ctx.stroke(); }
tagged with: validation
has comment: http://stackoverflow.com/comment/46753572
answer count: 1
downvote count: 0
score: 1
favorite count: 0
linked to: http://stackoverflow.com/q/8291152
tagged with: http://stackoverflow.com/tag/html
tagged with: input
has comment: http://stackoverflow.com/comment/46753537

http://stackoverflow.com/a/29359801
answers question: http://stackoverflow.com/q/29359550
has body: function validateName(){ var fName = document.getElementById("fName").value; var regxForName= /^[a-zA-Z]+$/; return fName.test(fName); } function validateEmail(){ var email = document.getElementById("email").value; var re = /^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i; return re.test(email); }
score: 0
type: Answer

http://stackoverflow.com/a/49656745
score: 0
has body: An important point that might get lost is that each font that is used on canvas must also be loaded by setting the font-family style-attribute for the canvas element. Here's my version using jquery. The ready event removes the need for any timeouts.
type: Answer
answers question: http://stackoverflow.com/q/29248182

http://stackoverflow.com/q/29358258
tagged with: javascript
has body: Having a lot of trouble with this, to the point where I'm desperate for a push in the correct direction. Working on trying to complete a common Underbar (basically Underscore) exercise by writing a reduce function. It has to satisfy four tests: Should be able to sum up an array Should use the first element as an accumulator when none is given Should involve the iterator on the first element when given an accumulator Should not invoke the iterator on the first element when using it as an accumulator This suggests to me that there's two basic situations: An accumulator is given, making accumulator != undefined, at which point you can use .each to satisfy tests 1 and 3 since you'd go through all values, starting with (accumulator, collection[0]), then (collection[0], collection[1]), and so on. Or that's my thinking; I could be way off. if (accumulator != undefined) { _.each(collection, function(value) { accumulator = iterator(accumulator, value); }); } return accumulator; Tests 2 and 4 still fail because no accumulator is given, and at that point, I'm lost. I don't think .each can be used. Basically I have to tell this to start with collection[0] and iterate through the rest, but I'm completely lost. I'm still very new to coding and a lot of this has yet to fully sink in. Any help that can be provided is deeply appreciated. If my thinking is wrong on how these functions work, please feel free to correct that as well. I'm just looking for help.
has answer: http://stackoverflow.com/a/42601215
tagged with: iterator
answer count: 2
downvote count: 0
has answer: http://stackoverflow.com/a/39667357
score: 1
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46900964
tagged with: underscore.js
upvote count: 1
has comment: http://stackoverflow.com/comment/46911789
type: Question
has title: .Reduce without an accumulator
tagged with: reduce

http://stackoverflow.com/comment/46913395
type: Comment
score: 1
has text: This seems to work quite well apart from limited (but still okay) browser support.
comment on: http://stackoverflow.com/a/29365164
type: AnswerComment

http://stackoverflow.com/comment/46745448
comment on: http://stackoverflow.com/a/29272043
type: AnswerComment
score: 0
type: Comment
has text: hi Dyrandz :D yay, i got it , i did same way as 1st your way ! thank you so much ! i will mark now. Could you show me where is mark button ?

http://stackoverflow.com/a/29325638
downvote count: 0
score: 1
has body: There were two problems with your script (Well technically three, but I think the missing v at the beginning was a copy/paste mistake. 1st: The window.onload functions needs to be outside calculate_click. It never gets called, because the calculate_click never gets called. 2nd: The input for perimeter, had id="total", but you were calling $("perimeter"). This is fixed in the jsfiddle. Here is a working form.
has comment: http://stackoverflow.com/comment/46841945
upvote count: 1
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29325583
type: Answer
accepted answer of: http://stackoverflow.com/q/29325583

http://stackoverflow.com/comment/46655941
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29223726
has text: I got unexpected token : at return { placeholder : content };
score: 0

http://stackoverflow.com/comment/46832285
type: QuestionComment
comment on: http://stackoverflow.com/q/29320237
score: 0
has text: @ Ondkloss. That's a very good point, thank you. I'll sort that out. I think that is really down to my inexperience with javascript / highcharts etc. I guess I should pop that in my constructor for the charts.
type: Comment

http://stackoverflow.com/comment/46788481
type: AnswerComment
has text: thanks! _Whereas for a factory, ...the return value is cached and returned every time you inject the service._ - but with the `.service()` the returned value is also cached, right?
comment on: http://stackoverflow.com/a/29292817
score: 0
type: Comment

http://stackoverflow.com/q/29368077
has answer: http://stackoverflow.com/a/29368408
has answer: http://stackoverflow.com/a/29368250
answer count: 3
downvote count: 0
tagged with: javascript
tagged with: tabular
has title: How to create output table using given input using Javascript?
favorite count: 0
has answer: http://stackoverflow.com/a/29368513
has body: If you were given the following input: 8, Black, Lexus 9, Green, Mercedes 10, Brown, Cadillac 11, Gray, Porsche What would be the proper procedure to get the output forming a table where the headers are: id, Color, Car
tagged with: input
type: UnansweredQuestion
score: 1
tagged with: output
upvote count: 1
has comment: http://stackoverflow.com/comment/46918305
has comment: http://stackoverflow.com/comment/46918113
type: Question

http://stackoverflow.com/q/29355524
has comment: http://stackoverflow.com/comment/46897580
tagged with: javascript
has answer: http://stackoverflow.com/a/29355922
has body: I've a navigation bar and an image below it. I'm using -webkit-transform: scale() to zoom image on hover, but when it is scaled up it hides my navigation bar. I want it to zoom below my navigation bar. ( not behind it so zindex doesn't apply.) Untitled Document
upvote count: 0
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/46896752
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/46898726
downvote count: 2
has title: using -webkit-transform: scale() to zoom image
type: Question
score: -2
has comment: http://stackoverflow.com/comment/46896133

http://stackoverflow.com/comment/51122888
type: QuestionComment
comment on: http://stackoverflow.com/q/29290563
has text: Bug still extant in 1.3.6, where it consumed a day of my time. Many thanks for this write-up with fix - I had stalled on discovering it worked in the default namespace.
type: Comment
score: 1

http://stackoverflow.com/comment/46717111
type: Comment
has text: Why not reduce the size if I can? I just see the same node_modules being used so figured there was redundancy. I'll agree with you though and not stress such a small amount of space.
score: 0
comment on: http://stackoverflow.com/q/29242621
type: QuestionComment

http://stackoverflow.com/comment/46715738
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29256335
has text: @ShaunakD the alertClose() is defined in navbar.js
score: 0

http://stackoverflow.com/comment/46785133
score: 1
has text: do an ajax call, whats the problem here?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29294506

http://stackoverflow.com/a/68209073
upvote count: 1
downvote count: 1
answers question: http://stackoverflow.com/q/29348926
type: Answer
has body: The simplest way I found is to simply count the number of .swiper-slide before Swiper initialize code runs (and duplicates the slides). var numOfSlides = document.querySelectorAll(".swiper-slide").length; slider 1 Slide 1 Slide 2 Slide 3
score: 0

http://stackoverflow.com/q/29360778
tagged with: node.js
has body: I have been doing an app for the pebble watch during the penn state hackathon. On campus I was getting the information from a local server(thats what i thought) using node.js and displaying that information on the watch. It worked perfect. Now, I am back at my home and for some reason the link for the http server changed, and now, when I get the ajax request (from this updated link) it fails, saying that the ajax request failed:null (null as the error I suppose) any ideas why?? The previous link that I was running was:http://client-75-102-97-252.mobility-up.psu.edu:3000 Now I am running on:http://Kevin-Cs-MacBook-Pro-2.local:3000 And it doesn't work. I am using the ajax function as described in the Pebble.js API ajax( { url: 'http://Kevin-Cs-MacBook-Pro-2.local:3000/Kevin/medicine', type: 'json' }, function(data, status, request) { console.log('Quote of the day is: ' + data.contents.medicine); }, function(error, status, request) { console.log('The ajax request failed: ' + error); } ); I’m not sure what is happening. Thanks, Kevin
type: AnsweredQuestion
score: 2
upvote count: 2
tagged with: pebble-watch
type: Question
has answer: http://stackoverflow.com/a/31518878
tagged with: javascript
answer count: 1
downvote count: 0
accepted answer: http://stackoverflow.com/a/31518878
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/47394243
has comment: http://stackoverflow.com/comment/48661432
has title: Error when getting an AJAX request with Pebble.js

http://stackoverflow.com/comment/46872916
score: 0
type: Comment
has text: Unfortunately i can't I'm using ajax(communicating with database) to gain dates and store them in final_array.
type: AnswerComment
comment on: http://stackoverflow.com/a/29342937

http://stackoverflow.com/a/29313721
answers question: http://stackoverflow.com/q/29313688
has body: Q1: Use the checked property on the element, and if it's not checked, advance to the next element. Q2: See question #1 Q3: document.getElementById('msg').innerHTML;
type: Answer
has comment: http://stackoverflow.com/comment/46826396
score: 0

http://stackoverflow.com/q/29314359
score: 1
downvote count: 1
has answer: http://stackoverflow.com/a/29314384
type: Question
has body: I have this time value 2000-01-01T10:00:00.000Z How do i convert it in javascript to only return the time 10:00
tagged with: javascript
answer count: 3
has answer: http://stackoverflow.com/a/29314396
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29314387
has title: Convert time string value to time javascript
upvote count: 2

http://stackoverflow.com/a/29233300
upvote count: 4
answers question: http://stackoverflow.com/q/29233174
type: AcceptedAnswer
type: Answer
score: 3
downvote count: 1
accepted answer of: http://stackoverflow.com/q/29233174
has body: document.getElementById("myLink").href = document.URL; Click me I am a link Hover your mouse over the link to see which link.

http://stackoverflow.com/q/29349098
has answer: http://stackoverflow.com/a/29350930
type: AnsweredQuestion
score: 1
tagged with: http://stackoverflow.com/tag/json
tagged with: angular-translate
type: Question
downvote count: 0
accepted answer: http://stackoverflow.com/a/29350930
tagged with: javascript
has title: AngularJS does not translate correctly with translate-value
answer count: 1
has body: I got a small problem with my I18n integration. AngularJS seems to skip one translation in the whole page. Everything translates fine except for one tag. I get my translations through JSON. { "password": { "title": "Wachtwoord voor [{{username}}]", "form": { "button": "Opslaan" }, "messages": { "error": "Er is een fout opgetreden! Het wachtwoord kon niet worden veranderd.", "success": "Wachtwoord veranderd!" } } } The line in the HTML: Password for [{{account.login}}] This just displays Password for [Admin]. The request for the password.json file contains exact the same as i stated above. The html contains this when inspected through the Chrome Console: Password for [admin] Everything else (Without those translate-values) translate fine. But this line doesnt. Why doesnt it work? The login name is correctly passed. Thanks in advance. Cheers!
favorite count: 0
tagged with: angularjs
upvote count: 1

http://stackoverflow.com/tag/json
tags question: http://stackoverflow.com/q/29263495
tags question: http://stackoverflow.com/q/29269237
tags question: http://stackoverflow.com/q/29323367
tags question: http://stackoverflow.com/q/29343307
tags question: http://stackoverflow.com/q/29291410
tags question: http://stackoverflow.com/q/29332477
tags question: http://stackoverflow.com/q/29295602
tags question: http://stackoverflow.com/q/29367636
tags question: http://stackoverflow.com/q/29359358
tags question: http://stackoverflow.com/q/29362036
tags question: http://stackoverflow.com/q/29320760
tags question: http://stackoverflow.com/q/29368448
tags question: http://stackoverflow.com/q/29288370
tags question: http://stackoverflow.com/q/29280765
tags question: http://stackoverflow.com/q/29321811
tags question: http://stackoverflow.com/q/29276612
tags question: http://stackoverflow.com/q/29323115
tags question: http://stackoverflow.com/q/29233591
tags question: http://stackoverflow.com/q/29272190
tags question: http://stackoverflow.com/q/29331739
tags question: http://stackoverflow.com/q/29263778
tags question: http://stackoverflow.com/q/29320899
tags question: http://stackoverflow.com/q/29350632
tags question: http://stackoverflow.com/q/29222662
tags question: http://stackoverflow.com/q/29320318
tags question: http://stackoverflow.com/q/29311898
tags question: http://stackoverflow.com/q/29266548
tags question: http://stackoverflow.com/q/29296452
tags question: http://stackoverflow.com/q/29277851
tags question: http://stackoverflow.com/q/29340269
tags question: http://stackoverflow.com/q/29336560
tags question: http://stackoverflow.com/q/29220837
tags question: http://stackoverflow.com/q/29272748
tags question: http://stackoverflow.com/q/29305947
tags question: http://stackoverflow.com/q/29342273
tags question: http://stackoverflow.com/q/29346528
tags question: http://stackoverflow.com/q/29272449
tags question: http://stackoverflow.com/q/29349098
tags question: http://stackoverflow.com/q/29263996
tags question: http://stackoverflow.com/q/29371644
tags question: http://stackoverflow.com/q/29343096
tags question: http://stackoverflow.com/q/29232324
tags question: http://stackoverflow.com/q/29310699
tags question: http://stackoverflow.com/q/29241920
tags question: http://stackoverflow.com/q/29242497
tags question: http://stackoverflow.com/q/29347248
tags question: http://stackoverflow.com/q/29274536
tags question: http://stackoverflow.com/q/29317358
tags question: http://stackoverflow.com/q/29260453
tags question: http://stackoverflow.com/q/29262774
tags question: http://stackoverflow.com/q/29221895
tags question: http://stackoverflow.com/q/29317812
tags question: http://stackoverflow.com/q/29235071
tags question: http://stackoverflow.com/q/29342540
tags question: http://stackoverflow.com/q/29242887
tags question: http://stackoverflow.com/q/29298260
tags question: http://stackoverflow.com/q/29315829
tags question: http://stackoverflow.com/q/29266886
tags question: http://stackoverflow.com/q/29373305
tags question: http://stackoverflow.com/q/29358850
tags question: http://stackoverflow.com/q/29319180
tags question: http://stackoverflow.com/q/29249656
tags question: http://stackoverflow.com/q/29286118
tags question: http://stackoverflow.com/q/29233946
tags question: http://stackoverflow.com/q/29331006
tags question: http://stackoverflow.com/q/29283339
tags question: http://stackoverflow.com/q/29321976
tags question: http://stackoverflow.com/q/29259621
type: Tag
tags question: http://stackoverflow.com/q/29331757
tags question: http://stackoverflow.com/q/29341015
tags question: http://stackoverflow.com/q/29290567
tags question: http://stackoverflow.com/q/29265945
tags question: http://stackoverflow.com/q/29251647
tags question: http://stackoverflow.com/q/29349014
tags question: http://stackoverflow.com/q/29316226
tags question: http://stackoverflow.com/q/29247523
tags question: http://stackoverflow.com/q/29323777
tags question: http://stackoverflow.com/q/29235574
tags question: http://stackoverflow.com/q/29307354

http://stackoverflow.com/comment/86200685
comment on: http://stackoverflow.com/a/32925249
type: AnswerComment
score: 0
type: Comment
has text: it worked but it reappears when we resize or try to add `fixedColumns` options of datatable

http://stackoverflow.com/q/29364604
upvote count: 1
has answer: http://stackoverflow.com/a/29365039
has answer: http://stackoverflow.com/a/29364703
type: Question
tagged with: javascript
score: -1
has body: I want activate textarea like on facebook wall. I was tried .focus() but not working. Is there any way to click on it with javascript or visualbasic ?
tagged with: webkit
has answer: http://stackoverflow.com/a/29364773
has title: how to click on textarea to activate them with javascript
tagged with: textarea
favorite count: 0
tagged with: click
has answer: http://stackoverflow.com/a/29364846
answer count: 4
type: UnansweredQuestion
downvote count: 2

http://stackoverflow.com/comment/46769903
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29285809
has text: toolt.json would be as: `[ [ "furniture1", "$560"], [ "furniture2", "$785"],]`

http://stackoverflow.com/comment/46788673
has text: This only fixes it for the Chrome browser + it's not really an option to let every client fix this in their browser settings
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29296487

http://stackoverflow.com/q/29288512
tagged with: highcharts
tagged with: javascript
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/29289214
has body: Trying to use a csv file with highstocks, but there seems to be an issue with my date format. I am able to use csv files with no dates fine, highcharts without highstocks using the csv fine, and json files (dates in javascript format) fine. Can anyone please advise what I'm doing wrong? This is sample from the csv: Date,Value 01-05-2014,155 02-06-2014,156 03-11-2014,157 This is the code:
has comment: http://stackoverflow.com/comment/46775354
type: AnsweredQuestion
has title: Highstock csv date issue
accepted answer: http://stackoverflow.com/a/29289214
type: Question

http://stackoverflow.com/a/29364377
has comment: http://stackoverflow.com/comment/46913228
score: 0
has body: If I understand correctly, you want to grab the iframe object right? can't you just use a formal jQuery call of the iframe??: $('iframe') see this example: https://jsfiddle.net/79bnmcgb/3/
type: Answer
answers question: http://stackoverflow.com/q/29364124

http://stackoverflow.com/q/29271045
type: Question
has answer: http://stackoverflow.com/a/29271084
tagged with: javascript
has title: animation function is not applied to each elements
has body: here is a problem i am facing in my progressbar. i have data-percent attribute in my "pro-bar" class . each data-percent is different but when in browser i'am getting first pro-bar's data-percent value applied to all Here is my code: $('.pro-bar').each(function( i, elem ){ var percent = $('.pro-bar').attr('data-percent'), barparcent = Math.round(percent*5.56), $elem = $(this); console.log(percent); $elem.animate({'width':barparcent}, 2000, 'easeInOutExpo'); });
score: 0
answer count: 1
tagged with: jquery
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css

http://stackoverflow.com/comment/46899815
type: Comment
has text: @Kyrre, I updated the demo to reflect what you need from your last comment.
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/29334096

http://stackoverflow.com/a/31022676
answers question: http://stackoverflow.com/q/29255422
type: Answer
has body: A matcher needs to be added in your select2 options: select2Test: { ... matcher: function(term, text, option) { return option.name.includes(term); }, ... }
score: 0

http://stackoverflow.com/a/29366236
accepted answer of: http://stackoverflow.com/q/29366092
upvote count: 3
has comment: http://stackoverflow.com/comment/46915552
answers question: http://stackoverflow.com/q/29366092
downvote count: 1
type: AcceptedAnswer
has body: Problem is $.ajax is by default async: true, so the value of i in loop is not the desired value when it reaches success. You can simply make the ajax sync: $.ajax({ async: false, ... }) Edited: If you still want to it to be async, you need to use closures. for(var i =0; i &lt; count_model; i++){ (function(i){// closure `i` $.ajax({ type: "POST", ... }); })(i);//&lt;-- for loop `i` }
has comment: http://stackoverflow.com/comment/46915314
type: Answer
has comment: http://stackoverflow.com/comment/104661563
has comment: http://stackoverflow.com/comment/46915245
score: 2

http://stackoverflow.com/q/29316348
answer count: 1
has comment: http://stackoverflow.com/comment/46824902
has title: Add properties in object with the help of a for loop and arrays
has comment: http://stackoverflow.com/comment/46825276
accepted answer: http://stackoverflow.com/a/29327392
tagged with: reference
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29327392
has body: I am trying to add properties to an object that come from an array. This is the code I am using: var data = {}; var arr_years = [2013, 2014, 2015]; var arr_quarters2013 = ['Q2', 'Q3', 'Q4']; var arr_quarters2014 = ['Q1', 'Q2', 'Q3', 'Q4']; var arr_quarters2015 = ['Q1', 'Q2', 'Q3', 'Q4']; function createYearObjects() { for (var i in arr_years) { data[arr_years[i]] = ''; } } I am trying to add the quarters for each year from an array to the right property in my object. Say in 2013 I only have Q2, Q3 and Q4. So that was my first try. I thought keeping it simple would do the trick: function fillYearObjectsWithQuarters() { for (var prop in data) { data[prop] = arr_quarters[prop]; } } Since that did not work out, I tried to put it together as a string but all my ideas ended only up in node giving me the string 'arr_quarters2013' - 'arr_quarters2015' which is not what I want, I want to get a reference to the array with that name! function fillYearObjectsWithQuarters() { for (var prop in data) { var temp = prop.toString(); var tempString = 'arr_quarters'+temp.toString(); console.log(tempString); } } Also thought why not give it a shot and get rid of any possible async. Well this task shouldn't get me near any async-problems but still tried. createYearObjects(); setTimeout(function() { fillYearObjectsWithQuarters(); }, 250);
type: Question
tagged with: object
tagged with: arrays
tagged with: javascript
score: 0
tagged with: for-loop

http://stackoverflow.com/q/29309495
has comment: http://stackoverflow.com/comment/46813544
score: 0
has answer: http://stackoverflow.com/a/29309549
answer count: 3
tagged with: jquery
has title: zoom image when mouse hover
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46813822
has body: am trying to make more zoom when mouse hover on zoomed image. i mean when cusror hover on zoomed image, some part like square, rectangle, circle e.t.c part of image should zoom. i have the following code. please suggest me how can i achieve more zoom after zooming the image by onclick. This code is for onclick zoom.but i want further zoom on mouse hover for zoomed image(like when mouseover on image only hoverd part of image should be zoomed), please sort out my issue friends. Thanks in advance :)
tagged with: css
has comment: http://stackoverflow.com/comment/46813631
has answer: http://stackoverflow.com/a/29309556
has answer: http://stackoverflow.com/a/29309682
type: Question
tagged with: javascript

http://stackoverflow.com/comment/46758569
type: QuestionComment
comment on: http://stackoverflow.com/q/29280317
score: 2
has text: Precisely HOW have you tried to solve it? Please post some code.
type: Comment

http://stackoverflow.com/comment/46826492
comment on: http://stackoverflow.com/q/29317059
score: 0
type: Comment
type: QuestionComment
has text: [`"'test.test'"` or `'\'test.test\''`](http://jsfiddle.net/nmnck67b/1/)

http://stackoverflow.com/comment/46783166
type: AnswerComment
comment on: http://stackoverflow.com/a/29275405
has text: Yes sure, check working example(check console) : http://plnkr.co/edit/1CblTUHoMTZMKLOf4INE?p=preview
type: Comment
score: 1

http://stackoverflow.com/a/29346184
type: AcceptedAnswer
has body: Fixed by changing $('#categories_block_left.simple ul li').on('mouseenter', function() { to $('#categories_block_left.simple ').on('mouseenter','ul li', function() {
type: Answer
accepted answer of: http://stackoverflow.com/q/29345185
answers question: http://stackoverflow.com/q/29345185
score: 0

http://stackoverflow.com/comment/46853771
type: AnswerComment
comment on: http://stackoverflow.com/a/29320627
score: 0
type: Comment
has text: You var 'toUser' in your alert is not defined.

http://stackoverflow.com/a/78634304
type: Answer
has body: &lt;Image resizeMode={'cover'} //for background source={require('../assets/images/img1.jpg')} style={[ { objectFit: 'fill', flex:1, position:'absolute'}, //use position: absolute, and resizeMode= cover for background image ]} /&gt; use position: absolute and resizeMode= cover
score: 0
answers question: http://stackoverflow.com/q/29322973

http://stackoverflow.com/comment/46689669
has text: I added HTML, can you now awnser you're question according to that?
type: AnswerComment
comment on: http://stackoverflow.com/a/29241735
score: 0
type: Comment

http://stackoverflow.com/comment/46701523
type: Comment
comment on: http://stackoverflow.com/a/29247998
score: 1
has text: You have same id for one radio button and dropdown box. Id should be unique, and in your scenario change the radio button id.
type: AnswerComment

http://stackoverflow.com/comment/46925624
type: AnswerComment
comment on: http://stackoverflow.com/a/29370247
type: Comment
has text: This seems like a poor approach to solve the problem. We already know the context of the request (i.e. AJAX or in-line code) based on the file from which the validation is being called. You should remove display concerns to where the context is known and out of the validation functions altogether.
score: 0

http://stackoverflow.com/q/29332390
score: 1
has answer: http://stackoverflow.com/a/29335716
upvote count: 1
has title: External Libraries vs. "<reference path=" for TypeScript in WebStorm
answer count: 1
tagged with: javascript
linked to: http://stackoverflow.com/q/22367328
tagged with: webstorm
favorite count: 0
has body: I am trying to understand how to get WebStorm 9 to recognize external TypeScript libraries. I tried to add "TypeScript Community Stubs" for an external library -- for example knockout -- and that results in an Application Library called knockout-DefinitelyTypes to appear in my "External Libraries" node in the project tree. Expanding that node shows /Users/Decker/Library/Caches/WebStorm9/extLibs/http_github.com_borisyankov_DefinitelyTyped_raw_master_knockout_knockout.d.ts. My expectation is that that would allow me, in my own typescript file, to create a line like: var name = ko.observable('Hi'); But the TypeScript will not compile and gives the error "Cannot find name 'ko'". I am able to solve this by downloading the TypeScript definition file manually (from https://github.com/borisyankov/DefinitelyTyped) and storing it in my project -- in my case at /scripts/typings/knockout.d.ts -- and then reference it with this line in my TypeScript source file: /// &lt;reference path="../typings/knockout.d.ts" /&gt; I thought that WebStorm's external library would alleviate the need for the tag. Indeed, I'm not sure what it accomplished for me as I had to download and reference the definition file manually. Am I misunderstanding something? TIA.
type: AnsweredQuestion
downvote count: 0
accepted answer: http://stackoverflow.com/a/29335716
type: Question
tagged with: typescript

http://stackoverflow.com/comment/46876296
has text: ID name MUST be unique, otherwise use class instead
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29345126
score: 3

http://stackoverflow.com/comment/46672824
type: Comment
comment on: http://stackoverflow.com/q/29231143
score: 0
has text: The chart will be used as a budgetting tool... I think as long as the overall data of one of the lines is in a state above or below the total needed line, it should reflect one colour?
type: QuestionComment

http://stackoverflow.com/q/29228575
has comment: http://stackoverflow.com/comment/46668454
type: Question
tagged with: eslint
score: 5
upvote count: 5
answer count: 1
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/46695776
has body: I have installed syntastic plugin in vim and installed eslint in npm globally. Below is the snippet of my .vimrc for syntastic configuration: set statusline+=%#warningmsg# set statusline+=%{SyntasticStatuslineFlag()} set statusline+=%* let g:syntastic_javascript_checkers = ["eslint"] let g:syntastic_always_populate_loc_list = 1 let g:syntastic_auto_loc_list = 1 let g:syntastic_check_on_open = 1 let g:syntastic_check_on_wq = 0 Here's the result when I run :SyntasticInfo javascript, Syntastic version: 3.6.0-64 (Vim 704, CYGWIN_NT-6.3) Info for filetype: javascript Global mode: active Filetype javascript is active Available checker: eslint Currently enabled checker: eslint Assume I have following project structure, there're some custom rules activated in .eslintrc, and the definition of those rules are in .eslintrules dir: xxx_project: |--.eslintrc |--.eslintrules |-- rule1.js |-- rule2.js |-- ... |-- src |-- abc.js Everytime I run :SyntasticCheck on some source file, nothing happens. So I try running eslint against some js file directly in command line. There're some errors threw indicating cannot find definition of some custom rules. So I think eslint has found the configuration file, but it doesn't know where the --rulesdir is. Can someone help here? As far as I know, the --rulesdir option is only available in command line.
has answer: http://stackoverflow.com/a/29344058
favorite count: 0
type: UnansweredQuestion
tagged with: vim
has comment: http://stackoverflow.com/comment/46668330
has title: How to specify custom --rulesdir for eslint in vim editor

http://stackoverflow.com/comment/46679638
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29234069
type: Comment
has text: @StanislovasKalašnikovas I'm starting to think or either updating jQuery will fix your issue or you're importing the JS file in a wrong way. Could you post your whole HTML and file structure?

http://stackoverflow.com/a/33625059
has comment: http://stackoverflow.com/comment/99721814
has comment: http://stackoverflow.com/comment/55206383
accepted answer of: http://stackoverflow.com/q/29308937
type: Answer
has comment: http://stackoverflow.com/comment/55082044
answers question: http://stackoverflow.com/q/29308937
upvote count: 45
has body: Since React Native release 0.14 the handling of images has been normalized for iOS and Android and is now different. I could not find any documentation except for this very clear commit note on Github: Document new asset system. There's only a screenshot of the proposed documentation: Update: There is a link now for the real documentation: https://facebook.github.io/react-native/docs/images.html
has comment: http://stackoverflow.com/comment/65588219
has comment: http://stackoverflow.com/comment/75071982
score: 45
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/46851547
type: QuestionComment
has text: ^^ + There's no `draw2` tag in your HTML, you need a variable name instead of the string.
score: 0
comment on: http://stackoverflow.com/q/29331003
type: Comment

http://stackoverflow.com/q/29295079
has body: The following is a code taken form Owl Carousel's own site. I don't know why the callback functions(here afterMove) are not called! Could anybody get the afterMove function called? For me it's not just afterMove, but none of the callbacks works! 0 1 2 3 4 5 6
has title: Callback Functions(like afterMove) are not called
tagged with: owl-carousel
type: Question
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29295576
downvote count: 0
answer count: 1
favorite count: 0
type: UnansweredQuestion
score: 3
upvote count: 3

http://stackoverflow.com/q/29247464
type: Question
tagged with: mongodb
has body: My data returned from Mongo looks like this: [ { _id: 5510dcfb7ffb9ec87db017ca, deviceId: '150622', link: 'http://egauge15062.egaug.es/cgi-bin/egauge-show?S&amp;s=0&amp;n=6&amp;C&amp;Z=LST-8', timestamp: 1427168502, ct1: 3411, ct2: 532, ct3: 7, ct4: 43, ct5: 642 }, etc.........] I am trying to archive the data into s3 and I need to convert that into string. I tried using .join and .tostring on the array and it ends up looking like this when I push it to the server. [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]] Any ideas how I can fix this.
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29247561
score: 0
answer count: 1
favorite count: 0
has title: javascript convert array of objects to string to store in s3
upvote count: 1
downvote count: 1
has answer: http://stackoverflow.com/a/29247561
type: AnsweredQuestion
tagged with: amazon-s3

http://stackoverflow.com/q/29368180
accepted answer: http://stackoverflow.com/a/29510281
score: 0
has body: I'm trying to use ngFx library to play animation when a property changes on the scope. I've created a boilerplate code for directive: angular.module('myApp') .directive('zoomInOnChange', function () { return { restrict: 'A', scope: { param: "=" }, link: function (scope, element, attrs) { scope.$watch('param', function () { // ? }); } } }); and want to use it like this: &lt;h1 zoom-in-on-change param="{{someProp}}"&gt;{{someProp}}&lt;/h1&gt; Is there a way to trigger ngFx animations from inside the javascript code?
answer count: 1
tagged with: angularjs
tagged with: animation
tagged with: angular-directive
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/29510281
has title: Trigger ngFx animation from the javascript code
tagged with: javascript

http://stackoverflow.com/q/29325040
tagged with: css-selectors
has body: I have the following form: &lt;form&gt; &lt;input type="radio" name="group-stack" value="grouped" checked&gt;grouped&lt;br&gt; &lt;input type="radio" name="group-stack" value="stacked"&gt;stacked &lt;/form&gt; I want to get the currently selected radio button's value using d3. The following attempts have been unsuccessful: var val = d3.select('input[name="group-stack"]').checked; //undefined var val = d3.select('input[name="group-stack"][checked]')[0][0].value //always 'grouped' regardless of which radio is selected
has answer: http://stackoverflow.com/a/35981377
tagged with: javascript
upvote count: 11
answer count: 3
downvote count: 1
favorite count: 0
tagged with: d3.js
has title: get value of checked radio button using d3.js
possible better answer: http://stackoverflow.com/a/35981377
has answer: http://stackoverflow.com/a/29325083
accepted answer: http://stackoverflow.com/a/29325083
type: AnsweredQuestion
score: 10
has answer: http://stackoverflow.com/a/29325047
type: Question

http://stackoverflow.com/comment/46884857
score: 0
has text: Very interesting, although I cannot seem to make it work, please see the following jsfiddle: http://jsfiddle.net/oy4rpshv/1/
type: Comment
comment on: http://stackoverflow.com/a/29347618
type: AnswerComment

http://stackoverflow.com/comment/46903514
type: Comment
type: QuestionComment
has text: @AndrewLarson : thank you so much for spotting that type!!!
comment on: http://stackoverflow.com/q/29359492
score: 0

http://stackoverflow.com/q/29227624
type: UnansweredQuestion
has title: jQuery select dropdown value escaping character
has comment: http://stackoverflow.com/comment/46664198
has comment: http://stackoverflow.com/comment/46664041
type: Question
tagged with: jquery-selectors
has comment: http://stackoverflow.com/comment/46673167
has comment: http://stackoverflow.com/comment/46663304
has comment: http://stackoverflow.com/comment/46662269
answer count: 1
tagged with: javascript
tagged with: jquery
has body: Nothing Here - Requirement Analysis - - Training & Self Learning - - - Bug Fixing Notice that the option value/text may contains some characters: single quotes(') hyphen (-) /double hyphens (- -) When keyboard is used to select Bug fixing it selects none but works using -. What is the correct way to escape characters (in my case hyphens) and allow user to select values from dropdown usign keyboard ?
score: 0
linked to: http://stackoverflow.com/q/4220126
has comment: http://stackoverflow.com/comment/46662291
has answer: http://stackoverflow.com/a/29233546
has comment: http://stackoverflow.com/comment/46662500

http://stackoverflow.com/comment/46746411
score: 0
has text: Ok, tomorrow I'll post a demo project at plunkr. Thanks all for the help.
comment on: http://stackoverflow.com/q/29273008
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29254144
type: Answer
has comment: http://stackoverflow.com/comment/46711750
has comment: http://stackoverflow.com/comment/46712167
has comment: http://stackoverflow.com/comment/46732206
has body: Even canvg.js is not able to do the rasterization of DOM elements in IE9. However, it is able to do it from an url, so one solution could be to save the svg in a temporary file onto the server, and then rasterize it back with canvg. IMHO, a server side solution such as proposed here would be better.
score: 0
has comment: http://stackoverflow.com/comment/46711803
answers question: http://stackoverflow.com/q/29253081

http://stackoverflow.com/q/29336610
tagged with: mozilla
upvote count: 1
type: Question
downvote count: 0
tagged with: button
tagged with: javascript
has body: I am writing a firefox add-on that uses a button to take the users input and make decisions based on their response. Here's a section of my code: catch (e) { var message = 'ALERT: going to a greylisted page'+page+""; //Alert needs editing var nb = gBrowser.getNotificationBox(); var n = nb.getNotificationWithValue('greylisted_page'); if(n) { n.label = message; } else { var buttons = [{ label: 'Options', accessKey: 'B', popup: 'Website Options', callback: //Is this where I should be implementing my idea }]; const priority = nb.PRIORITY_WARNING_MEDIUM; nb.appendNotification(message, 'greylisted_page', 'chrome://browser/skin/Info.png', priority, buttons); } } }, This could be something that doesn't require all my code to find the answer.
tagged with: firefox-addon
tagged with: http://stackoverflow.com/tag/html
has title: How can I use the callback parameter in a button to get a user's preferences?
favorite count: 0
has comment: http://stackoverflow.com/comment/50130369
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46887522
answer count: 0
score: 1

http://stackoverflow.com/q/29249989
accepted answer: http://stackoverflow.com/a/29250034
type: Question
answer count: 2
has title: I can't get my jQuery to work and I'm not sure what I'm doing wrong
tagged with: javascript
tagged with: jquery
has body: so I'm really new at all of this stuff and I'm a little stuck. I've been working on this project but for some reason I can't get my jQuery to load no matter what I do. here's my HTML Eerbivore jQuery $('#gallery').flickity({ cellAlign: 'center', wrapAround: true }); I'm using Brackets as my editor. Any help or anything thing I should add would be very helpful.
score: 0
has answer: http://stackoverflow.com/a/29250034
possible better answer: http://stackoverflow.com/a/29250638
has comment: http://stackoverflow.com/comment/46704247
has answer: http://stackoverflow.com/a/29250638
type: AnsweredQuestion

http://stackoverflow.com/a/29226164
type: Answer
has body: You might want to review the Spacebars Readme, because I don't believe {{period("LTM").revenue}} is a valid spacebars tag. Functions are called by separating the function name from its arguments by a space, like so: {{functionName arg1 arg2}}. To get what you're after, you'll need to first get the copany of interest, probably with a helper that returns Companies.findOne({period: "LTM"}). Once you have the Company of interest as the data context, you'll need to use {{time.financials.revenue}} and {{time.financials.ebitda}} to get the revenue and EBITDA values. The way you've written your schema, each company entry can only have one revenue and EBITDA value, and they are stored in the time.financials object.
accepted answer of: http://stackoverflow.com/q/29225233
answers question: http://stackoverflow.com/q/29225233
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46666533
has comment: http://stackoverflow.com/comment/46680476

http://stackoverflow.com/a/29665430
type: Answer
score: 2
accepted answer of: http://stackoverflow.com/q/29240275
has body: I'm right now using this block of code. It's a little bit different from the original idea, and still not the perfect solution, but at least better and the back and forward buttons are working: $('#sdt_menu a').on('click', function (e) { var href = $(this).attr("href"); history.pushState(href, '', href); e.preventDefault(); window.onpopstate = function (event) { if (event.state != null){ document.url = event.state.url; pushingState(event.state); } }; });
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/29240275
upvote count: 2

http://stackoverflow.com/comment/65451916
type: AnswerComment
score: 0
type: Comment
has text: in your second approach Bergi where you wrote 'yield topic.getAllPages( it )' wont it compute everything inside the getAllPages method and then give you the 1st yield? I think what @DecentDabbler wants is to get page by page instead of everything at once. The first approach seems to return page by page like a true generator is supposed to
comment on: http://stackoverflow.com/a/29281361

http://stackoverflow.com/a/29257141
score: 2
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29256737
has body: As @phts said, in IE the user has to interact directly with the element (you cannot trigger it programmatically). However, you can make the element invisible (via setting it's opacity to 0) and positioning it on top of an anchor tag (or anything) so it appears the user is clicking on a link, when in actual fact they are clicking on a file input (and thus the native file chooser dialog will be shown). This is the common method to work around the problem you described. Below is an example (in the second div, I left the opacity of the input as 1 so you can see what's happening): .container { position: relative; margin: 0 0 40px;} .chooser { position: absolute; z-index: 1; opacity: 0; cursor: pointer;} .chooser-2 { opacity:1;} Click me to choose a file Click me to choose a file
answers question: http://stackoverflow.com/q/29256737
upvote count: 2
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/comment/46806753
type: Comment
has text: Nope. Just remember, when outputting it to the browser, you will need to use something like `htmlspecialchars`. But you do that on output, not when saving to the database.
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/29305897

http://stackoverflow.com/q/29337600
tagged with: javascript
tagged with: dom
tagged with: reactjs
answer count: 1
has answer: http://stackoverflow.com/a/29337753
has title: Insert temporary DOM element for onClick hander
downvote count: 0
favorite count: 0
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29337753
tagged with: twitter-bootstrap
score: 1
upvote count: 1
type: Question
has body: I've an HTML table generated by React render() which is tied to a websocket for realtime updates. What I'm looking to do is attach a React event handler "onClick" to the cell which replaces the value in the cell with a custom piece of DOM such as some Bootstraps dropdown HTML so the user can update that cell. I can use .getDOMNode() in the click event handler and then manipulate the DOM manually and insert the code, however if render() on this component was called due to a new updated state from a websocket event it would be overridden. If this race condition occurs, I need to inform the user instead of the DOM simply being replaced. I've just seen componentWillUpdate() though this still feels like I'm not using React correctly. Is there a better approach ? It feels dirty to be manipulating the DOM and incorrect to change the state.

http://stackoverflow.com/comment/46654884
comment on: http://stackoverflow.com/q/29222858
type: Comment
type: QuestionComment
score: 0
has text: I agree associative arrays would be very fast. They have have `O(1)` search complexity.

http://stackoverflow.com/a/29228876
upvote count: 2
has comment: http://stackoverflow.com/comment/46665103
answers question: http://stackoverflow.com/q/29228761
type: Answer
has comment: http://stackoverflow.com/comment/46665040
score: 2
has comment: http://stackoverflow.com/comment/46664560
has comment: http://stackoverflow.com/comment/46664652
downvote count: 0
has comment: http://stackoverflow.com/comment/46665543
has body: try this: .directive('passivemodel', function () { return { restrict: "A", scope: { passivemodel: '=' }, link: function (scope, element, attrs) { console.log("passive model", scope.passivemodel); $scope.$watch('passivemodel', function(newPassivemodel, oldPassivemodel) { //put your logic when passivemodel changed }); } }; }) Hope it helps Edit: Here is a plunker http://plnkr.co/edit/T039I02ai5rBbiTAHfzv?p=preview

http://stackoverflow.com/comment/133554974
type: AnswerComment
has text: "*Ignoring this special case, a resolved promise usually means a settled promise.*" - Thanks @Bergi, so this quote refers to when the promise resolved to something other than non-thenable/non-promise, right?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29269515

http://stackoverflow.com/comment/46825220
type: Comment
has text: http://stackoverflow.com/questions/750486/javascript-closure-inside-loops-simple-practical-example
score: 1
comment on: http://stackoverflow.com/q/29316534
type: QuestionComment

http://stackoverflow.com/q/29267729
tagged with: http://stackoverflow.com/tag/pdf
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/9749372
has comment: http://stackoverflow.com/comment/46739203
has comment: http://stackoverflow.com/comment/46737423
type: Question
accepted answer: http://stackoverflow.com/a/29358348
has comment: http://stackoverflow.com/comment/46737480
score: 0
has comment: http://stackoverflow.com/comment/46739195
has comment: http://stackoverflow.com/comment/46901000
has comment: http://stackoverflow.com/comment/46739886
has comment: http://stackoverflow.com/comment/46898803
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/46937896
has body: This may be asking too much, but here goes... I have a single page web application with dynamic content -- charts and maps (from other servers) in div tags, and so on. I would like to generate a PDF from this page, such that it reflects the page's current state. I know I can reproduce the contents of the page in a separate html page and feed that into a PDF generator, but I was hoping for a less labor intensive way. To this end, are there any PDF libraries that can walk the DOM and construct a PDF page? EDIT I know of similar questions on this site, but none of the answers solved them; rather, each answer required reconstructing the page prior to sending it to PDF. The problem is I have a single page web application and would like to avoid doing that or re-architecting my application just so I can get PDF printing.
has answer: http://stackoverflow.com/a/29358348
has title: PDF Generation from DOM?

http://stackoverflow.com/q/29343042
favorite count: 0
tagged with: angularjs
has title: JavaScript and async methods in QtWebKit
type: UnansweredQuestion
tagged with: python
has answer: http://stackoverflow.com/a/32219548
upvote count: 6
has body: I am developing desktop software based on: Python: PySide (WebKit) JavaScript: AngularJS Now, I need implement async feature: while uploading images from FTP (Python part) I need to show some uploader on UI (HTML+JS) Need your advices about the elegant solution. Very simple solution: save some flags in Python dictionary request value of this flags in JS by timer :) However, I need to hard code the time and once I have long operation such as downloading files from FTP, its issue for me Code of the solution: templateManager.js function _loadNewTemplates() { var deferred = $.Deferred(); asyncManager.run($.proxy( _loadNewTemplatesCallback, null, deferred ), "get_new_templates_list" ); return deferred; } function _loadNewTemplatesCallback ( deferred, response ) { template.newList = response.result; deferred.resolve(); } app_mamager.py @QtCore.Slot(int, result=str) def get_new_templates_list(self, id): thread.start_new_thread(get_new_templates_list, (id,)) utils.py def get_new_templates_list(id): config.set_response(id, json.dumps({'result': _get_new_templates_list(), 'error': None}, MyEncoder)) def _get_new_templates_list(): request = {'category': PRODUCT_CODE} response = requests.post(URL, data=request, headers=HEADERS) return json.loads(response.text) config.py def set_response(id, request): ''' Put pair (id, request) to the internal dictionary :param id - int, request id: :param request - string, request string: :return: ''' global _async_request _async_request[id] = request def get_response(id): ''' Returns request or empty string if request does not exist :param id - int :return - string, request string: ''' global _async_request if _async_request.has_key(id): return _async_request.pop(id) else: return ''
tagged with: multithreading
has comment: http://stackoverflow.com/comment/52321781
downvote count: 3
type: Question
tagged with: qt
score: 3
has comment: http://stackoverflow.com/comment/63646700
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/46908509
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29362276
has text: @programmingHelp oh thats easy. ill fix this give me a sec.
type: AnswerComment

http://stackoverflow.com/comment/46675251
score: 0
comment on: http://stackoverflow.com/a/29234229
has text: Is the unveil.js in the right directory and named properly? `/js/jquery.unveil.js`
type: Comment
type: AnswerComment

http://stackoverflow.com/comment/46879866
score: 0
type: AnswerComment
has text: Your answer wasn't really the answer, though. I upvoted your comment that helped thanks to the $stateChangeStart and Success. For me, the (partial) answer was a resolve between two states causing the nested view to keep showing/slowing down the state change. This discussion (and this comment, in particular) has more info: https://github.com/angular-ui/ui-router/issues/456#issuecomment-57142674 Unfortunately, even after removing the resolve, the particularly slow state change is still 3x slower than most other state changes in the app, and I don't know why.
type: Comment
comment on: http://stackoverflow.com/a/29331438

content-script
tags question: http://stackoverflow.com/q/29331175
tag name: content-script
type: Tag

http://stackoverflow.com/a/29353612
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29352501
has body: Add this to your CSS: .modal { overflow-y: auto; } /* custom class to add space for scrollbar */ .modal-scrollbar { margin-right: 15px; } And this to your JS: (function($) { $(document) .on( 'hidden.bs.modal', '.modal', function() { $(document.body).removeClass( 'modal-scrollbar' ); }) .on( 'show.bs.modal', '.modal', function() { // Bootstrap's .modal-open class hides any scrollbar on the body, // so if there IS a scrollbar on the body at modal open time, then // add a right margin to take its place. if ( $(window).height() &lt; $(document).height() ) { $(document.body).addClass( 'modal-scrollbar' ); } }); })(window.jQuery); Via- How can I prevent body scrollbar and shifting when twitter bootstrap modal dialog is loaded?

http://stackoverflow.com/comment/46930394
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29371031
has text: Do you ever have null/undefined in your date dimension? This sounds like the kind of thing that can happen when a crossfilter dimension value isn't naturally ordered.
score: 0

http://stackoverflow.com/a/29350907
score: 1
answers question: http://stackoverflow.com/q/29327884
upvote count: 1
has body: var ModelY = Backbone.Model.extend({}); var ModelZ = Backbone.Model.extend({}); var CollectionX = Backbone.Collection.extend({ model : ModelY, initialize:function(){ this.listenTo(otherCollection,'add',function(){ alert('model added to otherCollection'); }); } }); var OtherCollection = Backbone.Collection.extend({ model : ModelZ }); var otherCollection = new OtherCollection(); var collectionX = new CollectionX(); otherCollection.add(new ModelZ()); http://jsfiddle.net/eedfhm7f/ References : http://backbonejs.org/#Events-listenTo
type: Answer
downvote count: 0

http://stackoverflow.com/comment/46672216
type: Comment
has text: You know, you're right! I've bene jquery-ing for so long I didn't even think about that. Thanks!
type: AnswerComment
comment on: http://stackoverflow.com/a/29233088
score: 0

http://stackoverflow.com/comment/46813982
type: Comment
has text: Is there a way on this where i could send anyone both php pages so that someone could run them and see for themselves? It may appear clearer?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29307607

http://stackoverflow.com/q/29286328
upvote count: 1
type: Question
tagged with: responsive-design
score: 1
has comment: http://stackoverflow.com/comment/46771539
has body: So I have a rather complex div built in HTML, interwoven with some PHP. &lt;div class="full-screen" &gt; &lt;p&gt; &lt;strong style="color: #296eaa;"&gt; Description:&lt;/strong&gt; &lt;span data-value="1" id="description"&gt;&amp;nbsp; &lt;?php echo $locationDescription; ?&gt; &amp;nbsp; &lt;a href="#" class="pull-right edit-description" style="text-decoration:none; padding-left:10px;"&gt;&lt;i class="fa fa-edit"&gt; edit&lt;/i&gt;&lt;/a&gt; &lt;/span&gt; &lt;/p&gt; &lt;/div&gt; Presently, I create this div in two locations for two different page layouts (one for mobile, one for otherwise). I have a click handler that I use to open an editor on the div when clicked. $('.edit-description').click(function(e) { e.stopPropagation(); var contentContainer = $('#description'); openEditor(contentContainer); }); As for now, the click handler only attached to the first div on the page (which makes sense). I am sure this is a somewhat common problem, so I am just wondering what the best approach is. I would prefer the handler to open BOTH containers on click, and all my functions (as you can see I am opening an editor on the div) to edit the same copy of the div, so if a user shrinks their screen and the screen conformation toggles, the editor remains open, and their edits are preserved. note: Building the div in jQuery is not an option because the div is rather complex (I eliminated a lot for brevity). Is there a way to 'clone' the div so it's behavior matches the other div? My openEditor() function only allows one editor to be open at a time, by using .hide() on all previously open editors, but I suspect there is a way to trick this into thinking they are the same editor? Is there a way to build one div and move it between it's two locations using a windowWidth() function? Sincere thanks for any help. It is greatly appreciated.
downvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
has title: Toggle two containers with one click
has comment: http://stackoverflow.com/comment/46770200
has answer: http://stackoverflow.com/a/29287323
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/29287323
tagged with: css
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46770800

web-services
type: Tag
tags question: http://stackoverflow.com/q/29296233
tags question: http://stackoverflow.com/q/29278847
tags question: http://stackoverflow.com/q/29291557
tag name: web-services
tags question: http://stackoverflow.com/q/29348593
tags question: http://stackoverflow.com/q/29220047

http://stackoverflow.com/q/29357858
has body: I'm creating an HTML5 page for my application that uses the standard canvas for drawing a bar graph, and I'd like to have each one of the bars in the chart to have a hyperlink to drill down into more data. I know that this is probably a simple question, but I'm not familiar with JavaScript enough to have the answer readily available. I'm drawing the bar chart pieces in two parts, once filling the entire area and then removing the "already completed" part, as such: context.fillRect( elements[i][0], edgeOfChart, offset, 250 ) context.clearRect( elements[i][0], edgeOfChart, offset, 250.0 - heightComplete ) How can I add an anchor for a click/touch-through? Thanks.
type: AnsweredQuestion
type: Question
accepted answer: http://stackoverflow.com/a/29357952
tagged with: http://stackoverflow.com/tag/html
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/46900316
has title: HTML5 JavaScript Anchor for Bar Chart Element
has comment: http://stackoverflow.com/comment/46900329
linked to: http://stackoverflow.com/q/2932141
tagged with: javascript
has answer: http://stackoverflow.com/a/29357952

http://stackoverflow.com/comment/46960958
type: AnswerComment
has text: @mattia Yes, like the last paragraph said, you need to use the mousewheel plugin to make it work on all browsers. **I've added an example JSFiddle with it added**, but this is the kind of thing you should be attempting to do on your own.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29372748

http://stackoverflow.com/comment/46687914
type: QuestionComment
has text: Can't save form data when leaving a form for security reasons? I don't know what that means.
comment on: http://stackoverflow.com/q/29240730
score: 0
type: Comment

http://stackoverflow.com/q/29263169
favorite count: 0
has comment: http://stackoverflow.com/comment/46728368
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/46728571
has title: How can I animate a submit button to cover the field and display a "Success" message?
type: Question
has comment: http://stackoverflow.com/comment/46728560
has answer: http://stackoverflow.com/a/29263635
has comment: http://stackoverflow.com/comment/46729179
has body: I'm a designer working along side a developer and I'm trying to help him recreate one of the design elements I created. On our website, we have a section to subscribe to our newsletter. The way I have this envisioned is so that after the user enters their email and clicks submit, the submit button will expand to cover the field and will display a "Success!" message. How can I go about making this happen? Thanks in advance!
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29263476
answer count: 3
has answer: http://stackoverflow.com/a/29263605
upvote count: 1

http://stackoverflow.com/q/29359497
score: 0
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29373522
accepted answer: http://stackoverflow.com/a/29373522
has comment: http://stackoverflow.com/comment/46907113
type: Question
tagged with: canvas
has body: https://jsfiddle.net/jlpiedra90/3a7cojgw/4/ View the fiddle above for the actual code. I'm trying to create a basic menu for a 2d canvas game. I'm content with most of it at the moment, as it works fine for what I need. However, in addition to the required 'mouseclick' event for changing the screens, I figured adding 'mousemove' would make it more clear that, when hovering over the buttons, the user was actually mousing over a button they can click. Anyway, here's the relevant code for my Button function: var Button = function(...) { ... I.over = function(event) { x = event.offsetX; y = event.offsetY; if (x &gt;= I.bX &amp;&amp; x &lt;= (I.bX+I.bW) &amp;&amp; y &gt;= I.bY &amp;&amp; y &lt;= (I.bY+I.bH)) { $('#canvas').css('cursor','pointer'); } else { $('#canvas').css('cursor','auto'); }; }; I.removePress = function () { canv.removeEventListener('mousemove', I.over, false); canv.removeEventListener('mousedown', I.pressed, false); }; canv.addEventListener('mousemove', I.over, false); canv.addEventListener('mousedown', I.pressed, false); return I; }; The event listeners are added when I push each Button 'function' to an array, GUI. The curious thing is that, while the 'mousedown' listener works properly for each individual button, the 'mousemove' listener will only work on the last button added. Hence, mousing over the 'About' button shows the changed cursor; this is not the case for 'Help' or 'Start'. I am using jQuery to handle the cursor change. Any help would be appreciated on rectifying this, but please note that I am trying to do as much of this as I can from scratch. I'm aware of libraries like Easel, Create etc. but would prefer not using them for this project. Thank you!
has comment: http://stackoverflow.com/comment/46926559
answer count: 1
tagged with: javascript
tagged with: jquery
has title: 'mousemove' event listener in canvas - pointer change in last rectangle only

http://stackoverflow.com/comment/46763424
comment on: http://stackoverflow.com/q/29282668
score: 0
type: Comment
type: QuestionComment
has text: As a rule of thumb, ensure all operand types **before** using them in calculations. E.g. don't use `parseFloat` when doing math, instead use it when accessing the values: `var price = parseFloat(row.find('.cost').val());`

http://stackoverflow.com/q/29327494
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46844945
downvote count: 0
has comment: http://stackoverflow.com/comment/46845110
favorite count: 0
has comment: http://stackoverflow.com/comment/46845153
has comment: http://stackoverflow.com/comment/46845130
has title: Force JQuery $.each() run once if array of objects is 1 in length
has answer: http://stackoverflow.com/a/29327620
has comment: http://stackoverflow.com/comment/46844976
type: AnsweredQuestion
score: 3
has comment: http://stackoverflow.com/comment/46845127
possible better answer: http://stackoverflow.com/a/29327577
upvote count: 3
has answer: http://stackoverflow.com/a/29327577
has body: I'm using $.each it iterate over an argumented array of objects. It works fine until the array only has 1 object in it and the $.each iterates over it's properties. In this scenario I want the loop to run once only. How do I achieve this? $.each(array, function() { // Do stuff with each object in the array }) Edit: The array is comprised of JSON objects returned from an AJAX call. Most of the time this will be multiple objects but it could only be 1. $.post("/receive", JSON.stringify(postData), function(data) { // calling the above function and argumenting data. }, "json")
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/46845213
accepted answer: http://stackoverflow.com/a/29327620

http://stackoverflow.com/q/29371748
upvote count: 1
type: Question
tagged with: highcharts
tagged with: javascript
has answer: http://stackoverflow.com/a/29387108
answer count: 1
downvote count: 0
accepted answer: http://stackoverflow.com/a/29387108
score: 1
has title: tickinterval not working high chart for x axis
favorite count: 0
has body: Here's a link to a fiddle where i have tried plot the x axis using datetime and passed on multiple series with data points. Here i am unable to attain the tick marks for month of December and February sample x axis xAxis: { type: 'datetime', //minTickInterval: 2419200000, //time in milliseconds //minRange: 2419200000, //showLastLabel: true, tickInterval: 2419200000, }, sample data points in series { "data": [{ "x": 1420070400000, "y": 2, }, { "x": 1425168000000, "y": 1, }], "name": "Neither Dissatisfied or Satisfied", "color": "#5aa5dc", } plz help me out.
type: AnsweredQuestion

http://stackoverflow.com/a/29372236
type: Answer
has body: You would need to escape the single quotes inside your string: ' Bananas '
has comment: http://stackoverflow.com/comment/46925347
accepted answer of: http://stackoverflow.com/q/29372154
score: 0
answers question: http://stackoverflow.com/q/29372154
has comment: http://stackoverflow.com/comment/46925569
has comment: http://stackoverflow.com/comment/46925709
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46925202

http://stackoverflow.com/q/29358339
has comment: http://stackoverflow.com/comment/46923889
type: Question
tagged with: bootstrap-popover
has comment: http://stackoverflow.com/comment/46920800
tagged with: javascript
tagged with: fullcalendar
tagged with: jquery
has comment: http://stackoverflow.com/comment/46933690
score: 0
has comment: http://stackoverflow.com/comment/46940415
has title: bootstrap popover called twice
has body: On my click event I'm displaying the bootstrap popover, it works but it's being displayed twice. Once on the bottom, like I have defined and once on the bottom right. Code and pics below. If I set a breakpoint at return $("#events-popover-head").html(); I can see that this code is being called 4 times!!! I see that this might be a known bug with twitter bootstrap. I read here that it happens when you don't have a title, but I have both a title and content. I'm using bootstrap 3.3.1 Is there any workaround for this issue? If I include a dayClick event the day click popover is ok (showing just one) $('#fullcalendar').fullCalendar({ header: { left: 'prev,next', //today', center: 'title', //right: 'month,agendaWeek,agendaDay' right: '' }, defaultView: 'month', editable: true, allDaySlot: false, selectable: true, slotMinutes: 15, events: '/ManageSpaces/GetDiaryEvents/', eventClick: function (data, event, view) { $(this).children().popover({ html: true, placement: 'bottom', container: 'body', title: function () { return $("#events-popover-head").html(); }, content: function () { return $("#events-popover-content").html(); } }); if ($calPopOver) $calPopOver.popover('destroy'); $calPopOver = $(this).children().popover('show'); }, dayClick: function (data, event, view) { $(this).children().popover({ html: true, placement: 'bottom', container: 'body', title: function () { return $("#day-popover-head").html(); }, content: function () { return $("#day-popover-content").html(); } }); if ($calPopOver) $calPopOver.popover('destroy'); $calPopOver = $(this).children().popover('show'); } });
tagged with: twitter-bootstrap
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/24450533
answer count: 0

http://stackoverflow.com/comment/46803373
score: 0
type: Comment
type: QuestionComment
has text: According to [this](http://unixpapa.com/js/dyna.html) you may have to check for the `onreadystatechange` before running the onload function?
comment on: http://stackoverflow.com/q/29304470

http://stackoverflow.com/comment/46839308
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29324231
has text: Thanks for the answer. Using your code actually returns everything green color. That shouldn't be like this.
score: 0

http://stackoverflow.com/q/29338929
score: 0
accepted answer: http://stackoverflow.com/a/29338952
answer count: 2
tagged with: jquery
tagged with: meteor
has body: my code is {{title}} {{content}} // If click on this //Here I want to add some html {{title}} {{content}} When somebody clicks on addnewsticky I want to add html immediatly after that sticky, Expected output {{title}} {{content}} // If click on this Hi this is added html {{title}} {{content}} See newly added html tag How to do that using jquery? addNewSticky:function(e,tmpl){ $(e.currentTarget).parent().parent().find('.stickyboard').html("some html"); } but this is adding to the same class itself not after that class
has answer: http://stackoverflow.com/a/29338952
possible better answer: http://stackoverflow.com/a/29338972
type: AnsweredQuestion
type: Question
has title: add html in middle of parent in jquery
tagged with: javascript
has answer: http://stackoverflow.com/a/29338972

http://stackoverflow.com/comment/46759134
type: Comment
comment on: http://stackoverflow.com/q/29280306
type: QuestionComment
has text: Chrome seems to use something very close to jQuery... Try opening the console in a blank page like "about:blank" and see what "$" returns in the console... I do not know exactly what it is, just that it's there...
score: 0

http://stackoverflow.com/comment/46869544
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29314150
has text: @huggilou tested some other ways.link:http://stackoverflow.com/questions/29339921/cant-get-the-json-value-by-getjson-from-google-map-api

http://stackoverflow.com/q/29294120
score: 0
answer count: 2
possible better answer: http://stackoverflow.com/a/29294185
has body: For example, i have a string containing: '2014-12 to 1251255, 123123', and I want to get 2014-12, 1251255, and 123123. This one is correct: &gt; '2014-12 to 1251255, 123123'.split( /\s*,\s*|\s*to\s*/ ); [ '2014-12', '1251255', '123123' ] But is there shorter regex than above? Of course I've tried: &gt; '2014-12 to 1251255, 123123'.split( /\s*(,|to)\s*/ ); [ '2014-12', 'to', '1251255', ',', '123123' ] &gt; '2014-12 to 1251255, 123123'.split( /\s*,|to\s*/ ); [ '2014-12 ', '1251255', ' 123123' ] &gt; '2014-12 to 1251255, 123123'.split( /\s*[,|to]\s*/ ); [ '2014-12', '', '1251255', '123123' ] &gt; '2014-12 to 1251255, 123123'.split( /\s*[,|(to)]\s*/ ); [ '2014-12', '', '1251255', '123123' ]
tagged with: regex
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29294147
has title: Shorter regex to split by 2 criteria with spaces outside
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/29294185
accepted answer: http://stackoverflow.com/a/29294147

http://stackoverflow.com/a/29238995
score: 1
accepted answer of: http://stackoverflow.com/q/29238732
has body: Building on my comment, $.ajax doesn't return data - it returns a promise. You need to use that to actually get the data out: var safeFloatCash = bankingApi.client.getSafeFloatCash(); safeFloatCash.done(function(d) { //may need to parse the data: //d = JSON.parse(d); self.safeFloatDenominations(d); });
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46684368
answers question: http://stackoverflow.com/q/29238732
has comment: http://stackoverflow.com/comment/46684353
type: Answer
upvote count: 1

http://stackoverflow.com/a/29354481
type: Answer
answers question: http://stackoverflow.com/q/29354242
has comment: http://stackoverflow.com/comment/46895321
downvote count: 0
score: 1
has body: Not sure if it's the model you're going for, but you could try p2p: http://www.webrtc.org/architecture Can HTML5 Websockets connect 2 clients (browsers) directly without using a server? (P2P) I haven't played with server-side much, but here's a tutorial: http://codesamplez.com/programming/php-html5-video-streaming-tutorial Client Side Only (expand from here, could add canvas): &lt;html&gt;&lt;head&gt; &lt;script&gt; navigator.getUserMedia = ( navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia); if (navigator.getUserMedia) { navigator.getUserMedia ( // constraints { video: true, audio: true }, // successCallback function(localMediaStream) { var video = document.querySelector('video'); video.src = window.URL.createObjectURL(localMediaStream); // Do something with the video here, e.g. video.play() }, // errorCallback function(err) { console.log("The following error occured: " + err); } ); } else { console.log("getUserMedia not supported"); } &lt;/script&gt; &lt;/head&gt;&lt;body&gt; &lt;video style="border: solid 1px" autoplay="true"&gt; &lt;/body&gt;&lt;/html&gt;
upvote count: 1
has comment: http://stackoverflow.com/comment/46894784

http://stackoverflow.com/q/29242084
tagged with: same-origin-policy
upvote count: 1
has comment: http://stackoverflow.com/comment/46690994
favorite count: 0
type: UnansweredQuestion
tagged with: port
has comment: http://stackoverflow.com/comment/46691342
has comment: http://stackoverflow.com/comment/46690301
has title: Send ajax requests to a different port without violating SOP?
has comment: http://stackoverflow.com/comment/46695725
answer count: 0
downvote count: 0
score: 1
tagged with: http
has body: I've got 2 servers on the same domain but different ports. 80: Apache for html 12345: Some application that delivers JSON or binary data, depending on the request url. It seems like I can't do simple requests due to the same origin policy. Is there any workaround? Is it maybe possible to forward some types of port 80 urls to port 12345 urls in a way that does not go against the same origin policy? EDIT: Thanks for the replies but I should probably add that the server that would have to enable CORS is the one on port 12345 which is not apache/nodejs/php. It's a custom application that listens to this port and replies with requested content so there is no simple CORS for me to enable.
type: Question
linked to: http://stackoverflow.com/q/7564832
has comment: http://stackoverflow.com/comment/46690245
has comment: http://stackoverflow.com/comment/46690243
tagged with: javascript
tagged with: ajax

http://stackoverflow.com/comment/99723888
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/41604148
has text: I highlighted answer in my comments. thanks @james.
type: Comment

amazon-web-services
tags question: http://stackoverflow.com/q/29333609
tags question: http://stackoverflow.com/q/29241872
type: Tag
tag name: amazon-web-services
tags question: http://stackoverflow.com/q/29278172
tags question: http://stackoverflow.com/q/29321363
tags question: http://stackoverflow.com/q/29255582
tags question: http://stackoverflow.com/q/29232931
tags question: http://stackoverflow.com/q/29275912

http://stackoverflow.com/q/29255321
has body: I want a simple count down, a countdown that starts automatically when time is finished, and a countdown that start when I click on the button. I've been trying to solve this problem and I made the code below, I can't do both options, I managed to do the below code : when the countdown is finished it stats again, please see the snippet I couldn't manage to do that, here is my code : JS var i = 1; function Countdown(options) { var timer, instance = this, seconds = options.seconds || 10, updateStatus = options.onUpdateStatus || function () {}, counterEnd = options.onCounterEnd || function () {}; function decrementCounter() { updateStatus(seconds); if (seconds === 0) { instance.stop(); counterEnd(); return; } seconds--; } this.start = function () { timer = 0; seconds = options.seconds; timer = setInterval(decrementCounter, 1000); }; this.stop = function () { clearInterval(timer); }; } var myCounter = new Countdown({ seconds:5, // number of seconds to count down onUpdateStatus: function(sec){$('#countdown').html(sec);}, // callback for each second onCounterEnd: function(){ myCounter.start(); } // final action }); myCounter.start(); $("#button").click(function() { myCounter.start(); }); HTML restart Do you have any idea how to solve that ?? Thanks
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46716422
type: Question
accepted answer: http://stackoverflow.com/a/29255802
has comment: http://stackoverflow.com/comment/46713695
has comment: http://stackoverflow.com/comment/46713443
tagged with: javascript
score: 0
has title: How to have an automatic countdown, keep counting down on click javascript
answer count: 1
has answer: http://stackoverflow.com/a/29255802

http://stackoverflow.com/a/29299480
type: Answer
answers question: http://stackoverflow.com/q/29299022
has comment: http://stackoverflow.com/comment/46877282
has body: IE8 will fall back to use VML; from their gallery (https://developers.google.com/chart/interactive/docs/gallery): These charts are based on pure HTML5/SVG technology (adopting VML for old IE versions) After a little digging, it looks like VML won't just work, so try putting this at the beginning of your js (or maybe better yet, as an inline script at the top of your html): document.namespaces.add('v', 'urn:schemas-microsoft-com:vml', "#default#VML"); This person had the same issue: How do I get VML working in standards mode?
has comment: http://stackoverflow.com/comment/46794739
has comment: http://stackoverflow.com/comment/46793829
score: 0
has comment: http://stackoverflow.com/comment/46793890
has comment: http://stackoverflow.com/comment/46794302
has comment: http://stackoverflow.com/comment/46795114
has comment: http://stackoverflow.com/comment/46794992

http://stackoverflow.com/a/29309663
has body: If you need to set the size of an element relative to browser window, you can use Viewport-percentage lengths. Something like: p { font-size: 10vw; } Here is a simple jsFiddle example. Resize your browser window to see the difference.
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29308820

http://stackoverflow.com/a/29283325
score: 2
has body: That is not actually a bug. When you print a primitive, you'll see the state of it when you printed it. When you work with objects, if you console.log them, it only shows the reference. When you click on them, it will show you their current state. So what happened in your case is that the answer probably got changed in a later code.
has comment: http://stackoverflow.com/comment/46764525
has comment: http://stackoverflow.com/comment/46764373
has comment: http://stackoverflow.com/comment/46764494
accepted answer of: http://stackoverflow.com/q/29283177
downvote count: 0
has comment: http://stackoverflow.com/comment/46764409
answers question: http://stackoverflow.com/q/29283177
type: AcceptedAnswer
upvote count: 2
has comment: http://stackoverflow.com/comment/46764441
type: Answer

http://stackoverflow.com/comment/46800861
type: Comment
has text: @DaveBurns Exactly, you shouldn't answered with a rhetorical question, it should be an answer with an explanation.
comment on: http://stackoverflow.com/a/29303053
score: 2
type: AnswerComment

http://stackoverflow.com/comment/46674533
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29233093
has text: @MarshallOfSound For starters, because `` is a very possible HTML string.
score: 0

http://stackoverflow.com/comment/46900097
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29357588
has text: there is nothing else that immediately suggests this shouldn't be working. You could try changing you success handler to `success: function(data) { code goes here }.bind(this)` If doesn't work then it definitely isn't a scoping issue and we will need more context to understand what is going on.

http://stackoverflow.com/q/29285651
favorite count: 0
has answer: http://stackoverflow.com/a/29285890
has comment: http://stackoverflow.com/comment/46769142
has comment: http://stackoverflow.com/comment/46769257
possible better answer: http://stackoverflow.com/a/29285753
has answer: http://stackoverflow.com/a/29285753
has comment: http://stackoverflow.com/comment/46769094
accepted answer: http://stackoverflow.com/a/29285890
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46769523
has comment: http://stackoverflow.com/comment/46768877
upvote count: 2
downvote count: 2
has body: I was just looking at the code in bootstrap modal.js and I have the following difficulty: bootstrap Modal.js code : var Modal = function (element, options) { this.options = options this.$body = $(document.body) this.$element = $(element) this.$dialog = this.$element.find('.modal-dialog') this.$backdrop = null this.isShown = null this.originalBodyPad = null this.scrollbarWidth = 0 this.ignoreBackdropClick = false } In my code i did the following: var Modal = function(element , options){ this.options = options this.$body = $(document.body) this.$element = $(element) this.isShown = null this.scrollbarWidth = 0 this.$backdrop = } An error was thrown (see the last variable) so I changed my code to as follows: var Modal = function(element , options){ this.options = options this.$body = $(document.body) this.$element = $(element) this.isShown = null this.$backdrop = this.scrollbarWidth = 0 } And everything worked fine, why did the error occur? I get a SyntaxError in the console. My section problem: See how this.$body is defined in the plugin, it's defined as follows: this.$body = $(document.body) Now if I try doing this.$body = $(body) an error is thrown. Why?
has comment: http://stackoverflow.com/comment/46768913
type: Question
has comment: http://stackoverflow.com/comment/46769016
has comment: http://stackoverflow.com/comment/46769174
has comment: http://stackoverflow.com/comment/46768947
tagged with: javascript
score: 0
answer count: 2
has title: understanding bootstrap.js variable declaration
has comment: http://stackoverflow.com/comment/46769256

http://stackoverflow.com/q/29293248
tagged with: javascript
score: 0
tagged with: angularjs
has title: Chrome extension and Angular: Can I turn chrome.runtime.sendMessage into a synchronous function?
tagged with: google-chrome-extension
has comment: http://stackoverflow.com/comment/46790775
type: UnansweredQuestion
tagged with: google-chrome
type: Question
has answer: http://stackoverflow.com/a/41065419
linked to: http://stackoverflow.com/q/38425751
has comment: http://stackoverflow.com/comment/46800573
has body: I am trying to run chrome.runtime.sendMessage to get the information from the server. I am using this information to determine which page to display in my chrome extension. The problem is chrome.runtime.sendMessage is an async function and it is not jiving well with app.config. Is there a way I can turn chrome.runtime.sendMessage into a synchronous function? app.config(function($stateProvider, $urlRouterProvider) { var rootRef = new Firebase(some url); var user = rootRef.getAuth(); chrome.runtime.sendMessage({action: 'isDrawing'},function(res) { if (!user) { $urlRouterProvider.otherwise('/login'); } else if (res.isDrawing === 'true') { $urlRouterProvider.otherwise('/draw'); } else { $urlRouterProvider.otherwise('/main'); } });
answer count: 1

http://stackoverflow.com/a/29248948
score: 1
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/46702385
downvote count: 0
has comment: http://stackoverflow.com/comment/46703545
answers question: http://stackoverflow.com/q/29248812
has body: use below code . take your ids out side of click event . as per your code each time when you click button ids reset . var ids = []; // declare as global variable jQuery(document).ready(function() { jQuery("#mybutton").live('click',function () { var sel_fam_rel=jQuery("#my_textbox").val(); code =sel_fam_rel; if($.inArray(code,ids) &gt;= 0) { alert("Value is in array"); } else { alert("Value is not in array"); ids.push(code); } }); });
has comment: http://stackoverflow.com/comment/46702373

http://stackoverflow.com/a/29371627
upvote count: 6
has comment: http://stackoverflow.com/comment/46924570
score: 6
has comment: http://stackoverflow.com/comment/46924245
answers question: http://stackoverflow.com/q/29371597
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29371597
has body: DOM element nodes don't have an .attr() method. I think you're looking for .getAttribute(). if (checkLength[i].getAttribute('data-z') === "1") { checkLength[i].checked = true; } Also note that your attribute values will be strings, not numbers, so you'll either need to compare to strings as in my edit above, or else compare with ==. Since you tagged your post with the jQuery tag, I'll add that your code would look like this if you were to go that route: $("input:checkbox").each(function() { if ($(this).data("z") == 1) this.checked = true; });
type: Answer
has comment: http://stackoverflow.com/comment/46924148

http://stackoverflow.com/comment/46662854
type: QuestionComment
comment on: http://stackoverflow.com/q/29227850
score: 1
has text: @Pugazh : it removes the delay but removes the animation.
type: Comment

http://stackoverflow.com/comment/46654072
score: 1
has text: can you show me exactly how can I do that in javascript @Plato ?
comment on: http://stackoverflow.com/q/29222662
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29257692
tagged with: node.js
score: 2
type: AnsweredQuestion
has body: I have a node.js server running a simple socket.io service When I reference this.io.sockets in order to establish a "connection" handler function, it works fine. But if I later reference this.io.sockets, I get an an error TypeError: Cannot read property 'sockets' of undefined I'm pretty new to node.js so am not sure what I am doing wrong here. Code: var app = require('http').createServer(); var port = 8080; app.listen(port); function Serv() { this.io = require('socket.io')(app) this.addHandlers() } Serv.prototype.addHandlers = function () { this.io.sockets.on("connection", function (socket) { console.log('new connection'); socket.on('disconnect', function () { console.log('disconnection'); if (this.io.sockets.adapter.rooms[phn] != null) { //Causes undefined error.. //do something } }); socket.on(SOCKETEVENTMESSAGE, function (data) { if (this.io.sockets.adapter.rooms[phn] != null) { //Causes undefined error.. //do something } }); }); }; // Start the server var serv = new Serv(); console.log('socket.io listening on ' + port);
accepted answer: http://stackoverflow.com/a/29258882
upvote count: 3
downvote count: 1
tagged with: socket.io
type: Question
has title: Node.js - socket.io - reference to io.sockets suddenly undefined
tagged with: javascript
answer count: 2
linked to: http://stackoverflow.com/q/3127429
has comment: http://stackoverflow.com/comment/46718155
tagged with: undefined
favorite count: 0
possible better answer: http://stackoverflow.com/a/29871196
has answer: http://stackoverflow.com/a/29258882
has answer: http://stackoverflow.com/a/29871196

http://stackoverflow.com/comment/46741067
has text: Well not the keys on most modern browsers, right? But yeah, not as simple as I said. Still, why invent a new encoding when you already have json
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29270020
type: Comment

http://stackoverflow.com/q/29236166
has comment: http://stackoverflow.com/comment/46678645
has comment: http://stackoverflow.com/comment/46678719
answer count: 1
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/46678811
has answer: http://stackoverflow.com/a/29236647
tagged with: angularjs-ng-repeat
has comment: http://stackoverflow.com/comment/46678846
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46678757
has title: AngularJS Ng-repeat is not working as expected
type: Question
accepted answer: http://stackoverflow.com/a/29236647
has comment: http://stackoverflow.com/comment/46679176
has body: I'm having a weird issue, I can access all the elements coming from my scope as data model, also I can see the scope elements in the Chrome console, but when I try using the model within a ng-repeat statement it does not work, it just does not loop through the vm.menu.items. Below is my simple code: {{vm.currentMenuName}} {{vm.menu.items[0].displayName}} {{vm.menu.items[1].displayName}} **<<----- IT works!** Not working! {{menuItem.displayName}} I'm still pretty new to angular, so any help that point me into the right direction will be greatly appreciated.

http://stackoverflow.com/comment/127451839
type: AnswerComment
has text: This is most confusing, because my response headers include `access-control-allow-headers: *` (and `access-control-allow-methods: *`) but the browser still says "header ‘x-requested-with’ is not allowed according to header ‘Access-Control-Allow-Headers’". Does a more specific header really work where wildcards fail?
type: Comment
comment on: http://stackoverflow.com/a/37291021
score: 0

http://stackoverflow.com/q/29247786
favorite count: 0
accepted answer: http://stackoverflow.com/a/29247939
upvote count: 1
type: AnsweredQuestion
score: 1
tagged with: calendar
type: Question
has answer: http://stackoverflow.com/a/29247901
answer count: 2
tagged with: api
has answer: http://stackoverflow.com/a/29247939
has title: Error JSON stringify format
downvote count: 0
tagged with: javascript
has body: var email_recept=document.getElementsByClassName("email"); var counting_email_recept=email_recept.length; var array_mail=[]; var myJSON=[]; for(var i=0;i&lt;counting_email_recept;i++) { array_mail[i]=email_recept[i].value; myJSON[i]=JSON.stringify({ email: array_mail[i] }); } console.log(myJSON); result : ["{"email":""}", "{"email":""}"] i want to make like this : [{"email":""}, {"email":""}]
possible better answer: http://stackoverflow.com/a/29247901

http://stackoverflow.com/q/29255871
type: AnsweredQuestion
downvote count: 0
score: 1
accepted answer: http://stackoverflow.com/a/29255954
has body: {{ message.currencyFrom }}/{{ message.currencyTo }} {{ message.amountSell }} {{ message.amountBuy }} {{ message.rate }} The dom view in chrome's inspect, shows ng-click="go('pair/EUR/GBP')" however when clicked I end up at pair/%7B%7Bmessage.currencyFrom%7D%7D/%7B%7Bmessage.currencyTo%7D%7D It seems the the url is passed as raw angular vars. I've tried adding the code inside the loop but the same behaviour is exhibited. I've tried initiating a variable first and passing it to the go function: ng-init="var url = 'pair/{{message.currencyFrom}}/{{message.currencyTo}}'" I can't imagine it's relevant but here is go: $scope.go = function ( path ) { $location.path( path ); };
type: Question
linked to: http://stackoverflow.com/q/14050195
tagged with: javascript
has answer: http://stackoverflow.com/a/29255954
possible better answer: http://stackoverflow.com/a/29255993
answer count: 2
upvote count: 1
has title: Angularjs - url params: When clicked returns to angular vars in the url
favorite count: 0
tagged with: angularjs
tagged with: ngroute
has answer: http://stackoverflow.com/a/29255993

http://stackoverflow.com/a/29347613
upvote count: 1
has body: I resolved by this changing my method of selecting the element from $(".info").on("click",function(){ to $("body").on("click", ".info",function(){
accepted answer of: http://stackoverflow.com/q/29301132
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/29301132
type: Answer
score: 1

http://stackoverflow.com/q/29242021
has body: Nothing in my {{}} are showing in my html file. Can someone please tell me what I am doing wrong. I have no errors in my console. "GOT DATA" will print in my console, but not show in my file. The is my html code &lt;div class="announcements" ng-controller="onBusinessAnnouncementCtrl as announcements"&gt; {{announcements.latest}} &lt;/div&gt; This is my js code pulling from the server app.controller('onBusinessAnnouncementCtrl', function($scope, $http) { $http.get('http://localhost:3000/latest') .success(function(responses) { //$scope.latest = responses; $scope.latest = "GOT DATA"; console.log($scope.latest); }); });
has comment: http://stackoverflow.com/comment/46690592
has comment: http://stackoverflow.com/comment/46690707
downvote count: 0
has comment: http://stackoverflow.com/comment/46691299
tagged with: angularjs-ng-repeat
favorite count: 0
has comment: http://stackoverflow.com/comment/46691906
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/34050988
upvote count: 1
tagged with: node.js
has comment: http://stackoverflow.com/comment/46692156
has title: Angular ng-repeat scope issue
type: AnsweredQuestion
score: 1
possible better answer: http://stackoverflow.com/a/29242461
type: Question
has answer: http://stackoverflow.com/a/29242461
answer count: 2
has answer: http://stackoverflow.com/a/34050988
linked to: http://stackoverflow.com/q/29236166
tagged with: javascript

http://stackoverflow.com/comment/46794800
type: Comment
type: QuestionComment
has text: Can you add form HTML?
score: 0
comment on: http://stackoverflow.com/q/29299994

http://stackoverflow.com/a/29237482
type: Answer
has body: Wrap the code in an enclosing IIFE (Immediately invoked function expression): for (i = 1; i &lt;= 5; i++) { (function(i){ $("input[type=radio][name=persontype" + i + "]").change(function() { if (this.value == 'fo') { $("#person-name" + i).removeClass('hidden'); } else if (this.value == 'po') { $("#person-name" + i).addClass('hidden'); } }); })(i); } This will provide a function scope for the inner i (the parameter to the function). It would make more sense though to use a single event handler and have attributes to determine which is which :) // Match on starts-with "persontype" using ^= $("input[type=radio][name^=persontype]").change(function() { var target = $(this).data('target'); // Do something to the target });
has comment: http://stackoverflow.com/comment/46681106
accepted answer of: http://stackoverflow.com/q/29237414
score: 0
answers question: http://stackoverflow.com/q/29237414
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46681074

http://stackoverflow.com/comment/46774970
type: QuestionComment
comment on: http://stackoverflow.com/q/29278522
type: Comment
has text: This is not a problem on the client-side. XSS is caused by a server-side coding error. You don’t sanitize your inputs and print the HTML you get on input directly into the page. You have to [edit] your question to show us the server-side code and retag it with the relevant technologies.
score: 0

http://stackoverflow.com/q/29319682
score: 6
has body: I would be very grateful for some guidance or even a solution! From an array of class names, I'm generating icon sets using a for loop: // icon array var iconsArray = ['fa-search','fa-toggle-up','fa-link']; var iconsArrayLength = iconsArray.length; // loop through array for (var i = 0; i < iconsArrayLength; i++) { // result console.log(''); } I also have a navigation element. The list has the same number of items with an ID: link 1 link 2 link 3 Q. How do I append / prepend the returned icon sets to the correct nav item? To be clear, the first array value is intended for the first navigation item and so on. I'm sure there's something out there to answer this question, but the mighty G just doesn't seem to want to serve it up to me! Thanks in advance. In response to comment... The resulting list would look like this: link 1 link 2 link 3
has answer: http://stackoverflow.com/a/29319754
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/29319725
accepted answer: http://stackoverflow.com/a/29319725
upvote count: 6
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/29319754
favorite count: 0
has title: jquery - append Icons generated by for loop into list items anchor
tagged with: append
has answer: http://stackoverflow.com/a/29319998
answer count: 4
has answer: http://stackoverflow.com/a/29319772
downvote count: 0

http://stackoverflow.com/q/29332818
tagged with: cordova
has answer: http://stackoverflow.com/a/37263347
upvote count: 3
type: UnansweredQuestion
type: Question
has title: ngCordova capture - property 'capture' undefined
has comment: http://stackoverflow.com/comment/49477969
score: 3
tagged with: ionic-framework
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
has body: I'm writing my first Cordova and Ionic code today. I wanted to capture a video and I failed. Apart from creating a blank Ionic project I have done the following: bower install ngCordova added to index.html cordova plugin add org.apache.cordova.media-capture My index.html: LocoQR Capture a video And app.js: angular.module('locoqr', ['ionic', 'ngCordova']) .run(function($ionicPlatform) { $ionicPlatform.ready(function() { // Hide the accessory bar by default (remove this to show the accessory bar above the keyboard // for form inputs) if(window.cordova && window.cordova.plugins.Keyboard) { cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true); } if(window.StatusBar) { StatusBar.styleDefault(); } }); }) .controller('VideoCtrl', function($scope, $ionicPlatform, $cordovaCapture) { $scope.onCaptureVideoClick = function() { $ionicPlatform.ready(function() { var options = { limit: 3, duration: 15 }; $cordovaCapture.captureVideo(options).then(function(videoData) { console.log('hooray'); }, function(err) { console.log('sad :('); }); }); }; }); I don't even know how to debug properly yet but that's what I got from adb logcat: D/CordovaLog(31220): file:///android_asset/www/lib/ionic/js/ionic.bundle.js: Line 19532 : TypeError: Cannot read property 'capture' of undefined D/CordovaLog(31220): at Object.captureVideo (file:///android_asset/www/lib/ngCordova/dist/ng-cordova.js:1149:30) D/CordovaLog(31220): at file:///android_asset/www/js/app.js:20:33 D/CordovaLog(31220): at file:///android_asset/www/lib/ionic/js/ionic.bundle.js:43976:19 D/CordovaLog(31220): at Object.ionic.Platform.ready (file:///android_asset/www/lib/ionic/js/ionic.bundle.js:2117:9) D/CordovaLog(31220): at Object.self.ready (file:///android_asset/www/lib/ionic/js/ionic.bundle.js:43974:26) D/CordovaLog(31220): at Scope.$scope.onCaptureVideoClick (file:///android_asset/www/js/app.js:18:28) D/CordovaLog(31220): at $parseFunctionCall (file:///android_asset/www/lib/ionic/js/ionic.bundle.js:20270:18) D/CordovaLog(31220):…
tagged with: angularjs
tagged with: android

http://stackoverflow.com/a/30701103
type: Answer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/29364432
upvote count: 1
has body: this will be come if not add necessary java script file before run please check your XML format is ok &lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;WebView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/webview" android:layout_width="fill_parent" android:layout_height="fill_parent" /&gt; for more :http://developer.android.com/guide/webapps/webview.html and you may not call layout public class MainActivity extends Activity { @Override protected void onCreate(Bundle icicle) { super.onCreate(icicle); setContentView(R.layout.activity_main); WebView webView = (WebView) browser = findViewById(R.id.webview); browser.setLayerType(View.LAYER_TYPE_SOFTWARE, null); browser.setWebViewClient(new Callback()); browser.getSettings().setJavaScriptEnabled(true); } } try this some time this will be help thank

http://stackoverflow.com/comment/46801843
comment on: http://stackoverflow.com/a/29303608
score: 0
type: AnswerComment
type: Comment
has text: In fact, it's not exactly what I need. What I need is the time a user passed to make some "traitement". So, a SUM of the (dateEntre - dateSortie ) grouped by user, in seconds or milliseconds. Thanks for your help

http://stackoverflow.com/comment/46861350
type: Comment
type: QuestionComment
score: 0
has text: possible duplicate of [Javascript : Send JSON Object with Ajax?](http://stackoverflow.com/questions/6418220/javascript-send-json-object-with-ajax)
comment on: http://stackoverflow.com/q/29336560

http://stackoverflow.com/comment/46885296
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29349689
score: 0
has text: not sure what you're asking

http://stackoverflow.com/a/29262577
has comment: http://stackoverflow.com/comment/46732029
has comment: http://stackoverflow.com/comment/46729828
has comment: http://stackoverflow.com/comment/46729969
has comment: http://stackoverflow.com/comment/46729272
has body: I guess you are looking for something like this: document.body.style.overflow="hidden" And to be able to scroll again, use document.body.style.overflow="scroll" Example: document.body.onclick=function(){ this.style.overflow="hidden" } Click anywhere to disable scrolling&lt;hr&gt; Click anywhere to disable scrolling&lt;hr&gt; Click anywhere to disable scrolling&lt;hr&gt; Click anywhere to disable scrolling&lt;hr&gt; Click anywhere to disable scrolling&lt;hr&gt; Click anywhere to disable scrolling&lt;hr&gt; Click anywhere to disable scrolling&lt;hr&gt; Click anywhere to disable scrolling&lt;hr&gt; Click anywhere to disable scrolling&lt;hr&gt; Click anywhere to disable scrolling&lt;hr&gt; Click anywhere to disable scrolling&lt;hr&gt; Click anywhere to disable scrolling&lt;hr&gt; Click anywhere to disable scrolling&lt;hr&gt; Click anywhere to disable scrolling&lt;hr&gt; Click anywhere to disable scrolling&lt;hr&gt; Click anywhere to disable scrolling&lt;hr&gt; Click anywhere to disable scrolling&lt;hr&gt; Click anywhere to disable scrolling&lt;hr&gt; Click anywhere to disable scrolling&lt;hr&gt; Click anywhere to disable scrolling&lt;hr&gt; Also, as you are using jQuery, something like this would work too: $('body').css('overflow', 'hidden'); // disables scrolling $('body').css('overflow', 'scroll'); // enables scrolling
upvote count: 9
score: 9
has comment: http://stackoverflow.com/comment/46729301
has comment: http://stackoverflow.com/comment/46730193
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46727322
downvote count: 0
answers question: http://stackoverflow.com/q/29262523
has comment: http://stackoverflow.com/comment/46730206
accepted answer of: http://stackoverflow.com/q/29262523
type: Answer
has comment: http://stackoverflow.com/comment/46727236
has comment: http://stackoverflow.com/comment/46730754
has comment: http://stackoverflow.com/comment/46729768

http://stackoverflow.com/comment/46721243
comment on: http://stackoverflow.com/a/29258856
type: AnswerComment
score: 0
type: Comment
has text: Yeah that was phrased kind of weird. I'll update it, thanks :)

http://stackoverflow.com/comment/46920114
comment on: http://stackoverflow.com/q/29369093
type: Comment
type: QuestionComment
has text: Synchronous requests are a bad idea. So are pop up windows.
score: 1

http://stackoverflow.com/comment/46681808
has text: Like I said,I don't want this specific code. I have something more complicated that I need it to be checking multiple things and then run the code, and this can't be code that it's attached to a single event.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29237809

http://stackoverflow.com/q/29242346
tagged with: indexeddb
has comment: http://stackoverflow.com/comment/46710184
has answer: http://stackoverflow.com/a/32679503
score: 12
has comment: http://stackoverflow.com/comment/51937675
tagged with: firefox
downvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/46792903
has comment: http://stackoverflow.com/comment/46691800
type: UnansweredQuestion
has title: "An IndexedDB transaction that was not yet complete has been aborted due to page navigation"
has comment: http://stackoverflow.com/comment/50071227
has comment: http://stackoverflow.com/comment/46710311
has comment: http://stackoverflow.com/comment/49930762
type: Question
has body: I'm using IndexedDB to store some data. It appears to work, but if I refresh the page, I see: An IndexedDB transaction that was not yet complete has been aborted due to page navigation. in the browser console on Firefox (36.0.4). I'm using this (local) file to test: &lt;html&gt; &lt;head&gt;&lt;meta charset="UTF-8"&gt;&lt;/head&gt; &lt;body&gt; &lt;script&gt; var request = window.indexedDB.open("test_db", 2); request.onupgradeneeded = function (event) { request.result.createObjectStore("test_store"); }; request.onsuccess = function (event) { var db = request.result; var transaction = db.transaction(["test_store"], "readwrite"); var put = transaction.objectStore("test_store").put("key", "value"); transaction.oncomplete = function (event) { console.log("Transaction complete"); }; }; &lt;/script&gt; &lt;/body&gt; &lt;/html&gt; If I perform multiple transactions, I get multiple errors. If I have an onclick handler that performs a transaction and I click it several times, refreshing prints one error for each transaction I made in the past. All this makes me think my transactions aren't being cleaned up. What do I need to do to finish a transaction? My oncomplete handler is being called. Refreshing a few times, the browser console looks like this: "Transaction complete" test.html:16:1 An IndexedDB transaction that was not yet complete has been aborted due to page navigation. test.html:13:0 "Transaction complete" test.html:16:1 An IndexedDB transaction that was not yet complete has been aborted due to page navigation. test.html:13:0 "Transaction complete" test.html:16:1 Test page (Ctrl-Shift-J to open console, then Ctrl-R to refresh shows the error): http://test.roscidus.com/static/idb.html
upvote count: 12

http://stackoverflow.com/a/29255087
type: Answer
has body: chridam, thank you. The solution you suggested did not work,^ but by making some small adjustments to it I made it work. I wonder whether you could suggest whether my small adjustments are an acceptable solution, or a nasty fudge, or even some third etc. option please? ^ was getting "TypeError: object is not a function" at "var game = new Game()" The adjustment was basically to add a Wrapper model for game.js Edited game.js: var mongoose = require( 'mongoose' ); var Schema = mongoose.Schema; var Schema = new Schema({ _id : false, id : false, gameID : Schema.ObjectId, points : Number }); module.exports = mongoose.model( 'Game', Schema ); Additional game_wrapper.js var Game = require( '../models/game' ); module.exports = Game.Schema; Edited player.js: var mongoose = require( 'mongoose' ); var GameWrapper = require( '../models/game_wrapper' ); var Schema = mongoose.Schema; var Schema = new Schema({ socialID : Number, games : [ GameWrapper ] }); module.exports = mongoose.model( 'Player', Schema ); Edited app.js: var Player = require( './app/models/player' ); var Game = require( './app/models/game' ); router.route( '/players' ).post( function( req, res ) { var game = new Game({ gameID: req.body.gameID, points: req.body.points }); var player = new Player({ socialID: req.body.socialID, games: [ game ] }); player.save(...) }
answers question: http://stackoverflow.com/q/29244236
accepted answer of: http://stackoverflow.com/q/29244236
score: 2
has comment: http://stackoverflow.com/comment/46723959
type: AcceptedAnswer
downvote count: 0
upvote count: 2
has comment: http://stackoverflow.com/comment/46713370

http://stackoverflow.com/q/29267625
favorite count: 0
has answer: http://stackoverflow.com/a/29268197
downvote count: 1
has body: I am trying to set the size of a custom map marker on Google Maps v3. I am using the code below to generate the map but not sure where the code google.maps.Size(12,14)) should be placed? function init(){ var e= { center:new google.maps.LatLng(xx.xxxxx,-x.xxxxx), zoom:16, zoomControl:true, zoomControlOptions:{ style:google.maps.ZoomControlStyle.DEFAULT }, disableDoubleClickZoom:true, mapTypeControl:true, mapTypeControlOptions:{ style:google.maps.MapTypeControlStyle.HORIZONTAL_BAR }, scaleControl:true, scrollwheel:true, panControl:true, streetViewControl:false, draggable:true, overviewMapControl:true, overviewMapControlOptions:{ opened:false }, mapTypeId:google.maps.MapTypeId.ROADMAP }; var t=document.getElementById("google_map"); var n=new google.maps.Map(t,e); var r=[ ["undefined","undefined","undefined","undefined","",xx.xxxxx,-x.xxxxxx,"/images/marker.png"] ]; for(i=0;i&lt;r.length;i++){ if(r[i][7]=="undefined"){ markericon="" }else{ markericon=r[i][7] } marker=new google.maps.Marker({ icon:markericon, position:new google.maps.LatLng(r[i][5],r[i][6]), map:n }) } } google.maps.event.addDomListener(window,"load",init); var map
type: AnsweredQuestion
score: -1
type: Question
accepted answer: http://stackoverflow.com/a/29268197
tagged with: google-maps
upvote count: 0
has title: Google Maps Marker Size
tagged with: javascript
has comment: http://stackoverflow.com/comment/46737045
answer count: 1

http://stackoverflow.com/comment/46700513
comment on: http://stackoverflow.com/q/29245860
has text: Look at setFormula. Also if the cell has a formula then it starts with "=" so you could check that and not replace those cells.
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/46724763
score: 1
has text: `eval('(' + str + ')')`
comment on: http://stackoverflow.com/q/29260803
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29334578
has comment: http://stackoverflow.com/comment/46858186
has body: EDIT! This is a workaround which works but it isn't the correct answer, the one you are looking for is this: https://stackoverflow.com/a/29346099/962643 A workaround, It takes some time for the flash player to finish loading and to it's element (#movie_player) to become an object. Using setInterval to check whether the element is null or not, and only when it isn't null then it means we can use it with the GET functions, in this case it will be using the getPlayerState function, using it in another setInterval to check the state will give you a fake "onStateChange" listener, as unfortunately adding an event listener still doesn't work even when the player has been fully loaded, but the GET functions do works so we will use them instead. In my case I only need to know the state when I open the pageAction popup in my extension, so just calling the getPlayerState function when the popup loads it's good enough for me. In the injected script: var theYTplayer = document.getElementById('movie_player'), theYTplayerState; var checkYTplayerReady = setInterval(function(){ theYTplayer = document.getElementById('movie_player'); if(theYTplayer != null){ clearInterval(checkYTplayerReady); setTimeout(function(){ checkYTplayerState(); },2000); theYTplayer.addEventListener('onStateChange', checkYTplayerState); } }, 100); function checkYTplayerState(event){ theYTplayerState = event; if(typeof event === 'undefined'){ theYTplayerState = theYTplayer.getPlayerState(); } if(theYTplayerState == 1){ theYTplayerState = 'playing'; }else{ theYTplayerState = 'not playing (unstarted/paused/buffering/ended/video cued)'; } return theYTplayerState; } From there you can use messages to send it to the content script and then to the popup or use it to whatever you need to.
upvote count: 1
has comment: http://stackoverflow.com/comment/46857804
has comment: http://stackoverflow.com/comment/46859602
score: 1
answers question: http://stackoverflow.com/q/29328910
has comment: http://stackoverflow.com/comment/46858499
downvote count: 0
has comment: http://stackoverflow.com/comment/46876012
has comment: http://stackoverflow.com/comment/46858139
type: Answer

http://stackoverflow.com/q/29316712
tagged with: firefox
answer count: 1
has answer: http://stackoverflow.com/a/29316936
tagged with: javascript
tagged with: http://stackoverflow.com/tag/html
tagged with: events
type: UnansweredQuestion
has body: I have this code: function buttonHighlight(event, img, name) { if (img === null) { img = event.target; } img.src = "img/" + name + "_on.png"; img.style.cursor = "pointer"; } function buttonLostHighlight(event, img, name) { if (img === null) { img = event.target; } img.src = "img/" + name + "_off.png"; img.style.cursor = "auto"; } &lt;button type="submit" form="login_form" id="log_window_b" class="fake_button" onclick="loginHandler()"&gt; &lt;img src="img/send_off.png" alt="invia" width="55" height="15" onmouseover="buttonHighlight(event, null, 'send')" onmouseout="buttonLostHighlight(event, null, 'send')"&gt; &lt;/button&gt; If I try this without the event parameter in the js function and in the html event attribute, it works fine in Chrome, but not in Firefox. But if i use this code in Firefox it doesn't work, it only works if "event" is the only attribute in the function, but I also need the other attributes!
type: Question
score: 0
has title: JavaScript event parameter in Firefox

http://stackoverflow.com/comment/46913390
type: QuestionComment
has text: Because form must have an `action`, so it has been submitted before js call. try use `onclick` rather than `onsubmit`.
comment on: http://stackoverflow.com/q/29365158
score: 0
type: Comment

http://stackoverflow.com/comment/46698337
type: QuestionComment
has text: If you're using jQuery, add the tag to your question. Also, post the rendered HTML, not the PHP.
comment on: http://stackoverflow.com/q/29246493
type: Comment
score: 0

http://stackoverflow.com/comment/46691456
comment on: http://stackoverflow.com/a/29242532
type: AnswerComment
has text: Ah, that's an interesting point. In which case, your solution is definitely the way to go. If the the end result was a flat JSON object, I'm wondering why the getters/setters would be necessary. You could not use them when the JSON string was parsed later.
type: Comment
score: 0

http://stackoverflow.com/comment/46856195
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29333433
has text: It doesn't seem to work. No green border after I click on an image

c++
tags question: http://stackoverflow.com/q/29231694
tags question: http://stackoverflow.com/q/29280742
tags question: http://stackoverflow.com/q/29319208
type: Tag
tags question: http://stackoverflow.com/q/29327859
tags question: http://stackoverflow.com/q/29293929
tags question: http://stackoverflow.com/q/29240206
tag name: c++

http://stackoverflow.com/comment/46757667
score: 0
type: Comment
type: QuestionComment
has text: @Cerad unfortunately it doesn't work because the digest is in progress, any other ideas?
comment on: http://stackoverflow.com/q/29255709

http://stackoverflow.com/q/29319043
has answer: http://stackoverflow.com/a/29319277
score: 0
answer count: 3
has title: How to stick the bottom part of a div to top of the screen when scrolling down?
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/46830907
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/29319292
tagged with: css
has comment: http://stackoverflow.com/comment/46829982
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46830920
upvote count: 1
downvote count: 1
has body: Imagine a div that has a height of 300 px, and at its bottom there is another div nested with a height of 100 px. I'd like to freeze (stick to top) this 100 px div, but the background properties (eg. background color) are set in its container div. jsfiddle body { padding: 0; margin: 0; border: 0; } #first { background: #121212; width: 100%; height: 300px; color: #ffffff; } #nonsticky { height: 200px; } #sticky { background: rgba(255, 255, 255, 0.3); height: 100px; } #second { background: #cecece; width: 100%; } p { padding: 15px 30px; margin: 0; } This div should scroll away when scrolling down the page. This div should stick to top of screen when scrolling down the page. However, the "first" div should stick, as background properties are set there. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean accumsan pharetra nibh in lobortis. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Nulla sodales a dui accumsan accumsan. Ut vitae diam turpis. Sed eu ante non quam cursus cursus ac nec nunc. Mauris bibendum massa et turpis semper porttitor. Integer consectetur dignissim ligula quis semper. Praesent a lorem erat. Donec eleifend gravida massa, sed hendrerit nibh laoreet et. Pellentesque dapibus, metus sed pretium sodales, arcu dui suscipit felis, ac dignissim quam ex bibendum mi. Sed ut ornare enim. Pellentesque condimentum pulvinar metus, egestas varius justo commodo at. Praesent sollicitudin ultrices tortor non fermentum. Vestibulum ultrices justo sit amet consequat auctor. Nullam tristique odio felis, vel dapibus tortor ornare a. Cras quis lectus iaculis, mattis ipsum dignissim, pharetra urna. Integer lobortis tellus turpis, in molestie ante condimentum sed. Maecenas bibendum augue non libero porta, sed congue lorem varius. Nam justo massa, sollicitudin at purus non, viverra lacinia mi. Morbi nisi ipsum, vestibulum eget hendrerit vel, placerat vitae velit. Suspendisse a enim in massa aliquet lacinia a vel quam. …
type: Question
tagged with: javascript
possible better answer: http://stackoverflow.com/a/29319277
has answer: http://stackoverflow.com/a/29319292
has answer: http://stackoverflow.com/a/29319315
has comment: http://stackoverflow.com/comment/46829931

http://stackoverflow.com/comment/46931657
comment on: http://stackoverflow.com/q/29362556
score: 0
type: Comment
type: QuestionComment
has text: I see it as a bug because AngularJs is processing a custom attribute directive on "ng-attr-my-custom-attribute", that is not a match, ng-attr is a built in AngularJs directive, it is not the attribute "my-custom-attribute"

http://stackoverflow.com/q/29242606
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29243732
has title: Summarizing JavaScript array based on category and subcategory
type: Question
answer count: 2
tagged with: arrays
downvote count: 0
tagged with: javascript
tagged with: string
has answer: http://stackoverflow.com/a/29243332
favorite count: 0
possible better answer: http://stackoverflow.com/a/29243332
has answer: http://stackoverflow.com/a/29243732
has body: I've been trying to get the summary of the elements in my array. The array contains different values for different categories and i want to summarize the content of the array before the user checks the content of the array. here is the data: var typed = [ [1, 'MAP: Invalid service'], [2, 'MAP: map observation'], [3, 'ADT: Invalid person'], [4, 'ADT: verification failed'], [5, 'SYSTEM: Unrecognized'], [6, 'SYSTEM: Processing exempt'] [7, 'SYSTEM: Data access'], [8, 'SYSTEM: Data access'], [9, 'SYSTEM: Transform Exempt'], [10, 'SYSTEM: Transform Exempt'], [11, 'ADT: verification failed'], [12, 'ADT: Invalid person'] ] I want something of this nature as the summary 4 ADT : 2 Invalid person 2 verification failed 2 MAP: 1 Invalid service 1 map observation 6 SYSTEM: 1 Unrecognized 1 Processing exempt 2 Transform exempt 2 Data access --------------------- Total: 12 Here is what I tried: function summary(typed, category){ var arrA = []; var arrB = []; for (var i=0; i&lt;typed.length; i++){ var tryb = typed[i][4].split(' '); for (var j=0; j&lt; category.length; j++){ if (tryb[0] == category[j]){ arrA[i][j] = typed[i]; } } } return arrA; } var newcategory = ['ADT:','MAP:']; summary(typed, newcategory)
score: 1
upvote count: 1

youtube
tags question: http://stackoverflow.com/q/29302333
tags question: http://stackoverflow.com/q/29336521
type: Tag
tag name: youtube
tags question: http://stackoverflow.com/q/29261897
tags question: http://stackoverflow.com/q/29298705
tags question: http://stackoverflow.com/q/29356785
tags question: http://stackoverflow.com/q/29237213
tags question: http://stackoverflow.com/q/29320174
tags question: http://stackoverflow.com/q/29339961

http://stackoverflow.com/comment/55555459
has text: Anything easy/obvious that would keep the keyboard from showing in an iOS simulator?
comment on: http://stackoverflow.com/a/33585501
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/29224855
upvote count: 2
type: AcceptedAnswer
type: Answer
score: 2
downvote count: 0
has body: When you did x[2] = x; x has actually become, [ 'Paul Irish', 'Paul Irish', [Circular] ] it means the second element of x is x only and then when you did x[2][2][2] = 'Jenn Schiffer'; x[2] refers x only. So, x[2][2] again refers x only. So, the expression, x[2][2][2] is the same as x[2]. You can understand this like this x[2][2][2] =&gt; (x[2])[2][2] =&gt; (x)[2][2] =&gt; (x[2])[2] =&gt; x[2] You are basically removing the circular reference by assigning a string with x[2][2][2] = 'Jenn Schiffer';. At this point, x is [ 'Paul Irish', 'Paul Irish', 'Jenn Schiffer' ] Now, when you do x[2][2][2] x[2] is 'Jenn Schiffer', x[2][2] is n and 'n'[2] is undefined.
answers question: http://stackoverflow.com/q/29224807
accepted answer of: http://stackoverflow.com/q/29224807

http://stackoverflow.com/comment/46712873
comment on: http://stackoverflow.com/q/29253740
type: Comment
type: QuestionComment
has text: Your code seems working fine, I can see selected text is highlighted with `bold` fonts, what the problem?
score: 0

http://stackoverflow.com/comment/46733147
has text: @Akshat No I dont, is it required?
type: Comment
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/29265253

http://stackoverflow.com/q/29313511
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/29318296
upvote count: 1
has comment: http://stackoverflow.com/comment/46820475
tagged with: firebase
type: AnsweredQuestion
has title: Iterating and modifying Firebase array causes undefined
score: 1
has answer: http://stackoverflow.com/a/29318296
has comment: http://stackoverflow.com/comment/46825563
tagged with: ionic-framework
type: Question
has body: EDIT: it seems that value[i].extrainfoimage is only undefined within imageRef.child("-JlSvEAw...... I've read through the documentation twice so far and still haven't been able to figure this one out. Basically I load some data from firebase and set it as an array. I iterate through that array and intend to replace some properties, as I iterate, with data I get from other places in my Firebase DB. However everytime I go to replace the properties I get "Uncaught TypeError: Cannot set property 'extrainfoimage' of undefined" This is my code: var questionsRef = new Firebase("https://XX.firebaseio.com/Questions"); var imageRef = new Firebase("https://XX.firebaseio.com/Images"); //get the first 6 items var query = questionsRef.orderByChild('date_time_asked').limitToFirst(6); //get them as a firebase array promise $scope.questions = $firebaseArray(query); //wait for it to load $scope.questions.$loaded().then(function (value) { //iterate through for (i = 0; i &lt; value.length; i++) { //check if there is data to be replaced if (value[i].extrainfoimage) { //if there is fetch it from firebase and replace imageRef.child("-JlSvEAwu5-WZJkOE_b/image").once("value",function(data){ value[i].extrainfoimage = data.val(); }); } } })

http://stackoverflow.com/a/29220319
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29219961
has body: I copied your code into Plunker and included these lines in the section of my index.html. You need to make certain that Jquery, Bootstrap, and Angular are properly loaded in your project. Jquery needs to be before Bootstrap since Bootstrap depends on it. Once I added these dependencies, the AngularJS directives in your code worked. If you're working in Visual Studio, you could add these to your project through the NuGet Package Manager.
has comment: http://stackoverflow.com/comment/46650509
accepted answer of: http://stackoverflow.com/q/29219961
type: AcceptedAnswer

http://stackoverflow.com/a/29322213
upvote count: 1
answers question: http://stackoverflow.com/q/29321951
has comment: http://stackoverflow.com/comment/46835601
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29321951
type: Answer
has comment: http://stackoverflow.com/comment/46835592
score: 1
has body: There are several issues here, some already pointed out in Scimonster's answer, but an important one remains. For the rectangle to be placed correctly you need to "correct" the mouse positions. The mouse positions are relative to client window while you will need them relative to canvas element. Also, you are overriding canvas with context. Use a separate variable for it, and place those in global (parent) scope. Here is a full version (inside the script tags): var canvas, context; // place this in global scope function CanvasProperties(){ canvas = document.getElementById("canvas"); context = canvas.getContext("2d"); // separate var for context... window.addEventListener("mousemove", CustomCursor, false); } function CustomCursor(e){ var canvasRect = canvas.getBoundingClientRect(); // get position of canvas element var xPosition = e.clientX - canvasRect.left; // adjust mouse positions to var yPosition = e.clientY - canvasRect.top; // become relative to canvas context.clearRect(0,0,600,400); // use context context.fillRect(xPosition - 50, yPosition - 50, 100, 100); } window.addEventListener("load", CanvasProperties, false); &lt;canvas id="canvas" width=600 height=400&gt;&lt;/canvas&gt;

http://stackoverflow.com/comment/46849779
has text: @dfd fair enough; edited.
type: Comment
comment on: http://stackoverflow.com/a/29330150
type: AnswerComment
score: 0

http://stackoverflow.com/comment/46743555
type: QuestionComment
comment on: http://stackoverflow.com/q/29270000
has text: Google Chrome Developer Tools
score: 0
type: Comment

http://stackoverflow.com/comment/46696685
comment on: http://stackoverflow.com/q/29244878
score: 0
type: Comment
type: QuestionComment
has text: Could you help me in writing the code properly?

http://stackoverflow.com/comment/121259717
score: 0
comment on: http://stackoverflow.com/a/29285597
type: Comment
type: AnswerComment
has text: @Kaiido Of course I tried it. Checking uploaded videos locks up the browser for several seconds (depending on the video size) in Firefox. So if someone wants to truly support multiple browsers, this is a deal-breaker. I'll get in touch with the Mozilla team to see if this is a bug.

http://stackoverflow.com/comment/130119311
type: Comment
comment on: http://stackoverflow.com/a/42518434
score: 0
has text: Well, I never tried `no-store` due to the existence of `no-cache` . These names are a bit counter-intuitive.
type: AnswerComment

http://stackoverflow.com/comment/46923658
comment on: http://stackoverflow.com/a/29370570
has text: Was that his username? i had missed it when i was using his script. I'll be sure to edit my post to mention him
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/46688130
type: Comment
comment on: http://stackoverflow.com/q/29240614
score: 0
type: QuestionComment
has text: yes for the moment they are hard coded, will set webservices later. I get the json string from an Excel file combining value from a various cell in a single JSON string. I can amend the syntax components , but not the cell content

http://stackoverflow.com/q/29233454
downvote count: 1
type: Question
score: 0
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/29234382
tagged with: jquery
has body: I know its not an acutal problem but I found this demo http://cssdeck.com/labs/interactive-particle-logo Can someone explain how draw png images on canvas with other objects?
favorite count: 0
has title: Canvas particles interactive image
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29234382
upvote count: 1

http://stackoverflow.com/a/29769889
score: 3
answers question: http://stackoverflow.com/q/29300080
has body: Here I get Some Solution regarding Custom Link sharing on facebook. By using Sharer.php we can pass only four parameters.We can post custom link using feed.php as mention bellow. https://www.facebook.com/dialog/feed?app_id=Your_Appid&amp;ref=site&amp;display=popup&amp;name=Name_come_here&amp;caption=caption_come_here&amp;description= description_you_want_to_share&amp;actions=[{ name: "Name_of_custom_link", link: "custom_link_url" }]&amp;redirect_uri=redirect_after_feed_on_facebook
downvote count: 0
type: Answer
upvote count: 3

http://stackoverflow.com/a/30310040
answers question: http://stackoverflow.com/q/29264105
score: 2
upvote count: 2
type: AcceptedAnswer
downvote count: 0
has body: So, I forgot to post a solution: getUserMedia({video: true, audio: true}, Success(), Failure()); And you put the proper functions within their respected argument placeholders.
accepted answer of: http://stackoverflow.com/q/29264105
type: Answer

http://stackoverflow.com/comment/46773865
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29288215
has text: Can't you just remove the last character of a string with .slice(0,-1)? Or am i oversimplifying?
score: 0

text
tags question: http://stackoverflow.com/q/29367838
tags question: http://stackoverflow.com/q/29253740
type: Tag
tags question: http://stackoverflow.com/q/29275362
tags question: http://stackoverflow.com/q/29337085
tag name: text

http://stackoverflow.com/comment/46658709
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/29225266
has text: You've either missed some code under the do somthing line or you have an extra `});`
type: Comment

http://stackoverflow.com/comment/46705960
score: 1
has text: only way to do this by creating instance of `users` function i.e in VM `self.data=ko.observable(new users([//your data])` . you can access `userComments` via `self.data` . cheers
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29250529

http://stackoverflow.com/comment/46706945
score: 0
type: Comment
type: QuestionComment
has text: Should note that if you want to start writing ES6 while still producing production-usable javascript cross-browser you should take a look at [Google's Traceur transpiler](https://github.com/google/traceur-compiler).
comment on: http://stackoverflow.com/q/29251388

http://stackoverflow.com/comment/46892888
has text: Umm, whatever guy suggested removing the first "/" from the src destination is right. It just plain works. All of these demos are meant to be run on a local hard drive, so I don't understand why they would put up non-working code like that. I'll post an example.
score: 0
comment on: http://stackoverflow.com/q/29353725
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/46809614
has text: @user1655222: just added return col to the function. You probably want to add some condition on outer each to make it break too. Maybe checking when changes its default value?
comment on: http://stackoverflow.com/a/29307579
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/29281356
answers question: http://stackoverflow.com/q/29281070
downvote count: 0
has body: I believe this cannot be done with pure CSS - and even if it can it is bad practice. CSS is about appearence. You need some logic there. So javascript is the way to go. And my opinion is not to use any custom libraries, as it is mentioned in previous answers, but spend some time studying regular expressions. You ll eventually see that they are extremely usefull. You need a fairly simple one to just remove ]",
score: 1
upvote count: 1
type: Answer

http://stackoverflow.com/q/29276990
has comment: http://stackoverflow.com/comment/46752420
score: 0
tagged with: javascript
has title: another cannot set property 'innerHTML' of null
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46752290
answer count: 0
type: Question
has body: I have a JSON file with a declared array of objects. When I try to put certain content from this file on my web page via .innerHTML it says "Uncaught TypeError: Cannot set property 'innerHTML' of null", although the declared array is in the scope and I can access it with console.log, for example.

http://stackoverflow.com/q/29281575
accepted answer: http://stackoverflow.com/a/29281712
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
tagged with: scroll
type: Question
has answer: http://stackoverflow.com/a/29281712
score: 0
has body: I have a DIV that I want to scroll the contents of. As the user scrolls (using either a custom scrollbar or scroll up/down buttons), I need to know what DOM elements are visible within the scrollable DIV. I'd be happy to know even just one DOM element, as I can use that to walk the DOM and find a particular parent element that I'm looking for. Are there any plugins that provide this kind of information in the scroll completion event, or can someone recommend a way of doing this?
has title: How do determine visible DOM elements within a scrolling DIV?
answer count: 1
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/29237439
has comment: http://stackoverflow.com/comment/46681008
has comment: http://stackoverflow.com/comment/46683368
answer count: 0
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/14508707
has body: This is what I'm working with: &lt;input id="t78" name="9x6" size="4" spacename="nospacezone" style="font-size: 0.6em" type="text" value="${9x6}" /&gt; //this removes spaces and replaces them with hyphens $(function () { $("input[spacename^='nospacezone']").bind('input', function () { $(this).val(function (_, v) { return v.replace(/\s+/g, '-'); }); }); }); If you put those things into JSFiddle, add the jquery library, and run it you'll see that if you click on the text inside the input box and type a letter or erase a letter, the pointer jumps to the end of the text. I don't know why it does this but I would like it to stop. Please let me know if you have any suggestions! Thank you!
duplicate of: http://stackoverflow.com/q/14508707
type: Question
has title: How to prevent move to end of line glitch in input
tagged with: javascript
tagged with: jquery
score: 0

http://stackoverflow.com/comment/48195081
type: Comment
has text: Answers to your questions for me: I am was (at the time of my question) using the latest Chrome (which is currently Version 42.0.2311.135 m), I am using grails which minifies and uglifies all my JS during QA and Production builds, so I don't use minified versions in development, in case, the during debugging I need to see what is going on under the hood, and I am upgrading so I went to the url offered in the top of the home page ( ) and, copied the whole file, and pasted it over the version I was currently using.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29268775

http://stackoverflow.com/a/29319698
answers question: http://stackoverflow.com/q/29313486
upvote count: 2
has body: The issue is that the stored hook will fire when the original image is saved on the server, so if you're creating multiple copies (thumbnails) this hook will fire before your thumbnails are stored. You can check which version of the thumbnail was stored by checking the storeName argument. In the server side file, where you define the ProfileImages collection add the following code, replacing 'profilePhotoLarge' with the name assigned to your FS.Store.S3 store: ProfileImages.on('stored', Meteor.bindEnvironment(function(fileObj, storeName) { if (storeName === 'profilePhotoLarge') { Meteor.users.update({_id: fileObj.metadata.owner}, { $set: { 'profile.image.url': 'https://your AWS region domain/your bucket name/your folder path/' + fileObj._id + '-' +fileObj.name() } }); } }, function() { console.log('Failed to bind environment'); })); For profile photos I created an S3 bucket and set the permissions to allow anyone to read the files, so I'm storing the URL to the image on S3, which may not be correct in your case. Since the user object is reactive on the client side this update will cause the profile photo to update automatically.
type: Answer
has comment: http://stackoverflow.com/comment/46835671
has comment: http://stackoverflow.com/comment/46835635
score: 2
downvote count: 0

http://stackoverflow.com/comment/46906597
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29225639
has text: Finally i found myself !!!Guys thanks for your concern......
score: 0

webview
tags question: http://stackoverflow.com/q/29224221
tags question: http://stackoverflow.com/q/29226678
tags question: http://stackoverflow.com/q/29357526
tags question: http://stackoverflow.com/q/29363128
tag name: webview
tags question: http://stackoverflow.com/q/29268986
tags question: http://stackoverflow.com/q/29341404
tags question: http://stackoverflow.com/q/29304540
tags question: http://stackoverflow.com/q/29246534
type: Tag
tags question: http://stackoverflow.com/q/29242258
tags question: http://stackoverflow.com/q/29339961
tags question: http://stackoverflow.com/q/29227906
tags question: http://stackoverflow.com/q/29269637
tags question: http://stackoverflow.com/q/29314868

http://stackoverflow.com/a/29311357
score: 0
answers question: http://stackoverflow.com/q/29311311
type: Answer
has body: var x = 10; function reduce() { console.log(x); x = x-1; if (x === 0) return; setTimeout(reduce, 1000); } reduce();

http://stackoverflow.com/comment/46899767
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29314115
has text: Right, constraints are for negotiating cameras and mics. It sounds like you want to control encoding and transmission in RTCPeerConnection instead? Such a control surface is [still being developed in the specification](http://w3c.github.io/webrtc-pc/#rtp-media-api). For now this is handled automatically, and the bit-rate used adapts to the bandwidth available, as can be seen in [this test](http://webrtc.github.io/samples/src/content/peerconnection/constraints). I seem to recall that Google Chrome used to have some bitrate settings in the past, but I don't see them exposed at present.
type: AnswerComment

http://stackoverflow.com/comment/46699483
has text: See [`jQuery.contains()`](https://api.jquery.com/jQuery.contains/).
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29246874

http://stackoverflow.com/a/29290221
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/46851900
has body: Please give this a try: var obj = $('.container p').eq(2); if($('.container p').eq(2).parents("blockquote").length) obj = $('.container p').eq(2).parents("blockquote"); obj.after( $('.inserted') ); You'll find an example here: http://jsfiddle.net/hyunkeln/k0hq6a46/6/ What this script does is look if the selected paragraph is a child from a blockquote, if so, then the inserted div goes right after the blockquote instead of the selected paragraph.
answers question: http://stackoverflow.com/q/29290053
has comment: http://stackoverflow.com/comment/46781111
upvote count: 1
has comment: http://stackoverflow.com/comment/46822597
has comment: http://stackoverflow.com/comment/46851921
type: Answer
has comment: http://stackoverflow.com/comment/46904626

checkout
type: Tag
tag name: checkout
tags question: http://stackoverflow.com/q/29309230

http://stackoverflow.com/comment/46800675
has text: In a way I did answer the question and I don't have enough rep to comment on questions.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29303053

http://stackoverflow.com/q/29227872
type: Question
has title: JS window.location in an AJAX based site
tagged with: javascript
has body: I have a simple AJAX based site that I have an equally simple geolocation function that redirects a user to a new page when they click a button. This is the part of my geolocation function that redirects users which, as you will see, redirects people to a page called weather.php; function showPosition(position) { window.location='weather.php?lat='+position.coords.latitude+'&long='+position.coords.longitude; } The problem is that it redirects the page using a "traditional" page load and thus renders the AJAX page loading I have implemented obsolete. Is it possible to modify this function and make it AJAX friendly? This is the full redirect code; My Location var x = document.getElementById("message"); function getLocation() { if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(showPosition, showError); } else { x.innerHTML = "Geolocation is not supported by this browser."; } } function showPosition(position) { window.location='weather.php?lat='+position.coords.latitude+'&long='+position.coords.longitude; }
answer count: 1
tagged with: ajax
type: UnansweredQuestion
score: 0
has answer: http://stackoverflow.com/a/29235295
tagged with: geolocation

http://stackoverflow.com/comment/46845416
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29327602
has text: to move an object along a line (two point/vectors) simply do transform.translate((startPos - endPos) * deltaTime) and call it every update.
score: 0

http://stackoverflow.com/a/29291506
accepted answer of: http://stackoverflow.com/q/29291410
type: AcceptedAnswer
has body: It doesn't make sense trying to sort it out thru the root key, its the parent key, use the keys in the inner levels (price, style, etc..): usort($root['root'], build_sorter('price'));
has comment: http://stackoverflow.com/comment/46780088
has comment: http://stackoverflow.com/comment/46779957
type: Answer
has comment: http://stackoverflow.com/comment/46780323
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/46779929
answers question: http://stackoverflow.com/q/29291410
upvote count: 2

http://stackoverflow.com/comment/46887254
has text: I have an arrays.txt file locally within the project.
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29308795

http://stackoverflow.com/q/29328766
has title: Time span between dates in specific format
type: Question
tagged with: date-comparison
tagged with: javascript
tagged with: date
has comment: http://stackoverflow.com/comment/46847289
has comment: http://stackoverflow.com/comment/46847896
score: 0
has body: I'm, trying to do some date comparison in javascript but I don't find any way where the outcome is what I need. I wanna compare two dates in yyyy-mm-dd hh:mm:ss format, and have the outcome outputted in amount of time between those two dates. example, if I input 2015-03-26 05:00:00 and 2015-03-29 05:00:00, I want it to output - 0000-00-03 00:00:00, if i were to switch positions I would get an positive number etc. The thing is I only manage to compare dates in the standard getDate() format, I can parse my values to this format and get the millisecond span between the dates with: var parsedDate = Date.parse("2015-03-26 05:00:00"); var formattedDate = new Date(parsedDate); var today = new Date(); var MS = new Date(Math.abs(today - formattedDate)); But I can't get those ms back to my format yyyy-mm-dd hh:mm:ss, I'm quite new with javascript, maybe my lack of knowledge forces me to go the wrong way, any tips is apreciated.
type: UnansweredQuestion
tagged with: date-format
has comment: http://stackoverflow.com/comment/46847605
answer count: 0

dialog
tag name: dialog
type: Tag
tags question: http://stackoverflow.com/q/29246963

http://stackoverflow.com/q/29312972
tagged with: javascript
has answer: http://stackoverflow.com/a/29313103
score: 0
answer count: 1
tagged with: fullpage.js
tagged with: jquery
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has title: fullPage.js, background and divs not working properly
tagged with: css
has body: I'm trying to change the background of the first section and also include two fullsized divs inside the section. THe background will not show and only half of the other divs will show, everything else is white. HTML: CSS: .bg { opacity:0.5; position: absolute; width: 100%; height: 100%; -webkit-transition: opacity 5s; -moz-transition: opacity 5s; transition: opacity 5s; } .hidden { opacity: 0; margin-top:-50%;} #section0 { background-image:url(img/1.jpg); margin: 0; width:100%; height: 100%; background-size: cover; background-position: center center; background-attachment: fixed; } Write if you need any more information, would be forever grateful if anyone could figure it out.
type: Question

http://stackoverflow.com/q/29270598
has comment: http://stackoverflow.com/comment/47194267
has comment: http://stackoverflow.com/comment/46742101
has comment: http://stackoverflow.com/comment/46742079
accepted answer: http://stackoverflow.com/a/29270781
has comment: http://stackoverflow.com/comment/46742122
has comment: http://stackoverflow.com/comment/46989493
score: 18
tagged with: subresource-integrity
type: AnsweredQuestion
upvote count: 18
type: Question
answer count: 2
tagged with: javascript
has body: Is there any implementation or specification for including a hash or signature in an attribute of a &lt;script> tag, so that the browser can verify that the correct file was retrieved before executing it? Something like: &lt;script src="http://cdn.example.com/jquery-2001.js" signature="sha-256/e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" &gt;&lt;/script&gt; The motivation is this: generally, each additional CDN or host you use for your site increases your vulnerability, by adding a new target that can be hacked to compromise your site. Allowing your primary front-end servers to assert hashes or signatures of those files could entirely eliminate that risk, allowing you to be more flexible when designing your architecture. You could even request missing files from an untrusted peer-to-peer network. I thought I remembered a specification about this, but haven't been able to find it.
tagged with: http://stackoverflow.com/tag/html
has title: Specifying the hash of a script from an untrusted host
downvote count: 0
possible better answer: http://stackoverflow.com/a/29270680
tagged with: cryptography
has answer: http://stackoverflow.com/a/29270781
has answer: http://stackoverflow.com/a/29270680
has comment: http://stackoverflow.com/comment/46742147
favorite count: 0

http://stackoverflow.com/q/29343344
linked to: http://stackoverflow.com/q/15594663
tagged with: performance
has answer: http://stackoverflow.com/a/29343762
score: 4
has comment: http://stackoverflow.com/comment/46873135
upvote count: 4
has title: Efficiency: one event handler or multiple
has body: There is a question with a good answer about binding multiple objects to a click event here, but the answer deals with only buttons inside a container. I am wondering what happens if there is a more complex structure, with elements inside the buttons and non-button elements inside the container. Will it still be more efficient to use a single eventhandler? Consider this (not that complex) HTML: some text some more text some text some text some more text //... more text, images and let's say up to 20 buttons I could: Add eventlisteners to all buttons seperatly Add only one eventhandler to the container In case 1 I need: document.getElementById('button_1').addEventListener('click',dosomething,false); document.getElementById('button_2').addEventListener('click',dosomething,false); //etc... 18x function dosomething(e){ var button=e.currentTarget.id; //do something based on button id; } I then have 20 clickhandlers attached to 20 different buttons that only fire if the button is clicked. In case 2 I need: document.getElementById('container').addEventListener('click',dosomething,false); function dosomething(e){ var container=e.currentTarget; var clicked=e.target; while(clicked != container){ if(clicked.className == 'button'){ var button=clicked.id; //do something based on button id; return; } else{ clicked=clicked.parentNode; } } } Now I have only one eventlistener. But it fires not only on the buttons, but on everything you click inside the container. And it has to travel up the DOM everytime to detect if there might be a button around the element clicked on. So which one of the two is the most efficient in memory usage and performance? The one with more eventhandlers but less to do, or the one with only one eventhandler but more complex code? I've made a fiddle to demonstrate the difference. [edit] Perhaps I've oversimplified the example too much. There are moments some 200+ evenlisteners will be attached, in a maximum of 4 containers.
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: eventhandler
favorite count: 0
has comment: http://stackoverflow.com/comment/46873380
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46873283
has answer: http://stackoverflow.com/a/29343826
type: Question

http://stackoverflow.com/a/29223680
upvote count: 0
has body: if (process.env.NODE_ENV === "production") // whatever
type: Answer
score: -3
answers question: http://stackoverflow.com/q/29223471
downvote count: 3

http://stackoverflow.com/comment/46668074
has text: Chances are your server is replying with an error page (served in HTML) when processing your script requests. Use Fiddler or similar to get the whole response so you can determine what's going on.
comment on: http://stackoverflow.com/q/29230804
type: Comment
type: QuestionComment
score: 2

http://stackoverflow.com/comment/46743531
has text: `$(document).ready(function(){ $(".user-information").hide(); $(".btn").click(function(){ $(".medicine-information").hide() $(".user-information").show() }); });` Still not working
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29271542
type: AnswerComment

http://stackoverflow.com/q/29315593
has answer: http://stackoverflow.com/a/29315627
score: 2
type: AnsweredQuestion
downvote count: 0
tagged with: javascript
favorite count: 0
has body: I have a site with 3 frames. I want to visit main page, and then switch to child frame and open another page in this frame. Is this possible? There is not really much about this in the documentation.
tagged with: frames
accepted answer: http://stackoverflow.com/a/29315627
type: Question
upvote count: 2
answer count: 1
has title: How to open link in childframe using PhantomJS?
tagged with: phantomjs

http://stackoverflow.com/comment/46806029
score: 0
has text: @epascarello A *class* of `block` is not the same as a *display* property of `block`.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29284054

http://stackoverflow.com/comment/46846536
score: 0
type: Comment
type: QuestionComment
has text: Yes, because the loop doesn't stop executing. What do you think `while(true)` does?
comment on: http://stackoverflow.com/q/29319435

http://stackoverflow.com/q/29361677
favorite count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/46907344
score: -6
upvote count: 0
type: UnansweredQuestion
downvote count: 6
has body: in javaScript : navigator.geolocation.getCurrentPosition(onSuccessLocation, onErrorLocation); In the above code Success Location working fine when i click share location button popup (would you like to share your location) in browser. but i want Error Location. it will not working when i clicked Not Now in browser.
has title: how this function works
type: Question
has answer: http://stackoverflow.com/a/29361974
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/122213618
score: 1
type: AnswerComment
has text: why do you write "For React" ? I don't see what this has to do with React, it's just JS... I encourage you to remove that line from your answer.
comment on: http://stackoverflow.com/a/67899188
type: Comment

http://stackoverflow.com/comment/46908488
score: 0
type: Comment
comment on: http://stackoverflow.com/q/29362299
type: QuestionComment
has text: Try to alter your model to have employee and his city in a particular array.

http://stackoverflow.com/q/29238438
tagged with: google-maps
tagged with: javascript
answer count: 0
score: 0
type: UnansweredQuestion
has title: Customize google maps marker in wordpress
tagged with: wordpress
has comment: http://stackoverflow.com/comment/46684356
has comment: http://stackoverflow.com/comment/46683063
type: Question
has comment: http://stackoverflow.com/comment/46684074
has body: I want to customize the icon marker, but when I link to my custom image (inside wordpress) it doesn't work. When I do it out of wordpress it works. I think I need some special wordpress request in my script.js.. var image1 = 'map-marker.png'; var myLatlng = new google.maps.LatLng(41.4015659, 2.1564281); var marker = new google.maps.Marker({ position: myLatlng, map: map, icon: image1 });
tagged with: google-maps-api-3

http://stackoverflow.com/comment/46764774
type: AnswerComment
has text: I can place any links I think are useful. You don't tell people what links they need to use.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29282270

http://stackoverflow.com/comment/46828516
type: Comment
type: QuestionComment
has text: why didn't you add `end($)` of string.?
comment on: http://stackoverflow.com/q/29318329
score: 0

http://stackoverflow.com/a/29288296
score: 1
type: AcceptedAnswer
downvote count: 0
has body: I was able to make it work. I found this article very helpful. After understanding (and accepting reality) how JSP works with html, I had to slightly restructure my program. From spring mvc, I added my variables to the model, model.addAttribute("element1", 1); On the jsp page I checked the variables with javascript, if("${element1}" == 1) { document.getElementById("1").innerHTML = 'X'; document.getElementById("1").style.color = 'red'; } Probably there are better solutions, but for a newbie like me, it works great! The article I mentioned above is indeed a good and important read for new comers.
accepted answer of: http://stackoverflow.com/q/29234494
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/29234494

http://stackoverflow.com/q/29284823
has body: Currently working with singalR but I get the following errors in visual studio: Can't find usage of id 'displayname' Can't find usage of id 'message' Can't find usage of id 'sendmessage' I do not know what I am doing wrong. Here is my code: Chat
answer count: 0
type: UnansweredQuestion
upvote count: 1
score: 1
tagged with: signalr
type: Question
tagged with: javascript
tagged with: jquery
has title: Can't find usage of id ***
downvote count: 0
has comment: http://stackoverflow.com/comment/46841768
favorite count: 0

http://stackoverflow.com/q/29315904
has title: Unmatched route angularjs (ui-router)
has body: I wrote in my app.js file this line of code: $urlRouterProvider.otherwise('/view1'); This is my htaccess file: &lt;ifModule mod_rewrite.c&gt; RewriteEngine on RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^.*$ - [NC,L] RewriteRule ^(.*) /index.html [NC,L] &lt;/ifModule&gt; Now, if I try to run myrul/invented_route the response's server is "Not found" even if the otherwise route is setted.
score: 0
has comment: http://stackoverflow.com/comment/46824592
has comment: http://stackoverflow.com/comment/46824095
has comment: http://stackoverflow.com/comment/46824717
tagged with: angular-ui-router
has comment: http://stackoverflow.com/comment/46824195
has comment: http://stackoverflow.com/comment/46824198
has comment: http://stackoverflow.com/comment/46824069
answer count: 0
has comment: http://stackoverflow.com/comment/46824321
tagged with: javascript
type: UnansweredQuestion
tagged with: .htaccess
tagged with: angularjs
type: Question

http://stackoverflow.com/comment/46767489
has text: What are the data types of productCatogory and productStatus?
score: 0
comment on: http://stackoverflow.com/q/29284877
type: Comment
type: QuestionComment

ecmascript-harmony
tag name: ecmascript-harmony
type: Tag
tags question: http://stackoverflow.com/q/29272134

http://stackoverflow.com/comment/46931270
has text: I re-checked and the transition and delay both are working fine for me.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29373451
type: AnswerComment

http://stackoverflow.com/q/29246534
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46717523
tagged with: webview
has comment: http://stackoverflow.com/comment/46741522
has comment: http://stackoverflow.com/comment/46698489
has comment: http://stackoverflow.com/comment/46743432
type: Question
has comment: http://stackoverflow.com/comment/46741809
has comment: http://stackoverflow.com/comment/46711971
has comment: http://stackoverflow.com/comment/46745569
tagged with: javascript
has body: I'm trying to develop a hybrid APP that will implement in webview. In this APP, I want all user interfaces load from server and functions (such as wifi scanning) work by native code. Is it possible if I click the icon in the UI and it will send me back to implement native code by JavaScript? (I have tried PhoneGap, but there doesn't have the plugin can support the function I need.)
score: 0
tagged with: android
has comment: http://stackoverflow.com/comment/46744085
has title: Android - Web connect back to native code by JavaScript?
linked to: http://stackoverflow.com/q/7544671

http://stackoverflow.com/q/29221075
has body: I've written a search function to run through a potentially quite big d3 tree and filter out only the nodes matching a search pattern. The search function works well and is reasonably fast. But, because of the volume and the time to calculate the data on the server, I want to be able to reset the tree to its initial contents if the user clears the search or enters another one, without making another query. That is not working. This is what I tried: 1 - cloning d3 nodes First, I took a look at [what-is-the-most-efficient-way-to-clone-an-object][1] and they had several recommendations. Running from Jasmine, my cloning seems to work (not sure why actually). Running the code in my app, I get an immediate error. The exact error depends on which code I use - jquery.extend or JSON.parse of JSON.stringify. I suspect this is because each node d has a d.parent attribute as well as d.children, so it enters a cycle as soon as you want to recursively clone its children. 2 - setting d3.layout.tree.children to filter the data. Then I noticed that there was a d3.layout.tree.children function, which I could use to manipulate the tree. So, I did that instead of copying the json data and would only return nodes where d.visible true. The idea is that I don't have to do anything when I want to reset, I just go back to the base, non-filtering, children. That doesn't work either - the children nodes not matching the search have now disappeared from the data, not just the graph. Update: I've removed my initial sample code which didn't work and given a tentative first answer myself that works for me.
tagged with: javascript
score: 0
answer count: 1
has title: searching a d3 tree - reset after search
tagged with: d3.js
has answer: http://stackoverflow.com/a/29262280
type: UnansweredQuestion
type: Question

http://stackoverflow.com/comment/46810746
type: AnswerComment
comment on: http://stackoverflow.com/a/29307625
score: 0
type: Comment
has text: This is the solution I like best because it creates the cleanest HTML. It bothers me when HTML markup uses single quotes in attributes and then double quotes in the inline JavaScript.

http://stackoverflow.com/comment/46707961
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29242048
has text: Another answer here: [Check all boxes in a fixed-data-table by using?](http://stackoverflow.com/questions/29067247/check-all-boxes-in-a-fixed-data-table-by-using/29074683#29074683)

http://stackoverflow.com/comment/46652217
comment on: http://stackoverflow.com/q/29221567
has text: you can refer to this page on how to send an email with attachments: https://developers.google.com/apps-script/reference/mail/mail-app
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29337756
accepted answer of: http://stackoverflow.com/q/29337727
type: Answer
answers question: http://stackoverflow.com/q/29337727
has comment: http://stackoverflow.com/comment/46863757
has comment: http://stackoverflow.com/comment/46863755
has body: If you just write i - 5, there is no left-hand variable, which means there is nothing which is taking the value of i and subtracting it by 5. If you write i = i - 5 then you will decrement 5 since you now have a left-hand variable.
has comment: http://stackoverflow.com/comment/46863743
score: 0
upvote count: 1
type: AcceptedAnswer
downvote count: 1

http://stackoverflow.com/q/29239803
tagged with: css
favorite count: 0
has title: How do I make a javascript div open on load but hide when clicking on another div link?
type: UnansweredQuestion
upvote count: 1
has body: You can see my page sample here: https://dl.dropboxusercontent.com/u/24791073/TheAmericanWorker/index5.html. I am trying to load the MEC div, then close it when clicking on another link such as Minimum Value Plans in the top bar. I tried just having it "display:block" instead of "display:none", but that doesn't allow me to close it. Here is the javascript code up top I am using. lastone = 'empty'; function showIt(lyr) { if (lastone != 'empty') lastone.style.display = 'none'; lastone = document.getElementById(lyr); lastone.style.display = 'block'; }; function hideIt(lyr) { if (lastone != 'empty') lastone.style.display = 'block'; lastone = document.getElementById(lyr); lastone.style.display = 'none'; } and a sample of the link code: MEC Plans MEC Plans allow employers to offer qualifying coverage to their employees on a self-funded basis, which satisfies the individual mandate. Learn More
score: 1
has comment: http://stackoverflow.com/comment/46686726
has comment: http://stackoverflow.com/comment/46686810
has comment: http://stackoverflow.com/comment/46686819
has comment: http://stackoverflow.com/comment/46685980
has answer: http://stackoverflow.com/a/29240538
type: Question
answer count: 1
has comment: http://stackoverflow.com/comment/46698014
downvote count: 0
has comment: http://stackoverflow.com/comment/46686173
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46686322
has comment: http://stackoverflow.com/comment/46686269
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/46758354
comment on: http://stackoverflow.com/q/29280221
has text: No, `required` and `disabled` means it is required, but the user can't enter it.
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/q/29308525
has comment: http://stackoverflow.com/comment/46811070
tagged with: css
has answer: http://stackoverflow.com/a/29308690
type: AnsweredQuestion
has body: I am looking for the best approach to solve this situation: Given a 4 cell grid. I'd like the top row to be of fixed height and the right column to be of fixed width. The left column's width and the bottom row's height would then resize automatically as you resize the screen. (that's the easy part .. just set the "northeast" cell in an HTML TABLE to fixed size and set the TABLE's height and width to 100%) Now the tricky part. I want the southeast, northwest, and northeast cells to be rotated. Since the northeast cell is a fixed size square, that's super easy to do, just rotate it. However the southeast and northwest cells are dynamic in size based on the window's height and width. Here is a super simple example of the situation -- I will rotate only the southeast corner for this example: Northwest Northeast Southwest Southeast Which results in: What would be the simplest approach to getting the TABLE (or a grid of DIV or UL) to behave nicely when the screen is resized, like it does before the rotation? In other words, the southeast cell would have the same size and location it originally did, but the contents would layout rotated. Can this be done with pure HTML5/CSS3 and no javascript? If not, what would be the simplest javascript I could use -- without any libraries -- to pull this off?
type: Question
has comment: http://stackoverflow.com/comment/46811139
has comment: http://stackoverflow.com/comment/46811202
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29308690
score: 0
has comment: http://stackoverflow.com/comment/46811476
answer count: 1
has comment: http://stackoverflow.com/comment/46811237
has title: How to Make CSS3 Transform:Rotate Automatically Resize
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/32593814
has comment: http://stackoverflow.com/comment/62681722
has comment: http://stackoverflow.com/comment/56395820
has comment: http://stackoverflow.com/comment/53580668
has comment: http://stackoverflow.com/comment/53089065
downvote count: 0
has comment: http://stackoverflow.com/comment/80704108
answers question: http://stackoverflow.com/q/29313244
has comment: http://stackoverflow.com/comment/59860513
upvote count: 85
has comment: http://stackoverflow.com/comment/53905211
has comment: http://stackoverflow.com/comment/55112223
type: Answer
has comment: http://stackoverflow.com/comment/55120263
score: 85
has comment: http://stackoverflow.com/comment/62242181
has comment: http://stackoverflow.com/comment/62375093
has comment: http://stackoverflow.com/comment/62646006
has comment: http://stackoverflow.com/comment/55650187
has comment: http://stackoverflow.com/comment/66829035
has body: 2017 Answer The KeyboardAvoidingView is probably the best way to go now. Check out the docs here. It is really simple compared to Keyboard module which gives Developer more control to perform animations. Spencer Carli demonstrated all the possible ways on his medium blog. 2015 Answer The correct way to do this in react-native does not require external libraries, takes advantage of native code, and includes animations. First define a function that will handle the onFocus event for each TextInput (or any other component you would like to scroll to): // Scroll a component into view. Just pass the component ref string. inputFocused (refName) { setTimeout(() =&gt; { let scrollResponder = this.refs.scrollView.getScrollResponder(); scrollResponder.scrollResponderScrollNativeHandleToKeyboard( React.findNodeHandle(this.refs[refName]), 110, //additionalOffset true ); }, 50); } Then, in your render function: render () { return ( &lt;ScrollView ref='scrollView'&gt; &lt;TextInput ref='username' onFocus={this.inputFocused.bind(this, 'username')} &lt;/ScrollView&gt; ) } This uses the RCTDeviceEventEmitter for keyboard events and sizing, measures the position of the component using RCTUIManager.measureLayout, and calculates the exact scroll movement required in scrollResponderInputMeasureAndScrollToKeyboard. You may want to play around with the additionalOffset parameter, to fit the needs of your specific UI design.
has comment: http://stackoverflow.com/comment/63072917
has comment: http://stackoverflow.com/comment/88160115

http://stackoverflow.com/comment/46820817
type: Comment
has text: Another issue as @bdrx suggested, any editing will send the cursor all the way to the end
comment on: http://stackoverflow.com/a/29312803
score: 0
type: AnswerComment

http://stackoverflow.com/a/29314736
answers question: http://stackoverflow.com/q/29314591
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/46822097
accepted answer of: http://stackoverflow.com/q/29314591
type: AcceptedAnswer
downvote count: 0
has body: Problem solved. the problem was in the library code. library code was like this in the start ;(function($) { and now i changed to $(function($) { and it worked fine.
type: Answer

http://stackoverflow.com/a/30218254
has comment: http://stackoverflow.com/comment/62575934
type: Answer
answers question: http://stackoverflow.com/q/29315875
has body: I had the same problem, except that I use the database to import the information. Indeed the problem in my case come from format of dates, and I was able to correct that using these methods: Date_create (): to create the date from the field of the database example: $start = date_create($row-&gt;start_date) Date_format(): to convert the date to a datetime example: date_format ($start, 'Y-m-d H:i:s') I hope it'll help to solve your problem
score: 0

http://stackoverflow.com/a/29354232
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/29354064
type: Answer
has body: In my particular situation I needed to substitute ng-if for ng-show. This allowed my content to be rendered on the screen but hidden. ng-if was preventing the content from being rendered altogether.
downvote count: 0
has comment: http://stackoverflow.com/comment/46893535

http://stackoverflow.com/a/29270280
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 2
answers question: http://stackoverflow.com/q/29269992
has body: The issue is at your for loop. Use: for(i=0; i&lt;document.bookForm.books.length; i++) { Instead of: for(i=0; i&lt;document.bookForm.books[i].length; i++) { The reason is that you should not access the array element at the size definition. Also, the following block is returning a ReferenceError since the subTotal variable was not defined out of the funRun1() function: tax = (.06 * subTotal) total= (subTotal + tax)
accepted answer of: http://stackoverflow.com/q/29269992
upvote count: 2

http://stackoverflow.com/comment/46691341
type: Comment
comment on: http://stackoverflow.com/a/29242263
type: AnswerComment
has text: Awesome, it is working. Thank you I had tried about ten different methods until you sent me this. I didn't realize that you could just slap media queries into your stylesheet. I thought that you had to compile something to make it work. Thank you.
score: 0

http://stackoverflow.com/comment/46885137
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29346407
type: Comment
has text: What if my routes are not in one single file?

http://stackoverflow.com/q/29345635
has answer: http://stackoverflow.com/a/29345849
type: Question
has answer: http://stackoverflow.com/a/30865680
has body: I'm trying to make the GTA Online Tips loading screen in HTML. This is what I'm trying to make - http://prntscr.com/6n7txe This is what I have - http://prntscr.com/6n7w92 The problem im focusing on right now is to get the 2 dives rightnext to each other with the right width and height. HTML: GTA ONLINE GTA Online First Person Mode Lorem ipsum dolor sit amet, consectetu adipiscing elit. Maecenas sodales, velit sed dictum fermentum, ligula nunc sodales magna, at convallis. <img src="pics/Trevor.jpg" CSS: body{ background-image: url("../pics/background_1.jpg"); background-size: cover; } .column { white-space: nowrap; } .column .picture img { width: 25%; height: 25%; vertical-align: middle; float: right; } .column .text { background:rgba(0,0,0,1); display: inline-block; vertical-align: top; float: left; width:50%; } .column .text p{ color:rgba(255,255,255,1); width:50%; }
has answer: http://stackoverflow.com/a/29345904
tagged with: javascript
score: 0
has title: How to put a image div right next to a text div?
has comment: http://stackoverflow.com/comment/46877505
accepted answer: http://stackoverflow.com/a/29345714
tagged with: jquery
possible better answer: http://stackoverflow.com/a/29345904
has comment: http://stackoverflow.com/comment/46878124
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29345714
tagged with: css
has comment: http://stackoverflow.com/comment/46877298
answer count: 4
type: AnsweredQuestion

http://stackoverflow.com/a/29243694
has body: To set an input's value you need the val method, so: $("select.btn").val("All"); Note that you need to add this to the select item not its options.
score: 0
answers question: http://stackoverflow.com/q/29243657
type: Answer

http://stackoverflow.com/a/41859904
downvote count: 3
upvote count: 1
has body: You could use canvas.addEventListener var canvas = document.getElementById('canvas0'); canvas.addEventListener('mouseover', function() { /*your code*/ }, false); It worked on google chrome
type: Answer
answers question: http://stackoverflow.com/q/29300280
score: -2

http://stackoverflow.com/q/29361804
downvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/46907703
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/46907669
has title: Regexp for single quote replacement in SQL statment
tagged with: sql-server
tagged with: regex
has answer: http://stackoverflow.com/a/29361937
has body: I have googled this ane are really surprised not to find a ready made solution to this as I believe that it is a problem that is faced by anyone who is updating databases from forms. Problem is the single quote that is used in text fields as an apostrophe and other instances. So I need to find are replace all occurrences of single quotes within an SQL statement in Javascript / Nodejs before sending it to the database, this of course is not a hard-coded statement and it will be different every time, but the following includes carriage returns in the sql statement as well as spaces before and after an equal sign as well as no spaces to try and catch all occurrences. The key thing really is the "=" followed by a single speech mark, the text to grab and the closing single speech mark followed by a space, a comma, or the word "WHERE". I am no expert with regex, but have come up with this, which only correctly extracts a couple of the strings: /\= *'(.*)' *[, *]/g Would appreciate help from any of the regex experts out there :-) update XXX set status = 'Pending's' where xx = 'xxx' UPDATE XX_XXX SET SUBJECT='Test of system's', SERIAL_NUMBER='SN'1'23', SPEC='Verify order's package is complete', DESCRIPTION='13.3/8'' Buttress Pin's ' WHERE ID='1002-15' This should be the result: update XXX set status = 'Pending''s' where xx = 'xxx' UPDATE XX_XXX SET SUBJECT='Test of system''s', SERIAL_NUMBER='SN''1''23', SPEC='Verify order''s package is complete', DESCRIPTION='13.3/8''' Buttress Pin''s ' WHERE ID='1002-15' And these are the strings that need to be selected: Pending's Test of system's SN'1'23 Verify order's package is complete 13.3/8' 1002-15
has comment: http://stackoverflow.com/comment/46907743
has comment: http://stackoverflow.com/comment/46912530
has comment: http://stackoverflow.com/comment/46907667
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46907569
upvote count: 1
score: 1
type: Question

http://stackoverflow.com/q/29277882
has answer: http://stackoverflow.com/a/29278216
tagged with: http://stackoverflow.com/tag/html
has title: How to show the original elements after the replace with?
has body: I have a div with the name "frined-replace" and an autosuggestion field. When the page loads the contents inside the frined-replace div shown. when we write something to the input field to search then the frined-replace is replaced with the data of the autosuggestion. Now the question is that when i write something the frined-replace div is replaced by the data and when i erase the input field characters which i have entered then i can't reshow the frined-replace div elements. frined-replace: &lt;li style="float:left; width:240; margin:2px 0 4px 2px; border-bottom:1px solid #CCC; background-color:#f90; height:30px;"&gt; &lt;a href="&lt;?php echo $config-&gt;baseUrlTs;?&gt;messages?user_id=&lt;?php echo $myusrid;?&gt;" &gt; &lt;img src="&lt;?php echo $config-&gt;baseUrl;?&gt;&lt;?php echo $imgs;?&gt;" alt="" width="26" height="26" /&gt; &lt;font style="font-weight:bold; color:white"&gt;&lt;?php //global $config; echo $myusrname; ?&gt;&lt;/font&gt;&lt;/a&gt; &lt;/li&gt; and this is the autosuggestion part: $("#search").keyup(function(e){ var qr = $("#search").val(); if(qr=="") { $("#erase").empty(); return; } $.ajax({ url: "&lt;?php echo $config-&gt;baseUrl;?&gt;/themes/gr-mist/ajax/inbox-ajax.php?str="+$(this).val()+"&amp;user_id="+&lt;?php echo $userid;?&gt;, context: document.body, success: function(data){ $("#frined-replace").replaceWith(data); //$("#search").val(''); //$('#search').val('').empty(); } }); });
possible better answer: http://stackoverflow.com/a/29278216
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29279122
tagged with: php
type: Question
has comment: http://stackoverflow.com/comment/46753827
score: 0
answer count: 2
accepted answer: http://stackoverflow.com/a/29279122
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/46824144
type: AnswerComment
score: 0
type: Comment
has text: I wanted to post the fiddle, but it doesnt work in jsfiddle.. ?
comment on: http://stackoverflow.com/a/29314609

http://stackoverflow.com/a/29278870
type: AcceptedAnswer
score: 1
has body: imageCapture has a property called resolution. Use that to set the resolution. To take photo when Scan is pressed, move the mouse area under the scan button. May be this will help. import QtQuick 2.4 import QtQuick.Window 2.2 import QtMultimedia 5.0 Window { visible: true id: root width: 460; height: 640 color: "#dff79e" property int duration: 3000 property int sideLength: 400 Rectangle { width: 400 height: 400 x: 30; y: 90 Camera { id: camera imageCapture { resolution: Qt.size(sideLength, sideLength) onImageCaptured: { // Show the preview in an Image photoPreview.source = preview } } } VideoOutput { source: camera focus : visible // to receive focus and capture key events when visible anchors.fill: parent } Image { id: photoPreview } } Rectangle { id: scanButton x: 130; y: 520 width: 200; height: 70 color: "#4b86b4" radius: 3 Text { anchors.centerIn: parent font.pixelSize: 20 color: "white" text: qsTr("Scan!") } MouseArea { anchors.fill: parent; onClicked: camera.imageCapture.capture(); } } Rectangle { id: menu_screen width: parent.width; height: parent.height color: "#303030" radius: 3 x: -460; Behavior on x { NumberAnimation { easing.type: Easing.OutQuad; duration: 500 } } Rectangle { id: listviewRectangle anchors.top: parent.top anchors.right: parent.right anchors.margins: 20 width: 260; height: 525 color: "#444444" radius: 3 ListView { anchors.fill: parent anchors.margins: 20 clip: true model: 30 delegate: numberDelegate spacing: 7 } Component { id: numberDelegate Rectangle { width: 220; height: 50 color: "#ccec75" radius: 3 Text { anchors.centerIn: parent font.pixelSize: 10 text: index } MouseArea { anchors.fill: parent onClicked: ColorAnimation { from: "white" to: "lightgreen" duration: 100 } } } } } Rectangle { id: clearHistory anchors.top: listviewRectangle.bottom anchors.right: parent.right anchors.horizontalCenter: listviewRectangle.horizontalCenter anchors.margins: 20 color: "#ffeead" width: listviewRectangle.width; height: 60 scale: 0.9 radius: 3 Text {…
accepted answer of: http://stackoverflow.com/q/29268152
type: Answer
answers question: http://stackoverflow.com/q/29268152
upvote count: 1
downvote count: 0

http://stackoverflow.com/q/29354661
type: Question
accepted answer: http://stackoverflow.com/a/29354850
tagged with: javascript
has body: I have this problem that I just can't solve. I'm doing a menu and I want to have a cool open/close button so I made a SVG file and made everything pretty. .icon-grid { width: 50px; height: 50px; fill: #000; transition: all 1s ease; } https://jsfiddle.net/mateuszrybin/0n78dg30/ press the button. Problem I'm having that just can't make the fill transition work between black and red. The color just pops. It works for the rotation but not for the fill, anyone have any ideas?
score: 0
has title: Make transition work with SVG and JS
answer count: 1
tagged with: http://stackoverflow.com/tag/svg
has answer: http://stackoverflow.com/a/29354850
has comment: http://stackoverflow.com/comment/46911160
tagged with: css
type: AnsweredQuestion

http://stackoverflow.com/comment/46884855
type: QuestionComment
has text: Change `$(document).ready` to `$(document).on("deviceready")` for Cordova and put it outside of the controller declaration
comment on: http://stackoverflow.com/q/29348034
score: 0
type: Comment

http://stackoverflow.com/a/41729377
type: Answer
has body: I had a similar issue. I was retrieving the events from server using ajax.The unexpected response recieved, when passed to callback causes the issue. The response needs to be properly handled and the callback should be called only if the response is of appropriate format.
answers question: http://stackoverflow.com/q/29315875
score: 0

http://stackoverflow.com/comment/46855191
score: 0
type: QuestionComment
type: Comment
has text: @1sand0s I thought the question was clear enough given the OP isn't a native english speaker, stop worrying about the points and think of your time spent helping the OP as time getting him closer to his goal. SO points are secondary to that.
comment on: http://stackoverflow.com/q/29330572

http://stackoverflow.com/comment/46665500
score: 0
type: QuestionComment
type: Comment
has text: Sorry, but I don't understand what mean with this link.
comment on: http://stackoverflow.com/q/29229338

http://stackoverflow.com/comment/47308231
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/29258036
has text: thank you very much. I figured it out. thanks

http://stackoverflow.com/comment/46788451
has text: Sorry, but there are too many unclear elements in your question. You're talking about paging of data, then you're talking about fixed positions. You need to edit your questions and be very specific about your requirements, and what you've already tried to solve it yourself
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29296476
score: 1

http://stackoverflow.com/a/29319998
score: 0
has body: if you would like to have it just in javascript, you can try something like this: var iconsArray = ['fa-search','fa-toggle-up','fa-link']; var iconsArrayLength = iconsArray.length; // loop through array for (var i = 0; i &lt; iconsArrayLength; i++) { /* nav item selector */ var navItem = document.querySelectorAll("#nav li a")[i]; /* creates &lt;i&gt; icon element */ var icon = document.createElement("i"); /* gives classes .fa and .fa-* to the icon element */ icon.className = "fa " + iconsArray[i]; /* add icon to the item in navigation */ navItem.appendChild(icon); // result console.log('&lt;i class="fa' + ' ' + iconsArray[i] + '"&gt;&lt;/i&gt;'); }
type: Answer
answers question: http://stackoverflow.com/q/29319682

http://stackoverflow.com/a/29342123
has body: This is caused by the rendering of the svg and this is browser dependent. The lines are positioned on points that are not directly on pixels (they are float and not int). Additionally the width of the lines is set to .5px. These two facts cause the effect of missing lines on odd conditions. A simple fix is to just increase the widths of the lines to 1px. Another fix would be to set the shape-rendering of the ticks to maybe geometricPrecision. See https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/shape-rendering
score: 6
accepted answer of: http://stackoverflow.com/q/29340190
answers question: http://stackoverflow.com/q/29340190
upvote count: 6
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46872632
type: Answer
downvote count: 0

http://stackoverflow.com/comment/46817691
has text: Oh so I could use `change` to capture the data and use `input` to validate the data to provide instant feedback if value is invalid
comment on: http://stackoverflow.com/q/29311918
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/49575222
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29539105
has text: Yes, you are right, use this code instead sorry: ` ` this will generate a 1x1 transparent pixel that doesn't send any extra request to the server. You can see that solution from here: http://stackoverflow.com/questions/5775469/whats-the-valid-way-to-include-an-image-with-no-src/28077004#28077004
type: AnswerComment

http://stackoverflow.com/comment/46741277
has text: DOM apis applies to both xml as well as html. So you can use `setAttribute` and `getAttribute` in both. When your generating the form use `setAttribute` to define the holdout
comment on: http://stackoverflow.com/a/29269904
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/46881294
type: Comment
comment on: http://stackoverflow.com/a/29347580
has text: So what do you suggest instead of using: angular.module('dashboard', ['fsm']) ??
type: AnswerComment
score: 0

http://stackoverflow.com/q/29275496
has comment: http://stackoverflow.com/comment/46750664
type: Question
score: 0
has comment: http://stackoverflow.com/comment/46841692
tagged with: javascript
tagged with: jquery
has body: With help from this site (thanks Musa!), I've managed to get some code that allows the user to capture an image and places that in local storage. I'm using the code in an iAd Producer widget embedded in an iBook. Because I want to use the widget in a few locations in the book, I need to uniquely key each image stored. When I attempt this however, I run into problems which I can't explain. Here's the code: Insert image and uniqueID = "FC-p1"; //this will vary each time the code is used $(document).ready(function () { $("#getPic").on("change", gotPic); if (localStorage['url' + uniqueID]){ $("#image").attr("src", localStorage['url' + uniqueID]); $("#picButt span").text("Change image"); } }); function gotPic(event) { var reader = new FileReader(); reader.onload = function(){ $("#image").attr("src", this.result); localStorage['url' + uniqueID] = this.result; $("#picButt span").text("Change image"); }; reader.readAsDataURL(event.target.files[0]); } here's a fiddle that works just fine on the web: https://jsfiddle.net/mikawaben/g02hcr95/2/ However, when I embed this into the ebook on the iPad I notice that when the page reloads I have strange behaviour. If an image is captured from the camera, this is replaced by the last image selected from the Camera Roll rather than the last image taken with the camera. I can't seem to find any consistency to this. Sometimes the image is replaced, sometimes the camera captured image remains. Any ideas?
has comment: http://stackoverflow.com/comment/46915113
has comment: http://stackoverflow.com/comment/46904608
has comment: http://stackoverflow.com/comment/46961464
has comment: http://stackoverflow.com/comment/46944074
has comment: http://stackoverflow.com/comment/46874642
answer count: 0
type: UnansweredQuestion
tagged with: local-storage
has title: image capture to localStorage not retrieving image consistently
tagged with: image

http://stackoverflow.com/q/29243000
favorite count: 0
has answer: http://stackoverflow.com/a/29243110
type: UnansweredQuestion
has body: I am trying to convert a comma separated list into a list. HTML apple,banana,melon JS $('.fruit').each(function(){ var txt = $(this).text(); $(this).html(txt.replace(/,/g,' ')); }).wrapInner(' '); I expected... apple banana melon But, the result is... apple banana melon Why the first comma, between "apple" and "banana", is replaced with only ' ', and the missing ' ' moves to the last, behind "melon"? Or, should I use other methods like split() & join() to get a right result?
has title: How do I convert a comma separated list into a list in JavaScript?
has answer: http://stackoverflow.com/a/29243181
score: 1
upvote count: 1
type: Question
tagged with: javascript
answer count: 6
has answer: http://stackoverflow.com/a/29243097
has answer: http://stackoverflow.com/a/29243056
has answer: http://stackoverflow.com/a/29243153
has answer: http://stackoverflow.com/a/29243093
downvote count: 0
tagged with: jquery

http://stackoverflow.com/q/29219642
has body: This is a related question to How to hide code from cells in ipython notebook visualized with nbviewer? While having an interactive toggle on one notebook works very well, I'd like all notebooks to hide all code cells upon launching the notebook server. To that end, I was thinking of adding the js script that contains div.input.hide() to custom.js. But this didn't seem to work for me.
score: 0
has answer: http://stackoverflow.com/a/29222883
tagged with: startup
type: Question
tagged with: javascript
answer count: 2
has title: Hide input cells by default in ipython notebook
linked to: http://stackoverflow.com/q/27934885
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29220226

http://stackoverflow.com/q/29275362
upvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/29276444
score: 1
tagged with: forms
has title: how to copy contents from one textbox in one form to another textbox in another form through JS
downvote count: 0
answer count: 1
tagged with: javascript
tagged with: copy
favorite count: 0
has comment: http://stackoverflow.com/comment/46749755
has comment: http://stackoverflow.com/comment/46749727
tagged with: http://stackoverflow.com/tag/html
has body: Insert Insert How can I get the script to work when the two elements are in separate forms? The script works when none of them are in forms. I've never learned JS before so I may not understand very well when someone explains a bunch of jargon. Sorry but I'll try my best!
tagged with: text
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46749987
has answer: http://stackoverflow.com/a/29276444

http://stackoverflow.com/a/29249838
upvote count: 1
answers question: http://stackoverflow.com/q/29249593
downvote count: 0
type: Answer
score: 1
has body: You can only get the GET parameters using JavaScript. If JavaScript was able to access post variables, it would create security risks. This is how you would get the GET parameters using JS. var $_GET = {}, args = location.search.substr(1).split(/&amp;/); for (var i=0; i&lt;args.length; ++i) { var tmp = args[i].split(/=/); if (tmp[0] != "") { $_GET[decodeURIComponent(tmp[0])] = decodeURIComponent(tmp.slice(1).join("").replace("+", " ")); } }
has comment: http://stackoverflow.com/comment/46711230

http://stackoverflow.com/q/29241838
has answer: http://stackoverflow.com/a/29242405
has answer: http://stackoverflow.com/a/29242437
type: Question
tagged with: javascript
has title: Updating a different model using radio buttons with angular
score: 0
possible better answer: http://stackoverflow.com/a/29242405
answer count: 3
has body: I know this is probably very easy! I have two radio buttons that ng-show a div with an input field if the 'site' radio button has been selected. The text input field is set to a ng-model called 'sitePostcode'. What I am trying to achieve is that if the 'solution' radio button is selected then 'sitePostcode' model will have 'solution' in it. And if the 'site' radio button is selected, then 'sitePostcode' will contain what ever was entered into the input box. &lt;div&gt; &lt;input type="radio" ng-model="product.group" value="Solution"&gt;Solution &lt;input type="radio" ng-model="product.group" value="Site"&gt;Site &lt;/div&gt; &lt;div ng-show="product.group == 'Site'"&gt; &lt;input type="text" placeholder="Enter site postcode" ng-model="sitePostcode" class="form-control"&gt; &lt;/div&gt; I thought that the radio buttons should also be 'sitePostcode' model, but when I tried that and entered text into the input field the div would dissapear as the model value changes from 'site'. Cheers
has answer: http://stackoverflow.com/a/29242453
accepted answer: http://stackoverflow.com/a/29242453
tagged with: angularjs
type: AnsweredQuestion

http://stackoverflow.com/a/29278618
has body: Couldn't you do something like: var newArray = [ { "Employees": arr1, "Departments": arr2 } ]
has comment: http://stackoverflow.com/comment/46755208
has comment: http://stackoverflow.com/comment/46757688
has comment: http://stackoverflow.com/comment/46755266
has comment: http://stackoverflow.com/comment/46755146
has comment: http://stackoverflow.com/comment/46755252
downvote count: 0
has comment: http://stackoverflow.com/comment/46755360
answers question: http://stackoverflow.com/q/29278503
has comment: http://stackoverflow.com/comment/46755310
upvote count: 2
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/46755291

http://stackoverflow.com/a/29238627
has comment: http://stackoverflow.com/comment/46685332
type: Answer
answers question: http://stackoverflow.com/q/29238352
score: 0
has body: These clicks are binded to the elements only once, so they will not be there when you change the class. Instead, bind the click event to the 'block' class. You might also want to write this a bit more efficiently with switches or if/else. $(document).ready(function(){ $('.block').click(function(){ if($(this).hasClass('blue')) { $(this).addClass('green').removeClass('blue'); } else if($(this).hasClass('green')) { $(this).addClass('yellow').removeClass('green'); } else if($(this).hasClass('yellow')) { $(this).addClass('red').removeClass('yellow'); } else if($(this).hasClass('red')) { $(this).addClass('blue').removeClass('red'); } $('.block').click(function(){ console.log("Block has been clicked"); }); }); }); You can view it working here: http://codepen.io/anon/pen/pvGPyx

http://stackoverflow.com/a/29317615
score: 0
has body: Because functions are first-class citiziens in Javascript (meaning functions can be stored in variables). passing a function as an argument will return a reference to the function definition rather than the function call you're trying to invoke. It does however evaluate your console.log beforehand and passes it on as a variable and since your log's function call doesn't return anything it passes undefined to your callback function. function test( logFunction ){ logFunction( 'test' ) } test( alert ) Is an example of this behaviour. It's also the reason closures like the one demonstrated by Remy J work. function callback(num, func) { for(var i = 0; i &lt; num; i++) { func( "Hello" ); } } callback(4, alert); This would work.
type: Answer
answers question: http://stackoverflow.com/q/29317045

http://stackoverflow.com/q/29257759
answer count: 1
favorite count: 0
type: UnansweredQuestion
downvote count: 2
has comment: http://stackoverflow.com/comment/46718169
has comment: http://stackoverflow.com/comment/46719726
upvote count: 0
has comment: http://stackoverflow.com/comment/46718419
has body: I created a .js file in my website and I'm running some function to save the scrollTop value of ul. I have another function that's being called with setInterval, to restore the scrollTop value if it jumped back to 0 (Because I use an ajax method; it gets updated every 5 seconds and jumps to the top). The problem is that chatScroll, which is a global variable in the .js file, gets reset after the ajax method has been called. These are my Javascript functions: var chatScroll = 0, chattimer = false; function UpdateChatScroll(chat) { if (chat.scrollTop != 0 &amp;&amp; chat.scrollTop != chatScroll) { //window.alert(chat.scrollTop); chatScroll = chat.scrollTop; if (!chattimer) { chattimer = true; setInterval(function () { RestoreChatScroll(chat); }, 10000); } } } function RestoreChatScroll(chat) { //window.alert(chatScroll); if (chat.scrollTop == 0) { window.alert("Should update.."); chat.scrollTop = chatScroll; } } Am I doing something wrong? Is this fixable?
type: Question
score: -2
has answer: http://stackoverflow.com/a/29259299
has title: Javascript setInterval not working properly
tagged with: javascript

http://stackoverflow.com/q/29333416
has comment: http://stackoverflow.com/comment/46856003
has comment: http://stackoverflow.com/comment/46856784
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29333941
accepted answer: http://stackoverflow.com/a/29333941
has answer: http://stackoverflow.com/a/29333568
has comment: http://stackoverflow.com/comment/46856320
type: Question
has title: Verifying text box content
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46855703
score: 0
has body: I have this javascript function: function checkTextField(field) { if (field.value == '') { log("Field is empty"); } else { log( 'You: ' + field.val); log( 'You2: ' + field.val); send(field.val); $('#message').val(''); } } And this html text box and button: Send Any Ideas why it's not checking properly if the box is empty? It always gives the if's output, never the else's one.
answer count: 3
possible better answer: http://stackoverflow.com/a/29333568
tagged with: http://stackoverflow.com/tag/html
tagged with: button
tagged with: textbox
has answer: http://stackoverflow.com/a/29334141
has comment: http://stackoverflow.com/comment/46856060

http://stackoverflow.com/q/29233306
has answer: http://stackoverflow.com/a/29234684
has title: Selectable rows in a table generated with php
has comment: http://stackoverflow.com/comment/46675279
type: Question
has comment: http://stackoverflow.com/comment/46672863
has comment: http://stackoverflow.com/comment/46674546
has comment: http://stackoverflow.com/comment/46672773
has comment: http://stackoverflow.com/comment/46675523
has comment: http://stackoverflow.com/comment/46674839
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/46672741
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/46672834
has comment: http://stackoverflow.com/comment/46672635
has comment: http://stackoverflow.com/comment/46672796
has comment: http://stackoverflow.com/comment/46672914
accepted answer: http://stackoverflow.com/a/29234684
has body: I've already searched the site for answers, but I couldn't adapt the code provided for other people to mine. I have a table generated by PHP using mysql queries, I'd like to make the rows selectable (the whole rows only, and no multi-selection) and extract the value of "CodPezzi" from the selected row for further usage: This is my table Codice Tipologia Costruttore Macchinario Quantità <?php $result=$ SSide->query($sql); while($row = mysqli_fetch_assoc($result)) { echo " I don't want to have the header selectable. Can you provide me a slim code that allows me to do what I want to do? Edit This is what I tried before coming here: Codice Tipologia Costruttore Macchinario Quantità <?php $result = $SSide->query($sql); while($row = mysqli_fetch_assoc ($result)){ echo " and also Codice Tipologia Costruttore Macchinario Quantità <?php $result=$ SSide->query($sql); while($row = mysqli_fetch_assoc ($result)){ echo " ".$row['CodPezzi']." ". " ".$row['Tipologia']." ". " ".$row['Macchinario']." ". " ".$row['Costruttore']." ". " ".$row['sum(Quantita)']." "; }?> The rows become highlightable on mouse over, but not selectable.
linked to: http://stackoverflow.com/q/103489
tagged with: php
has comment: http://stackoverflow.com/comment/46672661
type: AnsweredQuestion

http://stackoverflow.com/a/29339318
downvote count: 0
type: Answer
has body: From angular 1.3 onwards, you must specify a name for ng-app attribute for it to work. &lt;html lang="en" ng-app="myApp"&gt; IN your JS: angular.module("myApp",[]) This will make the angular to bootstrap. But for the current situation, as you are loading angular at the bottom of the page, it's taking time to load. So the css required for the ng-cloak is not available yet. Either move the js to the tag or load the specific CSS code to your CSS to make it work. [ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak { display: none !important; }
upvote count: 3
score: 3
answers question: http://stackoverflow.com/q/29339293

http://stackoverflow.com/a/29320830
downvote count: 0
has comment: http://stackoverflow.com/comment/46834612
has comment: http://stackoverflow.com/comment/46834993
has comment: http://stackoverflow.com/comment/46834493
score: 2
has comment: http://stackoverflow.com/comment/46849218
type: AcceptedAnswer
upvote count: 2
has comment: http://stackoverflow.com/comment/46834684
has comment: http://stackoverflow.com/comment/46834762
type: Answer
accepted answer of: http://stackoverflow.com/q/29272754
has body: This script seems to work (it uses this package): var _ = require('lodash'); var fs = require('fs'); var twitterText = require('twitter-text'); // 1.11.0 (latest) jsStringEscape = require('js-string-escape'); var content = [ '/**', ' * @preserve https://github.com/twitter/twitter-text-js', ' */', 'var regexps = { };' ]; _.forEach({ url: 'extractUrl', // &lt;- this regexp is the problem hash: 'validHashtag', mention: 'validMentionOrList' }, function(twitterTextRegexpName, regexpName) { var regexp = twitterText.regexen[twitterTextRegexpName]; if (undefined === regexp) { throw new Error('Failed to find regexp ' + twitterTextRegexpName); } var regexpStr = jsStringEscape(regexp.toString()); var regexpRegexp = /\/(.*)\/([^\/]*)/; // :) var result = regexpStr.match(regexpRegexp); var regexpBody = result[1]; var regexpModifiers = result[2]; content.push( 'regexps.' + regexpName + ' = new RegExp("' + regexpBody + '","' + regexpModifiers + '");' ); } ); content.push('module.exports = regexps;'); fs.writeFile("./out.js", content.join('\n'), {}); Output: node &gt; var r = require("./out.js"); undefined &gt; "www.google.com".match(r.url) [ 'www.google.com' ] &gt; "something".match(r.url) null The resulting regexp for urls passes these tests from the original package: Test for invalid characters in url (The result should be null): var r = require("./out.js"); var invalidChars = ['\u202A', '\u202B', '\u202C', '\u202D', '\u202E']; for (var i = 0; i &lt; invalidChars.length; i++) { console.log(("http://twitt" + invalidChars[i] + "er.com").match(r.url)); } // Result: // null // null // null // null // null Extract url test &gt; var r = require("./out.js"); &gt; var message_with_hyphenated_url = "Message with hyphenated-url.com"; undefined &gt; var message_with_www_hyphenated_url = "Message with www.123-hyphenated-url.com"; undefined &gt; message_with_hyphenated_url.match(r.url) [ ' hyphenated-url.com' ] &gt; message_with_www_hyphenated_url.match(r.url) [ ' www.123-hyphenated-url.com'…
answers question: http://stackoverflow.com/q/29272754
has comment: http://stackoverflow.com/comment/46834724
has comment: http://stackoverflow.com/comment/46834814

http://stackoverflow.com/q/29288370
tagged with: javascript
has body: I am looking to create a stock chart. I have been trying to use the example from http://bl.ocks.org/mbostock/3884955 but I'm having trouble parsing the format of the json file that my python dataframe outputs: Here is an example of the json: var dataset = [{"1412121600000":{"Long":100.0,"Short":100.0,"Combined":100.0}, "1412208000000":{"Long":100.7259540416,"Short":99.9845645596,"Combined":100.7105186013}, "1412294400000":{"Long":100.4436402904,"Short":98.8837985253,"Combined":99.3194897889}, "1412553600000":{"Long":100.4436402904,"Short":98.9995341224,"Combined":99.4357353278}, "1412640000000":{"Long":99.5664445414,"Short":100.5277244418,"Combined":100.1022654968}, "1412726400000":{"Long":101.6333965937,"Short":98.7695530192,"Combined":100.4296105442}, "1412812800000":{"Long":101.8552090464,"Short":100.7284660335,"Combined":102.6406329748}, "1412899200000":{"Long":101.5628181559,"Short":101.8782213959,"Combined":103.5175690128}, "1413158400000":{"Long":100.6352059402,"Short":103.5518262499,"Combined":104.27263855}, "1413244800000":{"Long":99.5664445414,"Short":103.3915337819,"Combined":103.0038388108}, "1413331200000":{"Long":98.3464414352,"Short":104.0910952724,"Combined":102.4386550712}}]; I need to format the key of the dictionary as the date and access the node with the data but not sure how to. I've been trying variations from the example but it doesn't seem to work: d3.json(dataset, function(error, data) { data.forEach(function(d) { ?? });
score: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/29289875
tagged with: d3.js
has answer: http://stackoverflow.com/a/29289875
has title: D3 Parse and Display JSON (from Python Dataframe)
type: Question
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json

http://stackoverflow.com/comment/54557026
comment on: http://stackoverflow.com/q/29334775
score: 0
type: Comment
type: QuestionComment
has text: Take a look at my code at https://stackoverflow.com/questions/33369389/how-can-i-use-es2016-es7-async-await-in-my-acceptance-tests-for-a-koa-js-app maybe it can help you a bit?

http://stackoverflow.com/q/29271654
has comment: http://stackoverflow.com/comment/46749272
type: Question
has answer: http://stackoverflow.com/a/29292190
has title: D3: Transition between polygons
has comment: http://stackoverflow.com/comment/46774866
has comment: http://stackoverflow.com/comment/46753569
tagged with: javascript
has comment: http://stackoverflow.com/comment/46753654
answer count: 1
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46774152
has body: Here is a D3 project I am working on. It updates a shape of a regular polygon from n to either n-1 or n+1 angles. Pressing the buttons a,b,c,d or e will trigger this. I followed the tutorial on general update patterns and have tried to follow patterns in many other samples I have found, most notably bl.ocks.org/mbostock/3081153. Here is the drawing function function draw(data) { var v = vis.selectAll("polygon") .data(data, function(d) { return d; }); // enter selection v.enter().append("polygon"); // update selection v.attr("class", "update") .transition() .duration(750) .attr("points",function(d) { return d.map(function(d) { return [d.x,d.y].join(","); }).join(" ");}) .attr("stroke","black") .attr("stroke-width",2); // exit selection v.exit().attr("class", "exit") .transition() .duration(750).remove(); }; And the updating function function update() { if (this.classList.contains('on')) { d3.select(this).classed('on',false) letters.pop(this.id); } else { d3.select(this).classed('on',true) letters.push(this.id); } var N = letters.length; draw([poly(N,N,[])]); }; My question is how and where to call an interpolation to make this go smoothly from one polygon to the next? Thanks
tagged with: d3.js
score: 0

http://stackoverflow.com/q/29261984
has title: asp net c# DateTime convert o javascript date
tagged with: javascript
score: -1
has answer: http://stackoverflow.com/a/29262128
has comment: http://stackoverflow.com/comment/46726097
has answer: http://stackoverflow.com/a/29263907
tagged with: asp.net
favorite count: 0
has comment: http://stackoverflow.com/comment/46726080
type: UnansweredQuestion
tagged with: datetime
downvote count: 1
tagged with: date
type: Question
tagged with: c#
answer count: 2
has body: Hi I am having trouble converting a asp net DateTime to a javascript Date(). Usually when we get dates from asp net it is of the format "/Date(1427101769000)/" This Date in asp net is "{3/23/2015 9:09:29 AM}" So in this case I would parse the string for the millis and then use the javascript Date constructor with the millis like: var curDate = new Date(1427101769000); However this value becomes Mon Mar 23 2015 02:09:29 GMT-0700 (Pacific Daylight Time). When it was supposed to be {3/23/2015 9:09:29 AM} from the server. Any help would be appreciated. Thank you!
upvote count: 0

http://stackoverflow.com/comment/46723991
type: AnswerComment
comment on: http://stackoverflow.com/a/29243863
score: 0
type: Comment
has text: Sorry, I thought that answer was implicit. I'll update my response once more. ;)

http://stackoverflow.com/a/29372021
has comment: http://stackoverflow.com/comment/46925167
answers question: http://stackoverflow.com/q/29370481
has comment: http://stackoverflow.com/comment/46925344
has comment: http://stackoverflow.com/comment/46925244
has comment: http://stackoverflow.com/comment/46934754
has body: Let's see if I got you. What you want is to, when the user click on submit, he opens at the same page, the display.php file without redirecting, to add new info, and then return to the send.php page? Well, the way I see it, you can do it with some javascript and CSS. Here is my solution (I mean, the way would do it). What you will need is to have a new (or other tag) with an inside of it, some JavaScript functions (they run at client side, not server side), and some CSS. lets show ya how your display.php file should looks like: Notice that I wrote the target of the form equals the name of the iframe, so it will always submit to the iframe. And, into the form it will make a javascript call when submitting. Also, I've added a class at the new div to hide the content with CSS. The CSS would looks like: body, html{ /*to fix the page css*/ margin: 0; padding: 0; width: 100%; height: 100%; } #mydiv{ /*this is how it should work*/ position: fixed; width: 100%; height: 100%; z-index: 1000; /*the position of the div relatively to other elements, to be always in front of them*/ background-color: rgba(0,0,0,0.3); /*this will add an artistic background effect when loading the submit*/ } .hide{ /*this class hide the element*/ display: none; } And then your JavaScript: function load() { var div = document.getElementById("mydiv"); div.className = ""; } function finish() //this will be called later, don't forget to give it parameters { var div = document.getElementById("mydiv"); div.className = "hide"; //do what you need to show the final result here } now, at your send.php file, I believe you will have a form there, so you make a similar call at it. it should looks like: --your form contents-- and it should have a new javascript function, like: function submitForm() { parent.finish(); //this will call the iframe's parent function, don't forget to give it parameters and something to do. return false; //this will stop the submit and the 'refresh page' } and, then, you have your stuf…
has comment: http://stackoverflow.com/comment/46934703
has comment: http://stackoverflow.com/comment/46924946
has comment: http://stackoverflow.com/comment/46925533
score: 0
has comment: http://stackoverflow.com/comment/46924911
has comment: http://stackoverflow.com/comment/46925419
has comment: http://stackoverflow.com/comment/46925391
type: Answer
has comment: http://stackoverflow.com/comment/46925277

ads
tags question: http://stackoverflow.com/q/29337304
tag name: ads
type: Tag

http://stackoverflow.com/q/29353177
has comment: http://stackoverflow.com/comment/46891702
accepted answer: http://stackoverflow.com/a/29353344
downvote count: 0
answer count: 1
tagged with: ecmascript-5
has title: What is `base value` of `reference` in ECMAScript(ECMA-262 5.1)?
favorite count: 0
has comment: http://stackoverflow.com/comment/46995967
has body: I've been trying to understand how this value is set in javascript, and found ECMAScript Language Specification pretty much helpful. I was reading section 8.7 reference specification type and found that reference in ECMAScript is made of 3 component, base value, referenced name, strict reference flagto understand section 11.2.3. I can assume what are referenced name and strict reference flag from their name, but i don't understand what is the base value. The document says that base value is either undefined, String, Boolean, Number and Object, but it does not say how it is set and what it is. I am guessing it is something similar to context object. Could anyone explain?
score: 11
upvote count: 11
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/29155472
has answer: http://stackoverflow.com/a/29353344
type: Question
has comment: http://stackoverflow.com/comment/46892258
tagged with: javascript
linked to: http://stackoverflow.com/q/13124417

http://stackoverflow.com/a/29220992
has comment: http://stackoverflow.com/comment/46651514
has body: This should work: data-description="&lt;?php if (isset($_POST['plan'])) echo htmlspecialchars($_POST['plan']); ?&gt;" Note that there is no ; after if (isset($_POST['plan'])). If you do put a semicolon there, PHP interprets that semicolon as the (empty) statement that the if is supposed to conditionally execute. If you're feeling confused about the semicolons, another, perhaps safer way of writing that would be: data-description="&lt;?php if (isset($_POST['plan'])) { echo htmlspecialchars($_POST['plan']); } ?&gt;" Here, you can include as many statements as you want (separated by semicolons) between the curly braces, and they will all be executed only if $_POST['plan'] is set. Make sure there's still no semicolon between the if condition and the {, though! Also, note the htmlspecialchars(). Without it, your code is wide open to cross-site scripting (XSS) attacks, by an attacker passing in a parameter like plan="&gt;&lt;script&gt;alert("XSS");//. Any time you embed a string (that isn't meant to be parsed as HTML code) in your HTML output, you should always escape it with htmlspecialchars(). Preferably, do this even if you're sure that the string cannot contain any characters that could be parsed as HTML markup; it's just a good habit, and may save your code from breaking if you ever decide to change the string later.
has comment: http://stackoverflow.com/comment/46651602
has comment: http://stackoverflow.com/comment/46652002
score: 0
has comment: http://stackoverflow.com/comment/46652134
type: Answer
answers question: http://stackoverflow.com/q/29220320

http://stackoverflow.com/comment/46757293
type: Comment
score: 0
type: AnswerComment
has text: See this [JSFiddle](http://jsfiddle.net/gyrocode/cbx0Lpnb/) for an example. Consider removing resources pointing to `/static/report/js/DataTables-1.10.5`, they are not needed.
comment on: http://stackoverflow.com/a/29261990

http://stackoverflow.com/comment/47376816
has text: I have attempted this, but it does not function fully while hovering off the link.
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/29268589
score: 0

http://stackoverflow.com/comment/94985920
has text: I've implemented the same approach for [PanWriter](https://panwriter.com). Hopefully a bit more understandable and more commented. See [below](https://stackoverflow.com/a/54076421/214446)
type: Comment
comment on: http://stackoverflow.com/a/29255919
score: 0
type: AnswerComment

http://stackoverflow.com/q/29311884
has comment: http://stackoverflow.com/comment/46830211
has answer: http://stackoverflow.com/a/29354061
score: 2
tagged with: cordova
upvote count: 2
has comment: http://stackoverflow.com/comment/46817382
linked to: http://stackoverflow.com/q/3625640
type: Question
type: AnsweredQuestion
has title: Download file in jQuery mobile project
accepted answer: http://stackoverflow.com/a/29354061
has comment: http://stackoverflow.com/comment/46836894
has body: Just started to teach myself javascript and jQuery mobile to create cross platform apps. I want to be able to click on links in my app to download a PDF file from a document that is synchronized (overwrites) with the local (on the phone) version of the file. From this, I found out I should use data-ajax="false", so here is my first attempt: Download Unfortunately, nothing happens when I click the link after I have built and transferred it to my phone. It works fine in web browser, but not in Phonegap app. Any ideas what could be wrong? And how can I do this in a better way, to achieve exactly what I intend to make it do? If the file is already downloaded, I want the link to say "Open" instead, and have a link to the local version of the file.
has comment: http://stackoverflow.com/comment/46817523
has comment: http://stackoverflow.com/comment/46817418
has comment: http://stackoverflow.com/comment/46817355
downvote count: 0
tagged with: jquery-mobile
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46840175
favorite count: 0
has comment: http://stackoverflow.com/comment/46817438
linked to: http://stackoverflow.com/q/13794248
has comment: http://stackoverflow.com/comment/46876814

http://stackoverflow.com/comment/46657507
has text: now it automatically redirect to login page with out any action ?
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/29224630
type: Comment

http://stackoverflow.com/q/29234247
favorite count: 0
tagged with: ember.js
has answer: http://stackoverflow.com/a/29235164
type: UnansweredQuestion
score: 1
upvote count: 1
tagged with: ember-data
has title: Ember.js - get the model data of a DOM element
type: Question
answer count: 1
downvote count: 0
tagged with: javascript
has body: I have a DOM element and want to get the data model that it is bound to. This has to be done outside of any ember controller / component. All I have to work with is the DOM element and the global Ember variable (because this piece of code runs from an externally loaded script file). How can this be done?

http://stackoverflow.com/a/29334690
type: AcceptedAnswer
downvote count: 0
has body: Use a regex. This will do what you want: String input = "window.open('http://saudisale.com/arPrivatePage.aspx?id=21871638','_blank','channelmode =1,scrollbars=1,status=0,titlebar=0,toolbar=0,resizable=1');"; String regex = "window.open\\(['\"]*(.*?)(\\s*['\"]*,.*?)"; Pattern pattern = Pattern.compile(regex); Matcher matcher = pattern.matcher(input); while (matcher.find()) { String output = (matcher.group().replaceAll(regex, "$1")); System.out.println(output); } Your last two URLs are relative, so you have to convert them to absolute URLs as described here.
has comment: http://stackoverflow.com/comment/46872534
type: Answer
upvote count: 3
score: 3
has comment: http://stackoverflow.com/comment/46872096
accepted answer of: http://stackoverflow.com/q/29326901
answers question: http://stackoverflow.com/q/29326901

http://stackoverflow.com/q/29367377
has title: Javascript function parameter in curling braces
type: Question
has comment: http://stackoverflow.com/comment/46917067
has answer: http://stackoverflow.com/a/29367409
score: 0
answer count: 1
tagged with: javascript
has body: What is the difference in parameter processing between these 2 startTimer() function calls? &lt;img src="/static/loading.gif" onload="startTimer('&lt;timer_value&gt;');" /&gt; and &lt;img src="/static/loading.gif" onload="startTimer('{{ timer }}');" /&gt;
accepted answer: http://stackoverflow.com/a/29367409
type: AnsweredQuestion

http://stackoverflow.com/comment/46803150
type: AnswerComment
has text: This works. For a bonus, how could I put a ` ` in the div too, before the ` ` that says "There were some errors" ?
comment on: http://stackoverflow.com/a/29304210
type: Comment
score: 0

http://stackoverflow.com/comment/46920903
has text: My Bad, I had a typo in there. it works fine now. thanks ever so much.
comment on: http://stackoverflow.com/a/29369661
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/46898160
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29355967
has text: Use $rootScope.$on('$stateChangeStart', function(event, toState, toParams, fromState, fromParams){ ... }) in your controller's function to intercept state transition. https://github.com/angular-ui/ui-router/wiki#state-change-events
score: 0

http://stackoverflow.com/comment/46827661
type: Comment
type: QuestionComment
score: 1
has text: Well `.call()` passes the selection as an argument to the function, so you could use that as well.
comment on: http://stackoverflow.com/q/29305824

http://stackoverflow.com/q/29320110
type: AnsweredQuestion
has title: Jquery mobile 1.4.5 set panel height possible?
score: 1
possible better answer: http://stackoverflow.com/a/29687682
accepted answer: http://stackoverflow.com/a/29326423
has answer: http://stackoverflow.com/a/29687682
type: Question
has answer: http://stackoverflow.com/a/38260416
has body: I am making a jqm project mobile only. I have two panels one set to push the other is overlay. One is in the left corner and the other is top right corner. My question is it possible to set the right panel to 100% width (which I've done) and set the height to 10-20% (40px-50px). Can this be done without breaking any functionality? Can it be done in Css? I'm able to set width but unable to set height. Thanks in advance!!
downvote count: 0
tagged with: jquery-mobile
tagged with: javascript
tagged with: jquery
favorite count: 0
answer count: 3
tagged with: css
has answer: http://stackoverflow.com/a/29326423
tagged with: panel
upvote count: 1

http://stackoverflow.com/comment/64866275
type: Comment
comment on: http://stackoverflow.com/a/29292309
score: 0
type: AnswerComment
has text: +1, I just stumbled upon this problem when using a primefaces poll with onerror in combination with submitting forms. I could not believe the error text "Uncaught exception: out of memory", but your post clearly explains the problem, thanks a lot!

http://stackoverflow.com/comment/46838713
comment on: http://stackoverflow.com/q/29322971
score: 0
type: Comment
type: QuestionComment
has text: One is jQuery 2.1.1 the other is jQuery UI 1.11.4

http://stackoverflow.com/comment/46904075
comment on: http://stackoverflow.com/q/29360013
has text: @elclanrs I have read that but I'm having difficulty applying it to my particular case. Still pretty new to Javascript
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46939282
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29345321
has text: That's really helpful. Thank you so much. Its works great with opencart Version 1.5.6.3. Even I applied this with my custom theme that's also works.

http://stackoverflow.com/q/29318583
type: Question
tagged with: internet-explorer
tagged with: javascript
has title: adding google ads to a webpage : access denied
downvote count: 0
has comment: http://stackoverflow.com/comment/46932008
favorite count: 0
has body: I am trying to add google adsence adds to my website. I created a adunit and copied the code to my webpage. when I'm trying to run that page in browser(IE) I am getting following exception "0x80070005 - JavaScript runtime error: Access is denied."
type: UnansweredQuestion
tagged with: adsense
tagged with: http://stackoverflow.com/tag/html
answer count: 0
score: 1
upvote count: 1

http://stackoverflow.com/comment/46733439
score: 0
type: AnswerComment
type: Comment
has text: To add something else how does on find which position those nested arrays were at?
comment on: http://stackoverflow.com/a/29265708

http://stackoverflow.com/q/29237213
score: 2
has title: Youtube player force playlist dropdown to open
type: Question
downvote count: 0
tagged with: javascript
has body: Does any body know, how to force a playlists dropdown to open in an embeded youtube player. I have an iframe with HTML5 youtube video player in it and I load the playlists dynamically. I want the dropdown to open, when playlist is changed. I tried to create a click event inside an iframe, but console says that it is not allowed. I also didn't find any functions in their reference.
favorite count: 0
has comment: http://stackoverflow.com/comment/46680535
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46682057
tagged with: youtube-iframe-api
answer count: 0
upvote count: 2
type: UnansweredQuestion
tagged with: iframe
tagged with: youtube

http://stackoverflow.com/a/29232570
has body: Use an object as a map: // First, fill bMap var bMap = {}; for (var i = 0; i &lt; B.length; ++i) bMap[B[i].idB] = B[i]; // Then, use it var a, b; for (var i = 0; i &lt; A.length; ++i) { a = A[i]; b = bMap[a.idB] if (b) { // Do something here } }
type: Answer
upvote count: 2
answers question: http://stackoverflow.com/q/29230962
score: 2
accepted answer of: http://stackoverflow.com/q/29230962
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/29270595
tagged with: javascript
has title: Embed a Private Google Doc Using an iFrame
has comment: http://stackoverflow.com/comment/46761406
has body: Fellow Stackers, my intention is to embed a private Google Doc into a web page using an iframe, so that its contents only load for users who have been expressly shared on the Google Doc. To do so, I'd like to use a link along these lines (https://docs.google.com/feeds/download/documents/Export?exportFormat=html&amp;format=html&amp;id=[MyGoogleDocID]) to export the Google Doc as .html. Then, god willing, use JavaScript to render the exported .html file inside an iframe. I'm new to JavaScript, but I've been using the following code (graciously recommended by John) to force embedded hyperlinks within an iframe to open in a new window...so the task of loading a downloaded .html file seems within the realm of JavaScript's power: &lt;iframe id="myframe" srcdoc="" style="width: 600px; height: 500px; border: 0" frameborder="0"&gt;&lt;/iframe&gt; &lt;script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt; &lt;script&gt; $(function() { $.get("https://docs.google.com/document/d/[MyGoogleSpreadsheetID]/pub?embedded=true", function(html) { $("#myframe").attr("srcdoc", html); setTimeout(function() { $("#myframe").contents().find('a[href^="http://"]').attr("target", "_blank"); $("#myframe").contents().find('a[href^="https://"]').attr("target", "_blank"); }, 1000); }); }); &lt;/script&gt; As always, any insight would be greatly appreciated!
favorite count: 0
has answer: http://stackoverflow.com/a/29270942
has comment: http://stackoverflow.com/comment/46765910
tagged with: http://stackoverflow.com/tag/html
type: UnansweredQuestion
tagged with: iframe
downvote count: 1
score: 3
linked to: http://stackoverflow.com/q/28343653
tagged with: google-docs
type: Question
upvote count: 4
answer count: 1

http://stackoverflow.com/q/29337258
has comment: http://stackoverflow.com/comment/46862665
type: Question
has title: Javascript cannot use function argument in one command
has body: I have form (in a ColdFusion program -- not that it matters) with two submit buttons (they look quite different from each other) which submits to different programs depending on which button is clicked. The form looks like this: &lt;form name = "pers3aa" action = "" method = "post" onkeypress = "return event.keyCode != 13;" onsubmit = "return subpers3aa('#coltop#');"&gt; Each button calls a Javascript function to set the action -- they look like this: &lt;input type = "Submit" name = "subpers4" class = "submitbut" value = "Submit" onclick = "persaasubmit('person4aa.cfm')" &gt; and &lt;input type = "Submit" id = "delbut" class = "onoffbut" value = "Delete this Value" onclick = "persaasubmit('persdel.cfm')"&gt; The javascript function persaasubmit is: function persaasubmit(target) { document.pers3aa.action = target; }//end function persaasubmit So far, so good -- this works. However, in another program I have a different form "xrefform", which I submit with a similar function: function aasubmit(target) { document.xrefform.action = target; }//end function aasubmit This situation occurs all throughout my system, and the various javascript submit functions are proliferating. So I tried to combine them by sending the form name as an argument: function generalsubmit(formname, target) { document.formname.action = target; }//end function generalsubmit This does not work. I infer that Javascript cannot find a form called "formname" so it doesn't submit anything. I'm thinking there probably is syntax for getting Javascript to submit the formname that was passed to it, but I don't know what that might be. Can anyone help?
tagged with: javascript
has answer: http://stackoverflow.com/a/29337278
score: 0
answer count: 1
type: UnansweredQuestion

http://stackoverflow.com/comment/46769917
comment on: http://stackoverflow.com/a/29274048
score: 0
type: AnswerComment
has text: Thanks for the idea @Pitux; however, there's no impact that I can see. Any other advice?
type: Comment

http://stackoverflow.com/a/29295091
upvote count: 2
score: 2
answers question: http://stackoverflow.com/q/29295045
has body: It happens because you put text without any whitespaces in it, so browser is not sure how to break those long line. You can instruct it with word-wrap property: .dialog-box { /* ... */ word-wrap: break-word; } Demo: http://jsfiddle.net/2y1wj0mm/1/
downvote count: 0
type: Answer

http://stackoverflow.com/comment/46693446
type: AnswerComment
has text: Actually pardon, I think I misunderstood the "# selected" bit. Give me a second to make one more adjustment.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29243624

http://stackoverflow.com/comment/46851306
comment on: http://stackoverflow.com/q/29331006
score: 0
has text: Why not making a seperate array for questions and answers?
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46721521
type: QuestionComment
has text: @Tom: "Simplifying element selection... is pretty dumb". OK... Also, there is never a time for inline styles in anything, but examples (but I would be the OP is using them in his production code). Nothing bold about either statement.
comment on: http://stackoverflow.com/q/29259235
score: 0
type: Comment

http://stackoverflow.com/a/29291915
has body: You also need to clear your urls array. If not, it will just keep growing. Your code is probably working, but when you call Gifs.create you are passing in urls which is growing every 1 minute interval when you push new url's to it. Just do this to clear it out beforehand: if (!error){ var $ = cheerio.load(html); urls = []; // Clear the urls array $('a.title', '#siteTable').each(function(){ var url = $(this).attr('href'); urls.push(url); }); }
score: 1
upvote count: 1
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29291657
accepted answer of: http://stackoverflow.com/q/29291657
type: Answer
downvote count: 0

http://stackoverflow.com/comment/46842013
score: 0
has text: @Makyen, thanks. You're right of course, and I will change it accordingly. However, I still need the bm-panel.xul, to add the element (button). So the question still stands.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29314165

http://stackoverflow.com/a/29281954
score: 3
has body: When you're talking about performance: As your using $(this) in three places in that each callback, its better to store it in a variable. It would avoid some overhead as well. function setAttrs() { $sections.each(function() { var $self = $(this); var offsetTop = $self.offset().top, height = $self.height(); $self.data({"offset": offsetTop, "height": height}); }); } Other things as @Pointy mentioned.
answers question: http://stackoverflow.com/q/29281750
downvote count: 0
type: Answer
upvote count: 3

http://stackoverflow.com/a/29239892
upvote count: 2
has comment: http://stackoverflow.com/comment/46686541
has body: It's needed as none of the elements in the declared array are defined at that point. The loop starts at first element in the array, then goes through each single one to set an initial value to 0 (otherwise it would be undefined which would give you problems later when you try to add a number to it). However, the better option in this case, is to replace this block: var redCount = new Array(256); var greenCount = new Array(256); var blueCount = new Array(256); for (var i = 0; i &lt; 256; i++) { redCount[i] = 0; greenCount[i] = 0; blueCount[i] = 0; } with typed arrays, which do have all their values initialized to 0 as well as being faster than node-based arrays: var redCount = new Uint32Array(256); var greenCount = new Uint32Array(256); var blueCount = new Uint32Array(256);
has comment: http://stackoverflow.com/comment/46686448
has comment: http://stackoverflow.com/comment/46686117
has comment: http://stackoverflow.com/comment/46686069
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46686621
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29239781
has comment: http://stackoverflow.com/comment/46686318
answers question: http://stackoverflow.com/q/29239781
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/46686420
has comment: http://stackoverflow.com/comment/46686155

http://stackoverflow.com/q/29305900
tagged with: ajax
has answer: http://stackoverflow.com/a/29312325
type: AnsweredQuestion
type: Question
accepted answer: http://stackoverflow.com/a/29312325
tagged with: c#
has body: I have a popup for change an address with 3 text box (Address, Province and ZIP) and one DropDownList for the City. Changing the ZIP code it change the province text box with an ajax call, and I want to add later populate city ddl, if I can get it work. The problem is that if I now change the ZIP code, then click outside of it and then click the save button is working good, I've the correct value in the server side function, but if I change the ZIP code and then click directly to the save button I could see the Province text changing correctly in the interface too, but in the btnSave_Click it still have the old value. I've tried to make not async the ajax call, but still nothing.. ASPX: Address <asp:TextBox ID="txtAddress" runat="server"></asp:TextBox> Province <asp:TextBox ID="txtProvince" runat="server"></asp:TextBox> City <asp:DropDownList ID="ddlCity" runat="server"></asp:DropDownList> ZIP Code <asp:TextBox ID="txtZIP" runat="server"></asp:TextBox> <asp:Label id="lblError" runat="server" style="color:Red" Visible="false" /> <asp:ImageButton ID="btnResidenza" ImageUrl="/Images/Button/salva.png" runat="server" OnClick="btnSave_Click" /> jQuery: Web Method: [System.Web.Services.WebMethod] public static string txtZIP_TextChanged(string ZIP) { if ((ZIP.Trim() != "") && (ZIP.Length == 5)) { dcListCityDataContext dc = new dcListCityDataContext(); if (dc.City.Where(c => c.ZIP.Equals(ZIP)).Count() > 0) { string province = dc.City.Where(c => c.ZIP.Equals(CAP)).First().ID_PROVINCE.ToUpper(); if (province != null) { return provincia; } } } return ""; } Server Save Click: protected void btnSave_Click(object sender, ImageClickEventArgs e) { try { string result = null; // HERE IS THE PROBLEM, BECAUSE I HAVE THE WRONG VALUE // IN txtProvince.Text IF I CHANGE THE ZIP CODE AND CLICK // DIRECTLY ON THE SAVE BUTTON Save(txtProvince.Text, ddlCity.SelectedItem.ToString(), txtZip.Text, txtAddress.Text); lblError.Text = ""; } catch (Exception ex) { (...) } }
tagged with: javascript
score: 0
answer count: 1
has title: ASP.NET clicking on button after changing textbox, firing client event and server event
tagged with: jquery
tagged with: asp.net

http://stackoverflow.com/comment/46771658
type: Comment
type: QuestionComment
has text: @toy on the timeline it states it's a ~40Mb page.
comment on: http://stackoverflow.com/q/29287049
score: 0

http://stackoverflow.com/comment/46899364
type: QuestionComment
comment on: http://stackoverflow.com/q/29356358
score: 0
has text: @Bergi, that would only be partially unique. [3, "321"] would get pushed to exactMatches. Basically, if the string portions are in order and userBuilt, then they would get pushed to exactMatches. If not, then they would go to the incorrect array.
type: Comment

http://stackoverflow.com/q/29321259
accepted answer: http://stackoverflow.com/a/29322503
type: Question
answer count: 2
tagged with: canvas
has body: I'm trying to clear the canvas. I tried closing the path, but it didn't change anything. also, I am not too sure if the ctxBg.close(); is on the right place. Thank you. function drawGrid () { drawGrid(); ctxBg.clearRect(0, 0, canvas.width, canvas.height); function drawGrid () { for (var i = 75; i &lt;= canvasWidth-25; i+= 25) { ctxBg.beginPath(); ctxBg.moveTo(-25 + i,55); ctxBg.lineTo(-25 + i, canvasHeight - 55); ctxBg.stroke(); } for (var i = 25; i &lt;= canvasHeight -75; i+= 25) { ctxBg.beginPath(); ctxBg.moveTo(55,25 + i); ctxBg.lineTo(canvasWidth-55, 25 + i); ctxBg.stroke(); }ctxBg.close(); }
tagged with: javascript
favorite count: 0
score: 0
possible better answer: http://stackoverflow.com/a/29321375
tagged with: html5-canvas
has answer: http://stackoverflow.com/a/29322503
has answer: http://stackoverflow.com/a/29321375
has title: Clear canvas JavaScript
upvote count: 1
downvote count: 1
type: AnsweredQuestion

http://stackoverflow.com/comment/46668447
score: 0
has text: value as undefined ?
comment on: http://stackoverflow.com/q/29230917
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29330879
answers question: http://stackoverflow.com/q/29330572
type: Answer
has body: You should use click event on select $('select').on('click',function(){ $(this).attr('size',5) });
score: 0

http://stackoverflow.com/q/29329988
has answer: http://stackoverflow.com/a/32069879
has body: I already use custom binding with knockout for displaying jqueryui dialog, but I would like to use knockout component feature. So, I would like to write something like: &lt;window params="isVisible: isVisible"&gt; //there will be some html &lt;/window&gt; And later somewhere in code: self.isVisible(true); //That would open window //or self.isVisible(false); //That would close window Problem is that I don't know how to apply $(element).dialog. When I register knockout component, I can only get container element of this component, but not injected element. ko.components.register('window', { viewModel: { createViewModel: function(params, componentInfo) { // - 'params' is an object whose key/value pairs are the parameters // passed from the component binding or custom element // - 'componentInfo.element' is the element the component is being // injected into. When createViewModel is called, the template has // already been injected into this element, but isn't yet bound. // - 'componentInfo.templateNodes' is an array containing any DOM // nodes that have been supplied to the component. See below. // Return the desired view model instance, e.g.: return new MyViewModel(params); } }, template: ... }); So, componentInfo.element is parent node, and if I apply dialog with $(componentInfo.element) I will set as dialog parent node, then my window tag would be: &lt;div&gt;&lt;!-- Dialog will be applyed there--&gt; &lt;window params="isVisible: isVisible"&gt; //there will be some html &lt;/window&gt; &lt;/div&gt; I think it will work, but that extra div look unneeded here... Or this is the only way to do job done? What is knockout.components way to do this? Thanks.
tagged with: knockout-components
tagged with: knockout.js
type: Question
tagged with: javascript
has title: Creating dialog with knockoutjs components
score: 0
answer count: 1
type: UnansweredQuestion

http://stackoverflow.com/comment/46895999
has text: I checked for the duplicate and this is a different question. I want to simulate an actual click using a non jquery method
comment on: http://stackoverflow.com/q/29355023
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46811424
score: 0
type: Comment
type: QuestionComment
has text: [An example](http://jsfiddle.net/8fzcLnve/) how you can accidentally remove an event handler from a button using `innerHTML`.
comment on: http://stackoverflow.com/q/29308476

http://stackoverflow.com/q/29273391
has title: What is the difference between source code and DOM?
has comment: http://stackoverflow.com/comment/46746771
has body: In my app I want to process Google Translate definitions, like definition for the word "song" When I check returned http message, it does NOT contain the "short poem" expression. But in DOM tree view in Safari I can see the "short poem" info. This is because after loading page some JavaScript code do some magic? How would you get DOM tree in an iOS app? UIWebView can do such a magic?
type: AnsweredQuestion
score: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/46746810
tagged with: uiwebview
favorite count: 0
type: Question
has comment: http://stackoverflow.com/comment/46746811
tagged with: http://stackoverflow.com/tag/html
upvote count: 3
tagged with: dom
answer count: 1
has answer: http://stackoverflow.com/a/29273675
tagged with: ios
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29273675

http://stackoverflow.com/q/29222000
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/29222164
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46653002
has title: Angular JS promises and ng-repeat
type: Question
score: 0
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/29222164
has comment: http://stackoverflow.com/comment/46653140
has comment: http://stackoverflow.com/comment/46652935
has body: I have 2 questions. What I'm doing is asking for a postcode, getting a latitude and longitude of that postcode using an API and then using that latitude and longitude to get all street level crimes on a particular date near that location using UK police API. The problem is ng-repeat doesn't work and I guess this is because when the page is loaded the $http request is still hasn't received anything back because if I console log it returns undefined and then after that use setTimeout for two seconds it returns what I need. Here's my code: function PostCodeCtrl($scope, Server, $location, $routeParams){ this.postcode = $routeParams.postcode; if(this.postcode){ this.title = "dasdasd"; this.crimes = undefined; Server.get("http://api.postcodes.io/postcodes/" + this.postcode) .then(function(response){ this.response = response.data; if(response.data.status === 200){ Server.get('http://data.police.uk/api/crimes-street/all-crime?lat='+ this.response.result.latitude + '&amp;lng='+ this.response.result.longitude+ '&amp;date=2013-01').then(function(response){ this.crimes = response.data; }); } }); console.log(this.crimes); //returns undefined setTimeout(function(){ console.log(this.crimes); //returns JSON object }, 2000); }else{ $location.path('/'); } } &lt;ul&gt; &lt;li ng-repeat="crime in postcode.crimes"&gt; {{crime.category}} &lt;/li&gt; &lt;/ul&gt; I also don't understand the point of promises, after looking at at least 5 screencasts and presentations on youtube they all say that promises help get rid of the pyramid code aka something like this: (function($) { $(function(){ $("button").click(function(e) { $.get("/test.json", function(data, textStatus, jqXHR) { $(".list").each(function() { $(this).click(function(e) { setTimeout(function() { alert("Hello World!"); }, 1000); }); }); }); }); }); })(jQuery); but I don't see it helping you still have to nest things in thens like in my first example and it still creates the pyramid structure.
has comment: http://stackoverflow.com/comment/46652939

http://stackoverflow.com/a/41765136
answers question: http://stackoverflow.com/q/29354778
score: 0
type: Answer
has body: CSS code: .dx-icon-myicon{background:url(data:image/png;base64,url) no-repeat}

http://stackoverflow.com/q/29333797
tagged with: javascript
linked to: http://stackoverflow.com/q/8204144
tagged with: google-maps
has comment: http://stackoverflow.com/comment/46861426
has comment: http://stackoverflow.com/comment/46863451
downvote count: 0
tagged with: dom-events
favorite count: 0
has body: I'm trying to prevent certain user (mouse) events from firing on an instance of the Google Maps API I'm using on my website. I'm adding event listeners to events on the API instance like so: google.maps.event.addListener(map, 'click', mapClickHandler); Then defining the mapClickHandler event very simply like so: function mapClickHandler (e) { e.preventDefault(); } I have also tried the following variations: function mapClickHandler (e) { e.stopPropagation(); } // or // function mapClickHandler (e) { e.stopImmediatePropagation(); } For all three of the above, I get the error: TypeError: e.preventDefault / e.stopPropagation / e.stopImmediatePropagation is not a function However, the event does seem to be prevented from firing on the Google Maps instance loaded into my page when I use this technique. I tried this with all of the following cases as well: google.maps.event.addListener(map, 'contextmenu', mapContextMenuHandler); google.maps.event.addListener(map, 'dblclick', mapDoubleClickHandler); google.maps.event.addListener(map, 'mousedown', mapMouseDownHandler); google.maps.event.addListener(map, 'mouseup', mapMouseUpHandler); google.maps.event.addListener(map, 'mousemove', mapMoveHandler); They all give me the exact same problem with similar handler definitions as above. I later learned that this is because an event fired by mouse activity on a google.maps.event is a MouseEvent that is different from normal browser/DOM events, and doesn't even have these other event types associate with it - although I'm not getting any errors for trying to add listeners of these types for some reason. So is there any other way to use preventDefault, stopPropagation, stopImmediatePropagation, or anything like them on mouse events on a Maps API instance? What alternative can I use that doesn't throw an error? Finally, though these functions have been successful at blocking mouse-click, double-mouse-click, and mouse-move events, I've found that right-click events are not being blocked…
type: UnansweredQuestion
score: 2
answer count: 0
has comment: http://stackoverflow.com/comment/46884140
upvote count: 2
linked to: http://stackoverflow.com/q/17373677
has title: None of { preventDefault, stopPropagation, stopImmediatePropagation } are functions of Google Maps web API events and stop() does not work
has comment: http://stackoverflow.com/comment/46858656
has comment: http://stackoverflow.com/comment/46874125
type: Question

http://stackoverflow.com/q/29345866
type: Question
has title: Search does not clear filter
answer count: 2
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/29364512
tagged with: meteor
has body: I need to do a search on a text field (mongodb). The Search criteria / filter on the collection can be any substring of the sting in the field. I save the filter (input) in a session variable. The filter seems to work the first time after the Sessionvariable is null. After the first search I get no result when I enter a new (extisting!) value. In case I clear the filter, hit enter and than reenter the filter I get the result. I assume that my code is suboptimal. Can someone please review and maybe make a suggestion? Here is what I have: html: &lt;input class="medinput" maxlength="80" type="text" name="nameSearchBar" id="nameSearchBar" value="{{searchText}}"&gt; javascript: Session.setDefault('searchText', null); Template.questions.helpers({ questions:function(){ if ((Session.get('searchText') === null) || (Session.get('searchText') === '')) { Session.get('searchText',null); return Questions.find({archived:{$ne:true}}); } else { var searchText = Session.get('searchText'); Session.get('searchText',null); return Questions.find( { $and: [ { archived: { $ne: true } }, {note:{$regex: (".*"+searchText+".*") } } ] } ) } }, searchText:function(){ return Session.get('searchText'); } }) Template.questions.events({ "change #nameSearchBar":function(event){; searchText = event.target.value; Session.set('searchText', searchText); } }) Questions: why do I need to first "enter" an empty string to get a valid result is this a good procedure? Doesn't hitting enter works against the reactive approach? I think after enter the complete page is resent ?? Would it be better to check "keyup" for ASCII 27 and 13? it seems to me that the regex works, are there any concerns? I like to find any substring of the typed in filter, also when the filter has a whitespace. this is a full text search do I need to set something up on the mongodb side? Open Question: are the already prebuild implementiations - I do not need to reinvent the wheel...
has answer: http://stackoverflow.com/a/29369251
type: UnansweredQuestion

http://stackoverflow.com/a/44622373
score: 0
has body: I would use the ng-repeat to display single list items in an unordered list, and then use CSS to style each li to be 50% of the container width (or 49% usually works more consistently), and make each li a an inline-block style so that they float up two on a line. I'm working in Angular4 at the moment, so I can't switch gears to Angular1.x code, but here's a mockup in pure HTML that you can test and then if it looks like a solution to our problem modify your code accordingly. One Item Two Item Three Item Four Item Five Item Six Item Seven Item Eight Item And the array list.css file: ul.array-list { display: block; margin: 0; padding: 0; } li { display: inline-block; width: 49%; } Your Angular code would look something like this: {{ elements[$index].name }} This doesn't implement what I'm assuming was a dark/light grey row striping, but you can probably work out a way to style this, or not style it if that's not particularly important. The important thing here is that because you're repeating single elements, when you filter some out, the elements below with automatically reflow to fill in the gaps and you won't get inconsistent UI as a result of some values being displayed because the element they're paired with matched the filter.
answers question: http://stackoverflow.com/q/29329054
type: Answer

http://stackoverflow.com/comment/46782762
comment on: http://stackoverflow.com/a/29291951
type: Comment
type: AnswerComment
has text: @DavidMckee sorry, perhaps this will help? https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify
score: 0

http://stackoverflow.com/q/29318556
has comment: http://stackoverflow.com/comment/46829262
tagged with: javascript
tagged with: jquery
has title: Kendo UI/jQuery redirect after verification
score: 0
tagged with: window.location
has comment: http://stackoverflow.com/comment/46830265
has comment: http://stackoverflow.com/comment/46830365
has body: I'm coding hybrate mobile app with Telerik product, AppBuilder. But I have the follow problem: This is my code: $('#search-btn').on("click", function () { var barcode = document.getElementById("product-search-id"); if (barcode.value == 3800048307270) { window.location.href = "../views/scan-view.html#activia-light-yogurt-Blueberry"; } }); But when I select product with barcode 3800048307270 and click Search, window.location.href doesn't redirect me to ../views/scan-view.html#activia-light-yogurt-Blueberry. If I write web url in window.location.href it redirect me. I'm sure that I set the right path.
type: UnansweredQuestion
tagged with: http-redirect
has comment: http://stackoverflow.com/comment/46845271
answer count: 0
type: Question

http://stackoverflow.com/comment/46717181
score: 0
type: AnswerComment
has text: Chrome Version 41.0.2272.101 m | Google Chrome is up to date.
type: Comment
comment on: http://stackoverflow.com/a/29254969

http://stackoverflow.com/q/29364326
tagged with: node.js
type: AnsweredQuestion
score: 7
has comment: http://stackoverflow.com/comment/46915242
type: Question
accepted answer: http://stackoverflow.com/a/31754352
has comment: http://stackoverflow.com/comment/46990030
downvote count: 0
answer count: 1
tagged with: javascript
has body: I've had no luck in seeing any results appear in my iTerm2 while trying to use chalk which is a terminal string styling package. I followed all the steps in installing the package but I'm not seeing any colored string result appear when I run a basic console.log("hello"); in my chalk.js file. Here is what I am doing. #!/usr/bin/env node var chalk = require('chalk'); chalk.blue('Hello world!'); console.log("hello"); Then in iTerm2 I run node chalk.js and I see no colored strings just plane old boring grey.. Anyone know what I'm doing wrong here? https://www.npmjs.com/package/chalk
has comment: http://stackoverflow.com/comment/46984520
favorite count: 0
tagged with: terminal
has title: How to use Chalk Terminal string styling done right
tagged with: npm
has answer: http://stackoverflow.com/a/31754352
upvote count: 7

http://stackoverflow.com/comment/46739022
type: AnswerComment
comment on: http://stackoverflow.com/a/29268708
type: Comment
has text: Thank you! This is what I was looking for. I was also keep trying, and came up, to some thing simular, can you comment please, what do yiu think about my solution? http://jsfiddle.net/djonkwt/x40ure3f/2/ Thank you in advance.
score: 1

http://stackoverflow.com/q/29316001
has comment: http://stackoverflow.com/comment/46983124
tagged with: image
has comment: http://stackoverflow.com/comment/46987956
has answer: http://stackoverflow.com/a/29316247
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
favorite count: 0
has comment: http://stackoverflow.com/comment/47010782
tagged with: printing
type: Question
score: 0
has body: Through Javascript (or jquery) is it possible to do one of the following... Find out the current page size and orientation of the browser's print dialog. OR Set (or at least suggest) a page size and orientation to the browser's print dialog. I have images of various sizes and dimensions, and I would like to provide a printable form which makes the best use of the selected page size. I.e. I want to scale and or rotate the image so that it takes up as much of the page as possible. Or is there a way to handle this in CSS?
has comment: http://stackoverflow.com/comment/46824481
answer count: 2
upvote count: 1
downvote count: 1
has answer: http://stackoverflow.com/a/29419347
has title: Can javascript get or set printer info?

http://stackoverflow.com/q/29304991
has answer: http://stackoverflow.com/a/29305107
accepted answer: http://stackoverflow.com/a/29305107
has body: I have a file "file.json" that I know is 1MB. Is there some way in javascript that when I do an ajax request for the file, I can show a progress bar based on the size of the file? (i.e. if the client has retrieved 500KB of it, the progress bar shows 50%,etc?
answer count: 1
tagged with: javascript
has title: Progress indicator for filesize
linked to: http://stackoverflow.com/q/20095002
downvote count: 0
type: AnsweredQuestion
score: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/46804524
type: Question
upvote count: 1

http://stackoverflow.com/q/29370678
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46925459
has comment: http://stackoverflow.com/comment/46926427
score: 0
has body: I've decided to play around with this jquery example. I put the jquery.js and jquery.lazy-load-google-maps.min.js on my server in the js/ folder and I put the php page that has the following code: first: second: third: fourth: but after running it in the browser all I see is: first: second: third: fourth: Nothing else. Where is the problem?
favorite count: 0
has comment: http://stackoverflow.com/comment/46922507
type: UnansweredQuestion
tagged with: php
has comment: http://stackoverflow.com/comment/46922946
answer count: 0
upvote count: 1
downvote count: 1
type: Question
has title: lazy load google maps doesn't show map on the page
tagged with: google-maps
has comment: http://stackoverflow.com/comment/46922893
has comment: http://stackoverflow.com/comment/46922673

http://stackoverflow.com/comment/46797532
type: Comment
type: QuestionComment
score: 1
has text: What version of `gulp-util` do you have? According to [this](https://github.com/gulpjs/gulp-util/issues/35), `beep()` was removed at some point.
comment on: http://stackoverflow.com/q/29300726

http://stackoverflow.com/a/29370095
answers question: http://stackoverflow.com/q/29370007
upvote count: 4
has body: You cannot use look-behinds in JavaScript regex. There are some JavaScript look-behind workarounds, but they all have their own handicaps. To play it safe, use capturing groups. Here, the contents you need will be in the 2nd group: (\.)([^.]+)$ Or, with just 1 capturing group (to increase performance): \.([^.]+)$ Code: var re = /\.([^.]+)$/; var str = 'test.txt'; var m; if ((m = re.exec(str)) !== null) { if (m.index === re.lastIndex) { re.lastIndex++; } alert(m[1]); }
downvote count: 0
has comment: http://stackoverflow.com/comment/46921850
score: 4
has comment: http://stackoverflow.com/comment/46922016
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46921694
type: Answer
has comment: http://stackoverflow.com/comment/46921880
accepted answer of: http://stackoverflow.com/q/29370007
has comment: http://stackoverflow.com/comment/46921479

http://stackoverflow.com/a/34893116
answers question: http://stackoverflow.com/q/29339437
type: Answer
has body: I also had the problem. I solved my problem by adding $firebaseArray in the parameter of the controller .controller('ChatsCtrl', ['$scope','$firebaseArray','$rootScope',...... One thing should be noted that firebase has been updated that $firebase is no longer supported. You can only use $firebaseArray or $firebaseObject for retrieving the data.
score: 0

http://stackoverflow.com/comment/46824743
score: 1
comment on: http://stackoverflow.com/q/29316246
type: Comment
type: QuestionComment
has text: So why are `span` and `a` included into `p`, but `h1` is not? What tags should be wrapped what should be skipped?

http://stackoverflow.com/comment/46699390
has text: FYI, do you find any public documentation for a `.splice()` method on a jQuery object? I don't. I know there is such a function in the source code, but I don't see that it's intended to be public.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29246874

http://stackoverflow.com/a/29315025
has comment: http://stackoverflow.com/comment/48775815
has comment: http://stackoverflow.com/comment/48949856
type: AcceptedAnswer
upvote count: 6
answers question: http://stackoverflow.com/q/29314909
type: Answer
accepted answer of: http://stackoverflow.com/q/29314909
downvote count: 0
score: 6
has comment: http://stackoverflow.com/comment/48950190
has body: You can use optionLabel option optionLabel A callback used to define the labels of the options $('.multiselect').multiselect({ enableHTML: true, optionLabel: function(element) { return ' '+$(element).text(); }, // ... }); HTML: ctrlr0451483t ipr0451483t ldap0451483t proxy0451483t JSFiddle
has comment: http://stackoverflow.com/comment/48949965

http://stackoverflow.com/comment/46953269
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29371256
has text: Sorry Gordon how would I go about that? Do you have any examples I could look at that would point me in the right direction? Many thanks.
score: 0

http://stackoverflow.com/comment/46844978
score: 0
type: Comment
comment on: http://stackoverflow.com/q/29323881
type: QuestionComment
has text: yes all you need to do is just have ajax call which gets your data dynamically and push into `self.chosenFolderData` .

http://stackoverflow.com/a/37047254
upvote count: 4
downvote count: 0
score: 4
has body: You need to add multiple datasets into chart. they will be displayed as you need. Please look into their own sample of pie chart. You can download and open it locally as example. There they have multiple datasets, that makes chart look like you need. Hope that it helped.
has comment: http://stackoverflow.com/comment/90527983
answers question: http://stackoverflow.com/q/29254121
type: Answer

http://stackoverflow.com/a/29263626
has body: Problem is Here .config(['$locationProvider', '$stateProvider', '$urlRouterProvider', function($locationProvider, $stateProvider, stripeProvider, $urlRouterProvider){ Solution 1 .config(['$locationProvider', '$stateProvider', ', stripeProvider' '$urlRouterProvider', function($locationProvider, $stateProvider, stripeProvider, $urlRouterProvider){ // do stuff here }]); Solution 2 .config(function($locationProvider, $stateProvider, stripeProvider, $urlRouterProvider){ // do stuff here }]); Happy Helping!
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/29263429
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/29263429

http://stackoverflow.com/comment/46691208
comment on: http://stackoverflow.com/a/29240971
score: 0
type: AnswerComment
has text: I was saying to use a CSS class as the "hook" for your jQuery selector. I'm not telling you to put a C# class in your user control. The C# property you're writing cannot be seen by jQuery. You need to have jQuery be able to find your HTML select, so you need to either define an ID for it, or you need to put a CSS class on it and make your jQuery selector reflect that. Of note: Setting the id of your user control does nothing. By default, a user control renders no HTML. Also, `$(".PropertySelect")` is telling jQuery to look for a CSS class named "PropertySelect"--to select by id use #
type: Comment

http://stackoverflow.com/comment/46780237
has text: What does `match` return? And no, it's not a trick question - look in the API.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29291672
score: 0

http://stackoverflow.com/comment/74518868
has text: By using this method, you can pass values from one page to another without using 'localstorage'.
comment on: http://stackoverflow.com/a/43677437
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/29305668
score: 5
has comment: http://stackoverflow.com/comment/46806040
tagged with: javascript
has comment: http://stackoverflow.com/comment/46807809
has comment: http://stackoverflow.com/comment/46805727
has comment: http://stackoverflow.com/comment/46805988
has comment: http://stackoverflow.com/comment/46807307
has comment: http://stackoverflow.com/comment/46805772
tagged with: google-chrome-extension
answer count: 1
has comment: http://stackoverflow.com/comment/129156844
downvote count: 0
favorite count: 0
upvote count: 5
type: UnansweredQuestion
has body: In my web application i want to put a code that upon that execution it should redirect the current tab to some extension page? If i do window.location = 'chrome-extension://idgpnmonknjnojddfkpgkljpfnnfcklj'; it redirects me to 'about://blank' not on that particular extension page. Can some one help me out how to achieve the same.
has title: How to redirect to an extension page in chrome?
has answer: http://stackoverflow.com/a/65940173
tagged with: google-chrome
has comment: http://stackoverflow.com/comment/46806158
type: Question
has comment: http://stackoverflow.com/comment/46807535

http://stackoverflow.com/comment/46677887
type: AnswerComment
comment on: http://stackoverflow.com/a/29235111
has text: Thanks for the tips, I figured it out! This link is also helpful: https://github.com/knockout/knockout/wiki/Asynchronous-Dependent-Observables
type: Comment
score: 0

http://stackoverflow.com/comment/46706362
type: Comment
has text: hi @Khalid, can you help me for this question? thx.
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/29250997

http://stackoverflow.com/comment/46849371
type: Comment
has text: It works brilliantly, can't believe I couldn't find this anywhere else. Thank you
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29329807

http://stackoverflow.com/comment/46817976
score: 0
type: Comment
type: QuestionComment
has text: What code would I put in there though? I still have the conflicts between the 2 jQuery libraries. I've tried using a different variable name with the later version of jQuery, which is actually supposed to run first, and left the earlier one alone thinking it would just use $, but still can't get it to work. Everything breaks basically!
comment on: http://stackoverflow.com/q/29311184

http://stackoverflow.com/q/29355020
has answer: http://stackoverflow.com/a/29355223
has body: I am trying to find a way to add a polyline as the coordinates change, i have tried every possible combination of guessing that i can think of, also including googles own docs for "complex polylines" and i have had no luck. If anyone can shine some light it'd be much appriciated as i am now completely stuck with this! function startTrack() { var options = { enableHighAccuracy: true, maximumAge: 0, timeout : 5000 }; watchID = navigator.geolocation.watchPosition(onSuccessTrack, onErrorTrack, options); var polyOptions = { strokeColor: '#000000', strokeOpacity: 1.0, strokeWeight: 3 }; poly = new google.maps.Polyline(polyOptions); poly.setMap(map); } function onSuccessTrack(position) { var latitude = position.coords.latitude; var longitude = position.coords.longitude; var path = poly.getPath(); path.push(google.maps.LatLng(latitude, longitude)); }
answer count: 1
accepted answer: http://stackoverflow.com/a/29355223
tagged with: javascript
favorite count: 0
tagged with: geolocation
upvote count: 1
downvote count: 1
type: AnsweredQuestion
has title: watchPosition combined with polylines
tagged with: google-maps-api-3
type: Question
score: 0
tagged with: google-maps

http://stackoverflow.com/comment/46696562
has text: You can simplify your loop like so: for(i = 0; i<radios.length; i++){ ... }
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/29245457
type: Comment

http://stackoverflow.com/q/29271155
favorite count: 0
has comment: http://stackoverflow.com/comment/46743514
upvote count: 2
tagged with: mysqli
downvote count: 2
has comment: http://stackoverflow.com/comment/46743239
tagged with: php
has title: Parameters to prevent injection? is it enough? and should it be used in each query?
type: AnsweredQuestion
tagged with: mysql
has comment: http://stackoverflow.com/comment/46743912
type: Question
has answer: http://stackoverflow.com/a/29271483
tagged with: javascript
score: 0
linked to: http://stackoverflow.com/q/60174
has body: From a long research, I find that parameters to prevent injection is a great practice, but should I use it in every query or just in login page?? and why thank you so much
tagged with: http://stackoverflow.com/tag/html
answer count: 1
accepted answer: http://stackoverflow.com/a/29271483

http://stackoverflow.com/comment/46761331
type: Comment
type: QuestionComment
score: 0
has text: you could also try to use `ng-if`
comment on: http://stackoverflow.com/q/29281663

http://stackoverflow.com/q/29357731
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
tagged with: animation
tagged with: css
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29527660
upvote count: 3
has body: I am looking for a way to start the marquee (text slider) from the center to the left. Because if I reload my page, marquee is blank.
downvote count: 3
type: Question
has comment: http://stackoverflow.com/comment/46961321
tagged with: javascript
tagged with: marquee
accepted answer: http://stackoverflow.com/a/29527660
has comment: http://stackoverflow.com/comment/46900094
score: 0
has title: Marquee start in center to the left

http://stackoverflow.com/comment/46689564
has text: @banana Well, funny enough, the acceptChallenge method is empty. Just the function name and the 1 parameter. It seems like the error is occurring in the piece of code I wrote down in the description.
comment on: http://stackoverflow.com/a/29241401
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/29304571
upvote count: 1
type: Answer
has body: When u write $('.testmenu .dropdown-menu').dropdown('toggle'); You declare a new dropdown, after this you just have to toggle like this : $('.testmenu .dropdown-menu').toggle(); Complete code : $(function () { $('p').html('started'); $('.testmenu .dropdown-menu').dropdown('toggle'); }); function testfun() { $('p').html('test button pushed'); $('.testmenu .dropdown-menu').toggle(); }
downvote count: 0
has comment: http://stackoverflow.com/comment/46803568
score: 1
answers question: http://stackoverflow.com/q/29304460
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46805529
accepted answer of: http://stackoverflow.com/q/29304460
has comment: http://stackoverflow.com/comment/46804203

http://stackoverflow.com/comment/46687176
type: AnswerComment
score: 0
type: Comment
has text: You're welcome, I'm glad to help. Any doubt you can ask me ;-).
comment on: http://stackoverflow.com/a/29239848

http://stackoverflow.com/comment/46730753
score: 0
type: Comment
has text: flags variable in function getFlag() changes his value, but global change flags does not change his value
comment on: http://stackoverflow.com/a/29264248
type: AnswerComment

http://stackoverflow.com/comment/46790544
type: Comment
comment on: http://stackoverflow.com/a/29296694
score: 0
type: AnswerComment
has text: Chaitanya Gadkari, tried your updated answer, still doesn't work for angularjs divs. Legendary, what more do u want to see ? i sent the html divs and jquery funcation.

http://stackoverflow.com/comment/46824119
comment on: http://stackoverflow.com/q/29315964
type: Comment
type: QuestionComment
score: 1
has text: [gulp-sequence](https://www.npmjs.com/package/gulp-sequence)

http://stackoverflow.com/a/29366325
downvote count: 0
answers question: http://stackoverflow.com/q/29366269
accepted answer of: http://stackoverflow.com/q/29366269
type: Answer
upvote count: 6
score: 6
has body: this.createjs = this.createjs||{}; If this.createjs is not available/ any falsy value then you are assigning {} empty object to this.createjs. It's more like, var a, b; b = a || 5; Since a is not having any value currently, 5 will be assigned to b.
type: AcceptedAnswer

http://stackoverflow.com/comment/46795048
comment on: http://stackoverflow.com/a/29277098
has text: As I'hv mentioned in my answer... It's referred from their talk.
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/46811481
comment on: http://stackoverflow.com/q/29308600
has text: You're welcome, just add it as an answer. Thanks ^^
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29259706
has answer: http://stackoverflow.com/a/29261995
tagged with: php
tagged with: local-storage
type: Question
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29261895
has body: what I need I need to toggle image on click. like if user select favorite choice &amp; then it mark unfavorite image is altered and data is deleted from localstoarge. html code &lt;div style="display:block; float:right; width:auto; color:#7c7c7c;"&gt; &lt;a href="javascript:void(0);" class="favourate_dextop" id="fav'.$data[$k]['id'].'" onClick=" favaorite('.$data[$k]['id'].',\''.$name_event.'\',\''.$event_city.'\',\''.$event_country.'\',\''.$event_urls.'\',this)"&gt;&lt;/a&gt; &lt;/div&gt; js code function favaorite(sess_id,name,city,country,event_url,pointer){ var eventData; //is anything in localstorage? if (localStorage.getItem('eventData') === null) { eventData = []; } else { // Parse the serialized data back into an array of objects eventData = JSON.parse(localStorage.getItem('eventData')); //alert(eventData); $.each(eventData, function(key, value){ //console.log(value); var imageUrl='http://im.gifbt.com/images/star1_phonehover.png'; //var imageUrl='http://im.gifbt.com/images/star1_phone.png'; $(pointer).closest('.evt_date').find('.favourate_dextop').css('background-image', 'url("' + imageUrl + '")'); //$(pointer).closest('.evt_date').find('.favourate_dextop').css('background-image', 'url("' + imageUrl + '")'); }); } var details={}; details.sess_id=sess_id; details.name=name; details.city=city; details.country=country; details.event_url=event_url; // Push the new data (whether it be an object or anything else) onto the array eventData.push(details); // Alert the array value //alert(eventData); // Should be something like [Object array] // Re-serialize the array back into a string and store it in localStorage var jsondata=localStorage.setItem('eventData', JSON.stringify(eventData)); } problem I'm new in localstorage I need to know how could I delete data from json string. I have implemented add to favorite now I need to mark unfavorite. data is stored: [{ "sess_id":182104, "name":"AUTOMECH FORMULA", "city":"Cairo", "country":"Egypt", "event_url":"automech-formul…
answer count: 2
has answer: http://stackoverflow.com/a/29261895
tagged with: javascript
tagged with: jquery
score: 0
has title: How to To Delete The data in Localstorage
possible better answer: http://stackoverflow.com/a/29261995

http://stackoverflow.com/q/29256228
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/46715332
has comment: http://stackoverflow.com/comment/46715415
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46715140
has title: Printing PHP string using JQuery
score: 0
has comment: http://stackoverflow.com/comment/46715144
answer count: 1
tagged with: string
has answer: http://stackoverflow.com/a/29257159
favorite count: 0
has body: I got a script which uses an array that was created in PHP and was encoded to JSON. It then take the string and use it to set a value for an element I created: var val =""; if(arr != null) { if((arr[i] != undefined) &amp;&amp; (arr[i]["value"] != undefined)) { var val = JSON.stringify(arr[i]["value"]); val.replace(/"/g , ""); } } cell.innerHTML = "&lt;input type='text' value='"+val+"' style='padding-right: 0px;'/&gt;"; The problem is that every string on the screen appears with the "" around the string itself. for example "5". I want it to be just 5 and not "5". I thought the replace I did to the val was supposed to do it but it didn't work. why is that?
accepted answer: http://stackoverflow.com/a/29257159
upvote count: 1
tagged with: php
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46715273
has comment: http://stackoverflow.com/comment/46715451

http://stackoverflow.com/a/29336816
has comment: http://stackoverflow.com/comment/46861863
accepted answer of: http://stackoverflow.com/q/29336731
score: 0
answers question: http://stackoverflow.com/q/29336731
type: AcceptedAnswer
type: Answer
has body: The event handlers need an unexecuted function: linkhome.addEventListener("click", function () { loadcontent("contenthome") }); By passing the argument you're actually executing the loadcontent function. And therefore the handler gets what the function returns instead of the function itself. To fix this, wrap laodcontent("contenthome"), for example, in a function expression so it can be fired by the click handler later.

http://stackoverflow.com/q/29295808
has body: I have no idea why all plugins, which are based on Jquery, are not working properly in my wordpress theme. For instance, toggle plugin or dw questions. This is how I do connect my scripts in theme: In header &lt;?php wp_enqueue_script("jquery"); ?&gt; &lt;?php wp_head(); ?&gt; In functions: add_action('wp_enqueue_scripts', 'no_more_jquery'); function no_more_jquery(){ wp_deregister_script('jquery'); wp_register_script('jquery', "http" . ($_SERVER['SERVER_PORT'] == 443 ? "s" : "") . "://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js", false, null); wp_enqueue_script('jquery'); if ( !is_admin() ) { function easing() { wp_register_script( 'jquery_easing', get_template_directory_uri() . '/js/jquery.easing.1.3.js', array( 'jquery' ) ); wp_enqueue_script( 'jquery_easing' ); } add_action( 'wp_enqueue_scripts', 'easing' ); function camera() { // Register the script like this for a theme: wp_register_script( 'camera_min', get_template_directory_uri() . '/js/camera.min.js', array( 'jquery' ) ); wp_enqueue_script( 'camera_min' ); } add_action( 'wp_enqueue_scripts', 'camera' ); function jquery_ui() { wp_register_script( 'jquery_ui-script', get_template_directory_uri() . '/js/jquery-ui-1.9.0.custom.min.js', array( 'jquery' ) ); wp_enqueue_script( 'jquery_ui-script' ); } add_action( 'wp_enqueue_scripts', 'jquery_ui' ); function fadeSlideShow() { // Register the script like this for a theme: wp_register_script( 'fadeSlideShow-script', get_template_directory_uri() . '/js/fadeSlideShow.js', array( 'jquery' ) ); wp_enqueue_script( 'fadeSlideShow-script' ); } add_action( 'wp_enqueue_scripts', 'fadeSlideShow' ); } }
type: Question
has title: Jquery conflicts wordpress
tagged with: javascript
has comment: http://stackoverflow.com/comment/46787802
tagged with: conflicting-libraries
score: 0
has comment: http://stackoverflow.com/comment/46787430
tagged with: jquery
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46788640
tagged with: conflict
has comment: http://stackoverflow.com/comment/46787826
has comment: http://stackoverflow.com/comment/46787696
answer count: 0
tagged with: wordpress

http://stackoverflow.com/a/29281712
accepted answer of: http://stackoverflow.com/q/29281575
answers question: http://stackoverflow.com/q/29281575
type: AcceptedAnswer
has body: Checkout Waypoints and/or jquery scrollspy. These do exactly the functionality you are looking for.
score: -1
type: Answer
upvote count: 1
downvote count: 2

http://stackoverflow.com/q/29288157
linked to: http://stackoverflow.com/q/22106452
type: Question
tagged with: javascript
linked to: http://stackoverflow.com/q/1142861
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
answer count: 1
favorite count: 0
type: UnansweredQuestion
upvote count: 1
has body: I have checked these: jQuery append Google Adsense to div How to hide div when containing a Google adsense advert? How can I place an Adsense ad in each hidden JQuery div without exceeding their 3 ad limit I need a javascript or jQuery script to hide div which contain adsense ads. I have searched more in google and tested all the script is working fine for image and text but not working for adsense ads. What I have noticed is that when I write a code like this : &lt;div id="stackoverflow"&gt; adsense code &lt;/div&gt; It automatic converted into : &lt;div id="stackoverflow"&gt; &lt;div id="adunit&gt; &lt;!-- adunit id for text ads --&gt; &lt;!-- google_image_div id for image ads --&gt; &lt;!-- some time it create diff id also for div --&gt; some code &lt;/div&gt; &lt;iframe&gt; some code &lt;/iframe&gt; &lt;/div&gt; Can anyone help me with code?
has title: Hide div when click on adsense ads or anywhere
linked to: http://stackoverflow.com/q/8215530
score: 1
has answer: http://stackoverflow.com/a/29288526

http://stackoverflow.com/comment/46812818
comment on: http://stackoverflow.com/a/29309328
score: 1
type: AnswerComment
has text: Though this works, jQuery Deferred objects are generally the recommended way to chain functions.
type: Comment

http://stackoverflow.com/a/29242467
upvote count: 1
type: Answer
has body: You will need to go through the nested loop to do the comparison you are doing. currently you are looping 112 times total. the following code will make you loop ONLY when there are elements in "circleCollection" smaller than the current "v_circle_collection" element. T hat should make you loop 57 times instead. //example x co-ords var v_circle_collection = [550, 450, 350, 450, 1000, 1450, 1900, 2350, 2200, 2200, 2800, 2700, 2600, 2700, 3250, 3050]; //example x co-ords of circle collection var circleCollection = [450, 900, 1350, 1800, 2250, 2700, 3150]; function filter(arr, criteria) { return arr.filter(function(obj) { return criteria &gt; obj; }); } var x = 0; for (var i = 0; i &lt; v_circle_collection.length; i++) { var filtred = filter(circleCollection,v_circle_collection[i]); if(filtred.length &gt; 0) { //Found circleCollection that were lower than v_circle_collection do your code here } for (var n = 0; n &lt; filtred.length; n++) { x++; //do the stuff i need to do only on the circleCollection that were smaller than the v_circle_collection } } alert(x);//total of time i looped (original code was 112)
has comment: http://stackoverflow.com/comment/46690951
has comment: http://stackoverflow.com/comment/46691546
answers question: http://stackoverflow.com/q/29240441
downvote count: 0
score: 1

http://stackoverflow.com/comment/46651864
comment on: http://stackoverflow.com/q/29221467
has text: Your code would be a lot easier to read if it was indented...
score: 3
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29352546
has answer: http://stackoverflow.com/a/29353325
accepted answer: http://stackoverflow.com/a/29353720
has comment: http://stackoverflow.com/comment/46891601
type: Question
has comment: http://stackoverflow.com/comment/46891298
has comment: http://stackoverflow.com/comment/46891497
has answer: http://stackoverflow.com/a/29353720
has title: On click, compare id's of selected checkboxes to list hrefs
has comment: http://stackoverflow.com/comment/46891537
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/46891139
has body: There is a list of checkboxes, that change on container li click. Here is one for example, and the rest of them are the same (except for a few id's and classes , that dynamically change like #lips here) Lips on click, .filtercheck gets class of .checkchecked (if it helps) there is also a list of links I'm trying to compare checkbox id, when .lifilter is clicked to that list of urls, pick one that has all the checked id's, add it to current domain, and redirect page there. For example: Let's say, #face is already checked, site visitor clicks on #lips. Script checks .colurls for face and lips. In our case, finds .colurl2, gets its href, adds to curdomain, and redirects page to domain.com/collections/face-leeps There is a pretty long script of forming these id's and classes, but i got really stuck here. $(document).ready(function(){ var curdomain = document.domain; //id's and classes forming code $('.lifilter').click(function(){ //compare ids to hrefs var addurl = // that class attr('href') var curdomain = curdomain + addurl; window.location = curdomain; }); }); I'm pretty new to js, and have no clue where to go from here. And there is most likely a syntax error where i'm combining vars. Help a noob out plz
possible better answer: http://stackoverflow.com/a/29353325
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46890793
has comment: http://stackoverflow.com/comment/46891714
type: AnsweredQuestion

http://stackoverflow.com/a/29340589
has comment: http://stackoverflow.com/comment/46870024
has comment: http://stackoverflow.com/comment/46869923
type: Answer
has comment: http://stackoverflow.com/comment/46870243
has comment: http://stackoverflow.com/comment/46870360
has comment: http://stackoverflow.com/comment/46870509
has comment: http://stackoverflow.com/comment/46870784
has comment: http://stackoverflow.com/comment/46870061
answers question: http://stackoverflow.com/q/29340500
has comment: http://stackoverflow.com/comment/46870146
has comment: http://stackoverflow.com/comment/46870991
has body: If you want to toogle only the next "me" you should do like that : Details ... Here it is programming. ... Here is the text, which appears for clicking above. Details ... Here it is programming. ... Here is the text, which appears for clicking above. EDIT : UPDATE, try it now Check that fiddle : http://jsfiddle.net/fovk8ntu/1/
accepted answer of: http://stackoverflow.com/q/29340500
score: 0
type: AcceptedAnswer

http://stackoverflow.com/comment/46646682
has text: Oleg i tried your suggestion : by placing the navgrid call inside the block $(function () {...}) right after the setFrozenColumns . but still the add/delete/icons are missing from the Jqgrid. something like : $("#datagrid").jqGrid('setFrozenColumns'); $('#datagrid').jqGrid('navGrid', '#nav', { ........ }); }); // end of document ready
comment on: http://stackoverflow.com/a/29218644
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/29227845
answer count: 1
tagged with: dojo
accepted answer: http://stackoverflow.com/a/29233013
upvote count: 1
has title: Is a console shim required when using Dojo?
downvote count: 0
tagged with: javascript
has body: I often see a shim like the following in JavaScript AMD modules to ensure console is available: (function () { var f = function () { }; if (!window.console) { window.console = { log: f, info: f, warn: f, debug: f, error: f }; } }()); Is this needed when using Dojo? Looking through http://dojotoolkit.org/reference-guide/1.8/quickstart/debugging.html it seems Dojo is doing something similar by default?
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29233013
score: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/46666293
type: Question

http://stackoverflow.com/comment/46738912
type: AnswerComment
comment on: http://stackoverflow.com/a/29268490
type: Comment
has text: I could create a working Fiddle too, but the project still doesn't run properly. I will try breaking the code down until I find what is interfering
score: 0

http://stackoverflow.com/comment/61813809
has text: You can use $.get("/content/images/", function(data) {}); to do so
type: AnswerComment
type: Comment
score: 2
comment on: http://stackoverflow.com/a/35474341

http://stackoverflow.com/comment/46660449
type: QuestionComment
comment on: http://stackoverflow.com/q/29226462
score: 0
has text: Make sure that bootstrap.js included
type: Comment

http://stackoverflow.com/a/29364187
answers question: http://stackoverflow.com/q/29364121
downvote count: 0
type: Answer
has body: You can always pass a GET variable in you re URL just like this myhost.com?var=value You can get the value of this variable by parsing the URL using Js see this How can I get query string values in JavaScript?
upvote count: 1
score: 1

http://stackoverflow.com/comment/46724287
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29256270
has text: @sumitramteke are you sure IE 10/ IE11 are adding the `Origin` header? Will your server application throw an `HTTP 400` if that header is missing? It appears that IE 10 and IE 11 don't consider port numbers, so `localhost:9000` and `localhost:8080` will be the same host, so they won't add the `Origin` header.

http://stackoverflow.com/q/29360045
upvote count: 7
type: Question
has title: Google Cloud Storage Javascript Usage
tagged with: cloud
has answer: http://stackoverflow.com/a/29361033
tagged with: javascript
tagged with: google-cloud-storage
answer count: 2
linked to: http://stackoverflow.com/q/12683189
possible better answer: http://stackoverflow.com/a/29361033
downvote count: 0
favorite count: 0
tagged with: storage
has answer: http://stackoverflow.com/a/30114808
type: AnsweredQuestion
has body: i am trying to upload images into buckets on Google Cloud Storage using the JSON API, using the Javascript sample: Api Javascript Sample I am able to upload pictures but it asks me to log in on my google account. Tthe sample has an Authorization button, which I understand manages the OAuth credentials. function checkAuth() { gapi.auth.authorize({ client_id: clientId, scope: scopes, immediate: true }, handleAuthResult); } The problem is: I want to authenticate without having the pop up screen, that means without login in with Google. Because my client doesn't know the email or password, I want it to be automatically. How can I achieve this? Thanks! -----------------------------UPDATE-------------------- So following Brandon's answer i have done the following: I have created my policy document and signed it like this: var http = require('http'); var fs = require('fs'); var crypto = require('crypto'); var express = require('express'); var app = express(); var p12ToPem = require("./node_modules/p12-to-pem/p12ToPem.js"); var p12File = fs.readFileSync("./KEY.p12"); var pemKey = p12ToPem(p12File, "notasecret"); var policyJson={"expiration": "2050-06-16T11:11:11Z", "conditions": [["starts-with", "$key", "" ], {"acl": "bucket-owner-read" }, {"bucket": "my-bucket'name"}, {"success_action_redirect":"http://www.example.com/success_notification.html" }, ["eq", "$Content-Type", "image/jpeg" ], ["content-length-range", 0, 1000000] ] }; var policyJson64 = new Buffer(''+policyJson).toString('base64'); var sign = crypto.createSign('RSA-SHA256'); sign.update(policyJson64); var sig = sign.sign(pemKey, 'base64') console.log("policyJson64:"+policyJson64); console.log("sig:"+sig); And my post form is the following: No matter the combinations obtained in the javascrypt I cant seem to figure out what goes into policy and what into signature,and YES! I have read the API but it is not clear on what goes in those 2 inputs.. I have tried putting on the policy input the value of PolicyJson64 and…
score: 7
tagged with: http://stackoverflow.com/tag/json
accepted answer: http://stackoverflow.com/a/30114808

http://stackoverflow.com/a/29246716
type: AcceptedAnswer
has body: Try: rm -rf tmp/ And restart your server. It is more likely to be a typo in your app than an Ember.js problem. This works: http://emberjs.jsbin.com/pefudesaya/1/edit?html,js,console,output
downvote count: 0
has comment: http://stackoverflow.com/comment/46699145
type: Answer
score: 1
accepted answer of: http://stackoverflow.com/q/29246137
answers question: http://stackoverflow.com/q/29246137
upvote count: 1

http://stackoverflow.com/comment/66280131
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29292476
has text: @huocp thanks for letting me know this was out of date.
type: AnswerComment

http://stackoverflow.com/comment/46815922
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/29311013
has text: @Dan Looks like OP is searching for universal solution, like the one [I provided](http://stackoverflow.com/a/29311050).
type: Comment

http://stackoverflow.com/q/29316156
has title: "this.parentNode.parentNode" is undefined in firefox but works in other browsers
has comment: http://stackoverflow.com/comment/46825669
answer count: 0
has comment: http://stackoverflow.com/comment/46873439
type: Question
tagged with: javascript
score: 0
has body: In the code below, the alert shows the correct data-table value in Google Chrome but is undefined in Mozilla Firefox - is there something I am missing? &lt;td&gt; &lt;a onclick="add_data_event(this.parentNode.parentNode, '&lt;?=$result['g_id'];?&gt;')" class="btn btn-primary" data-toggle="modal" data-target="#addremindermodel-editclick"&gt; &lt;i class="fa fa-edit"&gt;&lt;/i&gt; &lt;/a&gt; &lt;/td&gt; &lt;script&gt; function add_data_event(index, ser) { alert('I am in script'); alert(index.cells[1].innerText); } &lt;/script&gt;
has comment: http://stackoverflow.com/comment/46825130
type: UnansweredQuestion

http://stackoverflow.com/comment/46674752
score: 0
comment on: http://stackoverflow.com/a/29224826
type: AnswerComment
type: Comment
has text: Thank you so much, Kawinesh, but I think I'm a little unclear at what you're trying to point out? The problem is that the .sidebarContent is not displaying the proper images. I BELIEVE its because the way the server is parsing together the div boxes, they're becoming embedded children elements rather than siblings, so the javascript can't properly pull up the corresponding div to go with the clickable.

http://stackoverflow.com/comment/46740123
has text: I think it would be a pain to use DOM objects and store them at a global scope, and since you never add them to the DOM anyway, there is kind of no point. Instead I would use arrays, i.e. an array of weeks at the global scope and each week would contain an array of days. Using this method you could add a week to the week array each time in the week `for` loop and for each day in the day `for` loop you would add a day to the appropriate week
score: 0
type: Comment
comment on: http://stackoverflow.com/q/29269000
type: QuestionComment

http://stackoverflow.com/comment/46828177
has text: Thanks for the answer but it doesn't work. The Uncaught ReferenceError is now gone but the functions for the show hide divs are not working.
score: 0
comment on: http://stackoverflow.com/q/29301223
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29269461
has answer: http://stackoverflow.com/a/29269792
possible better answer: http://stackoverflow.com/a/29269550
upvote count: 6
has answer: http://stackoverflow.com/a/29269550
linked to: http://stackoverflow.com/q/222841
has answer: http://stackoverflow.com/a/29269547
has answer: http://stackoverflow.com/a/29269559
answer count: 4
linked to: http://stackoverflow.com/q/22754315
has comment: http://stackoverflow.com/comment/46740601
has body: So I want to add a class to each element in a list(specifically the in the list items), but one at a time. I am doing this because the have a CSS transition on them and I want to have them animate one at a time. So item1 animates, then item2 animates, then item3 animates... Here is what I could attempt to come up with so far. html: item1 item2 item3 jQuery/js: animateItems(); function animateItems(){ $('ul li a').each(function() { $(this).addClass('animate'); //This doesn't run one at a time }); } I feel like this is leading in the direction of recursion, but not sure really. update: I just realized that this may be harder than i thought because jQuery needs to know about the css transition time doesnt it? Is there a way to add the classes with a setTimeout() until it begins the next addClass()? Does each() create an array or jQuery object that I can iterate through?
tagged with: javascript
tagged with: jquery
score: 6
has title: How to add a class, one by one, to each element in a list
accepted answer: http://stackoverflow.com/a/29269547
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
has comment: http://stackoverflow.com/comment/46740242
favorite count: 0
type: Question

http://stackoverflow.com/comment/46678248
comment on: http://stackoverflow.com/q/29235951
score: 0
type: Comment
has text: well you set `night_time = false` everytime before the if statement is called. You will always land in the first case
type: QuestionComment

http://stackoverflow.com/comment/46811707
score: 0
type: AnswerComment
has text: I have updated my answer, please have a look and let me know if this works for you.
type: Comment
comment on: http://stackoverflow.com/a/29307626

karma-jasmine
tags question: http://stackoverflow.com/q/29287600
tags question: http://stackoverflow.com/q/29368019
tags question: http://stackoverflow.com/q/29259647
tags question: http://stackoverflow.com/q/29296608
type: Tag
tags question: http://stackoverflow.com/q/29281855
tags question: http://stackoverflow.com/q/29350793
tags question: http://stackoverflow.com/q/29309154
tags question: http://stackoverflow.com/q/29339437
tag name: karma-jasmine

http://stackoverflow.com/comment/46698566
comment on: http://stackoverflow.com/q/29246298
has text: They definitely might conflict, haven't you worked with extrapolation? It's quite the first example for Angular ... http://www.w3schools.com/angular/angular_examples.asp See how Angular may use `{{` and `}}` too.
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/46651510
type: Comment
comment on: http://stackoverflow.com/a/29221091
has text: I still run into the same issue. Your code works except when I collapse the sidebar (in the less than 1160px) it than shows collapse in the greater than 1160, and I always want it to be showing in that.
score: 0
type: AnswerComment

http://stackoverflow.com/a/29275019
type: Answer
score: 0
answers question: http://stackoverflow.com/q/29273812
has body: IMO, you're breaking some Django MVC rule : you have a method/property which returns HTML, you should use django views preferably. Regarding your JS/Python code, I would do it in 2 steps : 1st, implement a view in Django that returns the geojson payload (using HttpResponse and specifying the mimetype or using JsonResponse in Django 1.7) 2nd, in JS, use Ajax to get response from previously implemented Django view, then in the js callback function, call L.geoJson

http://stackoverflow.com/q/29284248
accepted answer: http://stackoverflow.com/a/29301714
has body: Here's the thing, I generate a PNG image in the application and I get an Image object with JavaScript, something like this... var img = new Image(); img.src = 'data:image/png;base64,' + base64Img; I want to save that image to the internal storage. Is there a plugin or a way I can do this?
favorite count: 0
tagged with: cordova
tagged with: android
has comment: http://stackoverflow.com/comment/46766675
has title: How to save an Image object into a file in Android with Phonegap?
type: AnsweredQuestion
downvote count: 2
upvote count: 1
has answer: http://stackoverflow.com/a/29301714
type: Question
linked to: http://stackoverflow.com/q/21577230
has answer: http://stackoverflow.com/a/29294791
tagged with: javascript
score: -1
answer count: 2
possible better answer: http://stackoverflow.com/a/29294791

http://stackoverflow.com/comment/46683614
has text: Thanks for pointing out this typo. However the typo was only in the post, not in my actual function, so this does not solve the problem. :\
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29238593

http://stackoverflow.com/comment/46759778
comment on: http://stackoverflow.com/q/29279863
score: 0
type: Comment
type: QuestionComment
has text: Could you post the code of you controller Method

http://stackoverflow.com/comment/46812261
type: Comment
has text: Arrays have a `push` method, that will append an item to the end of an array. https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Array/push
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/29309172

http://stackoverflow.com/q/29326971
has title: How to change menu items href without 2 items?
favorite count: 0
has answer: http://stackoverflow.com/a/29327086
has answer: http://stackoverflow.com/a/29327077
score: 2
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29327077
downvote count: 0
type: Question
upvote count: 2
answer count: 2
tagged with: javascript
tagged with: jquery
has body: I'm changed my menu items href by jQuery with check website adress: if(window.location.href.indexOf("en") &gt; -1) { var link = $('#main-nav a'); link.each(function(){ this.href += '-en'; }); }; And it's working really good but I don't want to add string '-en' for 2 special links. How I can do that ? I tried to do something like this, but it's not working: if(window.location.href.indexOf("en") &gt; -1) { var link = $('#main-nav a'); link.each(function(){ if(link.href === "#special1") || (link.href === "#special2"){ return this.href; } else{ this.href += '-en'; } }); };
possible better answer: http://stackoverflow.com/a/29327086
has comment: http://stackoverflow.com/comment/46844126
has comment: http://stackoverflow.com/comment/46844026

http://stackoverflow.com/q/29305341
score: -2
has comment: http://stackoverflow.com/comment/46805119
has comment: http://stackoverflow.com/comment/46805139
upvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/46805203
tagged with: javascript
favorite count: 0
has title: Day of the week - Javascript
has comment: http://stackoverflow.com/comment/46805167
tagged with: getdate
has answer: http://stackoverflow.com/a/29305434
type: UnansweredQuestion
downvote count: 2
has body: Something is really off about my script.. //Day of the Week checkDate = "03/18/15"; year = checkDate.substr(6,2); month = checkDate.substr(0,2); day = checkDate.substr(3,2); var d = new Date("20"+year, month, day); var weekday = new Array(7); weekday[0]= "Sunday"; weekday[1] = "Monday"; weekday[2] = "Tuesday"; weekday[3] = "Wednesday"; weekday[4] = "Thursday"; weekday[5] = "Friday"; weekday[6] = "Saturday"; var n = weekday[d.getDay("20"+year, month, day)]; //RESULT: Sat Apr 18 2015 00:00:00 GMT-0500 (Central Daylight Time) When I put in 03/18/15.. some reason it returns April. If I put in 04/14/15, it returns May. Its always a month ahead of time. Why is that? Something off in my code?
has comment: http://stackoverflow.com/comment/46805322
type: Question

onclicklistener
tag name: onclicklistener
type: Tag
tags question: http://stackoverflow.com/q/29220254

http://stackoverflow.com/q/29332331
has body: I need read a external code that comes through a file that is in the same folder of the html file. The problem is that the HTML isn't running in a server, so I can't use the jQuery load() and other solutions. So I think in load the code via an iframe like this: &lt;iframe id="iframe" src="script1.html"&gt;&lt;/iframe&gt; The text in the file is something like this: One paragraph. Some words Other paragraph, and more words... I need get the sentences and throw in a array, but I even can't get the text via jQuery. I'm trying do this: var text = $("#iframe").val(); But it does nothing, so I tried this inserting the html tags in the file: $('#iframe').contents().find("html").html(); And nothing again. So, how to do it?
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29332507
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46853817
has title: Load iframe content with Javascript (or jQuery)
tagged with: iframe
upvote count: 1
has comment: http://stackoverflow.com/comment/46853947
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/29332495
has comment: http://stackoverflow.com/comment/46854732
linked to: http://stackoverflow.com/q/1796619
score: 0
answer count: 2

http://stackoverflow.com/q/29219757
tagged with: javascript
linked to: http://stackoverflow.com/q/7223359
tagged with: unary-operator
duplicate of: http://stackoverflow.com/q/7223359
favorite count: 0
has answer: http://stackoverflow.com/a/29219835
score: 6
has answer: http://stackoverflow.com/a/29219831
possible better answer: http://stackoverflow.com/a/29219835
upvote count: 6
tagged with: negative-number
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46648533
has title: Negative zero in JavaScript?
type: Question
has comment: http://stackoverflow.com/comment/46648536
answer count: 2
downvote count: 0
accepted answer: http://stackoverflow.com/a/29219831
has body: I've just noticed that I can do the following in JavaScript: var z = -0; console.log(z); // prints -0 Why does the unary negation works on zero? Is this one of the many JavaScript quirks or it does (somehow) have a purpose? P.S.: It seems to be happening on Firefox 38.0a2 and Chrome 41.0.2272. On Node.js v0.10.36 doesn't happen. Dunno about IE.

slick.js
tag name: slick.js
type: Tag
tags question: http://stackoverflow.com/q/29301378

http://stackoverflow.com/comment/46800273
has text: If you wanted to have the ajax error function called when an error happens in PHP you could have it respond with an error code like 500 (Server Error). Other than that you're right you would have to check for errors in the success function
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/29302829
type: Comment

http://stackoverflow.com/comment/46795650
type: QuestionComment
type: Comment
has text: the built-in `split` function can almost do it - but how do you differentiate whether a comma starts a new element, or just appends some new parts? You have to write your own logic for that.
score: 0
comment on: http://stackoverflow.com/q/29300270

http://stackoverflow.com/q/29317358
accepted answer: http://stackoverflow.com/a/29317424
has answer: http://stackoverflow.com/a/29317537
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29317464
tagged with: http://stackoverflow.com/tag/json
linked to: http://stackoverflow.com/q/19189849
has body: I am new to Jquery JSON. I wanted to know is it possible to use JSON as a database to store data and retrieve data whenever it is needed. Like instead of using mysql,or mssql or anything else is there any way to use only JSON(i.e. .json file)?? If yes can you please guide me? if no can anybody suggest a better way to store data? And i need to know this for asp.net webforms.
type: Question
tagged with: javascript
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/29317464
has title: Database using JSON Jquery
tagged with: jquery
tagged with: asp.net
has comment: http://stackoverflow.com/comment/46826613
has answer: http://stackoverflow.com/a/29317424

http://stackoverflow.com/comment/46903992
score: 0
has text: Sorry, it hasn't solved the problem. Also I realised that in your JSBin the code isn't modified in any way?
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/29343125

http://stackoverflow.com/q/29311431
type: AnsweredQuestion
type: Question
score: 0
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/29318623
tagged with: controller
tagged with: angularjs
tagged with: watch
has title: Angular $watch not triggered on change in $scope variable
accepted answer: http://stackoverflow.com/a/29318623
has body: So I have a routine that needs to run with user data that is retrieved at the initialization of the app. My controller for the home page checks to see if there's a token in storage (a logged-in user) and then either runs the routine if $scope.currentUser already exists, or places a watch on it for when the AJAX call returns that data. But the $watch callback is never triggered after its initialization. Here's the Feed Controller code if (sessionStorage.getItem('token')) { if ($scope.currentUser) {getItems()} else {$scope.$watch('currentUser', popFeed()) } } function delayForUser() { if ($scope.currentUser) {popFeed()} } And the Application Controller code if (sessionStorage.getItem('token') &amp;&amp; sessionStorage != 'null') { UserSvc.getUser() .then(function (response) { $scope.currentUser = response.data })

http://stackoverflow.com/q/29339897
has answer: http://stackoverflow.com/a/29359764
accepted answer: http://stackoverflow.com/a/29359764
tagged with: php
type: AnsweredQuestion
tagged with: mysql
type: Question
answer count: 2
linked to: http://stackoverflow.com/q/7802744
has answer: http://stackoverflow.com/a/29339965
tagged with: javascript
has body: I am trying to receive data from MYSQL, to use for voting poll for 2 specific columns, I am storing it in a table, I then added radio button, like yes or no , but because of multiples radio button(displayed for each row of the specified column), I have to have unique identifier and after vote I need to know where the user has clicked to update the database. echo ' Yes: '; echo ' No: '; echo ' '.($row["vegi?"]).' '; }else if (is_null($row["vegi?"]) && !is_null($row["halal?"])){ echo ' '.($row["halal?"]).' '; echo ' Yes: '; echo ' No: '; }else { echo ' Yes: '; echo ' No: '; echo ' Yes: '; echo ' No: '; i think because i am passing php variable its passing as an object and giving me error ultimate want I want to achieve is something like this even though is not working, though the value is being passed as checked by alert(item) and alert(testsplit[0]) ' i am not good with javascript and prefer php, therefore i also tried passing value to another php file but it didn't work , any suggestions how I can make this workable. After debugging I realised that the array is passed however it is not giving the right value any clues?
possible better answer: http://stackoverflow.com/a/29339965
score: 0
has title: passing php value to on click (getFunction(this.value)) problems

http://stackoverflow.com/a/29270496
score: 1
answers question: http://stackoverflow.com/q/29266167
has body: You could run your Protractor tests against CodeShip or Drone.io, both of which offer Chrome and/or Firefox running headless for free. No really...
upvote count: 1
type: Answer
downvote count: 0

http://stackoverflow.com/q/29304265
has body: I tried to make wait when open 4 websites until loading complete then get their title. For that I used readystate which didn't wait until load completes and gave Connecting as title. When I check in console the readystate gives undefined. Below is my code. The sdk I am using is 1.17 and ff is 36.0.4. var tabs = require("sdk/tabs"); tabs.open("https://developer.mozilla.org"); tabs.open("http://www.nytimes.com/"); tabs.open("http://en.wikipedia.org/wiki/Main_Page"); tabs.open("https://www.google.co.in"); for (let tab of tabs) { console.log(tab.title + tab.readystate); };
tagged with: readystate
type: AnsweredQuestion
score: 1
upvote count: 1
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/29316319
tagged with: firefox-addon
accepted answer: http://stackoverflow.com/a/29316319
answer count: 1
downvote count: 0
favorite count: 0
has title: Firefox Addon why readystate for tab gives undefined

http://stackoverflow.com/comment/46884308
type: AnswerComment
has text: Thanks, this worked perfectly! and another thanks for the .push(), almost forgot about that.
type: Comment
comment on: http://stackoverflow.com/a/29349239
score: 0

http://stackoverflow.com/comment/46880587
has text: I would go with its just you. Sometimes you just want to use an inline function.
score: 1
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29347369

http://stackoverflow.com/comment/46808124
type: AnswerComment
type: Comment
has text: This is the main problem that they did not provide any documentation.
comment on: http://stackoverflow.com/a/29306810
score: 0

http://stackoverflow.com/comment/46673908
comment on: http://stackoverflow.com/a/29230386
score: 0
type: Comment
has text: What do you mean? It works in the fiddle, do you mean it doesn't work when you are trying to use it? Some other CSS or HTML could be influencing it.
type: AnswerComment

http://stackoverflow.com/q/29285286
tagged with: javascript
has title: Live connect on chrome extension
has body: Hello I am trying to use Microsoft OAuth in order to be able to login with Outlook credentials inside a chrome extension. I am using the javascript Library (https://msdn.microsoft.com/en-us/library/hh550844.aspx) but i am not being able to do it. I am doing the following. WL.init({ client_id: "foo_bar", scope: "wl.signin", redirect_uri:"http://www.contoso.com/redirect", response_type: "token" }); and then WL.login() what is happening is that I am being redirected to http://www.contoso.com/redirect but when I close the popup I get the following message [WL]WL.login: The popup is closed without receiving consent. I think the problem is the redirect_uri but how can I do this with a chrome extension?
has comment: http://stackoverflow.com/comment/46774165
tagged with: google-chrome-extension
answer count: 1
has comment: http://stackoverflow.com/comment/46801833
has comment: http://stackoverflow.com/comment/46801982
accepted answer: http://stackoverflow.com/a/29308855
type: AnsweredQuestion
score: 0
tagged with: oauth-2.0
has comment: http://stackoverflow.com/comment/46810426
tagged with: google-chrome
type: Question
has comment: http://stackoverflow.com/comment/46804024
tagged with: liveconnect
has comment: http://stackoverflow.com/comment/46804474
has answer: http://stackoverflow.com/a/29308855

http://stackoverflow.com/comment/46676610
type: Comment
comment on: http://stackoverflow.com/a/29235213
score: 0
type: AnswerComment
has text: this worked, however, i do fully understand what the `xmlhttp.setRequestHeader` does, can you please explain?

http://stackoverflow.com/a/29372105
accepted answer of: http://stackoverflow.com/q/29372037
type: Answer
upvote count: 2
answers question: http://stackoverflow.com/q/29372037
score: 2
has body: Pass $event as a parameter to ng-mouseover callback function to get the element reference. ng-mouseover="enableDragging($event)" in controller function enableDragging(event){ var element = event.target; console.log(element) } If you want to update the class of Dom node based on a condition, you can try ng-class directive.
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/46727229
has text: Just move the exact code you specified outside of the `click` handler function.
score: 0
comment on: http://stackoverflow.com/q/29262582
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29240324
has body: i have tried to figure this out but unsure on what to do next. what i am trying to do is have an array of values, and a starting value, ie startingvalue =2 array = 1, 3, 5, 7, 9 what i need returning is, 2 which is (2x1) 6 which is value above x array value 3 30 which is value above x array value 5 210 which is value above x array value 7 1890 which is value above x array value 9 this is what i have done so far, but it returns 2 6 10 14 18 and doesnt use the previous value to do the multiplication var startingValue = prompt("What Is The Starting Value"); var VXP = [1, 3, 5, 7, 9]; var text = ""; var i; for (i = 0; i &lt; VXP.length; i++) { result = text += VXP[i] * startingValue + "&lt;br&gt;"; } document.getElementById("demo").innerHTML = result;
type: Question
tagged with: arrays
has answer: http://stackoverflow.com/a/29240444
tagged with: javascript
has title: adding values and keeping a running total
score: 0
answer count: 1
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46687121

http://stackoverflow.com/comment/46836823
type: Comment
has text: @MikeCheel: You are correct sir. As I have done below, and got down-voted for it. Obviously this is not the case :-\
type: QuestionComment
comment on: http://stackoverflow.com/q/29303164
score: 0

http://stackoverflow.com/a/29260806
score: 1
has body: .getElementsByName() method returns an array-like node list, so you'll need to specify an index in order to retrieve a specific input's value (because the value property only applies to DOM elements, not an entire list). function submitApp() { var authValue = document.getElementsByName("appAuthor")[0].value; var titleValue = document.getElementsByName("appTitle")[0].value; alert(authValue); }
downvote count: 0
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/29260745

http://stackoverflow.com/comment/46889370
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29351598
has text: Just remember in jQuery that you can't append unclosed HTML elements—they will be closed, if necessary—leading to creation of a lot of empty elements. It's different from using string concatenation, where you can combine or separate open and close tags.

http://stackoverflow.com/comment/46866888
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/29339580
has text: You need to use session_start() before you do any use of them, and it seems like you don't use it when you read the sessions ..
type: Comment

http://stackoverflow.com/comment/46888010
score: 0
type: Comment
has text: Here's a function which will copy all variables that don't exist in the destination object. http://jsfiddle.net/76pmu4ou/
comment on: http://stackoverflow.com/a/29350728
type: AnswerComment

http://stackoverflow.com/a/29398873
answers question: http://stackoverflow.com/q/29240441
has body: You should avoid the for() loop in linear arrays: var v_circle_collection = [550, 450, 350, 450, 1000, 1450, 1900, 2350, 2200, 2200, 2800, 2700, 2600, 2700, 3250, 3050]; var circleCollection = [450, 900, 1350, 1800, 2250, 2700, 3150]; v_circle_collection.forEach(function(v_c_c){ circleCollection.forEach(function(cc){ if(v_c_c &gt; cc) { ... } }); }); If you need a svg + data, consider the d3.js library
score: 0
type: Answer

http://stackoverflow.com/q/29240244
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29240301
tagged with: angularjs-ng-repeat
possible better answer: http://stackoverflow.com/a/29240581
has title: Access anonymous array using NgRepeat
tagged with: angularjs
has answer: http://stackoverflow.com/a/29240581
tagged with: object
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29240301
has body: I have a multi-level array containing some objects at its deepest level. [ [ [ "FUND", { "totassets":10.9, "totdate":"2015-03-23", "expratiogross":1.35, "exprationet":1.08 } ], [ "DAILY", { "navdate":"2015-03-23", "nav":10.05, "chgamt":0, "chgpct":0, "pop":10.05, "ytdreturn":2.03, "curr7dayyield":0, "eff7dayyield":0, "unsub7dayyield":0, "30dayyield":0, "30dayloadyield":0 } ] ] ] I would like to use ngRepeat to display all the items in "FUND" or "DAILY" but I'm unsure how to access objects this deep without names for each of the arrays above. Sorry if this is a basic question but I wasn't able to find an answer elsewhere.
type: Question
score: 0
answer count: 2
tagged with: arrays

http://stackoverflow.com/a/29357706
has body: I've modified your code to incorporate the tooltip from your example link. The keys are this: 1.) Append the div tooltip to your html body (note, your html was malformed, it didn't have a body, I added those tags): var tooltip = d3.select('body') .append('div') .attr('class', 'tooltip') .style("opacity", 0); 2.) On mouseover/mouseout of your points update the div's html and show/hide the tooltip: svg.selectAll(".point") .data(session_data) .enter() .append("path") .on("mouseover", function(d, i) { // show it and update html d3.select('.tooltip') tooltip.transition() .duration(200) .style("opacity", .9); tooltip.html(d.x) .style("left", (d3.event.pageX + 5) + "px") .style("top", (d3.event.pageY - 28) + "px"); }) .on("mouseout", function(d, i) { tooltip.transition() .duration(500) .style("opacity", 0); }) .attr("class", "point") ... Working example here.
has comment: http://stackoverflow.com/comment/46911596
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/29357160
accepted answer of: http://stackoverflow.com/q/29357160
type: Answer
upvote count: 3
score: 3

http://stackoverflow.com/comment/46772785
type: Comment
type: QuestionComment
has text: @Mwayi Here the plunker http://plnkr.co/edit/N2knCv17rQqPBK5Pl5rG?p=info Align still not works (weird !?), but idea is clear
score: 0
comment on: http://stackoverflow.com/q/29286512

http://stackoverflow.com/comment/91566072
type: Comment
has text: @iwayankit can you please update the answer, ill accept it.
comment on: http://stackoverflow.com/a/32509639
type: AnswerComment
score: 0

http://stackoverflow.com/comment/46747796
has text: Just use a regular expression.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29274240

validation
tags question: http://stackoverflow.com/q/29283700
tags question: http://stackoverflow.com/q/29357137
tags question: http://stackoverflow.com/q/29246268
tags question: http://stackoverflow.com/q/29342473
tags question: http://stackoverflow.com/q/29297826
type: Tag
tag name: validation
tags question: http://stackoverflow.com/q/29350787
tags question: http://stackoverflow.com/q/29268934
tags question: http://stackoverflow.com/q/29277632
tags question: http://stackoverflow.com/q/29370764
tags question: http://stackoverflow.com/q/29333125
tags question: http://stackoverflow.com/q/29300829
tags question: http://stackoverflow.com/q/29255291
tags question: http://stackoverflow.com/q/29337121
tags question: http://stackoverflow.com/q/29224128
tags question: http://stackoverflow.com/q/29313838
tags question: http://stackoverflow.com/q/29329306
tags question: http://stackoverflow.com/q/29331917
tags question: http://stackoverflow.com/q/29241898
tags question: http://stackoverflow.com/q/29321442
tags question: http://stackoverflow.com/q/29301337
tags question: http://stackoverflow.com/q/29225639
tags question: http://stackoverflow.com/q/29332804
tags question: http://stackoverflow.com/q/29260718
tags question: http://stackoverflow.com/q/29294843
tags question: http://stackoverflow.com/q/29259971
tags question: http://stackoverflow.com/q/29359550
tags question: http://stackoverflow.com/q/29317375
tags question: http://stackoverflow.com/q/29253095
tags question: http://stackoverflow.com/q/29313912
tags question: http://stackoverflow.com/q/29225283
tags question: http://stackoverflow.com/q/29350708
tags question: http://stackoverflow.com/q/29237407
tags question: http://stackoverflow.com/q/29276550
tags question: http://stackoverflow.com/q/29293800
tags question: http://stackoverflow.com/q/29333659
tags question: http://stackoverflow.com/q/29335741
tags question: http://stackoverflow.com/q/29275649
tags question: http://stackoverflow.com/q/29274618
tags question: http://stackoverflow.com/q/29249626
tags question: http://stackoverflow.com/q/29269640

http://stackoverflow.com/a/29241913
type: Answer
upvote count: 4
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29236968
answers question: http://stackoverflow.com/q/29236968
has body: You can use isElementPresent(): var locator = by.linkText('Log off'); browser.isElementPresent(locator).then(function (present) { if (present) { element(locator).click(); } });
score: 4
type: AcceptedAnswer

http://stackoverflow.com/comment/46737429
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29267829
has text: I know how do it in JS, I can't connect file A.php with B.php, how file A.php check status B.php? Or how can I check status in another way?

http://stackoverflow.com/comment/47099719
comment on: http://stackoverflow.com/a/29310291
has text: check the Paul's answer [here](http://stackoverflow.com/questions/29438891/how-can-i-save-tasks-in-dhtmlx-gantt#answer-29468758) , seems like you simply do not apply the lightbox values to the client-side gantt
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/46925046
type: AnswerComment
score: 0
type: Comment
has text: @RoryMcCrossan I have prepared a [fiddle](http://jsfiddle.net/Scopestyle/hbhg4ydo/3/). Would you please take a look and see if you could tell me what I'm missing?
comment on: http://stackoverflow.com/a/29371061

http://stackoverflow.com/q/29325973
possible better answer: http://stackoverflow.com/a/29326612
has answer: http://stackoverflow.com/a/29326612
upvote count: 1
has comment: http://stackoverflow.com/comment/46842541
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46843325
tagged with: javascript
type: Question
tagged with: replace
answer count: 2
downvote count: 4
has comment: http://stackoverflow.com/comment/46842465
has title: Javascript Replace HTML tag on a page
has answer: http://stackoverflow.com/a/29326071
favorite count: 0
accepted answer: http://stackoverflow.com/a/29326071
score: -3
has body: I need a Simple script that searches a HTML for a certain code so its not displayed. My current code only replaces the whole text. But if a person changes 1 item, it can't find it. Is there a way to make a Wild Card, to find text like: Thesite ...and if it finds something with <*yourdomain* then it replaces the whole <a href....>.. with Blank? My current code is : function checkLoad(){ if (document.readyState === "complete") { document.body.innerHTML = document.body.innerHTML.replace( ' My Website is redriv ', "" ); } else { setTimeout('checkLoad();', 500) } }

http://stackoverflow.com/comment/46713514
score: 0
has text: i have 4 columns in which one is checkbox if that check box is checked i want to get the data of the remaining columns of that row.. so that i can display them in next page with out checkbox.. as confirmation that they are checked.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29255113

http://stackoverflow.com/a/29348052
score: 4
accepted answer of: http://stackoverflow.com/q/29347240
has body: You need to enable strict mode in order to use let. You can either: "use strict" let x = 31 console.log(x) Or: node --harmony --use_strict index.js Then it works as expected: victor@ubuntu:~/Documents$ node --harmony --use_strict index.js 31
answers question: http://stackoverflow.com/q/29347240
upvote count: 4
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/a/29365798
downvote count: 0
has comment: http://stackoverflow.com/comment/46918722
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/29352971
has body: Using skew (or rather shear) to fill tiles only works if the cell is a parallelogram, as 2D affine transforms only support this shape. Here is one approach: Calculate angle of upper line Calculate angle of left line Calculate width and height of cell In a parallelogram bottom line will equal upper line, and of course right line equals left line. Then set these angles as skew arguments for the transform coupled with translate to the upper left corner. Then just repeat for each cell. Example var img = new Image; img.onload = function() { var ctx = document.querySelector("canvas").getContext("2d"), tile1 = [ {x: 10, y: 10}, // upper left corner {x: 210, y: 50}, // upper right {x: 230, y: 150}, // bottom right {x: 30, y: 110} // bottom left ], tile2 = [ {x: 210, y: 50}, {x: 410, y: 5}, {x: 430, y: 105}, {x: 230, y: 150} ]; renderTile(this, tile1); renderTile(this, tile2); function renderTile(img, tile) { var dx, dy, a1, a2, w, h, i = 1; // reference shape (remove this section): ctx.setTransform(1,0,0,1,0,0); ctx.moveTo(tile[0].x, tile[0].y); while(i &lt; 4) ctx.lineTo(tile[i].x, tile[i++].y); ctx.closePath(); ctx.strokeStyle = "#0c0"; ctx.lineWidth = 2; ctx.stroke(); // calc horizontal angle dx = tile[1].x - tile[0].x; // horizontal diff. dy = tile[1].y - tile[0].y; // vertical diff. a1 = Math.atan2(dy, dx); // angle, note dy,dx order here w = dx|0; // width based on diff for x // calc vertical angle dx = tile[3].x - tile[0].x; dy = tile[3].y - tile[0].y; a2 = Math.atan2(dx, dy); // note dx,dy order here h = dy|0; // draw image to fit parallelogram ctx.setTransform(1, a1, a2, 1, tile[0].x, tile[0].y); ctx.drawImage(img, 0, 0, w, h); } }; img.src = "http://i.imgur.com/rUeQDjE.png"; &lt;canvas width=500 height=160/&gt; Note: if your cloth simulation produces other shapes than parallelograms (ie. quadrilaterals), which is very likely since this is a physics simulation, this approach won't work well. In that case you need different techniques which are more compute heavy. F…
accepted answer of: http://stackoverflow.com/q/29352971
type: AcceptedAnswer

http://stackoverflow.com/comment/46774702
type: Comment
comment on: http://stackoverflow.com/a/29268291
has text: Agreed. I'm just unsure of how to translate the project I'm working on into the jsfiddle. It's got a HUGE json file and super weird connections to everything.
type: AnswerComment
score: 0

http://stackoverflow.com/q/29357814
downvote count: 0
answer count: 1
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29358581
favorite count: 0
has body: I'm using Leaflet.Draw, and I want to allow the lines that I draw to have hyperlinks in them so that someone can click on the link and open a new page. How do I add a link to a polyline created via Leaflet.Draw? When I addLayer to drawnItems, how can I give that layer another attribute that could be a URL? var map = L.map('map').setView([-41.2858, 174.78682], 14); mapLink = '&lt;a href="http://openstreetmap.org"&gt;OpenStreetMap&lt;/a&gt;'; L.tileLayer( 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { attribution: '&amp;copy; ' + mapLink + ' Contributors', maxZoom: 18, }).addTo(map); var drawnItems = new L.FeatureGroup(); map.addLayer(drawnItems); var drawControl = new L.Control.Draw({ edit: { featureGroup: drawnItems } }); map.addControl(drawControl); map.on('draw:created', function (e) { var type = e.layerType, layer = e.layer; drawnItems.addLayer(layer); });
upvote count: 2
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29358581
tagged with: leaflet
type: Question
tagged with: openstreetmap
has comment: http://stackoverflow.com/comment/46901806
has title: How do you add hyperlinks to Leaflet polylines created via Leaflet.Draw?

http://stackoverflow.com/q/29368719
has answer: http://stackoverflow.com/a/29369021
answer count: 2
upvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/29368992
has comment: http://stackoverflow.com/comment/46919319
has title: number of text fields equal to number selected from dropdown menu
tagged with: http://stackoverflow.com/tag/html
tagged with: css
accepted answer: http://stackoverflow.com/a/29368992
downvote count: 1
type: Question
type: AnsweredQuestion
tagged with: popup
has body: http://jsfiddle.net/bbh2y4dL/5/ HTML 0 1 2 3 4 5 ADD MORE Add Age Close CSS .black_overlay { display: none; position: absolute; top: 0%; left: 0%; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.5); z-index:1001; -moz-opacity: 0.8; opacity:.80; filter: alpha(opacity=80); } .white_content { display: none; position: absolute; top: 25%; left: 25%; width: 50%; height: 50%; padding: 16px; border-radius:7px; background-color: rgba(255, 255, 255, 1); z-index:1002; overflow: auto; } .form-control { display: block; width: 100%; height: 26px; padding: 2px 0px 2px 12px; font-size: 14px; line-height: 1.428571429; color: #010F2B; vertical-align: middle; background-color: #E6E8E9; border: 2px solid #ebebeb; border-radius: 4px; -webkit-transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s; transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s; } javascript $(function () { $(".repeat").on('click', function (e) { e.preventDefault(); var $self = $(this); $self.before($self.prev('table').clone()); }); }); $(document).ready(function () { $(".childage").change(function () { var selVal = $(this).val(); $(".textboxDiv").html(''); if (selVal > 0) { $(".add").css("display", "block"); for (var i = 1; i <= selVal; i++) { $(".textboxDiv").append(' '); } } else { $(".add").css("display", "none"); } }); }); I'm trying to create a popup which displays number of text field equal to number of value selected, its doing fine in this code but the problem is that i have to also duplicate the select box and then create the same functionality with all created selectbox...check my fiddle and suggest any solution
has comment: http://stackoverflow.com/comment/46919289
score: -1
possible better answer: http://stackoverflow.com/a/29369021

each
tags question: http://stackoverflow.com/q/29313838
tags question: http://stackoverflow.com/q/29277108
tags question: http://stackoverflow.com/q/29251738
type: Tag
tags question: http://stackoverflow.com/q/29300537
tag name: each

http://stackoverflow.com/comment/46826621
comment on: http://stackoverflow.com/a/29317066
score: 0
type: AnswerComment
has text: What does the form look like for that? I get what you mean, I just have absolutely no idea what the code looks like for that
type: Comment

http://stackoverflow.com/a/29230666
upvote count: 5
score: 5
type: AcceptedAnswer
downvote count: 0
has body: Since we are using jQuery I would like to propose this approach: HTML: hide First name: Last name: jQuery: var myForm = $('#myForm'); var toggleMyForm = $('#toggleMyForm'); toggleMyForm.on('click', function(){ myForm.toggle(); myForm.is(":visible") ? $(this).html('hide') : $(this).html('show'); }); Test here: http://jsfiddle.net/urahara/obm39uus/ NOTE: don't put yourself in the position where you have multiple submit buttons in a , you can distinguish between them by using value attribute, but still in my opinion it's better to keep clean design with one submit per form. don't repeat jQuery fetching calls. make a handle of a element: var myForm = $('myForm'); then use it like this e.g: myForm.show()
answers question: http://stackoverflow.com/q/29228163
type: Answer
accepted answer of: http://stackoverflow.com/q/29228163

http://stackoverflow.com/q/29319071
answer count: 2
has answer: http://stackoverflow.com/a/33556629
accepted answer: http://stackoverflow.com/a/29319179
tagged with: javascript
has title: Sails.js Increment Attribute
score: 0
possible better answer: http://stackoverflow.com/a/33556629
has answer: http://stackoverflow.com/a/29319179
tagged with: node.js
tagged with: model-view-controller
type: AnsweredQuestion
tagged with: sails.js
has body: I'm using Sails.js, and trying to increment an attribute in my model by one when a function is called. It works and increments and return JSON with the value as 1, but never saves to the database, so when I make a get request later, the value is still 0. Function: addVote: function (req, res, next) { Nomination.findOne(req.param('id'), function foundNomination(err, nom) { if(err) return next(err); if(!nom) return next(); Nomination.update(req.param('id'), { votes: nom.votes++ }) return res.json({ votes : nom.votes }); }); }, EDIT: Now this is weird. Must be some scoping issue. When I change the code to this, the console outputs 0 then 1. If I take out the second console.log, it outputs 1... addVote: function (req, res, next) { var newVotes = 0; Nomination.findOne(req.param('id'), function foundNomination(err, nom) { if(err) return next(err); if(!nom) return next(); nom.votes++; newVotes = nom.votes; console.log(newVotes); }); console.log(newVotes); Nomination.update(req.param('id'), { votes: newVotes }, function(err) { if(err) return res.negotiate(err); return res.json({ votes : newVotes }); }); }, AHHA! It's calling the Update function before findOne. But why, and how do I stop it?
type: Question

http://stackoverflow.com/comment/46679997
comment on: http://stackoverflow.com/q/29236730
type: Comment
has text: I would like the end result of HTML to look like this: You must enter your name. Instead of the div appearing before tag
score: 0
type: QuestionComment

http://stackoverflow.com/comment/46770367
has text: All you said is correct, but doesn't really address the OP's question/problem. `Object.create` still creates an object.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29283427
type: AnswerComment

http://stackoverflow.com/a/29256133
has body: I don't know how to loop through key-values from objects with different numbers of pairs key-value. Javascript doesn't have a foreach() function as can be PHP. So, Javascript does have a forEach and below is how you loop thru to get key values from an object. var myObj = [{ "key1": "value1", "key2": "value2" }, { "key1": "value1", "key2": "value2", "key3": "value3" }]; myObj.forEach(function(val, index) { for (var key in val) { alert ("Array item: " + (index+1) + " Key: " + key + " Value: " + val[key]); } }); For all browsers including &lt;=IE8 for (var i=0, j=myObj.length; i&lt;j; i++) { for (var key in myObj[i]) { alert ("Array item: " + (i+1) + " Key: " + key + " Value: " + myObj[i][key]); } }
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/29254349
accepted answer of: http://stackoverflow.com/q/29254349
has comment: http://stackoverflow.com/comment/46754602
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46747242
downvote count: 0

http://stackoverflow.com/comment/46878888
type: QuestionComment
has text: Try with url as UserGroups.aspx/GetGroupList
type: Comment
comment on: http://stackoverflow.com/q/29346288
score: 0

apache
tag name: apache
tags question: http://stackoverflow.com/q/29220270
tags question: http://stackoverflow.com/q/29290145
type: Tag
tags question: http://stackoverflow.com/q/29237212

http://stackoverflow.com/comment/46834716
score: 0
type: Comment
has text: Hi sorry if I wasn't very clear, I need a way to load images into a container if that makes sense.
comment on: http://stackoverflow.com/a/29321680
type: AnswerComment

http://stackoverflow.com/a/29346655
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/29346600
upvote count: 1
type: Answer
has body: Just save required this into a variable and use it in other scopes function Foo (name) { var _this = this; // &lt;-- store function's this this.name = name; var _ = {}; _.bar = {}; _.bar.print() = function () { return _this.name; // use stored _this }; this.print = function () { console.log(_.bar.print()); }; }

http://stackoverflow.com/comment/46816415
type: QuestionComment
score: 6
comment on: http://stackoverflow.com/q/29311401
has text: What about it isn't working?
type: Comment

http://stackoverflow.com/comment/46666282
type: Comment
type: QuestionComment
score: 0
has text: Try the search next time, this kind of questions have for sure been asked multiple times already.
comment on: http://stackoverflow.com/q/29229808

http://stackoverflow.com/q/29318733
has title: How can I format minutes into hour and minutes but only show hour if it's > 60 minutes?
has answer: http://stackoverflow.com/a/29318780
accepted answer: http://stackoverflow.com/a/29318780
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/29318983
tagged with: javascript
possible better answer: http://stackoverflow.com/a/29318798
score: 0
has answer: http://stackoverflow.com/a/29318828
upvote count: 1
has body: I have this function that converts minutes into an hour / minute format: return Math.floor(diffMins / 60) + " Hour " + diffMins % 60 + " Minutes."; What I would like to do is to make it so that if there are no hours then the "0 hours" does not show. Can anyone recommend a good way that I can do this?
has answer: http://stackoverflow.com/a/29318825
favorite count: 0
answer count: 5
has answer: http://stackoverflow.com/a/29318798
type: AnsweredQuestion

http://stackoverflow.com/q/29229232
has title: Does preventing the onkeypress event also prevent onchange? Is there a way I can circumvent this?
has comment: http://stackoverflow.com/comment/46665661
type: Question
tagged with: javascript
has body: I'm using a custom-made mask input that calls event.preventDefault() on keypress. When I try to add an onchange event to it, it simply never fires. It's properly attached, since manually firing .change() with jQuery works. I've removed the preventDefault call from the keypress handler to test, and onchange does indeed fire. Is this behaviour intended? Is there a way I can get around it? I don't think I can do this without preventing default on keypress, because there's a whole bunch of condition checking and selection range manipulation that happens after the key gets inserted into the input.
has comment: http://stackoverflow.com/comment/46665743
score: 0
tagged with: dom-events
type: UnansweredQuestion
answer count: 0

http://stackoverflow.com/comment/46683429
has text: That toggle will only switch from green to blue. OP wants all blocks to cycle through all 4 colors.
comment on: http://stackoverflow.com/q/29238352
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29248403
has comment: http://stackoverflow.com/comment/46739690
has comment: http://stackoverflow.com/comment/46703391
type: Question
tagged with: javascript
tagged with: sqlite
has title: The statement callback raised an exception or statement error callback did not return false
tagged with: jaydata
type: UnansweredQuestion
tagged with: cordova
has body: I'm getting this error: SQLError { code: 0, message: "the statement callback raised an exception or statement error callback did not return false"` } When running a Cordova program (which uses JayData). What does this error mean? what causes it? What should I look at to fix it?
answer count: 0
score: 0

http://stackoverflow.com/q/29294858
answer count: 1
has comment: http://stackoverflow.com/comment/46785851
tagged with: ajax
tagged with: jqxhr
has answer: http://stackoverflow.com/a/29294902
has title: How to return data in jQuery Ajax?
accepted answer: http://stackoverflow.com/a/29294902
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/14220321
has comment: http://stackoverflow.com/comment/46785849
has comment: http://stackoverflow.com/comment/46785698
type: Question
has comment: http://stackoverflow.com/comment/46785639
has body: let's say i have a simple function: function test(url){ var AjaxCall = $.ajax({ type: GET, url: url, data: {}, success: function(data,status,xhr){ return xhr }, error: function(xhr,e){ return xhr } }); if(xhr.status === 200)console.log('success'); } So what i want is to treat the errors inside the function not after calling it and adding the callback in the call to treat those error for example, is this possible?
duplicate of: http://stackoverflow.com/q/14220321
tagged with: javascript
tagged with: jquery
score: 0

http://stackoverflow.com/a/29345184
score: 1
downvote count: 0
has body: Replace: $('#response_is_accepted') With: $('.response_is_accepted') The elements in your HTML have "response_is_accepted" in their class, not as id, so you'll need to use the class selector (.) In case you only want the &lt;input&gt; elements, use this instead: $('.response_is_accepted input.form-control')
answers question: http://stackoverflow.com/q/29345126
has comment: http://stackoverflow.com/comment/46876640
has comment: http://stackoverflow.com/comment/46876870
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/46876800
has comment: http://stackoverflow.com/comment/46876803

http://stackoverflow.com/q/29361027
has answer: http://stackoverflow.com/a/30983691
score: 14
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46906686
accepted answer: http://stackoverflow.com/a/30983691
has comment: http://stackoverflow.com/comment/49092789
upvote count: 14
type: Question
has comment: http://stackoverflow.com/comment/46997542
has title: Angular alternative $http
tagged with: javascript
has body: In AngularJS for sending a request I use the builtin $http service. What shall I use for sending a request to a server in Angular? I can't find any doc that covers the subject.
answer count: 2
tagged with: angular
has answer: http://stackoverflow.com/a/31552980
has comment: http://stackoverflow.com/comment/46964267
downvote count: 0
tagged with: angular-http
has comment: http://stackoverflow.com/comment/46907144
favorite count: 0
tagged with: ajax
possible better answer: http://stackoverflow.com/a/31552980

http://stackoverflow.com/comment/46689491
has text: I've tried using python's geopy's geocoder module, but found issues, IL, USA gives no matches, but NY, USA does :'(
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29241417

http://stackoverflow.com/comment/46752972
score: 0
type: AnswerComment
has text: There is no difference in HTML or JS values as everything resolves to absolute URLs in the browser!! Only thing is that while comparing you should check for the existence of the images rather than checking equality of URLs which will be different for each environment.
type: Comment
comment on: http://stackoverflow.com/a/29277348

http://stackoverflow.com/a/30035351
answers question: http://stackoverflow.com/q/29289126
has body: The best solution I have is hiding all the elements of the link (in the doc they explain which are these elements). I made this function to do it : var attrObject = { '.connection': {display:"none"}, //the link '.marker-target': {display:"none"}, 'text': {display:"none"}, //because I have a label 'rect': {display:"none"}, //second element of label '.connection-wrap': {display:"none"},//a bigger link highliting on hover 'g.marker-vertices': {display:"none"}, //vertice of the link 'g.link-tools': {display: 'none'}, // the button to delete the link 'g.marker-arrowheads': {display:"none"} //the arrow to change link targets }; link.attr(attrObject);
accepted answer of: http://stackoverflow.com/q/29289126
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/48330812
type: Answer
downvote count: 0
score: 1

http://stackoverflow.com/q/29346698
has title: EmberData unloadAll doesn't work on IE8. Works on Chrome/FireFox
upvote count: 1
answer count: 1
downvote count: 0
tagged with: ember-cli
favorite count: 0
type: UnansweredQuestion
tagged with: ember.js
score: 1
has body: Thanks in advance for the help ! I am having a problem refreshing my model on IE8. (Works on Chrome Chrome and Firefox) I run this code to refresh my model with a request to the database using my adapter. Through this command I am unloading the data of the model and reloading it again to display it to the user: var type = self.controller.get('model').type; this.controller.get('model').get('store').unloadAll(type); this.controller.get('model').get('store').fetchAll(type); No Javascript errors. I have looked for a solution but not a clue about it. Any idea? Thanks ! EDIT : I got a solution. IE8 was caching my fetchAll() method from Ember Data. The solution was to manually set on the response header that I didn't want Cache: Cache-Control:no-cache Content-Type:application/json Date:Tue, 31 Mar 2015 09:35:48 GMT Pragma:no-cache Server:Apache-Coyote/1.1 Transfer-Encoding:chunked Thanks !!
type: Question
tagged with: internet-explorer-8
has answer: http://stackoverflow.com/a/29349141
tagged with: ember-data
tagged with: javascript

http://stackoverflow.com/comment/56499175
comment on: http://stackoverflow.com/a/29304258
type: AnswerComment
type: Comment
score: 1
has text: because some people here just down vote things without analyzing :) #true_story

http://stackoverflow.com/comment/46884031
score: 0
type: AnswerComment
type: Comment
has text: I don't know, because you haven't yet shown what the token might be and what it should match to. Add an example with markup into your question.
comment on: http://stackoverflow.com/a/29323954

http://stackoverflow.com/comment/46697681
comment on: http://stackoverflow.com/a/29246062
score: 0
has text: this seems good. How do i manage the a/link on item title? What i mean is, I want the item-title to be a regular link.
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/46839424
type: Comment
comment on: http://stackoverflow.com/q/29324189
type: QuestionComment
has text: Why do you need `i` to increase to it's maximum potential?
score: 0

http://stackoverflow.com/comment/46727822
score: 0
type: Comment
has text: I understand the boolean false, the variable but how does this play together? How does the browser understand that you mean the actual function being played
type: AnswerComment
comment on: http://stackoverflow.com/a/29262701

http://stackoverflow.com/q/29360230
tagged with: javascript
has title: How to keep localstorage session specific?
accepted answer: http://stackoverflow.com/a/29360488
tagged with: http://stackoverflow.com/tag/html
has body: So we have a web application that is accessed through a link from an email. When the user clicks on the link, we call a web service to pull the necessary data to the client. This data is then stored in the client's localstorage for the span of the user's session and cleared after. The problem here is that if a user clicks on the link twice and logs out of one of the sessions, the local storage is cleared for both of the sessions. So I've been thinking about solving this issue and here are my possible solutions: Reusing the same tab for the external links of the same domain. But its not possible as of now. Append the session Id to the keys of the localstorage and clear only them at logout. But in this case if someone does not logout properly, the local storage items will still persist and we don't want that. So I'd like to know if there is any way to keep the local storage session specific or else if I should be skipping localstorage entirely. Thanks!
has answer: http://stackoverflow.com/a/29360488
tagged with: local-storage
type: AnsweredQuestion
tagged with: session
has comment: http://stackoverflow.com/comment/46905281
type: Question
has comment: http://stackoverflow.com/comment/46904576
score: 0
linked to: http://stackoverflow.com/q/19119551
answer count: 1

http://stackoverflow.com/comment/46883942
comment on: http://stackoverflow.com/q/29349101
score: 0
type: Comment
has text: Side note: I'm not sure you can use `global` as a variable name in JS. TBC. I don't fully understand your problem. What are you trying to achieve?
type: QuestionComment

http://stackoverflow.com/a/58733173
answers question: http://stackoverflow.com/q/29280445
has body: I was looking for a pretty and simple solution and I found this: this.setState({ [`image${i}`]: image }) Hope this helps
type: Answer
score: 8
downvote count: 0
upvote count: 8

http://stackoverflow.com/comment/46692524
comment on: http://stackoverflow.com/q/29236962
type: QuestionComment
has text: I believe you are seeing this because ng-if removes/creates DOM elements (unlike ng-hide/ng-show which just change the display of the elements). See https://docs.angularjs.org/api/ng/directive/ngIf
type: Comment
score: 1

http://stackoverflow.com/comment/46783810
score: 1
type: Comment
comment on: http://stackoverflow.com/a/29293707
has text: it's not me. I can't down vote yet. I think you need 125 reputation to down vote.
type: AnswerComment

http://stackoverflow.com/comment/46810362
type: Comment
type: QuestionComment
has text: It worked for me.. https://jsfiddle.net/p8oqh4vp/ make sure you included the .js file
comment on: http://stackoverflow.com/q/29308142
score: 0

http://stackoverflow.com/comment/46691521
type: QuestionComment
comment on: http://stackoverflow.com/q/29237840
has text: @Backer I'd recommend running your html through a validation tool, if your text editor doesn't do it already (I recommend Sublime Text with a couple of linter plugins). Also check your console for javascript errors. If all seems right, try copying my "version" of your code and adapt it back to your page.
score: 0
type: Comment

http://stackoverflow.com/q/29276779
accepted answer: http://stackoverflow.com/a/29292817
has body: I'm reading this book about angular's services. When summarizing about when to use service and factory methods of provider the author states the following: The service method should be used if you define your services as a class and need to invoke the definition's constructor function. Use the factory method if you define your service as an object instance and do not need to invoke a constructor. I'm wondering whether this is a typo or I have been misusing them. I've always used the factory method to get constructors and service when I needed instances. EDIT: For example, I have a validator service and each controller in the app should have it's own instance. I define it as a class: function ValidatorService() { this.addErrorRule = function (event, rule) {}; this.validate = function (values) {} } Now, I would define it in the angular system using factory method like this: angular.module("validation").factory('ValidatorService', function () { return ValidatorService; }); Whenever a controller requires ValidatorService it will be provided with the constructor from which a service can be instantiated. But according to the quote: The service method should be used if you define your services as a class and need to invoke the definition's constructor function. I should have done like this: angular.module("validation").service('ValidatorService', ValidatorService); But in this case angular will instantiate one instance of the service which will be shared among all controllers.
tagged with: javascript
has answer: http://stackoverflow.com/a/29656262
score: 0
tagged with: angularjs
answer count: 3
has comment: http://stackoverflow.com/comment/46752620
has answer: http://stackoverflow.com/a/29292817
has answer: http://stackoverflow.com/a/29276848
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29276848
has title: when to use factory and when to use service - counter approach is suggested in a book
type: Question

http://stackoverflow.com/q/29225552
tagged with: css
type: AnsweredQuestion
has title: How to make jQuery target and attach a plugin call to hundreds of CSS ID's with an ID number at the end of them?
tagged with: edit-in-place
type: Question
has answer: http://stackoverflow.com/a/29225576
tagged with: x-editable
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46661213
score: 0
has body: I am using one of my favorite JavaScript libraries for in-place editing call X-Editable https://github.com/vitalets/x-editable I am building a Project Management application. ON a project page there is multiple Task Lists and each list can also have multiple Tasks. A single project could easily have 100 or more Tasks in it. When a user clicks on the title of a Task I then launch a popup Modal window on the page which shows all the Task details for the clicked on tasks. Things like: Task title Task Description Task created date Task modified date Task due date Milestone Task Status Task Priority Task Comments (any number of comments can be shown for a task as well) For each of these Task detail items, many of them will have in-place editing capability using the X-Editable JavaScript library. Currently I have a quick mockup showing how I can use the library to edit some of the fields here [MOCKUP REMOVED AS IT HAS BEEN UPDATED MANY TIMES AND CHANGED SINCE THE POST DATE OF THIS QUESTION] $(document).ready(function() { //toggle `popup` / `inline` mode $.fn.editable.defaults.mode = 'inline'; $('#task-title-modal').editable({ type: 'text', // text|textarea|select|date|checklist url: '/updatetask', pk: 1, toggle: 'click', // click|dblclick|mouseenter|manual highlight: '#FFFF80', mode: 'inline', // inline | popup placement: 'top', title: 'Enter Task Title', tpl: '&lt;input type="text" style="width: 253px; padding-right: 24px;"&gt;', validate: function(value) { if($.trim(value) == '') { return 'This field is required'; } }, params: function(params) { //Addition params in addition to the default: pk, name, value params.userId = 1; params.projectId = 1; params.taskId = 1; return params; }, success: function(response, newValue) { if(!response.success) return response.msg; } }); //ajax emulation. Type "err" to see error message $.mockjax({ url: '/updatetask', responseTime: 900, // simulate lag response: function(settings) { console.log(settings.data); if(settings.data.value == '…
answer count: 1
accepted answer: http://stackoverflow.com/a/29225576

http://stackoverflow.com/comment/46834940
type: Comment
has text: It's called using ng-click on the button in plnkr
comment on: http://stackoverflow.com/a/29321834
score: 0
type: AnswerComment

maps
tags question: http://stackoverflow.com/q/29227238
tag name: maps
tags question: http://stackoverflow.com/q/29344977
tags question: http://stackoverflow.com/q/29232153
tags question: http://stackoverflow.com/q/29224609
tags question: http://stackoverflow.com/q/29235732
tags question: http://stackoverflow.com/q/29220979
tags question: http://stackoverflow.com/q/29296431
tags question: http://stackoverflow.com/q/29321311
tags question: http://stackoverflow.com/q/29367209
type: Tag
tags question: http://stackoverflow.com/q/29311945

http://stackoverflow.com/q/29333350
upvote count: 7
tagged with: google-chrome
type: Question
score: 7
tagged with: javascript
linked to: http://stackoverflow.com/q/25838804
answer count: 1
downvote count: 0
tagged with: jquery
has title: Do content scripts run in the same isolated world, or in separate isolated worlds?
favorite count: 0
has body: I'm reading through the Chrome docs trying to learn how to create an extension and am struggling to understand how to share data between content scripts. Let's say I have three scripts bundled with my extension: jquery.js script1.js script2.js I need script1.js and script2.js to use jQuery, and each script needs to be able to read and write global variables ala window.foo = 'bar'. The scripts also add content to the DOM that is event driven, so the global variables they read/write need to be persistent as long as the tab is open. For example, script1.js might add a button to the page that when clicked runs a function defined in script1.js, which in turn sets a global variable and then runs a function in script2.js which then uses that variable (just an example). The content script docs say: However, content scripts have some limitations. They cannot: ... Use variables or functions defined by their extension's pages Use variables or functions defined by web pages or by other content scripts Does this mean an extension's content scripts cannot interact with each other at all, or is it saying that content scripts from different extensions can't interact with each other? In other words, do all of an extensions content scripts run in the same isolated world, or in separate isolated worlds?
tagged with: google-chrome-extension
has answer: http://stackoverflow.com/a/29333577
accepted answer: http://stackoverflow.com/a/29333577
type: AnsweredQuestion

http://stackoverflow.com/q/29349101
tagged with: timer
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46897238
has comment: http://stackoverflow.com/comment/46883942
has body: I currently am using 2 ajax requests in one. After I activate the first request everything shows up. After that in the content that shows up, I can do another ajax request. It is succesfull (can see changes in db). Now my example is with timers. I open the content from an item through the first request, then there is a timer available for that item. After I click the 2nd request, I notice the timer has started timing. Now when I want to end the timer, I first have to refresh and do those steps again. How can I return to the second request? I guess with a function, but I don't know how. Here's the jQuery ajax request: $(".timer").click(function() { var project = $(this).attr("data-pid"); var level = $(this).attr("data-level"); var global = $(this).attr("data-gid"); $.ajax({ type: "POST", url: 'assets/ajax/open-timer.php', data: { 'project': project, 'level': level, 'global': global }, success: function (data) { $(".timer-results").html(data); $(".start-timer").click(function() { var project = $(this).attr("data-pid"); var level = $(this).attr("data-level"); var global = $(this).attr("data-gid"); $.ajax({ type: "POST", url: 'assets/ajax/start-timer.php', data: { 'project': project, 'level': level, 'global': global }, success: function (data) { $(".timer-to-start").hide(); $(".timer-to-stop").show(); } }); }); $(".stop-timer").click(function() { var project = $(this).attr("data-pid"); var level = $(this).attr("data-level"); var global = $(this).attr("data-gid"); $.ajax({ type: "POST", url: 'assets/ajax/stop-timer.php', data: { 'project': project, 'level': level, 'global': global }, success: function (data) { $(".timer-to-stop").hide(); $(".timer-to-start").show(); } }); }); } }); });
type: Question
tagged with: javascript
tagged with: jquery
tagged with: ajax
score: 0
has title: Ajax request in Ajax request, after 2nd request return

http://stackoverflow.com/q/29250233
accepted answer: http://stackoverflow.com/a/29273159
tagged with: symfony
tagged with: php
linked to: http://stackoverflow.com/q/158319
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29273159
has body: I have a box with two dropdownlist . box content change when second dropdown change. box contain ul with lot of li , i want when clicked on li get li content . this do for first time when page load , but after box content change , my script not run. this is my code (when dropdown change and box content change): $.ajax({url: '/Symfony/web/app_dev.php/linknews?s='+target+'&amp;&amp;c='+select, success: function(output) { var list = document.getElementById(news_list); var line = document.getElementById("line"); $(list).empty(); var newss = JSON.parse(output); newss.forEach(function(entry){ var link = document.createElement("a"); var linkcontent = document.createTextNode(entry["title"]); link.appendChild(linkcontent); link.title = entry["title"]; link.href = entry["address"]; var div = document.createElement("div"); div.innerHTML += '&amp;nbsp'; div.setAttribute("class" , "news-bottom"); var li = document.createElement("li"); li.appendChild(link); li.appendChild(div); list.appendChild(li); $(line).show(); }); } }); and code that show to me li content: $(document).ready(function($) $("#news-list li a").click(function() { var name = this.getAttribute('href'); alert(name); })); i don't know when box content change , why my script not run?!
type: Question
has comment: http://stackoverflow.com/comment/46704643
tagged with: javascript
has title: Run javascript without page load
score: 0
answer count: 1

http://stackoverflow.com/comment/60327310
type: Comment
has text: @jjalonso Glad you like it ;)
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29230648

http://stackoverflow.com/comment/46747300
score: 0
comment on: http://stackoverflow.com/q/29272384
type: QuestionComment
type: Comment
has text: @AndrewLyndem I edited my question. I want to scroll the `container` in left with position absolute. I dont know how to use the fiddle. I tried, but not get.

http://stackoverflow.com/q/29329306
has answer: http://stackoverflow.com/a/29385762
downvote count: 0
type: Question
tagged with: javascript
tagged with: forms
has answer: http://stackoverflow.com/a/29388254
score: 9
answer count: 3
has comment: http://stackoverflow.com/comment/46874761
tagged with: validation
has body: I have a form which is a multi-div meaning: I fill some fields, then I click next and current div gets to display css proprerty set as "none". All the fields in this form are required, below is a snippet of the situation: &lt;form action="" method="post"&gt; &lt;div id="div1" style="display:none"&gt; &lt;input name="input1" type"text" required /&gt; &lt;input name="input2" type"text" required /&gt; &lt;/div&gt; &lt;div id="div2" style="display:block"&gt; &lt;input name="input3" type"text" required /&gt; &lt;input name="input4" type"text" required /&gt; &lt;input type"submit" value="submit" /&gt; &lt;/div&gt; &lt;/form&gt; Now the problem is that, when I submit the form, if one field of the first div is not filled up, it won't submit and Chrome gives me the following error in the Console An invalid form control with name='input1' is not focusable. How can I solve this situation? I've thought about catching the error and then showing the first div, but I haven't figured out how to do it.
favorite count: 0
upvote count: 9
has title: JS HTML5 Validate on "display:none" required input elements
has comment: http://stackoverflow.com/comment/46954335
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/50410967
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/29289698
has comment: http://stackoverflow.com/comment/46777492
tagged with: javascript
has title: How can I add a class to the selected element on click event with select2?
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/46778355
tagged with: jquery
tagged with: jquery-select2
has answer: http://stackoverflow.com/a/29311618
has answer: http://stackoverflow.com/a/29290052
type: UnansweredQuestion
has body: We are using Select2 version 4.0.0-rc2 To improve mobile usage we would like to implement adding a class to the clicked item in the drop down. I tried reacting to the select2 events like this: element.select2({}).on('select2:open', function(){ this.addClass('my-class'); } However, the problem with this is that 'this' is the option and not the rendered select li. I believe 'this' is because Select2 delegates/passes the event down to the select option. I also tried directly targeting the result item like this: $('.select2-results li ["aria-selected=true"]').on('click', function(){ this.addClass('my-class'); } But I get the same problem as above. 'This' and even Event.target are option. I found some suggestions from older versions of select2 and tried this: element.select2({}).on('select2:open', function(e){ $('.search-results li [aria-selected=true]').on('mouseup', function(e){ e.stopPropagation(); this.addClass('my-class'); } This one only seemed to work on the second click. So, I clicked to open the list, I select an item, nothing happens, I select another item, it then gets the class. Note: Some of the selectors above may not be accurate but its just to give an example. All of my code worked except that I couldnt get my event to fire on the right element. Could anyone suggest a fix? Alternatively, on the Select2 page (https://select2.github.io/options.html) , they suggest that in version 4 you can write plugins using an adapter. Im not familiar with adapters and can only assume they mean the adapter pattern? I dont understand how I would even start with this. I understand the concept, I write a wrapper so that my functions are called and I can modify them and also pass through to the library methods? If anyone could provide any further info on how I could do that, it would be greatly appreciated.
type: Question

http://stackoverflow.com/q/29359912
type: Question
tagged with: protractor
has answer: http://stackoverflow.com/a/37371160
tagged with: javascript
has body: I have a bunch of Unit tests that are going well, and I've started to add Protractor E2E tests to my project. I'm doing okay testing interactive elements on the page, but I'm having trouble testing for certain data being sent out of the browser. For instance, I want to see if clicking a certain button produces a POST to a certain endpoint. I have protractor set up using the following: /*globals global*/ module.exports = function() { 'use strict'; var chai = require('chai') , promised = require('chai-as-promised'); global.expect = chai.expect; chai.use(promised); }(); I understand how to use Protractor to interact: it('send data to the "log" endpoint when clicked', function() { var repeater = element.all(by.repeater('finding in data.items')); repeater.get(0).click().then(function() { // $http expectation }); }); However, I don't know how to set up $httpBackend in Protractor so I can capture the data that gets sent as a result of the .click() event. Do I need an additional module? In Karma/Mocha I would simply: beforeEach(module('exampleApp')); describe('logging service', function() { var $httpPostSpy, LoggingService; beforeEach(inject(function(_logging_, $http, $httpBackend) { $httpPostSpy = sinon.spy($http, 'post'); LoggingService = _logging_; backend = $httpBackend; backend.when('POST', '/api/log').respond(200); })); it('should send data to $http.post', function() [ LoggingService.sendLog({ message: 'logged!'}); backend.flush(); expect($httpPostSpy.args[0][1]).to.have.property('message'); }); }); But I don't know how to get a reference to $httpBackend and inject modules in Protractor.
score: 4
upvote count: 4
has answer: http://stackoverflow.com/a/29360542
answer count: 2
has title: Accessing $http data in Protractor / E2E tests (AngularJS)
possible better answer: http://stackoverflow.com/a/37371160
downvote count: 0
tagged with: angularjs-e2e
favorite count: 0
tagged with: angularjs
tagged with: angular-mock
accepted answer: http://stackoverflow.com/a/29360542
type: AnsweredQuestion

http://stackoverflow.com/q/29352119
tagged with: callback
favorite count: 0
has comment: http://stackoverflow.com/comment/46889641
has body: I'm new to node and have a question on callbacks. Given the following code: function wrapperFunction(x) { var result = {}; asyncWrapperFunction(x, function(res) { console.log(res); // successfully logs res result[x] = res; // populates result }); return result; // returns result before fully populated } function asyncWrapperFunction(x, callback) { asyncFunction(x, function(err, res) { if (err) return console.error(err); return callback(res); }); } wrapperFunction(5); When calling wrapperFunction(5), I'm able to log the result from within the asyncWrapperFunction call but result is returned before the request completes and of course is undefined. I know why this is happening. The question is, what is the best practice to populate result in my example and only return it once they async function call(s) are complete?
has answer: http://stackoverflow.com/a/29352302
tagged with: asynchronous
tagged with: node.js
type: UnansweredQuestion
downvote count: 1
has title: Node Callback Populating Object
has comment: http://stackoverflow.com/comment/46891231
score: -1
has comment: http://stackoverflow.com/comment/46889617
type: Question
upvote count: 0
answer count: 1
tagged with: javascript

http://stackoverflow.com/a/29267378
score: 1
has comment: http://stackoverflow.com/comment/46747948
has body: Hi @CHEWX I misunderstood your original question. Yes, you are correct, what you are trying to do is not possible. What are you looking for is the ability to make an unauthenticated call to pull any random profile (and for your use-case, you would always be pulling your own profile). However, LinkedIn does not have any unauthenticated APIs available. The only thing that comes close to what you are looking for is a drop-in plugin which you can find here: https://developer.linkedin.com/plugins/member-profile You could build some service that makes an authenticated REST call to pull your profile every so often, and then push the updated profile info to wherever you are saving it to display it on your website.
upvote count: 1
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/29260946

http://stackoverflow.com/q/29343623
upvote count: 1
type: Question
has title: bootstrap.carousel: how '$next[0].offsetWidth' work in slide function
tagged with: javascript
downvote count: 0
tagged with: jquery
favorite count: 0
has body: in bootstrap/js/carousel.js, the slide function of Carousel has a line below: $next[0].offsetWidth // force reflow With this line, the transition of next slide work currently after the transition of active slide. But, without this line, the transition of next slide do not work. That make me confused. Just want to know, how the code above make that effect. Thank you! i paste the slide function below: Carousel.prototype.slide = function(type, next){ var $active = this.$element.find('.item.active'); var $next = next || this.getItemForDirection(type, $active); var isCycling = this.interval; var direction = type == 'prev' ? 'right' : 'left' var that = this; if($next.hasClass('active')) return this.sliding = false; this.sliding = true; var relatedTarget = $next[0]; isCycling &amp;&amp; this.pause(); if(this.$indicators.length){ this.$indicators.find('.active').removeClass('active'); var nextIndicator = $(this.$indicators.children()[this.getItemIndex($next)]); nextIndicator &amp;&amp; nextIndicator.addClass('active'); } var slideEvent = $.Event('carousel.slide.after', {relatedTarget: relatedTarget, direction: direction}); if($.support.transition &amp;&amp; this.$element.hasClass('slide')){ $next.addClass(type); $next[0].offsetWidth // force reflow $active.addClass(direction); $next.addClass(direction); $active.one($.support.transition.end, function(e){ $next.removeClass([type, direction].join(' ')).addClass('active'); $active.removeClass(['active', direction].join(' ')); that.sliding = false; setTimeout(function(){ that.$element.trigger(slideEvent); }, 0) }) .emulateTransitionEnd(Carousel.TRANSITION_DURATION); }else{ $active.removeClass('active'); $next.addClass('active'); this.sliding = false; } isCycling &amp;&amp; this.cycle(); };
type: UnansweredQuestion
tagged with: css
answer count: 0
tagged with: twitter-bootstrap
score: 1

http://stackoverflow.com/a/29280274
has body: You have the tag required in your input tag. That makes it required. In addition, you have ng-disabled="true" which means that you will never be able to fill in the input. It seems like you have a misunderstand of what disabled does. Disabled just means you cant place input into it, not that it doesn't affect the form. You are actually misusing disabled in 2 ways: Disabled and required together doesn't make sense (hence your problem) Specifically using the ng-disabled="true" also makes no sense. The advantage of ng-disabled is that it can be easily programaticly changed. Right now you are just hard-coding it. Might as well just use vanilla disabled If you want the input to be required only when its enabled, and not required when its disabled, you can bind the two attributed to the same model: &lt;input ng-required="foo" ng-disabled="foo" name="searchParameter" type="text" ng-model="criteria.SearchParameter" /&gt;
has comment: http://stackoverflow.com/comment/46758461
answers question: http://stackoverflow.com/q/29280221
type: Answer
has comment: http://stackoverflow.com/comment/46758375
has comment: http://stackoverflow.com/comment/46758592
has comment: http://stackoverflow.com/comment/46758344
score: 0

http://stackoverflow.com/q/29248261
score: 1
has comment: http://stackoverflow.com/comment/46746362
upvote count: 1
type: Question
has body: I am writing a mat file parser using jBinary, which is built on top of jDataView. I have a working parser with lots of tests, but it runs very slowly for moderately sized data sets of around 10 MB. I profiled with look and found that a lot of time is spent in tagData. In the linked tagData code, ints/uints/single/doubles/whatever are read one by one from the file and pushed to an array. Obviously, this isn't super-efficient. I want to replace this code with a typed array view of the underlying bytes to remove all the reading and pushing. I have started to migrate the code to use typed arrays as shown below. The new code preserves the old functionality for all types except 'miINT8'. The new functionality tries to view the buffer b starting at offset s and with length l, consistent with the docs. I have confirmed that the s being passed to the Int8Array constructor is non-zero, even going to far as to hard code it to 5. In all cases, the output of console.log(elems.byteOffset) is 0. In my tests, I can see that the Int8Array is indeed starting from the beginning of the buffer and not at offset s as I intend. What am I doing wrong? How do I get the typed array to start at position s instead of position 0? I have tested this on node.js version 10.25 as well as 12.0 with the same results in each case. Any guidance appreciated as I'm totally baffled by this one! tagData: jBinary.Template({ baseType: ['array', 'type'], read: function (ctx) { var view = this.binary.view var b = view.buffer var s = view.tell() var l = ctx.tag.numBytes var e = s + l var elems switch (ctx.tag.type) { case 'miINT8': elems = new Int8Array(b,s,l); view.skip(l); console.log(elems.byteOffset); break; default: elems = [] while (view.tell() &lt; e &amp;&amp; view.tell() &lt; view.byteLength) { elems.push(this.binary.read(ctx.tag.type)) } } return elems } }),
tagged with: javascript
has title: How do I use a typed array with offset in node?
downvote count: 0
favorite count: 0
type: UnansweredQuestion
tagged with: node.js
tagged with: typed-arrays
has comment: http://stackoverflow.com/comment/46900756
answer count: 0

http://stackoverflow.com/a/38402727
type: Answer
upvote count: 1
score: 1
has body: I was facing the same problem recently. I fixed this by appending my app's build number with my js/css files. All my script and style tags were included by a script in a common include files so it was trivial to add a 'build number' at the end of the js/css file path like this /foo/bar/main.js?123 This 123 is a number that I keep track of in my same header file. I increment it whenever I want the client to force download all the js files of the app. This gives me control over when new versions are downloaded but still allows the browser to leverage cache for every request after the first one. That is until I push another update by increment the build number. This also means I can have a cache expiry header of however long I want.
answers question: http://stackoverflow.com/q/29292051
downvote count: 0

http://stackoverflow.com/comment/111994591
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29285597
has text: Yes, they did worked-around the bug, they probably didn't even use the MediaRecorder API but some other way to record it. I can't tell from here, my magic-ball is currently busy.

http://stackoverflow.com/a/29272956
type: Answer
score: 0
answers question: http://stackoverflow.com/q/29260040
has comment: http://stackoverflow.com/comment/46784913
has body: If you don't want to use ng-model then try like this var app = angular.module('myApp', []); app.controller('myController', function ($scope, $timeout) { $scope.myText = 50; $scope.getData = function () { return $scope.myText; } $scope.change = function () { k = 1; $scope.myText = 100; }; }) Change

http://stackoverflow.com/comment/46892719
has text: Are you sure that you don't have any console errors? Plus, make sure that you are loading jquery **first** before any library or js script.
comment on: http://stackoverflow.com/q/29353725
type: Comment
type: QuestionComment
score: 2

http://stackoverflow.com/comment/46682564
score: 0
type: Comment
has text: Yes, basically I want the objects inside the arrays to merge rather than just replace them by array index. One trivial solution to this would be to avoid the arrays that hold the objects but use an object and use keys for the objects: arr : { "#1":{id:1,ver:1} } … I could simply use Object.assign() for them to merge then.
comment on: http://stackoverflow.com/a/29236665
type: AnswerComment

http://stackoverflow.com/a/29233656
upvote count: 2
has comment: http://stackoverflow.com/comment/46682059
has comment: http://stackoverflow.com/comment/46693200
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46673649
type: Answer
accepted answer of: http://stackoverflow.com/q/29225317
has body: You can try giving your extension the background permission: Makes Chrome start up early and and shut down late, so that apps and extensions can have a longer life. When any installed hosted app, packaged app, or extension has "background" permission, Chrome runs (invisibly) as soon as the user logs into their computer—before the user launches Chrome. The "background" permission also makes Chrome continue running (even after its last window is closed) until the user explicitly quits Chrome. This way the Chrome process and extensions will be loaded before you click any URL. The user can still circumvent this by explicitly killing the Chrome process. As a side note, keep in mind that the response from your onBeforeRequest listener needs to be synchronous if you want to block a request, so you can't base the decision to block on the response from a native messaging host.
answers question: http://stackoverflow.com/q/29225317
score: 2
has comment: http://stackoverflow.com/comment/46766672
downvote count: 0

http://stackoverflow.com/q/29300726
has comment: http://stackoverflow.com/comment/46797532
score: 1
has answer: http://stackoverflow.com/a/37157246
tagged with: beep
downvote count: 1
has comment: http://stackoverflow.com/comment/46796295
type: Question
possible better answer: http://stackoverflow.com/a/32621266
has title: gulp - Beep when done
accepted answer: http://stackoverflow.com/a/29312414
has body: I want to make voice control/feedback/response for my build in gulp. I wrote something like this below, but it is not working. Does anybody know how to fix it? :) It throws this error. // Compile Sass, autoprefix properties, generate CSS. gulp.task('sass', function () { return sass('src/sass/style.scss', {style: 'compressed'}) .pipe(autoprefixer()) .pipe(rename('style.css')) .pipe(gulp.dest('src/css/')) .pipe(gutil.beep()) // beep when build is done })
tagged with: javascript
has comment: http://stackoverflow.com/comment/46796132
tagged with: response
upvote count: 2
answer count: 3
has answer: http://stackoverflow.com/a/29312414
tagged with: gulp
favorite count: 0
has answer: http://stackoverflow.com/a/32621266
type: AnsweredQuestion
tagged with: feedback

http://stackoverflow.com/a/29328335
type: Answer
score: 0
answers question: http://stackoverflow.com/q/29328245
has comment: http://stackoverflow.com/comment/46847699
has body: what you need is remove property from collection of DOM elements try this: document.querySelector('input[type="hidden"]').removeAttribute("type"); Example on JsFiddle Similar question on StackOverflow

vue.js
tags question: http://stackoverflow.com/q/29242499
tag name: vue.js
type: Tag

http://stackoverflow.com/comment/59729137
comment on: http://stackoverflow.com/a/29357836
has text: I feel like that should be a given, but I've added it for completeness. Good catch!
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/a/29247567
has comment: http://stackoverflow.com/comment/46701221
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/46701349
has comment: http://stackoverflow.com/comment/46700840
has comment: http://stackoverflow.com/comment/46700987
has body: You can always pass symphony2 variables on javascript code, so you can have a scirpt with something along the lines of: &lt;scirpt&gt; $(.glyphicon).click(function(){ $(.Some-other-class).toggle() }); &lt;/script&gt; You can have the .Some-other-class div element or td element starting as hidden and with variables in it (like you did in your static html code).
answers question: http://stackoverflow.com/q/29247376
has comment: http://stackoverflow.com/comment/46701300

http://stackoverflow.com/comment/46806035
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29305838
score: 1
has text: yes it is ... because input names are copied to properties of the form object... the form.style is referring to the element now

http://stackoverflow.com/q/29268637
type: Question
upvote count: 2
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
score: 2
has body: I'm looking at using the HTML5 geolocation API to check to see if a user is in a particular location. However, I would like to give some lenience on this so I was hoping I could specify a central lat and lng, and then set a radius around that, so that as long as they were within that range the site would work. I was wondering if there is any JS formula I can use to check if a user falls within this radius.
tagged with: geolocation
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/33152665
tagged with: geofencing
accepted answer: http://stackoverflow.com/a/33152665
has title: Creating a geofence with html5 geolocation api

http://stackoverflow.com/comment/46827094
comment on: http://stackoverflow.com/q/29317439
type: Comment
type: QuestionComment
has text: @Tim Yes, this is probably the intended behavior. What's the problem with this?
score: 0

http://stackoverflow.com/q/29306387
downvote count: 2
type: Question
has answer: http://stackoverflow.com/a/29306728
has answer: http://stackoverflow.com/a/29306606
accepted answer: http://stackoverflow.com/a/29306606
has title: Removes all after the first block of numbers
has comment: http://stackoverflow.com/comment/46807354
score: -1
answer count: 2
upvote count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/46807193
favorite count: 0
possible better answer: http://stackoverflow.com/a/29306728
has body: I'm trying to write code that removes all after the first block of numbers and text.Do you have any idea how to do this. string = '009EPMT18$MBS' the expected result string = '009EPMT'
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46807152

http://stackoverflow.com/q/29240498
has comment: http://stackoverflow.com/comment/46687625
has comment: http://stackoverflow.com/comment/46687404
has comment: http://stackoverflow.com/comment/46690470
has comment: http://stackoverflow.com/comment/46687812
has comment: http://stackoverflow.com/comment/46687479
type: Question
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/37308143
has comment: http://stackoverflow.com/comment/46687282
favorite count: 0
has answer: http://stackoverflow.com/a/37308143
has comment: http://stackoverflow.com/comment/46687200
has body: I have several boxes, using Flexbox as container and list tags as boxes inside. They're responsive and change position as you resize the width. I am trying to figure out a way via jQuery to detect which boxes are touching the left side and which are touching the right side so I can addClass of right or left to them based on their position for styling. I think it's possible using offset to achieve this which I'm figuring out how to start. Any ideas? JSFiddle .container { display: flex; flex-flow: row wrap; justify-content: space-around; flex-direction: row; list-style:none; } li { border:10px salmon solid; padding: 25px 15px; text-align: center; font-size: 1.2em; background: white; flex-grow: 3; } Alabama California Florida Idaho Kansas Nevada New York
has comment: http://stackoverflow.com/comment/46687477
has comment: http://stackoverflow.com/comment/46688230
has answer: http://stackoverflow.com/a/29241361
tagged with: css
has comment: http://stackoverflow.com/comment/46688030
score: 4
has answer: http://stackoverflow.com/a/65231817
has comment: http://stackoverflow.com/comment/46687454
has title: jQuery: Detect the position inside Flexbox
answer count: 3
has comment: http://stackoverflow.com/comment/46690608
upvote count: 4
has comment: http://stackoverflow.com/comment/46688557
has comment: http://stackoverflow.com/comment/46687858
has comment: http://stackoverflow.com/comment/46690323
accepted answer: http://stackoverflow.com/a/29241361
has comment: http://stackoverflow.com/comment/46687709
downvote count: 0
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/46706992
comment on: http://stackoverflow.com/q/29249991
has text: sorry, i can't help you. i have tried everything i thought that could work. maybe it's just not possible, a bug, ...
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/q/29325082
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: video.js
upvote count: 2
type: UnansweredQuestion
score: 2
answer count: 0
has body: I'm attempting to interact with cues loaded from a vtt file via video.js. I can do it easily and repeatable from the browser inspect console but never from the videojs load-success function. I have a suspicion that the textTrack is parsed (I can access id, kind, mode attributes) but not read (cues are null). I can't find anywhere in the documentation or source if there is a way to force the track to be read or if there is a callback or event I should be listening for. Thanks for any help! Basic video.js invocation. Working fine, showing captions and video: &lt;video id="video" ..... &gt; &lt;source ..... /&gt; &lt;track kind="captions" src="captions.vtt" srclang="en" default /&gt; &lt;/video&gt; js, attempting to access cues: &lt;script&gt; videojs.options.flash.swf = '/static/js/video-js.swf'; var player = videojs('video', {}, function(){ var tracks = player.textTracks(); var captions; // captions track // find all the tracks we care about for (var i=0; i&lt;tracks.length; i++) { var isCaptions = tracks[i].kind === "captions" if (isCaptions) { captions = tracks[i]; } } console.log(captions, captions.id, captions.kind, captions.mode, captions.cues); player.play(); } ); &lt;/script&gt; console.log: t.t {d: t.Ea.extend.d, X: Array[0], Ga: Array[0], addEventListener: function, vdata1427596024498: 320…} "vjs_text_track_316" "captions" "hidden" null interactive console: &gt; c = player.textTracks()[0].cues[0].text &lt;- "first caption" Tested with latest grunt-built master branch (version 4.12.5) in Google Chrome Version 41.0.2272.104 (64-bit)
tagged with: google-chrome
type: Question
has comment: http://stackoverflow.com/comment/46841043
has title: Interacting with VideoJS cues (vtt captions) from javascript

http://stackoverflow.com/comment/46679155
score: 0
has text: Does script.js load additional resources ?
type: Comment
comment on: http://stackoverflow.com/q/29236259
type: QuestionComment

http://stackoverflow.com/comment/46734311
score: 0
has text: Why is angular v1.2.23+ ignoring directive priority and runs lowest priority custom directive before higher priority level inbuild directives ngInclude and ngRepeat, which breaks documentation?
type: Comment
comment on: http://stackoverflow.com/q/29265706
type: QuestionComment

http://stackoverflow.com/a/29248886
type: Answer
has comment: http://stackoverflow.com/comment/46704516
accepted answer of: http://stackoverflow.com/q/29248851
has body: You need to pass the current element as a param to the click handler and then toggle the class then function toggle_timesheet(task_id, el) { $(el).toggleClass('project_toggle_off project_toggle_on'); $("#" + task_id).slideToggle(100); } I would recommend using jQuery event handlers instead of using inline handlers then $('.project_toggle').click(function () { var $this = $(this); $this.toggleClass('project_toggle_off project_toggle_on'); $("#task_" + $this.data('task')).slideToggle(100); })
answers question: http://stackoverflow.com/q/29248851
has comment: http://stackoverflow.com/comment/46702747
has comment: http://stackoverflow.com/comment/46702736
type: AcceptedAnswer
score: 0
has comment: http://stackoverflow.com/comment/46702691

http://stackoverflow.com/comment/46842935
type: Comment
comment on: http://stackoverflow.com/a/29325827
has text: @ShubharajBuwa Yes, I think so, but it depends on how your server request looks like. Do you have a send button? You could try to use the code from that one in the event listener. If it’s largely written in PHP: I’m no expert in PHP, especially not in mixing PHP and JavaScript…
type: AnswerComment
score: 0

http://stackoverflow.com/q/29352963
downvote count: 0
tagged with: if-statement
score: 1
has title: If statement based on time of day to document write an .js from the web
type: Question
tagged with: javascript
upvote count: 1
tagged with: datetime
favorite count: 0
answer count: 0
tagged with: time
type: UnansweredQuestion
has body: `We have a webpage that displays the wait time of an ER. The java script will change the content based on the time of day. If the time is from 10am to 10pm the https://www.netreturns.biz/javascriptservices/js/shannonclinicErWaitTime.js should display the wait time. If not then say closed. I have tried everything i know which is not much first time coding javascript and i have tried google searching even looked in innerhtml. If anyone could please help i would appericate it The problem is that i cannot get the .js to run in the if statement. I have tried with out document write. i have tried this format document.write(' full code found here Shannon Medical Center | San Angelo, Texas | Shannon Medical Center If the wait time is more than 45 minutes, you can call ahead. 32626 N. Bryant San Angelo, TX 76903 No Appointment Required 325.481.2271 Hours Open 7am - 8pm Daily mins. 3502 Knickerbocker Rd. San Angelo, TX 76904 No Appointment Required 325.481.2222 Hours Open 7am - 10pm Daily mins. 4251 Sunset Dr. San Angelo, TX 76904 No Appointment Required 325.481.2226 Hours Open 7am - 10pm Daily

http://stackoverflow.com/a/29329286
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29240341
has body: John, What I did to resolve this was to mark everything I 'wanted to see' as a favorite, including folders, and replace the project tab with the favorites tab as my primary means of project navigation. This way I see only what I want to see and nothing else.

http://stackoverflow.com/q/29301237
favorite count: 0
has title: Extjs 5 strange behavior of the getStore() method
possible better answer: http://stackoverflow.com/a/29317571
has body: I've faced with the strange getStore() method behavior. Having main viewport with two regions: north and center. On the north region there is a button 'Show grid', if to click on this button QueryResultsGridView is loaded to the center region var panelToAddName = Ext.create('MyApp.view.QueryResultsGridView', {}); var mainViewPort = Ext.getCmp('mainViewPort'); var centerRegion = mainViewPort.down('[region=center]'); centerRegion.removeAll(); centerRegion.add(panelToAddName); my Store Ext.define('MyApp.store.QueryResultsGridStore', { extend: 'Ext.data.Store', model: 'MyApp.model.QueryResultsGridModel', alias: 'store.queryResultsGrid', autoLoad: true, proxy: { type: 'ajax', url: 'queryResultsGrid.json', reader: { type: 'json' } } }); my ViewModel Ext.define('MyApp.viewmodel.MainViewModel', { extend: 'Ext.app.ViewModel', requires: [ 'MyApp.store.QueryResultsGridStore' ], alias: 'viewmodel.main', stores: { queryResultsGrid: { type: 'queryResultsGrid' } }); my Panel Ext.define('MyApp.view.QueryResultsGridView', { extend: 'Ext.Panel', requires: [ 'MyApp.controller.QueryResultsGridViewController' ], controller: 'queryResultsGrid', listeners: { afterrender: 'onFormAfterRender' }, items:[{ reference: 'queryResultsGrid', layout: 'fit', items: [ { xtype: 'grid', reference: 'grid', bind: { store: '{queryResultsGrid}' }, columns: [ { text: 'Text1', dataIndex: 'text1', flex: 1 }, { text: 'Text2', dataIndex: 'text2', flex: 3 } ] }] }] }); my ViewController Ext.define('MyApp.controller.QueryResultsGridViewController', { extend: 'Ext.app.ViewController', alias: 'controller.queryResultsGrid', onFormAfterRender: function(form, parent1) { console.log(form.down('grid')); console.log(form.down('grid').store); } }); Now in console I see 2 Objects as suggested above. If I go inside the first Object there is a data inside it, but inside the second one store is empty. Could anyone suggest me why? Btw I need this store to run store.load(). first Object second Object UPDATED Here is https://fid…
has answer: http://stackoverflow.com/a/29317571
has answer: http://stackoverflow.com/a/29317620
has comment: http://stackoverflow.com/comment/46826976
has comment: http://stackoverflow.com/comment/46832824
has answer: http://stackoverflow.com/a/29432427
type: AnsweredQuestion
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/46833150
downvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29432427
tagged with: extjs
answer count: 3
has comment: http://stackoverflow.com/comment/46833264
score: 1

http://stackoverflow.com/comment/46653638
type: Comment
comment on: http://stackoverflow.com/a/29222396
has text: When i press on the link twice it redirects to below the header of the given div. Is there a way to fix that.
type: AnswerComment
score: 0

http://stackoverflow.com/comment/46812718
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29262959
has text: I'm not going to be using your method, as it is sort of redundant, but it looks like a good method.
score: 0

ng-init
type: Tag
tag name: ng-init
tags question: http://stackoverflow.com/q/29266695

http://stackoverflow.com/comment/46748845
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/29274906
has text: It doesn't work? What's happening?
type: Comment

datatable
tags question: http://stackoverflow.com/q/29335430
tags question: http://stackoverflow.com/q/29372864
tag name: datatable
tags question: http://stackoverflow.com/q/29354432
type: Tag
tags question: http://stackoverflow.com/q/29299194
tags question: http://stackoverflow.com/q/29371417
tags question: http://stackoverflow.com/q/29366872
tags question: http://stackoverflow.com/q/29296476
tags question: http://stackoverflow.com/q/29362860
tags question: http://stackoverflow.com/q/29271933
tags question: http://stackoverflow.com/q/29239826
tags question: http://stackoverflow.com/q/29262038

http://stackoverflow.com/a/29263847
type: Answer
has body: I wrote this plain javascript function awhile ago to monitor for any changes to an input field, even in older browsers that don't support the input event and it attempts to cover all the ways that a change can occur including copy/paste, key typing, drag/drop, etc... // create self-executing function wrapper so we have a private scope for // things that we just want to define/execute once (function() { var isIE = false; // conditional compilation which tells us if this is old IE // which is needed because old IE has a buggy `oninput` // implementation that must be worked around (so we can't use feature detection) /*@cc_on isIE = true; @*/ // Which events to monitor // the boolean value is whether we have to // re-check after the event with a setTimeout() var events = [ "keyup", false, "blur", true, "focus", true, "drop", true, "change", false, "input", false, "paste", true, "cut", true, "copy", true ]; // Test if the input event is supported // It's too buggy in IE so we never rely on it in IE if (!isIE) { var el = document.createElement("input"); var gotInput = ("oninput" in el); if (!gotInput) { el.setAttribute("oninput", 'return;'); gotInput = typeof el["oninput"] == 'function'; } el = null; // if 'input' event is supported, then use a smaller // set of events if (gotInput) { events = [ "input", false, "textInput", false ]; } } // add event cross browser function addEvent(elem, event, fn) { if (elem.addEventListener) { elem.addEventListener(event, fn, false); } else { elem.attachEvent("on" + event, function() { // set the this pointer same as addEventListener when fn is called return(fn.call(elem, window.event)); }); } } // simplified shallow copy of an object function copyObj(o) { var x = {}; for (var i in o) { x[i] = o[i]; } return(x); } // define global function window.onChange = function(elem, fn, data) { var priorValue = elem.value; function checkNotify(e, delay) { if (elem.value !== priorValue) { priorValue = elem.value; fn.call(elem, e, data); } else if (d…
accepted answer of: http://stackoverflow.com/q/29263616
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/29263616
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/comment/46864338
has text: Why this form instead of a plain `for` loop?: `for (var i = list.length >>> 0; i--;) { `
type: Comment
comment on: http://stackoverflow.com/a/29337626
score: 0
type: AnswerComment

http://stackoverflow.com/comment/46666264
type: Comment
has text: @akmozo but when I am writing onplay event it is also not working :(
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/29227429

http://stackoverflow.com/q/29335972
type: Question
tagged with: javascript
score: 0
answer count: 2
tagged with: html5-canvas
has body: I am relatively new to Javascript so hopefully this will be a easy fix for a JS guru out there. I am trying to create a animated html5 canvas, with simple white shapes floating down a page. My aim is to create sliders to control the size, shape, speed etc. of the white shapes floating down the page. I have created the animation, and the slider, but am a bit stuck with how to get the value from the slider into the animation, and update the canvas to apply this new value as the user changes the slider. To start off, I am trying to update the value of the slider into the speed value. function sliderChange (value) { document.getElementById('sliderStatus').innerHTML = value; } var canvas = null; var context = null; var bufferCanvas = null; var bufferCanvasCtx = null; var flakeArray = []; var flakeTimer = null; var maxFlakes = 100; var sliderSpeed = document.getElementById('sliderStatus') function Flake() { this.x = Math.round(Math.random() * context.canvas.width); this.y = -10; this.drift = Math.random(); this.speed = Math.round(Math.random() * sliderSpeed) + 5; this.width = (Math.random() * 3) + 2; this.height = (Math.random() * 3) + 100; } HTML body code: Slider Value = 50
has answer: http://stackoverflow.com/a/29336631
has title: HTML5 Canvas Animation Slider
tagged with: slider
type: AnsweredQuestion
tagged with: live-update
accepted answer: http://stackoverflow.com/a/29336631
possible better answer: http://stackoverflow.com/a/29336021
has answer: http://stackoverflow.com/a/29336021

http://stackoverflow.com/q/29349710
possible better answer: http://stackoverflow.com/a/70003370
has body: I'm asking a question on a subject that has been well explored and there are many near-answers to what I am asking, but I haven't been able to find the exact answer to what is a simple question. I understand that defer scripts run in the order they appear on the page, but only after the DOM has been built, and I get that async scripts run as soon as is possible, and I know that neither one blocks the HTML parser. Here's the question: Is there a case in which a defer script can execute before all the async scripts have executed? Essentially, if the HTML parser has parsed the entire document and is ready to run the defer scripts BUT there are still some async scripts that have not loaded yet, will it wait for these async scripts to load (and execute), or will it run the defer scripts? Thanks!
tagged with: http://stackoverflow.com/tag/html
tagged with: asynchronous
tagged with: deferred
favorite count: 0
accepted answer: http://stackoverflow.com/a/29351446
has title: Can HTML execute before ?
type: AnsweredQuestion
upvote count: 5
type: Question
answer count: 2
score: 5
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/70003370
has comment: http://stackoverflow.com/comment/46885966
has answer: http://stackoverflow.com/a/29351446

http://stackoverflow.com/q/29299050
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46794062
favorite count: 0
has body: DataTable is able to create.Now i can only able to search the column named 'No'. My requirement is to search any number of desired colums of the datatable.Is there any problem by doing like this? can anyone help? dmhTable = $('#tableId').dataTable({ "bProcessing": true, "bDestroy": true, "bServerSide" : true, "bLenthChange" : false, "iDisplayLength" : 10, "sAjaxSource" : "searchHistoryByFromAndToDate.html?fromDate="+ $('#txtFromDate').val() +"&amp;toDate="+ $('#txtToDate').val(), "oLanguage" : { "sSearch" : "Search" }, "aoColumns" : [{"sTitle" : "Sl No","mData" : null,"aTargets": [ 0 ], "fnRender" : function(obj) { var columnIndex = obj.oSettings._iDisplayStart + obj.iDataRow+1 return columnIndex; } }, {"sTitle" : "ID","mData" : "ID", "bSearchable" : false,"bVisible":false}, {"sTitle" : " No","mData" : "No", "bSearchable" : true}, {"sTitle" : " Type","mData" : "Type", "bSearchable": true}, {"sTitle" : "Message","mData" : "Message", "bSearchable": true} ], "fnServerData" : function(sSource, aoData, fnCallback) { $.ajax({ "dataType" : 'json', "type" : "GET", "url" : sSource, "data" : aoData, "success" : fnCallback }); }, "sPaginationType" : "full_numbers" });
tagged with: datatables
has comment: http://stackoverflow.com/comment/46871989
has comment: http://stackoverflow.com/comment/46859615
answer count: 0
upvote count: 2
has comment: http://stackoverflow.com/comment/46794202
type: UnansweredQuestion
downvote count: 1
type: Question
has title: How to search multiple columns of the datatable based on this code?
score: 1
has comment: http://stackoverflow.com/comment/46793816
has comment: http://stackoverflow.com/comment/46882239
has comment: http://stackoverflow.com/comment/46868890

http://stackoverflow.com/a/42529906
upvote count: 2
has body: You can add JavaScript to the Additional HTML in Moodle As it is HTML, you will need to enclose your JavaScript in &lt;script&gt; tags. You can use jQuery or JavaScript. Be sure to target the specific elements you want, and not to affect other pages, as this will add the script to every page in your Moodle instance. The benefit of this approach is that you don't need to update the view.php file every time you upgrade Moodle.
answers question: http://stackoverflow.com/q/29373278
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/80559070
score: 2

http://stackoverflow.com/comment/46849254
type: Comment
has text: To save a user pointer: `{'__type': 'Pointer', 'className': '_User', 'objectId': XXXXX}`. You can replace username by a pointer
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29320627

http://stackoverflow.com/comment/46872663
comment on: http://stackoverflow.com/q/29329018
type: Comment
has text: [How can I debug my JavaScript code?](http://stackoverflow.com/questions/988363/how-can-i-debug-my-javascript-code)
score: 0
type: QuestionComment

http://stackoverflow.com/comment/46778603
type: QuestionComment
has text: No need to go digging; I've provided you with the prepared solution below.
comment on: http://stackoverflow.com/q/29290646
score: 0
type: Comment

http://stackoverflow.com/a/29376017
type: Answer
has body: So the problem wasn't actually related to the call method at all as Ben illustrated. After much tinkering, I realized I had to change this line: playSpy = sinon.spy(demo, "play"); to this: playSpy = sinon.spy(page.components[0], "play"); Now my tests pass. Hooray! I just wish it hadn't taken me the better part of a day to debug.
answers question: http://stackoverflow.com/q/29370799
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29370799

http://stackoverflow.com/q/29280287
type: Question
tagged with: javascript
score: 0
answer count: 1
tagged with: telerik
tagged with: asp.net
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29364325
has title: ReferenceError for Javascript within Web user control
has body: I've had similar problems in the fast, but always been able to circumvent them by putting the script in the main page. This time, however, the script needs to be in the web user control. But for some reason, the script does not get loaded, and Firefox's console tells me ReferenceError: deleteSystemMessage is not defined and I just don't understand why. This is basically the setup inside the web user control: &lt;script type="text/javascript"&gt; function deleteSystemMessage() { $(".bubbletext").val(callWebMethod("EventCalendar.aspx/GetTodaysSystemMessage", {})); hideActiveToolTip(); } function hideActiveToolTip() { var tooltip = Telerik.Web.UI.RadToolTip.getCurrent(); if (tooltip) { tooltip.hide(); } } &lt;/script&gt; Nevermind that the code seems to do things it doesn't advertise. The page isn't at all aware of the existence of the script. This web user control is located within a RadToolTipManager and can execute Javascript on the main page, as well as handle normal server side click events. What could be wrong?

http://stackoverflow.com/q/29241536
has comment: http://stackoverflow.com/comment/46689181
has body: I have the following code snippet... $scope.submitForm = function(){ // called when form button clicked. if( $scope.formStatus.disabled || $scope.validationForm.$invalid ){ return; } // Doesn't allow multiple button clicking when button is in disabled state. submitFormForValidation(); }; Every once in a great while, so great that I have only seen this happen once but have heard of it happen in the wild three times, the code above will execute the submitFormForValidation() function even though the form itself is invalid. I am using Angularjs 1.3.0.beta-8. Normally, the form will not submit when there is no value in any required input. If I enter a value, then delete it, the form will submit (but like I said very rarely, I have had no luck in recreating the issue, unless I hard code a setTimeout and pretend, this seams to recreate the issue. I thought that perhaps it was due to the way I had structured the code, but as I think about it perhaps Angular/browser was bogged down for just enough time where the form was still valid from entering an input, and did not update the $invalid property until after the submitForm function had run. Thus, the form was tricked into still being valid. Since I have had difficulty in witnessing this in the wild as it is so rare, I am assuming it is due to Angularjs not updating the form validation, which will then never exit the function and will run submitFormForValidation(); Here are my questions... Is there anything incorrect with the way the code was written? Is the version of Angularjs that I am using slower with the digest cycle or whatever runs form validation changes? Would upgrading to Angularjs 1.3+ (any stable branch) give more consistent speed in change detection? Again, this code works 4.0 for about 99% of the time. However, I do need 100% of the time. I would also like to understand why this is happening as I consider setting a setTimeout() is more of a bandaid fix, which could still potentially fail if the timeout was not …
favorite count: 0
has comment: http://stackoverflow.com/comment/46690141
tagged with: angularjs
has comment: http://stackoverflow.com/comment/46690790
type: UnansweredQuestion
score: 2
answer count: 0
upvote count: 2
has comment: http://stackoverflow.com/comment/46693062
has comment: http://stackoverflow.com/comment/46698382
has title: timing issue? or code structure?
tagged with: timing
type: Question
has comment: http://stackoverflow.com/comment/46722986
tagged with: performance
tagged with: javascript
has comment: http://stackoverflow.com/comment/46698433
has comment: http://stackoverflow.com/comment/46691257
has comment: http://stackoverflow.com/comment/46723197
downvote count: 0

http://stackoverflow.com/comment/46660713
has text: @nnnnnn because i only had 1 item , so it worked , you are correct but in my case i was testing a single element.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29226572

http://stackoverflow.com/comment/46858844
has text: I really appreciate the help and I've been working on this gallery 6 hours today. I'm still a real beginner with Javascript.
type: Comment
score: 0
comment on: http://stackoverflow.com/a/29333528
type: AnswerComment

http://stackoverflow.com/a/54247184
has comment: http://stackoverflow.com/comment/99553584
score: 15
has comment: http://stackoverflow.com/comment/140262460
upvote count: 15
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/29285897
has body: Another difference between the two loops, which nobody has mentioned before: Destructuring for...in is deprecated. Use for...of instead. Source So if we want to use destructuring in a loop, for get both index and value of each array element, we should to use the for...of loop with the Array method entries(): for (const [idx, el] of arr.entries()) { console.log( idx + ': ' + el ); }
has comment: http://stackoverflow.com/comment/99561664

http://stackoverflow.com/q/29222442
has answer: http://stackoverflow.com/a/29265551
tagged with: highcharts
answer count: 1
has title: Setting Highcharts piechart chartDefaults from calling jsx file in React
tagged with: javascript
has comment: http://stackoverflow.com/comment/46654271
accepted answer: http://stackoverflow.com/a/29265551
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46654980
has comment: http://stackoverflow.com/comment/46666995
has body: I am using the following syntax to render a Highcharts PieChart. var ContainingClass = React.createClass({ render: function() { return ( &lt;PieChart title={this.props.title} series={this.props.series} /&gt; ); }, }); This works well, but I need to overwrite the tooltip field in PieChart. What can I change in ContainingClass to make this happen? Edit: Here is a sample fiddle with PieChart - http://jsfiddle.net/gh/get/jquery/1.9.1/highslide-software/highcharts.com/tree/master/samples/highcharts/demo/pie-basic/ I know that I need to set the tooltip field and could do it in plain javascript or jquery. I don't know how to pass my desired tooltip value from ContainingClass in React.
has comment: http://stackoverflow.com/comment/46657200
type: Question
has comment: http://stackoverflow.com/comment/46654202
has comment: http://stackoverflow.com/comment/46666934
has comment: http://stackoverflow.com/comment/46667441
score: 0
tagged with: reactjs

http://stackoverflow.com/comment/46831793
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29318902
has text: Try wrapping it in a `div` and putting an `ng-click` on the `div`.

http://stackoverflow.com/comment/46892177
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/29337492
has text: plus 1 for a measured response to criticism.
score: 0

http://stackoverflow.com/q/29227445
tagged with: javascript
has comment: http://stackoverflow.com/comment/51776357
score: 4
favorite count: 0
has answer: http://stackoverflow.com/a/31426753
upvote count: 4
tagged with: node.js
tagged with: upnp
has body: I am looking to get UPnP device discovery, description done in Javascript - either in standalone browser environment or in NodeJS Towards that, I tried below two solutions but both did not work for me. Details - 1]NodeJS bases: https://www.npmjs.com/package/upnp-client After correcting few typos in the example app, and running it in node (My nodeJS is running under X-Ubuntu Virtual Machine inside Virtualbox) I get below errors on running the upnp-client example app dgram.js:399 throw new errnoException(process._errno, 'addMembership'); ^ Error: addMembership EBADF at new errnoException (dgram.js:457:11) NodeJS version: v0.10.25 Upnp client api: 0.0.1 2]Under Browser(Chrome/IE) https://www.npmjs.com/package/upnp-client None of them at the versions I have supported the navigator.getNetworkServices API which seems to be needed for this library How can i get UPnP device discovery working in Javascript? Any other solutions or pointers to resolve above errors/workarounds appreciated.
downvote count: 0
linked to: http://stackoverflow.com/q/17605252
type: UnansweredQuestion
has title: UPnP discovery, description inside Javascript
type: Question
answer count: 1

http://stackoverflow.com/comment/46889637
has text: https://github.com/google/google-api-javascript-client/issues/189
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29352088

http://stackoverflow.com/comment/46778605
comment on: http://stackoverflow.com/a/29290628
score: 0
type: AnswerComment
has text: That's perfect! So localStorage seems like a great idea for simple things but does it have limitations? Would it be a bad idea (or even possible) to create a user base with a username/password using localStorage?
type: Comment

http://stackoverflow.com/comment/46720310
comment on: http://stackoverflow.com/q/29258440
type: Comment
has text: Then your node application itself must be trying to listen to the same port twice.
type: QuestionComment
score: 1

http://stackoverflow.com/q/29326628
has body: Okay so i made this jquery slider from a video series on youtube and it doesn't seem to be working right... The image fades in at first but then the next image doesn't come in. How can i fix this.. Im using older versions of jquery because of deprecated functions here is the html. &lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt; Home &lt;/title&gt; &lt;link rel="stylesheet" type="text/css" href="style.css"&gt; &lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt; &lt;meta charset="UTF-8"&gt; &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.min.js" type="text/javascript"&gt; &lt;/script&gt; &lt;script src="jquery-ui-1.8.18.js" type="text/javascript"&gt; &lt;/script&gt; &lt;script src="script.js" type="text/javascript"&gt; &lt;/script&gt; &lt;/head&gt; &lt;body class="body" onload="Slider()"&gt; &lt;div class="container"&gt; &lt;div class="bg"&gt; &lt;div class="mainHeader"&gt; &lt;nav&gt; &lt;ul&gt; &lt;li class="last"&gt; &lt;a href="#"&gt;Contact&lt;/a&gt; &lt;/li&gt; &lt;li&gt; &lt;a href="#"&gt;Products&lt;/a&gt; &lt;/li&gt; &lt;li&gt; &lt;a href="#"&gt;About&lt;/a&gt; &lt;/li&gt; &lt;li&gt; &lt;a href="#" class="active"&gt;Home&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt; &lt;/nav&gt; &lt;/div&gt; &lt;div class="topArea"&gt; &lt;div class="topAInfo"&gt; &lt;h2&gt; Here is just a simple title &lt;/h2&gt; &lt;p&gt; This is just a little bit of dummy text. This is just a little bit of dummy text. This is just a little bit of dummy text. This is just a little bit of dummy text. &lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="middleArea"&gt; &lt;div class="slider"&gt; &lt;img id="1" src="slide1.jpg" border="0" alt="slide1" width="800px" height="350px"&gt; &lt;img id="2" src="slide2.jpg" border="0" alt="slide2" width="800px" height="350px"&gt; &lt;img id="3" src="slide3.jpg" border="0" a…
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
type: UnansweredQuestion
downvote count: 2
has answer: http://stackoverflow.com/a/29326992
upvote count: 1
tagged with: css
has answer: http://stackoverflow.com/a/29326902
type: Question
answer count: 2
has title: I made a jquery slide show but it doesn't work right, what do i do
has comment: http://stackoverflow.com/comment/46843878
tagged with: javascript
tagged with: jquery
score: -1

http://stackoverflow.com/q/29332148
tagged with: http://stackoverflow.com/tag/html
has body: I've came across the plugin called jquery.floatThead which is perfect for floating the table header as the user scrolls down, but I can't get this plugin to work for some reason. See below for my html and javascript and here for my codepen. Javascript: var $table = $('Table1'); $table.floatThead(); HTML Time Ideas Likes Sent to Project related 2014-10-31 Content1 20 ipsum 2014-10-31 Content3 20 ipsum 2014-09-31 Content4 20 ipsum 2014-10-21 Content2 20 ipsum 2014-10-01 Content 20 ipsum 2014-10-21 Content2 20 ipsum 2014-10-01 Content 20 ipsum 2014-10-21 Content2 20 ipsum 2014-10-01 Content 20 ipsum 2014-10-21 Content2 20 ipsum 2014-10-01 Content 20 ipsum 2014-10-31 Content1 20 ipsum 2014-10-31 Content3 20 ipsum 2014-09-31 Content4 20 ipsum 2014-10-21 Content2 20 ipsum 2014-10-01 Content 20 ipsum 2014-10-21 Content2 20 ipsum 2014-10-01 Content 20 ipsum 2014-10-21 Content2 20 ipsum 2014-10-01 Content 20 ipsum 2014-10-21 Content2 20 ipsum 2014-10-01 Content 20 ipsum 2014-10-01 Content 20 ipsum 2014-10-31 Content1 20 ipsum 2014-10-31 Content3 20 ipsum 2014-09-31 Content4 20 ipsum 2014-10-21 Content2 20 ipsum 2014-10-01 Content 20 ipsum 2014-10-21 Content2 20 ipsum 2014-10-01 Content 20 ipsum 2014-10-21 Content2 20 ipsum 2014-10-01 Content 20 ipsum 2014-10-21 Content2 20 ipsum 2014-10-01 Content 20 ipsum
upvote count: 1
answer count: 1
accepted answer: http://stackoverflow.com/a/29332262
tagged with: javascript
tagged with: jquery-plugins
type: AnsweredQuestion
downvote count: 0
score: 1
tagged with: jquery
has title: How to create a floating header using jquery.floathead?
favorite count: 0
type: Question
has answer: http://stackoverflow.com/a/29332262

http://stackoverflow.com/comment/46913152
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/29365077
has text: What do you mean by "the server console"?
type: Comment

http://stackoverflow.com/q/29258054
type: Question
has comment: http://stackoverflow.com/comment/46718637
has body: &lt;script&gt; $(document).ready(function(){ $("#date").click(function(){ start = $("#date_start").val(); end = $("#date_end").val(); }); }); &lt;/script&gt; &lt;input name='date_A' type='text' id='date_start' /&gt; &lt;input name='date_B' type='text' id='date_end' /&gt; &lt;input type="button" id="date" class="button" value="check" /&gt; The question is how to get value of "start" and "end" from the jquery to put that in PHP variable without post it first to database? &lt;?php $start_date = ""; $end_date = ""; ?&gt; The both variables above need the value of the variable "start" and "end" from jquery above
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46718759
has answer: http://stackoverflow.com/a/29258508
tagged with: ajax
answer count: 3
upvote count: 1
downvote count: 0
has title: php variables get values from jquery variables without post to the database
favorite count: 0
has comment: http://stackoverflow.com/comment/46718529
has comment: http://stackoverflow.com/comment/46718524
has comment: http://stackoverflow.com/comment/46718566
has answer: http://stackoverflow.com/a/29258158
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29259442
linked to: http://stackoverflow.com/q/6369313
tagged with: php
linked to: http://stackoverflow.com/q/5004233
score: 1

http://stackoverflow.com/comment/46674661
comment on: http://stackoverflow.com/q/29234222
score: 0
type: QuestionComment
type: Comment
has text: @Chud37 Take a look at this: [JavaScript Scope And Closures explained](http://robertnyman.com/2008/10/09/explaining-javascript-scope-and-closures/)

http://stackoverflow.com/comment/46735160
type: QuestionComment
comment on: http://stackoverflow.com/q/29266129
has text: @Katana314 the browser detection is actually done server side. It's done on the server as we have a.config listing the unsupported browsers in xml format. The mvc view then looks through the config keys. At this point we can then decide whether or not to render the partial view (browser warning). The ultimate idea is to allow for users to browse with the banner still there, or dismiss it. If it was up to me I'd forget the dismissing function altogether so the constant reminder to upgrade is there! No pity for ie users :)
score: 0
type: Comment

http://stackoverflow.com/comment/46879035
comment on: http://stackoverflow.com/q/29346523
score: 0
type: Comment
type: QuestionComment
has text: @adeneo Oh!..Ok..I Understand, So is it possible to achieve it?

http://stackoverflow.com/comment/46841593
type: AnswerComment
comment on: http://stackoverflow.com/a/29325443
score: 0
type: Comment
has text: My apologies for not posting my self answer immediately as part of the original post. I'm glad you posted basically the exact same thing. (There is a bug in yours though, that you are not assigning the `timerId` during `setTimeout`)

http://stackoverflow.com/q/29327137
tagged with: requirejs
upvote count: 1
has title: How to activate RequireJS In Play Activator
answer count: 0
downvote count: 0
has comment: http://stackoverflow.com/comment/46870547
tagged with: javascript
has comment: http://stackoverflow.com/comment/46876476
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46873433
has comment: http://stackoverflow.com/comment/46877512
tagged with: typesafe-activator
tagged with: playframework
score: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/46874671
has body: I'm using Play-Activator version 2.3.7, and trying to activate RequireJS (rjs). I've followed all the steps in the documentation (or through here), but couldn't manage to make it work. Already was - (plugins.sbt) addSbtPlugin("com.typesafe.sbt" % "sbt-rjs" % "1.0.1") Added - (build.sbt) pipelineStages := Seq(rjs) What is missing? Is there any indicator that the plugin is indeed working right now?
type: Question

http://stackoverflow.com/comment/46923861
score: 0
type: Comment
has text: I'm not bent out of shape either, just sayin' I'll update to try to make a better question (it's updated now)
type: QuestionComment
comment on: http://stackoverflow.com/q/29371065

http://stackoverflow.com/q/29266809
has comment: http://stackoverflow.com/comment/46737062
type: Question
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/29268595
has answer: http://stackoverflow.com/a/29268505
accepted answer: http://stackoverflow.com/a/29268505
tagged with: arrays
tagged with: javascript
tagged with: sorting
has comment: http://stackoverflow.com/comment/46736951
has body: top 20% of all scores is an A. second 20% of scores is a B. third 20% of scores is a C. fourth 20% of scores is a D. bottom 20% of scores is an F. the following scores: 99, 92, 91, 91, 89, 85, 83, 82, 80, 79, 78, 78, 77, 76, 75, 74, 62, 55, 43, 20 I need to write a function that takes a score list of any length (not necessarily the list used as an example above) as a parameter, and returns the list of grades associated with those scores. So far what I got is: Click the button sort out grades. Calculate I am able to get it to descend from greatest to least, and have individual lines for each row (A,B,C,D,F). I cannot figure out how to get the grades distributed by increments of 20%. I want the output to be: A=99,92,91,91 B=89,85,83,82 C=80,79,78,78 D=77,76,75,74 F=62,55,43,20
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29268595
has title: How to sort test grades by letter grade

http://stackoverflow.com/a/29352702
has comment: http://stackoverflow.com/comment/46890687
upvote count: 2
answers question: http://stackoverflow.com/q/29352434
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29352434
has body: You don't need for loops there. Simply .find() span with class .spanelem in a closest &lt;tr&gt; parent of the clicked element: $(".hide").click(function(){ $(this).closest('tr').find('.spanelem').hide(); // Or using selector context (.find() equivalent but a bit shorter) // $('.spanelem', $(this).closest('tr')).hide(); }); JSFiddle JSFiddle References: .closest() .find() selector context
type: Answer
score: 2
downvote count: 0

http://stackoverflow.com/comment/46840200
type: Comment
has text: Well this solution does provide both : a "popup" will appear at top of the page to alert the user that he became offline, with a lbutton allowing him to store data in a local txt file, with name set automatically btw, and it also stores it in local storage, which may not be consistent in case of cache cleaning. But if user don't manually clears it, it will stay on desktop (mobile browser are more unsatble as they store it in application cache). Therefore, this solution keep looking for connection and saves it back to server if user get reconnected to it.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29319683

http://stackoverflow.com/q/29228534
has answer: http://stackoverflow.com/a/29228685
tagged with: javascript
tagged with: jquery
favorite count: 0
type: Question
has body: I have some js code that will insert a section tag when a button is clicked . I would like for some content to be in the section tag when its inserted. Preferable this would happen on the same button click. HTML (Working) : New Slide JS (Working) : function runme() { var sec = document.createElement("section"); document.getElementById('slides').appendChild(sec); } Code to be added to section tag: Title
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29228624
score: 0
has answer: http://stackoverflow.com/a/29228612
upvote count: 1
downvote count: 1
possible better answer: http://stackoverflow.com/a/29228624
has answer: http://stackoverflow.com/a/29228656
has title: Insert section with content
answer count: 4
accepted answer: http://stackoverflow.com/a/29228612
type: AnsweredQuestion

http://stackoverflow.com/q/29291771
favorite count: 0
has comment: http://stackoverflow.com/comment/46781650
tagged with: css
score: 2
downvote count: 0
type: UnansweredQuestion
has title: JS/CSS Rotated DIVS to meet in the middle of any screen
has answer: http://stackoverflow.com/a/29334540
type: Question
has body: So I am trying to rotate 2 divs so at 45 degrees, but I need them to meet in the middle. I have tried everything I can think of to get these divs to meet in the middle of the window but just can get it to work. Here is a JSfiddle that explains the goal. http://jsfiddle.net/wnuxtc5c/ P.S. these must be 2 separate elements so I can animated them individually. Here is what I have thus far: &lt;div id="container"&gt; &lt;div class="greenBG"&gt;&lt;/div&gt; &lt;div class="blueBG"&gt;&lt;/div&gt; &lt;/div&gt; #container { position: absolute; z-index: 1; width: 100%; height: 100%; overflow: hidden; } .greenBG { background: green; position: absolute; -ms-transform: rotate(45deg); -webkit-transform: rotate(45deg); transform: rotate(45deg); } .blueBG { background: blue; position: absolute; -ms-transform: rotate(45deg); -webkit-transform: rotate(45deg); transform: rotate(45deg); } $(document).ready(function() { var wH = $(window).height(), wW = $(window).width(), offset = wW/2, diagonal = Math.sqrt(wH*wH + wW*wW), diagonalMid = diagonal/2; console.log('wH',wH); console.log('wW',wW); console.log('diagonal',diagonal); console.log('diagonalMid',diagonalMid); console.log('offset',offset); $('.greenBG').css({ height: wW + 'px', width: wW + 'px', left: '-'+offset+'px', top: '-'+offset+'px' }); $('.blueBG').css({ height: wW + 'px', width: wW + 'px', right: '-'+offset+'px', bottom: '-'+offset+'px' }); });
upvote count: 2
answer count: 2
has answer: http://stackoverflow.com/a/29292729
has comment: http://stackoverflow.com/comment/46781381
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/29281663
accepted answer: http://stackoverflow.com/a/29281929
score: 1
has body: I am new to AngularJs and going through w3schools tutorials i created my own example where ng-show calls method to remove elements after ng-click event. When i click on button, it calls HidePerson() method. further it calls ShowPerson() method many times and it seems to work find, BUT whenever it returns true or false elements are always visible. Here is my code. var personCtrl = angular.module('person', []); personCtrl.controller('personCtrl', function ($scope, $http) { $scope.persons = []; $scope.personIgnoreList = []; $scope.GetPersons = function () { $http.get('http://www.w3schools.com/website/Customers_JSON.php') .success(function (data, obj1, obj2, obj3) { $scope.persons = data; }) .error(function (data, obj1, obj2, obj3) { $scope.persons = "Ops... smth went wrong..."; }) }; $scope.ShowPerson = function (person) { $($scope.personIgnoreList).each(function (i, p) { if (p == person) { return false; } }); return true; } $scope.HidePerson = function (person) { $scope.personIgnoreList.push(person); } }); {{person.Name}} from {{person.City}} - {{person.Country}}
has comment: http://stackoverflow.com/comment/46761381
possible better answer: http://stackoverflow.com/a/29281899
type: Question
has answer: http://stackoverflow.com/a/29281899
has comment: http://stackoverflow.com/comment/46761331
has title: ng-show "call method" doesnt work
tagged with: javascript
tagged with: jquery
answer count: 3
has comment: http://stackoverflow.com/comment/46761336
has answer: http://stackoverflow.com/a/29281929
downvote count: 0
favorite count: 0
tagged with: angularjs
upvote count: 1
has answer: http://stackoverflow.com/a/29283807
type: AnsweredQuestion

http://stackoverflow.com/a/29359230
answers question: http://stackoverflow.com/q/29348785
type: Answer
score: 1
upvote count: 1
downvote count: 0
has body: Note that if your button is part of a form submit, then issue 284 suggests it's not currently supported. You can change your button to a regular button (rather than a submit button) and programmatically submit the form from the callback in a sweetalert callback.

http://stackoverflow.com/q/29302435
downvote count: 1
type: Question
has title: Remove hover style on parent when hovering on child with CSS
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/46824752
answer count: 1
linked to: http://stackoverflow.com/q/17923922
favorite count: 0
type: UnansweredQuestion
duplicate of: http://stackoverflow.com/q/17923922
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/29302950
upvote count: 1
has body: I have a fiddle: http://jsfiddle.net/a80h6pts/1/ Some text Text text text Example text When my mouse activates the over for #divParent, I want all tags to change color except for the inside #divChild. Then when I move my mouse to #divChild, I want all tags inside it to change color and the of #divParent back to their original color. I cannot remove or change the class .myhover or use javascript. How can I do it only with CSS? EDIT: Badly, some people think i have to use js. I can use js (jquery) with a minimal impact on html/css.

http://stackoverflow.com/comment/46674879
type: Comment
has text: @TomerM this is not the answer I was looking for.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29234360

http://stackoverflow.com/a/29370061
answers question: http://stackoverflow.com/q/29368603
score: 0
type: Answer
has body: Try this it will work to get top domain (Fiddle Link): HTML Code: &lt;input type="text" id="url"&gt; &lt;br/&gt; &lt;input type="button" value="Get Top Domain" id="getTopDomain"/&gt; Script to get top domain: jQuery('#getTopDomain').click(function() { var regex = new RegExp(/\./g) var text = jQuery('#url').val(); var count = text.match(regex).length; if(count &gt; 1) { text = text.substring(text.indexOf('.')+1); } alert(text); }); Thanks, ~Chandan

http://stackoverflow.com/q/29319451
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46830701
has comment: http://stackoverflow.com/comment/46831195
has comment: http://stackoverflow.com/comment/46830597
has comment: http://stackoverflow.com/comment/46830645
tagged with: forms
type: Question
has comment: http://stackoverflow.com/comment/46830791
has title: validate a form when using modal?
answer count: 1
has body: I try to make a form validation, but if I hit submit, the form disapears before giving me the feedback: Say Something! Express yourself ;) tell me something What do you think Thank you Bye ^_^ The JS: function contact(){ $('.coupled.modal') .modal({ allowMultiple: false }) ; // attach events to buttons $('.second.modal') .modal('attach events', '.first.modal .button') ; // show first now $('.first.modal') .modal('show') ; } And here is how the first windows diseapears without letting me validate. Update: I added the validation, but it doesent work: $('.ui.form') .form({ message: { identifier : 'msg', rules: [ { type : 'empty', prompt : 'Please enter a message' } ] }, }) ;
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46830902
score: 0
has comment: http://stackoverflow.com/comment/46830498
has comment: http://stackoverflow.com/comment/46831274
has answer: http://stackoverflow.com/a/29782686
tagged with: semantic-ui

http://stackoverflow.com/q/29244766
score: 1
upvote count: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29244913
linked to: http://stackoverflow.com/q/824349
has comment: http://stackoverflow.com/comment/46695508
has comment: http://stackoverflow.com/comment/46695528
type: Question
has comment: http://stackoverflow.com/comment/46695535
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
accepted answer: http://stackoverflow.com/a/29244913
has comment: http://stackoverflow.com/comment/46695645
has body: I want to render my pages client-side to help keep the load off the server and keep down traffic. I understand that the first call to the server normally results in that the server must render the page requested and then sends that page to the user. When the user interacts with the page the javascript takes over the routing, which sends requests to the server for a specific view which then is updated via javascript on the client. I was thinking if this approach exists or not and if it is viable. Let's say i wish to go to the address: www.example.com/about Is there an approach which attaches the /about as an argument to the html page/javascript code (same that serves www.example.com/) from the server. When the dom is ready on the client it sends a request to the server for the /about data, which with the response updates the clients views. This would mean skipping the server side rendering completely. Or am I crazy?
tagged with: template-engine
tagged with: node.js
has title: Client side rendering and skipping server rendering approach?
tagged with: angularjs
has comment: http://stackoverflow.com/comment/46695537

http://stackoverflow.com/q/29285960
has answer: http://stackoverflow.com/a/53409904
favorite count: 0
possible better answer: http://stackoverflow.com/a/38845980
has title: watch network with nightwatch
has comment: http://stackoverflow.com/comment/46772148
answer count: 4
has body: I'm using nightwatch to test the frontend of an application. I'm testing that some buttons are clickable or not. Is it possible with nightwatch, to know if there was a network request made by the click, or more generally, to watch the network.
tagged with: frontend
has comment: http://stackoverflow.com/comment/46799759
accepted answer: http://stackoverflow.com/a/53409904
upvote count: 7
has answer: http://stackoverflow.com/a/62104314
has comment: http://stackoverflow.com/comment/46771515
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/48324685
score: 7
has comment: http://stackoverflow.com/comment/46773565
type: Question
tagged with: testing
tagged with: nightwatch.js
has answer: http://stackoverflow.com/a/38845980
downvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/46888205
score: 0
type: Comment
type: QuestionComment
has text: efficiency is not a concern at all, I am just trying to see if there's a better way. thanks
comment on: http://stackoverflow.com/q/29351262

http://stackoverflow.com/q/29253702
type: AnsweredQuestion
score: 1
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/29254135
has body: HTML If i click the tr selected class to be added and if i click the another tr the trselected to be removed and for which one i selected i need to be have trselected Jquery $('table > tbody > tr').click(function(){ $(this).removeClass('trselected'); $(this).addClass('trselected'); });
has answer: http://stackoverflow.com/a/29253773
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29253725
accepted answer: http://stackoverflow.com/a/29253725
has answer: http://stackoverflow.com/a/29253890
has title: Remove multiple selected classes in table
favorite count: 0
possible better answer: http://stackoverflow.com/a/29253773
answer count: 4

http://stackoverflow.com/a/35655456
has comment: http://stackoverflow.com/comment/63149238
has comment: http://stackoverflow.com/comment/67276695
score: 6
has body: This is much easier now with ES6, for example: export default class CustomSprite extends Phaser.Sprite { constructor(game){ super(game, 0, 0); this.addChild(game.add.sprite(0, 0, 'someSprite')); game.stage.addChild(this); } update() { //move/rotate sprite } } You can then import and use it like this: this.customSprite = new CustomSprite(this.game); this.customSprite.x = 400; this.customSprite.y = 100; Here´s a boilerplate to get you started: https://github.com/belohlavek/phaser-es6-boilerplate/
downvote count: 0
has comment: http://stackoverflow.com/comment/93667759
type: Answer
upvote count: 6
answers question: http://stackoverflow.com/q/29231281
has comment: http://stackoverflow.com/comment/93666309

http://stackoverflow.com/comment/47234190
type: Comment
comment on: http://stackoverflow.com/a/29485104
has text: this seems like a very promising approach and I'll try that out asap, thx. How would you deal with unsupported languages / fallback to a default language?
score: 0
type: AnswerComment

http://stackoverflow.com/q/29249127
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/46705630
has body: Can you please take a look at this demo and let me know how I can rename uploaded image name before sending to server? $(document).ready(function (e) { $("#uploadimage").on('submit', (function (e) { e.preventDefault(); $("#message").empty(); $('#loading').show(); $.ajax({ url: "ajax_php_file.php", // Url to which the request is send type: "POST", // Type of request to be send, called as method data: new FormData(this), // Data sent to server, a set of key/value pairs (i.e. form fields and values) contentType: false, // The content type used when sending data to the server. cache: false, // To unable request pages to be cached processData: false, // To send DOMDocument or non processed data file it is set to false success: function (data) // A function to be called if request succeeds { $('#loading').hide(); $("#message").html(data); } }); })); // Function to preview image after validation $(function () { $("#file").change(function () { $("#message").empty(); // To remove the previous error message var file = this.files[0]; var imagefile = file.type; var match = ["image/jpeg", "image/png", "image/jpg"]; if (!((imagefile == match[0]) || (imagefile == match[1]) || (imagefile == match[2]))) { $('#previewing').attr('src', 'noimage.png'); $("#message").html(" Please Select A valid Image File " + " Note " + "Only jpeg, jpg and png Images type allowed"); return false; } else { var reader = new FileReader(); reader.onload = imageIsLoaded; reader.readAsDataURL(this.files[0]); } }); }); function imageIsLoaded(e) { $("#file").css("color", "green"); $('#image_preview').css("display", "block"); $('#previewing').attr('src', e.target.result); // $('#previewing').attr('width', '250px'); // $('#previewing').attr('height', '230px'); }; });
tagged with: javascript
has title: How To Rename File Name on Uploading An Image Using jQuery
downvote count: 0
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
answer count: 0
score: 1

http://stackoverflow.com/comment/46708298
score: 0
type: Comment
has text: means how it not work .. what you have done ?? update in question
type: AnswerComment
comment on: http://stackoverflow.com/a/29251749

http://stackoverflow.com/q/29259033
tagged with: jquery-ui
upvote count: 0
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/29259100
has comment: http://stackoverflow.com/comment/46721033
answer count: 2
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has body: I have created a table and I dynamically populate this table by generating DIVs. I want my table elements to be draggable so i'm using Jquery.Ui which requires the class to be specified with the correct name so that it can be dragged. However I find that only the first DIV has this class and the other generated ones don't which means they can't be dragged. My code. while ( $row = mysqli_fetch_array ( $result ) ) { echo '&lt;div id="Cell" class="ui-widget-content"&gt;'; echo '&lt;input type="checkbox" name="tbl" id="tblst" value="' . $row [0] . '" /&gt;'; echo '&lt;p&gt;' . $row [0] . '&lt;/p&gt;'; echo '&lt;/div&gt;'; } Output via inspect element. How can I fix this so that all the elements generated are draggable??
has title: Dynamically generated DIVs missing class attribute
score: -2
possible better answer: http://stackoverflow.com/a/29261013
tagged with: css
has answer: http://stackoverflow.com/a/29261013
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29259100
has comment: http://stackoverflow.com/comment/46720967
downvote count: 2
type: Question

http://stackoverflow.com/comment/72720885
comment on: http://stackoverflow.com/a/42518434
type: AnswerComment
type: Comment
has text: This is a more appropriate answer. You can handle headers like 'If-Modified-Since' and 'If-None-Match' by these options.
score: 1

http://stackoverflow.com/comment/46887402
comment on: http://stackoverflow.com/q/29350970
has text: First determine what rule you want to use to determine the background colour. Is it based on something in the data or is it just alternating?
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/46825532
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29316340
has text: could u please change one thing ,remove type="text/javascipt" from bootstrap.min.js script.
score: 0

http://stackoverflow.com/a/29403063
accepted answer of: http://stackoverflow.com/q/29350787
answers question: http://stackoverflow.com/q/29350787
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/47008756
has comment: http://stackoverflow.com/comment/47007257
type: Answer
has comment: http://stackoverflow.com/comment/47131631
has comment: http://stackoverflow.com/comment/86119502
score: 8
has comment: http://stackoverflow.com/comment/86120502
downvote count: 0
upvote count: 8
has body: I personally would go with Niet the Dark Absol's suggestion about checking fields when changing section and displaying warning flags (I think it would give a better user experience). But if you want to continue with the check on form submission, there's a way of tricking the browser into doing what you want by using JavaScript. The browser identifies and highlights the first invalid field that is visible when the page validates (for IE and FF it will highlight all the invalid fields that are visible); so, before the form validation happens, you'd need to run a quick check and open the accordion section that contains the first invalid field. The key is to run that check before the HTML5 validation happens. That means that onsubmit is not good enough, as the browser will validate before the submit event. You need to run the code when the submit button/image is clicked, as that click event happens before the browser validates the fields. You didn't specify if it was for jQuery UI or Bootstrap, so here are examples for both (the code is similar, just changing the way to handle opening/closing the accordion): JQUERY UI ACCORDION You can see a working demo for jQuery UI on this JSFiddle: http://jsfiddle.net/ma8v32ug/1/. The JavaScript check would be like this: // save the accordion in a variable as you'll need it later $accordion = $("#accordion").accordion(); // when the submit is clicked $("#myForm input[type='submit']").on("click", function(event) { // traverse all the required elements looking for an empty one $("#myForm input[required='required']").each(function() { // if the value is empty, that means that is invalid if ($(this).val() == "") { // find the index of the closest h3 (divide by 2 because jQuery UI accordion goes in pairs h3-div. A bit hacky, sorry) var item = $(this).closest(".ui-accordion-content").prev().index() / 2; // open that accordion section that contains the required field $accordion.accordion("option","active", item); // stop scrolling through …
has comment: http://stackoverflow.com/comment/65003858
has comment: http://stackoverflow.com/comment/86119383

http://stackoverflow.com/comment/46729044
type: AnswerComment
type: Comment
has text: Check this out : [https://raw.githubusercontent.com/rendro/easy-pie-chart/master/dist/jquery.easypiechart.js](https://raw.githubusercontent.com/rendro/easy-pie-chart/master/dist/jquery.easypiechart.js)
comment on: http://stackoverflow.com/a/29262621
score: 1

http://stackoverflow.com/comment/46712077
type: AnswerComment
type: Comment
has text: So it's not really possible to combine the two (ByTagName & ByClassName) if you're looking for elements that have both the right tag and class?
comment on: http://stackoverflow.com/a/29254532
score: 0

http://stackoverflow.com/comment/46784040
has text: it doesn't display anything
type: AnswerComment
comment on: http://stackoverflow.com/a/29293752
type: Comment
score: 2

http://stackoverflow.com/comment/46894311
has text: this can be solved with pure CSS, just work on your bigger screen, and resize the window to see how it behaves on a smaller screen
type: Comment
comment on: http://stackoverflow.com/q/29354573
score: 1
type: QuestionComment

http://stackoverflow.com/a/29347050
has body: If I understand what you're getting at correctly, better to handle this with an event listener for state changes: $scope.on('$stateChangeSuccess', function(e, toState) { if(toState.name === 'stateWithRefresh') { findData(); } });
answers question: http://stackoverflow.com/q/29346897
score: 0
type: Answer

http://stackoverflow.com/comment/46783564
type: Comment
type: QuestionComment
has text: And consider replacing `/>` with just `>` in the closing of your tags. Also, run your code through the w3c validator at http://validator.w3.org/
comment on: http://stackoverflow.com/q/29293601
score: 0

http://stackoverflow.com/q/29364432
tagged with: android
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
answer count: 5
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/49235357
has title: The HTML with javascript is not getting loaded in android webview
score: 3
tagged with: android-webview
has body: I am trying to display a page containing HTML with javascript in android webview with the below code.But this doesn't seem to work.Can anyone help me out. public class MainActivity extends ActionBarActivity { WebView browser; @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); setContentView(R.layout.activity_main); browser = (WebView) findViewById(R.id.webView); browser.setLayerType(View.LAYER_TYPE_SOFTWARE, null); browser.setWebViewClient(new Callback()); browser.getSettings().setJavaScriptEnabled(true); loadTime(); } void loadTime() { String page = " " +" " +" chat window " +" " +" " +" " +" " +" "; System.out.println(page); browser.loadDataWithBaseURL("x-data://base", page, "text/html", "UTF-8", null); } private class Callback extends WebViewClient { public boolean shouldOverrideUrlLoading(WebView view, String url) { loadTime(); return(true); } } Whenever I load my this webpage in default browser its working perfectly. Where i have did wrong.
downvote count: 1
type: Question
upvote count: 4
has comment: http://stackoverflow.com/comment/49466450
has answer: http://stackoverflow.com/a/29364598
has answer: http://stackoverflow.com/a/30703762
has answer: http://stackoverflow.com/a/30095928
tagged with: javascript
has answer: http://stackoverflow.com/a/30702076
has answer: http://stackoverflow.com/a/30701103

http://stackoverflow.com/a/29242374
accepted answer of: http://stackoverflow.com/q/29239889
answers question: http://stackoverflow.com/q/29239889
has comment: http://stackoverflow.com/comment/46692871
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46719439
type: Answer
has body: Instead of deleting the parser.allHrefs while you go through it. You should refactor de getHtml just to know if you can add the link or not. Like this: function getHtml (link, callback) { httpreq.get(link, function(err, res) { //the request has already finished executing here if(err) { return callback(err); } if(res.statusCode &gt;= 300) { return callback(null,false); } else { //cut parsing code here... return callback(null,true); } }); }; This way when you call the gatherSecondLevelData function you check if you add the link or not like this: function gatherSecondLevelData (err) { var calls = []; async.each(parser.allHrefs,function (href,callback) { getHtml(href,function(err, add){ if(err){ return callback(err); }; if(add){ calls.push(href); }; return callback(); }); }, function (err) { if(err){ console.log('something went wrong'); }else{ console.log('finished'); }; }); };
has comment: http://stackoverflow.com/comment/46692259
score: 0

http://stackoverflow.com/comment/47016971
has text: That's good. What version were you using and what version are you using now?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29291000
type: Comment

http://stackoverflow.com/q/29362809
downvote count: 0
tagged with: javascript
score: 1
accepted answer: http://stackoverflow.com/a/29363154
tagged with: jquery
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
has title: Linkify in Textarea Jquery
has body: I am using linkify in textarea &amp; i have autosave function in it. After every 3 secs the text is saved in database .I am calling linkify before saving in database. $(".froala-element").linkify(); What problem i am facing is the focus of cursor/caret is lost due to linkify .. I keep on writing and after autosave cursor is lost its position.. I am using froala-editor as my text editor.
tagged with: froala
favorite count: 0
type: Question
upvote count: 1
answer count: 1
has answer: http://stackoverflow.com/a/29363154
linked to: http://stackoverflow.com/q/13949059
tagged with: textarea

http://stackoverflow.com/q/29350656
score: 0
answer count: 2
tagged with: events
has title: how to reference the value of an input element using angular event handler
tagged with: angularjs
has answer: http://stackoverflow.com/a/29350742
type: UnansweredQuestion
tagged with: reference
has body: how I do : &lt;input ng-keyup="foo($event)"&gt; $scope.foo = function (event) { var v = event.srcElement.value; } how I want to do : &lt;input ng-keyup="foo(this.value);"&gt; $scope.foo = function (v) { var v = v; } this doesn't work. this doesn't reference to the input element.
has answer: http://stackoverflow.com/a/29350801
type: Question
tagged with: javascript

http://stackoverflow.com/comment/116146646
has text: any Idea on this question @AlexyPavlov https://stackoverflow.com/questions/65586632/chartjs-with-angular-position-tooltip-carret-above-and-middle-of-bar
type: Comment
comment on: http://stackoverflow.com/a/35442835
score: 0
type: AnswerComment

http://stackoverflow.com/a/29330007
score: 1
has comment: http://stackoverflow.com/comment/46849592
answers question: http://stackoverflow.com/q/29329947
upvote count: 1
accepted answer of: http://stackoverflow.com/q/29329947
has body: It's a simple issue (you need to replace this div vs append to it see): $("div.title-competency").load("resources.html .competencies #" + this.id + " .title-competency"); Is creating 2 .title-competency divs. Before ajax: your text e.g. after your ajax loads you have your text You have options on is to use a wrapping div and there are some other hackier solutions in this SO Question: How can I use jQuery.load to replace a div including the div
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/comment/46685758
comment on: http://stackoverflow.com/a/29239175
type: AnswerComment
score: 0
type: Comment
has text: Thanks. I think I will parametrize the inner function so that you can pass in the key to merge against (so that one can reuse the function for other contexts as well)

http://stackoverflow.com/q/29219735
type: AnsweredQuestion
has title: detect active for jQuery carousel (pagination)
has body: My alteration / attempt to jQuery Carousel script can be found below; However to my dismay, the active class isn't attaching correctly and rather just always shows the first &lt;li&gt; as active. I would also like the ability to 'click' each &lt;li&gt; representing pagination so it can go to that slide. It's a very small 3-image carousel. Please take a gandar and feast your eyes at my jFiddle. If any suggestions that work, please present thee. jQuery(document).ready(function(){ /** * Check if first li element is hidden * then show */ if( jQuery('.carouselNav li:first-child').is(':hidden') ) { // Toggle visibility jQuery('.carouselNav li:first-child').toggle(); jQuery('.carouselPagination li:first-child').addClass('active'); } // Interval time var carouselInterval = 5000; // Slider function carouselSlide(){ // Check if last element was reached if( jQuery('.carouselNav li:visible').next().length == 0 ) { // Hide last li element jQuery('.carouselNav li:last-child').slideUp('fast'); // Show the first one jQuery('.carouselNav li:first-child').slideDown('fast'); jQuery('.carouselPagination li:last-child').removeClass('active'); jQuery('.carouselPagination li:first-child').addClass('active'); } else { // Rotate elements jQuery('.carouselNav li:visible').slideUp('fast').next('li:hidden').slideDown('fast'); jQuery('.carouselPagination active').removeClass('active').next('li').addClass('active'); } } // Set Interval var carouselScroll = setInterval(carouselSlide,carouselInterval); // Pause on hover jQuery('.carousel').hover(function() { clearInterval(carouselScroll); }, function() { carouselScroll = setInterval(carouselSlide,carouselInterval); carouselSlide(); }); });
has answer: http://stackoverflow.com/a/29221879
type: Question
tagged with: javascript
score: 0
answer count: 1
tagged with: jquery
accepted answer: http://stackoverflow.com/a/29221879
tagged with: carousel

http://stackoverflow.com/q/29302394
answer count: 2
has comment: http://stackoverflow.com/comment/46799496
has comment: http://stackoverflow.com/comment/46799600
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/29302689
has comment: http://stackoverflow.com/comment/46799666
favorite count: 0
upvote count: 2
has title: How to update input value attribute on the fly
downvote count: 1
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/29302567
accepted answer: http://stackoverflow.com/a/29302567
has answer: http://stackoverflow.com/a/29302689
tagged with: forms
has body: Thanks in advance for the assistance. I have some fields in a form that send some data to an ajax request. I have a button that fires this function to get the data to fill in the remaining form fields on the page. Save adding all my code, as there is nothing wrong with it at the moment, here is an example of what I am trying to do. &lt;input type="text" value="corporate" id="type" placeholder="New Value"&gt; &lt;button id="update"&gt;&lt;/button&gt; The update button is used to make an ajax request to the database to get all the remaining meta data for that page. Which kind of works. However the id there "type" is the type of data i need (commercial / corporate / retail). Each type has a different set of meta data. I need to replace the value attr when i click the button before the remaining functions for the ajax request fire off so that they take the correct data with them. So if i type a new value, it sends the new value. make sense?
type: Question

http://stackoverflow.com/a/29313834
has body: In the angular documentation for select it states Optionally, a single hard-coded element, with the value set to an empty string, can be nested into the element. This element will then represent the null or "not selected" option. See example below for demonstration. Which means you can do this: Please select an option Val: {{val}}
type: Answer
answers question: http://stackoverflow.com/q/29313769
upvote count: 4
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29313769
score: 4

http://stackoverflow.com/tag/svg
tags question: http://stackoverflow.com/q/29253081
tags question: http://stackoverflow.com/q/29271893
tags question: http://stackoverflow.com/q/29282120
tags question: http://stackoverflow.com/q/29292551
tags question: http://stackoverflow.com/q/29294094
tags question: http://stackoverflow.com/q/29297193
tags question: http://stackoverflow.com/q/29265470
tags question: http://stackoverflow.com/q/29342670
tags question: http://stackoverflow.com/q/29229436
tags question: http://stackoverflow.com/q/29220479
tags question: http://stackoverflow.com/q/29301842
tags question: http://stackoverflow.com/q/29350172
tags question: http://stackoverflow.com/q/29350599
tags question: http://stackoverflow.com/q/29301542
tags question: http://stackoverflow.com/q/29312024
tags question: http://stackoverflow.com/q/29335354
tags question: http://stackoverflow.com/q/29248342
tag name: svg
tags question: http://stackoverflow.com/q/29308369
tags question: http://stackoverflow.com/q/29327530
tags question: http://stackoverflow.com/q/29307640
tags question: http://stackoverflow.com/q/29252451
tags question: http://stackoverflow.com/q/29240441
tags question: http://stackoverflow.com/q/29282388
tags question: http://stackoverflow.com/q/29354661
tags question: http://stackoverflow.com/q/29276237
tags question: http://stackoverflow.com/q/29297671
tags question: http://stackoverflow.com/q/29219905
tags question: http://stackoverflow.com/q/29261304
tags question: http://stackoverflow.com/q/29316652
tags question: http://stackoverflow.com/q/29233368
tags question: http://stackoverflow.com/q/29310184
tags question: http://stackoverflow.com/q/29340190
tags question: http://stackoverflow.com/q/29367838
tags question: http://stackoverflow.com/q/29295322
tags question: http://stackoverflow.com/q/29364451
tags question: http://stackoverflow.com/q/29223417
tags question: http://stackoverflow.com/q/29228428
tags question: http://stackoverflow.com/q/29256313
tags question: http://stackoverflow.com/q/29330384
tags question: http://stackoverflow.com/q/29247474
tags question: http://stackoverflow.com/q/29266556
tags question: http://stackoverflow.com/q/29274033
tags question: http://stackoverflow.com/q/29279879
type: Tag

http://stackoverflow.com/q/29218140
has comment: http://stackoverflow.com/comment/46645788
accepted answer: http://stackoverflow.com/a/29221115
upvote count: 1
type: Question
tagged with: javascript
has title: access elements inside an frame
has body: My html code is below I need to access input elements in b.html. Please provide me javascript suggestions. i am getting error while trying through chrome console FIRST ATTEMPT: document.getElementsByName['body'].contentDocument VM331:2 Uncaught TypeError: Cannot read property 'contentDocument' of undefined document.getElementsByName['body'].contentWindow.document VM347:2 Uncaught TypeError: Cannot read property 'contentWindow' of undefined 2nd ATTEMPT: var theFrame = document.getElementsByTagName("frame")[2]; var theFrameDocument = theFrame.contentWindow.document; var button = theFrameDocument.getElementsByTagName("input"); VM494:3 Uncaught DOMException: Blocked a frame with origin "null" from accessing a cross-origin frame. main.html &lt;html&gt; &lt;frameset framepadding="0" framespacing="0" bgcolor="#F0E68C" border="0" frameborder="no"&gt; &lt;frameset rows="16%,*"&gt; &lt;frame bgcolor="white" src="h.html" name="header" marginwidth="15" marginheight="40" scrolling="no" frameborder="0" noresize="" width="100%"&gt; &lt;frameset bordercolor="#F0E68C" cols="200px,*"&gt; &lt;frame src="l.html" name="left"/&gt; &lt;frame src="b.html" id="body1" name="body"/&gt; &lt;/frameset&gt; &lt;/frameset&gt; &lt;noframes&gt; &amp;amp;lt;BODY&amp;amp;gt; &amp;amp;lt;/BODY&amp;amp;gt; &lt;/noframes&gt; &lt;/frameset&gt; &lt;/html&gt; h.html &lt;html&gt; &lt;body&gt; header &lt;/body&gt; &lt;/html&gt; l.html &lt;html&gt; &lt;body&gt; left &lt;/body&gt; &lt;/html&gt; b.html &lt;html&gt; &lt;body&gt; body &lt;input id="input1" value="empty" type="text" name="txtProdCoating" size="25"&gt; &lt;/body&gt; &lt;/html&gt;
downvote count: 0
answer count: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/29221115
favorite count: 0
linked to: http://stackoverflow.com/q/25098021
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
score: 1

http://stackoverflow.com/comment/46881431
comment on: http://stackoverflow.com/a/29347837
type: Comment
has text: I want a function that I can pass a key/value pair!
score: 0
type: AnswerComment

http://stackoverflow.com/comment/46801746
type: QuestionComment
comment on: http://stackoverflow.com/q/29302146
has text: Set a GET param in the link(?view=desktop), then save in cookie, when navigating check for the value (to redirect or not redirect)
type: Comment
score: 1

http://stackoverflow.com/a/29319322
type: Answer
has comment: http://stackoverflow.com/comment/46875755
has comment: http://stackoverflow.com/comment/46969298
score: 1
upvote count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/46951401
has body: The best way to find out if there is something wrong with your code is using Firebug in Firefox or Developer Tools in Chrome. Referring to your problem, I just removed the util.Utility from the code and it works fine. So you want to make sure if there is any Utility.js in the app/util folder. Also, Utility.js should follow Sencha class structure: Ext.define('.util.Utility', { /*upper case "U" in important*/ config : { } }); At the end, you should see either the klik or an error in the console output.
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29303393
answers question: http://stackoverflow.com/q/29303393
has comment: http://stackoverflow.com/comment/46889807

http://stackoverflow.com/comment/46832519
score: 0
type: AnswerComment
type: Comment
has text: i wrote that given below function funData(){var arr=[]; for(var i in data){ for(var j in data1){ arr.push(data1[j]) data[i].c1=arr; } } return data; }
comment on: http://stackoverflow.com/a/29320339

http://stackoverflow.com/q/29358656
tagged with: arrayobject
has comment: http://stackoverflow.com/comment/46901703
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/29359117
tagged with: for-loop
accepted answer: http://stackoverflow.com/a/29358795
tagged with: arrays
possible better answer: http://stackoverflow.com/a/29358807
tagged with: javascript
score: -1
has body: I want to loop through an array of objects and i am unable to find the key's of each object. What am i doing wrong? The Javascript / jQuery code: var position = []; $('.box').each(function(){ var id = $(this).attr('id'); var offset = $(this).offset(); var offsetX = offset.left; var offsetY = offset.top; position.push('{"id":'+id+',"offX":'+offsetX+',"offY":'+offsetY+'}'); }); for (var i = 0; i < position.length; i++) { console.log(position[i].id); // i get the error of undefined } Html markup: 1 2 3 4 5 6 7 8 9 10 Here the jsfiddle
has answer: http://stackoverflow.com/a/29358807
has comment: http://stackoverflow.com/comment/46901713
answer count: 3
has comment: http://stackoverflow.com/comment/46901752
upvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/46901719
has comment: http://stackoverflow.com/comment/46901927
has title: Unable to loop through array of objects in javascript
has answer: http://stackoverflow.com/a/29358795
type: AnsweredQuestion

http://stackoverflow.com/a/29357698
accepted answer of: http://stackoverflow.com/q/29357137
answers question: http://stackoverflow.com/q/29357137
upvote count: 2
has body: You simply need to preventDefault() inside your submit listener, and then call window.location.href = "..."; Currently, without preventing the default action of submitting a form, the form tries to POST your data, regardless of what happens in the submit callback. If you preventDefault, the form will not submit until you return true. That being said, redirects should be performed on the backend or by the front-end MVC framework. In any way, the password data needs to be submitted and checked against a database somewhere.
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 2

http://stackoverflow.com/a/29223785
upvote count: 1
downvote count: 1
score: 0
has body: You can't save period! JavaScript doesn't let save anything because of security issues. You can use local storage, you can store stuff in string format.
answers question: http://stackoverflow.com/q/29223560
type: Answer

http://stackoverflow.com/a/29368866
score: 1
has body: I don't think it's possible without checking for specific extensions like ".co.uk". At least it is not possible using just character-counting or by counting dots. Also confirmed by this answer: How to get domain name only using javascript? Regarding the answer mentioned above, note that the list of TLD's has grown alot since then, so make sure you update your list, if you want to use that answer as a base for your end solution. Fresh list: List of TLD's from IANA.org
upvote count: 1
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/29368603

http://stackoverflow.com/q/29291836
type: Question
has title: Making horizontal sliding sections?
tagged with: javascript
score: 0
has body: Here is an example of exactly what I am trying to create. I've tried to create on my own a page that kind of worked like that with 3 paragraphs. I only want 1 paragraph to be shown at a time and I want the left and right arrows to take me to the previous and next paragraphs respectively. I'm not exactly sure how to get only one paragraph showing at a time (I put them all in a container, I'm assuming I would have to do something with that), and I don't really know how to begin with the horizontal sliding (I'm assuming I would need to do something with JS). Here is what I have so far: HTML: Lorem ipsum dolor sit amet, consectetur adipisicing elit. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Lorem ipsum dolor sit amet, consectetur adipisicing elit. ← → CSS: @import url(http://fonts.googleapis.com/css?family=Open+Sans); .slide_container { width: 960px; margin: 0 auto; font-family: 'Open Sans'; } #prev, #next { border: none; padding: 10px 20px; background-color: #efefef; color: #c2c2c2; transition: background .2s ease-in-out; } #prev:hover, #next:hover { background: #dedede; cursor: pointer; } #prev:focus, #next:focus { outline: none; } #prev { float: left; margin-left: 400px; } #next { float: right; margin-right: 400px; } JavaScript: var prev = document.getElementById('prev'); var next = document.getElementById('next'); prev.addEventListener('click', function() { // Somehow to go to the previous slide }); next.addEventListener('click', function() { // Somehow to go to the next slide }); Any help would be very appreciated! EDIT: Here is the jsfiddle if it is any help.
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: css
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/19145504
has answer: http://stackoverflow.com/a/29292173
has comment: http://stackoverflow.com/comment/46781000

http://stackoverflow.com/comment/46793756
has text: it doesn't do trick for me!
type: QuestionComment
comment on: http://stackoverflow.com/q/29299277
score: 0
type: Comment

http://stackoverflow.com/comment/46767100
type: QuestionComment
score: 3
comment on: http://stackoverflow.com/q/29284714
has text: `onclick="Dailer.call(this)"`
type: Comment

http://stackoverflow.com/q/29266417
tagged with: socket.io
has answer: http://stackoverflow.com/a/29266615
linked to: http://stackoverflow.com/q/61735730
has comment: http://stackoverflow.com/comment/46734660
tagged with: javascript
has comment: http://stackoverflow.com/comment/46734791
type: Question
upvote count: 4
answer count: 1
has comment: http://stackoverflow.com/comment/46734926
tagged with: webrtc
has comment: http://stackoverflow.com/comment/109201020
favorite count: 0
has body: Here is client side code: http://hostcode.sourceforge.net/view/2911 Here is server side code: http://hostcode.sourceforge.net/view/2912 So what happens is, I have two buttons. I am new to webrtc, so I am just testing this out with buttons for now. I open one window and go to localhost. I click accept camera, and see myself in the camera. Then, on the first window, I am supposed to click on connect. I don't click on the other button! I open another window and go to localhost. I click accept camera, see myself, and then I click first on connect, and THEN on create offer button. These two windows get connected, BUT it generates like 8-15 ice candidates... And I have them logging on the console. So many ice candidates.... why? Is it a list of all the people on my wifi network? Or what? Where it says "Ok so this is ice candidate event, I guess:" and then it lists the ice candidate.... It writes that like 14 times in console.log, just when those two windows connect! It doesn't make any sense...
tagged with: p2p
tagged with: node.js
has title: Why does my WebRTC code generate SO MANY ice candidates?
has comment: http://stackoverflow.com/comment/46735033
type: UnansweredQuestion
score: 1
downvote count: 3
linked to: http://stackoverflow.com/q/21069983

http://stackoverflow.com/comment/46858761
type: Comment
comment on: http://stackoverflow.com/q/29333681
has text: @NikhilBhandari I don't think it's with the controller, I think it's with my service. When I step through it, factory gets hit and returned THEN the angular loop starts and adds stuff to factory but then never rereturns the factory.
score: 0
type: QuestionComment

http://stackoverflow.com/a/29369661
score: 2
accepted answer of: http://stackoverflow.com/q/29369649
answers question: http://stackoverflow.com/q/29369649
upvote count: 2
has comment: http://stackoverflow.com/comment/46920915
has comment: http://stackoverflow.com/comment/46920960
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46920903
type: Answer
downvote count: 0
has body: Use $(document).on('submit', '.delForm', function(dleItem) {});

http://stackoverflow.com/comment/46834244
comment on: http://stackoverflow.com/a/29320956
score: 0
type: AnswerComment
has text: I get no results at all with `{{t.full_name}}`
type: Comment

http://stackoverflow.com/comment/46672209
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/29233088
type: Comment
has text: The script is running before the element is created on the DOM and you keep the asp tags.

http://stackoverflow.com/comment/46674078
type: Comment
score: 1
type: QuestionComment
comment on: http://stackoverflow.com/q/29233968
has text: clean and remove are properties.. when you use (for in), it assumes option.header as an object and it will get ALL keys related to its object. You must use @Andy solution instead.

http://stackoverflow.com/q/29342273
has comment: http://stackoverflow.com/comment/46875339
has body: I've been stuck with this problem a couple of days, and I didn't find anything that could help me. The idea is to get price_scenarios index view rendered in a modal popup. For each price_scenario shown in the table, a controller method, "price" is called. This method gets some info from the model and render it formated using JSON. This way of getting the prices was coded for a previous developer who is no longer in the project, and is necessary becouse price values can take a while to be calculated, so a small wheel gif is rendered when page loads. The problem: price_scenarios "price" method doesn't render any value. This only happens if "price" is called within the index view rendered in a modal popup, I've tried doing this rendering price_scenarios index and it works fine. Also, this method is succesfully used in many other views of the app. I think it must be a problem with format responses, due to call the method from a popup, but everything I've tried haven't improved the results. product show.html.haml a button displaying price_scenarios index as a modal popup: %h3 = model_class.human_attribute_name(:price) = link_to PriceScenario.model_name.human(count: 2), formula_product_price_scenarios_path(@formula, @product), remote: true, data: {toggle: "modal", target: "#price_scenarios"}, class: "btn" #price_scenarios(class="modal hide fade" role="dialog" aria-labelledby="Delta" aria-hidden="true") price_scenarios_controller.rb definition of index and price methods class PriceScenariosController &lt; ApplicationController before_filter :require_client load_and_authorize_resource :formula load_and_authorize_resource :product, :through =&gt; :formula before_filter :get_tuple, only: :price def index @price_scenarios = @product.price_scenarios respond_to :js end def price @price_scenario = PriceScenario.find(params[:id]) @price = @price_scenario.shifted_price(@tuple) @price_units = @product.price_units respond_to do |format| format.html { render partial: 'price'} format.j…
type: UnansweredQuestion
score: 1
upvote count: 1
tagged with: ruby-on-rails
type: Question
has comment: http://stackoverflow.com/comment/46874114
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/46871945
has comment: http://stackoverflow.com/comment/46874343
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: ruby-on-rails-3
has title: Controller method using JS doesn't return/render data when called within modal popup
favorite count: 0
has answer: http://stackoverflow.com/a/29344813

http://stackoverflow.com/q/29310886
accepted answer: http://stackoverflow.com/a/29311414
answer count: 3
tagged with: jquery
tagged with: html-select
possible better answer: http://stackoverflow.com/a/29311271
has answer: http://stackoverflow.com/a/29311414
has title: How to get the selected value of a drop-down list with JavaScript/JQuery
type: AnsweredQuestion
has body: I'm new to JavaScript and require some help, I have as yet been unable to find a solution to this problem and would appreciate any help if possible. I thank you in advance. Ok, I have two drop-down lists and what I would like to do is create a function that would allow me to print out a value depending on the combination of options selected. for example, if "iPhone" is selected in drop down one, then "button" is selected in drop-down two it would display the cost of that repair in a text box. iphone blackberry HTC Samsung button batter screen back So lets say that i selected iphone then button a value would display but if i selected blackberry then button a different value would display , i have tried event listener and i have tried doing this using a button, but i just cannot seem to get the code right please help if you can. Thank you
has comment: http://stackoverflow.com/comment/46816010
has comment: http://stackoverflow.com/comment/46815914
type: Question
has answer: http://stackoverflow.com/a/29311271
has answer: http://stackoverflow.com/a/29311322
tagged with: javascript
score: 0

http://stackoverflow.com/a/29333902
has comment: http://stackoverflow.com/comment/46894207
has comment: http://stackoverflow.com/comment/46896178
has comment: http://stackoverflow.com/comment/46894515
has comment: http://stackoverflow.com/comment/46856895
upvote count: 1
has body: Sounds doable, however you should definitely consider a long and random salt to prevent a simple attack based on precalculations. More formally, you'd have to send the image, a long random salt and the hash value. Then, client side, you would calculate the hash of the input text concatenated with the salt and compare the result to the hash. Because of the long random salt, the attacker's precalculated set would have to be enormously large to reflect all possible salt values. Also, forget about MD5 as it is considered unsafe. Use a stronger hash function. Also note that this would only be something that could possibly enhance the user experience (no need to POST the page in case of mistyped captcha) but definitely you can't do it only client-side. The actual verification must be done at the server.
has comment: http://stackoverflow.com/comment/46897231
downvote count: 0
has comment: http://stackoverflow.com/comment/46857075
score: 1
answers question: http://stackoverflow.com/q/29333659
type: Answer

http://stackoverflow.com/a/29345981
has comment: http://stackoverflow.com/comment/46877933
answers question: http://stackoverflow.com/q/29345773
type: Answer
score: 0
has body: addition to Arun P Johny's answer: &lt;?php $class_middle = ""; if($row['outstandingdues'] &gt; 0) { $class_middle = 'class="middle"'; } else { $class_middle = ""; } echo '&lt;td '.$class_middle.'&gt;&lt;center&gt;'. $row['outstandingdues'] . '&lt;/center&gt;&lt;/td&gt;'; ?&gt; This will make it red only when outstanding dues are greater than 0.

http://stackoverflow.com/q/29230627
type: UnansweredQuestion
has title: on click event on JQuery chosen plugin
has body: I´m using JQuery chosen, and I read the API and I see that only this events are publish change: Chosen triggers the standard DOM chosen:ready Triggered after Chosen has been fully instantiated. chosen:maxselected Triggered if max_selected_options is set and that total is broken. chosen:showing_dropdown Triggered when Chosen’s dropdown is opened. chosen:hiding_dropdown Triggered when Chosen’s dropdown is closed. chosen:no_results Triggered when a search returns no matching results. But in my case what I want is an event when I click in one of the elements of my dropdown, even if the value has not change. Any suggestions?
has answer: http://stackoverflow.com/a/29233998
type: Question
has comment: http://stackoverflow.com/comment/46670769
has comment: http://stackoverflow.com/comment/46669333
tagged with: javascript
score: 0
answer count: 1
tagged with: jquery

http://stackoverflow.com/q/29367324
has answer: http://stackoverflow.com/a/29390015
favorite count: 0
has comment: http://stackoverflow.com/comment/46946259
has comment: http://stackoverflow.com/comment/46956597
tagged with: requirejs
has comment: http://stackoverflow.com/comment/46928113
upvote count: 3
type: UnansweredQuestion
tagged with: amd
has comment: http://stackoverflow.com/comment/46918442
type: Question
has body: I am new to requirejs and AMD module functions, and I am trying to pass a parameter from a require call, but I am running into some troubles. I am trying to pass the obj in a require call to the fun method. This require call is within a define method as shown in the code below. I following the instructions from this blog: http://blog.novanet.no/4-strategies-for-passing-parameters-to-requirejs-modules/ define(['require'],function(require){ var obj= {name:'random'}; require({ config : { 'tagging' : obj } },['fun'],function(promise){ promise.then(function(ret){ //do something. }); } } Then I want to use the passed obj parameter in this below code. In fun.js //Passing obj to fun.js define(['module','lie'],function(data,Promise){ var promise = new Promise(function(res,rej){ //do something }); } But instead I am getting the following error on the console: TypeError: depMaps.slice is not a function Any clues on fixing this? PS:Also if there are any better methods, kindly let me know. Thanks,
score: 3
has title: Passing parameters in requirejs via a require call in define
tagged with: javascript
has comment: http://stackoverflow.com/comment/46928061
answer count: 1
downvote count: 0

http://stackoverflow.com/a/37249090
accepted answer of: http://stackoverflow.com/q/29302891
answers question: http://stackoverflow.com/q/29302891
type: Answer
downvote count: 0
score: 1
has body: document.currentScript is perfectly working with chrome and FF, however, IE dose not support it. It is painful. scripts[scripts.length - 1]; Codes above are not trustable. It defers on async condition.
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/comment/46837067
score: 1
has text: Thank you very much for your answers, they all do the thing I want in different ways, although I have chosen to use the script Lal made in the JSfiddle.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29320328

http://stackoverflow.com/a/29347945
has comment: http://stackoverflow.com/comment/46884460
accepted answer of: http://stackoverflow.com/q/29345467
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46883200
answers question: http://stackoverflow.com/q/29345467
has comment: http://stackoverflow.com/comment/46882276
type: Answer
has comment: http://stackoverflow.com/comment/46883119
upvote count: 2
has body: Is this good enough? $( document ).ready(function() { // If CSS Columns is not supported, re-order li elements // instead of 1,2,3,4,5,6,7,8... reorder to 1,14,27,40,2,15,28,41,3... var items = $('.main-index li'); var columnCount = $('.main-index ul').css('column-count'); // = 4 if ( typeof columnCount != 'number' ) { columnCount = 4; } var itemCount = items.length; // = 5 function reflow() { var rowCount = Math.ceil(itemCount / columnCount); items.detach(); $('.main-index ul').empty(); // Prevent build-up of dummy items for (var row = 0; row &lt; rowCount; row++) { for (var column = 0; column &lt; columnCount; column++) { var index = row + (column * rowCount); if ( index &gt;= itemCount ) { $('.main-index ul').append('&lt;li class="dummy"&gt;'); } else { $('.main-index ul').append(items[index]); } } } } $(window).on('resize', function() { var newColumnCount = $('.main-index ul').css('column-count'); // = 4 if ( typeof newColumnCount != 'number' ) { newColumnCount = 4; } if ( newColumnCount != columnCount ) { columnCount = newColumnCount; reflow(); } }); });
has comment: http://stackoverflow.com/comment/46882735
has comment: http://stackoverflow.com/comment/46882899
score: 2
has comment: http://stackoverflow.com/comment/46885780

http://stackoverflow.com/comment/47420834
has text: I have updated my answer with the way that I did it. I'm sure there would be a way to do it using ogr2ogr, but I used QGIS, to achieve the same result.
type: Comment
comment on: http://stackoverflow.com/a/29378108
score: 1
type: AnswerComment

http://stackoverflow.com/a/29287252
accepted answer of: http://stackoverflow.com/q/29287029
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/46785545
score: 1
has comment: http://stackoverflow.com/comment/46771800
downvote count: 0
answers question: http://stackoverflow.com/q/29287029
type: AcceptedAnswer
has body: I tried something simple and didn't seem to have a problem. Here's a JSbin: http://emberjs.jsbin.com/borejamufo/3/edit?html,js,console,output

http://stackoverflow.com/q/29349980
score: 0
has body: I have a code snippet like this.When I submit it shows alert button and ajax function calls.How can I prevent.I have a textbox with id=id1.I need to call ajax only if there is a value in textbox. I have also another button in same page so I need to call common validate function inside that button also.So I wrote common function. $( document ).ready(function() { function validate() { if($('#id1').val=='') { alert('enter a value'); return false; } return true; } $('#button').click(function() { validate(); $.ajax...code goes here }); });
answer count: 2
has comment: http://stackoverflow.com/comment/46885622
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29350002
accepted answer: http://stackoverflow.com/a/29350002
type: Question
has title: form not submitting issue
has answer: http://stackoverflow.com/a/29350176
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/29350176

http://stackoverflow.com/comment/46783563
has text: Didn't I just answer this [here](http://stackoverflow.com/questions/29287311/how-to-append-datetime-value-to-formdata-and-receive-it-in-controller)?
score: 0
comment on: http://stackoverflow.com/q/29293637
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46840747
comment on: http://stackoverflow.com/q/29324924
score: 0
type: QuestionComment
type: Comment
has text: check the javascript console from your online server to see if it reports any errors.

http://stackoverflow.com/comment/46871567
type: AnswerComment
score: 0
type: Comment
has text: This is slower than `closest('.root')`, but a good option if it happens at click speeds and you don't have a specific root class.
comment on: http://stackoverflow.com/a/29342248

http://stackoverflow.com/q/29289865
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/29289989
type: Question
tagged with: javascript
score: 0
has title: Javascript slideshow buttons not working
answer count: 1
has comment: http://stackoverflow.com/comment/46776857
has body: I can't seem to get my slideshow working, it works fine when it is on it's own on a blank HTML page but when I try to incorporate it into my site it does appear but I am unable to use the Next and Previous buttons. Can someone help me troubleshoot? Thanks. HTML Kawasaki Motorcycle Club UK BIKES NEWS EVENTS JOIN CONTACT //slideshow starts here caption for image 1 Previous Next Javascript var images = ["mybike.jpg", "image2.jpg", "image3.jpg"]; var caption = ["My bike", "House", "Chess"]; var imageNumber = 0; var imageLength = images.length - 1; function changeImage(x) { "use strict"; imageNumber += x; // if reached end of array start over if (imageNumber > imageLength) { imageNumber = 0; } if (imageNumber < 0) { imageNumber = imageLength; } document.getElementById("slideshow").src = images[imageNumber]; document.getElementById("caption").innerHTML = caption[imageNumber]; return false; } CSS body { font-family: 'Arial', sans-serif; background-color: #000; } #wrapper { max-width: 1000px; margin: 0 auto; background-color: #fff padding: 32px; } header { height: 110px; background: url(header.png); } header h1 { //NOT NEEDED text-align: center; color: #FFF; } header h2 { //NOT NEEDED font-variant: small-caps; text-align: center; color: #fff; } .navbar { padding: 5px 0 5px 0; text-align: center; line-height: 35px; background: url(navbar.png); background-size: contain; } ul.navbar { margin-top: 15px; } .navbar li { display: inline; padding: 0 40px 0 40px; font-size: 30px; font-weight: 800; } a:hover, a:visited, a:link, a:active { text-decoration: none; background: #60bf19; color: #FFF; text-shadow: -5px -5px 0 #000; } a:hover { color:dimgrey; text-shadow: -5px -5px 0 #000; } a:active { color: #FFF text-shadow: -5px -5px 0 #000; } .contentbox { width: 1000px; overflow:auto; margin: 0 auto; background-color: #383131; border-radius: 5px; } #maincontent { color: #FFF; } .sideimage { float: right; } .socialcontainer { width: auto; height: auto; text-align: center; } #facebookbutt…
type: UnansweredQuestion

http://stackoverflow.com/a/29362278
answers question: http://stackoverflow.com/q/29362077
has comment: http://stackoverflow.com/comment/46912532
has comment: http://stackoverflow.com/comment/46908763
has comment: http://stackoverflow.com/comment/46910742
upvote count: 3
has body: One way: CSS: .container { position:relative; margin:50px auto; width:400px; } .dot1 { background-color:white; width:50px; height:50px; border-radius:100%; position:absolute; left:-25px; top:-25px; } .dot2 { background-color:white; width:50px; height:50px; border-radius:100%; position:absolute; right:-25px; top:-25px; } .dot3 { background-color:white; width:50px; height:50px; border-radius:100%; position:absolute; right:-25px; bottom:-25px; } .dot4 { background-color:white; width:50px; height:50px; border-radius:100%; position:absolute; left:-25px; bottom:-25px; } Demo: http://jsfiddle.net/ofejxfj6/ You can tweak it a little (size of circles/dots and dimensions), but it is pretty close, IMHO.
has comment: http://stackoverflow.com/comment/46908589
has comment: http://stackoverflow.com/comment/46908567
has comment: http://stackoverflow.com/comment/46909126
has comment: http://stackoverflow.com/comment/46908324
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46909033
score: 3
accepted answer of: http://stackoverflow.com/q/29362077
type: Answer

http://stackoverflow.com/q/29295343
has body: So, I am using the MEAN stack and my landing page includes a number of Angular ng-include's. For example: &lt;div data-ng-include="'/modules/landing/views/sections/features.client.view.html'"&gt; I'm also using mean-seo: https://github.com/meanjs/mean-seo. This essentially just uses phantomjs to render the page if a crawler is detected via ?_escaped_fragment_=. My problem is that the partials being included via the ng-include are not rendered by mean-seo, i.e. by phantomjs. If you have any ideas why this might be it would be terrific if you could share them!
upvote count: 4
answer count: 1
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/31263428
tagged with: angularjs
type: UnansweredQuestion
tagged with: seo
has title: Ng-include partial not rendering with phantomjs
type: Question
tagged with: phantomjs
tagged with: mean-stack
tagged with: javascript
score: 4

http://stackoverflow.com/a/29341864
has comment: http://stackoverflow.com/comment/46870711
score: 1
has comment: http://stackoverflow.com/comment/46870828
upvote count: 1
has body: You just ned to move the var num outside the scope of the click . $(document).ready(function(){ var number = 100; $(".label").click(function() { number++; $(".shownumber").text(number); }); });
type: Answer
answers question: http://stackoverflow.com/q/29341791
downvote count: 0
has comment: http://stackoverflow.com/comment/46870863

http://stackoverflow.com/q/29287619
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/46842430
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/48033947
downvote count: 0
favorite count: 0
has body: My friend and I are working on a site, and we used three.js to make a background for it. There's a few sizing issues we're trying to figure out, so right now it looks best with about a 1300 x 800 window. The main problem we're having is that we can't figure out how to get the animation to stay at a set speed. It starts slow, then speeds up infinitely, which we don't want. In the JS, I marked the speed controls that are causing the problem. I tried multiple different ways of doing the "if, else if, else if" stuff, and I tried multiple different number combinations and I can't get it to stay at a single speed. Every time I thought it would work, there was no animation. It didn't speed up or anything. Also, if you're going to render it, it may be best to save the code in one folder as: styles.css, index.html, and animation.js The Javascript var scene, camera, renderer, controls; var geometry, material, plane, meshes = []; var timeout; var width = window.innerWidth, height = window.innerHeight; var canvas = document.getElementById('canvas'); var init = function () { scene = new THREE.Scene(); camera = new THREE.PerspectiveCamera(80, width / height, .01, 2000); camera.position.set(0, -45, (height / 9)); camera.rotation.x = .3; scene.fog = new THREE.FogExp2(0x222233, 0.001275); var ambientLight = new THREE.AmbientLight(0x121212); scene.add(ambientLight); var spotLight = new THREE.SpotLight(0xFFFFFF); spotLight.position.set(0, -25, 200); spotLight.castShadow = true; spotLight.shadowDarkness = 1; spotLight.shadowMapWidth = 1024; spotLight.shadowMapHeight = 1024; spotLight.shadowCameraNear = 0.01; spotLight.shadowCameraFar = 1000; spotLight.shadowCameraFov = 80; scene.add(spotLight); renderer = new THREE.WebGLRenderer({ antialias: true, alpha: true }); renderer.setClearColor(0x222228); renderer.setSize(width, height); canvas.appendChild(renderer.domElement); geometry = new THREE.PlaneGeometry((width / 5), (height / 7), 13, 8); material = new THREE.MeshLambertMaterial({ // co…
has comment: http://stackoverflow.com/comment/46774010
type: UnansweredQuestion
tagged with: three.js
tagged with: http://stackoverflow.com/tag/html
has title: three.js website background set speed
answer count: 0

http://stackoverflow.com/comment/46819518
type: Comment
comment on: http://stackoverflow.com/a/29311921
has text: Sorry. I owe you one.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/46804731
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29303072
has text: It's my understanding that controllerAs syntax's most value is for when you have nested scopes. You don't have nested scopes in this. As far as the vm=this issue, the author of that _style guide_ was using it primarily in services to keep state, and view models (hence the variable name, vm...). That said, do whatever you're comfortable with...but it appears the style guide has added more confusion than helped.
type: AnswerComment

http://stackoverflow.com/comment/46912628
type: Comment
score: 0
has text: @enguerranws Can you please give me a proper example of how to use routes/ ng-view
type: QuestionComment
comment on: http://stackoverflow.com/q/29362600

http://stackoverflow.com/a/29267966
score: 0
has body: here's a snippet extending PHPglue's answer #parentDiv { display: block; width: 200px; height: 20px; background-color: rgb(200,200,200); border: dotted 2px; border-radius: 0px 0px 0px 0px; } #parentDiv input[type="text"] { display: inline-block; width: 180px; height: 90%; border: none; vertical-align: top; } #parentDiv div { background-color: #57c274; display: inline-block; cursor: pointer; color: #ffffff; text-decoration: none; height: 100%; width: 20px; /*margin-left: -6px;*/ text-align: center; } &lt;div id=parentDiv&gt; &lt;input type="text"&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;
type: Answer
answers question: http://stackoverflow.com/q/29267835

http://stackoverflow.com/q/29275993
tagged with: windows
answer count: 0
type: UnansweredQuestion
tagged with: visual-studio
tagged with: firebase
has comment: http://stackoverflow.com/comment/46759398
type: Question
has comment: http://stackoverflow.com/comment/46850678
has body: I am developing javascript app using HTML in visual studio 2013. I want to use Microsoft Azure or Firebase for database but visual studio showing the error.. This is the code provided by azure to connect database. var client = new WindowsAzure.MobileServiceClient( "https://onlinepolicestation.azure-mobile.net/", "awTfASDTrumVMrQsqEFfgzVSSaFJFd27" ); I run the app, getting the same error in azure and firebase database connectivity. This is the error showing by visual studio and the same error was getting when i use script code for Firebase. 0x800a1391 - JavaScript runtime error: 'WindowsAzure' is undefined
tagged with: javascript
score: 0
tagged with: azure
has title: how to setup connection between html app and azure or firebase in visual studio 2013...?

http://stackoverflow.com/comment/46813004
comment on: http://stackoverflow.com/q/29309568
type: QuestionComment
has text: What "outputs" are you talking about. It's unclear what it is you want to achieve and where the problem lies.
type: Comment
score: 0

http://stackoverflow.com/comment/111595184
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29223576
has text: Really a great solution. event.target.href was giving me undefined

http://stackoverflow.com/comment/46723176
type: QuestionComment
has text: @ArtjomB. using then makes it work. I don't seem to get the difference. After clicking a dropdown I want to wait until results appear, why then works. I am a bit confused when to use then and when not to
score: 0
comment on: http://stackoverflow.com/q/29255108
type: Comment

http://stackoverflow.com/a/29266579
answers question: http://stackoverflow.com/q/29265659
accepted answer of: http://stackoverflow.com/q/29265659
type: AcceptedAnswer
downvote count: 0
has body: The way to move forward is to abstract away the animation function from the "click" event handler on your links. That way you can call the animation function from both a click and a timer event. The tricky thing about this is that you have to capture the this context in order to use it inside a closure. Here's what I mean: //... moveTo: function($a) { var slide = $($a.attr('href')); var wrapper = $('.slideshow-wrapper'); wrapper.animate({ left: -slide.position().left }, 500, 'linear', function () { $('.slideshow-nav-current').text(slide.data('index')); $a.addClass('active').siblings('a').removeClass('active'); }); }, navigate: function () { var self = this; $('a', '.slideshow-nav').click(function (e) { e.preventDefault(); if (self.interval) { clearInterval(self.interval); self.interval = false; } var $a = $(this); self.moveTo($a); }); }, autoPlay: function() { var $alist = $('a', '.slideshow-nav'); var i = 0; var self = this; this.interval = setInterval(function() { var $a = $alist.eq(i++); i %= $alist.length; self.moveTo($a); }, 1000); }, init: function () { this.paginate(); this.navigate(); this.autoPlay(); } //... Try it in a plunker.
score: 1
has comment: http://stackoverflow.com/comment/46737212
has comment: http://stackoverflow.com/comment/46775340
has comment: http://stackoverflow.com/comment/46736748
type: Answer
has comment: http://stackoverflow.com/comment/46736414
upvote count: 1
has comment: http://stackoverflow.com/comment/46736151
has comment: http://stackoverflow.com/comment/46774595

http://stackoverflow.com/q/29337042
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/46862739
has answer: http://stackoverflow.com/a/29337869
type: Question
has comment: http://stackoverflow.com/comment/46863297
has answer: http://stackoverflow.com/a/29337436
tagged with: javascript
tagged with: radar-chart
answer count: 2
upvote count: 1
favorite count: 0
tagged with: d3.js
has title: How to position circles/points at intersection on a Radar Chart in D3.js
possible better answer: http://stackoverflow.com/a/29337436
has body: I am working on a Radar chart. I have appended some circles that I am trying to position at intersections. However, there seems to be something wrong with the cx and cy attributes of the circles, which I am unable to figure out. Any help with this will be greatly appreciated. var dataset = [{ "day": 1, "sales": 40 }, { "day": 2, "sales": 85 }, { "day": 3, "sales": 70 }, { "day": 4, "sales": 30 }, { "day": 5, "sales": 85 }, { "day": 6, "sales": 60 }, { "day": 7, "sales": 85 }, { "day": 8, "sales": 35 }, { "day": 9, "sales": 70 }, { "day": 10, "sales": 15 }]; var w = 460, h = 460; var margin = { top: 20, bottom: 10, left: 10, right: 10 }; var width = w - margin.left - margin.right; var height = h - margin.top - margin.bottom; var circleConstraint = d3.min([height, width]); var radius = d3.scale.linear() .domain([0, 100]) .range([0, (circleConstraint / 2)]); var centerXPos = width / 2 + margin.left; var centerYPos = height / 2 + margin.top; var svg = d3.select("body").append("svg") .attr("width", w) .attr("height", h) .append("g") .attr("transform", "translate(" + centerXPos + ", " + centerYPos + ")"); //Adds circular gridLines and labels var gridLines = [0, 20, 40, 60, 80, 100]; var circleAxes = svg.selectAll(".circularGrid") .data(gridLines) .enter().append("g") .attr("class", "circularGrid"); circleAxes.append("circle") .attr("r", function(d) { return radius(d); }) .style("stroke", "#CCC") .style("fill", "none"); circleAxes.append("text") .attr("text-anchor", "middle") .attr("dy", function(d) { return radius(-d - 1); }) .text(String) .style("font-size", "10pt") .style("font-family", "sans-serif"); //Append path for salesLine var sales = []; dataset.forEach(function(d) { sales.push(d.sales); }); svg.selectAll(".salesLine") .data([sales]) .enter().append("path") .attr("class", "salesLine") .style("fill", "none") .style("stroke", "#000") .attr("d", d3.svg.line.radial() .radius(function(d) { return radius(d); }) .angle(function(d, i) { return (i / dataset.length) * 2 * …
accepted answer: http://stackoverflow.com/a/29337869
type: AnsweredQuestion

http://stackoverflow.com/q/29341791
type: Question
tagged with: javascript
answer count: 6
tagged with: jquery
score: 0
has answer: http://stackoverflow.com/a/29341844
has answer: http://stackoverflow.com/a/29341933
has title: click to increase number
has answer: http://stackoverflow.com/a/29342079
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29341857
has body: How to increasing 100 each time when I clicked ? Any mistake I have make ? Please tell me thanks $(".label").click(function () { var number = 100; number++; $(".shownumber").text(number); }); .label{ width:auto; } .label:hover{ background:#ccc; } click me 100
has answer: http://stackoverflow.com/a/29341864
has comment: http://stackoverflow.com/comment/46870598
has answer: http://stackoverflow.com/a/29342015

http://stackoverflow.com/comment/46904816
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29336462
has text: If you're targeting modern browser only, try `HTML Templates` https://developer.mozilla.org/en-US/docs/Web/HTML/Element/template
score: 0

http://stackoverflow.com/q/29317260
has title: invoke a javascript function through php
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29318192
has answer: http://stackoverflow.com/a/29317307
tagged with: php
duplicate of: http://stackoverflow.com/q/1045845
has body: I want to invoke a javascript function from php, but php script is included before the javascript.
has answer: http://stackoverflow.com/a/29317780
has comment: http://stackoverflow.com/comment/46826499
linked to: http://stackoverflow.com/q/1045845
type: Question
tagged with: function
score: -2
has comment: http://stackoverflow.com/comment/46826446
tagged with: javascript
has answer: http://stackoverflow.com/a/29317334
downvote count: 3
upvote count: 1
answer count: 4
favorite count: 0

http://stackoverflow.com/q/29351023
tagged with: php
has answer: http://stackoverflow.com/a/29351070
upvote count: 0
type: Question
has body: How do I use a JavaScript function (via button "click event") to display a PHP variable in my web page? When I use a literal text string in my function, it works fine, but when I replace that text with a PHP echo command (<?php echo $test; ?>), I get nothing returned. What am I doing wrong, please? Here is an example of what I am trying to do: <?php $test = "success"; ?> Click the button to trigger a function. Export
tagged with: javascript
score: -1
has title: How do I use a JavaScript function to display a PHP variable in my webpage?
downvote count: 1
answer count: 1
duplicate of: http://stackoverflow.com/q/23740548
favorite count: 0
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/23740548

http://stackoverflow.com/q/29250667
tagged with: javascript
tagged with: jquery
has title: detecting scroll direction inside element with overflow:hidden
upvote count: 3
tagged with: http://stackoverflow.com/tag/html
tagged with: css
favorite count: 0
answer count: 0
type: UnansweredQuestion
has body: I have following css body{ height:100%; width:100%; overflow:hidden; } I am still able to detect scoll event using jquery. $('body').on("mousewheel", function() { alert($(this).scrollTop()); }); This gives 0 every time because of overflow:hidden what i want is to detect the direction of scroll (up or down). I cant use var previousScroll = 0; $(window).scroll(function(){ var currentScroll = $(this).scrollTop(); if (currentScroll &gt; previousScroll){ alert('down'); } else { alert('up'); } previousScroll = currentScroll; }); because scrollTop is always 0. Is there a way?
has comment: http://stackoverflow.com/comment/46710163
score: 3
downvote count: 0
type: Question
has comment: http://stackoverflow.com/comment/46706217
linked to: http://stackoverflow.com/q/8189840

http://stackoverflow.com/comment/46784169
has text: in `processResult`, data is a JSON object so I need to get id and text from that and create a new object. am i right?..It will be really helpful if you can show me some working example or write a small fiddle for me. Thanks
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29293733

http://stackoverflow.com/comment/46865323
comment on: http://stackoverflow.com/q/29338823
has text: can you share the html as well
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46895661
comment on: http://stackoverflow.com/q/29355325
score: 0
type: QuestionComment
type: Comment
has text: `document.getElementById('date')` will return a DOM Element. You need to get its content first using `.value`

http://stackoverflow.com/q/29236117
tagged with: javascript
upvote count: 2
has comment: http://stackoverflow.com/comment/46680753
answer count: 2
has comment: http://stackoverflow.com/comment/46705928
has answer: http://stackoverflow.com/a/29354705
has answer: http://stackoverflow.com/a/29257102
accepted answer: http://stackoverflow.com/a/29257102
has title: Basic math 101 scatter plot with Plottable.js
has body: How does one make a basic scatter plot like the one below using Plottable.js? Is there something wrong with my JSON? How to reveal the minus scales? Would you have done anything else differently? Style doesn't matter, the default Plottable.js one is fine. window.onload = function() { var coordinates = [ { x:"-5", y:"3" }, { x:"2", y:"-1,5" }, { x:"5", y:"2,5" } ]; var xScale = new Plottable.Scale.Linear(); var yScale = new Plottable.Scale.Linear(); var colorScale = new Plottable.Scale.Color("10"); var xAxis = new Plottable.Axis.Numeric(xScale, "bottom"); var yAxis = new Plottable.Axis.Numeric(yScale, "left"); var plot = new Plottable.Plot.Scatter(xScale, yScale) .addDataset(coordinates) .project("x", "", xScale) .project("y", "", yScale) .project("fill", "", colorScale); var chart = new Plottable.Component.Table([ [yAxis, plot], [null, xAxis] ]); chart.renderTo("#my_chart"); } Test
has comment: http://stackoverflow.com/comment/46894655
favorite count: 0
tagged with: plottable
has comment: http://stackoverflow.com/comment/46680696
has comment: http://stackoverflow.com/comment/46680461
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46682625
downvote count: 0
possible better answer: http://stackoverflow.com/a/29354705
tagged with: d3.js
type: Question

http://stackoverflow.com/comment/46774977
comment on: http://stackoverflow.com/a/29288653
has text: you can't press Shift or F2 with this code...
type: Comment
score: 1
type: AnswerComment

http://stackoverflow.com/q/29349689
has answer: http://stackoverflow.com/a/29350001
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/29349982
has body: I am trying to change the background (and other styles) of a div if it has a specific child. I am using .length to check if the specific child exists but even if it doesn't the div is taking the styles from the jquery if statement. My HTML: This is a header This is a button And my jQuery: var fullText = $('.full-text-panel'); var bodyButton = $('.body-button'); if ( $(".full-text-panel .body-button").length > 0 ) { fullText.css("background", "red"); } else { fullText.css("background", "blue"); } I thought this would work, but both fullText panels are taking the background red style. What am I doing wrong?
possible better answer: http://stackoverflow.com/a/29349982
type: AnsweredQuestion
has title: Change background color if div has specific Child
has comment: http://stackoverflow.com/comment/46885296
accepted answer: http://stackoverflow.com/a/29350001
tagged with: if-statement
has comment: http://stackoverflow.com/comment/46885366
type: Question
has comment: http://stackoverflow.com/comment/46885249
answer count: 2
tagged with: javascript
tagged with: jquery
score: 0

http://stackoverflow.com/q/29285674
type: UnansweredQuestion
type: Question
has answer: http://stackoverflow.com/a/29285746
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has title: on click over a link it should go to its address sliding instead of directly
has body: In html code, when we click over a link it goes to its associated address.but when the address is on the same page we mention .now,it goes there but i want it to slide to that address rather directly jumping on that address.hope you understood my question.

http://stackoverflow.com/comment/46663029
comment on: http://stackoverflow.com/q/29226410
score: 0
type: Comment
has text: AS @AtanuCSE said you should provide the onSucc and onFail, as the problem is there, it seems that for some reason they don't look like a function.
type: QuestionComment

http://stackoverflow.com/comment/46682057
score: 0
type: Comment
type: QuestionComment
has text: Is there any other way to manually open playlist dropdown panel?
comment on: http://stackoverflow.com/q/29237213

android
tags question: http://stackoverflow.com/q/29240160
tags question: http://stackoverflow.com/q/29316882
tags question: http://stackoverflow.com/q/29221345
tags question: http://stackoverflow.com/q/29284248
tags question: http://stackoverflow.com/q/29314267
tags question: http://stackoverflow.com/q/29302365
tags question: http://stackoverflow.com/q/29319582
tags question: http://stackoverflow.com/q/29256544
tags question: http://stackoverflow.com/q/29364207
tags question: http://stackoverflow.com/q/29327268
tags question: http://stackoverflow.com/q/29222998
tags question: http://stackoverflow.com/q/29242258
tags question: http://stackoverflow.com/q/29372928
tags question: http://stackoverflow.com/q/29306256
tags question: http://stackoverflow.com/q/29233785
tags question: http://stackoverflow.com/q/29227906
tags question: http://stackoverflow.com/q/29279287
tags question: http://stackoverflow.com/q/29254339
tags question: http://stackoverflow.com/q/29366620
tags question: http://stackoverflow.com/q/29314868
tags question: http://stackoverflow.com/q/29273453
tags question: http://stackoverflow.com/q/29224221
tags question: http://stackoverflow.com/q/29226678
tags question: http://stackoverflow.com/q/29260971
tags question: http://stackoverflow.com/q/29334279
tags question: http://stackoverflow.com/q/29357526
tags question: http://stackoverflow.com/q/29241834
tags question: http://stackoverflow.com/q/29364432
tags question: http://stackoverflow.com/q/29231704
tags question: http://stackoverflow.com/q/29239835
tags question: http://stackoverflow.com/q/29243304
tags question: http://stackoverflow.com/q/29366485
tags question: http://stackoverflow.com/q/29268986
tags question: http://stackoverflow.com/q/29332938
tags question: http://stackoverflow.com/q/29314720
tags question: http://stackoverflow.com/q/29332818
tags question: http://stackoverflow.com/q/29303044
tags question: http://stackoverflow.com/q/29222044
tags question: http://stackoverflow.com/q/29268624
tags question: http://stackoverflow.com/q/29231590
tags question: http://stackoverflow.com/q/29276766
tags question: http://stackoverflow.com/q/29340849
tag name: android
tags question: http://stackoverflow.com/q/29246534
tags question: http://stackoverflow.com/q/29304317
type: Tag
tags question: http://stackoverflow.com/q/29293348
tags question: http://stackoverflow.com/q/29339961
tags question: http://stackoverflow.com/q/29272414
tags question: http://stackoverflow.com/q/29284609

http://stackoverflow.com/a/29304372
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/46803188
answers question: http://stackoverflow.com/q/29304130
downvote count: 0
type: Answer
has body: You can also do it the following way, using join() and append() Demo var errors = ["First name is blank", "Last name is blank", "Company name is blank", "Email is blank"]; $("#error-list").empty().append(function(){ return "&lt;ul&gt;&lt;li&gt;" + errors.join("&lt;/li&gt;&lt;li&gt;") + "&lt;/li&gt;&lt;/ul&gt;"; });

http://stackoverflow.com/comment/46829908
type: Comment
type: QuestionComment
has text: @Mark that kind of defeats the purpose though, i wanted the time to autosize. but i fixed it already in a pretty weird way :D. i basically used a interval that clears itself when it fires and has a 200 milsecond delay and i fired the var H = this.el.find(".time").height(); this.el.find(".restart").css({width:H,height:H}); from within that.
comment on: http://stackoverflow.com/q/29301134
score: 0

http://stackoverflow.com/q/29256143
favorite count: 0
has answer: http://stackoverflow.com/a/29256232
answer count: 4
type: AnsweredQuestion
downvote count: 2
has answer: http://stackoverflow.com/a/29256408
tagged with: loops
upvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/29256408
has title: How to display element from an array with loop
tagged with: javascript
has body: I have an array that contains 7 objects which are questions as follows: var questions = [ {question: 'Which turkish club did former Leeds player Harry Kewell join in 2008, which caused an uproar amongst Leeds supporters?'}, {question: 'Who is the former Liverpool star who beat Ruud Van Nistelrooy\'s record of most prolific foreign goalscorer in their debut in the Premier League?'}, {question: 'Who scored Liverpool\'s winner in \'that\' first 4-3 game against Kevin Keegan\'s Newcastle United in April 1996?'}, {question: 'Which club was former Leeds Unted player Eric Cantona sold to in 1992?'}, {question: 'Which former Aston Villa and Ireland midfielder went on to become a regular TV pundit with ITV?'}, {question: 'How many European Cups had Liverpool won up to and including 2007-8?'}, {question: 'Name the Liverpool scorers for the \'miracle of Istanbul\'.'} ]; I would like to display each question using a loop when a button is clicked through the alert function. I need to just display the question that's already in the array. I don't want to ask the user for anything. So when the button is clicked I just want to pull out the first element and display that using alert(), then when the button is clicked again I want to display the second element until all of the elements have been displayed via clicking the button. As an example I have tried to use the onlick property of the button along with a for loop to try and get the question to display as follows here on JSFiddle: but the this displays all of the questions in the array with one click. Thanks
score: -1
has comment: http://stackoverflow.com/comment/46715061
has answer: http://stackoverflow.com/a/29256480
has comment: http://stackoverflow.com/comment/46715076
has answer: http://stackoverflow.com/a/29256391
possible better answer: http://stackoverflow.com/a/29256232

http://stackoverflow.com/q/29246467
has title: Dynamically creating hidden form fields for various models (MVC 4)
score: 1
upvote count: 1
type: Question
tagged with: c#
tagged with: asp.net-mvc
has comment: http://stackoverflow.com/comment/46698622
has comment: http://stackoverflow.com/comment/46699865
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46699243
has body: I'm trying to dynamically create hidden fields for a set of properties, but I'm getting a 500 server error when I submit the form. I confirmed the following: The properties I'm iterating over in the foreach statement are correct. property.Name is a valid property name for the type retrieved by NewItem.GetType() Here's what I have: View @model PaneViewModel using (Ajax.BeginForm("AddItem", "Action", new AjaxOptions { UpdateTargetId = "tool-wrapper", HttpMethod = "POST", })) { // Some standard input fields here (these are working properly). [...] // Here's what's broken: @foreach (var property in Model.NewItem.GetType().GetProperties().Where(<criteria here>)) { @Html.HiddenFor(m => m.NewItem.GetType().GetProperty(property.Name), column.GetValue(Model.NewItem, null)) } Add } ItemViewModel public class ItemViewModel { public int SomeField { get; set; } public int AnotherField { get; set; } } PaneViewModel public class PaneViewModel { public ItemViewModel NewItem { get; set; } } Controller [HttpPost] public ActionResult AddItem([Bind(Prefix = "NewItem")] ItemViewModel model) { // Stuff here. } It's worth noting that the following generates the hidden fields with the correct names and values in the generated HTML, but the values of the hidden field aren't posted to the controller action: @foreach (var property in Model.NewItem.GetType().GetProperties().Where(<criteria here>)) { @Html.Hidden(property.Name, column.GetValue(Model.NewItem, null)) } So it seems the problem is with the m => m.NewItem.GetType().GetProperty(property.Name) component
has answer: http://stackoverflow.com/a/29292634
has comment: http://stackoverflow.com/comment/46698567
downvote count: 0
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/46698912
has comment: http://stackoverflow.com/comment/46699618
accepted answer: http://stackoverflow.com/a/29292634
type: AnsweredQuestion

http://stackoverflow.com/comment/46893863
type: QuestionComment
type: Comment
score: 1
has text: "Equal itself + itself" translates pretty directly to code, not sure what the issue was here. Voting to close as typo / no-repro.
comment on: http://stackoverflow.com/q/29354194

http://stackoverflow.com/q/29239186
has body: I am trying to set up functionality to display bio's for authors on a website. I would like to accomplish several things: Have the images appear with a border upon hover, and stay with the border upon click. (As of now, the border stays, but it's around the table cell, not around the image. I do not want to set a new class for image, since I am using this in wordpress and don't want to mess with the template and the classes already set for each image. I've attempted using an id, but only 'td' as the selector has worked for me). Have "hover-content" appear upon hover, but upon click, that bio will be the default bio that appears until another image is clicked. (But can still change when hovering over other images) This is what I have accomplished thus far: https://jsfiddle.net/nsn3bpep/2/ var divContent = $("#content").html(); $("td").click(function () { $("#content").html($(this).find("#hover-content").html()); $("td").removeClass('myClickState'); $(this).addClass('myClickState'); $(this).off('mouseleave'); }); $("td").hover(function () { $("#content").html($(this).find("#hover-content").html()); }, function () { $("#content").html(divContent); }); The biggest issue I am having is with click and setting a default hover-content to be displayed when one image is selected. It seems to maintain whatever was most previously clicked and then hovered, not most previously clicked disregarding any hover motion.
tagged with: http://stackoverflow.com/tag/html
tagged with: css
tagged with: hover
has answer: http://stackoverflow.com/a/29239631
type: AnsweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/46685452
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/29239631
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/29239848
accepted answer: http://stackoverflow.com/a/29239848
has title: On click, change content permanently; on hover, display new content briefly

http://stackoverflow.com/comment/46764969
score: 0
has text: ...and because I want to use outside functions to do the appending I don't want to append first.
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29281298

http://stackoverflow.com/a/29311479
answers question: http://stackoverflow.com/q/29311298
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46816774
type: Answer
has body: You need to select all td elements and use this collection instead of siblings. Something like this: var $td = $("td"); $td.click(function () { $("#content").html($(this).find(".hover-content").html()); $('img[class*="wp-image-"]').removeClass('myClickState'); $(this).find('img[class*="wp-image-"]').addClass('myClickState'); divContent = $("#content").html(); $td.not(this).addClass('fadeClick').removeClass('noFade'); $(this).removeClass('fadeClick'); }); $td.hover(function () { $("#content").html($(this).find(".hover-content").html()); $(this).addClass('noFade'); $td.not(this).removeClass('noFade').addClass('fade'); }, function () { $("#content").html(divContent); $td.not(this).removeClass('fade'); $(this).removeClass('noFade'); }); Demo: https://jsfiddle.net/nsn3bpep/8/
score: 2
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29311298
upvote count: 2

http://stackoverflow.com/a/29266446
has body: Your main function is missing parenthesis. var main = function() { //right not var main = function { //wrong
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29266330

nested-routes
tags question: http://stackoverflow.com/q/29256559
type: Tag
tag name: nested-routes

http://stackoverflow.com/a/29342287
upvote count: 2
score: 2
has body: I'm not sure what you mean exacly, but can you share the are_you_sure.js file?¿ Also I have change your code maybe it helps and it´s a better way to do it. because it´s not a good practice use onchange(), so remove onchange from your html and do this, link: http://jsfiddle.net/hg5nz1w6/1/ js: $(document).ready(function(){ $('#cost_type').on('change', function(){ var cst_type = $(this).val(); if(cst_type==0 || cst_type==1) { $("#camp_cpc").val("'.(!empty( $html['camp_cpc'] )?(double)$html['camp_cpc']:'').'"); $("#camp_cpc").show(); } else { $("#camp_cpc").hide(); $("#camp_cpc").val("0"); } }); }); html: CPC CPA Do Not Track Below you can see some examples to remove the selected: document.getElementById('myselect').selectedIndex = -1; you can deselect all the options: $("select").val([]); or $("select option").prop("selected", false); Hope it´s helps!
downvote count: 0
answers question: http://stackoverflow.com/q/29342054
type: Answer

http://stackoverflow.com/comment/46787259
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29295733
has text: @RoryMcCrossan I think op wants to append the element only once with the target element. The code that he uses would allow duplicating the elements since `$('.tbody')` would contain the previously appended one also. Am i right?
score: 0

http://stackoverflow.com/q/29269471
tagged with: dom
type: Question
has title: javascript window.open() and search the DOM in new window
tagged with: javascript
score: -1
downvote count: 2
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
type: AnsweredQuestion
has body: I need to open a window with JavaScript then search this window for a specific string. I cannot use an element ID or Class. So I need to search the entire DOM in the window. is this possible and if so how is it done? Thank you!
has answer: http://stackoverflow.com/a/29269639
accepted answer: http://stackoverflow.com/a/29269639

http://stackoverflow.com/q/29295133
tagged with: jquery
accepted answer: http://stackoverflow.com/a/29295222
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
upvote count: 3
type: Question
has answer: http://stackoverflow.com/a/29295222
type: AnsweredQuestion
score: 3
possible better answer: http://stackoverflow.com/a/29295163
has answer: http://stackoverflow.com/a/29295163
has title: jQuery panel slider opens with button click but won't close
tagged with: javascript
answer count: 2
has body: I have a button on my page which opens a right panel by using jquery and modernizr frameworks. Button is placed on the rightmost place of screen. When it is clicked it slides to the left with the panel which it opens. The problem is, it won't slide back to where it was when it is clicked again. HTML: Views Close Views Panel elements Javascript: jQuery(document).ready(function($){ //open the lateral panel $('.cd-btn').on('click', function(event){ event.preventDefault(); $('.cd-panel').addClass('is-visible'); }); //clode the lateral panel $('.cd-panel').on('click', function(event){ if( $(event.target).is('.cd-panel') || $(event.target).is('.cd-panel-close') ) { $('.cd-panel').removeClass('is-visible'); event.preventDefault(); } }); }); JsFiddle demo (You can see the CSS on JSFiddle)
has comment: http://stackoverflow.com/comment/46786173
downvote count: 0

http://stackoverflow.com/q/29292551
favorite count: 0
score: 2
tagged with: http://stackoverflow.com/tag/svg
upvote count: 2
accepted answer: http://stackoverflow.com/a/29292991
has title: Width of SVG:g using getBBox() returns wrong number
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46782142
has body: Hi I tried getting the width of a &lt;g&gt; element and it always says 509.5 pixel no matter what. At first I though it was the REAL size, as in not scaled size. But I opened the SVG in Illustrator and the width was 700+ pixel. I made a JSFiddle here http://jsfiddle.net/hrsetyono/v51phqww/ Any solution? Thanks EDIT I tried it on Chrome, but it has the same behavior in Firefox
has comment: http://stackoverflow.com/comment/46782227
type: Question
has comment: http://stackoverflow.com/comment/46782059
has comment: http://stackoverflow.com/comment/46782350
answer count: 1
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/29292991
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/46712189
score: 0
comment on: http://stackoverflow.com/q/29253095
has text: Why would you need to create others (what other 'special' conditions do you have)? In any case you current implementation only allows you to compare against one property named `RecDate` which is far more inflexible than my suggestion which allows you to compare against any other `DateTime` property. In fact is so inflexible, you may as well just check the value in the controller when you post back.
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29273769
downvote count: 1
upvote count: 5
accepted answer of: http://stackoverflow.com/q/29273550
score: 4
has body: Don't try to match it with a complex regex. But, instead split using a less complex one. For splitting, we can use String.split and pass the regex /[{}/ into it and then we use Array.map to trim the strings so as to get only the content and removing the white space. But prior to doing that, we will just remove the unwanted empty strings using Array.filter var arr = str.split(/[{}]/).filter(String).map(function(str){ return str.trim(); }); It also has the advantage of working on all css-rules and not just classes, provided the CSS is a valid one.
answers question: http://stackoverflow.com/q/29273550
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/46753276

http://stackoverflow.com/comment/46836477
score: 0
comment on: http://stackoverflow.com/q/29321152
has text: You also would not need to bind the `blur` event to it, when the `onfocusout` functionality is built into it and activated by default.
type: QuestionComment
type: Comment

http://stackoverflow.com/a/29366299
downvote count: 0
has body: Helo, I have made an example for you: http://jsfiddle.net/o82tfxrb/1/ js: $(document).ready(function(){ $('#ck').on('change', function(){ if ($(this).is(':checked')){ $('#buttonShareMap').removeClass('red') .addClass('blue'); }else{ $('#buttonShareMap').removeClass('blue') .addClass('red'); } }); }); html: &lt;input type="checkbox" id="ck" /&gt; &lt;input type="button" class="red" value="Share" id="buttonShareMap"/&gt; css: .red{ background-color:red; } .blue{ background-color:blue; color: white; } What I am doing is check everytime the user change the checkbox and then I add a class. I hope it's helps!
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/29365935

http://stackoverflow.com/comment/46948228
type: Comment
has text: There isn't any automatic way for **each element on the page**! You need to do some works yourself!
type: AnswerComment
comment on: http://stackoverflow.com/a/29363867
score: 0

http://stackoverflow.com/comment/46650566
type: QuestionComment
type: Comment
has text: tricky.. have you tried displaying {{main.conditions.icon}} somewhere else (within controller scope and what not), see if it shows the path?
comment on: http://stackoverflow.com/q/29220122
score: 0

http://stackoverflow.com/q/29240311
type: Question
possible better answer: http://stackoverflow.com/a/29240708
has answer: http://stackoverflow.com/a/29240708
score: 0
answer count: 2
has body: I have a JavaScript class with two methods like this. var MyObject = function () {}; MyObject.prototype = { open: function () { var self = this; console.log(self); $('#a').click('', self.other); }, other: function () { console.log(this); } }; var myobject = new MyObject; myobject.open(); In the console.log in the other function, this is the HTML node that the event listens to and not the MyObject object as in the open function. How can I retrieve the MyObject object from the function other when used as a callback?
has answer: http://stackoverflow.com/a/29240700
type: AnsweredQuestion
has title: Retrieve origina context from callback
tagged with: this
tagged with: javascript
tagged with: jquery
tagged with: callback
accepted answer: http://stackoverflow.com/a/29240700

http://stackoverflow.com/q/29244878
type: Question
has comment: http://stackoverflow.com/comment/46696685
tagged with: function
tagged with: arrays
has comment: http://stackoverflow.com/comment/46696434
tagged with: javascript
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/46697053
has title: Store users choice data in my array temporarily
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46696720
has body: This is my form and below is a function. I need 3 functions, 1 to store data, 1 to save the data and 1 to show all stored data. How can I do all of these functions so they all correspond with each other. NOTE: The user will be entering the data so it's the users choice data which would temporarily be saved. The user should be able to click on the buttons to function the function but how can I do the three functions properly. Input a Song Name, Artist, Collaborations, Duration or Album Save function: var catalogue[]; function Save = Music.Song_Name.Artist.Collaborations.Duration.Album.Save{ var SongName = document.getElementById('Song_Name').value; var Artist = document.getElementById('Artist').value; var Collaborations = document.getElementById('Collaborations').value; var Duration = document.getElementById('Duration').value; var Album = document.getElementById('Album').value; document.write("You have chosen "+ Song_Name + Artist + Collaborations + Duration + Album) }
has answer: http://stackoverflow.com/a/29245160
has comment: http://stackoverflow.com/comment/46696752
tagged with: forms

http://stackoverflow.com/a/29290617
has comment: http://stackoverflow.com/comment/46778281
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46778559
type: Answer
accepted answer of: http://stackoverflow.com/q/29290567
has comment: http://stackoverflow.com/comment/46782692
upvote count: 1
has comment: http://stackoverflow.com/comment/46778503
answers question: http://stackoverflow.com/q/29290567
score: 1
has comment: http://stackoverflow.com/comment/46778419
has body: You're returning from the forEach callback which is not possible. You need to iterate manually over the array or write the result into a variable in the scope of your checkAvailableTranslation method(but still iterate over all items in translations). Manual "forEach" module.checkAvailableTranslation = function(language, translations) { for ( var i = 0, translation = translations[i][language]; i &lt; translations.length; i++, translation = translations[i][language] ) { if (translation) return translation; } } Or using Array.prototype.some function (language, translations) { var res; translations.some(function (translation) { return !!(res = translation[language]); }); return res; } EDIT: Ninja approach: function n(l,t,i){return t[i|0][l]||g(l,t,(i|0)+1)}

http://stackoverflow.com/q/29266347
accepted answer: http://stackoverflow.com/a/29266375
has comment: http://stackoverflow.com/comment/46735135
has comment: http://stackoverflow.com/comment/46734413
type: AnsweredQuestion
downvote count: 9
has answer: http://stackoverflow.com/a/29266375
has comment: http://stackoverflow.com/comment/46735003
score: -8
has comment: http://stackoverflow.com/comment/46734912
type: Question
tagged with: java
has title: Which keywords are reserved in JavaScript but not in Java?
has comment: http://stackoverflow.com/comment/46734720
has comment: http://stackoverflow.com/comment/46734525
has comment: http://stackoverflow.com/comment/46734465
has comment: http://stackoverflow.com/comment/46734724
has body: Which keywords are reserved in JavaScript but not in Java? One example is debugger, but there are more. By reserved I mean reserved words as well as future reserved words (in both strict and non-strict mode) and special tokens like null, true and false. I'm interested in ECMAScript 5.1 as well as current 6 vs. Java 5-8 (not sure if there were new keywords since Java 5). Update For those who's interested in reasons to know this. I know many Java developers switching from Java to JavaScript (my story). Knowing delta in keywords is helpful. Language history. My very specific reason for asking: I'm building code Java/JavaScript code generation tools (quasi cross-langiuage). Which reserved keywords should I add to Java code generator so that it produces JavaScript-compatible identifiers in cross-language case?
has comment: http://stackoverflow.com/comment/46734979
has comment: http://stackoverflow.com/comment/46735613
tagged with: grammar
has comment: http://stackoverflow.com/comment/46734454
upvote count: 1
has comment: http://stackoverflow.com/comment/46734688
answer count: 1
tagged with: javascript
favorite count: 0

http://stackoverflow.com/comment/46880158
comment on: http://stackoverflow.com/q/29344977
score: 0
type: Comment
type: QuestionComment
has text: Do you have multiple initialize functions? Could you please provide a [Minimal, Complete, Tested and Readable example](http://stackoverflow.com/help/mcve) that demonstrates the issue? I get a javascript error with the posted code `Uncaught ReferenceError: clearSelection is not defined`

http://stackoverflow.com/comment/130693944
comment on: http://stackoverflow.com/a/73973886
type: Comment
has text: Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer).
score: 0
type: AnswerComment

http://stackoverflow.com/a/29262370
answers question: http://stackoverflow.com/q/29261507
downvote count: 0
type: Answer
upvote count: 3
score: 3
has body: ngRepeat create a scope, so, object is passed by reference and number by value. Your code is problematic, if you successfully update the value, it will update all the numbers in ng-repeat. You can do this: html {{value.val}} Save javascript angular.module('myApp', []) .controller('MyController', function($scope){ $scope.value = {val:false}; $scope.list = [0,1,2,3,4]; }); http://jsfiddle.net/oq6zdeLd/ I'm sorry about my english...

http://stackoverflow.com/comment/46716352
has text: is this actually a comma separated string?
score: 0
comment on: http://stackoverflow.com/q/29256797
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29254969
has comment: http://stackoverflow.com/comment/46717181
has comment: http://stackoverflow.com/comment/46718069
has comment: http://stackoverflow.com/comment/46716975
has comment: http://stackoverflow.com/comment/46714509
upvote count: 1
has comment: http://stackoverflow.com/comment/46713676
has comment: http://stackoverflow.com/comment/46714236
has comment: http://stackoverflow.com/comment/46717058
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46714722
downvote count: 0
has comment: http://stackoverflow.com/comment/46714782
score: 1
has comment: http://stackoverflow.com/comment/46714554
has body: You are relying on a global file object. This is not really dependable because you do not know what happens to the variable. its better to envelop the whole into a function that you call whilst passing the parameters needed. Also you are passing a new FormData(formData[0]) which also gave erros in my tests. This is what I came up with that works function runme(files) { formData = new FormData(); $.each(files, function(key, value) { formData.append(key, value); }); formData.append('userpic', file, 'upload.jpg'); $.ajax({ url: "/users/img_upload", type: "POST", data: formData, contentType: false, cache: false, processData:false, success: function(data) { var reader = new FileReader(); reader.readAsDataURL(file); reader.onload = imageIsLoaded; }, error:function(data){ var reader = new FileReader(); reader.readAsDataURL(file); reader.onload = imageIsLoaded; } }); } function imageIsLoaded(e) { $('#img').attr('src', e.target.result); } &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt; &lt;input type="file" onchange="runme(this.files);"&gt; &lt;img src="#" id="img"&gt;
accepted answer of: http://stackoverflow.com/q/29254894
has comment: http://stackoverflow.com/comment/46717430
type: Answer
answers question: http://stackoverflow.com/q/29254894
has comment: http://stackoverflow.com/comment/46714445
has comment: http://stackoverflow.com/comment/46717247

http://stackoverflow.com/comment/47219058
has text: Does anyone know if the JSON.parse method in JSON 3 would solve the problem of the escaped Unicode entities? Or if there is a way of avoiding the problem with the eval() method I'm using?
score: 1
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29339541

http://stackoverflow.com/q/29356941
tagged with: backbone.js
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46898777
has body: I am trying to get id from the collection to get passed to the view. I am able to get the model's information, just can't get the view to grab the data. In my template each line has the model id: &lt;td&gt;&lt;a href="#/process/&lt;%= model.id %&gt;"&gt;&lt;%= model.name %&gt;&lt;/a&gt;&lt;/td&gt; My router looks like this: var Router = Backbone.Router.extend({ routes: { '': 'welcome', 'process/:id': 'process' } }); var router = new Router(); router.on('route:process', function(id) { console.log('home page loaded'); console.log(id); var processing = new Processes({id:id}); processing.fetch({ success: function(model,response){ console.log(model.where({'id':id})) } }) processView.render({id: id}); }); The right id is coming through but I can't get the view to retrieve the id. This is my first project using Backbone.js
score: 0
type: Question
tagged with: backbone.js-collections
tagged with: backbone-routing
tagged with: backbone-views
has title: Passing id from model to view Backbone.js
has answer: http://stackoverflow.com/a/29360821
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/46795637
type: Comment
has text: you mean split at every other comma?
score: 0
comment on: http://stackoverflow.com/q/29300270
type: QuestionComment

http://stackoverflow.com/q/29276195
score: 1
favorite count: 0
type: UnansweredQuestion
tagged with: php
answer count: 4
has comment: http://stackoverflow.com/comment/46751697
tagged with: mysql
upvote count: 1
has title: Retrieving each variable posted by AJAX
type: Question
has comment: http://stackoverflow.com/comment/46751840
has answer: http://stackoverflow.com/a/29276389
has answer: http://stackoverflow.com/a/29276490
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29276481
has answer: http://stackoverflow.com/a/29276442
tagged with: ajax
has body: I am storing my checkbox selections in an array then splitting each array and posting them using AJAX so my PHP function can use the posted id/ids to query my MySQL database. First part of my JavaScript $('#tbl_list').click(function (event) { var tbls = new Array(); $("input:checkbox[name='tbl[]']:checked").each(function () { tbls.push($(this).val()); }); var tbl = tbls.join('|'); alert(tbl); This first part works as intended, where every time I click a checkbox the value is alerted. AJAX post $.ajax({ type: "POST", url: "index.php", data: "tbl=" + tbl }); }); Finally my PHP function describeTables() { if (isset ( $_POST ['tbl'] )) { $tbl = $_POST ['tbl']; echo $tbl; }} I don't get any vlaues of tbl even if I choose just one option. Why is this???? EDIT My Checkbox function showTables() { if (isset ( $_GET ['db'] )) { $db = $_GET ['db']; $link = mysqli_connect ( 'localhost', 'root', '', $db ); $qry = "SHOW tables"; $tbl_list = mysqli_query ( $link, $qry ); echo '&lt;ul&gt;'; while ( $row = mysqli_fetch_array ( $tbl_list ) ) { echo '&lt;input type="checkbox" name="tbl[]" class="tbl_list" value="' . $row [0] . '" class="tablebox" /&gt;'; echo $row [0]; echo '&lt;br&gt;'; } } } showTables (); SECOND EDIT After suggestions I have amended my code but now have a new problem where the page doesn't load #dbdisplay Below is my full JS code if (!location.search.match(/db=[^&amp;#]+/i)) { $("#dbdisplay").show(); } else { $("#qryDisplay").show(); } $(document).on("change", ".checkbox", function () { var db = $(this).val(); window.sessionStorage.setItem("db", db); window.location.assign("index.php?db=" + db); $("#dbdisplay").hide(); }); $('#tbl_list').click(function (event) { var tbls = new Array(); $("input:checkbox[name='tbl[]']:checked").each(function () { tbls.push($(this).val()); }); var tbl = tbls.join('|'); //alert(tbl); $.ajax({ type: "POST", url: "index.php", data: {'tbl': tbl } }); }); The old function /* $(document).on("change", ".tablebox", function () { var tbls = n…
downvote count: 0

http://stackoverflow.com/q/29346713
has comment: http://stackoverflow.com/comment/46914572
upvote count: 1
accepted answer: http://stackoverflow.com/a/29347066
answer count: 1
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/29347066
tagged with: http://stackoverflow.com/tag/html
tagged with: php
has comment: http://stackoverflow.com/comment/46880413
type: AnsweredQuestion
downvote count: 0
has comment: http://stackoverflow.com/comment/46879234
has body: I'm working on a site that has some strict specifications. I'm interested to know if what I'm trying to achieve is possible and if yes, how. I have a page displaying a list of products and a button next to each one called Reserve. I get the information from a MySQL database. The code is something like this (it's not the actual code): while($obj = $results->fetch_object()) { echo ' '; echo ' '; echo ' '; echo $obj->description.' Reserve '; echo ' bar_code.'"/>'; echo ' '; echo ' '; } Notice the iframe there. I use this because when the button Reserve is clicked, the page is not supposed to be refreshed. The reserve.php page contains the following: if (isset($_POST["barcode"])) { $barcode = filter_var($_POST["barcode"], FILTER_SANITIZE_STRING); $results = $mysqli->query("UPDATE devices SET status='reserved' WHERE bar_code=".$barcode); } Now, the actual question that I have is: Is it possible to click that Reserve button, not refresh the page, but still change the button to the disabled state? I figured that the disabling action should be done from the reserve.php hence the question title. If not, please advise me. What I'm trying to achieve is, when a user scrolls down the product page and clicks Reserve, I want the button to become disabled. I wouldn't mind the refresh per se, but what I mind is that when the refresh happens, the user is sent back to the beginning of the page and has to scroll down again if he wants to reserve another product.
score: 1
has comment: http://stackoverflow.com/comment/46915288
has title: How can I change the state of a button from another page?
has comment: http://stackoverflow.com/comment/46879215
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/46879326

http://stackoverflow.com/a/29291332
has comment: http://stackoverflow.com/comment/63895174
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/46814502
has comment: http://stackoverflow.com/comment/46837602
downvote count: 1
has body: You could download it first via some means (shown below is a %download magic I use) and then use the iframe.
score: 0
answers question: http://stackoverflow.com/q/29287219

http://stackoverflow.com/comment/46711495
type: QuestionComment
comment on: http://stackoverflow.com/q/29253925
has text: @Mathletics Perfect, thanks. If you add it as an answer I will mark it as so.
score: 0
type: Comment

http://stackoverflow.com/comment/46799488
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29302464
has text: you use getElementById, when your div has the class "event-details", not id. Change the attribute class to id

http://stackoverflow.com/comment/46826446
type: QuestionComment
comment on: http://stackoverflow.com/q/29317260
has text: What do you mean by `to invoke a javascript function from php`?
score: 0
type: Comment

http://stackoverflow.com/a/29368858
type: Answer
answers question: http://stackoverflow.com/q/29368524
score: 0
has body: This question is in the margins of Code Review and SO. The only difference between the two handlers appears to be the .post URL, and that appears to be derivable from the ID of the click target. So do a little string handling to build the URL and attach your modified function as click handler to both elements : $("#agencies, #builders").on("click", ".applyClick", function(event) { ... $.post(this.id + '.php', strData, function(data) { ... }

http://stackoverflow.com/q/29301593
type: UnansweredQuestion
tagged with: scroll
linked to: http://stackoverflow.com/q/5284814
type: Question
has title: Auto scroll to new div
has body: When i click on a radio button, a new div, "resultat3" shown. I want an automatic scroll down to the new div, when it is loaded. function stateChanged7() { if (xmlhttp.readyState==4) { document.getElementById("resultat3").innerHTML=xmlhttp.responseText; document.getElementById("show").innerHTML = showDiv4(1); } } Does anyone know how I can solve it?
tagged with: javascript
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/29302308
has answer: http://stackoverflow.com/a/29302136
has answer: http://stackoverflow.com/a/29301933

http://stackoverflow.com/comment/46753117
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29260246
has text: so Idan can we integrate phonertc with worklight using cordova.exec or existe other solution can you help me to resolve this problem

http://stackoverflow.com/q/29324219
has answer: http://stackoverflow.com/a/29325170
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has title: How can I go to anchor and open a Bootstrap accordion at the same time?
favorite count: 0
tagged with: twitter-bootstrap
answer count: 5
has comment: http://stackoverflow.com/comment/46839271
has answer: http://stackoverflow.com/a/59652618
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29325170
score: 10
has answer: http://stackoverflow.com/a/49410719
possible better answer: http://stackoverflow.com/a/44181874
has answer: http://stackoverflow.com/a/30303711
upvote count: 10
has answer: http://stackoverflow.com/a/44181874
type: Question
downvote count: 0
tagged with: javascript
tagged with: jquery
has body: I'm using a Bootstrap accordion and it works like a charm, no problem at all. However, I'd like to have a link to one of the tabs in the accordion. The idea is that once I click on the link, I'm taken to that part of teh page (the accordion is really down in the page) and open the tab. So I used the following: &lt;a href="#prizes" data-toggle="collapse" data-parent="#accordion"&gt;&lt;i class="mdi-action-info"&gt;&lt;/i&gt;&lt;/a&gt; which should work. And it does in part: it opens the accordion tab just right, however, the page doesn't scroll to the anchor as it should. It just stays in the same position, but opening the accordion. Any idea how to fix it? I have found answers related to jQuery UI accordion but nothing about BS accordion (and the jQuery UI answers didn't work either), really don't know why isn't this working

http://stackoverflow.com/comment/46869072
has text: Yes as is copy and paste . I have a right click menu with an option to add note so I would like to be able to select and right click to add the note
comment on: http://stackoverflow.com/q/29340778
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29251547
score: 0
type: Answer
has body: Since you are using form.submit(); It makes the usual form submit like you were hitting the 'Send' button. What you want to do here is send the form serialized through Ajax, var formData = $(form).serialize(); $.post('[HERE YOUR SUBMIT TARGET URL]', formData, function (success){ ///Redirect to empty form, or clear actual form });
answers question: http://stackoverflow.com/q/29251398

http://stackoverflow.com/comment/46666929
type: QuestionComment
comment on: http://stackoverflow.com/q/29229338
has text: what language you use: _javascrip_ (from tags) or `java`(you use _importPackage(java.io);_)?
score: 0
type: Comment

http://stackoverflow.com/a/29317147
upvote count: 2
has comment: http://stackoverflow.com/comment/46827221
has body: You are echoing the html out instead of storing it in a string. To fix this, the fastest way is to redirect the echo outputs to a php variable: ob_start(); writeCartSummary(); $cartSummary = ob_get_clean(); ob_start(); writeCartTotal(); $cartTotal = ob_get_clean(); $value = array("response"=&gt;"OK","totals"=&gt;$cartTotal , "summaries"=&gt;$cartSummary ); echo json_encode($value); With ob_start and ob_get_clean you redirect the echo from the standard outputbuffer to a variable. And by that you can put the variable content into your json data. Further, with json-data as response, you need to use dataType: 'json' in your ajax call: $.ajax({ /* ... */ dataType: "json", /* ... */ });
has comment: http://stackoverflow.com/comment/46827746
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46826459
type: Answer
accepted answer of: http://stackoverflow.com/q/29317100
score: 2
answers question: http://stackoverflow.com/q/29317100

source-maps
type: Tag
tags question: http://stackoverflow.com/q/29356917
tag name: source-maps
tags question: http://stackoverflow.com/q/29342738
tags question: http://stackoverflow.com/q/29253858
tags question: http://stackoverflow.com/q/29263051

http://stackoverflow.com/q/29236347
favorite count: 0
score: 1
tagged with: angularjs
has title: Can one trigger ng-class after ng-click?
upvote count: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29237599
type: Question
accepted answer: http://stackoverflow.com/a/29237599
has body: I have the following element: {{ project.label }} The idea of the ng-class is this: if the photo belongs to the project, the function belongsPhotoToProject returns true, so the selected-project class is set. Now, on click, after the function removeFromProject(project, $index, currentPhoto) is triggered, belongsPhotoToProject does not evaluate to true anymore, so I expect it to remove the class, however, this doesn't happen. So my questions are: after the initial page load, on which page events does ng-click get triggered? If ng-click gets triggered only on page load, can I manually trigger it again on ng-click?
downvote count: 0
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/46778303
has text: Yes, but not at the same time.
score: 1
comment on: http://stackoverflow.com/q/29290624
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46712877
has text: check question again, I've added missing string
score: 0
comment on: http://stackoverflow.com/q/29254894
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46663158
has text: Have you include jQuery lib in your HTML ?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29228163
score: 0

http://stackoverflow.com/a/29321727
answers question: http://stackoverflow.com/q/29321661
type: Answer
score: 0
has body: changeBallDirection is not in the global namespace and therefore cannot be called within the onclick event. You should get something like ReferenceError: changeBallDirection is not defined in your console when you click the button. Move the function outside of the draw() portion of your script and everything should work fine.

http://stackoverflow.com/comment/46801022
comment on: http://stackoverflow.com/a/29302936
type: Comment
has text: I actually just figured that out myself. Worked perfect now! Thanks a lot!
score: 0
type: AnswerComment

http://stackoverflow.com/q/29318227
answer count: 1
has body: I'm trying to make a simple app using Cordova. Since the beginning I've been using the: c.addEventListener("mousedown", function (event) { mouseDown(); }, false); method. But the problem is that I can not specify coordinates (otherwise doesn't work at all) The touch executes only when I "release" my finger, rather than executing right away when screen is touched. I'm a huge amateur and I can't find any answers on how to properly handle touch events. In summary, I want to use Touch (like a mouse click) with coordinates, and use multitouch events, such as -> 2 fingers swipe outward = "zoom out", 2 fingers swipe inward = "zoom in" stuff. Any help is much appreciated :)
tagged with: javascript
tagged with: touch
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/29318373
favorite count: 0
tagged with: cordova
type: Question
has title: Phonegap/Cordova: How to add Javascript Multi-Touch Events?
upvote count: 1
accepted answer: http://stackoverflow.com/a/29318373

eclipse
tag name: eclipse
tags question: http://stackoverflow.com/q/29299567
type: Tag

http://stackoverflow.com/comment/46769873
type: Comment
score: 2
comment on: http://stackoverflow.com/q/29285948
type: QuestionComment
has text: I have updated your fiddle, check here http://jsfiddle.net/jwd1zb11/3/

http://stackoverflow.com/comment/46799370
comment on: http://stackoverflow.com/q/29302146
score: 0
has text: was made a cofig in host to detect the OS and redirect according to it, now need to view a desktop view in mobile
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29322279
has body: I am trying to write a simple jquery function that utilizes a javascript "fizzBuzz" function to get a number from the user and print the output. I am getting an "Uncaught type error" I'm not sure why this is happening. $(document).ready(function(){ $("#fb").click(function(){ var num=prompt('please enter a number'); var convertedNum = +num; fizzbuzz(convertedNum); }); }); function fizzbuzz(max) { for (var i=1; i <= max; i++) { if (i % 15 == 0) document.getElementById("fizz").innerHTMLlog(" FizzBuzz "); else if (i % 3 == 0) document.getElementById("fizz").innerHTMLlog(" FizzBuzz "); else if (i % 5 == 0) document.getElementById("fizz").innerHTMLlog(" FizzBuzz "); else document.getElementById("fizz").innerHTMLlog(" " + i + " "); }
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46835613
has comment: http://stackoverflow.com/comment/46835767
has answer: http://stackoverflow.com/a/29322490
has comment: http://stackoverflow.com/comment/46835595
type: Question
accepted answer: http://stackoverflow.com/a/29322490
has comment: http://stackoverflow.com/comment/46835697
score: 0
answer count: 1
has title: Trying to print data using .innerHTMLlog getting error Uncaught TypeError: undefined is not a function
tagged with: fizzbuzz
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46835709

http://stackoverflow.com/comment/46760235
has text: Can you post the code to where you make the server call to get the data? Also how is `highscores` populated?
score: 0
comment on: http://stackoverflow.com/q/29281161
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46812556
comment on: http://stackoverflow.com/q/29309230
type: Comment
type: QuestionComment
has text: Is woo_add_cart_fee a function that you created? If yes then could you possibly add additional argument that indicates if the checkbox is checked or not rather than checking for the POST array in the function itself ? It is possible that the scope is $_POST is lost by the time the control comes to the woo_add_cart_fee function.
score: 0

http://stackoverflow.com/comment/46852378
comment on: http://stackoverflow.com/q/29331249
score: 0
type: Comment
type: QuestionComment
has text: @good_evening pass it through a minifier after merging them all

http://stackoverflow.com/comment/46727613
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29243293
has text: @ProgramFOX I rolled your edit back since this update is actually a valuable addition to the answer (more over the update *is* the only correct answer among all that info written around here).

http://stackoverflow.com/q/29260470
tagged with: arrays
tagged with: javascript
score: 0
answer count: 2
has body: I have my app that is using a text input to add items to an array. I would like to be able to say, once this array has = to 50 items, then disable the search input. I use a "clear completed" button to clear tasks(items) that are checked off. So the only way to re-enable the input would be to clear some items. I am using Angular.JS, I'm assuming I would need a for loop that says something along the lines, if items = 50, then disable text-input, else enable input. I just don't know how to go about writing it... Angular Array $scope.todos = [ {text:'Build this ToDo List', done:true}, {text: 'Test this ToDo list', done:false} //tasks added through text input... ]; HTML of the app: + {{todo.text}} Clear completed Angular Functions Add item to array $scope.addTodo = function () { $scope.todos.push({text:$scope.formTodoText, done:false}); $scope.formTodoText = ''; }; Clear completed tasks(items) from array $scope.clearCompleted = function () { $scope.todos = _.filter($scope.todos, function(todo){ return !todo.done; }); If/Else Statement ? if ($scope.todos = 50) { document.getElementsByClassName('add-input').disabled = true; document.getElementsByClassName('add-btn').disabled = true; } else { document.getElementsByClassName('add-input').disabled = false; document.getElementsByClassName('add-btn').disabled = false; } Alternatively, if I could just disable the add-btn and enter to submit this could solve my problem as well. Is this possible? Thanks for the help! EDIT Problem was solved by using ng-disabled input = 4"/> button = 4"> +
has title: Can I cap the amount of items I add to an array?
has answer: http://stackoverflow.com/a/29260572
tagged with: jquery
tagged with: angularjs
tagged with: input
accepted answer: http://stackoverflow.com/a/29260572
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29260506
type: Question
has answer: http://stackoverflow.com/a/29260506

http://stackoverflow.com/q/29281290
has comment: http://stackoverflow.com/comment/46761652
type: Question
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/46760718
tagged with: http://stackoverflow.com/tag/xml
answer count: 0
type: UnansweredQuestion
has title: Modify FormData with jQuery
has body: I am trying to modify the "likes" of a xml file. How do I do that? What I'm trying now: var likes = +1; formData.append("likes", likes); var xhr = new XMLHttpRequest(); xhr.addEventListener("loadstart", showLoading, false); var url = "linkishere"; xhr.open('POST', url, true); xhr.onload = function (e) { var response = $.parseJSON(e.target.response); if (response.success == true) { console.log('success: '+response.success); hideLoading(); showThankyou(); console.log('Het stemmen is gelukt'); }else { alert(response.error.message); console.log(response.error.message); console.log(agreeTermsAndConditions); console.log('Er ging iets fout.'); } }; xhr.send(formData); // multipart/form-data } Hope someone can help me with this. Do I use append for this? Sorry I'm new to this.
tagged with: forms

http://stackoverflow.com/comment/46874302
type: QuestionComment
has text: I've read at bit more on Track by and it seems it could be a fix. But I would need a unique identifier for each object in the array in order for it to work - right?
score: 0
comment on: http://stackoverflow.com/q/29343437
type: Comment

http://stackoverflow.com/q/29260212
has body: W3 Schools says These two different statements both create a new array containing 6 numbers: var points = new Array(40, 100, 1, 5, 25, 10) // Bad var points =[40, 100, 1, 5, 25, 10]; // Good but doesn't give an explanation why the first is bad. From what I understand, the only difference is that the first calls the constructor. Can someone clue me into why the first is bad?
has comment: http://stackoverflow.com/comment/46723803
has comment: http://stackoverflow.com/comment/46722588
has comment: http://stackoverflow.com/comment/46722611
accepted answer: http://stackoverflow.com/a/29260262
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46722651
has comment: http://stackoverflow.com/comment/46722971
has answer: http://stackoverflow.com/a/29260262
type: Question
score: 5
tagged with: arrays
upvote count: 6
tagged with: javascript
linked to: http://stackoverflow.com/q/11500492
answer count: 1
downvote count: 1
has title: Why is using "new" to create a Javascript array considered bad?
duplicate of: http://stackoverflow.com/q/11500492
favorite count: 0

http://stackoverflow.com/a/29298646
has comment: http://stackoverflow.com/comment/46792381
upvote count: 1
answers question: http://stackoverflow.com/q/29298582
has comment: http://stackoverflow.com/comment/46792288
accepted answer of: http://stackoverflow.com/q/29298582
has body: Here is an example : $('a.btn-navbar').click(function(){ $('header#header-top').css('height',''); $('#headerContainer').css('height',''); $('#headerText').toggle(); });
type: AcceptedAnswer
downvote count: 0
score: 1
type: Answer
has comment: http://stackoverflow.com/comment/46793158

http://stackoverflow.com/q/29246730
has answer: http://stackoverflow.com/a/29246904
has body: This is my website. I want to do a waterfall and infinite scroll website, it is work fine on pc, but infinite loading not work on my iPhone 6 Chrome. Why? And there is my code :
tagged with: javascript
tagged with: iphone
answer count: 1
tagged with: jquery
accepted answer: http://stackoverflow.com/a/29246904
has title: Why isn't this code working? (on my iphone 6, chrome)
score: 0
tagged with: google-chrome
type: Question
type: AnsweredQuestion

http://stackoverflow.com/a/29326945
has comment: http://stackoverflow.com/comment/46844165
has body: Try this. I assume you want to remove the text box if checkbox unchecked. $('.myCheckBox').click(function() { if ($(this).is(':checked')) { $(wrapper).append('&lt;input type="text" name="mytext[]" placeholder=""&gt;'); }else{ $(wrapper).find('input').remove(); } });
has comment: http://stackoverflow.com/comment/46844048
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29326912
has comment: http://stackoverflow.com/comment/46844065
has comment: http://stackoverflow.com/comment/46844007

http://stackoverflow.com/a/29387633
has comment: http://stackoverflow.com/comment/47075452
type: Answer
answers question: http://stackoverflow.com/q/29358267
has comment: http://stackoverflow.com/comment/47113331
has comment: http://stackoverflow.com/comment/47082102
score: 0
has body: You could just use normal JS to detect if the image can be loaded and if so pass that instance to the EaselJS Bitmap: var img = new Image(); img.onload = function() { console.log('img loaded'); var bitmap = new createjs.Bitmap(img); } img.onerror = function() { console.log('error'); } img.src = 'notexistingimage.png';

http://stackoverflow.com/comment/52080209
has text: Thing is local time zone takes DST into account but not the other TZs, hence the conversion is wrong. In my particular case it didn't work out for `NY`->`Madrid` on Chrome Canary so I just wanted to add my $0.2
comment on: http://stackoverflow.com/a/29226671
type: AnswerComment
type: Comment
score: 0

http://stackoverflow.com/comment/46723390
type: QuestionComment
has text: Ok using the default app.js that you linked solved the issue.. I have no idea why but thanks, create an answer and I'll mark it and give you rep ;)
comment on: http://stackoverflow.com/q/29255957
score: 0
type: Comment

http://stackoverflow.com/q/29333002
has body: I've been trying to get listeners to function with GMaps but have been having some troubles. At the moment clicking on markers yields the address of the stop but does not call the handler. Also I'm mapping out markers using the directions service in case that might for whatever reason effect event-handling Initializing... function initialize() { latlng = avgLatLng(load) directionsService = new google.maps.DirectionsService(); directionsDisplay = new google.maps.DirectionsRenderer(); mapOptions = { zoom : 10, center : {lat : latlng['latitude'], lng : latlng['longitude']}, disableDefaultUI : true, } map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions); setMarkers(load); calcRoute(load.stops) } Calculate route... function calcRoute(stops) { var markerLocs = []; var travelMode = google.maps.TravelMode['DRIVING']; for(var i=0; i&lt;stops.length; i++) { markerLocs.push({ location : new google.maps.LatLng(stops[i].latitude, stops[i].longitude), stopover : (i==0 || i==stops.length ? false : true), }); } var request = { origin: markerLocs[0].location, destination: markerLocs[markerLocs.length-1].location, waypoints: markerLocs.slice(1, (markerLocs.length-1)), travelMode: travelMode, }; directionsService.route(request, function(response, status) { if (status == google.maps.DirectionsStatus.OK) { directionsDisplay.setDirections(response); } }); directionsDisplay.setMap(map); } Set markers... function setMarkers(load) { for (var i = 0; i &lt; load.stops.length; i++) { var markerOptions = { position: {'lat' : load.stops[i]['latitude'], 'lng' : load.stops[i]['longitude']}, map: map, animation: google.maps.Animation.DROP, title: load.stops[i]['city'], zIndex: i, clickable: false, } var marker = new google.maps.Marker(markerOptions); google.maps.event.addDomListener(marker, 'mouseout', function() { console.log('mouseover'); }); google.maps.event.addDomListener(marker, 'click', function() { console.log('mouseover'); }); } }
tagged with: google-maps
type: AnsweredQuestion
upvote count: 0
tagged with: javascript
favorite count: 0
type: Question
score: -1
has answer: http://stackoverflow.com/a/29360170
answer count: 1
downvote count: 1
has title: Google Maps Marker Listeners
accepted answer: http://stackoverflow.com/a/29360170
has comment: http://stackoverflow.com/comment/46860852

http://stackoverflow.com/q/29310185
has title: Create new child node in D3 tree on click
tagged with: tree
has body: I'm trying to modify a D3 collapsible tree layout so that when I click on a leaf node I also create a new child for that node. This new child should persist if I collapse and re-expand the tree, and should be able to have children of its own on future clicks. In the code below, for example, if I click on the "animate" node and then on its child "Transitioner," I want that to create a new node with "Transitioner" as its parent. Here is the code for the layout I'm using: d3.chart.layout.hierarchy.tree.cartesian
answer count: 0
score: 1
upvote count: 1
type: Question
tagged with: javascript
downvote count: 0
favorite count: 0
tagged with: d3.js
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/29315415
has comment: http://stackoverflow.com/comment/46823392
has body: Use mod operator (http://www.w3schools.com/js/js_operators.asp) parseInt(99/60) + " hour " + (99%60) + " + minutes" http://jsbin.com/xisuqefona/1/edit
score: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/46823445
has comment: http://stackoverflow.com/comment/46824049
has comment: http://stackoverflow.com/comment/46840759
has comment: http://stackoverflow.com/comment/46824092
type: Answer
answers question: http://stackoverflow.com/q/29315381
upvote count: 2

http://stackoverflow.com/comment/46650210
score: 0
has text: @Adjit: So what? The function is defined and returns `undefined` (instead of throwing a type error that there is no such function)
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29219131

http://stackoverflow.com/q/29290498
tagged with: post
accepted answer: http://stackoverflow.com/a/29315064
type: Question
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46779486
tagged with: ajax
has comment: http://stackoverflow.com/comment/46779516
answer count: 3
has body: Goal: Grab user-entered data from form, run validation through jquery, then post the variables to php script for storing data into a database. Issue: Ajax request script is working and produces the serialized data; however, the PHP script returns an empty POST array. JS Console Log: serialized data string is produced and contains variables from the form: x_first_name and x_last_name. Error in PHP: Undefined index for all the POST variables. HTML: First Name Last Name AJAX Snippet: PHP (processsale.php) Snippet: print_r($_POST); echo $_POST['x_first_name']; echo $_POST['x_last_name'];
has answer: http://stackoverflow.com/a/29297464
has answer: http://stackoverflow.com/a/29297778
has answer: http://stackoverflow.com/a/29315064
score: 0
has comment: http://stackoverflow.com/comment/46778975
possible better answer: http://stackoverflow.com/a/29297778
tagged with: php
type: AnsweredQuestion
has title: PHP not receiving serialized data from AJAX

http://stackoverflow.com/comment/46685273
score: 0
type: Comment
comment on: http://stackoverflow.com/q/29238965
type: QuestionComment
has text: Yes. I am trying to build a scanner of sorts for JS scripts injected on a page dynamically via document.write, but with this I get inconsistent results.

papaparse
type: Tag
tag name: papaparse
tags question: http://stackoverflow.com/q/29357972

http://stackoverflow.com/comment/46794211
comment on: http://stackoverflow.com/q/29299704
score: 0
type: Comment
type: QuestionComment
has text: This may help: http://stackoverflow.com/questions/11219582/how-to-detect-my-browser-version-and-operating-system-using-javascript

http://stackoverflow.com/q/29308190
accepted answer: http://stackoverflow.com/a/29317943
type: Question
score: 1
has title: React.js does not differentiate between two components of same class
has answer: http://stackoverflow.com/a/29317943
tagged with: reactjs
has comment: http://stackoverflow.com/comment/46819828
upvote count: 1
has comment: http://stackoverflow.com/comment/46817616
answer count: 1
tagged with: javascript
favorite count: 0
has body: Not sure if this is a React.js bug or a "feature" of the Javascript language. I've got a React.js (edit: using v0.12.x) component called Page that acts as a router and selects child components based on the route. I created a mixin that adds a function called runRoute which takes a JSX component and uses Page's setState method to update state.routeComponent. Additionally, runRoute also calls forceUpdate() to ensure that Page is re-rendered. The problem is that it appears React does not differentiate two components in state when they are of the same class. I'll explain. I have two sub-components called Board and Profile. Board is re-used for different contexts. If two consecutive routes are run that both use &lt;Board/&gt;, React.js does not update the UI. It's only when a consecutive route using a different class, such as &lt;Profile/&gt;, does the UI actually update. And if state changes to another route that uses &lt;Board/&gt; differently will it only update the UI to the appropriate state of &lt;Board/&gt;. Here's some sample code below of &lt;Page/&gt; and my Router mixin: Router.js module.exports = function(){ return { getInitialState: function () { return { routeComponent: null }; }, runRoute: function(component){ this.setState({routeComponent: component}); this.forceUpdate(); }, componentWillMount: function() { var self = this; self.router = Router(self.routes).configure({ resource: self, notFound: self.notFound }); self.router.init(); } }; } Page.jsx module.exports = function(React, Router, NotFound, Profile, Board) { return React.createClass({ mixins: [Router], routes: { '/board': 'trending', '/board/mostloved': 'mostLoved', '/profile': 'profile' }, trending: function() { this.runRoute( &lt;Board title="Trending Boards" setTitle={this.props.setTitle} /&gt; ); }, mostLoved: function() { this.runRoute( &lt;Board title="Loved Boards" setTitle={this.props.setTitle} /&gt; ); }, profile: function() { this.runRoute( &lt;Profile setTitle={this.props.setTitle} /&gt;…
type: AnsweredQuestion
downvote count: 0
has comment: http://stackoverflow.com/comment/46817116

http://stackoverflow.com/q/29356674
has answer: http://stackoverflow.com/a/29356763
linked to: http://stackoverflow.com/q/6439915
score: 3
downvote count: 0
answer count: 1
tagged with: undefined
favorite count: 0
linked to: http://stackoverflow.com/q/8312459
accepted answer: http://stackoverflow.com/a/29356763
has comment: http://stackoverflow.com/comment/46898357
tagged with: properties
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46898301
has comment: http://stackoverflow.com/comment/46898290
has body: I'm trying to step through an object to make sure none of the properties are undefined. I found this question and this question and implemented the following code, but it does not work. for (var property in p.properties) { if (p.properties.hasOwnProperty(property)) { if (typeof property == 'undefined') { p.properties[property] = ''; //a breakpoint here will NOT be hit } } } However, if I explicitly check the one that I know has undefined values, it does work: if(typeof p.properties.st == 'undefined') { p.properties.st = ''; //a breakpoint here WILL be hit } Here is how the data is obtained: $.getJSON("data/stuff.json", function (data) { $.each(data.features, function (i, p) { //checking for undefined properties here } });
upvote count: 3
has title: Check all properties of object for undefined
type: Question
tagged with: object
has comment: http://stackoverflow.com/comment/46898319
tagged with: javascript

http://stackoverflow.com/a/29320186
upvote count: 1
accepted answer of: http://stackoverflow.com/q/29319912
answers question: http://stackoverflow.com/q/29319912
has comment: http://stackoverflow.com/comment/47004860
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/49220928
has body: I had to read the code to figure this out. Here is a DEMO $(startCounter); function startCounter() { var tickObj = $('.tick').ticker({ delay: 1000, incremental: 1, separators: true })[0]; setInterval(function () { if (tickObj.value &gt;= 5002) { tickObj.stop(); tickObj.value = 5000; tickObj.start(); } }, 1000); } If you are feeling brave you can mess with Tick.prototype.tick DEMO function startCounter() { var tickObj = $('.tick').ticker({ delay: 1000, incremental: 1, separators: true })[0]; tickObj.tick = (function (tick) { return function () { var ret = tick.call(tickObj); if (tickObj.value &gt; 5002) { tickObj.stop(); tickObj.value = 5000; tickObj.start(); } return ret; }; }(tickObj.tick)); }
score: 1
has comment: http://stackoverflow.com/comment/47009016

http://stackoverflow.com/comment/46717691
type: AnswerComment
comment on: http://stackoverflow.com/a/29257567
score: 0
type: Comment
has text: NO jquery is not allowed whatsoever!

http://stackoverflow.com/q/29228576
upvote count: 0
answer count: 1
has title: preserve input field value using javascript or jquery
tagged with: jquery
has comment: http://stackoverflow.com/comment/46663892
has body: I have two forms on single page one is user information form and other is promocode form. If user inputs its information and decide to apply promocode after filling their info. Than what i want is to preserve user filled info in the input field when promocode is submitted
favorite count: 0
type: UnansweredQuestion
tagged with: php
tagged with: forms
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/29231267
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/46668053

http://stackoverflow.com/q/29277522
has answer: http://stackoverflow.com/a/29278446
score: 0
has title: Dropdown option changes based on max number and other dropdown selection
has answer: http://stackoverflow.com/a/29277744
tagged with: dropdownbox
has comment: http://stackoverflow.com/comment/46753312
type: AnsweredQuestion
tagged with: math
has body: I have a page with 2 dropdown boxes. One is used for picking a number of adults, the other is for the number of children. The total combined max of the selection can not be higher than 10. So if for example pick 4 in adults the number of options in the children dropdown will be 0 to 6. If I pick 9 in adults the options in the children dropdown will only be 0 and 1. THe total combined selection can never get above 10. I am fairly new to JS/jQuery. Can anyone give me tips or point me in the right direction? /Michael
type: Question
answer count: 2
accepted answer: http://stackoverflow.com/a/29277744
tagged with: javascript
possible better answer: http://stackoverflow.com/a/29278446
tagged with: jquery

http://stackoverflow.com/a/29373451
has body: First, use http:// in href before the site. As you have not given much detail, I think the problem is that your page is loading too quickly in order for you to see the transition. I suggest you add a timeout in onbeforeunload function. This adds a 2 seconds timeout. window.onbeforeunload = function (e) { setTimeout(function(){ document.getElementById('myLink').className = 'out'; }, 2000); } If you want to wait after the function, then do this - window.onbeforeunload = function (e) { document.getElementById('myLink').className = 'out'; setTimeout(function(){ document.getElementById('myLink').className = ''; }, 2000); } Now, onbeforeunload doesn't provide a whole lot of functionalities for security reasons, but above should do for you. For more information on timing events in javascript, read this - http://www.w3schools.com/js/js_timing.asp
has comment: http://stackoverflow.com/comment/46956950
has comment: http://stackoverflow.com/comment/46931270
has comment: http://stackoverflow.com/comment/46930961
has comment: http://stackoverflow.com/comment/46929674
has comment: http://stackoverflow.com/comment/46998795
upvote count: 1
has comment: http://stackoverflow.com/comment/46997474
has comment: http://stackoverflow.com/comment/46952995
type: Answer
has comment: http://stackoverflow.com/comment/46930452
downvote count: 0
has comment: http://stackoverflow.com/comment/46931942
score: 1
has comment: http://stackoverflow.com/comment/46931365
has comment: http://stackoverflow.com/comment/46927970
has comment: http://stackoverflow.com/comment/46927608
has comment: http://stackoverflow.com/comment/46992269
has comment: http://stackoverflow.com/comment/46931578
has comment: http://stackoverflow.com/comment/46954455
has comment: http://stackoverflow.com/comment/46928613
has comment: http://stackoverflow.com/comment/46931582
answers question: http://stackoverflow.com/q/29373266

http://stackoverflow.com/comment/46892743
has text: I'm not sure that's the issue, because even when I add data to the variable BEFORE the echo statement, the JavaScript function doesn't execute the PHP echo command.
score: 0
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/29351070

http://stackoverflow.com/q/29308685
tagged with: prompt
has comment: http://stackoverflow.com/comment/46811330
has comment: http://stackoverflow.com/comment/46811464
type: Question
accepted answer: http://stackoverflow.com/a/29308928
has title: Clock based in real time
answer count: 1
tagged with: javascript
score: 0
tagged with: datetime
has comment: http://stackoverflow.com/comment/46811318
has answer: http://stackoverflow.com/a/29308928
has body: I have a game that I am making in the style of ZORK, and it has constant alerts and prompts, and includes a time that you need to last to win it. Since it has alerts and prompts to play the game, I cannot use a set timeout to run the clock, so I created a clock based on real time, but am having some trouble getting it to work. Here's the code var now = new Date(); var stS = now.getSeconds(); var stM = now.getMinutes(); var stH = now.getHours(); function getElapsedTime() { setTimeout(function () { var reS = now.getSeconds(); var reM = now.getMinutes(); var reH = now.getHours(); var elapS = reS - stS; var elapM = reM - stM; var elapH = reH - stH; if (elapM &lt; 0) { reM = reM + 60; elapM = reM - stM; } if (elapS &lt; 0) { reS = reS + 60; elapS = reS - stS; } alert(elapS); alert(elapM); alert(elapH); }, 10000); } getElapsedTime(); Edit: I run it in jsfiddle, but it returns the alert saying that no time has passed when it should say ten seconds have passed. http://jsfiddle.net/t57wsrx8/
tagged with: alerts
type: AnsweredQuestion

http://stackoverflow.com/a/29239170
has comment: http://stackoverflow.com/comment/46685365
score: 0
has comment: http://stackoverflow.com/comment/46687431
answers question: http://stackoverflow.com/q/29238483
type: Answer
has body: Create a data-display page that can accept MessageEvents containing the data you want to display: window.addEventListener("message", function(event) { /* for security, check event.origin here and return if not a safe/recognized URL */ console.log(event.data); // prints message as string /* dynamically display data on page here */ }, false); </scrip> Then in your bookmarklet, open the data-display page in a new window and send it the data using postMessage: bookmark this EDIT: Apparently more complicated in IE: Is cross-origin postMessage broken in IE10? EDIT 2: Testing this in Chrome, it appears that there is a small delay between when a new window is opened and when it can receive messages. Adding a delay to the bookmarklet fixes the problem: bookmark this

http://stackoverflow.com/comment/46921917
type: QuestionComment
comment on: http://stackoverflow.com/q/29369325
type: Comment
has text: Is the response a JSON object?
score: 0

http://stackoverflow.com/a/29278664
answers question: http://stackoverflow.com/q/29278480
has body: Underscore.js has some useful helpers for this kind of thing: http://underscorejs.org/ E.g Find: Looks through each value in the list, returning the first one that passes a truth test (predicate), or undefined if no value passes the test. The function returns as soon as it finds an acceptable element, and doesn't traverse the entire list. var even = _.find([1, 2, 3, 4, 5, 6], function(num){ return num % 2 == 0; }); =&gt; 2 Where: Looks through each value in the list, returning an array of all the values that contain all of the key-value pairs listed in properties. _.where(listOfPlays, {author: "Shakespeare", year: 1611}); =&gt; [{title: "Cymbeline", author: "Shakespeare", year: 1611}, {title: "The Tempest", author: "Shakespeare", year: 1611}]
type: Answer
downvote count: 0
score: 1
upvote count: 1

http://stackoverflow.com/a/67086529
has comment: http://stackoverflow.com/comment/124787898
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/124430154
answers question: http://stackoverflow.com/q/29220467
score: 1
has comment: http://stackoverflow.com/comment/124813925
has comment: http://stackoverflow.com/comment/124448535
downvote count: 0
has body: class Time extends React.Component { constructor(props) { super(props) this.state = { parentTime: '', localTime: '', parentTz: '' } } componentDidMount() { const inputTz = "America/Toronto" const originTime = "2013-11-18 11:55" const time = moment.tz(originTime, inputTz) const localtz = moment.tz.guess() const date = time.clone().tz(localtz) const formatDate = moment(date).format('MMMM Do YYYY, h:mm:ss A z') console.log(formatDate, localtz) this.setState({parentTime: originTime, localTime: formatDate, parentTz: inputTz }) } render() { const {parentTime, parentTz, localTime} = this.state return ( {parentTime} in {parentTz} to {localTime} ) } } ReactDOM.render( <Time />, document.getElementById('time') ); the best way to get a user's time zone is using moment-timezone import moment from 'moment-timezone' // using utc time here const time = moment.tz("2021-04-14T02:08:10.370Z") const localtz = moment.tz.guess() const date = time.clone().tz(localtz) const formatDate = moment(date).format('MMMM Do YYYY, h:mm:ss A z') console.log(formatDate) this way you will be able to convert your time into a local timezone specific time

http://stackoverflow.com/comment/46784496
score: 1
has text: Woo, money! Boo, other people's code. Btw, I updated my answer with how I found the problem so you can do the same trick next time by yourself.
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29294151

http://stackoverflow.com/q/29306621
score: 10
has comment: http://stackoverflow.com/comment/46807596
has comment: http://stackoverflow.com/comment/46807593
upvote count: 10
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/44915411
has answer: http://stackoverflow.com/a/29306656
downvote count: 0
tagged with: javascript
linked to: http://stackoverflow.com/q/251420
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has body: I require the ability to open a new window window.open(url,'_blank'); Then run a javascript script such as window.open(url,'_blank').ready("javascript in here"); But I don't know how to do it, is there a way that I can do this? The description is short but I think that's all that needs to be said
has title: Javascript: Open link in new page and run script
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/44915411
accepted answer: http://stackoverflow.com/a/29306656

http://stackoverflow.com/a/29257392
score: 9
upvote count: 9
has body: I'd just like to note that this being valid syntax is not in any way unique to Javascript. Most languages will have a runtime error or a type error, but that's not the same thing as a syntax error. Javascript chooses to return undefined in many situations where another language might raise an exception, including when subscripting an object that does not have a property of the given name. The syntax doesn't know the type of an expression (even a simple expression like a numeric literal), and will allow you to apply any operator to any expression. For example, attempting to subscript undefined or null causes a TypeError in Javascript. It's not a syntax error - if this is never executed (being on the wrong side of an if-statement), it won't cause any problems, whereas a syntax error is by definition always caught at compile time (eval, Function, etc, all count as compiling).
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/29250950

http://stackoverflow.com/comment/46705119
type: Comment
type: QuestionComment
has text: @NullPoiиteя - users with a certain number of privilege points in questions with a common tag to the one in question can close a question as a duplicate unilaterally (with one single vote). If you think that is done in err, you can vote to reopen and/or flag for moderator attention. Though, in this case it appears the action may have been taken by a moderator of some sort since the user Community doesn't look like a regular user.
comment on: http://stackoverflow.com/q/29227150
score: 0

http://stackoverflow.com/q/29365051
has answer: http://stackoverflow.com/a/29370405
answer count: 2
has answer: http://stackoverflow.com/a/29367948
downvote count: 0
tagged with: javascript
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
upvote count: 1
has body: How do I acknowledge when an audio ends in angular js? I have attached my code. Anyone plz help me. app.controller("myCtrl",function($scope,ngAudio,$document) { $scope.src="aud.mp3"; $scope.play=false; $scope.play=function() { $scope.audio = ngAudio.load('aud.mp3'); $scope.audio.play(); } $scope.stop=function() { $scope.audio = ngAudio.load('aud.mp3'); $scope.audio.pause(); } $document[0].addEventListener("visibilitychange", function() { var doucmentHidden = document.hidden; if (doucmentHidden) $scope.audio.pause(); else $scope.audio.play(); }, false); });
has title: AngularJs audio
score: 1
type: Question

http://stackoverflow.com/a/29273300
accepted answer of: http://stackoverflow.com/q/29273022
answers question: http://stackoverflow.com/q/29273022
type: Answer
upvote count: 3
score: 3
has body: document.onkeydown = function(){ switch (event.keyCode){ case 116 : //F5 button event.returnValue = false; event.keyCode = 0; return false; case 82 : //R button if (event.ctrlKey){ event.returnValue = false; event.keyCode = 0; return false; } } } This code helps you to prevent f5 and ctrl + R functionality
type: AcceptedAnswer
downvote count: 0

function
tags question: http://stackoverflow.com/q/29250743
tag name: function
tags question: http://stackoverflow.com/q/29349421
tags question: http://stackoverflow.com/q/29244878
tags question: http://stackoverflow.com/q/29325842
tags question: http://stackoverflow.com/q/29265822
tags question: http://stackoverflow.com/q/29358975
tags question: http://stackoverflow.com/q/29293105
tags question: http://stackoverflow.com/q/29344619
tags question: http://stackoverflow.com/q/29344506
tags question: http://stackoverflow.com/q/29260803
tags question: http://stackoverflow.com/q/29317260
tags question: http://stackoverflow.com/q/29224616
tags question: http://stackoverflow.com/q/29257743
tags question: http://stackoverflow.com/q/29219322
tags question: http://stackoverflow.com/q/29337617
tags question: http://stackoverflow.com/q/29270488
tags question: http://stackoverflow.com/q/29290624
tags question: http://stackoverflow.com/q/29337589
tags question: http://stackoverflow.com/q/29312328
tags question: http://stackoverflow.com/q/29239749
tags question: http://stackoverflow.com/q/29333619
tags question: http://stackoverflow.com/q/29268398
type: Tag
tags question: http://stackoverflow.com/q/29248279
tags question: http://stackoverflow.com/q/29265627
tags question: http://stackoverflow.com/q/29331243
tags question: http://stackoverflow.com/q/29365661
tags question: http://stackoverflow.com/q/29343653
tags question: http://stackoverflow.com/q/29362636
tags question: http://stackoverflow.com/q/29306967
tags question: http://stackoverflow.com/q/29237972
tags question: http://stackoverflow.com/q/29359197
tags question: http://stackoverflow.com/q/29289441
tags question: http://stackoverflow.com/q/29282061
tags question: http://stackoverflow.com/q/29273750
tags question: http://stackoverflow.com/q/29365231
tags question: http://stackoverflow.com/q/29239736
tags question: http://stackoverflow.com/q/29333366
tags question: http://stackoverflow.com/q/29323600

http://stackoverflow.com/a/29377068
score: 0
type: AcceptedAnswer
has body: If the image is bad, undefined, null, etc - it will not throw an error, so try/catch will do nothing. If you use PreloadJS (part of the CreateJS suite) to load the image, you can listen for an error event, which the queue will throw if any images fail to load (or time out). var queue = new createjs.LoadQueue(); queue.on("error", handleError); queue.loadFile("404image.png"); There is currently no built-in way using just a raw Bitmap instance to determine if an error happens. Images passed by string path to Bitmap are not preloaded, but are just internally requested using an Image instance.
type: Answer
has comment: http://stackoverflow.com/comment/47075433
accepted answer of: http://stackoverflow.com/q/29358267
answers question: http://stackoverflow.com/q/29358267

http://stackoverflow.com/comment/46762810
comment on: http://stackoverflow.com/a/29261032
type: Comment
has text: Sorry, no, but I haven't changed the code that I'm having an issue with from the question, and the openlayers version I'm using is 3.3.0. I eventually will figure this out locally, and will update the question at that time, I just thought I'd ask here too
score: 0
type: AnswerComment

http://stackoverflow.com/comment/46904621
comment on: http://stackoverflow.com/q/29360340
type: QuestionComment
type: Comment
score: 1
has text: Your question does not make any sense.

http://stackoverflow.com/comment/46785062
score: 0
type: AnswerComment
has text: if i click on submit buton without checking any checkbox , it goes to next page without doing validation.-@Vivek Gupta
comment on: http://stackoverflow.com/a/29294300
type: Comment

http://stackoverflow.com/comment/46896534
type: Comment
type: QuestionComment
has text: I've updated the initial description of the problem to explain it more and I have also add links to images on google drive for anyone to download. The only location that will work is "Southport" as the only businesses in the system are based there. When it works the map is of Southport Town Centre,and quite zoomed in. When it's not working it's centered on the USA label in the middle of the US.
comment on: http://stackoverflow.com/q/29355291
score: 0

http://stackoverflow.com/a/29277795
has comment: http://stackoverflow.com/comment/46874268
answers question: http://stackoverflow.com/q/29277694
has comment: http://stackoverflow.com/comment/46756436
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46757434
upvote count: 2
type: Answer
has body: You may Put difference between objects like this function play_pause(player) { var myAudio = document.getElementById(player); if (myAudio.paused) { myAudio.play(); } else { myAudio.pause(); } } And <audio preload="none" id="myAudio1" src="music.mp3" type="audio/mpeg" <audio preload="none" id="myAudio2" src="music2.mp3" type="audio/mpeg" EDITS: Use this loop for more than 4 players var songs=['song1.mp3','song2.mp3','song3.mp3','song4.mp3']; var players=" "; for(var i=0;i<songs.length;i++){ players+=' <audio preload="none" id="myAudio_'+i+'" src="'+songs[i]+'" type="audio/mpeg" '; } players+=" " document.getElementById('myTable').innerHTML=players; and your html
accepted answer of: http://stackoverflow.com/q/29277694
score: 2
has comment: http://stackoverflow.com/comment/46754590

http://stackoverflow.com/q/29241771
type: Question
tagged with: onclientclick
score: 1
has title: Asp.net buttons event click without do postback. Is it possible?
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: asp.net
favorite count: 0
tagged with: autopostback
has body: I would like to know if is possible to use a asp:button, use an event click. and call a javascript instead code behind without to do postback? I need to record voice and I´m using javascript to do this. Someone could help me?
has comment: http://stackoverflow.com/comment/46689656
tagged with: events
has answer: http://stackoverflow.com/a/29241801
type: UnansweredQuestion
upvote count: 1

http://stackoverflow.com/a/29234106
has comment: http://stackoverflow.com/comment/46675004
downvote count: 1
has comment: http://stackoverflow.com/comment/67195052
has comment: http://stackoverflow.com/comment/140197215
has comment: http://stackoverflow.com/comment/61939499
has comment: http://stackoverflow.com/comment/46674786
has comment: http://stackoverflow.com/comment/67883114
accepted answer of: http://stackoverflow.com/q/29233896
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29233896
upvote count: 175
has comment: http://stackoverflow.com/comment/65104292
has body: If you don't define a primaryKey then sequelize uses id by default. If you want to set your own, just use primaryKey: true on your column. AcademyModule = sequelize.define('academy_module', { academy_id: { type: DataTypes.INTEGER, primaryKey: true }, module_id: DataTypes.INTEGER, module_module_type_id: DataTypes.INTEGER, sort_number: DataTypes.INTEGER, requirements_id: DataTypes.INTEGER }, { freezeTableName: true });
has comment: http://stackoverflow.com/comment/46674703
type: Answer
score: 174

http://stackoverflow.com/a/29248183
type: AcceptedAnswer
downvote count: 1
has comment: http://stackoverflow.com/comment/46701075
answers question: http://stackoverflow.com/q/29248182
upvote count: 5
type: Answer
has comment: http://stackoverflow.com/comment/46702205
has body: I'll discuss my code underneath. First off, My Javascript: window.onload = function start() { canvas = document.getElementById('canvas1'); C_Width = canvas.width; C_Height = canvas.height; cxt = canvas.getContext('2d'); setTimeout(text_handler,200); } function text_handler() { console.log('made it!'); cxt.font="20px myFont";//font size and then font family. cxt.fillStyle="white"; //color to be seen on a black canvas, default is black text cxt.fillText("TEST",(C_Width/2-200),C_Height/2); //cxt.fillText("message",x_coord,y_coord); } Allow me to explain whats going on here. I have a simple window.onload function so that the canvas exists before I try to get its Id and Context. Inside my text_handler() function, I have the font size and the font family defined in one line, as well as my font color (White because I have a black canvas). Then in the canvas I draw my message, and provide an x coordinate and a y coordinate. The setTimeout(); delay may be necessary in order to give the canvas time to load the font. In the test program I wrote, I actually got the delay time down really low, though 100ms is almost unnoticeable. Another critical part of this is the CSS stylesheet: canvas { background-color: black; //for white text font-family:myFont; //necessary } #load { font-family:myFont; //necessary to load font with div visibility: hidden; //makes div invisible but the div element forces the text to load before the canvas. height: 0px; } @font-face { font-family:myFont; src: url('./Font_Path.ttf'); } //self-explanatory I have of course defined the font in the canvas, the body of the webpage, and a necessary hidden div. The div helps load the font. I have styles in order that the div remains invisible but it still does its job. For some reason, through my testing, I determined that the font-family style must be above the other styles in my div. Of course, you could use whatever you want. Also of course, I use @font-face for my custom font. Here's what the HTML looks like: w…
has comment: http://stackoverflow.com/comment/46726584
score: 4
accepted answer of: http://stackoverflow.com/q/29248182

http://stackoverflow.com/comment/46883119
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/29347945
type: Comment
has text: I've updated the js to add that fix - you may want to update the css to hide the dummy items (visibility:hidden rather than display:none should work)

http://stackoverflow.com/comment/136025415
score: 0
type: AnswerComment
has text: One more mnemonic! `for...of` replaces `for (let i = 0; ...)`, so `for...0f`. I haven't been able to remember the difference reliably without this one.
comment on: http://stackoverflow.com/a/29286412
type: Comment

http://stackoverflow.com/q/29231101
answer count: 1
tagged with: variables
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29234194
has body: I'm using WebPack THis is my code : test.js : var superText = "lol"; Main.js : var test = require("./test.js");console.log(test.superText); But it say me "test.superText is undefined" can i have acces of require's variables ? If yes how please ? Thanks :D
score: 0
type: Question
has title: WebPack : How to get other js's values?
tagged with: webpack
tagged with: javascript

drupal
type: Tag
tags question: http://stackoverflow.com/q/29352831
tags question: http://stackoverflow.com/q/29354951
tag name: drupal

http://stackoverflow.com/comment/46790871
has text: @WebDeveloper, I've updated the answer, can you try running your code as an HTML file instead of running it as an ASP file? If that's the case, then maybe there could be some missing configuration in your ASP Application. Let me know if it helps.
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/29296342
type: Comment

http://stackoverflow.com/q/29349808
has comment: http://stackoverflow.com/comment/46913214
has comment: http://stackoverflow.com/comment/46885399
has answer: http://stackoverflow.com/a/29632160
accepted answer: http://stackoverflow.com/a/29632160
type: AnsweredQuestion
upvote count: 0
has comment: http://stackoverflow.com/comment/46894280
type: Question
has comment: http://stackoverflow.com/comment/46912345
has title: d3.js linking points from several CSV
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/46907956
has body: I am new to d3.js and trying to create a stick figure from points taken out of a video. I have time (V1) width(V2) and height(V3) for each csv. Each csv containing the data for a member of the body. For the moment, I have managed to show the movements for each member but I am stuck when creating the links between the two shoulders for example. Here is my code. The tsv looks like this: "","V1","V2","V3","V4","V5","Arc_tangent" "497",16534,-17,194,"Gamme1","G1M4",95.0149703115723 "498",16567,-14,194,"Gamme1","G1M4",94.1345252720128 "499",16600,-8,195,"Gamme1","G1M4",92.3560812239648 "500",16634,-4,199,"Gamme1","G1M4",91.1582332417969 "501",16667,-2,202,"Gamme1","G1M4",90.5739377208393 "502",16700,1,208,"Gamme1","G1M4",89.7311508785662 "503",16734,4,213,"Gamme1","G1M4",88.9306996559012 And the code: var width=600,height=400; var rayon=25; var canvas3=d3.select(".trois") .append("svg") .attr("width",width).attr("height",height) .append("g") .attr("transform", "translate(0,0)"); var x = d3.scale.linear() .domain([-200,200]) .range([5, width]); var y = d3.scale.linear() .domain([-100,250]) .range([height,5]); d3.csv("donnees/VepauledG1M4.tsv", function(error, ed) { ed.forEach(function(d) { d.V1 =+ parseInt(d.V1); d.V2 =+ parseInt(d.V2); d.V3 =+ parseInt(d.V3); }); d3.csv("donnees/VepaulegG1M4.tsv", function(error, eg) { eg.forEach(function(d) { d.V1 =+ parseInt(d.V1); d.V2 =+ parseInt(d.V2); d.V3 =+ parseInt(d.V3); }); var pointsepauled=canvas3.selectAll(".pointsepauled") .data(ed) .enter().append("circle") .attr("cx",function(d) { return x(d.V2); }) .attr("cy",function(d) { return y(d.V3); }) .attr("r", 2) .attr("class","pointsepauled") .attr("opacity",0) .attr("fill", "white"); pointsepauled.transition() .attr("cx",function(d) { return x(d.V2); }) .attr("cy",function(d) { return y(d.V3); }) .attr("fill", "blue") .attr("opacity",1) .duration(33) .delay(function(d) { return (d.V1); }); pointsepauled.transition() .attr("cx",function(d) { return x(d.V2); }) .attr("cy",funct…
answer count: 1
downvote count: 1
favorite count: 0
tagged with: d3.js
tagged with: http://stackoverflow.com/tag/csv

http://stackoverflow.com/q/29314884
tagged with: controller
score: 0
has body: I'm building an angular/ionic application as part of my thesis, and part of the functionality is to change a 'collection list' based on a selection on a different partial (the character select). The value that's being updated is saved to a .value called 'global', so that it's always accessible. When I select a radio button on character select, the value updates correctly, but upon navigating back to the collection list, the change is never applied. The solution I see is to have collection list always do a full refresh when navigated to, however every relevant solution I have seen only refreshes the current page, whereas I need to have the page refreshing any time I navigate to it. Any suggestions? Edit: My apologies for not posting the code. I had assumed that the code wouldn't be necessary for this scenario. details.html &lt;ion-view&gt; &lt;ion-content padding="true"&gt; &lt;br&gt;&lt;br&gt; &lt;div class="bar bar-header item-input-inset"&gt; &lt;label class="item-input-wrapper"&gt; &lt;i class="icon ion-ios7-search placeholder-icon"&gt;&lt;/i&gt; &lt;input type="search" placeholder="Search" ng-model="searchFilter.dragon_name" /&gt; &lt;/label&gt; &lt;/div&gt; {{character.character_id}} &lt;!--Testing for updated variable--&gt; &lt;ion-list&gt; &lt;ion-item class="listHead" ng-hide="searchFilter"&gt;Ancient&lt;/ion-item&gt; &lt;ion-item ng-repeat="content in contents | filter:{family_name:'Ancient'}:true | filter:searchFilter"&gt; &lt;div class="listLeft"&gt; &lt;img data-ng-src="img/icons/{{content.family_id}}/{{content.dragon_th}}.png" alt="{{content.dragon_name}}" class="thumb"/&gt; &lt;a href="#details/{{content.dragon_id}}"&gt; &lt;h2 class="listTop"&gt;{{content.dragon_name}}&lt;/h2&gt; &lt;/a&gt;&lt;br&gt; &lt;h3 class="listBottom"&gt;{{content.family_name}}&lt;/h3&gt;&lt;br&gt; &lt;h3 class="listBottom" ng-repeat="location in content.locations"&gt;{{location.zone_name}}&amp;nbsp;&lt;/h3&gt; &lt;/div&gt; &lt;div class="listRight"&gt; &lt;label class="toggle…
tagged with: angularjs
has comment: http://stackoverflow.com/comment/46827112
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46824834
has comment: http://stackoverflow.com/comment/46836323
has comment: http://stackoverflow.com/comment/46822393
tagged with: ionic-framework
type: Question
has title: How do I refresh an Angular controller on state load?
tagged with: state
tagged with: javascript

http://stackoverflow.com/q/29237239
has comment: http://stackoverflow.com/comment/46680781
has body: on an ajax callback, selecting a div inside the calling form works well when the forms is outside a table, and does not work when inside a table. any way to make this work? Please check out this JSFiddle: http://jsfiddle.net/split19/o0rs1L9z/7/ Update checkmark x Update checkmark x Table: Update checkmark x Update checkmark x JS: $(".fileform").submit(function(e) { var postData = $(this).serializeArray(); var formURL = $(this).attr("action"); var self = $(this); $.ajax( { url : formURL, type: "POST", data : postData, context: e.target, success:function(data, textStatus, jqXHR) { self.find('.file-success').fadeIn(500); }, error: function(jqXHR, textStatus, errorThrown) { self.find('.file-error').fadeIn(500); } }); e.preventDefault(); });
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46680681
has comment: http://stackoverflow.com/comment/46680549
tagged with: ajax
answer count: 1
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29237541
score: -3
has comment: http://stackoverflow.com/comment/46680589
downvote count: 3
has comment: http://stackoverflow.com/comment/46680554
type: Question
has title: jquery select div inside table
upvote count: 0

http://stackoverflow.com/comment/46833161
type: Comment
score: 1
comment on: http://stackoverflow.com/q/29320865
has text: Suggested reading: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String
type: QuestionComment

http://stackoverflow.com/a/29224056
score: 1
upvote count: 1
downvote count: 0
answers question: http://stackoverflow.com/q/29223199
type: Answer
has body: It's kind of difficult without more implementation detail, but I'm assuming that you're using some mechanism to show/hide the read-only/editable elements for each row? If you use ng-if to do it, it will attach the elements to the DOM and re-bind when the condition is true and detach when false. So, something like: Read-only stuff here Editable stuff here. I created a really simple example plunk here: http://plnkr.co/edit/SkdgTuK5UvEEsZmzWat6?p=preview

http://stackoverflow.com/q/29372864
tagged with: datatable
has answer: http://stackoverflow.com/a/29372980
has body: I have a jquery dataTable with 3 columns (check box column, userId, full name). The 'check_all' check box worked fine (meaning all the rows were checked when the 'check_all' was clicked) when I used it with jquery.dataTables.js and jquery.dataTables.min.js version 1.9.4. However, I have to use dataTable version 1.10.5 in order to use the "draw()" function. But once I started using the new version, the check_all checkbox stopped working, the alert() inside the .click() didn't get invoked. I tried to put the .click function inside the $(document).ready(), but didn't fix the issue. Anybody has any idea ? Thanks!! Script: $('#check_all').click(function() { alert("here"); var oTable = $('#users').DataTable(); }); HTML part: Select users User Id Full Name
type: UnansweredQuestion
type: Question
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
has title: Check All box does not work with Jquery DataTable version 1.10.5

http://stackoverflow.com/comment/46874821
type: Comment
type: QuestionComment
has text: Yes, that's a common solution, but you forgot to declare the variable `var myObject = this`
score: 3
comment on: http://stackoverflow.com/q/29344307

http://stackoverflow.com/q/29323777
tagged with: javascript
tagged with: extjs
has answer: http://stackoverflow.com/a/32374693
type: UnansweredQuestion
type: Question
tagged with: http://stackoverflow.com/tag/json
score: 0
has title: Sencha Ext JS sort criteria sent as a String instead of JSON
answer count: 1
has body: I am trying to implement server-side sorting with Sencha Ext JS and noticed something odd. The paging portion of the JSON looks fine but the sort property is set as a String and not an Array: Actual: {"page":1,"start":0,"limit":50,"sort":"[{\"property\":\"firstName\",\"direction\":\"ASC\"}]"} Expected: {"page":1,"start":0,"limit":50,"sort":[{"property":"firstName","direction":"ASC"}]} Ext JS: Ext.require([ 'Ext.grid.*', 'Ext.data.*', 'Ext.panel.*', 'Ext.layout.container.Border' ]); Ext.define('Customer',{ extend: 'Ext.data.Model', fields: [ {name: 'id', type: 'int'}, {name: 'firstName', type: 'string'}, {name: 'lastName', type: 'string'}, {name: 'companyName', type: 'string'} ] }); Ext.onReady(function(){ var itemsPerPage = 50; // Paging var store = Ext.create('Ext.data.Store', { pageSize: itemsPerPage, // autoLoad: true, autoLoad: {start: 0, limit: itemsPerPage}, autoSync: true, model: 'Customer', remoteSort: true, proxy: { paramsAsJson: true, actionMethods: { read: 'POST' }, type: 'rest', // was... 'ajax', url: '/customers', reader: { type: 'json', root: 'content', totalProperty: 'totalElements' }, writer: { type: 'json' }, listeners: { write: function(store, operation){ var record = operation.getRecords()[0], name = Ext.String.capitalize(operation.action), verb; if (name == 'Destroy') { record = operation.records[0]; verb = 'Destroyed'; } else { verb = name + 'd'; } Ext.example.msg(name, Ext.String.format("{0} user: {1}", verb, record.getId())); } } } }); var rowEditing = Ext.create('Ext.grid.plugin.RowEditing', { listeners: { cancelEdit: function(rowEditing, context) { // Canceling editing of a locally added, unsaved record: remove it if (context.record.phantom) { store.remove(context.record); } } } }); // create the grid var grid = Ext.create('Ext.grid.Panel', { bufferedRenderer: false, store: store, columns: [ {text: "ID", width: 120, dataIndex: 'id', sortable: true}, {text: "First Name", flex: 1, dataIndex: 'firstName', sortable: true, editor: 'textfield'}, {…

http://stackoverflow.com/comment/46798221
type: AnswerComment
has text: They are being encoded because they are being put on a url string. The reason for the encode(decode(item) is because that item may have been pulled off a url string (also might have not) so it decodes first before it encodes as to not double encode it.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29286554

http://stackoverflow.com/a/29348439
accepted answer of: http://stackoverflow.com/q/29348205
type: AcceptedAnswer
downvote count: 0
has body: Just guessing, I'd try parsing $.urlParam('no_of_items');: var perTime = parseInt($.urlParam('no_of_items')); since perTime is a string in your current implementation. I'm not sure how much slice likes that...
answers question: http://stackoverflow.com/q/29348205
type: Answer
has comment: http://stackoverflow.com/comment/46882653
score: 1
upvote count: 1

http://stackoverflow.com/comment/57850464
type: Comment
score: 1
comment on: http://stackoverflow.com/a/29277834
type: AnswerComment
has text: I can confirm, that my debugger does not stop on what seems like Uncaught Exceptions. =(

http://stackoverflow.com/q/29247175
has body: Inside a JSP, I am fetching data from a Servlet by this code &lt;% String name=(String)request.getAttribute("filepath"); %&gt; I want to access this inside script tags, how should i go about it? I tried this var n = "${name}" and var n = "&lt;%=name%&gt;" and it did not work.
type: Question
tagged with: javascript
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/29247888
tagged with: jsp
has title: Pass variable from JSP to Javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46700333
has comment: http://stackoverflow.com/comment/46699889
has comment: http://stackoverflow.com/comment/46699626
has answer: http://stackoverflow.com/a/29247688
type: UnansweredQuestion

http://stackoverflow.com/q/29317866
favorite count: 0
has comment: http://stackoverflow.com/comment/46829940
has comment: http://stackoverflow.com/comment/47540348
has comment: http://stackoverflow.com/comment/46828737
has answer: http://stackoverflow.com/a/76077949
has answer: http://stackoverflow.com/a/73923405
upvote count: 13
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46827573
accepted answer: http://stackoverflow.com/a/29319016
possible better answer: http://stackoverflow.com/a/73923405
score: 13
has body: I'm trying to make a webpage in html5 which stores sample-data from a wav-file in an array. Is there any way to get the sample-data with javascript? I'm using a file-input to select the wav-file. In the javascript I already added: document.getElementById('fileinput').addEventListener('change', readFile, false); but I have no idea what to do in readFile. EDIT: I tried to get the file in an ArrayBuffer, pass it to the decodeAudioData method and get a typedArraybuffer out of it. This is my code: var openFile = function(event) { var input = event.target; var audioContext = new AudioContext(); var reader = new FileReader(); reader.onload = function(){ var arrayBuffer = reader.result; console.log("arrayBuffer:"); console.log(arrayBuffer); audioContext.decodeAudioData(arrayBuffer, decodedDone); }; reader.readAsArrayBuffer(input.files[0]); }; function decodedDone(decoded) { var typedArray = new Uint32Array(decoded, 1, decoded.length); console.log("decoded"); console.log(decoded); console.log("typedArray"); console.log(typedArray); for (i=0; i&lt;10; i++) { console.log(typedArray[i]); } } The elements of typedArray are all 0. Is my way of creating the typedArray wrong or did I do something else wrong on? EDIT: I finally got it. This is my code: var openFile = function(event) { var input = event.target; var audioContext = new AudioContext(); var reader = new FileReader(); reader.onload = function(){ var arrayBuffer = reader.result; console.log("arrayBuffer:"); console.log(arrayBuffer); audioContext.decodeAudioData(arrayBuffer, decodedDone); }; reader.readAsArrayBuffer(input.files[0]); }; function decodedDone(decoded) { var typedArray = new Float32Array(decoded.length); typedArray=decoded.getChannelData(0); console.log("typedArray:"); console.log(typedArray); } Thanks for the answers!
type: Question
tagged with: arrays
tagged with: javascript
tagged with: wav
has comment: http://stackoverflow.com/comment/46828698
has title: Read samples from wav-file
has comment: http://stackoverflow.com/comment/46828251
answer count: 3
has comment: http://stackoverflow.com/comment/47541796
has comment: http://stackoverflow.com/comment/46828336
downvote count: 0
has answer: http://stackoverflow.com/a/29319016

http://stackoverflow.com/comment/46955552
comment on: http://stackoverflow.com/a/29384926
score: 0
type: Comment
has text: make the location list as an array of object which will contain lat, long,title and snippet
type: AnswerComment

http://stackoverflow.com/comment/46803171
comment on: http://stackoverflow.com/q/29304311
has text: are you trying to remove all elements that are not an object?
type: QuestionComment
type: Comment
score: 2

http://stackoverflow.com/comment/46841630
type: QuestionComment
comment on: http://stackoverflow.com/q/29315083
score: 0
has text: @sideroxylon Thanks - didn't realise you could do this in Safari! The click function was working though. The following expression for some reason wasn't recognised: `is(':not(:checked'))`
type: Comment

http://stackoverflow.com/comment/46936653
type: Comment
type: AnswerComment
has text: I suspect you are on the right track but I had to "move off the grid" for this one ... was not worth the pain considering how easy this is to do with dataView control instead.
comment on: http://stackoverflow.com/a/29372993
score: 0

http://stackoverflow.com/q/29308063
score: 0
has comment: http://stackoverflow.com/comment/46810423
has comment: http://stackoverflow.com/comment/46811292
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/46811427
tagged with: jquery
has comment: http://stackoverflow.com/comment/46810380
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29308188
accepted answer: http://stackoverflow.com/a/29308188
has body: I'm trying to set the max width of a tag to the width of a sibling tag. Here's the relevant code: <%= t('marker.annotation.preview_title') %> I'm using jquery to populate the content of annotation_preview and I would like it's width to not exceed the width of the tag surrounding annotation_preview_title. Here's an image of the problem I'm trying to solve: I'd like to get the annotation_preview to wrap once it reaches the width of annotation_preview_title. I've tried using css as found here (from another SO post I closed) and tried playing with jQuery doing something to the effect of: var previewParagraph = document.getElementById("annotation_preview"); var title = document.getElementById("annotation_preview_title"); previewParagraph.maxWidth = title.width; Neither of which worked. I'm open to any and all solutions (pure JS, pure CSS, mix, whatever).
type: Question
has comment: http://stackoverflow.com/comment/46810995
has title: Bind width of one element to width of sibling

http://stackoverflow.com/q/29279042
type: AnsweredQuestion
tagged with: c#
tagged with: asp.net-mvc
type: Question
has body: I'm trying to make an ASP.NET page where it is possible to track the route from the current user with the Google Maps API. The problem is whenever I use the interval to draw the polyline the whole Google Map refreshes which results in a flickering page. Here is my code: &lt;script&gt; //declare variables var interval; var coordinates = []; var x = document.getElementById("exception"); //Get current position and loop this function getLocation() { //Check if the user has a geolocation if (navigator.geolocation) { interval = setInterval(function () { navigator.geolocation.getCurrentPosition(showPosition); }, 500); } else { x.innerHTML = "Geolocation is not supported by this browser."; } } //Get the latitude and longitude and draw a polylin function showPosition(position) { console.log(position.coords.latitude + " " + position.coords.longitude); //Map options for the Google map and center the current position var mapOptions = { zoom: 15, center: new google.maps.LatLng(position.coords.latitude, position.coords.longitude) } //Add the options to the google map and display it var map = new google.maps.Map(document.getElementById("mapDiv"), mapOptions); //Create a marker for the current position var marker = new google.maps.Marker({ position: new google.maps.LatLng(position.coords.latitude, position.coords.longitude), title: "Current position!" }); // To add the marker to the map, call setMap(); marker.setMap(map); //Add the current coordinates to the array coordinates.push(new google.maps.LatLng(position.coords.latitude, position.coords.longitude)); //Create a polyline with the coordinates array var flightPath = new google.maps.Polyline({ path: coordinates, geodesic: true, strokeColor: '#FF0000', strokeOpacity: 1.0, strokeWeight: 2 }); //To add the polylin to the map, call setMap(); flightPath.setMap(map); } //Stop the interval $("#stop").click(function () { clearInterval(interval); coordinates = []; }); &lt;/script&gt; Thanks in advance, Brent
has title: Only update polyline not the whole map
tagged with: google-maps
answer count: 1
tagged with: javascript
score: 0
tagged with: setinterval
accepted answer: http://stackoverflow.com/a/29283743
has answer: http://stackoverflow.com/a/29283743

http://stackoverflow.com/comment/46891595
score: 0
type: Comment
has text: Its blank. variable named data is not holding anything. so its printing blank line.
comment on: http://stackoverflow.com/a/29352839
type: AnswerComment

http://stackoverflow.com/comment/46722622
type: QuestionComment
score: 3
has text: Dare i ask - what have you tried??
comment on: http://stackoverflow.com/q/29260190
type: Comment

http://stackoverflow.com/a/29357522
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/29357384
score: 1
upvote count: 1
has body: You might want to use AJAX request with combination of history.pushState. Something like this: window.onload = function() { document.getElementsByClassName('feed')[0].onclick = function() { document.getElementById("demo").innerHTML = Date(); var req = new XMLHttpRequest(); req.open('GET', '?feed', true); req.send(null); window.history.pushState(null, null, '?feed'); }; }; FEED ME!
answers question: http://stackoverflow.com/q/29357384

http://stackoverflow.com/comment/46718898
type: Comment
type: QuestionComment
has text: @PraveenKumar I have updated.Please check that.
score: 1
comment on: http://stackoverflow.com/q/29258170

http://stackoverflow.com/q/29347909
tagged with: javascript
has answer: http://stackoverflow.com/a/29348007
tagged with: jquery
has comment: http://stackoverflow.com/comment/46881839
score: 0
has body: I have a fixed element that is centered on the page. I would like the element to scale smaller to 80% for smaller screens. Currently max-height isn't working due to the element being fixed. DEMO http://jsfiddle.net/gop4jhm9/1 #myDiv { position: fixed; top: 100px; left: 50%; width: auto; // need height to auto adjust depending on content height: auto; // need height to auto adjust depending on content background: red; display: inline-block; padding: 10px; max-height: 80%; // isn't working }
answer count: 3
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46881727
tagged with: css
has comment: http://stackoverflow.com/comment/46881830
has answer: http://stackoverflow.com/a/29348032
has comment: http://stackoverflow.com/comment/46882359
has answer: http://stackoverflow.com/a/29348202
type: Question
has title: Set max height of fixed element

http://stackoverflow.com/a/29500518
has comment: http://stackoverflow.com/comment/47163601
has comment: http://stackoverflow.com/comment/47221339
has comment: http://stackoverflow.com/comment/47163217
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/47170843
type: Answer
answers question: http://stackoverflow.com/q/29357891
has comment: http://stackoverflow.com/comment/47222617
accepted answer of: http://stackoverflow.com/q/29357891
has comment: http://stackoverflow.com/comment/47223291
upvote count: 1
has body: Short answer: No, there is no way to do this in Javascript for security reasons. Long answer: Some plugins support UDP communications. For example, you could use Flash's Adobe AIR's DatagramSocket. If you are interfacing with an existing API which you cannot change, this might be your only option. However, if you are building this app from scratch and intend to deploy it on the web, I would strongly suggest that you consider a different mode of transport. Take a look at LocalStorage or Shared Workers for browser-based IPC, Websockets for asynchronous client-server communication and WebRTC for peer-to-peer communication (although support for this standard is still a work in progress). This will allow you to support Apple devices and Linux as Adobe drops flash support on the platform, as well as provide better security guarantees than Flash or Java applets.
has comment: http://stackoverflow.com/comment/47197788
score: 1
has comment: http://stackoverflow.com/comment/47220881
has comment: http://stackoverflow.com/comment/47206531

http://stackoverflow.com/comment/46836642
type: QuestionComment
has text: Check this out ... http://stackoverflow.com/questions/2592092/executing-script-elements-inserted-with-innerhtml
score: 0
comment on: http://stackoverflow.com/q/29322750
type: Comment

http://stackoverflow.com/comment/46694028
comment on: http://stackoverflow.com/q/29243699
has text: something like this: http://jsbin.com/tolifa/1/watch?html,css,output ?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29299184
answer count: 2
has comment: http://stackoverflow.com/comment/46793331
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/29299250
tagged with: xmlhttprequest
favorite count: 0
linked to: http://stackoverflow.com/q/29775797
possible better answer: http://stackoverflow.com/a/29299280
has answer: http://stackoverflow.com/a/29299280
has title: XMLHttpRequest send JS Object
has body: I'm trying to send an JS Object with an (POST) XMLHttpRequest, but I get no POST data in PHP. This code worked before with an Ajax request, but i'm trying to get feedback from the server for an progressbar ( whitch is working fine now). That's why i've chagend to XMLHttpRequest. The code: var dataRows = { 'bewaarnaam': bewaarNaam, rows: {} }; $(".rows").each(function (i, obj) { var row = $(obj); var rowName = $(row).attr('name'); var chests = {}; $(".cv_chest", row).each(function (i2, obj2) { chests[$(obj2).attr('id')] = { 'counter': $(obj2).attr('chest_counter'), 'height': $(obj2).attr('chest_height'), 'db_id': $(obj2).attr('db_id') }; }); var top = $(row).css('top').replace("px", ""); var left = $(row).css('left').replace("px", ""); var rowData = { 'name': $(row).attr('name'), 'x': parseInt(left), 'y': (parseInt(top - 100)), 'rotation': rotation[$(row).attr('dir')], 'db_id': $(row).attr("db_id"), 'chests': chests }; dataRows.rows[$(row).attr('id')] = rowData; }); ... var xhr = new XMLHttpRequest(); xhr.open("POST", "{{ url('bewaarplaatsen/xhrTest/') }}", true); xhr.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); xhr.send(dataRows); So my question is rather simple... How can i send an object with an post through the XmlHttpRequest function?
accepted answer: http://stackoverflow.com/a/29299250
type: AnsweredQuestion
score: 10
upvote count: 10
tagged with: post
type: Question

http://stackoverflow.com/comment/46794617
type: QuestionComment
comment on: http://stackoverflow.com/q/29299741
has text: I added screen shots. For fiddle it would need some time, wich I dont have so much.. :/
score: 0
type: Comment

http://stackoverflow.com/a/29307529
answers question: http://stackoverflow.com/q/29307314
score: 1
downvote count: 0
has body: You forget to call movetext() function in check() and uncheck() function. Add this after you do check/uncheck: movetext(chk[i].value);
type: Answer
upvote count: 1

http://stackoverflow.com/q/29268074
score: 0
answer count: 2
possible better answer: http://stackoverflow.com/a/29268190
has body: I'm trying to get an HTML input form field to automatically insert a ".com" suffix in HTML, but I also want the user to be able to edit the ".com" into whatever domain that they want. Any tips on how I should go about on this?
tagged with: jquery
has comment: http://stackoverflow.com/comment/46737728
has title: How to automatically add .com at the end in an HTML input field?
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29268190
has comment: http://stackoverflow.com/comment/46737973
has comment: http://stackoverflow.com/comment/46737804
has answer: http://stackoverflow.com/a/29268765
tagged with: forms
accepted answer: http://stackoverflow.com/a/29268765
type: Question
tagged with: javascript

http://stackoverflow.com/a/29235578
answers question: http://stackoverflow.com/q/29235406
score: 0
has body: Write inside the controller $scope.hideRow = true; $scope.showDetails = function () { $scope.hideRow = false; } and add hideRow scope inside ng-hide {{ $index + 1 }} {{ student.name }} {{ student.age }}
type: Answer

http://stackoverflow.com/comment/46845226
has text: Calling that script Search box.js and calling it by a HTML file: ` Search box for PubMed ` gives an empty page.
comment on: http://stackoverflow.com/a/29326307
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/29242406
has answer: http://stackoverflow.com/a/29242943
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29333972
has answer: http://stackoverflow.com/a/29243024
has comment: http://stackoverflow.com/comment/46690948
tagged with: angularjs
has answer: http://stackoverflow.com/a/29246678
has body: I'm trying realize English test web page like this: http://www.englishpage.com/verbpage/verbs20.htm So, I have JSON inside controller: var studyEng = angular.module('studyEng', []); studyEng.controller('ExercisesController', function ($scope) { $scope.exercises = { 'title':'Will / Be Going To', 'description':'Using the words in parentheses, complete the text below with the appropriate tenses, then click the "Check" button to check your answers.', 'exercise':[ { "question": "Michael: Do you think the Republicans or the Democrats (win) :i: the next election?", "answer":"answer 1" }, { "question": "Jane: I think the Republicans (win) :i: the next election.", "answer":"answer 2" }, { "question": "John: No way! The Democrats (win) :i:", "answer":"answer 3" } ] } }); And Angular template: {{exercises.title}} {{exercises.description}} {{exercise.question}} What I want to do, is that change :i: from my JSON, to input field Please, help me - how I can do that? P.S. I'm pretty new in Angular and in StackOverflow too :) Thanks in advance.
answer count: 4
has title: Replace some symbols inside of ng-repeat
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/23706006
score: 0
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/29333972
type: Question
possible better answer: http://stackoverflow.com/a/29242943

http://stackoverflow.com/comment/46791460
type: AnswerComment
type: Comment
has text: this was suggested under comments, 5 min ago :)
comment on: http://stackoverflow.com/a/29298156
score: 1

http://stackoverflow.com/q/29328566
type: Question
has answer: http://stackoverflow.com/a/34424197
has comment: http://stackoverflow.com/comment/46847682
score: 3
has body: Hiello! I'm wondering whats wrong in the React example bellow or if React works differently than I thought? I'm looking for a way to reuse the underlying html element for a child react component, when the parents are two different components. In the example bellow, I would like the inside the Circle component to have the same element after renderC1 and renderC2 is called. For instance so that I could apply a transition css property to animate the color switch, like they would if I e.g. just changed the style directly on the element. When I render the bellow, React always seems to generate different HTML elements, ref, key or id on the DIV (in the render function of Circle) doesn't help much. So my questions: is it possible to get React to just reuse the DIV that gets rendered via C1 when C2 is rendered? I thought this was how React should work, optimizing the underlying HTML elements? Something like: var C1 = React.createClass({ render: function () { return ( &lt;Circle background="deeppink" onClick={renderC2}/&gt; ); } }); function renderC1 () { React.render( &lt;C1 /&gt;, document.getElementById('mount-point')); } var C2 = React.createClass({ render: function () { return ( &lt;Circle background="salmon" onClick={renderC1}/&gt; ); } }); function renderC2 () { React.render( &lt;C2 /&gt;, document.getElementById('mount-point')); } var Circle = React.createClass({ styler: { width: "100px", height: "100px", mozBorderRadius: "50%", webkitBorderRadius: "50%", borderRadius: "50%", background: 'hotpink' }, componentWillMount: function() { if (this.props &amp;&amp; this.props.background &amp;&amp; this.props.background !== this.styler.background) { this.styler.background = this.props.background; } }, render: function() { return ( {/* tried adding key, ref and id, but does not reuse element */} &lt;div onClick={this.props.onClick} style={this.styler}&gt;&lt;/div&gt; ); } }); renderC1();
upvote count: 3
answer count: 1
has title: Why doesn't React cache html elements of child components?
accepted answer: http://stackoverflow.com/a/34424197
linked to: http://stackoverflow.com/q/21109361
tagged with: reactjs
type: AnsweredQuestion
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/46847734
favorite count: 0

http://stackoverflow.com/a/29245657
has body: If you want the images to be called correctly, it is best to start with / (instead of ../) and understand that it is starting at your root web directory. So the correct location might be: slides.push({ image: '/images/img' + newWidth, text: ['More','Extra','Lots of','Surplus'][slides.length % 4] + ' ' + ['Cats', 'Kittys', 'Felines', 'Cutes'][slides.length % 4] });
answers question: http://stackoverflow.com/q/29244547
score: 0
accepted answer of: http://stackoverflow.com/q/29244547
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/q/29253081
tagged with: javascript
has answer: http://stackoverflow.com/a/29254144
has comment: http://stackoverflow.com/comment/46710387
has title: Using toDataUrl on a canvas result in SecurityError in IE
downvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/46710801
favorite count: 0
tagged with: http://stackoverflow.com/tag/svg
tagged with: d3.js
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46709979
has comment: http://stackoverflow.com/comment/46710486
linked to: http://stackoverflow.com/q/4809194
score: 1
upvote count: 1
has body: Hi I am in need of converting an svg generated by d3.js into a png.This is requried because we are sending our page html to the server that is then passed to ABCPDF and then convert to a pdf file. We absolutely must support IE9+ the latest version of chrome and latest version of firefox.This is what I have so far: var canvas = document.createElement("canvas"); canvas.setAttribute("width", 360); canvas.setAttribute("height", 460); var ctx = canvas.getContext("2d"); var DOMURL = self.URL || self.webkitURL || self; var img = new Image(); var svg = new Blob([svgString], { type: "image/svg+xml;charset=utf-8" }); var url = DOMURL.createObjectURL(svg); img.onload = function () { ctx.drawImage(img, 0, 0); var png = canvas.toDataURL("image/png"); $('#main-chart').append('&lt;img src="' + png + '"/&gt;'); $('#main-chart svg').remove("svg"); DOMURL.revokeObjectURL(png); }; img.src = url; Now this solution works very well on chrome and firefox but for IE it does not work. When canvas.toDataURL("image/png") gets called a Security error gets thrown. From what I managed to find online is that this happens because IE does not support CORS when calling toDataUrl(). Has anyone managed to find a work around to this issue? I have seen other similar questions asked at stackoverflow but could not find one with a solution.
has comment: http://stackoverflow.com/comment/46711036
type: Question
has comment: http://stackoverflow.com/comment/46710718
linked to: http://stackoverflow.com/q/20322745
has comment: http://stackoverflow.com/comment/46743523

http://stackoverflow.com/comment/46812709
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29309409
has text: [Scope and 'this'](http://toddmotto.com/everything-you-wanted-to-know-about-javascript-scope)

http://stackoverflow.com/comment/46753708
score: 0
comment on: http://stackoverflow.com/a/29263563
type: AnswerComment
type: Comment
has text: thanks for point out the bugs in the system design:-) i have also had to exchange the `extendDeep` to `extendDeepArrayOverwrite` (so its working in nested structures..) i use the extendDeep thing to load a config from a text/json file and want to 'overwrite' the old internal data.

http://stackoverflow.com/comment/46862657
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29326111
has text: the problem that I'm having seems to be that I can't get the generated unique key that firebase makes for each entry in the array. I am trying to use the auth object to match which user is logged in with their data in the database, but the auth object doesn't contain "JIZ4VPSfzPNvpnPvlli" for the example user posted above. If I had access to that key from the user logging in, getting the data would be much easier. Maybe I am just looking at this the wrong way, though.

http://stackoverflow.com/q/29252813
type: Question
has comment: http://stackoverflow.com/comment/46709465
tagged with: javascript
tagged with: jquery
has body: Ok i have two select2 input fields and when i change the value of the first select2 input field, i want to be able to trigger the data that shud be in the 2nd select2 input field. this is my two select2 fields in index.html.erb &lt;%= f.input_field :lender_id, collection: Lender.all.pluck(:code, :id), class: 'form-control legal-service lender_field_code', prompt: 'Please Select Banker', disabled: (f.object.new_record? ? false : true ) %&gt; &lt;%= f.input_field :banker_id, collection: Banker.joins(:lenders).where("locked_at is null AND approved = true AND organizations.code = ?", params[:lender_id_code]).order(name: :asc), class: 'form-control legal-service lender_field_name ', prompt: 'Please Select', id: "banker_id" %&gt; the first select2 input field has a list of codes e.g ('AFG') and the 2nd select2 has a list of names 'Someone name'. I already have the code to call the names only under the specific code but i need my code my page to trigger the response. So when i select AFG only the names relating to AFG shud show up in my javascript file i have the following code $.get('/loan_applications/_lawyer_fields', function(data) { $('.lender_field_name').html(data); });
score: 0
has title: javascript bind data of select2 input onchange event of another select2 input field rails
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29253139
answer count: 1
type: UnansweredQuestion
tagged with: ruby-on-rails

http://stackoverflow.com/q/29257743
has comment: http://stackoverflow.com/comment/46718382
favorite count: 0
tagged with: scope
has answer: http://stackoverflow.com/a/29257890
has answer: http://stackoverflow.com/a/29258725
has comment: http://stackoverflow.com/comment/46718141
has body: I'm not sure if this is possible or not, but I drop here a sample of what I would like to achieve: (function() { function A() {} function B() {} var funcs = /* how do I get both A and B programatically? */; })(); Both A and B aren't accessible by accessing window and this inside of the self-invoked function. I know I can add properties A and B to this inside the self-invoked function and this solves the issue, but I was wondering if there's a way to retrieve them with named functions. Update I believe that the issue is very clear: I wanted to know if I can get scoped named functions without explictly using the module pattern. At the end of the day, I'm looking to validate that I'm missing nothing and there's no way to programatically obtain syntactically-scoped named functions.
possible better answer: http://stackoverflow.com/a/29257890
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29257969
has comment: http://stackoverflow.com/comment/46717973
has comment: http://stackoverflow.com/comment/46718122
has title: Get parsed functions in a given JavaScript scope
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/46732454
type: Question
has comment: http://stackoverflow.com/comment/46733293
has comment: http://stackoverflow.com/comment/46718067
tagged with: javascript
has comment: http://stackoverflow.com/comment/46732050
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/29257969
tagged with: function

http://stackoverflow.com/comment/46763356
comment on: http://stackoverflow.com/q/29282782
type: Comment
type: QuestionComment
score: 8
has text: Use JSON, use a real JSON parser, and use real parsed objects. Don't make up your own serialization.

http://stackoverflow.com/q/29335689
has body: I have to write a function that will create an array filled with the indicated number of objects that represent three "types" of these objects. WITHOUT using for or while loop and not doing that manually? I don't know how can I add these objects into the array. I'm choosing the type of object by random, but how can I add them to the array? these are the objects: var bestaccount=function(){ var amount=0; this.pay=function(howmuch){amount+=howmuch;}; this.widthdraw=function(howmuch){amount-=howmuch;}; this.saldo=function(){return amount;}; }; var toGive= function(){ var amount=0; this.pay=function(howmuch){amount+=howmuch;}; this.saldo=function(){return amount;}; }; var toWithdraw=function(){ var amount=0; this.withdraw=function(howmuch){amount-=howmuch;}; this.saldo=function(){return amount;}; }; For example there are 3 toWithdraw objects, 1 bestAccount and 1 toGive. I want them all in one array. EDIT: Sorry, I was using completely wrong functions. If anyone needs it, I'm doing it with apply(). Here's the code: function fillArrayWithNumbers(n) { arr = Array.apply(null, Array(n)); tabl= arr.map(function (x, i) { return new objects[Math.floor(Math.random()*objects.length)](); }); return tabl; } Sorry, but no stress guys. Everyone started somehow.
has comment: http://stackoverflow.com/comment/46859751
has comment: http://stackoverflow.com/comment/46859984
type: Question
has comment: http://stackoverflow.com/comment/46859840
has answer: http://stackoverflow.com/a/29335763
upvote count: 0
tagged with: arrays
tagged with: javascript
has comment: http://stackoverflow.com/comment/46859768
answer count: 2
downvote count: 4
has comment: http://stackoverflow.com/comment/46859956
has comment: http://stackoverflow.com/comment/46859924
has comment: http://stackoverflow.com/comment/46859923
has comment: http://stackoverflow.com/comment/46859748
has answer: http://stackoverflow.com/a/29336331
favorite count: 0
type: UnansweredQuestion
score: -4
has comment: http://stackoverflow.com/comment/46859740
has comment: http://stackoverflow.com/comment/46860421
has title: How to add new objects to an array

http://stackoverflow.com/a/29344096
has comment: http://stackoverflow.com/comment/46875898
has comment: http://stackoverflow.com/comment/46878668
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46879011
downvote count: 0
has comment: http://stackoverflow.com/comment/46878685
has comment: http://stackoverflow.com/comment/46879378
has body: Anyway, not considering the logic behind the selection of multiple tables my approach would be to store selections in hidden input fields and at the end construct from the hidden fields the query. &lt;input type="hidden" value="" name="hiddenTables" id="hiddenTables" /&gt; fill field according to selections in your function from above: $("input:checkbox[name='tbl[]']:checked").each(function () { tbls.push($(this).val()); if($('#hiddenTables').val() == ""){ $('#hiddenTables').val($(this).val()); }else{ $('#hiddenTables').val($('#hiddenTables').val()+','+$(this).val()); } }); At the end create your query: // hidden field for field selection, same as above. var fieldselection = '*'; if($('#hiddenFieldselection').val() != ""){ fieldselection = $('#hiddenFieldselection').val(); } $("#qryView &gt; p").html("SELECT " + fieldselection + " FROM " + $('#hiddenTables').val()); This needs to be adjusted the way you need it of course and I haven't tested any of this... So that's up to you :-)
type: Answer
answers question: http://stackoverflow.com/q/29342558
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/46875161
accepted answer of: http://stackoverflow.com/q/29342558
has comment: http://stackoverflow.com/comment/46878755

http://stackoverflow.com/comment/46694813
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29233852
type: AnswerComment
has text: No, that's a typo. It ought to be called filteredMessages (I renamed it half-way through). Feel free to edit my post, I am on mobile right now and can't fix it until tomorrow.

http://stackoverflow.com/a/29264433
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46735534
accepted answer of: http://stackoverflow.com/q/29264124
has comment: http://stackoverflow.com/comment/46734324
has body: I think what you are missing is the parameter for the referenced element in the each function. HTML Track 1 sp1 Play 1 Track 2 sp1 Play 2 Track 3 sp1 Play 3 Track 4 sp1 Play 4 Move Track Here Change The Click Event JS $(function () { $("#tracks").children(":not(.placeholder)").each(function (index, elem) { var cElem = $(elem).children().eq(1); $(cElem).click(function () { alert("before: " + $(cElem).text()); }); }); }); $("#changeIt").click(function () { $("#tracks").children(":not(.placeholder)").each(function (index, elem) { var cElem = $(elem).children().eq(1); $(cElem).attr('onclick', '').unbind('click'); $(cElem).click(function () { alert("after: " + $(cElem).text()); }); }); }); Edit for selecting button inside HTML Track 1 sp1 Play 1 Track 2 sp1 Play 2 Track 3 sp1 Play 3 Track 4 sp1 Play 4 Move Track Here Change The Click Event JS $(function () { $("#tracks").children(":not(.placeholder)").each(function (index, elem) { var cElem = $(elem).children().eq(1).children().eq(0); $(cElem).click(function () { alert("before: " + $(cElem).text()); }); }); }); $("#changeIt").click(function () { $("#tracks").children(":not(.placeholder)").each(function (index, elem) { var cElem = $(elem).children().eq(1).children().eq(0); $(cElem).attr('onclick', '').unbind('click'); $(cElem).click(function () { alert("after: " + $(cElem).text()); }); }); });
has comment: http://stackoverflow.com/comment/46733856
answers question: http://stackoverflow.com/q/29264124
type: Answer
has comment: http://stackoverflow.com/comment/46736032
score: 1
has comment: http://stackoverflow.com/comment/46732785
upvote count: 1
has comment: http://stackoverflow.com/comment/46735148
has comment: http://stackoverflow.com/comment/46733955
has comment: http://stackoverflow.com/comment/46753599
has comment: http://stackoverflow.com/comment/46734927
has comment: http://stackoverflow.com/comment/46735455

http://stackoverflow.com/comment/47918351
type: AnswerComment
score: 0
type: Comment
has text: Sorry, I was waiting for other answers but I suppose other answers are not going to come.
comment on: http://stackoverflow.com/a/29309101

http://stackoverflow.com/a/29237102
has body: Based on what the OP appears to be trying to do this should be the Javascript: $(".mailing-list").click(function(e) { e.preventDefault(); if ($(".mailing-list-input").css('display') === 'block') { $(".mailing-list-input").css('display', 'none'); } else { $(".mailing-list-input").css('display', 'block'); } }); The click handler callback takes an argument that is the event object, you can call preventDefault on that object to stop the event from continuing through its lifecycle. Then if you want the link to toggle the element on every click you check to see if the element is visible or not and set its value accordingly. Here is a working fiddle
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29236798

http://stackoverflow.com/comment/46990030
type: QuestionComment
has text: I was reading the source code to help explain it -- can setup to explore that a little...
score: 0
comment on: http://stackoverflow.com/q/29364326
type: Comment

http://stackoverflow.com/comment/46817149
comment on: http://stackoverflow.com/q/29311760
has text: Why do you need the define the same function multiple times?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46675650
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29234494
has text: what do you mean by "Based on element.isReserved, I need to change an element in html."? what is your desired output?

http://stackoverflow.com/q/29287886
type: UnansweredQuestion
score: 1
upvote count: 1
has body: I am currently using Fullpage.js to make my website. I would like to include a lightbox in one of the sections, however when I try to load the script and the css, my fullpage breaks and all the sections collapse into each other. I've tried putting the script in the actual section as well. I've included the header section that I currently have, and what I thought would be correct. Is there any way to use both at the same time? Thanks! <DOCTYPE html> What is a Furry?
has title: How do I get FullPage and Lightbox to work at the same time?
has answer: http://stackoverflow.com/a/29293009
type: Question
tagged with: lightbox
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: fullpage.js
tagged with: css

http://stackoverflow.com/comment/46714170
comment on: http://stackoverflow.com/q/29255652
has text: Do you need to shuffle the arrays themselves? You could shuffle an array of question indices, and then look up the corresponding question, choice and answer at ask time. Or e.g. combine the question, choices and answers for each question into a simple structure to keep them all together? You could then shuffle in one go using your method here.
type: Comment
type: QuestionComment
score: 2

http://stackoverflow.com/q/29279706
favorite count: 0
has body: I'm editing a countdown clock but unsure how to set the future date in javascript. The example set's it for the next New Years. I need to set it as a fixed date, 27th April 2015. // Grab the current date var currentDate = new Date(); // Set some date in the future. In this case, it's always Jan 1 var futureDate = new Date(currentDate.getFullYear() + 1, 0, 1); // Calculate the difference in seconds between the future and current date var diff = futureDate.getTime() / 1000 - currentDate.getTime() / 1000; I'm just unsure how to set the future date correctly to be the 27 April 2015. Thanks! Matt
accepted answer: http://stackoverflow.com/a/29279758
has answer: http://stackoverflow.com/a/29280038
has title: Setting Javascript Date in future
type: AnsweredQuestion
upvote count: 0
possible better answer: http://stackoverflow.com/a/29279774
has answer: http://stackoverflow.com/a/29279758
type: Question
has comment: http://stackoverflow.com/comment/46757332
tagged with: javascript
score: -1
has answer: http://stackoverflow.com/a/29279774
answer count: 3
has comment: http://stackoverflow.com/comment/46757454
downvote count: 1

http://stackoverflow.com/a/29323143
has comment: http://stackoverflow.com/comment/46837325
has comment: http://stackoverflow.com/comment/46837262
score: 0
has comment: http://stackoverflow.com/comment/46837481
has comment: http://stackoverflow.com/comment/46837351
type: Answer
has comment: http://stackoverflow.com/comment/46837226
has comment: http://stackoverflow.com/comment/46837310
has body: You need to use .value for HTML inputs. As seen here: Getting value of HTML text input document.getElementById('email').value; or Document.getelementbyid("userFile").value = filepath
answers question: http://stackoverflow.com/q/29323082

http://stackoverflow.com/q/29327539
accepted answer: http://stackoverflow.com/a/29339928
downvote count: 1
has comment: http://stackoverflow.com/comment/46866780
type: Question
has title: Async load angular controllers and factories
upvote count: 0
tagged with: webpack
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/46845070
has comment: http://stackoverflow.com/comment/46847618
tagged with: browserify
answer count: 1
has answer: http://stackoverflow.com/a/29339928
has comment: http://stackoverflow.com/comment/46853730
favorite count: 0
tagged with: angularjs
has body: I am building an angular app. The app has grown too large and my index,html is bombarded with 80+ javascript files. I bundled and minified JS files but loading all the script files at app startup is not a good idea. How could I load scripts only when they are required?
tagged with: requirejs
type: AnsweredQuestion

http://stackoverflow.com/comment/57875431
type: AnswerComment
comment on: http://stackoverflow.com/a/29317607
type: Comment
has text: if you want to keep for example 10years time()+60*60*24*365*10. For cookie specification read more Here http://www.faqs.org/rfcs/rfc2965.html
score: 0

http://stackoverflow.com/q/29333550
tagged with: javascript
has answer: http://stackoverflow.com/a/29334096
has title: Javascript: triggering button on keydown
linked to: http://stackoverflow.com/q/10541606
score: 0
has comment: http://stackoverflow.com/comment/46856028
accepted answer: http://stackoverflow.com/a/29334096
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/46857980
linked to: http://stackoverflow.com/q/2490825
has comment: http://stackoverflow.com/comment/46857992
type: AnsweredQuestion
has body: I'm building a musical e-learning thing, and wish to trigger an input button using the keyboard, which will play an assigned note. Just like a piano! Except this one will make your ears bleed, but that's beside the point. The onclick() itself works when pressing the button manually, but binding to the keyboard is proving difficult. HTML: &lt;input type="button" id="pgC" value="C" onClick="pgC()"&gt; &lt;input type="button" id="pgCsharp" value="C#" onClick="pgCsharp()"&gt; Script to bind to keyboard: $(function() { $(document).keydown(function(e) { switch (e.keyCode) { case 65: $('#pgC')[0].onclick(); break; case 87: $('#pgCsharp')[0].onclick(); break; } }); }); Which I attempted to modify from this: Binding Keyboard to Onclick Event My understanding is that $('#pgC')[0].onclick(); should find the assigned id, and trigger the onclick based on which key is pressed, in this case a lower case "a". Any and all help is greatly appreciated! :D
has comment: http://stackoverflow.com/comment/46856065
tagged with: keydown
type: Question

http://stackoverflow.com/comment/56567210
comment on: http://stackoverflow.com/a/29347299
type: Comment
has text: This solution is not working in firefox's latest version. Any way to fix it?
score: 0
type: AnswerComment

http://stackoverflow.com/comment/46708736
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29252079
has text: Thanks a lot.BTW I searched on this topic there are many answers/solutions so why others getting the solution but not mine?Even I also tried this > $("#home").load("YummyjQueryMobile145.html"); but still not success.Where to learn on these topics?What is the perfect online site other than w3schools?

http://stackoverflow.com/q/29323600
has body: I am programming a web application to draw charts of given mathematic function and want to determine whether it has an infinite number of solution for Y axis. So let's say I have a function like this: y = sin(x)*x When drawing a chart, X value is moving, so what I get is a graphical representation of a given function within chart area. But I want to determine whether the function continues to infinity or not. Is there any way to do it? I know that it's possible by calculating a limit to infinity of that function, yet I haven't found anything relevant about calculating it using any programming language on the internet.
tagged with: javascript
has comment: http://stackoverflow.com/comment/46838480
has comment: http://stackoverflow.com/comment/46838182
score: 0
has comment: http://stackoverflow.com/comment/46846580
answer count: 1
has answer: http://stackoverflow.com/a/29324575
has comment: http://stackoverflow.com/comment/46838044
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46838075
has title: JavaScript - determine whether mathematic function is infinite
has comment: http://stackoverflow.com/comment/46846075
tagged with: math
has comment: http://stackoverflow.com/comment/46841346
type: Question
tagged with: function

http://stackoverflow.com/a/29316133
type: Answer
has body: The problem is how is are creating the id for the dynamic elements. You are using numeric subtraction along with string concatenation like element2.id="wall"+rowCount-2+"2"; which is wrong. You need to separate the numerical computation out as a separate unit, else "wall"+rowCount will get processed with will give wall2 then 'wall2' - 1 will be NaN since one operand is not a number so the end result will be something like NaN2 element2.id="wall"+(rowCount-2)+"2"; Since you are using the rowCount-2 value in multiple places, use a variable var idCounter = rowCount - 2; then element0.id = "wall" + idCounter + "0"; Demo: Fiddle
answers question: http://stackoverflow.com/q/29316008
upvote count: 1
score: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29316008
downvote count: 0

http://stackoverflow.com/a/29258414
has body: You can simplify using scrollTop(). Change your javascript to this instead: $(window).scroll(function(){ if( $(window).scrollTop() &gt; 0){ $('#nav_space').animate({top:'20px'},200); } else { $('#nav_space').animate({top:'-3px'},200); } });
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29258317

http://stackoverflow.com/q/29312732
tagged with: javascript
linked to: http://stackoverflow.com/q/29250950
has comment: http://stackoverflow.com/comment/46820138
favorite count: 0
has comment: http://stackoverflow.com/comment/46819064
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29321580
has comment: http://stackoverflow.com/comment/46821554
has comment: http://stackoverflow.com/comment/46819460
has comment: http://stackoverflow.com/comment/46821030
linked to: http://stackoverflow.com/q/1823612
has comment: http://stackoverflow.com/comment/46819881
has body: In the ECMAScript grammar specification for Javascript, there are blocks defined with a double colon like this: Literal :: NullLiteral BooleanLiteral NumericLiteral StringLiteral RegularExpressionLiteral And blocks defined with a single colon like this: PrimaryExpression : this Identifier Literal ArrayLiteral ObjectLiteral ( Expression ) And, even blocks with a triple colon: uriCharacter ::: uriReserved uriUnescaped uriEscaped What is the difference between the single and double and triple colons?
has title: What is difference between : and :: and ::: in Javascript grammar
has comment: http://stackoverflow.com/comment/46821076
score: 11
has comment: http://stackoverflow.com/comment/46819013
has comment: http://stackoverflow.com/comment/46820222
type: Question
has answer: http://stackoverflow.com/a/29312907
has comment: http://stackoverflow.com/comment/46833669
has comment: http://stackoverflow.com/comment/46837238
upvote count: 11
answer count: 2
tagged with: grammar
has comment: http://stackoverflow.com/comment/46818933
has comment: http://stackoverflow.com/comment/46819632
downvote count: 0

http://stackoverflow.com/comment/46868761
has text: Here edit button is within the publishtable() function.
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/29340487
type: Comment

http://stackoverflow.com/q/29293167
has answer: http://stackoverflow.com/a/42546502
has body: I have 3 inputs for every div container (e.g. first-section, second-section ...), and I have several such div containers on my page, similar to this: ... First Section ... Second Section ... how can I use jQuery to move from input1 to input2 to input3 (not shown) to input4 (not shown) only after the user has entered the maxlength of input which is set to 3? My jQuery below does not work because when I move onto the third input (not shown), it keeps resetting the focus back to input 2. $(':input').keyup(function(e){ if($(this).val().length==$(this).attr('maxlength')){ $(this).nextAll(':input').first().focus(); if($('#input1').val().length==$('#input1').attr('maxlength')){ $('#input2').focus(); } } })
type: Question
tagged with: javascript
tagged with: jquery
answer count: 2
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has answer: http://stackoverflow.com/a/29293179
accepted answer: http://stackoverflow.com/a/29293179
possible better answer: http://stackoverflow.com/a/42546502
type: AnsweredQuestion
has title: Shifting jQuery focus to next div separated input
downvote count: 0
score: 1

http://stackoverflow.com/q/29335912
type: Question
has body: I'm doing server side rendering, and rendering the entire &lt;html/&gt; in react, including the &lt;head/&gt;. Do I have to lump all of the CSS for each view into one big file? Loading different view specific stylesheets by passing .css file locations as props into a &lt;head/&gt; react class seems like a good alternative, but how do I prevent styling conflicts when transitioning from one view to the next, since the styling for the old view will still linger in the browser?
tagged with: single-page-application
tagged with: css
has comment: http://stackoverflow.com/comment/46860133
upvote count: 1
tagged with: javascript
type: UnansweredQuestion
has title: React js: Single page app with different css for each view
tagged with: reactjs
answer count: 0
downvote count: 0
score: 1
favorite count: 0

http://stackoverflow.com/a/29251808
type: AcceptedAnswer
type: Answer
downvote count: 0
has body: First of all I think that you use pos property in wrong way. It's observable so you should assign it in the following way: self.appendableData()[2].pos(2); and in your filter function correct retrieving the value: return item.pos() &gt;= 0; Additionally I suggest you to use knockout-projections library (https://github.com/SteveSanderson/knockout-projections) - it's more efficient: self.appendableDataToView = self.appendableData.fitler(function (item) { return item.pos &gt;= 0; });
score: 1
answers question: http://stackoverflow.com/q/29251006
accepted answer of: http://stackoverflow.com/q/29251006
upvote count: 1

http://stackoverflow.com/a/29242338
type: Answer
answers question: http://stackoverflow.com/q/29242094
score: 1
accepted answer of: http://stackoverflow.com/q/29242094
has body: As comments have stated, it's designed for use for en masse assignment / object extension. It actually does a fair amount more - for example, you can define a function to customise values as they are assigned. Note also _.extend(...) is an alias to this method. Lodash docs for your reference https://lodash.com/docs#assign The advantage over plain Javascript is... the plain Javascript is written and optimised for you :) aka convenience with a little DRY mixed in for good measure.
upvote count: 1
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/29266827
type: Question
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: playback
has title: How does google music continue to play when back button is pressed?
favorite count: 0
has body: I noticed that Google Play Music continues to play music even when the back button is pressed. This surely reloads the page? I'm curious as to how the music continues to play during a page reload. Also, does Music use AngularJS?
type: UnansweredQuestion
tagged with: google-play
has answer: http://stackoverflow.com/a/33845580
upvote count: 1
tagged with: refresh
score: 1

http://stackoverflow.com/q/29317839
type: Question
tagged with: ecmascript-6
has body: I'm the author of a graph datastructure library for JavaScript. I'm currently ES6-ifying the library. I also want to make it more usable for ES6 programmers, which means implementing the iterable protocol. But a graph has multiple things to iterate over, and multiple ways to iterate over them (vertices, edges, successors, predecessors, vertices in topological order, etc.) I have an idea of how to design this interface, but I'd like to follow existing conventions if they exist. Here's an example of how I might do the 'vertices' part: class JsGraph { // ... get vertices() { return { _graph: this, get length() { return this._graph._vertexCount }, *[Symbol.iterator]() { var keys = Object.keys(this._graph._vertices); for (let i = 0; i &lt; keys.length; ++i) { yield [keys[i], this._graph._vertices[keys[i]]]; } } }; } // ... } If there are any existng convention I should probably be following (or any problems with this code), your feedback would be much appreciated.
tagged with: javascript
tagged with: iterable
has title: Conventions for ES6 iterables?
downvote count: 0
answer count: 1
favorite count: 0
type: UnansweredQuestion
tagged with: conventions
score: 1
upvote count: 1
has answer: http://stackoverflow.com/a/29318469

http://stackoverflow.com/a/29380140
type: Answer
has body: If you want to do this operation for each script file you have to write a system plugin and implement the function onBeforeCompileHead(). In this function you need something like that: /** * possible implementation of onBeforeCompileHead * to make all the scripts async. */ public function onBeforeCompileHead() { $document = JFactory::getDocument(); foreach ($document-&gt;_scripts =&gt; $url) { $document-&gt;_scripts[$url]['async'] = true; } } Instead if you want just make the js of your application or of your template use JDocument::addScript(); like that : /** * Possible implementation to insert a async script in a component or a module. * @see JDocument::addScript($url, $type = "text/javascript", $defer = false, $async = false) */ $document = JFactory::getDocument(); $document-&gt;addScript('/media/system/js/sample.js', "text/javascript", false, true);
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/29355868
upvote count: 2

http://stackoverflow.com/comment/46922986
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29316663
has text: Hi Charles, This didn't work for me.. :( Could you please share the code that worked for you..??

http://stackoverflow.com/comment/46734710
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29266306
has text: This removes my old drawing strokes. How would I keep the previous markings?

http://stackoverflow.com/a/36059103
has body: you can first get all the records selected in the grid currently by doing : $scope.rowsSelected = $scope.gridApi.selection.getSelectedRows(); now we can get the length of this array using : $scope.countRows = $scope.rowsSelected.length; based on $scope.countRows&gt;0 or 0 you can enable or disable a button using ng-disabled = "countRows"
score: 4
upvote count: 4
downvote count: 0
answers question: http://stackoverflow.com/q/29247032
type: Answer
has comment: http://stackoverflow.com/comment/82815786

http://stackoverflow.com/comment/46844400
comment on: http://stackoverflow.com/q/29327001
score: 0
type: Comment
type: QuestionComment
has text: I updated the code in the question.

http://stackoverflow.com/q/29313564
upvote count: 0
has answer: http://stackoverflow.com/a/29325372
tagged with: callback
favorite count: 0
linked to: http://stackoverflow.com/q/14220321
has body: I have this function in my node js application. I give it the user's location in latitude and longitude, a radius, and a keyword to search. There is an node module named googleplaces that I've been using to pass these value to the GooglePlace API. function placesRequest(radius, lat, lon, keyword){ var conductor = new googlePlaces(googlePlacesAPIKey, "json"); var parameters = { radius: radius, location:[lat, lon], types:"restaurant", query:keyword }; conductor.placeSearch(parameters, function(error, response) { if (error) throw error; console.log(response.results) //for debugging if(response.status=="ZERO RESULTS") return "{results:0}"; return response.results; }); } I'm still relatively new to node js and I've been looking up on how to modularize the functions, but I'm not entirely sure how it works. The furthest I've gotten was rewriting the function separately. Is there a quick way of retrieving the response.results data or should I just curl the request?
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/23667086
has answer: http://stackoverflow.com/a/29313659
tagged with: node.js
has comment: http://stackoverflow.com/comment/46820278
downvote count: 2
type: Question
has comment: http://stackoverflow.com/comment/46820275
has title: Returning value from callback function in node
score: -2
tagged with: javascript
has comment: http://stackoverflow.com/comment/46820290
answer count: 2

http://stackoverflow.com/comment/46813571
type: Comment
has text: Ah... I got it now.. lemme check
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/29309556

http://stackoverflow.com/comment/46925545
score: 0
has text: The most likely reason for the script to suddenly stop is that you have a syntax error there somewhere that, when encountered, halts the script. Keep the browser's JavaScript error console open so that you'll see the errors it throws.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29372234

http://stackoverflow.com/a/29218644
type: AcceptedAnswer
has body: You placed call of navGrid method on the wrong place. You have block $(function () {...}); which meany document ready event handler. You placed call of navGrid method out of the block. It's wrong. You should mode it one line above (directly after the call of setFrozenColumns) to fix the problem.
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/29218574
score: 1
accepted answer of: http://stackoverflow.com/q/29218574
has comment: http://stackoverflow.com/comment/46647063
upvote count: 1
has comment: http://stackoverflow.com/comment/46647419
has comment: http://stackoverflow.com/comment/46646682
has comment: http://stackoverflow.com/comment/46647345

http://stackoverflow.com/q/29325942
tagged with: unit-testing
type: Question
tagged with: phantomjs
tagged with: javascript
score: 0
answer count: 1
linked to: http://stackoverflow.com/q/18368262
has answer: http://stackoverflow.com/a/29982686
tagged with: angularjs
has title: Why does test fails while browsers doesn't testing AngularJS apps?
accepted answer: http://stackoverflow.com/a/29982686
type: AnsweredQuestion
has body: The last days I've been trying to test AngularJS 1.3.15 code. Today it is driving me nuts giving me errors that I can't reproduce on normal GUI browsers. First issue is with the current property of $route. The controller is as following: ... .controller('HomeCtrl', ['$route', function($route) { var user = $route.current.locals.user; ... The above will throw error while testing but it will note give any error on the browser. Tests Output In Chrome it fails! Chrome 41.0.2272 (Linux) Controller: HomeCtrl $controller.user should have an user FAILED TypeError: Cannot read property 'locals' of undefined at new &lt;anonymous&gt; (/home/lucio/chatbeats/app/app.js:26:28) In PhantomJS it fails! PhantomJS 1.9.8 (Linux) Controller: HomeCtrl $controller.user should have an user FAILED TypeError: Cannot read property 'locals' of undefined at new &lt;anonymous&gt; (/home/lucio/chatbeats/app/app.js:26:28) Browsers output In Chrome it works! In Firefox it works! In Chromium it works! Second issue is with $scope. To check that the previous problem is not caused by a bad handled asynchronous call (as mentioned here), I've tried to set a listener with $scope.$on: ... .controller('HomeCtrl', ['$scope', '$route', function($scope, $route) { $scope.$on('$routeChangeError', function() { console.log($route.current); }); ... The test suite will not recognize $scopeProvider whilst the browser will. Tests Output In Chrome it fails! Chrome 41.0.2272 (Linux) Controller: HomeCtrl $controller.user should not have the user signed in FAILED Error: [$injector:unpr] Unknown provider: $scopeProvider &lt;- $scope &lt;- HomeCtrl http://errors.angularjs.org/1.3.15/$injector/unpr?p0=%24scopeProvider%20%3C-%20%24scope%20%3C-%20HomeCtrl In PhantomJS it fails! PhantomJS 1.9.8 (Linux) Controller: HomeCtrl should do something FAILED Error: [$injector:unpr] Unknown provider: $scopeProvider &lt;- $scope &lt;- HomeCtrl Browsers output In Chrome it works! In Firefox it works! In Chromium it works! NOTE: I ran both a…
tagged with: google-chrome

http://stackoverflow.com/comment/46758828
has text: ng-disabled="messge.length > 255"
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29280473
score: 1

http://stackoverflow.com/q/29292229
tagged with: image
has body: I have a javascript that calls a server-side script (PHP) that serves up requested images. There are parameters passed in for the user and image key. If the requested image does not exist I respond with a 404 error. If the image exists but the user does not have rights to access it, I respond with a 403 error. Here's a simplified code example... $img.error(function () { alert("Image not known or access denied."); }) .attr("src", "getimg.php?key=horse&amp;user=fred"); I'd like to give a different message depending on whether the problem is with the image key, or whether it is that the user does not have access. Is there some way that I can either access the HTTP error code returned, or the text returned within the response?
type: AnsweredQuestion
score: 2
accepted answer: http://stackoverflow.com/a/29316731
downvote count: 0
favorite count: 0
type: Question
upvote count: 2
has title: jQuery: Get detail of image loading error
has answer: http://stackoverflow.com/a/29316731
answer count: 1
tagged with: http
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/46656318
has text: @HashemQolami—it's still possible to select the content by starting the selection from outside the element. And in any reasonably modern browser I can inspect the element and copy the content from the inspector. Really, this sort of stuff is pointless.
score: 3
type: AnswerComment
comment on: http://stackoverflow.com/a/29222158
type: Comment

http://stackoverflow.com/comment/46887798
comment on: http://stackoverflow.com/q/29350845
has text: when you say you want to display the file and not the file name, do you mean you want the full path to be displayed too? because if so, that information is not available on the File object (security reasons)
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46809159
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29307498
has text: @nicael yes I can see that the control is coming at line `return column` and proceeding with the loop.

http://stackoverflow.com/a/29221986
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/46653055
answers question: http://stackoverflow.com/q/29221868
has body: Maybe take a look at "http://isotope.metafizzy.co/". It has a filter function, too.
has comment: http://stackoverflow.com/comment/46653273

http://stackoverflow.com/q/29327325
has answer: http://stackoverflow.com/a/29361712
tagged with: angularjs
has body: How to call angularjs function or controller from jquery I am new to this angularjs here is my function here i have to pass the var1 and var2 from jquery i have searched many articles but i cant understand. Please help me &lt;script type="text/javascript"&gt; function customersController($scope, $http) { $http.get("https://tic.com/testingservice/HttpService.svc/operator/var1/var2") .success(function (response) { $scope.names = response; }); }
has answer: http://stackoverflow.com/a/29327448
has answer: http://stackoverflow.com/a/29327440
possible better answer: http://stackoverflow.com/a/29361712
type: AnsweredQuestion
upvote count: 7
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/46844674
accepted answer: http://stackoverflow.com/a/29327440
has comment: http://stackoverflow.com/comment/46844726
has title: How to call angular js function controller from jquery in page
answer count: 3
has comment: http://stackoverflow.com/comment/46844640
tagged with: javascript
tagged with: jquery
score: 6
favorite count: 0

http://stackoverflow.com/a/29358581
has body: The following will open a new page when the drawn feature is clicked: map.on('draw:created', function (e) { var type = e.layerType, layer = e.layer; layer.on('click', function(){ window.open('http://www.example.com','_blank'); }); drawnItems.addLayer(layer); }); This will bind a popup with a url: map.on('draw:created', function (e) { var type = e.layerType, layer = e.layer; layer.bindPopup('example'); drawnItems.addLayer(layer); }); But not sure what you are after here exactly; you may want to add more information to the question. In general, the 'draw:created' callback is the place where you would add this functionality.
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46902753
accepted answer of: http://stackoverflow.com/q/29357814
type: Answer
answers question: http://stackoverflow.com/q/29357814
score: 3
upvote count: 3

http://stackoverflow.com/comment/46777735
has text: can you update the fiddle with the last code? i dont think it reflects your situation
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29264154

http://stackoverflow.com/q/29249913
type: Question
has answer: http://stackoverflow.com/a/29250408
has title: Adding Knockout Template at run time empties HTML DOM
tagged with: javascript
has comment: http://stackoverflow.com/comment/46704203
tagged with: jquery
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/29253365
tagged with: http://stackoverflow.com/tag/html
has body: Adding knockout templates at runtime empties the HTML DOM var templateEngine = new ko.nativeTemplateEngine(); templateEngine.addTemplate = function (templateName, templateMarkup) { document.write("
type: UnansweredQuestion
tagged with: dom
tagged with: knockout.js

http://stackoverflow.com/a/29324966
has body: You should probably be using the presence of words in both sentences as a high hint of similarity. A simple way of doing it is using each sentence as a bag of words and using tf-idf
has comment: http://stackoverflow.com/comment/46847484
has comment: http://stackoverflow.com/comment/47694009
has comment: http://stackoverflow.com/comment/46843157
upvote count: 1
has comment: http://stackoverflow.com/comment/47695293
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46845383
has comment: http://stackoverflow.com/comment/47694035
has comment: http://stackoverflow.com/comment/47694944
type: Answer
has comment: http://stackoverflow.com/comment/47695237
score: 1
has comment: http://stackoverflow.com/comment/47694294
accepted answer of: http://stackoverflow.com/q/29324937
answers question: http://stackoverflow.com/q/29324937
has comment: http://stackoverflow.com/comment/46904405

http://stackoverflow.com/q/29360727
type: UnansweredQuestion
has title: Return false /stop propagation from nested callback
has comment: http://stackoverflow.com/comment/46905471
type: Question
has comment: http://stackoverflow.com/comment/46905473
has comment: http://stackoverflow.com/comment/46906127
tagged with: javascript
has body: I have seen this question asked before, but have had no luck implementing the solutions in my own work. The page continues to jump to the top. first I have a listener: $('.edit-description').click(function(e) { e.stopPropagation(); contentContainer = $('#description'); openEditor(contentContainer); return false; }); then my openEditor function with the contained callback: function openEditor(contentContainer){ var contentType=contentContainer.data('value'); getRecentEdits(markid, entityType, contentType, function(data){ if (editArea){ hiddenContentArea.show(); editArea.hide(); } hiddenContentArea=contentContainer; contentContainer.hide(); editArea = $('&lt;div class="edit-container" style="padding-bottom: 10px;"&gt;' + ' &lt;textarea class="form-control js-auto-size" style="margin-bottom:5px;"&gt;'+ data[0].content+ ' &lt;/textarea&gt;' + ' &lt;a class="right leave-editor"&gt;&lt;i class="fa fa-times-circle"&gt;&lt;/i&gt;Leave Editor&lt;/a&gt;'+ ' &lt;button type="button" class="btn btn-sm btn-custom-green submit-edit pull-right right " style="color:#fff;padding-top:5px; background-color: #3D8A11; border: 1px solid #f2f2f2;"&gt;&lt;i class="fa fa-check-circle"&gt;&lt;/i&gt;Submit&lt;/button&gt;'+ '&lt;/div&gt;'); for(i = 0; i &lt; data.length; i++){ /** var fileLink = '&lt;a href="#"&gt;'+data[i].username+'&lt;/a&gt;'; editArea.prepend(fileLink);**/ console.log(data[i]); } var parent=contentContainer.parents("p"); parent.after(editArea); $('textarea.js-auto-size').textareaAutoSize(); if (contentType==1){ $('.edit-container').prepend('&lt;div style="color:red;"&gt;Note: &amp;nbsp;The description area should contain only facts. Opinions and reviews can be posted on the board below.&lt;/div&gt;'); } return false; }); return false; } and this gets called from within: function getRecentEdits(id, entityType, contentType, callback){ $.ajax({ type: "POST", url: "get_recent_edits.php", data: {id: id, entity_type:entityType, content_type:contentType}, dataType: "json", succes…
tagged with: callback
score: 0
tagged with: jquery-callback
answer count: 0

http://stackoverflow.com/q/29220569
possible better answer: http://stackoverflow.com/a/61758794
type: Question
has answer: http://stackoverflow.com/a/61758794
linked to: http://stackoverflow.com/q/19617996
answer count: 2
score: 5
tagged with: internet-explorer
has comment: http://stackoverflow.com/comment/46650107
upvote count: 5
has comment: http://stackoverflow.com/comment/46650626
has answer: http://stackoverflow.com/a/29228549
tagged with: javascript
tagged with: ajax
has comment: http://stackoverflow.com/comment/46650539
accepted answer: http://stackoverflow.com/a/29228549
has title: Direct uploading to AWS S3 : SignatureDoesNotMatch only for IE
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/46650473
tagged with: node.js
type: AnsweredQuestion
has body: I use Amazon Web Service S3 to upload and store my files. I generate a pre signed url with AWS Sdk for Node.js server-side to upload directly files from browser thanks to this pre signed url. How it works Server-side I have a method wich returns the pre-signed url. AWS.config.loadFromPath(__dirname + '/../properties/aws-config.json'); AWS.config.region = 'eu-west-1'; //Credentials are loaded var s3 = new AWS.S3(); var docId = req.query.doc; var params = { Bucket: res.locals.user.bucketId, Key: docId+"."+req.query.fileExtension, ACL : "bucket-owner-read", ContentType : req.query.fileType }; s3.getSignedUrl('putObject', params, function (err, url) { if(url){ res.writeHead(200); var result = { AWSUrl : url }; //Generates pre signed URL with signature param res.end(JSON.stringify(result)); } } I upload directly my file to S3 client-side var loadToAWSS3 = function(url, file, inputFileId){ var data = new FormData(); data.append('file', file); $.ajax({ url: url,//url getted from server-side method type: 'PUT', data : data, headers: { 'Content-Type': file.type }, processData: false, xhr: function() { var myXhr = $.ajaxSettings.xhr(); if(myXhr.upload){ myXhr.upload.addEventListener('progress',function(e){ if(e.lengthComputable){ var max = e.total; var current = e.loaded; var percentage = (current * 100)/max; //stuff to handle progress... } }, false); } return myXhr; }, statusCode: { 200: function () { //some stuff } }); } Chrome &amp; Firefox behaviors Works as expected, the pre signed url is getted, then the file is uploaded, I can see it in my AWS S3 console. Lovely IE 11 SignatureDoesNotMatch error ! IE add some extra stuff to Content-Type request header not expected by AWS which causes error in the signature comparison. Server-side, the Sdk generates signature based on : ContentType : req.query.fileType //(something like application/pdf) whereas when I inspect the request with IE debugger, I see Content-Type application/pdf, multipart/form-data; boundary=----------------…
tagged with: amazon-s3

http://stackoverflow.com/comment/46845481
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29327721
has text: on what line you get this error?
score: 0

http://stackoverflow.com/q/29358227
type: Question
has title: Change, add, remove content to iframe that contains other domain
tagged with: javascript
has comment: http://stackoverflow.com/comment/46900845
has comment: http://stackoverflow.com/comment/46900992
score: 0
tagged with: jquery
has comment: http://stackoverflow.com/comment/46900868
has comment: http://stackoverflow.com/comment/46900864
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/364952
has body: I have an iframe that looks like this: &lt;iframe id="feed" width="100%" height="100%" frameborder="0" src="http://foo.com/bar"&gt;&lt;/iframe&gt; I want to change styles, remove and add elements to the iframe I tried using this: function iframeRef(frameRef) { return frameRef.contentWindow ? frameRef.contentWindow.document : frameRef.contentDocument } var inside = iframeRef(document.getElementById('feed')); var elem = inside.createElement('p'); elem.style.zIndex = '2'; elem.style.position = 'absolute'; elem.innerHTML = 'TEXT'; inside.body.appendChild(elem); But it doesn't work, how can I manipulate the DOM from the iframe?
answer count: 0
has comment: http://stackoverflow.com/comment/46901003
tagged with: iframe

http://stackoverflow.com/q/29314150
score: 0
has comment: http://stackoverflow.com/comment/46821239
answer count: 1
has title: Why this javascript is not returning the restaurant name?
has comment: http://stackoverflow.com/comment/46821258
has comment: http://stackoverflow.com/comment/46822926
has comment: http://stackoverflow.com/comment/46867661
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/38156260
linked to: http://stackoverflow.com/q/29298260
has comment: http://stackoverflow.com/comment/46821301
has body: Address query https://maps.googleapis.com/maps/api/place/textsearch/json?query=restaurant+in+kolkata&amp;key=API_KEY RESTAURANT JSON LIST { "html_attributions" : [ "Listings by \u003ca href=\"http://www.indiacom.com/\"\u003eIndiacom Yellow Pages\u003c/a\u003e" ], "next_page_token" : "CuQB2wAAALbNaxylA2QNB4pNRsjUxIOYwTSnii1OIwvXqiCPM3736kQZGJ4sEKthpVgvUkskg0ebaLbeE1iNbNKnO7N__X_FpsGprU3o4scQ5aZuUcroSkZVhuWOKvxWHA9IYVXhFmqrVsgG9mjinq-RvANuV6oKzcvnXK09GvdZR0Xp-HINbfoakOVR0TsoOFNCw4UIWrihFSXPJOXeNtTYuImUrPkYKZVt-Y8xMKxr_aOvRR7L0PfcAcXPpSBB2IugIh2K3ESUGMypJD8EuPW1rqqvvYXcMqqHp8iWzq9h1-ytSFl8EhDn2tzr7gU7AkcPORFyLXuiGhSG1bFqUIK2yQb6_fhN-nbym8c17Q", "results" : [ { "formatted_address" : "No. 26,Next To Museum,Sudder Street, New Market Area, Jawaharlal Nehru Road, Kolkata, West Bengal 700016, India", "geometry" : { "location" : { "lat" : 22.558687, "lng" : 88.350889 } }, "icon" : "http://maps.gstatic.com/mapfiles/place_api/icons/restaurant-71.png", "id" : "68f2d647334cdaa6a4063c86347252f5a6ebe4c1", "name" : "Zaranj", "opening_hours" : { "open_now" : false, "weekday_text" : [] }, "place_id" : "ChIJ24Jtvqd3AjoRFb_Bd8Il8Cw", "rating" : 4.2, "reference" : "CmRZAAAA9-XMiEF-hYPFZh9kaOBwXQ6R-60XStrKsOEkThALaaeHHmJv6kvEd2JWCh7F9XU9XwyNaNRj6KZQkgGEvhhD8qTIs2fiH-Cng5kmlbIpuQLzQGFgQ8dgnvmL2U1-Uz3REhBb9bJSg-t8S8GDpGUGqlsSGhQnqUVV75IG_AFtVpeV4Xpg2YeTmA", "types" : [ "restaurant", "food", "establishment" ] }, JS //Get Restaurant list function getRestaurants() { var search=$("#search").val(); var prestring="restaurant+in+"; var jsonRList="https://maps.googleapis.com/maps/api/place/textsearch/json?query="+prestring+search+"&amp;key=API_KEY"; alert(jsonRList);//returning the address correctly $.getJSON(jsonRList, function (data1) { var Rname=data1.results[0].name; alert(Rname);//returning nothing }); } Why this javascript is not returning the restaurant name?(testing first one results[0]) What is the wrong in it? alert(Rname);//returning nothing
has comment: http://stackoverflow.com/comment/46869817
has comment: http://stackoverflow.com/comment/46870217
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/46869544
type: Question
has comment: http://stackoverflow.com/comment/46821231
linked to: http://stackoverflow.com/q/29339921
has comment: http://stackoverflow.com/comment/46870274
tagged with: javascript

http://stackoverflow.com/a/29318117
score: -1
answers question: http://stackoverflow.com/q/29317797
downvote count: 1
has body: instead of using on mouseenter, use change like so: $(".InfoBox").change(function(){ InfoBoxHovered = true; }); example jsfiddle: http://jsfiddle.net/rec2Ltsm/
type: Answer
upvote count: 0

http://stackoverflow.com/comment/46894602
has text: @Adjit It's unnecessary when you're creating elements with jQuery.
type: Comment
score: 0
comment on: http://stackoverflow.com/a/29354676
type: AnswerComment

http://stackoverflow.com/comment/46663248
has text: @EdenSource : Can you please elaaborate?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29227850

http://stackoverflow.com/comment/46748545
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/29257428
type: Comment
has text: I see you accepted an answer, so it is resolved, isn't it?

http://stackoverflow.com/a/29330922
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29330786
has body: Add this to your button, and it will work fine type='button'

http://stackoverflow.com/comment/46924873
has text: just try to ensure that your directory is pointing in the right place, before doing a relative path like you have, start with a full path (C:\...\angular.min.js) and work your way down.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29362765
type: Comment

http://stackoverflow.com/comment/46717137
comment on: http://stackoverflow.com/a/29244844
has text: No, just looking at it now again. It seems to be going to the removedata.php script but that itself does not delete the intended row. I'm just looking at another way, by sending the lat and lon of the map marker and using them instead of id
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/46912962
has text: Usually they are fired in a document.ready() - and it's not working then - but for demonstration I used the console.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29337254

sequelize.js
type: Tag
tags question: http://stackoverflow.com/q/29233896
tags question: http://stackoverflow.com/q/29256086
tag name: sequelize.js
tags question: http://stackoverflow.com/q/29238155
tags question: http://stackoverflow.com/q/29298799
tags question: http://stackoverflow.com/q/29259135

http://stackoverflow.com/a/29381963
has body: Your req.body.videoSourceUrl may be defined and of type string, but it's probably empty. I can reproduce your error by doing: request.get("") .on('response', function(){ }) .on('error', function(){ }) I'd also think about dumping assert-plus, as: var ass = require('assert-plus'); ass.string(new String("yes"), "no"); throws
downvote count: 0
type: Answer
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/29355195

http://stackoverflow.com/a/29317272
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29317216
has body: Change this: alert(jQuery(".featured_preview img").attr("src"‏);); // note the extra semi colon By: alert(jQuery(".featured_preview img").attr("src"‏));
has comment: http://stackoverflow.com/comment/46826966

http://stackoverflow.com/comment/46773743
comment on: http://stackoverflow.com/q/29287388
type: Comment
type: QuestionComment
has text: Well.. Alright. Thanks.. I guess.
score: 1

http://stackoverflow.com/comment/46875634
comment on: http://stackoverflow.com/a/29343844
has text: No.. Sorry, I missed that. `var myvar;function somefn(){myvar="abcde"}var mylist = ["a", "b", "c"] for (i = 0; i < mylist.length; i++) {console.log(myvar);}`
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/29336004
tagged with: http://stackoverflow.com/tag/html
has title: check all checkboxes javascript
tagged with: checkbox
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46860316
has comment: http://stackoverflow.com/comment/46860378
accepted answer: http://stackoverflow.com/a/29336072
upvote count: 1
has comment: http://stackoverflow.com/comment/46860274
downvote count: 1
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/46860446
score: 0
has answer: http://stackoverflow.com/a/29336072
answer count: 1
has body: I'm trying to have all checkboxes checked (true) when the user clicks on "All" button. I tried this, firstly just to see if "Anglais" could be checked clicking on "All" : &lt;input type="checkbox" name="anglais" id="anglais" value="Anglais" /&gt; Anglais &lt;input type="checkbox" name="allemand" id="allemand" value="Allemand" /&gt; Allemand &lt;input type="checkbox" name="espagnol" id="espagnol" value="Espagnol" /&gt; Espagnol &lt;input type="checkbox" name="francais" id="francais" value="Francais" /&gt; Francais &lt;input type="checkbox" onclick="checkedAll()" name="all" id="all" value="Tous" /&gt; Tous My Javascript : function checkedAll () { var checked = false; var all = document.getElementById('all'); if (checked == false) { checked = true } else { checked = false } var ang = document.getElementById('anglais').checked if (ang == true) { ang.checked = true; } But the button(s) are not checked when I click on All. I think I don't understand exactly how to use the .checked method.. Maybe, some of my code has not logic, because it was from this example : https://www.hscripts.com/scripts/JavaScript/select-all-checkbox.php
favorite count: 0

http://stackoverflow.com/comment/46922694
score: 0
type: Comment
type: QuestionComment
has text: Well.. i think i've found a way.. (2 try!). I've placed a some.php file outside the root folder and created not button, but the tag with a href="../some.php" .. I think that now user can only add this var to $_SESSION only by clicking on that tag.. Correct me if i'm wrong 2.
comment on: http://stackoverflow.com/q/29369769

http://stackoverflow.com/comment/46810891
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29305824
has text: Not sure what you mean by "extend" here. For what you're trying to do, you'd have to modify the D3 source code, which you can do of course and then you can make any changes you like.

http://stackoverflow.com/comment/46713416
type: QuestionComment
has text: @AlaaA.F. What is that function? Can you give me some references?
comment on: http://stackoverflow.com/q/29254989
score: 0
type: Comment

http://stackoverflow.com/comment/46913096
has text: i have a very few experience now with cakephp,lot of things are unclear. Thats why i need to ask a bit.Thank you so much your help
comment on: http://stackoverflow.com/q/29357668
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29218880
tagged with: asp.net-mvc-4
has title: Move controller method to client side using javascript
score: 0
has comment: http://stackoverflow.com/comment/46646806
accepted answer: http://stackoverflow.com/a/29236343
has comment: http://stackoverflow.com/comment/46646945
has comment: http://stackoverflow.com/comment/46646852
has comment: http://stackoverflow.com/comment/46646851
has comment: http://stackoverflow.com/comment/46647717
tagged with: c#
has body: Trying to move a controller method to client side, not knowing where to start. Could anyone help me with this. In the controller method, I am getting the count of some active items from the database using entity framework. Method: public LocationModel GetActiveChasesCountByLocation(string locationKey) { try { string _stateName = string.Empty; Suit_2013SQLEntities context = BusinessUtils.GetQshrDBContext(_stateName); BusinessUtils.ConfigureDbContextForDataLoad(context); var location = from loc in context.Locations.Include("Providers").Include("HRChases") where loc.LocationKey == locationKey select new LocationModel { LocationKey = loc.LocationKey, LocationName = loc.LocationName, LocationCity = loc.LocationCity, LocationState = loc.LocationState, IsActiveChaseExists = loc.Providers.Any(p =&gt; p.HRChases.Any(c =&gt; c.ChaseStatus == "A" || c.ChaseStatus == "Q")) ? "Active" : "In Active", ActiveChaseCount = loc.Providers.Count() &gt; 0 ? loc.Providers.Sum(p =&gt; p.HRChases.Count(c =&gt; c.ChaseStatus == "A" || c.ChaseStatus == "Q")) : 0 }; return location.FirstOrDefault&lt;LocationModel&gt;(); } catch (Exception ex) { throw ex; } } Can anyone please help!
tagged with: javascript
has comment: http://stackoverflow.com/comment/46646883
has comment: http://stackoverflow.com/comment/46678698
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46647567
has answer: http://stackoverflow.com/a/29236343
type: Question
answer count: 1

http://stackoverflow.com/q/29244383
has comment: http://stackoverflow.com/comment/46694928
has title: Button in modal not working
has answer: http://stackoverflow.com/a/29246655
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46694908
score: 0
linked to: http://stackoverflow.com/q/18568278
tagged with: ruby-on-rails-4
has comment: http://stackoverflow.com/comment/46694728
has comment: http://stackoverflow.com/comment/46694790
answer count: 1
tagged with: twitter-bootstrap
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46695075
has comment: http://stackoverflow.com/comment/46694660
has comment: http://stackoverflow.com/comment/46694864
has body: I'm trying to create a modal that confirms that you really want to delete a user. Everything seems to work except for when you click on the the '#confirm' button within the modal. The form for the button that was originally clicked on should be submitted but it is not happening. It doesn't appear that the on('click') for #confirm is be fired because I cannot see my log message either. _actions.html.slim span.member_action.create = link_to 'Add New User', new_account_member_path(@account), class: "btn add-user" #group_member_actions span.member_action.reset = link_to 'Reset Password', '#', class: 'btn' span.member_action.clone = link_to 'Clone', '#', class: 'btn' span.member_action.delete = submit_tag 'Delete', class: 'btn delete-white' /! Modal Dialog #confirmDelete.modal.fade aria-hidden="true" aria-labelledby="confirmDeleteLabel" role="dialog" .modal-dialog .modal-content .modal-header button.close aria-hidden="true" data-dismiss="modal" type="button" &amp;times; h4.modal-title | Delete User .modal-body p | Are you sure you want to delete this user? .modal-footer button.btn.btn-default data-dismiss='modal' type='button' Cancel button#confirm.btn.btn-danger type='button' Delete javascript: $('#confirmDelete').on('show', function() { $('#confirm').on('click', function(){ console.log('you clicked confirm'); $('#delete-member').submit(); }); }); $('.delete-white').on('click', function(e){ e.preventDefault(); $('#confirmDelete').data('id', $(this).data('id')).modal('show'); }); css: .modal.in .modal-dialog { margin: 10% auto;} index.html.slim = form_tag remote_destroy_account_members_path(@account), id: 'delete-member', method: :delete do = render partial: 'shared/users_title', locals: { hide_user_nav: false }
tagged with: slim-lang
has comment: http://stackoverflow.com/comment/46695152
type: Question

http://stackoverflow.com/comment/46806459
has text: @Yarin hmm hard to say. But from your code you try to use ace editor module. Why is important to use require? You load the script anyway in header of your html if I'm now wrong.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29305889

http://stackoverflow.com/comment/46772696
comment on: http://stackoverflow.com/a/29286804
score: 1
type: AnswerComment
has text: it would be better written $('.instagram_grid').find('.first') ;)
type: Comment

http://stackoverflow.com/comment/46785265
type: Comment
has text: Actually on more thought, this might not work for me. It seems I would have to set my "selected" value in the actual Array which means a page with 100 Task records could not simply re-use the Array as the selected option would be part of the array...unless I am doing it wrong?
type: AnswerComment
comment on: http://stackoverflow.com/a/29290440
score: 0

http://stackoverflow.com/comment/46753646
type: QuestionComment
comment on: http://stackoverflow.com/q/29276206
has text: SubmissionKey is not set
score: 0
type: Comment

http://stackoverflow.com/q/29329698
score: 1
has answer: http://stackoverflow.com/a/29329859
type: Question
tagged with: javascript
tagged with: memory
upvote count: 1
answer count: 1
tagged with: game-engine
downvote count: 0
favorite count: 0
has title: HTML5 Memory Game - JavaScript function
has body: HTML5 Memory Game has a JavaScript function to check image matches. Whenever the first match is made, the check() function stops the document from selecting other images for more matches. How should I add another parameter to the check() function to look for more matches? Check out the source code: MEMORY MATCHES : 0
accepted answer: http://stackoverflow.com/a/29329859
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion

http://stackoverflow.com/comment/46835749
comment on: http://stackoverflow.com/a/29322150
type: AnswerComment
score: 0
has text: You could use $.fn.text() instead of $.fn.html(). text() will only get the inner text without the HTML elements. Furthermore simply try removing the img from the response: $('img', request.source).remove():
type: Comment

http://stackoverflow.com/comment/47453467
score: 0
has text: Just to check - are you unbinding things afterwards? It's a big memory leak otherwise. With touch support : http://codepen.io/Shikkediel/pen/ZYbWzL?editors=001
type: Comment
comment on: http://stackoverflow.com/q/29351277
type: QuestionComment

http://stackoverflow.com/q/29242621
has comment: http://stackoverflow.com/comment/46691283
has comment: http://stackoverflow.com/comment/46895556
has answer: http://stackoverflow.com/a/29977029
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29977029
tagged with: grunt-contrib-jasmine
has body: I just recently downloaded grunt with 2 packages on my linux machine. Grunt-contrib-jasmine for command line jasmine unit testing. Guide I followed: https://github.com/gruntjs/grunt-contrib-jasmine Grunt-template-jasmine-Istanbul for code coverage. Guide I followed: https://github.com/maenu/grunt-template-jasmine-istanbul I found my whole grunt folder to be quite massive and I was wondering if there was any way to slim it down. I have in my top level node_modules folder the packages: grunt, grunt-contrib-jasmine and grunt-template-jasmine-Istanbul. I've tried deleting files I thought were redundant but it seems that most libraries are needed even if repeated. I'll post my GruntFile encase it will be of any help: module.exports = function(grunt) { grunt.initConfig({ jasmine: { coverage: { src: 'src/*.js', options: { specs: 'spec/*Spec.js', helpers: 'spec/*Helper.js', vendor: ['lib/jquery.js', 'lib/angular.js', 'lib/angular-touch.js', 'lib/angular-route.js', 'lib/angular-cookies.js', 'lib/ui-bootstrap.js', 'lib/jasmine-jquery.js', 'lib/angular-mocks.js'], template: require('grunt-template-jasmine-istanbul'), templateOptions: { coverage: 'coverage/coverage.json', report: { type: 'cobertura', options: { dir: 'coverage/cobertura' } }, thresholds: { lines: 50, statements: 50, branches: 50, functions: 50 } } } } } }); // Register tasks. grunt.loadNpmTasks('grunt-contrib-jasmine'); // Default task. grunt.registerTask('default', 'jasmine'); }; Any help is appreciated. EDIT: File path too long because of recurring node_modules doesn't allow jenkins to build.
has title: Reduce size of grunt with packages on linux. File paths too long for Jenkins
has comment: http://stackoverflow.com/comment/46895328
type: Question
tagged with: javascript
tagged with: gruntjs
has comment: http://stackoverflow.com/comment/46717111
score: 0
answer count: 1
tagged with: jasmine
tagged with: linux

http://stackoverflow.com/comment/46765915
type: Comment
has text: As Adeel said, it's not working in 100%. I realise it's dependent on browser interpretation of an email type. Nevertheless, I appreciate your answer and will definitely use this in future. Thanks!
comment on: http://stackoverflow.com/a/29283824
type: AnswerComment
score: 0

http://stackoverflow.com/comment/46789442
score: 0
comment on: http://stackoverflow.com/q/29295730
type: Comment
type: QuestionComment
has text: @ezpura can you please give example? I read about collection but still can't understand its existence..

http://stackoverflow.com/comment/46846711
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29316731
has text: Yes, the request will be fired twice. I'm not entirely certain, but as many image preloaders use a similar construction I do believe this method will allow the image to be cached.
score: 0

selectors-api
tag name: selectors-api
type: Tag
tags question: http://stackoverflow.com/q/29314823

http://stackoverflow.com/q/29344977
accepted answer: http://stackoverflow.com/a/29364821
has comment: http://stackoverflow.com/comment/46877082
tagged with: geolocation
tagged with: maps
downvote count: 1
has comment: http://stackoverflow.com/comment/46905619
type: Question
has title: Selecting Polygon on Google Maps V3
upvote count: 5
tagged with: javascript
score: 4
tagged with: google-maps-api-3
tagged with: google-maps
has body: My project is to create a zone management module for a online business. The business owner / admin can create new zones by drawing them as POLYGONS on a google map. I am able to draw polygons, select between them fetch the coordinates and save them without any problem. However when i try to fetch the existing coordinates stored in the database and draw them on screen, they get rendered properly, but i am not able to select them. I have been using google's code samples to test out the functionality. The Code i am using to draw existing coordinates is var triangleCoords = [ new google.maps.LatLng(25.774252, -80.190262), new google.maps.LatLng(18.466465, -66.118292), new google.maps.LatLng(32.321384, -64.75737), new google.maps.LatLng(25.774252, -80.190262) ]; // Construct the polygon. bermudaTriangle = new google.maps.Polygon({ paths: triangleCoords, strokeColor: '#FF0000', strokeOpacity: 0.8, strokeWeight: 2, fillColor: '#FF0000', fillOpacity: 0.35 }); bermudaTriangle.setMap(map); } google.maps.event.addDomListener(window, 'load', initialize); The Code i am using for Drawing Polygons on the screen using the Drawing Manager is also from a Google sample function initialize() { var map = new google.maps.Map(document.getElementById('map'), { zoom: 10, center: new google.maps.LatLng(22.344, 114.048), mapTypeId: google.maps.MapTypeId.ROADMAP, disableDefaultUI: true, zoomControl: true }); var polyOptions = { strokeWeight: 0, fillOpacity: 0.45, editable: true }; // Creates a drawing manager attached to the map that allows the user to draw // markers, lines, and shapes. drawingManager = new google.maps.drawing.DrawingManager({ drawingMode: google.maps.drawing.OverlayType.POLYGON, markerOptions: { draggable: true }, polylineOptions: { editable: true }, rectangleOptions: polyOptions, circleOptions: polyOptions, polygonOptions: polyOptions, map: map }); google.maps.event.addListener(drawingManager, 'overlaycomplete', function(e) { if (e.type != google.maps.drawing.OverlayType.MA…
has answer: http://stackoverflow.com/a/29364821
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/46880452
has comment: http://stackoverflow.com/comment/46916283
has comment: http://stackoverflow.com/comment/46880158
type: AnsweredQuestion

http://stackoverflow.com/comment/46782490
has text: Well some proper indention wouldnt hurt I guess. Also you may want to use objects to represent your boxes and use a loop to iterate over a list of them.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29292467

http://stackoverflow.com/comment/46847605
comment on: http://stackoverflow.com/q/29328766
score: 0
type: Comment
type: QuestionComment
has text: you can't reparse them in the way you are trying to do if you are looking to transform it to datetime format 0000-00-03 00:00:00 cause unix timestamp begins in 00:00:00 1 January 1970 UTC unless you are looking to make it in the string type

http://stackoverflow.com/q/29325642
linked to: http://stackoverflow.com/q/201323
answer count: 3
tagged with: email
has comment: http://stackoverflow.com/comment/46841989
favorite count: 0
has answer: http://stackoverflow.com/a/29326858
has answer: http://stackoverflow.com/a/29326761
type: UnansweredQuestion
has body: I've following regular expression: ([A-Za-z0-9.-])\@([a-zA-Z0-9-]{1,63})(.([A-Za-z]{2,6})) and validate test@gamil.com and test@gamil as well. While it must validate test@gmail.com and the email with the sub-domain. Any help is there to make me correct.
tagged with: regex
downvote count: 2
has comment: http://stackoverflow.com/comment/46841981
type: Question
upvote count: 0
has answer: http://stackoverflow.com/a/29366981
score: -2
tagged with: javascript
has title: Regular Expression not validating the complete email address

http://stackoverflow.com/q/29226881
type: Question
has comment: http://stackoverflow.com/comment/46661440
answer count: 1
has comment: http://stackoverflow.com/comment/46661300
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46662384
has title: Triggering change event still use the old event handler
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29270562
has comment: http://stackoverflow.com/comment/46661209
has body: When i load the page, change event handler is triggered. The original change event handler is called instead of new handler, after the page is loaded, it uses correct handler. How can i make it use the new handler on triggering? HTML S1 Apple Orange S2 White Blue JS $(document).ready(function () { $('.test').each(function () { var doc = this; $(doc).on('change', '.b1', function(ev){ alert('this should not run'); }); $('ul', doc).each(function () { $('.b1', this).first().trigger('change'); }); $(doc).off('change', '.b1'); $(doc).on('change', '.b1', function(ev){ alert('new change handler'); }); }); });

http://stackoverflow.com/q/29250093
tagged with: highcharts
tagged with: jquery-tooltip
tagged with: jquery
has comment: http://stackoverflow.com/comment/46710737
has comment: http://stackoverflow.com/comment/46712486
has comment: http://stackoverflow.com/comment/46708214
tagged with: jquery-ui-tooltip
has body: I have used area stacked Highchart in my application. This is my FIDDLE I have converted the y axis values by place the below code in y axis - labels, but unable to format the tooltip to the same % values formatter: function(){ return Math.round(100*this.value / $(this.axis.tickPositions).last()[0]) + '%'; } But when I tried to apply the same for tool tip, the tooltip itself went invisible. How to apply the percentage to tool tip also. I have tried the below code. tooltip: { shared: false, formatter: function() { var text = ''; var pcnt = (this.y / dataSum) * 100; text = this.x + ' : '+ Highcharts.numberFormat(pcnt) +' M'; return text; } }, Thanks in advance
has comment: http://stackoverflow.com/comment/46713700
has comment: http://stackoverflow.com/comment/46713238
answer count: 0
type: UnansweredQuestion
has title: Custom tooltip for area stacked Highchart
has comment: http://stackoverflow.com/comment/46707785
has comment: http://stackoverflow.com/comment/46750338
has comment: http://stackoverflow.com/comment/46707296
tagged with: javascript
type: Question
score: 0
has comment: http://stackoverflow.com/comment/46709333
has comment: http://stackoverflow.com/comment/46704638

http://stackoverflow.com/comment/46835077
has text: Whats the for (; i--;) bit?
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29321939

http://stackoverflow.com/a/29238055
has comment: http://stackoverflow.com/comment/46686403
upvote count: 1
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/29237805
has body: You are looking for getMonth() and getDay() on the date object. $(document).ready(function() { var pDate = new Date(); var pHour = pDate.getHours(); var pMonth = pDate.getMonth(); var pDay = pDate.getDay(); if // show only the first month and first day between 10 and 17 hours of the day ((pHour &gt;= 10) &amp;&amp; (pHour &lt; 17) &amp;&amp; pMonth == 1 &amp;&amp; pDay == 1) { $(".button5").show(); } });
answers question: http://stackoverflow.com/q/29237805
downvote count: 0
score: 1

http://stackoverflow.com/comment/46690809
type: QuestionComment
comment on: http://stackoverflow.com/q/29241872
has text: @duskwuff I used the same timestamp from the example but I didn't get the same signature that is given? Am I doing something wrong?
score: 0
type: Comment

http://stackoverflow.com/a/29345715
score: 0
has body: "element" acts as the local variable reference to the current item in the loop, while "this" would refer to the selector's reference.
answers question: http://stackoverflow.com/q/29345663
type: Answer

http://stackoverflow.com/q/29266405
has answer: http://stackoverflow.com/a/29344095
tagged with: visual-studio
score: 1
upvote count: 1
type: Question
tagged with: javascript
has body: I had this output: no more information and I don't know what's my error. 1&gt;------ Rebuild All started: Project: Sac.Mobile, Configuration: Debug Android ------ 1&gt; GeneratedJavascript=scripts\test.js;scripts\test.js.map;scripts\test.js;scripts\test.js.map 1&gt; C:\ECS\G4S Mobile Native\Sac.Mobile.Native.G4S\Sac.Mobile&gt;call "C:\Program Files (x86)\nodejs\"\nodevars.bat 1&gt; Your environment has been set up for using Node.js 0.10.33 (ia32) and npm. 1&gt; ------ Ensuring correct global installation of package from source package directory: C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 12.0\COMMON7\IDE\EXTENSIONS\3DTNB2Y2.WZI\packages\vs-mda ========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ========== Does anybody have an idea?
has comment: http://stackoverflow.com/comment/46737440
answer count: 1
downvote count: 0
favorite count: 0
tagged with: visual-studio-cordova
has title: Why my Cordova project does't compile?
type: UnansweredQuestion

http://stackoverflow.com/a/29493561
score: 1
answers question: http://stackoverflow.com/q/29338867
downvote count: 0
has comment: http://stackoverflow.com/comment/47169094
has body: You haven't specified the editing type that you are using. Which type are you using: inline, batch or popup ? Is only this the datasource ? I see no update function. I suggest you take a look at the three demos. Batch Inline Popup The worst thing is that you haven't specified the value of the property editable. By default it is false, that means the kendoGrid is not editable, even if you have specified editable: true over your model fields. Shortcut to "Editable" configuration update #2 : As already said here If the data source is bound to a remote service (via the transport option) the data method will return the service response. So, when you use dataSource.data() method on your grid, if you haven't updated correctly your datasource, you should receive all "old" data. (I found strange that you get blank value over those properties, maybe a cache problem) As I already said, your dataSource doens't provide no update function. Here you are an example about the configuration of the update function in kendo dataSource, with request to remote service. Suggest you to look on both examples: Example - specify update as a string and Example - specify update as a function
type: Answer
upvote count: 1

http://stackoverflow.com/comment/46922752
has text: Hi Charkan, this didn't work for me. Do you have a working example?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29346141
type: AnswerComment

http://stackoverflow.com/comment/46874073
type: Comment
type: QuestionComment
has text: can you try to log the value like `console.log(this, $(this).css("background-color"))` to see what is returned
comment on: http://stackoverflow.com/q/29343776
score: 0

http://stackoverflow.com/comment/46833581
type: Comment
has text: So when I pull stuff in via an http request the items come across as this `Object {id: "2", create_time: "2015-03-23 01:10:46", update_time: "2015-03-23 01:10:46", name: "Soda", price:"3.99"}`. But when I then try to push that item to a different array of objects it changes its formatting so then it becomes `{"id":"1","name":"Soda","price":"3.99","create_time":"2015-03-23 01:48:50","update_time":"2015-03-25 23:29:41"}` , so it appears as though it is making everything into string values....am I understanding that right? Would stripping the quotes from around the keys make it function right?
comment on: http://stackoverflow.com/a/29319132
score: 0
type: AnswerComment

http://stackoverflow.com/comment/46792403
comment on: http://stackoverflow.com/a/29298516
type: AnswerComment
score: 0
type: Comment
has text: thnks dear..bt could i used that count variable directly with other operations like i want to calculate page size so var page_size = count / limit ; is this fine

http://stackoverflow.com/comment/46696715
type: Comment
type: QuestionComment
has text: so `apiNames` is a string?
comment on: http://stackoverflow.com/q/29245552
score: 0

http://stackoverflow.com/q/29356916
has answer: http://stackoverflow.com/a/29357010
type: Question
tagged with: javascript
tagged with: jquery
score: 2
tagged with: http://stackoverflow.com/tag/html
answer count: 1
downvote count: 0
accepted answer: http://stackoverflow.com/a/29357010
favorite count: 0
upvote count: 2
has body: I am trying to create dynamic divs onClick of a button, but I also want to make the newly added divs to be draggable. How I can achieve this functionality? HTML Drag me around Drag me around Drag me around Javascript $(function() { $( "#draggable" ).draggable(); $( "#draggable-2" ).draggable(); $( "#draggable-3" ).draggable(); }); What I want to do is that I need to create the divs dynamically on a click and apply the same draggable functionality to them
tagged with: draggable
has title: How to dynamically generate a div and make it dragable
type: AnsweredQuestion

http://stackoverflow.com/comment/46806180
score: 3
type: AnswerComment
comment on: http://stackoverflow.com/a/29304814
type: Comment
has text: $.post is just a wrapper around $.ajax. You should give an example of how to add the actual callback to the call.

http://stackoverflow.com/a/29354998
type: Answer
has body: You have to use a nested loop (as others have suggested). Also when creating elements using jQuery - you don't have to specify both opening and closing tags - $("<elem />") works nicely.. Snippet: $(function () { var go = $("#go"); var cols = $("#columns"); var rows = $("#rows") go.click(function () { var numRows = rows.val(); var numCols = cols.val(); var table = $(" "); var head = $(" "); var row = $(" "); // build header var headRow = row.clone(); for (var i = 0; i < numCols; i++) { var th = $(" "); th.append(i); headRow.append(th); } table.append(headRow); // build table for (var j = 0; j < numRows; j++) { var addRow = row.clone(); for (var k = 0; k < numCols; k++) { var cell = $(' '); cell.css({"border":"solid 2px teal"}); cell.append(" R:" + j + " |C:" + k + " "); addRow.append(cell); } table.append(addRow); } $('body').append(table); }); }); Rows: Columns: Go!
score: 0
answers question: http://stackoverflow.com/q/29354514

prototype
tags question: http://stackoverflow.com/q/29298746
tags question: http://stackoverflow.com/q/29350078
tags question: http://stackoverflow.com/q/29284356
tag name: prototype
tags question: http://stackoverflow.com/q/29288386
tags question: http://stackoverflow.com/q/29302817
type: Tag
tags question: http://stackoverflow.com/q/29309317
tags question: http://stackoverflow.com/q/29264138
tags question: http://stackoverflow.com/q/29265806
tags question: http://stackoverflow.com/q/29269039

http://stackoverflow.com/comment/46897518
comment on: http://stackoverflow.com/q/29355864
score: 0
type: QuestionComment
type: Comment
has text: I believe u're bootstrapWizard js file is not complete, try downloading another version.

http://stackoverflow.com/comment/46870525
has text: @Vohuman That's just it. I get an empty array.
score: 0
comment on: http://stackoverflow.com/q/29341687
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29242820
favorite count: 0
tagged with: backbone.js
has title: App using Backbone.js and Underscore.js
accepted answer: http://stackoverflow.com/a/29244483
has comment: http://stackoverflow.com/comment/46693266
has comment: http://stackoverflow.com/comment/46693540
has comment: http://stackoverflow.com/comment/46692676
has body: I am a beginner in Backbone and Underscore. So here's the javascript I made . It's about to add bookmarks and make them be showed so that means using models and views from Backbone. But I got a problem I guess, cuz when running nothing happens, so if anyone could point out my errors?? Thanks in advance. This is ann.js and after it's index.html var app = app || {}; app.Bookmark = Backbone.Model.extend({ defaults: { key : 'Unknown', value : 'Example', lien : 'http://www.example.com' } }); app.Ensbookmark = Backbone.Collection.extend({ model : app.Bookmark }); app.BookmarkView = Backbone.View.extend({ tagName: 'div', template: $('#bookmarkTemplate').html(), events :{ 'click .delete': 'delBookmark' }, delBookmark:function(){ this.model.destroy(); this.remove(); }, render: function(){ var tmp1 = _.template(this.template); this.$el.html(tmp1(this.model.toJSON())); return this; /* this.$el.html(this.template(this.model.attributes)); return this; */ } }); app.EnsbookmarkView = Backbone.View.extend({ el:$( '#bookmarks' ), initialize: function(initialBookmarks){ this.collection = new app.Ensbookmark(initialBookmarks); this.render(); this.listenTo(this.collection, 'add', this.renderBookmark); }, events:{ 'click #add':'addBookmark' }, addBookmark: function (e){ e.preventDefault(); var data = {}; $('#addBookmark div').children('input').each(function(i,el){ if($(el).val()!==""){ data[el.id]=$(el).val(); } }); this.collection.add(new app.Bookmark(data)); }, render: function() { this.collection.each(function (item) { this.renderBookmark(item); }, this); }, renderBookmark:function(item){ var BookmarkView = new app.BookmarkView({ model: item }); this.$el.append(BookmarkView.render().el); } }); var appTest = new app(); Web Id : Titre : Lien : Add
possible better answer: http://stackoverflow.com/a/29244024
has comment: http://stackoverflow.com/comment/46693151
has comment: http://stackoverflow.com/comment/46693424
has answer: http://stackoverflow.com/a/29244024
upvote count: 1
type: Question
type: AnsweredQuestion
tagged with: underscore.js
has comment: http://stackoverflow.com/comment/46693402
score: 1
has comment: http://stackoverflow.com/comment/46693024
has comment: http://stackoverflow.com/comment/46693527
has answer: http://stackoverflow.com/a/29244483
has comment: http://stackoverflow.com/comment/46691736
answer count: 2
downvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/46681810
comment on: http://stackoverflow.com/q/29237862
has text: The text **should** be in a text tag at the least anyway. Text nodes are the worst.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29228830
answers question: http://stackoverflow.com/q/29228769
upvote count: 4
downvote count: 0
score: 4
has body: Change your regex like below. ^[0-9a-f]{1,2}([\.:-])[0-9a-f]{1,2}(?:\1[0-9a-f]{1,2}){4}$ case-insensitive modifier i heps to do a case-insensitive match. DEMO &gt; /^[0-9a-f]{1,2}([.:-])[0-9a-f]{1,2}(?:\1[0-9a-f]{1,2}){4}$/i.test('AA-BB.CC.DD.EE.FF') false &gt; /^[0-9a-f]{1,2}([.:-])[0-9a-f]{1,2}(?:\1[0-9a-f]{1,2}){4}$/i.test('AA.BB.CC.DD.EE.FF') true
type: Answer

http://stackoverflow.com/q/29267619
favorite count: 0
has title: Put router configuration in a separate file in Aurelia
tagged with: module
downvote count: 0
score: 6
has body: I am trying to take out router configuration from app.js file and put it in a separate file (app.router.js). This is probably an easy thing to do but I don't know how to do it. Current app.js file looks like this: import {Router} from 'aurelia-router'; export class App { static inject() { return [Router]; }; constructor(router) { this.router = router; // router - put this part in a separate file this.router.configure(config =&gt; { config.title = 'demo'; config.options.pushState = true; config.map([ // home routes { route: ['','home'], moduleId: './home/home', nav: true, title:'Home' }, // User routes { route: ['user/register'], moduleId: './user/register', nav: true, title:'User Registration'} ]); }); } } Once the configuration part is in a separate file, I believe I have call it like this in app.js: this.router.configure(myRouterConfig); Please let me know how to do it with code example.
type: AnsweredQuestion
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29267724
type: Question
tagged with: ecmascript-6
tagged with: aurelia
answer count: 1
upvote count: 6
has answer: http://stackoverflow.com/a/29267724

http://stackoverflow.com/comment/46877140
has text: Point taken - I will use jsfiddle the next time I post a question. Thanks!
comment on: http://stackoverflow.com/q/29345248
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29371471
has title: HTML form to POST data to MySQL
answer count: 1
has comment: http://stackoverflow.com/comment/60917113
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: node.js
tagged with: mysql
has answer: http://stackoverflow.com/a/29377099
type: Question
tagged with: javascript
has body: I'm trying to post data to an MySQL database by using Node.js. This is my htmlHTML form: form This is my form First name: Last name: And here is my MySQL.js: var mysql = require('mysql'); var connection = mysql.createConnection( { host : 'mysqlhost', port : '3306', user : 'myuser', password : 'mypassword', database : 'myuser' } ); connection.connect(); var query = connection.query('SELECT * FROM http://localhost:3000/index.html'); query.on('error', function(err) { throw err; }); query.on('fields', function(fields) { console.log(fields); }) query.on('result', function(row) { console.log(row); }); connection.end(); Is this even possible?
score: 0

http://stackoverflow.com/q/29234012
has answer: http://stackoverflow.com/a/29235138
accepted answer: http://stackoverflow.com/a/29235138
has body: Need to write selector to links in leaflet popup. I'm try something like this, but it's not work: L.marker([39.74, -104.99]).bindPopup("test").addTo(cities); $( document ).ready(function() { $('a[class=trigger-to-page]').click(function() { console.log("123"); }); }); http://jsfiddle.net/x52j9da7/4/ Can anyone help?
has title: leaflet: how to create selector to link in popup
type: AnsweredQuestion
tagged with: leaflet
type: Question
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0

http://stackoverflow.com/q/29317865
linked to: http://stackoverflow.com/q/19484940
type: Question
has comment: http://stackoverflow.com/comment/46827900
has title: AngularJS Karma Test Spec Promise not resolved and .then() not called
has body: I have a problem with AngularJS Karma Unit Testing a service. I have a service with a service method like this: service.getIntersectingElements = function (element, elements) { var deferred = $q.defer(); var tolerance = 20; var intersectingElements = []; $timeout(function () { for (var i = 0; i &lt; elements.length; i++) { if (element.$$hashKey != elements[i].$$hashKey) if (service.checkIntersection(element.Location, elements[i].Location, tolerance)) intersectingElements.push(elements[i]); } if (intersectingElements.length &gt; 0) deferred.resolve(intersectingElements); else deferred.reject(); }); return deferred.promise; }; It works fine if it is called by the controller. But I want to test that method, which returns a promise resolved later. I want to get the value resolved and compare it in the unit test. So I wrote the following karma test: it('should get the intersecting elements', function () { var element = {Id: 1, Name: 'Water', Location: {x: 200, y: 200}}; var elements = [{Id: 2, Name: 'Fire', Location: {x: 200, y: 200}}]; service.getIntersectingElements(element, elements).then(function (result) { expect(result).toEqual([{Id: 2, Name: 'Fire', Location: {x: 200, y: 200}}]); }); }); I call the service method exactly the same as in the controller. But the test ends with a done which is ok. But if I change the line expect(result).toEqual([{Id: 2, Name: 'Fire', Location: {x: 200, y: 200}}]); to expect(result).toEqual("Test"); The test is done too and is not failing. But in that case I expect the test to fail. I already tried injecting the $rootScope and calling $rootScope.$digest(); after the service method call. This should resolve the previous promise, but in fact it did not take any effect, if I place the digest or not... So my question is, how to test the promise returned by the service method and compare the value resolved and passed to then() of promise in karma unit test. Edit: I've tried $timeout.flush(); and $rootScope.$digest(); after the service metho…
tagged with: javascript
answer count: 2
upvote count: 1
tagged with: asynchronous
favorite count: 0
accepted answer: http://stackoverflow.com/a/29320346
tagged with: angularjs
tagged with: angular-promise
has answer: http://stackoverflow.com/a/42681510
has comment: http://stackoverflow.com/comment/58714608
has answer: http://stackoverflow.com/a/29320346
type: AnsweredQuestion
tagged with: karma-runner
downvote count: 0
possible better answer: http://stackoverflow.com/a/42681510
score: 1

http://stackoverflow.com/comment/46872905
comment on: http://stackoverflow.com/a/29342711
has text: @FrancescoE. Yes, that is true. I edited the answer to clear out why I used window.onload there. Of course it is not the same, that is why I added the code for $(document).ready to show the difference
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/29222415
answer count: 1
has answer: http://stackoverflow.com/a/29222628
has comment: http://stackoverflow.com/comment/46653920
tagged with: forms
type: AnsweredQuestion
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29222628
type: Question
has comment: http://stackoverflow.com/comment/46653978
has body: I created a python script that basically given a csv file that lists the students in a particular school and the subjects they are each taking, prints out the percent of people taking any given subject(s). Now, I have to create a html form for the user to enter in the information, instead of just running prompts from the script. In essence, I would double click on the html file and then the form it displays would ask to choose a school from a drop down menu, and enter the subject(s) that I wanted to search for, then finally display the percent of people that for example are taking calculus and literature on the page when I click the submit button. It doesn't have to be on the internet or anything, just run from the html file. My problem here however, is that I have only been programming for a little while, and my knowledge of Javascript is limited. I know how to create the form with HTML and CSS. However how do I implement the Javascript to access the python code? And do I actually require a python web framework since I'm not putting this on the internet? If it would be easier, I am also considering re-writing the python script into Javascript(is that a better option?), but I want to know how to do it with the python script. Basically, I'm not quite sure how to implement this and what languages I would need to do this, so can anyone give me an idea of how I could do this?
tagged with: http://stackoverflow.com/tag/html
tagged with: python
has comment: http://stackoverflow.com/comment/46654003
has title: Creating a html form and using javascript to access a python script within?
score: 0

http://stackoverflow.com/q/29258830
tagged with: jszip
tagged with: kendo-ui
has title: How do i remove files from a zip file uploaded through kendoUpload? Using jszip
linked to: http://stackoverflow.com/q/15355093
tagged with: kendo-upload
favorite count: 0
has comment: http://stackoverflow.com/comment/46729058
answer count: 0
upvote count: 2
type: UnansweredQuestion
has body: After the user uploads a zipped file, i want to remove the images folder from it before sending it over the network. I am using kendo for uploading, and the existing functionality works fine. I just want to add on the removing images part. This is what i have so far: function onSelect(e) { var file = e.files[0]; if (endsWith(file.name, '.eds')) { var contents = e.target.result; var jszip = new JSZip(contents); jszip.remove("apldbio/sds/images_barcode"); fileToSend = jszip.generate({type: "base64", compression: "DEFLATE"}); } e.files[0] = fileToSend; openProgressDialog(e.files.length); //this is existing code, works fine } target.result doesn't seem to exist in the event e. And nothing works properly from that point on. e should probably be used inside a FileReader object's onload(), (as seen here and here) but i have no idea how to use a FileReader for my purpose, with kendo Upload. EDIT: I did some more reading and now i am using FileReader like this: var reader = new FileReader(); reader.onload = function (e) { // do the jszip stuff here with e.target.result }; reader.onerror = function (e) { console.error(e); }; reader.readAsArrayBuffer(file); Note : file = e.files[0] as in the 1st code block. With this though, i get the error: Failed to execute 'readAsArrayBuffer' on 'FileReader': parameter 1 is not of type 'Blob'.
has comment: http://stackoverflow.com/comment/46778544
type: Question
score: 2
downvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/46729939
has text: Yeah, because you're comparing null to 'null' and it's not the same. You need to compare against null. I'll add an answer
comment on: http://stackoverflow.com/q/29262774
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/53211028
score: 1
has body: I do it including all of commands in package.json bin section. In your example: "bin": { "foo": "foo.js", "foo-config": "foo-config.js" } With this configuration, npm link will install all executables and all commands will work.
answers question: http://stackoverflow.com/q/29244386
upvote count: 1
has comment: http://stackoverflow.com/comment/104778234
type: Answer
downvote count: 0

http://stackoverflow.com/comment/46699576
has text: It's an open source project that I work on, so I could actually fix/change the code however I need to resolve this issue. My main limitation is time.
comment on: http://stackoverflow.com/q/29246874
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/q/29293841
score: 0
has comment: http://stackoverflow.com/comment/46783923
answer count: 1
has title: Modulo operator innaccuracy with large numbers in Javascript
tagged with: floating-point-precision
has comment: http://stackoverflow.com/comment/46784739
has body: I am writing some code to convert large integers from a thousand-based system (e.g. 1,234,567,891) to the Japanese system of ten-thousand (e.g. 12億3456万7891). In short, writing out numbers to a readable format in Japanese means splitting numbers into sets of four instead of sets of three. The user inputs a number (var innum), and the modulo operator is used with divisors of 10,000's to pinpoint the 4-digit chunks where I would like the number marked with kanji (Chinese characters). ex: where chobase=10^12 (one-trillion), okubase=10^8 (100-million) and manbase=10000 (ten-thousand), and say the user input is 54234238524003: var cho = Math.floor((innum/chobase)); //returns 54 var oku = Math.floor(((innum%chobase)/okubase)); //returns 2342 var man = Math.floor(((innum%okubase)/manbase)); //returns 3852 var sen = (innum%manbase); //returns 4003 slap it all together as a string and... 54兆2342億3852万4003 Excellent- it works great. However, when the integer tips into the ten-quadrillions (10^16), the modulo operator is no longer reliable. example produced by code using the same logic as above (commas added for readability): input: 4,234,322,423,423,424,003 output: 423京4322兆4234億2342万4000 This is incorrect, as the last four digits in the Japanese format should read 4003 given the input. I realize that JavaScript numbers are floating point and that accuracy wanes as integers reach a certain size, so are there any suggestions on how to work around this for numbers of ten-quadrillions in size? (This is roughly the maximum size number I am aiming to convert). I saw php has an fmod() method for handling this type of situation, but I have been unable to find a javascript equivalent..
accepted answer: http://stackoverflow.com/a/29293884
type: AnsweredQuestion
tagged with: numbers
type: Question
tagged with: modulo
tagged with: javascript
has answer: http://stackoverflow.com/a/29293884

http://stackoverflow.com/comment/46848409
type: AnswerComment
comment on: http://stackoverflow.com/a/29329242
has text: No, there isn't. Give a try to `bootstrap`, it's a great framework. Please also feel free to accept my answer if it helped you.
type: Comment
score: 0

http://stackoverflow.com/q/29350321
has answer: http://stackoverflow.com/a/29350397
answer count: 3
has comment: http://stackoverflow.com/comment/46886338
has comment: http://stackoverflow.com/comment/46886341
favorite count: 0
score: 2
has body: I want to apply css classes based on JSON response for example if response is "Low" i want background color green and apply radio-low css class and if response is "medium" i want to make background color yellow.How i can acieve this task using AngularJS. HTML {{PrcsratingValidationMsg}} Process Inherent risk rating {{processRating.inherentRiskRatingKey}} Process Inherent risk Business Final {{processRating.finalOutcomeInherentRiskRatingKey}} </div
tagged with: angularjs
downvote count: 0
has answer: http://stackoverflow.com/a/29350491
type: UnansweredQuestion
tagged with: css
has title: How to apply conditional CSS class based on Json string response using AngularJS?
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/46886501
type: Question
upvote count: 2
has answer: http://stackoverflow.com/a/29350434
tagged with: javascript

http://stackoverflow.com/q/29229731
has comment: http://stackoverflow.com/comment/46666698
tagged with: javascript
possible better answer: http://stackoverflow.com/a/29230076
upvote count: 3
has title: How to avoid hard-coding url names in HTML with ng-repeat
has answer: http://stackoverflow.com/a/29229884
has body: Before explaining the question I would like to throw a bit of my HTML code &lt;div ng-repeat="item in employeeNames"&gt; &lt;span&gt; &lt;img data-ng-src="http://192.128.1.125/uploads/images/{{item.photoName}}"&gt; &lt;/span&gt; {{item.name}} &lt;/div&gt; where employeeNames contain array of objects with name and photoName . $sope.employeeNames= [{ name:Rob, photoName:rer343983j38u38r8u3 }, { name:Alice, photoName:dfgrt564yt546y565556r4t }, ] How can I avoid hard coding the url http://192.128.1.125/uploads/images/ in html since I need to change each time when the url gets changed?
downvote count: 1
tagged with: angularjs-ng-repeat
favorite count: 0
accepted answer: http://stackoverflow.com/a/29230092
tagged with: angularjs
has answer: http://stackoverflow.com/a/29230143
answer count: 4
type: AnsweredQuestion
score: 2
has answer: http://stackoverflow.com/a/29230092
has comment: http://stackoverflow.com/comment/46681609
has answer: http://stackoverflow.com/a/29230076
type: Question

http://stackoverflow.com/a/29220935
type: Answer
accepted answer of: http://stackoverflow.com/q/29220230
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29220230
score: 0
has body: As we can read here, http://php.net/manual/en/function.json-encode.php , JSON data comes with double quotes. So JavaScript will need single quotes to display the string with JSON data. Example: By José Manuel Abarca Rodríguez Get JSON data from server Copy-paste previous code into a textfile, save it with PHP extension and run it in your brower with localhost/filename.php. It works fine.

http://stackoverflow.com/comment/46715076
has text: You don't need to use a loop. You juste have to call questions[i] where i is the number of times the person clicked on the button.
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/29256143
type: Comment

http://stackoverflow.com/a/29226018
type: Answer
has comment: http://stackoverflow.com/comment/46664369
has comment: http://stackoverflow.com/comment/46660310
answers question: http://stackoverflow.com/q/29225930
score: 1
has comment: http://stackoverflow.com/comment/46659783
upvote count: 1
downvote count: 0
has body: It seems like you are passing locations array to view. But i am quite not sure what first and last items that you are pushing in array are. l.push(['1',23.567,88.645,1]);//may be you will need to push items in correct format here. Anyway after passing l array to view you could simply assign it to markers variable in view file: &lt;script type="text/javascript"&gt; function initialize() { var locations = &lt;%- l %&gt; var map = new google.maps.Map(document.getElementById('map-canvas'), { zoom: 10, center: new google.maps.LatLng(-33.92, 151.25), mapTypeId: google.maps.MapTypeId.ROADMAP }); var infowindow = new google.maps.InfoWindow(); var marker, i; for (i = 0; i &lt; locations.length; i++) { marker = new google.maps.Marker({ position: new google.maps.LatLng(locations[i][1], locations[i][2]), map: map }); google.maps.event.addListener(marker, 'click', (function(marker, i) { return function() { infowindow.setContent(locations[i][0]); infowindow.open(map, marker); } })(marker, i)); } } google.maps.event.addDomListener(window, 'load', initialize); &lt;/script&gt;
has comment: http://stackoverflow.com/comment/46660236

jaydata
tag name: jaydata
tags question: http://stackoverflow.com/q/29248403
tags question: http://stackoverflow.com/q/29346761
type: Tag

http://stackoverflow.com/q/29218507
type: Question
type: AnsweredQuestion
has title: Get hidden input value and view in popovers JavaScript
score: 0
has answer: http://stackoverflow.com/a/29218770
accepted answer: http://stackoverflow.com/a/29218770
tagged with: hidden
answer count: 1
tagged with: javascript
tagged with: popover
tagged with: input
has body: Did read data from hidden and view in a modal window - it worked. Changed from modal to popovers - stopped working. I do not know how to correct. Help please, tried a lot of things. http://jsfiddle.net/popovers ..... no ip Check Check I do not understand why is not working. In modal or alert - work http://jsfiddle.net/modal

http://stackoverflow.com/a/29295696
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29295428
has body: Is there a reason you don't want to use router.get functions? I would guess express.js is internally performing the same logic that you are doing anyway. You are just replacing get functions with handlers. If you are using similar logic between multiple routes, that may be worth abstracting.

http://stackoverflow.com/a/29276365
has body: I have found the answer here https://stackoverflow.com/a/19295464/2930036 The correct way to do this is FB.Event.subscribe("xfbml.render", function () { console.log($('.fb-page').height()); });
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29261183
answers question: http://stackoverflow.com/q/29261183
type: Answer

http://stackoverflow.com/q/29276670
tagged with: webdriver
type: AnsweredQuestion
tagged with: javascript
tagged with: mocha.js
has answer: http://stackoverflow.com/a/29283951
type: Question
has body: I am not sure how to put the question so it makes sense. Let's say, I have Mocha test and I want to return an object after the test. For example: var test = require('selenium-webdriver/testing'); test.describe('Test', function() { test.describe('#login()', function() { test.before(function(done){ //driver = create driver object here done(); }); test.after(function(done){ driver.quit(); done(); }); test.it('', function(done){ //code done() }); }); }); I want to return driver object, but it seems not work. I tried to return 'Test text', but also nothing happens. Is it possible to return a value within test wrap-up Mocha?
has title: Return value from a test.describe of Mocha test framework
answer count: 1
tagged with: selenium-webdriver
accepted answer: http://stackoverflow.com/a/29283951
score: 0

http://stackoverflow.com/comment/46855092
has text: @nicael, It's meant to receive a Token for authorization, So technically just make a HTTP call and return then I parse the response to get the token.
comment on: http://stackoverflow.com/q/29332964
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29300280
has answer: http://stackoverflow.com/a/29300453
has title: Update HTML5 canvas rectangle on hover?
has answer: http://stackoverflow.com/a/56235788
tagged with: http://stackoverflow.com/tag/html
score: 18
has answer: http://stackoverflow.com/a/54805456
favorite count: 0
has answer: http://stackoverflow.com/a/29308863
answer count: 9
possible better answer: http://stackoverflow.com/a/37619815
has answer: http://stackoverflow.com/a/41859904
has answer: http://stackoverflow.com/a/37619815
has comment: http://stackoverflow.com/comment/46795388
has answer: http://stackoverflow.com/a/29300382
has body: I've got some code which draws a rectangle on a canvas, but I want that rectangle to change color when I hover the mouse over it. The problem is after I've drawn the rectangle I'm not sure how I select it again to make the adjustment. What I want to do: var c=document.getElementById("myCanvas"); var ctx=c.getContext("2d"); ctx.rect(20,20,150,100); ctx.stroke(); $('c.[rectangle]').hover(function(this){ this.fillStyle = 'red'; this.fill(); });
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/72020906
accepted answer: http://stackoverflow.com/a/29308863
upvote count: 18
has comment: http://stackoverflow.com/comment/46795506
has answer: http://stackoverflow.com/a/29305321
type: Question
tagged with: canvas
has comment: http://stackoverflow.com/comment/46795684
downvote count: 0
tagged with: javascript

http://stackoverflow.com/q/29251589
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29252499
has title: Edit HTML text on click
type: Question
possible better answer: http://stackoverflow.com/a/29252346
answer count: 2
has answer: http://stackoverflow.com/a/29252499
has answer: http://stackoverflow.com/a/29252346
has comment: http://stackoverflow.com/comment/46707896
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html
has body: I would like to change text to input text by clicking on it : Currently I've: Double Click On Me! And in javascript: //plugin to make any element text editable $.fn.extend({ editable: function () { $(this).each(function () { var $el = $(this), $edittextbox = $(' ').css('min-width', $el.width()), submitChanges = function () { if ($edittextbox.val() !== '') { $el.html($edittextbox.val()); $el.show(); $el.trigger('editsubmit', [$el.html()]); $(document).unbind('click', submitChanges); $edittextbox.detach(); } }, tempVal; $edittextbox.click(function (event) { event.stopPropagation(); }); $el.dblclick(function (e) { tempVal = $el.html(); $edittextbox.val(tempVal).insertBefore(this) .bind('keypress', function (e) { var code = (e.keyCode ? e.keyCode : e.which); if (code == 13) { submitChanges(); } }).select(); $el.hide(); $(document).click(submitChanges); }); }); return this; } }); //implement plugin $('.text-content').editable().on('editsubmit', function (event, val) { console.log('text changed to ' + val); }); But I don't know how to change double click on simple click ! I've tried to replace $el.dblclick(...) by $el.click(), but it doesn't work. Is anybody have a solution ?
has comment: http://stackoverflow.com/comment/46707002

http://stackoverflow.com/comment/46736118
score: 0
type: Comment
has text: It is under heavy development; you should use a recent Chrome, tho.
comment on: http://stackoverflow.com/a/29265688
type: AnswerComment

http://stackoverflow.com/comment/46708914
type: Comment
comment on: http://stackoverflow.com/q/29252635
has text: I agree with @MillieSmith - suck it and see is the best way to learn. That said, yes they can.
score: 0
type: QuestionComment

http://stackoverflow.com/comment/46918869
has text: @Banana Guys is there any solution for this?
comment on: http://stackoverflow.com/a/29368483
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/29275649
type: Question
downvote count: 2
has answer: http://stackoverflow.com/a/29442174
tagged with: validation
answer count: 1
tagged with: javascript
favorite count: 0
upvote count: 0
has comment: http://stackoverflow.com/comment/46752596
tagged with: iban
type: UnansweredQuestion
has title: Javascript IBAN Validation. Check german or austrian IBAN
has body: i want to validate a german or a austrian iban. ['validate-IBAN', 'Please enter a valid IBAN.', function (v) { var pass=v.strip(); if (0 == pass.length) { return true; } if (!(/[AT || DE]\w{2}/i.test(v)) || !(/[0-9]\w{18 || 20}/.test(v))) { return false; } return !(pass.length &lt; 20); }], I want to check an german IBAN like DE19 1234 1234 1234 1234 12 (two letters and 20numbers) or an austrian IBAN like AT6119043002345732201 (2letters and 18 numbers) But it doesnt work. What is wrong? Thanks a lot (-:
score: -2

http://stackoverflow.com/comment/46788319
has text: @Anzeo yes thats true , but how to add a callback, and only then initialize the application?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29296010
score: 0

http://stackoverflow.com/a/29296100
answers question: http://stackoverflow.com/q/29296061
has body: a.some class is interpreted as <doesn'tMatterHowDeep> Only I'm selected </doesn'tMatterHowDeep> Since you're using a space, it is thinking to select an element with the tag name of class that is under a.some, when actually, they are two different classes. What you need is a.some.class
type: Answer
score: 1
upvote count: 1
downvote count: 0

http://stackoverflow.com/comment/46676678
score: 1
type: AnswerComment
has text: @TJCrowder - Thanks for the time and patients with this. I now understand a lot more about the environment I am forced to work in. This ridiculous environment aside, you've answered the question perfectly and when I do complain to the 3rd party app about `X-UA-Compatible` and have them use `IE=Edge`, I will implement the solution you've provided. Cheers
type: Comment
comment on: http://stackoverflow.com/a/29219379

http://stackoverflow.com/q/29232717
type: Question
type: AnsweredQuestion
has title: Using src in Ember cli
tagged with: image
possible better answer: http://stackoverflow.com/a/40780627
has answer: http://stackoverflow.com/a/40780627
answer count: 2
accepted answer: http://stackoverflow.com/a/29234075
downvote count: 0
tagged with: javascript
favorite count: 0
has body: I couldn't get an image to show up with Ember CLI. I tried to use the HTML &lt;img&gt; tag and made an exception in my environment file: contentSecurityPolicy: { 'img-src': "'self' * all" } I used this &lt;img&gt; tag: &lt;img src="/public/images/image.png"&gt; And I'm getting the following error message: Failed to load resource: the server responded with a status of 404 (Not Found) What I'm doing wrong?
tagged with: ember.js
score: 2
upvote count: 2
has answer: http://stackoverflow.com/a/29234075
has comment: http://stackoverflow.com/comment/46671622

http://stackoverflow.com/a/29259801
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29259714
has comment: http://stackoverflow.com/comment/46722121
score: 6
type: Answer
accepted answer of: http://stackoverflow.com/q/29259714
upvote count: 6
downvote count: 0
has body: The element that the click started in is available as target on the event object passed into your handler, so (but see more below): // Accept the event arg -------v $( "#buttons" ).click(function(e) { alert('button: ' + e.target.id); // <=== Use e.target.id to get its ID // window.location.href = "score.html"; (commented out for live demo) }); button 1 button 2 button 3 button 4 Note that that will do the alert whenever there's a click inside the #buttons div, even if it's not on a button. If you only want clicks on the buttons, you can use a selector with .on to only call you when the click went through a button. It will call your handler as though you had hooked the handler directly to the buttons, even though in fact you've hooked it to the #button div, and so we use this.id for the ID: $( "#buttons" ).on("click", "button", function() { alert('button: ' + this.id); // window.location.href = "score.html"; (commented out for live demo) }); button 1 button 2 button 3 button 4
has comment: http://stackoverflow.com/comment/46721986
has comment: http://stackoverflow.com/comment/46722082

http://stackoverflow.com/comment/46789209
comment on: http://stackoverflow.com/q/29296661
score: 0
type: Comment
type: QuestionComment
has text: Do you want to disabled link button only while processing?

http://stackoverflow.com/q/29231704
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29289049
score: 0
tagged with: firefox-addon
tagged with: firefox
answer count: 1
tagged with: android
has answer: http://stackoverflow.com/a/29289049
type: AnsweredQuestion
has title: How to get menuID in Android Firefox in javascript?
has body: Firefox on Android exposes a useful API to add/remove menu items in the main menu using javascript. This is usually done in addons. From all sorts of examples like https://developer.mozilla.org/en-US/Add-ons/Firefox_for_Android/API/NativeWindow/menu I learned how to add a menu item, get its menuID and using the menuID remove it later if needed. What I was not able to find is a way to obtain the menuID of an already existing menu item, things which are in the menu by default. The problem is that when a menu item is added the menu.add method returns the menuID which can be used later, but if the menu item is already there I don't know of a way of getting its menuID. I also don't know how to get a list of all already added menuIDs, this would be helpful too.
type: Question

http://stackoverflow.com/a/29359920
score: 0
answers question: http://stackoverflow.com/q/29358180
has body: You have a .slideview element which is relatively positioned in the document, so images can be absolutely positioned inside of it. We'll be using the same technique for positioning your buttons. Let's create a new "global" container: Prev Next Now in your CSS add this class: .global_container { /* selector for a class called global_container */ position: relative; width: 500px; /* same width as your slider, probably use a couple pixels more */ height: 100px; /* whatever height you want, usually more than your slider height or equal */ } Now, as your global container has position: relative;, you can position elements inside (adding a position: absolute; to their CSSes). So add to your CSS: #prev { /* selector for the element with id="prev" */ position: absolute; top: 45px; /* button will be positioned 45px from the top of the global container */ left: 10px; /* and 10px from the left of the global container */ } #next { position: absolute; top: 45px; /* same as before */ right: 10px; /* same as before, but from the right of the global container */ /* you could even set the size of the buttons */ width: 40px; height: 10px; } Hope this helps.
type: Answer
has comment: http://stackoverflow.com/comment/46941641
has comment: http://stackoverflow.com/comment/46934230

http://stackoverflow.com/a/29316781
score: 0
has body: You don't have a memory leak - you are simply instantiating a lot of objects at the same time and a garbage collection event has probably not yet occurred. The line setTimeout(formPoster(i),0) isn't doing what you think - because you're formPoster, rather than passing a reference, the timeout has no effect. You are simply calling formPoster 50,000 times immediately. In fact, even if you did pass a function to setTimeout for deferred execution like this: setTimeout(function() { formPoster(i) }) Then you would still see the same effect, just deferred to a later execution of the event loop.
has comment: http://stackoverflow.com/comment/46827341
type: Answer
answers question: http://stackoverflow.com/q/29316589

http://stackoverflow.com/q/29345092
has answer: http://stackoverflow.com/a/29346671
type: Question
tagged with: yql
downvote count: 0
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/29346671
answer count: 1
has title: Is it possible to add UserAgent to YQL?
favorite count: 0
has body: I'm using cross-domain-ajax in which, YQL is being used. It has this line in it: query = 'select * from html where url="{URL}" and xpath="*"'; so I added user-agent to it like this below: query = 'select * from html where url="{URL}" and xpath="*" and ua="Mozilla/5.0 (Linux; U; Android 4.0.1; ja-jp; Galaxy Nexus Build/ITL41D) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30"'; Now it won't return the value any more :( My main javascript is this: url = 'http://foofoofoofoofoofoo.com'; var content =''; $.get(url, function(data){ content = data.responseText; }); How can I add user-agent to YQL? The reason why I want to do it is because the content of HTML sources differ depending on which user-agent is being used with. I want the HTML source when it's being accessed with smartphone.
upvote count: 1
type: AnsweredQuestion
score: 1

http://stackoverflow.com/comment/46829437
has text: adding question and better format
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29315875

http://stackoverflow.com/a/29320702
has body: The four variables from the java servlet can be hardcoded and passed as a string like this StringBuilder url =new StringBuilder(); url.append("http://localhost:8080/cse/welcome.html"); url.append("?first="+fname); url.append("&amp;last="+lname); url.append("&amp;dname="+dept); url.append("&amp;mname="+mobno); String URL=url.toString(); String urlEncoded=response.encodeRedirectURL(URL); response.sendRedirect(urlEncoded); Then these variables can be obtained and called in the javascript in this way &lt;script&gt; function getParameterByName(name) { name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]"); var regex = new RegExp("[\\?&amp;]" + name + "=([^&amp;#]*)"), results = regex.exec(location.search); return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " ")); } var fname = getParameterByName('first'); var lname=getParameterByName('last'); var dept=getParameterByName('dname'); var mobno=getParameterByName('mname'); &lt;/script&gt;
score: 0
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/29319431
answers question: http://stackoverflow.com/q/29319431

http://stackoverflow.com/comment/46660282
has text: @theinvisible there is no need to use loop at all
comment on: http://stackoverflow.com/q/29226339
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29307539
favorite count: 0
has body: Suppose I have the following code in node.js: process.on('SIGTERM', function () { process.exit(0); }); for (var i = 0; i &lt; 100; i++) { console.error(i); } Will the code always print all the numbers up to 100?
tagged with: node.js
type: AnsweredQuestion
score: 3
upvote count: 3
has answer: http://stackoverflow.com/a/29308176
type: Question
tagged with: javascript
answer count: 1
has title: Does node.js code run to completion even if interrupted by a signal handler?
downvote count: 0
accepted answer: http://stackoverflow.com/a/29308176

http://stackoverflow.com/a/29358089
upvote count: 4
has comment: http://stackoverflow.com/comment/47112348
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/47113724
has body: Here are three client-side methods to save JavaScript variables across page refreshes and descriptions on how long they can persist data. Saving a JavaScript variable with local storage Saving a JS variable using local storage is easy and convenient with modern browsers. var get = function (key) { return window.localStorage ? window.localStorage[key] : null; } var put = function (key, value) { if (window.localStorage) { window.localStorage[key] = value; } } To save and read an object instead of a simple variable: localStorage.yourObject = JSON.stringify(obj); obj = JSON.parse(localStorage.yourObject || "{}"); Persistence: User agents may, if so configured by the user, automatically delete stored data after a period of time. For example, a user agent could be configured to treat third-party local storage areas as session-only storage, deleting the data once the user had closed all the browsing contexts that could access it. This can restrict the ability of a site to track a user, as the site would then only be able to track the user across multiple sessions when he authenticates with the site itself (e.g. by making a purchase or logging in to a service). However, this also reduces the usefulness of the API as a long-term storage mechanism. It can also put the user's data at risk, if the user does not fully understand the implications of data expiration. References: http://dev.w3.org/html5/webstorage/ Persisting values in JavaScript object across browser refresh How persistent is localStorage? Saving a JavaScript variable with cookies Saving a variable with cookies: function createCookie(name,value,days) { if (days) { var date = new Date(); date.setTime(date.getTime()+(days*24*60*60*1000)); var expires = "; expires="+date.toGMTString(); } else var expires = ""; document.cookie = name+"="+value+expires+"; path=/"; } function readCookie(name) { var nameEQ = name + "="; var ca = document.cookie.split(';'); for(var i=0;i &lt; ca.length;i++) { var c = ca[i]; while (c.charA…
type: Answer
accepted answer of: http://stackoverflow.com/q/29357931
has comment: http://stackoverflow.com/comment/46940251
answers question: http://stackoverflow.com/q/29357931
has comment: http://stackoverflow.com/comment/46923452
score: 4

http://stackoverflow.com/q/29243393
has title: Need help comparing the value inside array, with forEach loop
answer count: 1
accepted answer: http://stackoverflow.com/a/29244186
has comment: http://stackoverflow.com/comment/46693419
has comment: http://stackoverflow.com/comment/46692813
type: AnsweredQuestion
tagged with: foreach
type: Question
has answer: http://stackoverflow.com/a/29244186
has comment: http://stackoverflow.com/comment/46693485
has comment: http://stackoverflow.com/comment/46692749
tagged with: javascript
has body: So basically I have some promise, forEach, just a lot of issues with this single problem I need to solve. So the variables I work with has below structure: persons = [object, object, object] where each object has { user:number , username: string, latitude:number, longitude:number} from there I try to figure out if my user/username is inside of one of these objects, if not found id like it to be created, if found found id like it to update their location. Sounds simple, I think the problem has blown out of proportion but nothing works. The code I have now does not work, its either I can never figure out when the user is not there, or I can not figure out how to get to stop creating me every time it find a user who is not me. var getswamp = function(item, index) { return new Promise(function(resolve, reject){ var result = false; if (item.user === user &amp;&amp; item.username === username) { if ((item.latitude !== latitudenew) || (item.longitude !== longitudenew)) { var id = item.id; swampdragon.update('locationcurrent', { user: user, latitude: latitudenew, longititude: longitudenew, username: username, id: id }, function (context, data) { console.log("data updated", data); result = true; resolve(result); }, function (context, data) { console.log("You may not be updated"); }); } else { console.log("No location change"); result = true; } }else{ if ( item.index === person.index){ console.log(person); resolve(result) } } }); }; person.forEach(function (item, index) { var swamping = getswamp(item, index); swamping.then(function (result) { console.log(result); if (result === true) { console.log("We have you"); } else if (result === false &amp;&amp; (index === person.length - 1)) { console.log('Index: ' + index + ' Length of list is ' + person.length); swampdragon.create('locationcurrent', { user: user, latitude: latitudenew, longititude: longitudenew, username: username }, function (context, data) { console.log("data created", data); }, function (context, data) { console.l…
score: 0

http://stackoverflow.com/comment/46920506
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29353650
has text: Show the source code of "javascript:gotopage('DATA')". What ever it does I still don't understand how you distinct that it does not "go there". It must somehow "go there" or else it can't pull the data from the link regardless if you use AJAX or a HTTP request.
type: AnswerComment

http://stackoverflow.com/comment/56824146
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29312153
has text: I'm developing an APP so when user come to app for streaming, I won't manually read that file for them. so I need to parse that file using javascript in my code and grab that url for streaming. But the main thing I won't know how can i parse it using javascript, I got failure when i try to make ajax request on that [URL](http://yp.shoutcast.com/sbin/tunein-station.pls?id=175821)
type: AnswerComment

http://stackoverflow.com/a/29225149
accepted answer of: http://stackoverflow.com/q/29220254
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29220254
has comment: http://stackoverflow.com/comment/46660867
type: Answer
score: 2
has body: The loop is probably caused by clicking the button even if it has a value. Try putting it inside your if. That said, you are overcomplicating it. You can access the extension's data inside content scripts directly by replacing localstorage with the chrome.storage extension api. Add the "storage" (silent) permission to your manifest.json, like this: "permissions": ["storage"] Remove the message passing code in background.js. Then replace the popup button listener contents with: chrome.storage.local.set({ "company": csearch.value }, function() { chrome.tabs.create({ url: "whatever url" }) }) Replace the content script with: chrome.storage.local.get("company", function(items) { if(document.querySelector("#txtQSearch").value == "") { document.querySelector("#txtQSearch").value = items.company document.querySelector("#btnQSearch").click() } }) document.querySelector() performs the same function here as getElementById, but it is much more robust. It also has less capital letters, which makes it easier to type in my opinion.
downvote count: 0
upvote count: 2

http://stackoverflow.com/a/58630411
score: 4
type: Answer
has body: open() does not open the connection; it only configures the request, but the network activity only starts with the call of send ()
answers question: http://stackoverflow.com/q/29362977
upvote count: 4
downvote count: 0

cryptography
tag name: cryptography
type: Tag
tags question: http://stackoverflow.com/q/29265975
tags question: http://stackoverflow.com/q/29270598
tags question: http://stackoverflow.com/q/29268935
tags question: http://stackoverflow.com/q/29258984

http://stackoverflow.com/a/29278908
downvote count: 0
answers question: http://stackoverflow.com/q/29278702
has comment: http://stackoverflow.com/comment/46756563
has body: Please try this $('ul :checkbox').bind('click', function () { var $chk = $(this), $li = $chk.closest('li'), $ul, $parent ; if($li.has('ul')){ $li.find(':checkbox').not(this).prop('checked', this.checked) } do{ $ul = $li.parent(); $parent = $ul.siblings(':checkbox'); if($chk.is(':checked')){ $parent.prop('checked', $ul.has(':checkbox:not(:checked)').length == 0) } else { $parent.prop('checked', false) } $chk = $parent; $li = $chk.closest('li'); } while($ul.is(':not(.someclass)')); }); All Kedai Kiosk On Master Mode Terengganu Kiosk 63 Kiosk 64
has comment: http://stackoverflow.com/comment/46756474
has comment: http://stackoverflow.com/comment/46756308
upvote count: 2
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46759528
type: Answer
accepted answer of: http://stackoverflow.com/q/29278702
score: 2

http://stackoverflow.com/comment/46789885
type: QuestionComment
has text: Are you sure you want the hover even on `div` inside `#imageHolder` ?
score: 0
type: Comment
comment on: http://stackoverflow.com/q/29296515

http://stackoverflow.com/q/29310893
answer count: 3
upvote count: 0
has comment: http://stackoverflow.com/comment/46816038
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/46815583
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46815771
has answer: http://stackoverflow.com/a/29311258
has body: I have a graph in my webpage and whenever I click a point in my graph, I want a div to be updated with new content. Through my function, I managed to update it, but when I click on a new point, new content is added to the old one and so on, given that I want to have only the current content in my div. Here's my function: $(document).ready(function() { $(div_to_update).text(content); }); } I tried to implement $("#chart_div").click(function() $('#div_to_update').remove(); }); but obviously it removes my div and I'm unable to recover it then.
possible better answer: http://stackoverflow.com/a/29310935
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/29310935
type: AnsweredQuestion
tagged with: javascript
score: -1
has answer: http://stackoverflow.com/a/29311315
has comment: http://stackoverflow.com/comment/46816365
has title: Jquery - How can I update a div with new content
accepted answer: http://stackoverflow.com/a/29311258

http://stackoverflow.com/comment/46865805
score: 0
type: AnswerComment
type: Comment
has text: This solution does not fit, I wrote about it above. I have this function is performed every 15 seconds, adding to this value window.width / 2. To the latter was in the center of the element. This is done every 15 seconds because the new divs appear dynamically.
comment on: http://stackoverflow.com/a/29338669

http://stackoverflow.com/q/29324924
tagged with: slideshow
tagged with: javascript
has body: I write a JavaScript code for slider. This code run in localhost or offline. But it is not run in online or my server. I use this code. please help me. I try but not solve it. where is my wrong? &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; var imagecount=1; var total=5; function slide(x){ var Image = document.getElementById('img'); imagecount = imagecount + x; if(imagecount &gt; total) { imagecount=1; } if (imagecount &lt; 1) { imagecount = total; } Image.src = "img/image" + imagecount + ".jpg"; } window.setInterval(function slideA(){ var Image = document.getElementById('img'); imagecount = imagecount + 1; if(imagecount &gt; total) { imagecount=1; } if (imagecount &lt; 1) { imagecount = total; } Image.src = "img/image" + imagecount + ".jpg"; },5000); &lt;/script&gt;
score: 0
has title: Slider run in offline/localhost but not run in online/server
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46840714
has comment: http://stackoverflow.com/comment/46840747
answer count: 0
type: Question
tagged with: jquery-ui-slider

http://stackoverflow.com/comment/46719184
score: 0
type: Comment
has text: Thanks! That is close, but it still pops us the pesky error alert box before redirecting in mobile safari. Can you see that too? http://getsilly.co/static/test.html Also, it open ups the app store (instead of redirecting) if you open it up in safari on the desktop.
comment on: http://stackoverflow.com/a/29258216
type: AnswerComment

http://stackoverflow.com/q/29335403
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/29335454
upvote count: 3
has answer: http://stackoverflow.com/a/29335583
has answer: http://stackoverflow.com/a/29335429
tagged with: jquery
favorite count: 0
accepted answer: http://stackoverflow.com/a/29335466
has comment: http://stackoverflow.com/comment/46859353
answer count: 4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29335466
score: 3
downvote count: 0
has body: Im trying to alert the current value that is in the input box depending on which button you click on. So if the first grid-2 button is selected it would alert 1 and if the second button with the input value of 2 was to be clicked on instead it would alert that number etc. Remove Now Remove Now Remove Now Remove Now
has title: Get the current input value with the same class names
possible better answer: http://stackoverflow.com/a/29335429

http://stackoverflow.com/q/29231147
linked to: http://stackoverflow.com/q/25515431
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/46679244
tagged with: angular-filters
has title: Angular ng-repeat Filter with date range by Bootstrap UI Datepicker
has comment: http://stackoverflow.com/comment/46668890
downvote count: 0
favorite count: 0
tagged with: angularjs
tagged with: twitter-bootstrap
type: UnansweredQuestion
tagged with: datepicker
has body: I have a ng-repeat of items and I'm trying to filter the list with a date range using the Bootstrap UI datepickers. Im not entirely sure what the best approach is to do this. I have two datepickers, dateFrom &amp; dateTo and when selected I would like it to date range filter the items by CreatedOn as below: &lt;div ng-repeat="orderObj in filteredOrders = orders | filter: ({CreatedOn: dateFrom} || {CreatedOn: dateTo})" class="authorisation-row"&gt; &lt;div class="c1"&gt; {{orderObj.OrderReference}} &lt;/div&gt; &lt;div class="c2"&gt; {{orderObj.DeliveryAddress}} &lt;/div&gt; &lt;div class="c3"&gt; &lt;/div&gt; My controller code looks like this, I added a watcher to update the items by dateFrom but I'm not sure if this will work for both datepickers. $scope.orders = orderFactory.get({ id: selectUser }); $scope.orders.$promise.then(function () { $scope.$watch('dateFrom', function (newVal, oldVal) { $scope.filteredOrders = filterFilter($scope.orders, newVal); }, true); }); I would be very grateful for any tips or advice to get this working.
answer count: 0
score: 1
upvote count: 1

http://stackoverflow.com/a/29300409
has comment: http://stackoverflow.com/comment/46805913
upvote count: 3
score: 1
downvote count: 2
answers question: http://stackoverflow.com/q/29299242
has comment: http://stackoverflow.com/comment/61364045
has comment: http://stackoverflow.com/comment/46913411
type: Answer
has body: yes it is possible, It is achievable with highcharts itself. Render navigator chart and other charts in different divs. There is an example given here in highcharts demos called master-detail chart for your ref. you an have your own date range selector and apply the selected dates using the setExtremes method. In this way you can have a look and feel near to a highstock while using highcharts. But the total number of points per chart may effect the performance. --EDIT-- you can do that with highstocks as well use afterSetExtremes method and manually set the extremes of all other charts when the extremes of one chart(the one with navigator and rangeSelctor) is changed.

http://stackoverflow.com/a/29257512
score: 0
has comment: http://stackoverflow.com/comment/46717932
type: Answer
has comment: http://stackoverflow.com/comment/46728758
has comment: http://stackoverflow.com/comment/46744606
has body: ExpressJS is all about working with middle wares. According to official documentation here, Middleware is a function with access to the request object (req), the response object (res), and the next middleware in line in the request-response cycle of an Express application, commonly denoted by a variable named next. Middleware can: Execute any code Make changes to the request and the response objects End the request-response cycle Call the next middleware in the stack I would like to point a few things about your my.js router, if you don't want to send any response back then it should be something like : router.get('/update', function(req, res, next) { res.end(); }); router.post('/update', function(req, res, next) { res.end(); }); You must end your request, response cycle else it will be left hanging. Practically you would like to send some data(preferably JSON data) back to client so you can use res.json() or res.send(). You don't need to set application/json headers if you use res.json().
has comment: http://stackoverflow.com/comment/46718879
answers question: http://stackoverflow.com/q/29256780

http://stackoverflow.com/comment/46840933
has text: Could you add the HTML as well? This could help.
score: 0
comment on: http://stackoverflow.com/q/29325045
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46832761
score: 0
has text: So you want to get the unique elements?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29320678

http://stackoverflow.com/comment/46689638
type: QuestionComment
comment on: http://stackoverflow.com/q/29241779
score: 4
has text: Normally the action URL is the intended target. Why aren't you using that?
type: Comment

http://stackoverflow.com/q/29227619
type: Question
has title: How to perform a java script in a UIWebview in iOS App with iOS 8?
answer count: 2
tagged with: ios
tagged with: javascript
tagged with: uiwebview
score: 0
has answer: http://stackoverflow.com/a/29247871
tagged with: objective-c
has answer: http://stackoverflow.com/a/29227718
has body: I get a java script as a respond from NSUrlRequest. I want to show it in an UIWebView, but how to make this java script get to work? Thanks in advance. Note that here I want to show some button in my java script which user can tap on to take some actions. Below is some of my code: // get strContent as java script (respond from NSURLRequest) // _myWebView is an instance of UIWebView - (void) showWebContent:(NSString*)strContent { [self loadWebViewContent:strContent]; } - (void) loadWebViewContent:(NSString*)strContent { NSMutableString *htmlString = [[NSMutableString alloc] init]; [htmlString appendFormat:@"&lt;html&gt; &lt;body&gt;"]; [htmlString appendFormat:@"%@",strContent]; [htmlString appendFormat:@"&lt;/body&gt; &lt;/html&gt;"]; [_webView loadHTMLString:htmlString baseURL:nil]; }
type: UnansweredQuestion

http://stackoverflow.com/a/29218246
has comment: http://stackoverflow.com/comment/46645545
has comment: http://stackoverflow.com/comment/46645578
has comment: http://stackoverflow.com/comment/46645705
has comment: http://stackoverflow.com/comment/46646063
downvote count: 0
has comment: http://stackoverflow.com/comment/46646352
has comment: http://stackoverflow.com/comment/46645932
type: Answer
has comment: http://stackoverflow.com/comment/46646546
answers question: http://stackoverflow.com/q/29218162
has comment: http://stackoverflow.com/comment/46646191
has comment: http://stackoverflow.com/comment/46645718
has comment: http://stackoverflow.com/comment/46646045
upvote count: 1
has comment: http://stackoverflow.com/comment/46645825
has comment: http://stackoverflow.com/comment/46645480
has comment: http://stackoverflow.com/comment/46645835
has comment: http://stackoverflow.com/comment/46646482
score: 1
has body: If the person object has isTag, then it renders the name with the "(new)" suffix. The template basically defines how to render an object with the isTag property, and without. The first template - the rendering of which is controlled by ng-if="person.isTag" - is rendered when isTag property is defined and truthy. The isTag refers to the property of the person object as defined by: &lt;ui-select-choices repeat="person in people"&gt;

http://stackoverflow.com/comment/46708703
score: 1
has text: Here is the JSFIDDLE: http://jsfiddle.net/5e6ww93h/2/
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29251545

http://stackoverflow.com/a/29393271
has comment: http://stackoverflow.com/comment/46970858
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/46981970
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/29371145
has comment: http://stackoverflow.com/comment/46983414
has body: When the document is ready, $(this) refers to window.document, when we do $(this).scrollTop(0); it bring the scroll bar to top position of the window object. Try somthing like this: $(document).ready(function(){ $(this).scrollTop(0); });

http://stackoverflow.com/comment/46791301
has text: Though you should not be using it that much at all, I would not name a variable `alert`, as it will overwrite `window.alert` . Name it better `$alert`, as it is a cached jQuery selection.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29296998

http://stackoverflow.com/q/29342054
type: UnansweredQuestion
has body: I am working on a form. One of my colleagues have used the are_you_sure.js which confirms to leave before saving a form. Now the problem is if I have a dropdown say like this CPC CPA Do Not Track When I am switching from non-selected options to selected option, then the change of state takes too much time This means if I am selecting CPC/Do Not Track from CPA, then the dropdown works fast. But if I am selecting CPA from CPC/Do Not Track, then the state change takes almost 4 seconds.. That's due to the jquery.are-you-sure.js. So, I need to remove the select from the dropdown. How can I achieve this? I put this code, $("select option").prop("selected", false); but it doesn't even let me select any other option.
type: Question
has comment: http://stackoverflow.com/comment/51677848
has comment: http://stackoverflow.com/comment/46871216
tagged with: javascript
score: 0
answer count: 1
tagged with: jquery
has title: Remove "selected" from an option of a dropdown
has answer: http://stackoverflow.com/a/29342287
has comment: http://stackoverflow.com/comment/51677432
has comment: http://stackoverflow.com/comment/51685001

http://stackoverflow.com/comment/46654373
score: 0
type: Comment
type: QuestionComment
has text: Why do you want the process running during a page view, and only during a page view? Sounds like a potential [XY problem](http://meta.stackexchange.com/a/66378) to me
comment on: http://stackoverflow.com/q/29222264

http://stackoverflow.com/q/29341073
has answer: http://stackoverflow.com/a/29341291
type: Question
has body: I've got a requirement such that for certain type of scope variables, I want to keep two decimal places in AngularJs. For this I've done the following: html &lt;span floatval="{{someVariable}}"&gt;{{someVariable}}&lt;/span&gt; js var app = angular.module('app',[]).directive('floatval', function(){ return function(scope, element, attrs){ var newInt = parseFloat(attrs.floatval); var n = newInt.toFixed(2); } }); I'm stuck here as I dont know how to now reflect this new value in the place of the original scope {{somevariable}}
possible better answer: http://stackoverflow.com/a/29341291
tagged with: angularjs
score: 0
answer count: 2
has title: Change the value of an attribute in an angular directive
has answer: http://stackoverflow.com/a/29341183
accepted answer: http://stackoverflow.com/a/29341183
type: AnsweredQuestion
tagged with: javascript

http://stackoverflow.com/comment/46647106
type: Comment
has text: Hehe, good idea, So how do you map back a sorted copy into its initial order? I saw the fiddle, Just wanna make sure the peaks are not shuffled and also make sure I understand your code.
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/29218898

http://stackoverflow.com/a/29275396
has body: fix is here: describe('permissionController', function() { 'use strict'; var $httpBackend, permissionController, scope; beforeEach(module('platform')); beforeEach(inject(function($injector, _$state_, configService) { $httpBackend = $injector.get('$httpBackend'); scope = $injector.get('$rootScope').$new(); scope.permissionDetailsForm = {$setPristine: function() { }}; var state = _$state_; spyOn(state, 'go'); spyOn(state, 'transitionTo'); spyOn(configService, 'getUrlForService') .and.callFake(function(name) { return CONFIG.get('MAIN_URL_FOR_REST_SERVICES') + name + 's'; } ); var $controller = $injector.get('$controller'); $httpBackend.when('POST', CONFIG.get('MAIN_URL_FOR_REST_SERVICES') + 'actions/search').respond(200, '[{"name": "all","id": "1"}]' ); $httpBackend.when('POST', CONFIG.get('MAIN_URL_FOR_REST_SERVICES') + 'resources/search').respond(200, '[{"name": "all","id": "1"}]' ); $httpBackend.when('POST', CONFIG.get('MAIN_URL_FOR_REST_SERVICES') + 'environments/search').respond(200, '[{"name": "all","id": "1"}]' ); permissionController = $controller('permissionController', {$scope: scope}); $httpBackend.flush(); })); it('should call the service successfully', function() { permissionController.permission = {'name': 'all', 'action': {'id': 1, 'name': 'all'}, 'resource': {'id': 1, 'name': 'all'}, 'environment': {'id': 1, 'name': 'all'}}; $httpBackend .whenPOST(CONFIG.get('MAIN_URL_FOR_REST_SERVICES') + 'permissions', permissionController.getPermissionSaveRequest()) .respond(200, 'created'); permissionController.save(); $httpBackend.flush(); expect(permissionController.notificationMessages[0].text).toBe('Save has been successful!'); }); });
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29273334

http://stackoverflow.com/a/32625432
has comment: http://stackoverflow.com/comment/92895236
score: 55
answers question: http://stackoverflow.com/q/29303164
downvote count: 0
has body: Using moment.js you have the following methods: moment.months() // long names returns: [ 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December' ] and moment.monthsShort() // short names returns: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
upvote count: 55
has comment: http://stackoverflow.com/comment/106362356
type: Answer

http://stackoverflow.com/comment/46731042
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29263804
has text: You should use the same version of jQM CSS and JS, so use css 1.4.5 instead of 1.4.4. Also you only need one jQM CSS file, either the minimized or not, but don't include both.

http://stackoverflow.com/comment/46682303
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29238071
has text: That doesn't fix it. He wants each week to have a header row and detail rows. Your solution puts all of the header rows together in a single div, all the detail rows together in the next div, etc.

http://stackoverflow.com/q/29251842
has title: Why new js Fetch standard forbid response header name as 'Set Cookie 1 / 2'?
accepted answer: http://stackoverflow.com/a/32427316
answer count: 1
downvote count: 0
favorite count: 0
tagged with: fetch-api
has body: I'm very surpised that https://fetch.spec.whatwg.org/ standard doesn't allow to set cookie from server. I expected New Fetch will be awesome alternative of XHR thing, but... Does anybody knows any official answer for it? Thanks in advance!
type: AnsweredQuestion
upvote count: 3
has answer: http://stackoverflow.com/a/32427316
type: Question
score: 3
tagged with: standards
tagged with: javascript

http://stackoverflow.com/comment/46844669
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/29327352
type: Comment
has text: Could you please expand with examples of input/output and how you're doing the conversion from string to date?

http://stackoverflow.com/a/29364821
accepted answer of: http://stackoverflow.com/q/29344977
upvote count: 3
score: 3
has body: Add a click event listener to your polygon and get its paths: google.maps.event.addListener(bermudaTriangle, 'click', function () { var polygonPaths = this.getPaths(); }); Check the documented Polygon methods and events.
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/29344977
has comment: http://stackoverflow.com/comment/46916254
type: Answer

http://stackoverflow.com/comment/46921123
comment on: http://stackoverflow.com/a/29369699
score: 0
type: AnswerComment
type: Comment
has text: Is this similar to what Arun P Johny mentioned, or a different idea. js is not my strong suit

http://stackoverflow.com/q/29259796
has comment: http://stackoverflow.com/comment/46724844
has comment: http://stackoverflow.com/comment/46722584
has comment: http://stackoverflow.com/comment/46722576
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46722014
has comment: http://stackoverflow.com/comment/46722057
has body: I have a form with input items. What I have done is get the label for each input element in my form. I have done this already but the trouble I am having is this...for every input element that does NOT have a label I want to set their label as the previous label. I did a mock up of what I am looking for in jsFiddle here. myItems.each(function(){ label = $('label[for="' + $(this).attr('id') + '"]').text(); if(label.length &lt;= 0){ // code I'm looking for goes here } }); UPDATE: I updated the JSFiddle to show a true represenstion of what I am trying to accomplish and the attempt with .prev(). JSFIDDLE LINK
has answer: http://stackoverflow.com/a/29262020
has comment: http://stackoverflow.com/comment/46724330
has comment: http://stackoverflow.com/comment/46722089
accepted answer: http://stackoverflow.com/a/29260291
has answer: http://stackoverflow.com/a/29260605
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46722031
has answer: http://stackoverflow.com/a/29260291
score: 0
answer count: 3
has comment: http://stackoverflow.com/comment/46722221
possible better answer: http://stackoverflow.com/a/29262020
has comment: http://stackoverflow.com/comment/46722390
has title: jQuery find the previous elements label in .each
linked to: http://stackoverflow.com/q/322912

http://stackoverflow.com/comment/46654771
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29223003
has text: Bless you! I knew it was something stupid staring me in the face. Most projects I do these days we use "controller as" syntax, so I was used to "var". Thanks again.

http://stackoverflow.com/comment/46704678
score: 0
comment on: http://stackoverflow.com/q/29250134
type: Comment
type: QuestionComment
has text: The action is on the same page.. can you pls elaborate on that ? Doing a Form submit will do a full page refresh, if you don't want to refresh the page, you should actually use Ajax

http://stackoverflow.com/a/29312197
has comment: http://stackoverflow.com/comment/136907395
has comment: http://stackoverflow.com/comment/133991399
has body: ! is the logical negation or "not" operator. !! is ! twice. It's a way of casting a "truthy" or "falsy" value to true or false, respectively. Given a boolean, ! will negate the value, i.e. !true yields false and vice versa. Given something other than a boolean, the value will first be converted to a boolean and then negated. For example, !undefined will first convert undefined to false and then negate it, yielding true. Applying a second ! operator (!!undefined) yields false, so in effect !!undefined converts undefined to false. In JavaScript, the values false, null, undefined, 0, -0, NaN, and '' (empty string) are "falsy" values. All other values are "truthy."(1):7.1.2 Here's a truth table of ! and !! applied to various values: value !value !!value false true false true false true null true false undefined true false 0 true false -0 true false 1 false true -5 false true NaN true false '' true false 'hello' false true
type: Answer
has comment: http://stackoverflow.com/comment/130745975
has comment: http://stackoverflow.com/comment/117174783
upvote count: 653
has comment: http://stackoverflow.com/comment/134604667
score: 653
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/133210328
accepted answer of: http://stackoverflow.com/q/29312123
has comment: http://stackoverflow.com/comment/118604906
answers question: http://stackoverflow.com/q/29312123
downvote count: 0

markdown
tags question: http://stackoverflow.com/q/29284569
type: Tag
tag name: markdown
tags question: http://stackoverflow.com/q/29255744

http://stackoverflow.com/q/29237809
has comment: http://stackoverflow.com/comment/46681836
has comment: http://stackoverflow.com/comment/46682665
upvote count: 8
type: Question
downvote count: 8
has comment: http://stackoverflow.com/comment/46681839
possible better answer: http://stackoverflow.com/a/29237914
has comment: http://stackoverflow.com/comment/46681796
tagged with: javascript
has body: Is there a way to have javascript coffee always be checking the document? What I mean by this is if I have "if" statements, it will always check the document to see if it needs to run the script... Also, it needs to not be a function that needs to be called. Here is some simple example of what I'm asking. random button hide How would I do something like this? I don't want this specifically, this is just an example. In the code,a button hides another one, and there is script always checking if it is hidden. Please let me know. edit I see other people's answers, but it's not what I need. Is it possible to have functions constantly run without being called?
has title: HTML script constantly running?
score: 0
answer count: 3
has comment: http://stackoverflow.com/comment/46681808
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has answer: http://stackoverflow.com/a/76559315
has answer: http://stackoverflow.com/a/29237914
has comment: http://stackoverflow.com/comment/46681877
has answer: http://stackoverflow.com/a/29237976
accepted answer: http://stackoverflow.com/a/29237976
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46681709

http://stackoverflow.com/comment/46888624
score: 0
type: AnswerComment
has text: Brilliant, thank you. I'm sort of new to creating elements through straight JS rather than writing them into an HTML document.
comment on: http://stackoverflow.com/a/29348503
type: Comment

http://stackoverflow.com/a/30554651
downvote count: 0
score: 7
upvote count: 7
type: Answer
has body: Try setting lazy loading to false. var gulp = require('gulp'); var plugins= require('gulp-load-plugins')({lazy:false}); console.log(JSON.stringify(plugins)); gulp.task('default'); And as others mentioned, install some plugins.
answers question: http://stackoverflow.com/q/29288870

http://stackoverflow.com/comment/46715198
type: QuestionComment
comment on: http://stackoverflow.com/q/29246309
has text: please make sure you mark this as completed if it answers your question.
score: 0
type: Comment

http://stackoverflow.com/q/29318953
downvote count: 3
type: Question
has comment: http://stackoverflow.com/comment/46829709
score: -2
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/46829863
answer count: 2
has title: Read a Jquery Data from File
has answer: http://stackoverflow.com/a/29319258
upvote count: 1
has comment: http://stackoverflow.com/comment/46829764
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29319345
favorite count: 0
has comment: http://stackoverflow.com/comment/46830329
tagged with: ajax
has body: Hi im trying to Read json data and display data in nested table i have also give my expected result and also posted my script which i have tried. my Data.json {"Data":[ { "label":"node1", "color":"red", "children":[ { "label":"vip1", "color":"red", "children":[ { "label":"obj1", "color":"gray", "id":"539803eae4b0ffad82491508" }, { "label":"obj2", "color":"green", "id":"5395635ee4b071f136e4b691" }, { "label":"obj3", "color":"green", "id":"539803e4e4b0ffad82491507" } ], "id":"53956358e4b071f136e4b690" }, { "label":"vip2", "color":"blue", "id":"539803f2e4b0ffad82491509" } ], "id":"5395634ee4b071f136e4b68e" }, { "label":"node2", "children":[ { "label":"vip1", "color":"green", "id":"539803eae4b0ffad82491501" }, { "label":"vip2", "color":"green", "id":"5395635ee4b071f136e4b694" } ], "id":"5395637fe4b071f136e4b692" }, { "label":"node3", "color":"red", "children":[ ], "id":"5395637fe4b071f136e4b692" } ] } My script Please help me to achieve this and let me whats wrong with my script
tagged with: http://stackoverflow.com/tag/html
type: UnansweredQuestion

http://stackoverflow.com/comment/46706814
has text: Unfortunately, this won't work. The JSON specification requires that key names are quoted: `{ "Id": { "editable": false, "nullable": true }, ...}`. Running `JSON.parse()` on your example will generate an exception.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29246642
type: AnswerComment

http://stackoverflow.com/a/29219608
type: Answer
answers question: http://stackoverflow.com/q/29219283
score: 2
upvote count: 2
has body: It's not perfect but you can play with the top, left, width, bottom values, just add: .easyPieChart *::before { border: 1px solid black; border-radius: 50%; bottom: 9px; content: " "; display: block; left: 8px; position: absolute; top: 10px; width: 83%; z-index: 99; } http://jsfiddle.net/gu3aL84e/6/
downvote count: 0
has comment: http://stackoverflow.com/comment/46720308

http://stackoverflow.com/comment/46676829
has text: Ok I am sure it is not correct but this is what I copied. https://jsfiddle.net/nogrwt58/
comment on: http://stackoverflow.com/q/29234747
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29316226
accepted answer: http://stackoverflow.com/a/29316326
has comment: http://stackoverflow.com/comment/46824625
tagged with: php
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46824777
tagged with: http://stackoverflow.com/tag/json
has body: I was fetching some JSON data from server using ajay by passing an array into json_enocode() of PHP, it returned a JSON which is valid(checked on many online JSON debugger). But the $.parseJSON() of JS is not accepting it. Parser is throwing error(below) for one set of data while it works properly for other set of data. CONSOLE> SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data I tried removing all the elements of array one by one but it is not working even with a single element. Here are the data sets: This is working: [{"id":"54a3b103877c0","act_name":"ABC","profile_image":"[\"551d\"]"}] While This is not: [{"id":"2","user_id":"53b595a","review_for_id":"54f25","review_for_type":"city", "r_title":"asfasas asd as","r_body":"a sdasda sdas dasdas das d","r_rating":"3", "other_info":"","added":"2015-03-28 15:47:20","modified":"2015-03-28 15:47:20", "f_name":"ABC","l_name":"XYZ","lives_in":"ABC"}] PHP CODE: Array: Array ( [0] =&gt; Array ( [id] =&gt; 2 [user_id] =&gt; 53b595a [review_for_id] =&gt; 54f25 [review_for_type] =&gt; city [r_title] =&gt; asfasas asd as [r_body] =&gt; a sdasda sdas dasdas das d [r_rating] =&gt; 3 [other_info] =&gt; [added] =&gt; 2015-03-28 15:47:20 [modified] =&gt; 2015-03-28 15:47:20 [f_name] =&gt; ABC [l_name] =&gt; XYZ [lives_in] =&gt; ABC ) ) PHP- Above array comes in $d json_encode($d, JSON_HEX_TAG | JSON_HEX_QUOT) Here is the Jquery for Ajax: $.get(url, '', function(d){ var data = {}; if(d != ''){ data = $.parseJSON(d); } var acc = {}; acc[sc_id] = data; console.log(acc); }); Please help!
possible better answer: http://stackoverflow.com/a/29988096
has answer: http://stackoverflow.com/a/29988096
type: Question
has answer: http://stackoverflow.com/a/29316326
has comment: http://stackoverflow.com/comment/46824955
tagged with: javascript
score: 0
answer count: 2
has title: parseJSON working in one case and not in other

http://stackoverflow.com/q/29343708
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46874730
answer count: 0
has title: Getting unterminated string constant javascript error
has body: Why am i getting "Unterminated string constant" java script error on below line lblWaiverMessage.innerText = hfState == "PR" ? '&lt;%=HttpContext.GetLocalResourceObject("~/StartStopTime.ascx", "Label5_PRResource")%&gt;' : '&lt;%=HttpContext.GetLocalResourceObject("~/StartStopTime.ascx", "Label5Resource1")%&gt;' ; below is the dynamic value of the above label lblWaiverMessage.innerText = hfState == 'PR' ? 'I understand and agree that I may be scheduled to work more than eight (8) hours in a shift. If I work a shift of more than eight (8) hours, but not more than 10 hours I agree that it is for the mutual benefit of me and the Company, and I voluntarily consent to waive my 2nd required meal period of a shift only when my work and/or scheduled shift will be completed in 10 hours. I voluntarily consent to the aforementioned statement for weekending' : '' ;
has comment: http://stackoverflow.com/comment/46874182
has comment: http://stackoverflow.com/comment/46875279
type: Question
tagged with: javascript
score: 0
tagged with: asp.net

http://stackoverflow.com/comment/46863171
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29292670
score: 0
has text: Yes, but patching richfaces would be risky. I guess I have to try converting codes from `rich:fileUpload` to `s:fileUpload`.

http://stackoverflow.com/comment/46709423
type: Comment
has text: [Fiddle](https://jsfiddle.net/r3r50qyd/) this code is from none Ajax load content .. it works in the fiddle but its not working with the AJAX load . Kindly take a look at it
comment on: http://stackoverflow.com/a/29251749
type: AnswerComment
score: 0

http://stackoverflow.com/comment/46753785
has text: just check for any errors in console.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29277851

http://stackoverflow.com/comment/46908867
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29362600
has text: don't use $location, use window.location

http://stackoverflow.com/q/29341638
answer count: 2
has body: I am currently using google forms to enable users to submit site changes. This is all working beautifully. I have added an extra column that has ticket status. Now I have written a script that checks for when this is updated to Done and then moves that row into another sheet entitled done. However this only works if i update a row that i manually added. If I change the column on a row created from the form entry it will not work. Has anyone seen this issue before. Code is below. function onEdit(e){ /* When a user updates a status to done the ticket gets moved to another sheet */ var sheetNameToWatch = "Form responses 1"; // The sheet to watch for changes var columnNumberToWatch = 1; // The column where the change happens on the above sheet var valueToWatch = "Done"; // What is the text you are looking for var sheetNameToMoveTheRowTo = "Done"; // The Sheet name for where the row gets moved to. var ss = SpreadsheetApp.getActiveSpreadsheet(); // Get the active spreadsheet var sheet = SpreadsheetApp.getActiveSheet(); // Get the active sheet var range = sheet.getActiveCell(); // Get the current cell that has just been updated // Check that you are on the correct sheet and column. if (sheet.getName() == sheetNameToWatch &amp;&amp; range.getColumn() == columnNumberToWatch &amp;&amp; range.getValue() == valueToWatch) { var targetSheet = ss.getSheetByName(sheetNameToMoveTheRowTo); // get a reference for the target sheet var targetRange = targetSheet.getRange(targetSheet.getLastRow() + 1, 1); // get a reference for the target row sheet.getRange(range.getRow(), 1, 1, sheet.getLastColumn()).moveTo(targetRange); // copy the row from current sheet to the new sheet sheet.deleteRow(range.getRow()); // Delete the row from the old sheet } }
favorite count: 0
has answer: http://stackoverflow.com/a/29396651
type: UnansweredQuestion
upvote count: 1
downvote count: 1
type: Question
has title: Google Sheets Script : Automatically remove a row into another sheet
tagged with: google-apps
tagged with: google-sheets
has comment: http://stackoverflow.com/comment/46887649
has answer: http://stackoverflow.com/a/29351667
tagged with: javascript
tagged with: google-apps-script
score: 0

http://stackoverflow.com/comment/46864499
score: 0
comment on: http://stackoverflow.com/a/29337626
type: AnswerComment
has text: Oh, I just stole that in a rush from [here](http://stackoverflow.com/questions/2735067/how-to-convert-a-dom-node-list-to-an-array-in-javascript). It says it's making sure length is an unsigned integer. However, now that I think about it, doing >>> 0 on a negative number gives back a crazy big number. Is this what you mean?
type: Comment

http://stackoverflow.com/q/29223653
tagged with: jquery
has body: mCustomScrollbar Uncaught TypeError: Cannot read property 'tagName' of null com.yandex.bar.chrome.js:1 b com.yandex.bar.chrome.js:1 a I tested this in Chrome on the Joomla rt-anacron template v1.3. jquery.mCustomScrollbar.min.js v3.0.8 HTML5 Shiv 3.7.3-pre jquery.mousewheel.min.js v 3.1.12 headroom.js headroom_init.js latest JUI I think this code causes the conflict: (function($){ $(window).load(function(){ $("body").mCustomScrollbar({ mouseWheelPixels: 300, scrollButtons:{ enable:true }, theme:"minimal"}); }); })(jQuery); How to fix it?
has comment: http://stackoverflow.com/comment/46660003
tagged with: joomla3.0
has title: mcustomscrollbar Cannot read property 'tagName'
type: UnansweredQuestion
answer count: 0
has comment: http://stackoverflow.com/comment/47078816
type: Question
has comment: http://stackoverflow.com/comment/46867687
has comment: http://stackoverflow.com/comment/46656174
tagged with: javascript
score: 0

http://stackoverflow.com/comment/46693371
comment on: http://stackoverflow.com/a/29243624
type: Comment
has text: I appreciate that, I was close to getting the quantity there but i could not remove the duplicates. Thanks again
score: 0
type: AnswerComment

http://stackoverflow.com/a/29223414
has comment: http://stackoverflow.com/comment/46656993
has body: Depending on your needs, the best way may be to use WebRTC, with directly streams audio and video from one client to another, using your node server only to establish the connection by sending some mandatory information. I can suggest a good tutorial to get started with webRTC here : http://www.html5rocks.com/en/tutorials/webrtc/basics/
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29223130
answers question: http://stackoverflow.com/q/29223130
type: Answer
downvote count: 0
score: 1

http://stackoverflow.com/q/29358355
score: 1
has comment: http://stackoverflow.com/comment/46901337
upvote count: 1
has answer: http://stackoverflow.com/a/29358472
type: Question
tagged with: javascript
tagged with: forms
tagged with: post
has body: I have a form with bunch of input fields. When a user click submit, I pass the form to itself. &lt;form class="form-horizontal" action="?import" method="post" role="form" enctype="multipart/form-data"&gt; When $_GET['import'] is set, I check if all the input fields have right format. If not, I alert with an error message and redirect to a previous page, so that users can correct the input fields. echo"&lt;script&gt; alert('$msg'); history.back(); &lt;/script&gt;"; The problem here is, when they are redirected to the page, they lose all the input they have entered. (it doesn't happen in chrome as it probably has a nice feature to prevent this but it does happen in firefox). What is the smart way to prevent this in php? Thanks!
answer count: 1
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/46901200
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46902170
tagged with: php
has title: How to prevent from losing entered input fields in PHP form

http://stackoverflow.com/a/30635504
upvote count: 2
has body: from the Referance : https://medium.com/@Mrugraj/sprite-sheet-animation-using-html-css-9091bebd4eeb HTML Sprite-Sheet Animation CSS .animatedDiv { width: 820px; height: 312px; background-image: url("https://cf.dropboxstatic.com/static/images/index/animation-strips/hero-intro-bg-vflR5rUow.jpg"); -webkit-animation: play 2s steps(48) infinite; -moz-animation: play 2s steps(48) infinite; -ms-animation: play 2s steps(48) infinite; -o-animation: play 2s steps(48) infinite; animation: play 2s steps(48) infinite; } @-webkit-keyframes play { from { background-position: 0px; } to { background-position: -39360px; } } @-moz-keyframes play { from { background-position: 0px; } to { background-position: -39360px; } } @-ms-keyframes play { from { background-position: 0px; } to { background-position: -39360px; } } @-o-keyframes play { from { background-position: 0px; } to { background-position: -39360px; } } @keyframes play { from { background-position: 0px; } to { background-position: -39360px; } } for Detailed explanation follow the link.
answers question: http://stackoverflow.com/q/29250270
type: Answer
score: 2
downvote count: 0

http://stackoverflow.com/comment/46824049
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29315415
has text: @Alan—there's a syntax error: `" + minutes"` should be `+ " minutes"`.
type: AnswerComment

http://stackoverflow.com/comment/46804534
comment on: http://stackoverflow.com/a/29304865
score: 0
type: AnswerComment
type: Comment
has text: Could you provide your html then? I can just go off of what you tell us. And in what way does my answer not work?

http://stackoverflow.com/comment/46899955
type: Comment
score: 0
comment on: http://stackoverflow.com/q/29357389
type: QuestionComment
has text: What happens when it is: `... filter:markSearch.mark.id">`?

recaptcha
tag name: recaptcha
tags question: http://stackoverflow.com/q/29300373
tags question: http://stackoverflow.com/q/29283910
type: Tag
tags question: http://stackoverflow.com/q/29249626

pusher
tags question: http://stackoverflow.com/q/29274742
tag name: pusher
type: Tag

http://stackoverflow.com/comment/46837069
comment on: http://stackoverflow.com/a/29322924
type: Comment
has text: http://jsonlint.com/
score: 1
type: AnswerComment

http://stackoverflow.com/q/29287102
tagged with: javascript
score: 0
tagged with: url
has title: Colorbox - I'm looking into adding a url at the bottom of displayed image. This link will pass the image location to this frame src
tagged with: colorbox
has comment: http://stackoverflow.com/comment/46832182
answer count: 0
type: UnansweredQuestion
tagged with: php
has comment: http://stackoverflow.com/comment/46819927
has body: Colorbox - I'm looking into adding a url at the bottom of displayed image. This link will pass the image location to this frame src for example: --frame src="annotate.php?folder=2013&amp;image=20130506_000043_2048_0193.jpg" name="frame1" -- The image location will be passed into annotate.php which is an annotation script to record mouse click coordinates. I can hard code an image for testing, but have yet to find a slick way to push an image from a gallery to the annotate.php module. We integrated a colorbox gallery into the web app and would hope to use the galler to send the image. Thanks!
tagged with: src
type: Question

http://stackoverflow.com/q/29249529
downvote count: 1
type: Question
tagged with: javascript
score: -1
has body: How can I make function deepEquals(a, b) for comparing two values without using === ?
answer count: 1
has answer: http://stackoverflow.com/a/29249613
accepted answer: http://stackoverflow.com/a/29249613
has title: Make deepEquals(a, b) function without ===
favorite count: 0
has comment: http://stackoverflow.com/comment/46703375
type: AnsweredQuestion
upvote count: 0

http://stackoverflow.com/a/29320505
has body: Submitted form data (when using post) goes in the HTTP Request headers and are not accessible for JavaScript. You need to use a code preprocessor (like PHP) or pass the data to the url hash which would be extremely rare. When using get, you should still use a preprocessor and not javascript for doing that. That was the actual purpose when introducing the "get" request type.
answers question: http://stackoverflow.com/q/29320474
score: 0
has comment: http://stackoverflow.com/comment/46832475
has comment: http://stackoverflow.com/comment/46832410
type: Answer
has comment: http://stackoverflow.com/comment/46832498
has comment: http://stackoverflow.com/comment/46832542

http://stackoverflow.com/comment/46815596
type: AnswerComment
comment on: http://stackoverflow.com/a/29310592
score: 0
has text: i updated my original question with more info and updated code
type: Comment

http://stackoverflow.com/a/29366682
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: getElementsByClassName() returns an HTMLcollection object which is similar to an array but not really an array so you can't call array methods using the returned value. One hack is to use Array's prorotype methods along with .call()/.apply() to pass the returned object as the context. var elems = document.getElementsByClassName("royal") ; var collapsedElems = document.getElementsByClassName("collapsed"); var earray = Array.prototype.slice.call(elems, 0); var concatenated = earray.concat.apply(earray, collapsedElems) ; console.log(concatenated) Demo: Fiddle
accepted answer of: http://stackoverflow.com/q/29366639
answers question: http://stackoverflow.com/q/29366639
upvote count: 5
score: 5

http://stackoverflow.com/q/29365429
tagged with: css
has body: I have the following menu structure. When a child li is selected, for example "Overview", I would like to have the parent li highlighted, in this case "About Us". Home About Us Overview Security Expertise Process Platform Careers I tried the following but it didn't work: $(document).ready(function(){ var pathname = window.location.pathname, page = pathname.split(/[/ ]+/).pop(), menuItems = $('.navbar-nav'); menuItems.each(function(){ var mi = $(this), miHrefs = mi.attr("href"), miParents = mi.parents('li.a'); if(page == miHrefs) { miParents.addClass("active").siblings().removeClass('active'); } }); });
has answer: http://stackoverflow.com/a/29365988
has title: How to set the parent li class to active when child li is selected
has comment: http://stackoverflow.com/comment/46913864
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/46914075
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29365701

http://stackoverflow.com/comment/46920811
type: QuestionComment
comment on: http://stackoverflow.com/q/29369769
type: Comment
has text: Using `POST` request, maybe?
score: 0

http://stackoverflow.com/q/29306151
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
type: Question
score: 2
tagged with: nan
has comment: http://stackoverflow.com/comment/46808358
has comment: http://stackoverflow.com/comment/46808942
favorite count: 0
has comment: http://stackoverflow.com/comment/46808386
has body: I'm implementing a timer, and trying to find out why I can't change the contents of my "min" input box when a number greater than 60 is entered in the input "sec" box. When I print the value of "mins", I get NaN, but when I print its type, I get that its a number. I'm just starting out with JavaScript, so any help would be appreciated. Thanks :) jQuery: $(function(){ $("#sec").change(function(){ if($("#sec").val() >= 60){ secs = parseInt( $("#sec").val() ); console.log("secs is " + secs ); if(secs < 0){ alert("Please enter a valid time interval"); $("#sec").val(""); return; } mins = parseInt( $("#min").val() ); console.log("mins is " + mins ); console.log(typeof mins); hours = parseInt( $("#hour").val() ); days = parseInt( $("#day").val() ); secs = secs % 60; mins = mins + Math.floor(secs/60);//can be > 60 console.log("mins is " + mins ); console.log(typeof mins); hours += mins/60; days += hours/24; $("#min").val(mins); $("#hour").val(hours + mins/60); $("#day").val(days + hours/24); } }); }); html: div class="left"> Please enter a time:
has comment: http://stackoverflow.com/comment/46808052
has comment: http://stackoverflow.com/comment/46806661
answer count: 1
has answer: http://stackoverflow.com/a/29306229
upvote count: 3
has title: NaN when printing to console but typeof is number jquery
downvote count: 1
tagged with: typeof
has comment: http://stackoverflow.com/comment/46806873
has comment: http://stackoverflow.com/comment/46807207
has comment: http://stackoverflow.com/comment/46807229

http://stackoverflow.com/comment/46720125
type: Comment
comment on: http://stackoverflow.com/q/29256282
type: QuestionComment
has text: PHP with Mongo DB. But I don't want to make the image rotation on the server.
score: 0

required
tag name: required
tags question: http://stackoverflow.com/q/29313838
type: Tag

http://stackoverflow.com/comment/46871077
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29339888
has text: Thanks for the idea, Ya detecting the next cells(code related to "10") will give problems at stages, i think i have to tweak the code a bit to check the length of the `id` and operate based on that.
score: 0

http://stackoverflow.com/q/29357931
tagged with: http://stackoverflow.com/tag/html
score: 1
favorite count: 0
linked to: http://stackoverflow.com/q/9948284
accepted answer: http://stackoverflow.com/a/29358089
has answer: http://stackoverflow.com/a/29358260
linked to: http://stackoverflow.com/q/23127498
has comment: http://stackoverflow.com/comment/46900594
upvote count: 2
has title: How to save a javascript variable
tagged with: php
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29357992
tagged with: save
linked to: http://stackoverflow.com/q/14573223
downvote count: 1
has comment: http://stackoverflow.com/comment/46900434
type: Question
possible better answer: http://stackoverflow.com/a/29357992
has comment: http://stackoverflow.com/comment/46900405
has body: I have a javascript variable, which is incremented by a javascript function in a .php script, only problem is that the page reloads when the function is called, so I need some way of saving the variable to be the same when the page is either reloaded or whenever you enter it. I know you can do a local save but I am not quiet sure if it saves the variable when you leave the website. My variable is in a html script. &lt;script type="text/javascript"&gt; var varNumber= 1; document.getElementById("varNumber").innerHTML = varNumber; document.getElementByID("varNumber").value = varNumber; function addToVariable() { varNumber= varNumber+ 1 ; document.getElementById("varNumber").innerHTML = varNumber; } &lt;/script&gt;
has answer: http://stackoverflow.com/a/29358089
tagged with: javascript
tagged with: variables
has comment: http://stackoverflow.com/comment/46900495
has comment: http://stackoverflow.com/comment/46900395
answer count: 3

http://stackoverflow.com/a/29283602
has body: You can run multiple jQuery versions in noconflict mode, just wrap your code like this: (function($) { /*your code here*/ }(jquery_x_x_x)); // jquery_1_4_1 for example HERE is more info.
has comment: http://stackoverflow.com/comment/46770141
accepted answer of: http://stackoverflow.com/q/29283449
answers question: http://stackoverflow.com/q/29283449
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46769078
type: Answer
score: 2
upvote count: 2

http://stackoverflow.com/a/35265202
answers question: http://stackoverflow.com/q/29290563
has body: Ok so I did some debugging of code in socket.io.js and realized there is a potential bug there. On line 1050 a loc.hostname is used instead of loc.host. This causes a hostname to be used when passing in a namespace, this doesn't include port number. In case of no namespace being used, on line 1024 loc.host is being used and everything is fine. I have taken a copy of the file and changed line 1050 to use host and everything works fine. Found github issue with that, it is fixed in 1.4.x: https://github.com/Automattic/socket.io-client/issues/812
accepted answer of: http://stackoverflow.com/q/29290563
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/q/29322955
has answer: http://stackoverflow.com/a/29328986
favorite count: 0
accepted answer: http://stackoverflow.com/a/29328986
has title: Firefox Add-on SDK: communicating objects between a sidebar and the main script
type: AnsweredQuestion
tagged with: firefox-sidebar
type: Question
score: -1
downvote count: 2
tagged with: firefox-addon
upvote count: 1
tagged with: firefox
answer count: 1
tagged with: javascript
has body: I am hacking away at my first addon, so the problem I am running into probably has either an obvious solution or my general approach is flawed. I am using the Add-on SDK. My lib/main.js contains an object foo. The data directory has the files sidebar.html and sidebar.js. I want to pass foo to the sidebar-script and then change the sidebar depending on the state of foo. In the minmal example I will just try to display the object. Minimal example: main.js: var foo = {"a": "b", "c": "d"}; var bar = require("sdk/ui/sidebar").Sidebar({ id: "sb", title: "foobar", url: "./sidebar.html" }); bar.show(); sidebar.html: &lt;!DOCTYPE html&gt; &lt;html&gt; &lt;body&gt; &lt;div id="foo-here"&gt; &lt;!-- to be modified by sidebar.js --&gt; &lt;/div&gt; &lt;/body&gt; &lt;script type="text/javascript" src="sidebar.js"&gt;&lt;/script&gt; &lt;/html&gt; sidebar.js: var foodiv = document.getElementById("foo-here"); var str = "", o; // magically get foo from main.js here for (o in foo) { if (foo.hasOwnProperty(o)) { str += "[" + o + " is " + foo[o] + "]"; } } foodiv.innerHTML = str; The sidebar docs explain how to listen for signals from the main script and call a function upon receiving a signal, but I can't figure out how to pass the object itself.

http://stackoverflow.com/a/29347285
downvote count: 1
answers question: http://stackoverflow.com/q/29274407
type: Answer
score: 1
upvote count: 2
has body: Does your jsonrpc-server take HTTP GET-requests? If your jsonrpc-server supports http at all, the more normal approach is using POST to transfer the jsonrpc request-data. Have you considered cross-domain restrictions from your browser? I would guess you should make a POST-request. The data looks correct, but all this depends on the jsonrpc-server. There are ususal ways to transport jsonrpc over http, but it is not part of the protocol itself. Make sure that the server accepts http post, and outputs the Access-Control-Allow-Origin header; see http://en.wikipedia.org/wiki/Cross-origin_resource_sharing If you're making more than one simple post, I'd suggest a js-lib for handling the jsonrpc, like: https://github.com/Textalk/jquery.jsonrpcclient.js

http://stackoverflow.com/q/29255986
type: Question
has title: How to trigger ready event on JQuery chosen plugin?
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/46715294
has comment: http://stackoverflow.com/comment/46715169
has comment: http://stackoverflow.com/comment/46714930
answer count: 0
has comment: http://stackoverflow.com/comment/46715185
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/14889466
has body: I am trying to bind an liszt:ready event of my list, to be invoked once that the list has been initialized by chosen. I follow the steps that here are describing without any success. This is my code: var initPreferredCollaboratorChosen = function () { $("#preferredCollaboratorChosenId").chosen({width: "95%"}).trigger("chosen:ready"); }; var initListener = function () { $("preferredCollaboratorChosenId").on("chosen:ready", function(){ alert("Hey, I am ready!"); }); initPreferredCollaboratorChosen() }; I try with "liszt:ready" instead "chosen:ready" as well. Can anyone that has work with this plugin tell me how make it?. Regards.

http://stackoverflow.com/q/29344099
has comment: http://stackoverflow.com/comment/46883734
has comment: http://stackoverflow.com/comment/46882891
score: 0
accepted answer: http://stackoverflow.com/a/29356968
answer count: 1
has body: I (newcomer to javascript etc) have fabricated the following webpage to get the number of rows in my Google fusion table. My div to receive the result however shows "0" indicating an error. Any suggestions? (I am also not sure about which links I have to add in the test count xx
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46876036
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/46891548
has answer: http://stackoverflow.com/a/29356968
tagged with: google-fusion-tables
has title: Why can I not get number of rows in my Google fusion table?
type: Question
tagged with: javascript

http://stackoverflow.com/comment/46834612
has text: Sorry, I experimented with my answer a bit and at some point the last line went missing (`fs.writeFile("./out.js", content.join('\n'), {});`), so that the output that once was valid was not updated at all. :) I've reverted my answer to a correct one. Could You please check if it works for You?
comment on: http://stackoverflow.com/a/29320830
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/29240031
downvote count: 1
has comment: http://stackoverflow.com/comment/46686259
type: Question
type: AnsweredQuestion
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29240095
score: 0
answer count: 2
possible better answer: http://stackoverflow.com/a/29240201
has body: I would like to hide the button and show it after the span its click on. How would I be able to show this? Next1 /* css */ .AtD_proofread_button { width: 126px; height: 30px; background-image: url('writing.gif'); display: block; margin: 0; padding: 0; }
has answer: http://stackoverflow.com/a/29240201
favorite count: 0
has answer: http://stackoverflow.com/a/29240095
has title: How to show button after clicking on a span?
upvote count: 1

http://stackoverflow.com/comment/46912113
has text: You can either assign value to the "translate" attribute or leave the attribute without value and add this value as text inside the HTML tag. Perhaps, in the rest working tags, you have inserted text, but not value to the "translate" attribute. You can also check http://angular-translate.github.io/docs/#/api for the possible valid alternative expressions.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29350930

http://stackoverflow.com/comment/46885526
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29349918
has text: Thanks, this is my error. But it's still not working after modifying this error.
type: AnswerComment

http://stackoverflow.com/comment/46758991
type: AnswerComment
has text: Right. Isn't it good convention to still do so, even if no need?
type: Comment
comment on: http://stackoverflow.com/a/29280544
score: 0

http://stackoverflow.com/a/29881832
answers question: http://stackoverflow.com/q/29334826
has body: I think the issue here is that you have 14 different series and 2 rows. If you try to style by series using something like series: { 4: { color: "blue"}} you'll change the color of that series for both rows. If you try to add a new column to the data for styling like this: var data = google.visualization.arrayToDataTable([ ['Grade', 'NG (% of total Results)', 'F (% of total Results)', 'E (% of total Results)', 'D3 (% of total Results)', 'D2(% of total Results)', 'D1 (% of total Results)','C3 (% of total Results)','C2 (% of total Results)','C1 (% of total Results)', 'B3 (% of total Results)','B2 (% of total Results)', 'B1 (% of total Results)','A2 (% of total Results)', 'A1 (% of total Results)', { role: 'annotation' }, {type: 'string', role: 'style'} ], ["English", 5, 5, 5,5, 5, 5, 5, 5,5, 5,5, 5,5 ,35, '', 'color: #cfc'], //use german[2] index of variables for each percent ["Maths", 5, 5, 5,5, 5, 5, 5, 5,5, 5,5, 5,20 ,20, '', 'color: #0f0'] ]); data.setCell(1,16, "color: red"); you'll only be able to set the style for that row without control over which column. Neither one of these is really what you want. My instinct here is that the data isn't actually formatted in a way that will work for this but I don't have any ideas at the moment. I figured I'd show you what I can do and maybe it will be enough to get you on the right track even if I can't see what that is.
score: 0
type: Answer

http://stackoverflow.com/comment/46926432
type: AnswerComment
score: 0
type: Comment
has text: That seems to be the solution.
comment on: http://stackoverflow.com/a/29372844

http://stackoverflow.com/comment/46802811
comment on: http://stackoverflow.com/a/29304214
has text: Damn, same answer, but you drew first.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/46793383
type: Comment
comment on: http://stackoverflow.com/a/29298814
type: AnswerComment
has text: This works to a point but if I have multiple top level records setting the [0] places the same .type & .ipAddress for all? How can I get around that?
score: 0

http://stackoverflow.com/comment/46712136
comment on: http://stackoverflow.com/a/29254539
type: AnswerComment
score: 0
type: Comment
has text: I already am doing that. I think the problem is to do with the Titanium.Geolocation.getCurrentPosition call as when I get rid of that and replace it with just `this.userLocation = {lon:fake, lat:fake};` it does get serialized.

http://stackoverflow.com/comment/46672863
has text: ............... *POOF!* @JayBlanchard ouch.
type: Comment
score: 2
type: QuestionComment
comment on: http://stackoverflow.com/q/29233306

http://stackoverflow.com/comment/46668330
type: Comment
type: QuestionComment
has text: Did you try running `eslint` directly?
score: 0
comment on: http://stackoverflow.com/q/29228575

http://stackoverflow.com/a/29254039
has comment: http://stackoverflow.com/comment/46722392
downvote count: 0
score: 1
upvote count: 1
has body: If you want to do this just pass the current element to controller &lt;input type="button" ng-click="deleteRepeatValue(element)" value="Delete"/&gt; &lt;/li&gt; $scope.deleteRepeatValue = function(element){ element.valueModel = ''; }; Fiddle
type: Answer
answers question: http://stackoverflow.com/q/29253916

http://stackoverflow.com/a/29247934
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29247807
has comment: http://stackoverflow.com/comment/46701325
has comment: http://stackoverflow.com/comment/46701048
has comment: http://stackoverflow.com/comment/46701171
has comment: http://stackoverflow.com/comment/46706742
score: 0
has comment: http://stackoverflow.com/comment/46701220
has comment: http://stackoverflow.com/comment/46706431
type: Answer
has comment: http://stackoverflow.com/comment/46701372
has comment: http://stackoverflow.com/comment/46700689
has body: First, you are trying to initialize the anchor tag which you are not adding in table. Second, you are initializing your plugin before appending to body which never works because it is not present in DOM. So try to add anchor tag in td and wrap your image to anchor tag like, $(" "+ " Select Image "+ " ").appendTo(tr); after appending the data you need to re-initialize your plugin var bss = $('a[rel=blogslideshow]').bsShow({ effect: 'Ladder', direction: 'horizontal' }); Live Demo
has comment: http://stackoverflow.com/comment/46700969
has comment: http://stackoverflow.com/comment/46706838
has comment: http://stackoverflow.com/comment/46793932
has comment: http://stackoverflow.com/comment/46794115
answers question: http://stackoverflow.com/q/29247807
has comment: http://stackoverflow.com/comment/46711723

http://stackoverflow.com/a/29267690
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/46737413
has body: Key concept: 1. php runs on server-side. 2. javascript runs on client-side Issue: server do not have variable that is being set by javascript because it's being set on client-side. Approach: Your javascript needs to send the variable to server before your php is being able to process the script with the varilable from javascript. Method: Use hidden form and have this form send variable to the php script. Perhaps this would fit your case but, generally speaking, it should. <form name="hidden" action="<?php $_SERVER['PHP_SELF']; ?>" method="post"> and your php code; add this line: $currentbidget=$_POST['addone'];
answers question: http://stackoverflow.com/q/29266726
downvote count: 0
has comment: http://stackoverflow.com/comment/46737233
has comment: http://stackoverflow.com/comment/46767484
type: Answer

http://stackoverflow.com/q/29258046
has comment: http://stackoverflow.com/comment/46719844
tagged with: web-audio-api
tagged with: promise
upvote count: 1
tagged with: audio-recording
has answer: http://stackoverflow.com/a/29300356
type: AnsweredQuestion
has title: For loop that calls a function with a promise works just once
score: 1
has body: I am trying to get the timbre.js recording function to create multiple buffers and store them in an object. The function that creates the recording and stores it in the 'songs' object is here: var generateSong = function(songtitle){ T.rec(function(output) { //... composition here, full at: http://mohayonao.github.io/timbre.js/RecordingMode.html output.send(synth); }).then(function(buffer) { var songobject = {} var song = T("buffer", {buffer:buffer}); songobject['song'] = song; songobject['buffer'] = buffer.buffer[0]; songobject['samplerate'] = buffer.samplerate; songs[songtitle] = songobject; console.log('test message'); }); }; Then I try and call this multiple times with a for loop like this: for(var i=0;i&lt;5;i++){ var songtitle = generateSongTitle(); var songobject = generateSong(songtitle); } However I am only getting one test message logged to the console, so the loop seems to be running once then stopping. I've tried moving the 'then()' onwards part of the code to inside the for loop itself (ie generateSongTitle().then(...) ), but that had the same problem. How can I get the generateSong() function to run multiple times? Thank you
type: Question
has comment: http://stackoverflow.com/comment/46767895
downvote count: 0
answer count: 1
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29300356
favorite count: 0

http://stackoverflow.com/comment/46678488
score: 0
has text: yeh, added id="input" to the input, and now it works. thanks
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29236003

http://stackoverflow.com/q/29311311
has answer: http://stackoverflow.com/a/29311348
answer count: 2
has title: How do I take away from a variable a certain number of times every second javascript/html?
tagged with: javascript
tagged with: variables
has body: I am trying to subtract a certain amount from variable every second. How do I do that? When I search 'how to take away from a variable javascript', two things show up, how to delete a variable, and how to take away a certain number off a variable all at once. So I just searched up, how to say 'per second' in javascript and I would try to figure the other part on my own and I could not find that either. Thanks in advance! ~John
has comment: http://stackoverflow.com/comment/46816271
score: 0
has answer: http://stackoverflow.com/a/29311357
type: UnansweredQuestion
type: Question

http://stackoverflow.com/a/35640881
answers question: http://stackoverflow.com/q/29322973
upvote count: 21
type: Answer
downvote count: 0
score: 21
has body: I tried several of these answers to no avail for android using react-native version = 0.19.0. For some reason, the resizeMode inside my stylesheet did not work appropriately? However, when sytlesheet had backgroundImage: { flex: 1, width: null, height: null, } and, within the Image tag I specified the resizeMode: &lt;Image source={require('path/to/image.png')} style= {styles.backgroundImage} resizeMode={Image.resizeMode.sretch}&gt; It worked perfectly! As mentioned above, you can use Image.resizeMode.cover or contain as well. Hope this helps!

http://stackoverflow.com/a/29280597
has comment: http://stackoverflow.com/comment/46963546
score: 3
upvote count: 3
has body: The effect of var c = []; c[10] = "foo"; is that c will look like this: c[0] === undefined c[1] === undefined c[2] === undefined c[3] === undefined c[4] === undefined c[5] === undefined c[6] === undefined c[7] === undefined c[8] === undefined c[9] === undefined c[10] === "foo" Having elements 0 through 10, the length of the array is therefore 11.
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/29280392

http://stackoverflow.com/comment/46852780
comment on: http://stackoverflow.com/a/29331810
type: Comment
has text: He should be. He is already using JavaScript.
score: 0
type: AnswerComment

http://stackoverflow.com/a/31426753
has comment: http://stackoverflow.com/comment/54412200
type: Answer
score: 2
downvote count: 0
has body: UPnP uses TCP/UDP packages for advertisement/discovery/etc. And since browsers cannot open network sockets, the short answer is: No. We can't use UPnP in a browser at the moment. The only glimmer of hope is the Network Service Discovery, which is still in development phase in most of the browsers. In Chrome for example you could enable it using chrome://flags/#enable-experimental-web-platform-features, and then would be able to do something like this (from W3C draft): function showServices( services ) { // Show a list of all the services provided to the web page for(var i = 0, l = services.length; i &lt; l; i++) console.log( services[i].name ); } navigator.getNetworkServices('zeroconf:_boxee-jsonrpc._tcp').then(showServices);
upvote count: 2
answers question: http://stackoverflow.com/q/29227445

http://stackoverflow.com/comment/46826499
comment on: http://stackoverflow.com/q/29317260
score: 0
type: Comment
has text: it means calling a javascript function from php
type: QuestionComment

http://stackoverflow.com/comment/125181571
has text: Unresolved function or method on() ... why i get this error
comment on: http://stackoverflow.com/a/29309328
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/29346065
upvote count: 1
accepted answer of: http://stackoverflow.com/q/29345761
has body: In order to accept the keyboard input from CTRL + SPACE you'll need to register an event handler (http://www.quirksmode.org/js/events_tradmod.html) and then listen out for input from the user. This will read from an array of keystroke events and check whether they're true, then fire event when keys have been pressed, when they get released the events are false. var map = {17: false, 32: false}; $(document).keydown(function(e) { if (e.keyCode in map) { map[e.keyCode] = true; if (map[17] &amp;&amp; map[32]) { // FIRE EVENT } } }).keyup(function(e) { if (e.keyCode in map) { map[e.keyCode] = false; } }); if you go to this link: cambiaresearch.com/articles/15/javascript-char-codes-key-codes, you'll find that the keycodes are all listed here. 17 and 32 is CTRL + SPACE. check out this guide on auto_complete with JQuery. This code will be executed where the event is fired. https://github.com/mliebelt/jquery-autocomplete-inner
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 1
answers question: http://stackoverflow.com/q/29345761

http://stackoverflow.com/a/29353822
has body: Here's what I came up with: final = _.map(var1, function(item) { return _.assign( _.find(final, _.pick(item, 'mapped_field')) || {}, item ); }); Where you're using map() to create the create the new final array. The array that's being mapped is var1, and we return a new object for each array item. The assign() function is used to override properties in final with properties from var1. To map the current final item with it's var1 item, you use find(). The pick() function is handy for constructing the filter object. Here, you say that you want to match against the mapped_field property. The logical || is necessary for the case where there's no match. For instance, the email object. This will just copy over all the var1 properties into the empty object, and return that.
has comment: http://stackoverflow.com/comment/46939895
has comment: http://stackoverflow.com/comment/46927672
downvote count: 0
has comment: http://stackoverflow.com/comment/46924376
has comment: http://stackoverflow.com/comment/46934691
has comment: http://stackoverflow.com/comment/46902578
has comment: http://stackoverflow.com/comment/46941192
score: 1
answers question: http://stackoverflow.com/q/29352160
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/46902490
has comment: http://stackoverflow.com/comment/46941994

http://stackoverflow.com/a/29249006
score: 3
type: AcceptedAnswer
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/29248876
accepted answer of: http://stackoverflow.com/q/29248876
upvote count: 3
has comment: http://stackoverflow.com/comment/46703193
has body: It takes a while to understand what you meant by redefining constructor. What you want to do is to call the parent's constructor when instantiating the child. So you don't want this, i.e. reassigning this.url = url, right? var child = function(url, anotherFancyArg){ this.url = url; this.anotherFancyArg = anotherFancyArg; } Do this instead: var child = function(url, anotherFancyArg){ proto.apply(this, arguments); } Now you can access url and anotherFancyArg inside your child instance using this reference: this.url, this.anotherFancyArg, e.g. var c = new child('google.com', 'abc'); console.log(c.url); // you get google.com here One more thing I noticed. This is wrong: child.prototype = Object.create(proto.prototype); child.prototype.constructor = proto.prototype.constructor; Do this instead: child.prototype = Object.create(proto.prototype); // you inherit from parent's prototype child.prototype.constructor = child; // but you instantiate the child object

http://stackoverflow.com/a/29236954
upvote count: 1
has comment: http://stackoverflow.com/comment/46680408
accepted answer of: http://stackoverflow.com/q/29236137
answers question: http://stackoverflow.com/q/29236137
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: You need to include the jQuery script before calling $(document).read
score: 1

http://stackoverflow.com/comment/46757584
type: AnswerComment
comment on: http://stackoverflow.com/a/29265708
type: Comment
has text: the second argument passed to the function will be the index, you could add another paramter name, e.g. `i` after the parameter `e`, and do someting with it inside the function before the `return`
score: 1

http://stackoverflow.com/comment/46789818
type: Comment
type: QuestionComment
has text: Here is a jsfiddle: http://jsfiddle.net/vz17omm5/3/
score: 0
comment on: http://stackoverflow.com/q/29256094

http://stackoverflow.com/a/29290571
downvote count: 0
upvote count: 11
accepted answer of: http://stackoverflow.com/q/29290539
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29290539
has body: The return statement in Javascript terminates a function. This code basically says that if !function1() (the opposite of function1()'s return value) is true or truthy, then just stop executing the funciton. Which is to say, terminate this function immediately. The semicolon is a statement terminator in javascript. If !function1() ends up being true or truthy, then the function will return and none of the code below it will be executed. Return can be used to return a value from a function, like: function returnFive(){ return 5; } Or, like in this case, it's an easy way to stop a function if--for some reason--we no longer need to continue. Like: function isEven(number){ /* If the input isn't a number, just return false immediately */ if(typeof number !== 'number') return false; /* then you can do even/odd checking here */ } As you suspected, this has nothing to do specifically with jQuery. The semicolon is there so that the Javascript engine knows that there are two statements: if(!function1()) return; function2(); Not just one statement, which you can see would totally change the program: if(!function1()) return function2();
type: Answer
score: 11

http://stackoverflow.com/comment/46840916
has text: That's why I said uncomment it. If the alert box is popping up and displaying `you have followed "some_user_here"`, and you instead want to close the window there, then simply replace the alert with `window.close();` instead.
comment on: http://stackoverflow.com/q/29324895
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29342795
has body: Just access the bound data as you would in any other handler function: function mousemoved(d,i) { // do something with d and i }
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29342670

http://stackoverflow.com/comment/46845231
score: 0
comment on: http://stackoverflow.com/q/29327365
type: Comment
type: QuestionComment
has text: Is the HTML you posted exactly as you have it? I can get your code working with your HTML and jQuery

http://stackoverflow.com/a/29348172
type: Answer
has body: There can be zones set for series that will enable change in color, fillColor and dashStyle. API reference: http://api.highcharts.com/highcharts#plotOptions.series.zones.dashStyle Example: http://jsfiddle.net/gh/get/jquery/1.7.2/highslide-software/highcharts.com/tree/master/samples/highcharts/series/color-zones-dashstyle-dot/ series: [{ data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4], zoneAxis: 'x', zones: [{ value: 8 }, { dashStyle: 'dot' }] }]
answers question: http://stackoverflow.com/q/29341927
score: 0

http://stackoverflow.com/q/29261191
has title: CSS transition of width of inline-block element with variable width
tagged with: css
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46733079
upvote count: 1
has body: So i have an inline-block element that has p tag with variable width ( p tag text and thus its width is dynamically set with script. ) How can i use css transition for width so change of text and width is nice and with animation and not abrupt. I made a simplified pen of what i mean: http://codepen.io/lukaMis/pen/azXjzm #my-element { border: 1px solid rgb(0, 180, 255); border-radius: 6px; display: inline-block; transition: width 0.6s ease; } tnx Have a nice day Luka
has comment: http://stackoverflow.com/comment/46725831
score: 1
type: Question
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/29275272
answers question: http://stackoverflow.com/q/29274826
downvote count: 0
upvote count: 2
type: Answer
score: 2
has body: You can look at plugins that help you do it. RestiveJS is an example. http://restivejs.com

http://stackoverflow.com/comment/46812095
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29299435
score: 1
has text: It does not look like a question about APEX. Probably, you need to add tags related to google maps and/or javascript.

http://stackoverflow.com/comment/46653647
comment on: http://stackoverflow.com/q/29220779
has text: Do a `console.log($('#some-div'))`. Are you sure the element exists, maybe it's loaded asynchronously?
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/46748688
comment on: http://stackoverflow.com/q/29274687
has text: Your `if` is written wrongly. I assume you need `==` instead of a single `=` and you need to remove the `;` after the `if` statement. See [this documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/if...else) for more info on `if` statements.
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/46792761
has text: yeah, it's good. Thanks again for a working solution, wish i could vote up :)
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29298688

http://stackoverflow.com/a/29407223
type: Answer
score: 0
answers question: http://stackoverflow.com/q/29371145
has body: The only possible way I found to solve the caching problem firefox was is "Versioning". Versioning forces the browser to get the page from the server and not the cache memory. This is easily done by providing a get parameter to the url you want to fresh get each time. An easy code to do this is the following. &lt;?php &lt;a href="your/url.com?v=".time()&gt; a random text &lt;/a&gt; ?&gt; Also you will have to do version control on the target page. This is also to be done. &lt;?php if(isset($_GET['v']) &amp;&amp; $_GET['v']!=time()){ header("location: your/url.com?v=".time()); } ?&gt; The previous code check if the "GET" parameter "v" is set and not equal to Now Timestamp. If that is true then the Web Server relocates the user to the same page but with updated parameter, thus requesting the page from the server and not the cache. This is the only way to force clear cache programmatically through php.

http://stackoverflow.com/q/29296700
score: 0
has body: I am trying to visualize some fusion tables data on google maps. I have a number of records with addresses grouped by area number. Basically what I would want to happen is the following: I pull data from ft For each record, I geocode the address and assign a custom marker according to the area number I visualize all the different records grouped by different markers Here is what I've done so far: This is the query to ft: var query = "SELECT 'Full Address' , Territory FROM " + tableid; query = encodeURIComponent(query); var gvizQuery = new google.visualization.Query( 'http://www.google.com/fusiontables/gvizdata?tq=' + query); Now I want to elaborate the query data gvizQuery.send(function(response) { var numRows = response.getDataTable().getNumberOfRows(); // For each row in the table, create a marker for (var i = 0; i &lt; numRows; i++) { var stringaddress = response.getDataTable().getValue(i, 0); var territory = response.getDataTable().getValue(i,1); **latlng**(stringaddress, function(data){ console.log(data); **createMarker**(data,territory,stringaddress);//callback }); } }); Here is the latlng function: that returns a google maps point from the string address function latlng(address,callback){ var latlng; var geocoder = new google.maps.Geocoder(); geocoder.geocode({ "address": address }, function(results,status) { if ( status == google.maps.GeocoderStatus.OK ) { latlng= new google.maps.LatLng(results[0].geometry.location.lat(), results[0].geometry.location.lng()); callback(latlng); } }); } And finally here is the create marker function var createMarker = function(coordinate, territory,address) { console.log("now drawing marker for " + coordinate + "found in territory number " + territory); var markerpath="images/icon"+territory+".png"; var marker = new google.maps.Marker({ map: map, position: coordinate, icon: new google.maps.MarkerImage(markerpath) }); google.maps.event.addListener(marker, 'click', function(event) { infoWindow.setPosition(coordinate); infoWindow.…
has title: Google maps custom markers issues
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46789721
has comment: http://stackoverflow.com/comment/46797009
has comment: http://stackoverflow.com/comment/46796946
has comment: http://stackoverflow.com/comment/46816683
has answer: http://stackoverflow.com/a/29301131
linked to: http://stackoverflow.com/q/28427255
has comment: http://stackoverflow.com/comment/46789600
type: Question
tagged with: google-maps
linked to: http://stackoverflow.com/q/20206618
has comment: http://stackoverflow.com/comment/46790429
answer count: 1
tagged with: javascript
linked to: http://stackoverflow.com/q/21222003
tagged with: google-maps-api-3
has comment: http://stackoverflow.com/comment/46796901

http://stackoverflow.com/q/29246894
has comment: http://stackoverflow.com/comment/46699070
has body: I tried to set the option value in the select field using document.getElementById("select").value="android"; But i want it to store as "android" in the optgroup "phones" Is there anyway to set value of option with the optgroup value.
answer count: 1
downvote count: 0
has answer: http://stackoverflow.com/a/29246964
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
score: 1
accepted answer: http://stackoverflow.com/a/29246964
upvote count: 1
type: Question
has title: set html option value with optgroup in select field using JavaScript
tagged with: javascript
tagged with: optgroup

http://stackoverflow.com/q/29303200
has comment: http://stackoverflow.com/comment/46801446
accepted answer: http://stackoverflow.com/a/29307847
answer count: 1
downvote count: 0
favorite count: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/46801366
score: 6
tagged with: angular-directive
has title: AngularJS directive watch parent size change
upvote count: 6
type: AnsweredQuestion
has body: Problem I have a simple directive that executes sizing updates on a particular element. This watches the window size and makes adjustments accordingly. MyApp.directive('resizeTest', ['$window', function($window) { return { restrict: 'AC', link: function(scope, element) { var w = angular.element($window); scope.$watch(function() { return { 'h': w.height(), 'w': w.width() }; }, function(newValue, oldValue) { // resizing happens here }, true); w.bind('resize', function() { scope.$apply(); }); } }; }]); This works just fine. It just so happens that inside of the div tag that is associated with, I have a child div. When the parent is resized, I want to make positioning alterations on the child element. However, I cannot get the trigger to fire. This gets called at startup, but does not get triggered when the element is resized or the window changes: MyApp.directive('centerVertical', ['$window', function($window) { return { restrict: 'AC', link: function(scope, element) { element.css({border: '1px solid #0000FF'}); scope.$watch('data.overlaytype', function() { $window.setTimeout(function() { console.log('I am: ' + element.width() + 'x' + element.height()); console.log('Parent is: ' + element.parent().width() + 'x' + element.parent().height()); }, 1); }); } }; }]); What type of binding or watch configuration should I be using to check for resizing of the parent element? Fiddle https://jsfiddle.net/rcy63v7t/1/
has answer: http://stackoverflow.com/a/29307847
type: Question
has comment: http://stackoverflow.com/comment/46802868
tagged with: javascript

http://stackoverflow.com/q/29351720
downvote count: 4
answer count: 1
tagged with: jquery
has body: I'm currently trying to make an image gallery that looks something like this website: http://www.sandrageringinc.com/artists/nancy-dwyer/ currently I have achieved this: http://port-80-rzczno273y.treehouse-app.com/ But I don't really know where to go next. I'm not fussed about styling as I can do that. Where I'm weak is in my functionality I just don't quite know what to do. Currently I've achieved to make the thumbnails fade into a bigger image when clicked. However I now want to be able to click the arrows and move to next picture in order of the thumbnails just like how the arrows work in the example I posted at the top . Like I said previously I'm just not sure how to achieve this and I'm looking for direction or suggestions on how to achieve the result. Thank in advance for any help. html code &lt;div id="container"&gt; &lt;div id="gallery"&gt; &lt;a href="img/large/dotted-large.jpg"&gt;&lt;img src="img/small/dotted-small.jpg"&lt;/a&gt; &lt;a href="img/large/gold-large.jpg"&gt;&lt;img src="img/small/gold-small.jpg"&lt;/a&gt; &lt;a href="img/large/purple-large.jpg"&gt;&lt;img src="img/small/purple-small.jpg"&lt;/a&gt; &lt;a href="img/large/dotted-large.jpg"&gt;&lt;img src="img/small/dotted-small.jpg"&lt;/a&gt; &lt;a href="img/large/gold-large.jpg"&gt;&lt;img src="img/small/gold-small.jpg"&lt;/a&gt; &lt;a href="img/large/purple-large.jpg"&gt;&lt;img src="img/small/purple-small.jpg"&lt;/a&gt; &lt;a href="img/large/dotted-large.jpg"&gt;&lt;img src="img/small/dotted-small.jpg"&lt;/a&gt; &lt;a href="img/large/gold-large.jpg"&gt;&lt;img src="img/small/gold-small.jpg"&lt;/a&gt; &lt;a href="img/large/purple-large.jpg"&gt;&lt;img src="img/small/purple-small.jpg"&lt;/a&gt; &lt;a href="img/large/dotted-large.jpg"&gt;&lt;img src="img/small/dotted-small.jpg"&lt;/a&gt; &lt;a href="img/large/gold-large.jpg"&gt;&lt;img src="img/small/gold-small.jpg"&lt;/a&gt; &lt;a href="img/large/purple-large.jpg"&gt;&lt;img src="img/small/purple-small.jpg"&lt;/a&gt; &lt;/div&gt; &lt;div id="p…
favorite count: 0
has title: Image gallery for website
score: -3
has comment: http://stackoverflow.com/comment/46889137
type: UnansweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/46888927
has answer: http://stackoverflow.com/a/29352032
tagged with: javascript
type: Question

http://stackoverflow.com/comment/46898474
score: 0
has text: Hmm, I still get "Cannot read property 'toLowerCase' of undefined" when I try p.properties.st.toLowerCase()
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/29356763

http://stackoverflow.com/comment/47376560
score: 0
has text: @meandre `0["toString"]` That's awesome, thanks for pointing it out.
comment on: http://stackoverflow.com/q/29250950
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/46755196
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29278548
score: 0
has text: add value="" in your input `alert(searchstring);` and see what is bee alerted

http://stackoverflow.com/q/29289629
has comment: http://stackoverflow.com/comment/46777158
has title: JQuery scrollTop not smooth on ios devices
type: UnansweredQuestion
tagged with: css
answer count: 0
tagged with: scroll
has body: as part of a bigger system I have a div which acts like a heading. JQuery is used to create a "fixed" effect where "scrollTop" is used to keep the header at the top. Overall this works, however on ios devices the scroll is not smooth at all and quite jumpy. The code which does the scroll looks similar to this: $('.mydiv').css('top', $passedVar.scrollTop()); I know that this can be resolved using "position: fixed;" but if it's possible to get a JQuery solution it would be much appreciated.
type: Question
has comment: http://stackoverflow.com/comment/46776718
tagged with: javascript
score: 0
tagged with: jquery

http://stackoverflow.com/comment/46743963
type: Comment
type: AnswerComment
has text: I get what you mean but how can I do this?
score: 0
comment on: http://stackoverflow.com/a/29271439

http://stackoverflow.com/a/29269411
has comment: http://stackoverflow.com/comment/46775714
accepted answer of: http://stackoverflow.com/q/29264843
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/29264843
score: 2
type: Answer
upvote count: 2
has body: When you have multiple check boxes with same path variables, they will be rendered with same names like below. &lt;form:checkbox path="deliveryStatus" value="notDelivered"/&gt; &lt;form:checkbox path="deliveryStatus" value="delivered"/&gt; Will be rendered as &lt;input id="deliveryStatus1" name="deliveryStatus" type="checkbox" value="notDelivered"/&gt; &lt;input id="deliveryStatus2" name="deliveryStatus" type="checkbox" value="delivered"/&gt; You can obtain the values of checkbox that were checked using the below. $("input[name='deliveryStatus']:checked").each(function (){ alert($(this).val()); }); If you just want to obtain the values of all checked no matter if they are checked or not, use the below. $("input[name='deliveryStatus']").each(function (){ alert($(this).val()); }); Hope this helps.

http://stackoverflow.com/comment/46891714
type: QuestionComment
comment on: http://stackoverflow.com/q/29352546
score: 0
has text: Take a global array having the number of elements equal in number of LIs. When each checkbox is clicked, call a function that gets the id of clicked checkbox/LI then set a 0/1 in the array with that respective array index you choose to the checkbox's ID AND each time at end of the function, iterate the array and get the records value on each index to check which ones are checked and which ones are'nt
type: Comment

http://stackoverflow.com/comment/46873856
type: Comment
type: QuestionComment
has text: I don't understand the logic of it... can you actually select more than one table? And if yes, what's the query supposed to look like?
comment on: http://stackoverflow.com/q/29342558
score: 0

http://stackoverflow.com/a/29292322
has comment: http://stackoverflow.com/comment/46838780
has comment: http://stackoverflow.com/comment/46814601
score: 0
type: Answer
has body: Yes, you have to use getUserMedia to do this. This will invoke a dialog on the client so user can confirm it's ok to record. https://developer.mozilla.org/en-US/docs/Web/API/Navigator/getUserMedia There is also record media api to do the actual recording. Not sure how ready it is, but it seem to work with FF. http://www.w3.org/TR/mediastream-recording/
has comment: http://stackoverflow.com/comment/46838754
has comment: http://stackoverflow.com/comment/46822550
answers question: http://stackoverflow.com/q/29292290

touch
tags question: http://stackoverflow.com/q/29358111
tags question: http://stackoverflow.com/q/29283660
tags question: http://stackoverflow.com/q/29285656
tags question: http://stackoverflow.com/q/29318227
type: Tag
tags question: http://stackoverflow.com/q/29234085
tags question: http://stackoverflow.com/q/29243843
tag name: touch
tags question: http://stackoverflow.com/q/29303393

http://stackoverflow.com/a/29409191
score: 1
has comment: http://stackoverflow.com/comment/47027430
upvote count: 1
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/29369101
has body: Spy on initialize instead. You're missing the initialization to be tested, add it to the test. describe "LeftSidebar app", -&gt; describe "initialization", -&gt; beforeEach -&gt; @spy = sinon.spy(@controller, "initialize") // APP.LeftSidebar.addInitializer() // this does nothing, drop it it "initializes LeftSidebar.Controller", -&gt; new @controller(); expect(@controller.initialize.calledOnce).toBeTruthy()
type: Answer
accepted answer of: http://stackoverflow.com/q/29369101

http://stackoverflow.com/comment/46789595
has text: This Works perfect. +1 For This. Thanks.
type: AnswerComment
comment on: http://stackoverflow.com/a/29296688
score: 0
type: Comment

http://stackoverflow.com/comment/46771942
type: Comment
type: QuestionComment
has text: Ahh, I'll have to remember that next time! I wondered why reinitializing would be slower.
comment on: http://stackoverflow.com/q/29285881
score: 0

http://stackoverflow.com/comment/46815673
type: Comment
has text: I came across the same issue; for Traceur the only solution was to parse the actual class code itself to extract the name, which I don't think qualifies as harmonious. I just swallowed the pill and switched to Babel; Traceur's development seems to be somewhat stagnant, and many ES6 features are poorly implemented. As you mentioned, `instance.constructor.name` and `class.name` return the class name in proper ES6.
type: QuestionComment
score: 3
comment on: http://stackoverflow.com/q/29310530

http://stackoverflow.com/a/29365365
answers question: http://stackoverflow.com/q/29365158
has body: use in form's onsubmit() event. so that it will work on enter press also. in your case use &lt;form id ="myForm" onsubmit="return validateForm()"&gt;
score: 0
type: Answer

http://stackoverflow.com/a/29266525
upvote count: 1
has body: I've used Template.currentData(); and managed to access the data in template.created but can someone explain why "this" in template.created and template.events refers to 2 different things?
score: 1
answers question: http://stackoverflow.com/q/29266287
downvote count: 0
has comment: http://stackoverflow.com/comment/46735038
has comment: http://stackoverflow.com/comment/46735601
type: Answer

http://stackoverflow.com/a/29360215
accepted answer of: http://stackoverflow.com/q/29359954
has comment: http://stackoverflow.com/comment/46904915
type: AcceptedAnswer
downvote count: 0
has body: The Audio.play method is not asynchronous. Thus your play() method 'waits' (blocks is the proper term) until it is finished before returning to the main loop. Most JavaScript calls are blocking (and single threaded) so your application will usually wait for something to complete before going to the next line. To do something asynchronous in JavaScript, you'll need to call your function using something like setTimeout or setInterval.
type: Answer
has comment: http://stackoverflow.com/comment/46904655
answers question: http://stackoverflow.com/q/29359954
score: 1
has comment: http://stackoverflow.com/comment/46904601
upvote count: 1

http://stackoverflow.com/a/29260839
upvote count: 1
answers question: http://stackoverflow.com/q/29260569
score: 1
accepted answer of: http://stackoverflow.com/q/29260569
type: AcceptedAnswer
downvote count: 0
has body: I would put a div in the a tag and attach the event to it Scroll to bottom here is some secondary information and then remove the remove false from the function. $('.scroll-to-bottom-link').click(function(){ $('html, body').animate({scrollTop : $('body').height() }, 800); }); JSFiddle
has comment: http://stackoverflow.com/comment/46724477
type: Answer

http://stackoverflow.com/comment/47264739
has text: Well, the ";" was not the problem. I tryed your advice and I want to thank for it, but the place you entered the code snippet is not the place I need to use it. I need to use it inside "get token": [screen 1](http://imageshack.com/a/img633/5208/rxYqPi.png) [screen 2](http://imageshack.com/a/img537/3046/GJGH9t.png) As you can see in second screen, there is no even any "context menu" as it is normally in soapui... Do you have any idea? Thanks!
comment on: http://stackoverflow.com/a/29525674
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/29330815
type: AnsweredQuestion
tagged with: associative-array
type: Question
answer count: 2
upvote count: 1
downvote count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/29330911
tagged with: string
favorite count: 0
score: 0
possible better answer: http://stackoverflow.com/a/29330911
has answer: http://stackoverflow.com/a/29331164
accepted answer: http://stackoverflow.com/a/29331164
has body: I have a string that looks like APP1_ENV1,ENV2,ENV3,APP2_ENV4,ENV5,APP3_ENV1 How to split this string so that i get the associative array like app's with its following env's? Example output- APP1[ENV1,ENV2,ENV3],APP2[ENV4,ENV5],APP3[ENV1]
has title: Splitting string based on last occurance of , and _

http://stackoverflow.com/a/29274389
has body: In my opinion you should learn some JavaScript before diving into CouchDB View functions. There are nice online tutorials, for example http://www.codecademy.com/en/tracks/javascript. After that consult the CouchDB Guide, in particular this chapter: http://guide.couchdb.org/editions/1/en/views.html
answers question: http://stackoverflow.com/q/29245025
score: 0
type: Answer

http://stackoverflow.com/comment/46823021
comment on: http://stackoverflow.com/q/29315051
score: 0
type: Comment
type: QuestionComment
has text: inside the processor.php is "<?php echo "success"; ?> and I use trim just to make I get the exact response (success) without any whitespaces.

http://stackoverflow.com/a/29318132
downvote count: 0
has body: Not that I know of. I would recommend that you use object-assign, a forward compatible module that will delegate to the ES6 Object.assign if available. It's extremely lightweight at 26 lines (as of this writing). var assign = require('object-assign'); var a = {a: 1}; var b = {b: 2}; var c = assign(a, b, {c:3}); console.log(c); // =&gt; {a: 1, b: 2, c: 3}
answers question: http://stackoverflow.com/q/29302467
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/a/29226175
has body: See the comments given in each function to see how it is working Three Output Colors Font Sizer This is my paragraph of stuff. Make it so Element Counter Count the Elements Five Input 1: Input 2: Compare Four Mouse Events
type: Answer
answers question: http://stackoverflow.com/q/29225997
score: 0
has comment: http://stackoverflow.com/comment/46687715

http://stackoverflow.com/q/29297430
has answer: http://stackoverflow.com/a/29297552
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/29297546
has answer: http://stackoverflow.com/a/29297546
accepted answer: http://stackoverflow.com/a/29297552
type: AnsweredQuestion
has title: Get Contents of previous table outside div
has comment: http://stackoverflow.com/comment/46790163
type: Question
score: 0
answer count: 2
has body: Below you find a piece of code. A container with two child div each containing a table. One is filled the other isn.'t. The [A] just above the second table should copy the contents of the first table into the second table. Dummy Data 1 <input type="text" name="car[20685519]" Copy from above table I've created some JQuery for that. However, it looks like prev() doesn't search out outside the current div.. How can I get this working? Demo in JSFiddle
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46790304

http://stackoverflow.com/a/29407208
type: Answer
has body: Ok, because I need to update list of RadDropDownList only on the load of page and after modal window closed. I decide to make it manually. I create a javascript function which call webservice and from result of webservice create DropDownListItems and add them to my list. Then call this function in the OnClientLoad eventhandler of my RadDropDownList and in the in OnClientClose eventhandler of RadWindow
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29336247
answers question: http://stackoverflow.com/q/29336247

http://stackoverflow.com/comment/46896085
score: 0
type: AnswerComment
has text: Yes, sharing the same div.
type: Comment
comment on: http://stackoverflow.com/a/29355011

http://stackoverflow.com/q/29224658
upvote count: 1
has comment: http://stackoverflow.com/comment/46657445
score: -1
type: Question
has comment: http://stackoverflow.com/comment/46657459
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/46657371
has body: Why is this script not loading at runtime or after I activate the submit button? I pulled it from a larger script and it seems it should run adhoc, but the variables do not appear in the console after pageload and the form does not submit. I have confirmed jquery is loaded properly before hand. Any one have any idea here? edit: Moved the script to the bottom of the page, now it runs but Im receiving a Uncaught SyntaxError: Unexpected token &lt; Not sure if I should make a new thread or leave this open, whats the preferred protocol? $('form.sidebar-form').submit(function(e) { e.preventDefault(); var $form = $(this); var email = $.trim( $form.find('input[name="emailAddress"]').val() ); var $response = $form.find('.form-response'); // Loading Animation var iter = 1; var interval = 500; var timeout, loading; loading = function() { var base = '&amp;bull;&amp;nbsp;'; var text = '&amp;nbsp;'; for(var i = 1; i &lt;= iter; i++) { text = text + base; } $response.html(text); if( iter === 3 ) { iter = 0; } else { iter++; } timeout = setTimeout(loading, interval); }; timeout = setTimeout(loading, interval); // Check Email Address var emailReg = /^([\w-\.\d\+]+@([\w-\d]+\.)+[\w-]{2,6})?$/; if( !emailReg.test( email ) || email == '' ) { clearTimeout( timeout ); $response.html('&lt;span class="error"&gt;Please enter a valid email address&lt;/span&gt;'); return; } // Eloqua Form Action var elqAction = 'https://s1224369867.t.eloqua.com/e/f2'; // Post Data var postData = { elqFormName : 'var-gameserver-0315', elqSiteId : 'hidden', elqCampaignId : '', emailAddress : email, preferredLanquage : 'English', singleCheckbox10 : 'on', hiddenField : 'var-Gameserver' }; $.ajax({ cache: false, data: postData, dataType: 'jsonp', headers: { 'cache-control': 'no-cache' }, type: 'POST', url: elqAction }).always(function(data, status) { clearTimeout( timeout ); if( status === 'success' || status === 'parsererror' ) { $response.html('&lt;span class="success"&gt;Thanks for your interest in var&lt;/span…
has answer: http://stackoverflow.com/a/29224672
has comment: http://stackoverflow.com/comment/46657385
has comment: http://stackoverflow.com/comment/46657520
has title: Jquery script not loading at runtime edit: unexpected token
answer count: 1
has comment: http://stackoverflow.com/comment/46657592
favorite count: 0
type: UnansweredQuestion
downvote count: 2

http://stackoverflow.com/q/29366713
has body: I have a div with 2 span as a link, I want to add active class on both span when mouse enters the container div i.e. fos-search-items var $hover_element = $('.fos-search-items'); .mouseenter(function() { $(this).find("span").addClass('fos-db-active'); }) .mouseleave(function() { $(this).find("span").removeClass('fos-db-active'); })
favorite count: 0
upvote count: 2
has answer: http://stackoverflow.com/a/29366770
has comment: http://stackoverflow.com/comment/46915947
possible better answer: http://stackoverflow.com/a/29366764
has answer: http://stackoverflow.com/a/29366777
score: 2
has answer: http://stackoverflow.com/a/29366764
type: AnsweredQuestion
type: Question
downvote count: 0
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/29366777
answer count: 3
has title: Adding a active class to all span within a div

http://stackoverflow.com/comment/46645725
score: 0
comment on: http://stackoverflow.com/q/29218235
has text: If addTab returns false, nothing wrong that I know of...
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46930012
has text: http://docs.fineuploader.com/branch/master/api/options.html#formatFileName
comment on: http://stackoverflow.com/q/29348483
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29292952
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29293544
tagged with: ajax
answer count: 2
has body: So I'm working on this page: http://sitesdemo.mghospedagem.com/ivam-entregas/3/33209.html And I'm facing a problem: It uses SMTP to send data to an Email, but the only data that is being sent is from the fields "Nome" and "Email". The other fields "Endereço de Partida", "Endereço de Chegada" and "Detalhes do Serviço" are simply empty on submission. Which php code is: <?php /* * Vinteum Desenvolvimento * tiago@vinteum.com */ require_once('PHPMailer_5.2.1/class.phpmailer.php'); $nome = $_POST['nome']; $email = $_POST['email']; $msg = $_POST['txtDetalhes']; $end1 = $_POST['1']; $end2 = $_POST['txtEnderecoChegada']; try { $mail = new PHPMailer(true); //New instance, with exceptions enabled $body .= " Pedido de orçamento para entrega "; $body .= "Nome: $nome "; $body .= "E-mail: $email "; $body .= " "; $body .= "Mensagem: $msg"; $body .= $msg; $body .= " "; $body .= "Endereço de partida: $end1 "; $body .= "Endereço de chegada: $end2 "; $body .= " "; $body .= "----------------------------"; $body .= " "; $body .= "Enviado em ".date("h:m:i d/m/Y")." por ".$_SERVER['REMOTE_ADDR'].""; //Mostra data e Endereço IP $body .= " "; $body .= "----------------------------"; $mail->IsSMTP(); // tell the class to use SMTP $mail->SMTPAuth = true; // enable SMTP authentication $mail->Port = 587; // set the SMTP server port, geralmente porta 25 ou 587 $mail->Host = "mail.xxxxxxx.com"; // SMTP server $mail->Username = "test@xxxxxxxx.com"; // SMTP server username $mail->Password = "xxxxxxxxx"; // SMTP server password //$mail->IsSendmail(); // tell the class to use Sendmail $mail->AddReplyTo($email, $nome); //Responder para $mail->From = $email; //De E-mail $mail->FromName = $nome; //De Nome $to = "myemail@hotmail.com"; //Para $mail->AddAddress($to); $mail->Subject = "Orçamento para entrega"; //Assunto $mail->AltBody = "Para ver essa mensagem utilize um cliente com suporte HTML!"; // optional, comment out and test $mail->WordWrap = 80; // set word wrap $mail->MsgHTML($body); $mail->IsHTML(t…
has title: Ajax form data php POST not working
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
favorite count: 0
upvote count: 2
type: UnansweredQuestion
tagged with: php
score: 2
type: Question
has answer: http://stackoverflow.com/a/29293108
has comment: http://stackoverflow.com/comment/46782413

http://stackoverflow.com/q/29250108
has comment: http://stackoverflow.com/comment/46704512
tagged with: javascript
score: -1
has answer: http://stackoverflow.com/a/29250421
possible better answer: http://stackoverflow.com/a/29250373
has comment: http://stackoverflow.com/comment/46704486
has body: I'm trying to write a function that will find which collection of numbers in the array adds up to the largest sum, and puts that number into the new array: var num = ['267453', '345678', '876787']; var newArray = []; I'm actually at a loss here and not sure how to get started on this problem. Can someone help get me off on the right foot?
downvote count: 2
has answer: http://stackoverflow.com/a/29250373
upvote count: 1
accepted answer: http://stackoverflow.com/a/29250344
has comment: http://stackoverflow.com/comment/46704915
favorite count: 0
has answer: http://stackoverflow.com/a/29250344
answer count: 4
type: AnsweredQuestion
has title: Find numbers with largest sum (Javascript)
has comment: http://stackoverflow.com/comment/46704451
has answer: http://stackoverflow.com/a/29250280
type: Question

http://stackoverflow.com/a/29347734
has comment: http://stackoverflow.com/comment/46881360
type: Answer
upvote count: 4
has comment: http://stackoverflow.com/comment/46881970
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29347593
has comment: http://stackoverflow.com/comment/46901182
answers question: http://stackoverflow.com/q/29347593
score: 4
has body: The only time you should use new Array() with any parameters is the single parameter case where you wish to create an (empty) array of the specified length. There is no other case when new Array() with any number of parameters (including zero) is preferred over an array literal. Indeed the array literal should be used wherever possible, because whilst it's possible to overwrite the function Array() so that it does something else (perhaps malicious) it's impossible to subvert the array literal syntax.
type: AcceptedAnswer

http://stackoverflow.com/a/37416385
type: Answer
has comment: http://stackoverflow.com/comment/87296352
has comment: http://stackoverflow.com/comment/87242186
has comment: http://stackoverflow.com/comment/72070709
answers question: http://stackoverflow.com/q/29280945
has body: I updated the solution outlined in the answer to support Ionic 1.0.3. The Plunker can be found here HTML Example below shows using ng-disabled property also. Simple Example: Disabled Example: Custom text: Airplane Mode
score: 0

arrow-functions
tag name: arrow-functions
tags question: http://stackoverflow.com/q/29268866
type: Tag

http://stackoverflow.com/q/29266614
has comment: http://stackoverflow.com/comment/46735043
has title: My code works in tags but doesn't work in an external file
score: 0
type: Question
accepted answer: http://stackoverflow.com/a/29266671
tagged with: javascript
possible better answer: http://stackoverflow.com/a/29266674
tagged with: jquery
has answer: http://stackoverflow.com/a/29266674
has body: Was just wondering if someone could be able to help me out. I've come across a strange issue that i've never encountered and I have no idea how to solve it : Welcome to Edge Hill Computing my javascript file and my jquery file is imported here. Which "should" to the external jquery file. But it doesn't, i have to run the code from there with script tags. Any possible solution? If it helps the code in the Global.js is this : $(document).ready(function(){ $("#txtbox").keyup(function(){ var name = $('#txtbox').val(); $('#display').html((name)); }); });
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29266707
has comment: http://stackoverflow.com/comment/46735009
has answer: http://stackoverflow.com/a/29266671
type: AnsweredQuestion

http://stackoverflow.com/comment/46831274
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29319451
has text: semantic ui offers validation too, http://semantic-ui.com/behaviors/form.html#/examples I will try this if it captures.

http://stackoverflow.com/a/29236944
type: Answer
score: 1
upvote count: 1
has body: The click function only accepts a single handler function. To achieve the behaviour you want, use a single handler and toggle() the element. Try this: $(".mailing-list").click(function(e) { e.preventDefault(); $(".mailing-list-input").toggle(); }); Example fiddle Note I also added preventDefault() to stop the default link behaviour.
downvote count: 0
answers question: http://stackoverflow.com/q/29236798

http://stackoverflow.com/a/29222628
has comment: http://stackoverflow.com/comment/46655641
type: Answer
accepted answer of: http://stackoverflow.com/q/29222415
downvote count: 0
answers question: http://stackoverflow.com/q/29222415
has comment: http://stackoverflow.com/comment/46654051
has comment: http://stackoverflow.com/comment/46655722
score: 1
has body: You could go ahead an evaluate python in the browser (with Skulpt), but it seems like a lot of overhead just so you can run a snippet of code. Take it as an opportunity to learn some javascript!
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46654992

http://stackoverflow.com/comment/46719945
type: QuestionComment
type: Comment
score: 1
has text: In your example code the `<foo-list>` tag is not even used...
comment on: http://stackoverflow.com/q/29258825

http://stackoverflow.com/comment/46806375
comment on: http://stackoverflow.com/q/29305347
type: Comment
score: 0
has text: I've got it. I had `function selectColor(gencolor){` but needed `function selectColor(){`
type: QuestionComment

http://stackoverflow.com/q/29250534
tagged with: firefox-addon
upvote count: 21
tagged with: firefox
answer count: 1
tagged with: dom-events
favorite count: 0
has comment: http://stackoverflow.com/comment/46705777
type: AnsweredQuestion
score: 19
type: Question
accepted answer: http://stackoverflow.com/a/29254154
has comment: http://stackoverflow.com/comment/46709944
tagged with: javascript
has body: I am developing a virtual keyboard extension for Firefox. One of the features of this extension is converting the keys the user presses to another layout. Example: I need to type text on Bashkir layout but my OS does not support it. So, I can use this virtual keyboard extension and not change the system settings. It's needed on Windows XP which does not support many languages. I used event.keyCode to detect which key was pressed. I used it because it detects the key code despite the system layout. But I missed that in Firefox if the keyboard is a non-English layout, event.keyCode doesn't work correctly with some keys, namely [ ] ; ' , . / and \. If I type the q key, keyCode returns 81 and if I type in Russian й, which is the same key, keyCode also returns 81. But If I type the [ key, keyCode returns 219 and if I type in Russian х, which is the same key, keyCode returns 0 . Do any keyCode alternatives exist?
has answer: http://stackoverflow.com/a/29254154
has title: event.keyCode alternative
downvote count: 2

http://stackoverflow.com/a/29237683
has body: It's a matter of moving all the current contents, then removing the node: //Start with your original element var elem = document.getElementById('test'); //While it contains children, append the first to the parent node //This will also remove it from the current element while (elem.childNodes.length &gt; 0) { elem.parentNode.appendChild(elem.childNodes[0]); } //Finally remove the element elem.parentNode.removeChild(elem);
type: Answer
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/29237376
upvote count: 2

http://stackoverflow.com/comment/46646701
score: 1
has text: This isn't really an answer, by why don't you structure data as `data: { car: { model: "Mercedez", color: "Blue" } }`
type: QuestionComment
comment on: http://stackoverflow.com/q/29218820
type: Comment

http://stackoverflow.com/q/29315205
possible better answer: http://stackoverflow.com/a/29315246
type: Question
has title: How to create simple load more in javascript
has answer: http://stackoverflow.com/a/29315246
tagged with: javascript
tagged with: jquery
score: 0
answer count: 2
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
downvote count: 1
favorite count: 0
has body: I have many words in html element i want to show 4 to 5 words and hide all word when click on more link all words will show how i can do this with javascript here is my html code Archie Adamos, Brad Johnson, Eric Hahn, Frederick Bailey, Jeff Griffith, Jesse Metcalfe, Josie Bissett, Keegan Connor Tracy, Ken Metcalfe, Mark Venturini, Matthew Settle, Meghan Ory, Rick Dean, Romy Diaz, Ruben Ramos, Vernon Wells, Virginia Madsen
has answer: http://stackoverflow.com/a/29315255
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29315255

http://stackoverflow.com/comment/46846060
score: 0
type: AnswerComment
type: Comment
has text: @PiotrŁużecki self-fixing bugs are the best kind ;)
comment on: http://stackoverflow.com/a/29327768

http://stackoverflow.com/comment/46787694
has text: 1. It doesn't look like you're using the `sendAJAX()` response. How do you know that the content is empty? Do you by any chance look at the `casper.on("resource.received", function(res){...});` event output? 2. Check that exactly the same request is sent. Maybe there are headers that are present during form submission which aren't present during the XHR. Use for example wireshark to compare those requests.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29295598
score: 0

http://stackoverflow.com/a/29281636
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/29281166
upvote count: 1
answers question: http://stackoverflow.com/q/29281166
score: 1
has body: Looks like you're running it in HTML context: In that case you must use '&amp;lt;MiddleName&amp;gt; which will be displayed as &lt;MiddleName&gt; when rendered in HTML var content = 'Robert John Testy' content = content.replace('John','&amp;lt;MiddleName&amp;gt;'); Just demonstrating the difference between both: &lt;html&gt; &lt;body&gt; &lt;div id="results1"&gt; &lt;/div&gt; &lt;div id="results"&gt; &lt;/div&gt; &lt;script type="text/javascript"&gt; var content = 'Robert John Testy' content = content.replace('John','&amp;lt;MiddleName&amp;gt;'); document.querySelector("#results").innerHTML =content; content = 'Robert John Testy' content = content.replace('John', '&lt;MiddleName&gt;'); document.querySelector("#results1").innerHTML =content; &lt;/script&gt; &lt;/body&gt; &lt;/html&gt;

http://stackoverflow.com/q/29282061
has comment: http://stackoverflow.com/comment/46765455
has comment: http://stackoverflow.com/comment/46762544
has answer: http://stackoverflow.com/a/29282752
tagged with: regex
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46762391
tagged with: analysis
type: Question
tagged with: function
has comment: http://stackoverflow.com/comment/46764021
answer count: 1
tagged with: javascript
has title: What exactly is this CompareAmounts function doing? (Analysis)
tagged with: jquery
has body: I am analyzing a long JS code but I'm new to JS. Despite my best efforts, I have only been able to analyze around 85% of the code. This function CompareAmounts is still eluding me. This JS is supposed to run on a bank webpage, and I can't understand what this function is doing. Could anyone please point out the functionality to me? function CompareAmounts(a, b) { var c = /^\-/gi; var d = ""; var e = ""; if (a.match(c)) { a = a.replace(c, ""); a = a.replace(".", ""); a = a.split(","); a[0] = (parseInt(a[0]) - parseInt(b)).toString(); if (parseInt(a[0]) &lt; 0) { a[0] = (a[0] * -1).toString(); } else { d = "-"; e = ""; } } else { a = a.replace(".", ""); a = a.split(","); a[0] = (parseInt(a[0]) + parseInt(b)).toString(); } if (a[0].length &gt; 3) { var f = a[0].substr(0, a[0].length - 3); var g = a[0].substr(a[0].length - 3, a[0].length); a[0] = f + "." + g; } a = d + a.toString() + e; return a; }
score: 0
accepted answer: http://stackoverflow.com/a/29282752

http://stackoverflow.com/comment/46868873
has text: @AndreySidorov I ran about 5-10 requests and the 400/700ms is an average time, I even excluded the first time connections.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29336688

http://stackoverflow.com/comment/46839598
type: Comment
has text: I guess what's surprising about it to me is that javascript doesn't just treat the bracket notation like a method that's going to return a processed value, it treats it like an actual property. `'hello'.hasOwnProperty(0)` will actually return true. It makes sense from an implementation perspective, I just really wasn't expecting it.
comment on: http://stackoverflow.com/q/29324035
score: 0
type: QuestionComment

http://stackoverflow.com/q/29261188
accepted answer: http://stackoverflow.com/a/29261360
upvote count: 2
score: 2
type: AnsweredQuestion
tagged with: knockout.js
has answer: http://stackoverflow.com/a/29261360
type: Question
has title: Knockout: Update item in an observableArray
has body: I'm trying to update an object which is in an observableArray, like this: var vm = { tests: ko.observableArray([{input: 'bar'}]) }; vm.tests.push(ko.observable({input: 'foo'})); ko.applyBindings(vm); setTimeout(function () { vm.tests()[1]().input = '123'; }, 500); For some reason the change applied in the setTimeout does not reflect in the DOM. Any suggestions why? And, is there a way with knockout to watch an array and also the values it contains ? DEMO
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0

http://stackoverflow.com/q/29282626
answer count: 0
downvote count: 0
has comment: http://stackoverflow.com/comment/46792499
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46779463
has comment: http://stackoverflow.com/comment/46764638
has comment: http://stackoverflow.com/comment/46771477
type: Question
has comment: http://stackoverflow.com/comment/46764760
has comment: http://stackoverflow.com/comment/46789270
has comment: http://stackoverflow.com/comment/46763158
score: 1
has body: I am using this Image Picker jQuery plugin (http://rvera.github.io/image-picker/) to select images in PicDiv to delete. After select images I click DeleteButton to delete selected images by DeletePic.php and want to refresh PicDiv but after ajax request, javascript no longer work. I have found the answer from other duplicate question that told me to binded event handlers but It still doesn't work &lt;script&gt; $(document).ready(function () { $(".image-picker").imagepicker({ limit_reached: function () { alert('Limit is 5'); } }); }); $(document).on('click',"#DeleteButton",function(){ /*get image path*/ var req = $("div[class='thumbnail selected']").children('img'); var imagessource = []; var srcc = []; $(req).each(function (datakey, datavalue) { src = $(datavalue).attr('src'); imagessource.push(src); }); /*delete and refresh*/ var pp = $.post("DeletePic.php", { 'del[]': imagessource }, function(){ alert("OK"); } ) .done(function(){ $('#PicDiv').load(location.href + " #PicDiv"); }) }); &lt;/script&gt; html &lt;div id="PicDiv"&gt; &lt;?php $arr = array(); $us = $_SESSION['Username']; $i = 0; mysql_connect("localhost", "AAAA", "AAAA"); mysql_select_db("test"); $strSQL = "SELECT path FROM tb_pic WHERE Username = '" . $us . "' "; $objQuery = mysql_query($strSQL); ?&gt; &lt;select class="image-picker" multiple="multiple" data-limit="5"&gt; &lt;?php while ($objResult = mysql_fetch_array($objQuery)) { ?&gt; &lt;option data-img-src="&lt;?php echo $objResult['path']; ?&gt;" value="&lt;?php echo $i; ?&gt;"&gt;AAAAAAAA&lt;/option&gt; &lt;?php $i++; } ?&gt; &lt;/select&gt; &lt;/div&gt; &lt;input id="DeleteButton" name="Submit" type="button" value="Delete"&gt;
has comment: http://stackoverflow.com/comment/46791983
has comment: http://stackoverflow.com/comment/46765034
has title: javascript no longer work after ajax request
tagged with: jquery-plugins
has comment: http://stackoverflow.com/comment/46790257
has comment: http://stackoverflow.com/comment/46792060
upvote count: 1
has comment: http://stackoverflow.com/comment/46764162
has comment: http://stackoverflow.com/comment/46763384
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/46763009

http://stackoverflow.com/a/29364846
answers question: http://stackoverflow.com/q/29364604
type: Answer
score: 0

http://stackoverflow.com/comment/46725182
has text: Okay, so how to retrieve the value.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29261507
score: 0

http://stackoverflow.com/a/29270476
has body: Using: https://css-tricks.com/snippets/css/transparent-background-images/ http://jsfiddle.net/wby2xf6f/1/ div { width: 200px; height: 200px; display: block; position: relative; } div:after { transition: opacity 5s; content: ""; background: url(http://www.wina.ugent.be/style/img/h1.png); opacity: 0; top: 0; left: 0; bottom: 0; right: 0; position: absolute; z-index: -1; } div.fadein:after { opacity:1; } And then add the class .fadein with Javascript/JQuery. http://jsfiddle.net/wby2xf6f/1/ On a sidenote: it might be better to select the background-image at random on the server side (using php/ruby/whatever). Updated, but less semantic version: http://jsfiddle.net/wby2xf6f/5/ .fill { position:absolute; height:100%; width:100%; z-index:-1; display:none; background:url(http://www.wina.ugent.be/style/img/h1.png); } $('.fill').fadeIn(5000)
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46741857
has comment: http://stackoverflow.com/comment/46741942
type: Answer
accepted answer of: http://stackoverflow.com/q/29270349
answers question: http://stackoverflow.com/q/29270349

http://stackoverflow.com/a/29324051
has body: There is no "character" data type in JavaScript. All that a portion of a string can be is a string. Note that a string is not an object. A string is a primitive value. Accessing portions of strings with the [] involves first an implicit wrapping of the string value in a String instance (resulting in an object instance). The [] operator is applied to that object, you get the result (a string), and then the wrapper is thrown away. (Since the wrapper object is ephemeral the runtime is allowed to sneak around actually implementing the semantics in exactly that way.)
has comment: http://stackoverflow.com/comment/46838932
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46838861
score: 1
has comment: http://stackoverflow.com/comment/46838961
type: Answer
has comment: http://stackoverflow.com/comment/46838903
upvote count: 1
accepted answer of: http://stackoverflow.com/q/29324035
answers question: http://stackoverflow.com/q/29324035
downvote count: 0

http://stackoverflow.com/comment/46671353
comment on: http://stackoverflow.com/a/29232052
type: AnswerComment
score: 0
type: Comment
has text: Yes the sub menu is added and smooth scroll is working, but the sticky nav is still not working, the java script i have pasted in header? or am i meant to paste somewhere else?

http://stackoverflow.com/comment/46792243
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29265688
has text: @Ivancho you should try their bug report tool then: http://lively-web.org/issues/IssueTemplate.html (also done in Lively itself)
type: AnswerComment

http://stackoverflow.com/comment/46663154
comment on: http://stackoverflow.com/q/29228163
score: 1
has text: replace this show_element; with show_element() & hide_element; with hide_element()
type: Comment
type: QuestionComment

clock
tags question: http://stackoverflow.com/q/29244662
type: Tag
tag name: clock

http://stackoverflow.com/q/29231694
tagged with: minko
has body: I've some problem in sending a simple message in overlay-example of Minko library. I tried use the c++ code of this example without modifying it, while I add a Minko.addListener in my javascript. The code of the js is here: 0 0 0 : 0 I really don't understand where is the problem. I add the listener, and my very simple function (tested with a classical addListener("click", ... ) is working. Here I use Minko.addListener("hello", ... ) that is sent by c++ (line 113 of the main.cpp of that example).
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/28930210
type: Question
answer count: 1
accepted answer: http://stackoverflow.com/a/29232814
tagged with: javascript
linked to: http://stackoverflow.com/q/29209300
score: 0
has answer: http://stackoverflow.com/a/29232814
has title: Very simple js test that doesn't work with Minko
tagged with: c++
linked to: http://stackoverflow.com/q/29206609

conflict
tag name: conflict
tags question: http://stackoverflow.com/q/29295808
tags question: http://stackoverflow.com/q/29283449
type: Tag

http://stackoverflow.com/comment/46707810
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29251806
has text: Ok. Leave about different browsers.Can I have this functionality in same browser with different tabs opened?
score: 0

http://stackoverflow.com/a/29310683
accepted answer of: http://stackoverflow.com/q/29284446
type: AcceptedAnswer
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/29284446
score: 2
upvote count: 2
has body: The contents of the directive are removed during the compile phase because your directive has transclude: true (I'm assuming so, since you are using ng-transclude). In this case, the contents are available via the passed-in transclude function (this is actually what ng-transclude uses under the covers). transclude function is the 5th parameter to the link (or pre-link) function: link: function(scope, element, attrs, ctrls, transclude){ var transcludedContents; // jqLite of the contents transclude(function(clone){ transcludedContents = clone; }); // do whatever you do to extract ng-message values from transcludedContents // just remember, that it could also come in the form: // &lt;ng-message when="required"&gt; and // &lt;div ng-message-exp="errorMessage.type"&gt; } Possibly the lazier among us would not want to deal with DOM counting, and so you could create another handler for ng-message directive that interacts with your my-directive to register itself: .directive("myDirective", function() { return { transclude: true, templateUrl: "myDirective.template.html", controller: function() { var messages = []; this.registerNgMessage = function(val) { messages.push(val); }; } }; }) .directive("ngMessage", complementaryNgMessageDirective) .directive("ngMessageExp", complementaryNgMessageDirective); function complementaryNgMessageDirective() { return { priority: 10, // must be higher than ngMessage, because ngMessage is terminal require: "^?myDirective", // must be optional not to break existing code link: function(scope, element, attrs, myDirectiveCtrl) { if (!myDirectiveCtrl) return; // do nothing, if not paired with myDirective var staticExp = attrs.ngMessage || attrs.when; var dynamicExp = attrs.ngMessageExp || attrs.whenExp; var val; if (dynamicExp) { val = scope.$eval(dynamicExp); } else { val = staticExp; } myDirectiveCtrl.registerNgMessage(val); } }; }

http://stackoverflow.com/comment/46741458
comment on: http://stackoverflow.com/a/29270242
type: Comment
score: 0
type: AnswerComment
has text: I would not say it is optional to deregister the watch, you should always be aiming to remove watchers once you are done with them. You also don't need to clutter the scope with the watch deregistration function, it only needs to be a local variable.

http://stackoverflow.com/a/29252594
accepted answer of: http://stackoverflow.com/q/29252307
score: 1
answers question: http://stackoverflow.com/q/29252307
has comment: http://stackoverflow.com/comment/46710533
has comment: http://stackoverflow.com/comment/46711602
has comment: http://stackoverflow.com/comment/46710369
type: AcceptedAnswer
downvote count: 0
has body: function get_cookie(a) { var b = a + "="; // Getting argument a and assigning it to var b appending = var c = ""; // defining variable c if (document.cookie.length &gt; 0) { //checking cookie length in browser offset = document.cookie.indexOf(b); // checking b exists or not if (offset != -1) { // if b exists offset += b.length; // getting no of string and assigning it to offset end = document.cookie.indexOf(";", offset); //checking if ';' is present if (end == -1) { // if ';' is not there in cookie string, end = document.cookie.length; - // cookie is not set, SO assigning length to the variable end } c = unescape(document.cookie.substring(offset, end)); // assigning those values to c } } return c; // returning new cookie. }
has comment: http://stackoverflow.com/comment/46710462
type: Answer
upvote count: 1

testing
tags question: http://stackoverflow.com/q/29351499
tags question: http://stackoverflow.com/q/29367102
tags question: http://stackoverflow.com/q/29285960
tags question: http://stackoverflow.com/q/29354731
tags question: http://stackoverflow.com/q/29334775
tags question: http://stackoverflow.com/q/29344506
tag name: testing
tags question: http://stackoverflow.com/q/29311154
tags question: http://stackoverflow.com/q/29252326
tags question: http://stackoverflow.com/q/29265730
tags question: http://stackoverflow.com/q/29236968
type: Tag
tags question: http://stackoverflow.com/q/29328029
tags question: http://stackoverflow.com/q/29357245
tags question: http://stackoverflow.com/q/29297717
tags question: http://stackoverflow.com/q/29278142
tags question: http://stackoverflow.com/q/29330464

http://stackoverflow.com/comment/46806919
score: 0
has text: that's not a compass, that's orientation sensor code you show. without a 2nd input, you have no way to isolate interference and correct. you can divide the numbers into smaller integers to quiet down the noise, or put in a trap that needs a shift of 5 or more to do something...
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29306114

http://stackoverflow.com/q/29345394
has body: I'm writing a program that should filter and print the files of the given directory from the command line based on the file type. mymodule.js : var fs = require('fs'); var result=[]; exports.name = function() { fs.readdir(process.argv[2], function (err, list) { for(var file in list){ if(list[file].indexOf('.'+process.argv[3]) !== -1){ result.push(list[file]); } } }); }; And in my actual file index.js: var mymodule = require('./mymodule') console.log(mymodule.name()); When the run the command &gt; node index.js SmashingNodeJS js //In SmashingNodeJS folder print all the .js files The console.log is printing undefined, please let me know what I am doing wrong here and how to return/bind the content to exports.
has comment: http://stackoverflow.com/comment/46876782
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/46876747
type: Question
has comment: http://stackoverflow.com/comment/46876971
tagged with: javascript
has answer: http://stackoverflow.com/a/29345607
has comment: http://stackoverflow.com/comment/46877131
has title: How to return array from module in NodeJS
answer count: 1
downvote count: 0
favorite count: 0
type: UnansweredQuestion
tagged with: node.js

http://stackoverflow.com/comment/46832164
has text: This isn't the problem, but `value.fecha` should be `value.FECHA`.
type: Comment
comment on: http://stackoverflow.com/q/29320318
type: QuestionComment
score: 1

http://stackoverflow.com/a/29264446
score: 0
answers question: http://stackoverflow.com/q/29264350
type: Answer
has body: if you defined in your controller $scope.STATES = STATES; your binding should work. good luck!

http://stackoverflow.com/a/29679072
has comment: http://stackoverflow.com/comment/52550223
has body: First you need to install react-native-keyboardevents. In XCode, in the project navigator, right click Libraries ➜ Add Files to [your project's name] Go to node_modules ➜ react-native-keyboardevents and add the .xcodeproj file In XCode, in the project navigator, select your project. Add the lib*.a from the keyboardevents project to your project's Build Phases ➜ Link Binary With Libraries Click .xcodeproj file you added before in the project navigator and go the Build Settings tab. Make sure 'All' is toggled on (instead of 'Basic'). Look for Header Search Paths and make sure it contains both $(SRCROOT)/../react-native/React and $(SRCROOT)/../../React - mark both as recursive. Run your project (Cmd+R) Then back in javascript land: You need to import the react-native-keyboardevents. var KeyboardEvents = require('react-native-keyboardevents'); var KeyboardEventEmitter = KeyboardEvents.Emitter; Then in your view, add some state for the keyboard space and update from listening to the keyboard events. getInitialState: function() { KeyboardEventEmitter.on(KeyboardEvents.KeyboardDidShowEvent, (frames) =&gt; { this.setState({keyboardSpace: frames.end.height}); }); KeyboardEventEmitter.on(KeyboardEvents.KeyboardWillHideEvent, (frames) =&gt; { this.setState({keyboardSpace: 0}); }); return { keyboardSpace: 0, }; }, Finally, add a spacer to your render function beneath everything so when it increases size it bumps your stuff up. &lt;View style={{height: this.state.keyboardSpace}}&gt;&lt;/View&gt; It is also possible to use the animation api, but for simplicity's sake we just adjust after the animation.
score: 10
answers question: http://stackoverflow.com/q/29313244
upvote count: 11
has comment: http://stackoverflow.com/comment/53041357
has comment: http://stackoverflow.com/comment/48654240
downvote count: 1
type: Answer

http://stackoverflow.com/a/29308779
type: Answer
has body: As @dave pointed out, I should use event delegation to detect my dynamically added elements. So to detect this, my Jquery listener looks like this: $("#bloque_integrante_wrap").on("change",".ci_integrante_nb",function(){ var contenedor1 = $(this).attr("id"); var tmp = contenedor1.split("_"); var num = tmp[2]; readURL(this,"#preview_nb_"+num,30,30,"feedback"); }); Notice how I use #bloque_integrante_wrap div selector, which is where my dynamic elements are added, and .ci_integrante_nb is the class that every dynamic element has.
score: 1
upvote count: 1
downvote count: 0
answers question: http://stackoverflow.com/q/29308398

http://stackoverflow.com/a/29258166
has comment: http://stackoverflow.com/comment/46757506
score: -2
has body: Finaly found the answer: function test(){ switch(true){ case (t &gt;= 12) &amp;&amp; (t &lt;= 20):alert("&gt; 12"); break; } }
has comment: http://stackoverflow.com/comment/46758912
upvote count: 2
has comment: http://stackoverflow.com/comment/46758564
has comment: http://stackoverflow.com/comment/46718892
has comment: http://stackoverflow.com/comment/46718706
has comment: http://stackoverflow.com/comment/46757819
has comment: http://stackoverflow.com/comment/46718769
has comment: http://stackoverflow.com/comment/46719085
has comment: http://stackoverflow.com/comment/46718717
type: Answer
has comment: http://stackoverflow.com/comment/46757583
downvote count: 4
has comment: http://stackoverflow.com/comment/46718937
has comment: http://stackoverflow.com/comment/46719033
has comment: http://stackoverflow.com/comment/46755700
answers question: http://stackoverflow.com/q/29258072

http://stackoverflow.com/a/29256429
type: Answer
answers question: http://stackoverflow.com/q/29256262
score: 0
has body: See https://api.jquery.com/jquery.each/. The callback function gets each jobtype as parameter to the function. Try changing the code to: $.each(result, function (idx, value) { var arr = value.split(','); for (var i = 0; i &lt; arr.length; i++) { jobtype.append($("&lt;option /&gt;").val(arr[0]).text(arr[1])); } });

http://stackoverflow.com/comment/46741264
comment on: http://stackoverflow.com/a/29269904
score: 0
has text: I will try this first mohamedrias. Can this also be used in <field> tag? because I am passing the field as an XML type before the form is generated in the front end.
type: Comment
type: AnswerComment

http://stackoverflow.com/comment/46704035
type: Comment
comment on: http://stackoverflow.com/a/29249768
has text: @RadheyPandey happy to help you . it helps you . you can accept answer
score: 0
type: AnswerComment

http://stackoverflow.com/comment/46781381
type: Comment
type: QuestionComment
has text: something like this? http://jsfiddle.net/8ny940h1/
score: 0
comment on: http://stackoverflow.com/q/29291771

http://stackoverflow.com/comment/46790304
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/29297430
has text: The `prev` and `next` functions look for 'borther' and 'sister' elements, not family relations. Technically, the tables are not directly related, the links arent't, they all share the same grandparent, but not parents, so `next()` and `prev()` don't do that.
type: Comment

http://stackoverflow.com/comment/46701887
type: Comment
comment on: http://stackoverflow.com/a/29243762
has text: Added corrected PHP code - and also, inside code of sql you have wrong variable - use `$allIds` and `$allIds2` instead `$personid` and `$personid2`
score: 0
type: AnswerComment

http://stackoverflow.com/a/29260819
has body: I think I am clear on the acceptance criteria, but just to be sure, here is what I am going with: When I click on a planet, I want it to scale. If I click on a planet that is already scaled, I want it to reset to original scale. When I click on a planet, I want to 'reset' any other planets to their original scale, and scale the planet I clicked on if it is not already scaled. Given that, you might try being more explicit about what needs to happen when you click on a 'planet': $('.planet').on('click', function(event){ $('.planet').removeClass('scale'); // Explicitly remove the scale class from other planets $(this).toggleClass('scale'); // Scale the one I am clicking on, or if it's already scaled, revert it }); A simplified example demonstrating this: http://codepen.io/anon/pen/xbMJRd
answers question: http://stackoverflow.com/q/29260409
accepted answer of: http://stackoverflow.com/q/29260409
upvote count: 1
type: AcceptedAnswer
type: Answer
downvote count: 0
score: 1

dependency-injection
tags question: http://stackoverflow.com/q/29357125
type: Tag
tags question: http://stackoverflow.com/q/29293472
tag name: dependency-injection

http://stackoverflow.com/q/29369922
has comment: http://stackoverflow.com/comment/46921109
has comment: http://stackoverflow.com/comment/46922354
downvote count: 0
tagged with: javascript
has body: Hi Identify action when user unloads page, Because I thought that when user clicks out of document then mouse position is 0 and we can tell that user clicked on close button "beforeUnload" is called. So my problem is to identify 4 things, when user clicks on close button of browser (something like mouse position negetive) when user clicks on close button of tab when user clicks on close button refresh button uses F5 to refresh page. When any of this action is performed "BeforeUnload" is called. Here is my code, Page Title This is a Heading This is a paragraph. Thanks is advance.
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46921388
favorite count: 0
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46921059
upvote count: 1
has title: Identify action browser close, referesh, tab close when event is beforeunload
has comment: http://stackoverflow.com/comment/46921186
score: 1
type: Question
has comment: http://stackoverflow.com/comment/46921487

http://stackoverflow.com/a/29358198
downvote count: 0
score: 1
type: Answer
upvote count: 1
has body: Ok... unfortunately, Google don't make distinguish between "cache manifest" and the standard "cache" so in the DevTools, unselect "Disable cache (while DevTools is open)". My bad...
accepted answer of: http://stackoverflow.com/q/29229708
answers question: http://stackoverflow.com/q/29229708
type: AcceptedAnswer

http://stackoverflow.com/comment/46882272
comment on: http://stackoverflow.com/a/29348032
score: 0
type: Comment
has text: This has the same problem that the other answer has. It just cuts off the bottom of the image. Image max height doesn't work.
type: AnswerComment

http://stackoverflow.com/a/34661716
has comment: http://stackoverflow.com/comment/76279872
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/76279768
score: 7
has body: My 2 Cents. I also got this error mentioned in the question in another scenario. I had a very simple spec like this: describe('login feature', function() { it('should show the logged in user name after successful login', function(done) { expect({}).toBeDefined(); //done(); // if you don't call this done here, then also above error comes }); }); See the commented out //done() function in 'it'
upvote count: 7
answers question: http://stackoverflow.com/q/29218981

http://stackoverflow.com/q/29325045
has comment: http://stackoverflow.com/comment/46841091
linked to: http://stackoverflow.com/q/4126790
has title: How do I get an image to stop moving when it hits the edge of a webpage?
type: UnansweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/46840933
has comment: http://stackoverflow.com/comment/46841286
tagged with: javascript
type: Question
upvote count: 2
answer count: 1
downvote count: 1
has body: I want an image to stop if it hits the edge of the screen, but instead it is going indefinitely (or until it crashes) and making the scroll bar appear. I've tried setting it to stop by having the image's right side have to be lower than the client's width but for some reason that isn't registering as a viable command. In other words, how do I make the image recognize when it has hit the edge of the browser? HTML: ----'s Door prize Enter Names Choose your Participants Contestants RACE! Cancel Congratulations! Try Again? Javascript: var Go; var img0 = new Image(); var img1 = new Image(); var img2 = new Image(); var img3 = new Image(); var img4 = new Image(); var img5 = new Image(); var imgArray = new Array(); function waitForIt() { document.getElementById("onYourMarks").innerHTML = "Get Ready!...Set!"; document.getElementById("Race").style.display = "none"; for(i=0;i<6;i++) { document.getElementById("name" + i).innerHTML = ""; } var waitForIt = setTimeout(startRacing, 2000); window.addEventListener("load",startRacing); } function moveThatImage() { img0 = document.getElementById("img0"); img1 = document.getElementById("img1"); img2 = document.getElementById("img2"); img3 = document.getElementById("img3"); img4 = document.getElementById("img4"); img5 = document.getElementById("img5"); imgArray[0] = img0; imgArray[1] = img1; imgArray[2] = img2; imgArray[3] = img3; imgArray[4] = img4; imgArray[5] = img5; for(i=0;i<imgArray.length;i++) { var left = parseInt(imgArray[i].style.left,imgArray[i].style.left); console.log(left); left += Math.floor((Math.random() * 10 + 1)); imgArray[i].style.left = left + 'px'; } } function startRacing() { img0 = document.getElementById("img0"); img1 = document.getElementById("img1"); img2 = document.getElementById("img2"); img3 = document.getElementById("img3"); img4 = document.getElementById("img4"); img5 = document.getElementById("img5"); imgArray[0] = img0; imgArray[1] = img1; imgArray[2] = img2; imgArray[3] = img3; imgArray[4] = img4; imgAr…
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29325755
has comment: http://stackoverflow.com/comment/46841428
has comment: http://stackoverflow.com/comment/46841008

http://stackoverflow.com/comment/46700982
score: 0
type: Comment
type: QuestionComment
has text: @squiroid I am trying to access template url . actually I want to attach some params with template url so that I can get them in my backend function
comment on: http://stackoverflow.com/q/29248053

http://stackoverflow.com/comment/46672323
comment on: http://stackoverflow.com/q/29231882
score: 0
has text: jcearmobile,thanks for pointing out my mistake I have fixed the problem by excluding backchecker.js in second.html now the app is functioning as it has to be
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29351702
type: Answer
has comment: http://stackoverflow.com/comment/46895633
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/46892493
type: AcceptedAnswer
downvote count: 0
has body: I do not fully understand it yet, but apparently, your JS is not evaluated against the source document of that page, which would be an RSS feed. Instead, the browser encapsulates the feed in an XHTML wrapper (a feed handler), where the outermost element carries a default namespace. This div element therefore is in a namespace. If you change your expression to something more general, not directly involving element names: var nodesSnapshot = document.evaluate("//*[@id='feedContent']", document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null ); or var nodesSnapshot = document.evaluate("//*[local-name() = 'div' and @id='feedContent']", document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null ); alert(nodesSnapshot.snapshotLength); the Scratchpad will return 1.
accepted answer of: http://stackoverflow.com/q/29351485
answers question: http://stackoverflow.com/q/29351485

http://stackoverflow.com/comment/46753037
type: QuestionComment
has text: use `/images/open.png` like urls
comment on: http://stackoverflow.com/q/29277184
score: 0
type: Comment

http://stackoverflow.com/comment/46858171
has text: Yep. The illegally-placed 'div' is being moved outside of (and above) the table.
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/29334744

http://stackoverflow.com/comment/46729171
type: Comment
comment on: http://stackoverflow.com/a/29263109
type: AnswerComment
has text: I'm still not seeing it. Was I closer with my first suggestion or my second?
score: 0

http://stackoverflow.com/comment/46771907
comment on: http://stackoverflow.com/a/29286868
score: 0
type: AnswerComment
has text: you need to put php, it won't know what else to use.
type: Comment

http://stackoverflow.com/a/29333571
has comment: http://stackoverflow.com/comment/46908270
has body: Html The two required buttons and the area for the text change Text before it's changed French English Js 2 variables are created for each file path. A function is created to to pass the file into the $.get() method which will retrieve the file ( get is more general and the callback handles the success response of AJAX call where you are free to define any behaviour you want). This is based on a conditional defined by the button's data-lang attribute assignment in the html. $(function () { var englishFilePath = "../Content/english.txt", frenchFilePath = "../Content/french.txt"; function chgLang(lang){ $.get(lang, function(data) { //process text file line by line $('#textChange').html(data.replace('n',' ')); }); }; $("button[data-lang]").click(function () { $(this).data("lang") === "french" ? chgLang(frenchFilePath) : chgLang(englishFilePath); }); });
score: 0
answers question: http://stackoverflow.com/q/29333487
type: Answer
has comment: http://stackoverflow.com/comment/46983578
has comment: http://stackoverflow.com/comment/46856493
has comment: http://stackoverflow.com/comment/46901600
has comment: http://stackoverflow.com/comment/46875584
has comment: http://stackoverflow.com/comment/46875742

http://stackoverflow.com/q/29262003
type: AnsweredQuestion
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/29262098
favorite count: 0
type: Question
has answer: http://stackoverflow.com/a/29262151
possible better answer: http://stackoverflow.com/a/29262262
has answer: http://stackoverflow.com/a/29262262
answer count: 3
accepted answer: http://stackoverflow.com/a/29262098
upvote count: 1
has title: Adding an element and it's class name via JS
tagged with: javascript
has body: I want to add an image with class name to my div using pure Java Script. How can i do that? Here is my JS code. function show(){ var y = document.getElementById("gallery1"); y.innerHTML="&lt;img src='css/images1/img/img4.jpg'/&gt;" }

http://stackoverflow.com/comment/46764036
type: QuestionComment
has text: *"But is there way to inherit without third object?"* Well, yes, like you have it, but it also has the drawbacks you mentioned. You can't have both.
comment on: http://stackoverflow.com/q/29283063
score: 0
type: Comment

http://stackoverflow.com/q/29291088
type: Question
tagged with: javascript
tagged with: dom-events
has title: Which event to listen when DOM rendered is shifted
score: 0
answer count: 0
type: UnansweredQuestion
has body: I have a strange bug I am trying to fix. My window is fixed i.e. it has a header and footer which is always top and bottom. I also have an iframe component which floats on the window. The problem occurs when the focus goes to a form element inside the iframe. The browser "moves" the rendered DOM up to show the focussed form element in the iframe. How can I detect this "move" of DOM. The browser size remains the same and there is no resize event.
has comment: http://stackoverflow.com/comment/46779208
has comment: http://stackoverflow.com/comment/46779254
tagged with: dom
has comment: http://stackoverflow.com/comment/46779181

http://stackoverflow.com/q/29257083
has answer: http://stackoverflow.com/a/29257514
has comment: http://stackoverflow.com/comment/46716881
downvote count: 2
has body: I can't find the error in this code. The function is intended to select and store data to an array. var array= new Array(50); array[0]= "Body"; array[1]= "head"; document.writeln(array[0] + " " + array[1]); function getData(name){ var data = new Array(19); if ( name == "Load" ) { data[0] = "1"; data[1] =" 2"; data[2]="3"; } else if ( name == "Add" ) { data[0] = "0"; data[1] =" 0"; data[2]="3"; } else ( document.writeln("Error"); } getData("Add");
type: Question
score: -2
tagged with: javascript
has title: Cannot find error in array management code
upvote count: 0
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/46716838
has comment: http://stackoverflow.com/comment/46718049
type: UnansweredQuestion

http://stackoverflow.com/comment/46928501
comment on: http://stackoverflow.com/q/29364533
has text: What protractor and firefox versions are you using? Thanks.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29269715
has body: Here is what you want, try this Fiddle. What you want need to do is using .append() method and append it using the variable item1 and item2 as following code : $("#add1").click(function(){ var item1 = prompt ("What task would you like to give Kelly?"); $('#employee1').append('&lt;div class="ui-state-default"&gt;&lt;p&gt;'+item1+'&lt;/p&gt;&lt;/div&gt;'); }); $("#add2").click(function(){ var item2 = prompt ("What task would you like to give Estelle?"); $('#employee2').append('&lt;div class="ui-state-default"&gt;&lt;p&gt;'+item2+'&lt;/p&gt;&lt;/div&gt;'); });
type: Answer
answers question: http://stackoverflow.com/q/29269657
score: 0
has comment: http://stackoverflow.com/comment/46740747
has comment: http://stackoverflow.com/comment/46740710

string
tags question: http://stackoverflow.com/q/29254168
tags question: http://stackoverflow.com/q/29336425
tags question: http://stackoverflow.com/q/29345650
tags question: http://stackoverflow.com/q/29251503
tags question: http://stackoverflow.com/q/29330815
tags question: http://stackoverflow.com/q/29332199
tags question: http://stackoverflow.com/q/29256228
tags question: http://stackoverflow.com/q/29317736
tags question: http://stackoverflow.com/q/29367392
tags question: http://stackoverflow.com/q/29333584
tags question: http://stackoverflow.com/q/29347290
tag name: string
tags question: http://stackoverflow.com/q/29275488
tags question: http://stackoverflow.com/q/29246331
type: Tag
tags question: http://stackoverflow.com/q/29237617
tags question: http://stackoverflow.com/q/29252972
tags question: http://stackoverflow.com/q/29340000
tags question: http://stackoverflow.com/q/29242606
tags question: http://stackoverflow.com/q/29292807
tags question: http://stackoverflow.com/q/29261960
tags question: http://stackoverflow.com/q/29230749
tags question: http://stackoverflow.com/q/29290018
tags question: http://stackoverflow.com/q/29281166

http://stackoverflow.com/a/29256643
answers question: http://stackoverflow.com/q/29253542
type: Answer
upvote count: 7
has body: Basically, that's because Internet Explorer's window object exposes an item() method that your script cannot overwrite. In the line: item = new Object(); item is not declared in the local scope, so it is interpreted as a property of the global object (window.item). On Firefox, window does not expose a member named item, so a new member is introduced and the result of new Object() is assigned to it. On the other hand, Internet Explorer exposes a native method named window.item(). That member is not writeable, so the assignment cannot take place -- it is silently ignored. In other words, item = new Object() has no effect at all (well, it does create an object but cannot assign it afterwards). The subsequent assignments to id and name end up creating new members of the item() method. These are always the same members of the same method, so their values are overwritten on every loop iteration. In addition, the same object (the item() method) is pushed to the array on every iteration. Therefore, the array ends up containing three times the same object, and the values of its id and name members are the last values assigned to them (in the last iteration), respectively 3 and 'c'.
score: 7
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46744195
accepted answer of: http://stackoverflow.com/q/29253542

http://stackoverflow.com/a/29267222
answers question: http://stackoverflow.com/q/29266167
type: Answer
upvote count: 10
downvote count: 1
has comment: http://stackoverflow.com/comment/55701420
score: 9
has body: Your best bet is to continue with Chrome. With a bit of work you can get it to work via a CI and in a headless manner - we do this using Jenkins and Docker Ubuntu servers which are headless. You will need to configure Chrome to run headless using XVFB. You can start off by following the gist here https://gist.github.com/addyosmani/5336747 You state you are on a Mac so you can either run the headless tests via Docker on your machine or you could set up a second config for the CI tests. Another resource http://tobyho.com/2015/01/09/headless-browser-testing-xvfb/
accepted answer of: http://stackoverflow.com/q/29266167
type: AcceptedAnswer

http://stackoverflow.com/comment/46720676
score: 0
has text: @sdenel You might want to come explain your need in [the JS chat](http://chat.stackoverflow.com/rooms/17/javascript)
type: Comment
comment on: http://stackoverflow.com/a/29259000
type: AnswerComment

http://stackoverflow.com/comment/46773214
type: Comment
has text: `$.trim(" 120")` will return `"120"`.
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/29287065

http://stackoverflow.com/comment/46891051
score: 0
type: AnswerComment
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/74127/discussion-between-mcclaskiem-and-danh).
type: Comment
comment on: http://stackoverflow.com/a/29287476

http://stackoverflow.com/comment/46881447
has text: @FelixKling, I'm guessing you're right about that.
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29347593

http://stackoverflow.com/q/29365077
type: UnansweredQuestion
downvote count: 1
has comment: http://stackoverflow.com/comment/46913152
tagged with: javascript
score: -1
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/29365196
upvote count: 0
has answer: http://stackoverflow.com/a/29365341
tagged with: jquery
favorite count: 0
has title: How to print front-end log messages on the server console?
has comment: http://stackoverflow.com/comment/46913179
has body: Is there a way to print log messages to the server console from front-end? For Example, if my GUI HTML pages is running on JBOSS server. I want to write logs to the server console ie, "SERVER.log" file generated on the JBOSS server. (Just like Sysout() for printing simple debugging messages.)

http://stackoverflow.com/comment/46717327
comment on: http://stackoverflow.com/a/29237620
has text: @JamesThorpe i saw it, but my work time for tomorrow was over, i'll try it now
type: AnswerComment
type: Comment
score: 0

http://stackoverflow.com/a/30237863
score: 0
type: Answer
has body: You should take your string in quotes. Like this db.eval("dc('cough and asthma and cold')");
answers question: http://stackoverflow.com/q/29310511

http://stackoverflow.com/q/29325723
type: AnsweredQuestion
has body: A table column displays student id numbers as follows:- (PHP code) echo "&lt;td&gt;&lt;b&gt;&lt;a href = '#'&gt;&lt;h1&gt;".$res['studid']."&lt;/h1&gt;&lt;/a&gt;&lt;/b&gt;&lt;/td&gt;"; Below the table there is an input box to enter student id I want to add the value of $res variable into the input box when the user clicks the above link. That value will be later used to search the result of that particular student How to achieve this with Javascript?
accepted answer: http://stackoverflow.com/a/29325827
type: Question
has answer: http://stackoverflow.com/a/29325827
possible better answer: http://stackoverflow.com/a/29325808
tagged with: javascript
has answer: http://stackoverflow.com/a/29325816
score: 0
answer count: 3
has title: Insert value in input box by clicking a hyperlink
has answer: http://stackoverflow.com/a/29325808
tagged with: input

http://stackoverflow.com/comment/46773498
comment on: http://stackoverflow.com/q/29287049
score: 0
type: Comment
has text: Should I be concerned about that Chrome memory usage even though I'm not using any plugins or extension?
type: QuestionComment

http://stackoverflow.com/comment/46851164
has text: `JSON.stringify(obj); // "{"APP1":["ENV1","ENV2","ENV3"],"APP2":["ENV4","ENV5"],"APP3":["ENV"]}"`
score: 0
comment on: http://stackoverflow.com/a/29330911
type: Comment
type: AnswerComment

http://stackoverflow.com/a/29336862
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: As is often the case, shortly after posting I found a solution. This issue https://github.com/angular/angular.js/issues/4505 suggested that a similar issue was fixed by surrounding the ng-include directive with an empty div. So I changed my template property to look like this: template: '&lt;div&gt;&lt;ng-include src="getTemplateUrl()"/&gt;&lt;/div&gt;' And now it compiles properly. It's a workaround, but it will do for now.
accepted answer of: http://stackoverflow.com/q/29336453
score: 1
answers question: http://stackoverflow.com/q/29336453
upvote count: 1

http://stackoverflow.com/comment/98664246
score: 4
comment on: http://stackoverflow.com/a/46751621
type: Comment
has text: this didn't work for me until i changed the `f.load()` line to `f.load().then(function(font) { document.fonts.add(font);`
type: AnswerComment

http://stackoverflow.com/a/68950253
answers question: http://stackoverflow.com/q/29255843
upvote count: 0
type: Answer
downvote count: 1
has body: I have tried the accepted answer and agree with that. So I upvoted as well. I may have another workaround without specifying any local, but instead look for the separator manually. P.s. The digit argument is used to specify the amount of decimal places. parseLocaleNumber(stringnum: string, digit: number): number { let retValue: number = parseFloat(stringnum); var arr: string[] = stringnum.split(''); arr.slice().reverse().forEach((x, i, arr) =&gt; { if (i === digit) { if (x === '.') { retValue = parseFloat(stringnum.split(',').join('')); arr.length = i + 1; } else if (x === ',') { retValue = parseFloat(stringnum.split('.').join('')); arr.length = i + 1; } } }); return retValue; } Example to use this method: console.log(parseLocaleNumber('123,456,789.12')); // 123456789.12 The code is written with the use of TypeScript.
score: -1

http://stackoverflow.com/comment/134970565
score: 1
comment on: http://stackoverflow.com/a/29286412
type: AnswerComment
has text: @AidenCullo No it could not! It does not iterate them, it enumerates their properties, if they have any. It does not work on `Map` instances for example.
type: Comment

http://stackoverflow.com/a/29246662
answers question: http://stackoverflow.com/q/29218281
type: Answer
has body: Perry Govier gave me the answer on GitHub: Add data-tap-disabled="true" to #map_canvas
score: 0

http://stackoverflow.com/a/29338172
has body: Try changing your function to use each() to loop through each element instead of the loop you have. Once an element has been processed, add a "processed" class to the element so we dont look at them again later. This should be more stable than forcing our logic to keep up with what ones have been processed already. Here is a jsFiddle,, throw in the html from your page that actually causes the problem and see if it still occurs function verifyCommand() { //fixed some logic in here if ($(".message-list-item").length &gt; last_cmd_count &amp;&amp; !processing_commands) { processing_commands = true; // you should set this immediately var new_length = $('.message-list-item').length; console.log("Begin processing commands... ** SYSTEM LOCK **"); console.log('Last command count: '+ last_cmd_count +', New Length: '+new_length); var newMessages = $('.message-list-item:not(.processed)'); // get all of the message elements that do not have the class "processed" // loop through each of the message elements newMessages.each(function(index, element){ console.log('Processing new element at index '+index ); try { var callinguser = $(this).find('.username-text').text().replace("Guest_", ""); var messagetext = $(this).find('.message-text').text(); $(this).addClass('processed'); // add processed class to the element so we know not to process it again later if (callinguser != "RoomGreet") { if (messagetext.match(/^\//)) { if (callinguser.match(/IMVU User/)) { die(); } processCommand(messagetext.substr(1), callinguser); } else { if (detectFlirt(messagetext)) { if (!isAdmin(callinguser)) { sendMsgRaw('Please do not hit on me, ' + callinguser + '.'); logIdiot(callinguser); } } else if (messagetext.match('what is ')) { sendMsgRaw('Please use /solve or /advsolve for math.'); } else { if (callinguser != "Nezzle" &amp;&amp; !isAdmin(callinguser)) { ident(); } } if (strContains(messagetext,"imvu") &amp;&amp; strContains(messagetext,"credits") &amp;&amp; strContains(messagetext,"http://")) { se…
type: Answer
has comment: http://stackoverflow.com/comment/46880816
has comment: http://stackoverflow.com/comment/46891952
has comment: http://stackoverflow.com/comment/46921966
has comment: http://stackoverflow.com/comment/46889732
has comment: http://stackoverflow.com/comment/46891964
score: 0
has comment: http://stackoverflow.com/comment/46881021
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29323719
answers question: http://stackoverflow.com/q/29323719

http://stackoverflow.com/comment/46670790
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29231547
has text: Ok sorry guys, it was a typo but someplace else, I wrote newValue instead of newvalue!

http://stackoverflow.com/comment/46676436
comment on: http://stackoverflow.com/a/29235187
score: 0
has text: if you use `e.target.parentNode.insertBefore` than use also native elements selectors and `addEventListener`. Also, than, `ev.target` should be `ev.srcElement` for IE
type: AnswerComment
type: Comment

cors
type: Tag
tag name: cors
tags question: http://stackoverflow.com/q/29278172
tags question: http://stackoverflow.com/q/29232931
tags question: http://stackoverflow.com/q/29358555
tags question: http://stackoverflow.com/q/29262423

http://stackoverflow.com/a/29254281
upvote count: 1
accepted answer of: http://stackoverflow.com/q/29254094
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: You dont need the for-loop, function drinks () { var dNum = prompt("Please enter how many drinks you had drank."); return dNum; } if (drinks() == 2) { alert("You are the lord of drinks!"); } You're right, you have a lot of errors in your code
answers question: http://stackoverflow.com/q/29254094
score: 1

http://stackoverflow.com/a/29265777
upvote count: 1
downvote count: 0
answers question: http://stackoverflow.com/q/29265641
has body: You need to maintain state between reloads, which is generally accomplished via sessions or cookies. Your server-side language should have a method for that. Such as sessions for PHP. Or you could use cookies locally.
type: Answer
score: 1

http://stackoverflow.com/comment/46859274
score: 1
has text: Related (duplicate?): [Relation between \[\[Prototype\]\] and prototype in JavaScript](http://stackoverflow.com/q/383201/1529630)
comment on: http://stackoverflow.com/q/29335293
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29268490
has body: Try this: HTML - I added some coloured placeholder circles to help troubleshooting: &lt;img class="clearCircle" id="greenCircle" src="http://placehold.it/200x200/66ff66" alt="Clear circle"&gt; &lt;img class="clearCircle" id="blackCircle" src="http://placehold.it/200x200/000000" alt="Clear circle"&gt; JavaScript - I wrapped everything in jQuery document.ready(). If you change the z-index of the black image from 10 to 30, you will see it in front of the green image. $(function () { var lockTime = 2000; var greenCircle = "#greenCircle"; var blackCircle = "#blackCircle"; $(greenCircle).css("z-index", "20"); $(blackCircle).css("z-index", "10"); $(greenCircle).animate({ width: '200%', height: '100%', left: '-50%', top: 0 }, lockTime); }); CSS - Increased initial size so you can see the black image: .clearCircle { position:absolute; height:50; width:50; } Demo - You'll see that the images respect the z-index: http://jsfiddle.net/BenjaminRay/57ttjr2z/
upvote count: 5
has comment: http://stackoverflow.com/comment/46739542
type: Answer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29268341
has comment: http://stackoverflow.com/comment/46739176
answers question: http://stackoverflow.com/q/29268341
has comment: http://stackoverflow.com/comment/46738912
score: 5
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46739567

http://stackoverflow.com/comment/46673420
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29231801
has text: thanks very much ... but the previous code works and read the ids correctly but this code cant click on the list item .........the hierarchy is ul-li-a-span than comes text .... here is screen shot https://www.dropbox.com/s/3b2swvtjnbc73q1/scree-1.png?dl=0

http://stackoverflow.com/q/29310952
answer count: 1
has comment: http://stackoverflow.com/comment/46815696
tagged with: angularjs
has body: I'm going through angular for .net book and I'm using a basic example of having an app with two controllers. However I get this error now and I can't see why it would fail to instantiate module: Unhandled exception at line 4138, column 9 in http://localhost:53990/Scripts/angular.js 0x800a139e - JavaScript runtime error: [$injector:modulerr] Failed to instantiate module myApp due to: Error: [$injector:nomod] Module 'myApp' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument. This is my code AngularJS with .NET Game setup Player 1 Name: Player 1 name is {{name}} Previous Player 1 name was {{previousName}} Player 2 Name: Player 2 name is {{name}} Previous Player 2 name was {{previousName}} Can anyone see what's wrong with it?
has comment: http://stackoverflow.com/comment/46815787
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29311098
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/29311098
score: 0
has title: Error with AngularJS - failed to instantiate module

fullscreen
tags question: http://stackoverflow.com/q/29281986
type: Tag
tag name: fullscreen
tags question: http://stackoverflow.com/q/29363665
tags question: http://stackoverflow.com/q/29222476

http://stackoverflow.com/comment/46778924
has text: @imtheman i went in and made those changes, but I am still receiving the same result of "unexpected string" no other error messages are popping up. Did you notice anything else syntactically wrong? Thanks for your help and input
comment on: http://stackoverflow.com/q/29290018
score: 0
type: Comment
type: QuestionComment

web-scraping
tags question: http://stackoverflow.com/q/29269967
tags question: http://stackoverflow.com/q/29335519
tags question: http://stackoverflow.com/q/29357344
tags question: http://stackoverflow.com/q/29358458
tag name: web-scraping
type: Tag
tags question: http://stackoverflow.com/q/29368798

http://stackoverflow.com/comment/112877713
type: Comment
comment on: http://stackoverflow.com/a/29359319
has text: Safari does not support 'scaleResolutionDownBy'
score: 0
type: AnswerComment

http://stackoverflow.com/a/29251806
answers question: http://stackoverflow.com/q/29251702
upvote count: 3
accepted answer of: http://stackoverflow.com/q/29251702
has comment: http://stackoverflow.com/comment/46707380
score: 3
has comment: http://stackoverflow.com/comment/46707934
has comment: http://stackoverflow.com/comment/46707810
has body: That's the right behaviour The sessionStorage property allows you to access a session Storage object. sessionStorage is similar to localStorage, the only difference is while data stored in localStorage has no expiration set, data stored in sessionStorage gets cleared when the page session ends. A page session lasts for as long as the browser is open and survives over page reloads and restores. Opening a page in a new tab or window will cause a new session to be initiated. You can keep information even if the browser is closed and reopend another time by using localStorage, but, as I said, if you open other browser you'll have to set items agains. Local storage examples here Code example : // set something in localStorage localStorage.setItem('bgcolor', 'green'); // get something from localStorage localStorage.getItem('bgcolor') // it will output green
has comment: http://stackoverflow.com/comment/46707457
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46707411
has comment: http://stackoverflow.com/comment/46707699
type: Answer

http://stackoverflow.com/q/29285285
has answer: http://stackoverflow.com/a/29287865
accepted answer: http://stackoverflow.com/a/29286488
upvote count: 3
has title: Replace text occurrences with data returned by Promises
has comment: http://stackoverflow.com/comment/46768886
possible better answer: http://stackoverflow.com/a/29287865
tagged with: regex
has answer: http://stackoverflow.com/a/29286488
favorite count: 0
tagged with: promise
downvote count: 0
has body: I've got a blog-post like this: var post ="## Cool Post [embed]https://soundcloud.com/wonnemusik/teaser-schotone-dear-thomson-button-remix[/embed]" + "Here comes another one [embed]https://soundcloud.com/straightech-bonn-podcast/straightech-and-friends-7-oscar-ozz[/embed]"; Now for every occurrence of [embed]soundcloud-url[/embed] I need to call their API endpoint http://api.soundcloud.com/resolve.json?url=soundcloud-url&amp;client_id=my-id, parse the returned JSON and replace the [embed] with my own markup. How can I use this using Promises? var post ="## Cool Post [embed]https://soundcloud.com/wonnemusik/teaser-schotone-dear-thomson-button-remix[/embed]" + "Here comes another one [embed]https://soundcloud.com/straightech-bonn-podcast/straightech-and-friends-7-oscar-ozz[/embed]" var re = /\[embed\](.*)\[\/embed\]/gm; var m; do { m = re.exec(post); if (m) { var apiCallUrl = "http://api.soundcloud.com/resolve.json?url=" + m[1] '&amp;client_id=...' request(apiCallUrl).then(function(body) { var trackinfo = JSON.parse(body[0].body) return trackinfo.title } } } while (m); // have all promises fulfilled and old embed in post-var replaced
linked to: http://stackoverflow.com/q/27440437
tagged with: node.js
type: AnsweredQuestion
score: 3
tagged with: bluebird
type: Question
answer count: 2
tagged with: javascript

http://stackoverflow.com/q/29289027
has comment: http://stackoverflow.com/comment/46776559
type: AnsweredQuestion
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/46775314
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/46775486
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/29289453
accepted answer: http://stackoverflow.com/a/29289453
has answer: http://stackoverflow.com/a/29337352
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46775713
has comment: http://stackoverflow.com/comment/46776036
possible better answer: http://stackoverflow.com/a/29337352
has body: I need to have a function that puts the code inside it in an HTML "a" element. I have tried many different variations of the code posted below and none of them have worked. var doc = document.body; function h1(text) { var h1 = document.createElement("h1"); var t = document.createTextNode(text); h1.appendChild(t); doc.appendChild(h1); } function a(a, b) { var doc1 = document.createElement("a"); doc.a; var s; s = document.createElement('script'); s.innerHTML = b; doc.appendChild(doc1); doc = doc1; doc1.appendChild(s); doc = document.body; } a("href=www.google.com", "h1(\"hello\");"); http://jsfiddle.net/huzuno93/
has title: "a" element in JavaScript

http://stackoverflow.com/a/29372562
answers question: http://stackoverflow.com/q/29372340
downvote count: 0
has comment: http://stackoverflow.com/comment/46926017
upvote count: 2
has comment: http://stackoverflow.com/comment/46926076
has body: You can set a missingFields variable. var missingFields = false; for(var i=0;i&lt;settingData.length;i++){ if(! (settingData[i].a !== '' &amp;&amp; $scope.settingData[i].b) ) { missingFields = true; alert('missing fields'); break; } } if (!missingFields) { save(); }
type: Answer
score: 2

http://stackoverflow.com/comment/46893306
type: Comment
has text: for some reason doesn't really work on my site, but snippet obviously works. Let me dig into it for a few mins
type: AnswerComment
comment on: http://stackoverflow.com/a/29353720
score: 0

http://stackoverflow.com/q/29364172
has answer: http://stackoverflow.com/a/29364631
tagged with: angularjs
type: UnansweredQuestion
tagged with: angularjs-ng-repeat
tagged with: parsing
has answer: http://stackoverflow.com/a/29364249
has comment: http://stackoverflow.com/comment/46916695
has answer: http://stackoverflow.com/a/29364601
score: 1
upvote count: 1
type: Question
tagged with: javascript
has title: ng-repeat parse array into string
answer count: 3
has body: Is it possible to parse in ng-repeat a array value into a string? I'll explain what I mean. {{key}} {{property}} This {{property}} is an array e.g [ 7 , 8 ], but I would like to show "Jully - August". Is it possible through a filter? Or I need to parse it in the controller.
downvote count: 0
favorite count: 0

http://stackoverflow.com/q/29274403
tagged with: javascript
tagged with: jquery
favorite count: 0
possible better answer: http://stackoverflow.com/a/29274422
has answer: http://stackoverflow.com/a/29274426
answer count: 3
has answer: http://stackoverflow.com/a/29274441
tagged with: http://stackoverflow.com/tag/html
tagged with: css
downvote count: 0
has answer: http://stackoverflow.com/a/29274422
type: AnsweredQuestion
score: 1
has title: Using variable inside array.push() in jquery
type: Question
has body: I have a for loop in my jquery script var images[]; for(i=0;i&lt;$('#imageHolder div').length;i++) { images.push($('#imageHolder div:eq( i )').attr('alt')); console.log($('#imageHolder div:eq(i )').attr('alt')); } I am not able to add the elements to the array and the console.log says undefined in the console. What is my possible error and how that can be corrected?
accepted answer: http://stackoverflow.com/a/29274441
upvote count: 1

hoisting
tag name: hoisting
tags question: http://stackoverflow.com/q/29329662
type: Tag

http://stackoverflow.com/comment/46758306
type: Comment
type: QuestionComment
has text: You have `required` on the input? Therefore it is. Am I missing something?
comment on: http://stackoverflow.com/q/29280221
score: 1

http://stackoverflow.com/comment/46653182
comment on: http://stackoverflow.com/q/29221991
score: 0
type: Comment
type: QuestionComment
has text: @Joel that solution makes it look like its not being selected, however the selection still happens and I can drag that selection to another field

http://stackoverflow.com/a/29309978
upvote count: 2
has body: You can certainly make use of U.S. state codes, but if validation is not important, you can get everything done like this: var str = "Atlantic-City-NJ"; alert(str.replace(/(.+)\-([A-Z]{2})$/, "$1, $2").replace("\-", " "));
answers question: http://stackoverflow.com/q/29309728
downvote count: 1
type: Answer
score: 1

http://stackoverflow.com/q/29356989
type: Question
score: 2
has comment: http://stackoverflow.com/comment/46901133
downvote count: 0
has comment: http://stackoverflow.com/comment/46898976
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/46915473
tagged with: file-upload
has title: Files are undefined when submitting files to ng-file-upload
tagged with: angularjs
answer count: 0
upvote count: 2
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46898924
has comment: http://stackoverflow.com/comment/46899037
has comment: http://stackoverflow.com/comment/46922165
has body: I have got the following problem: I am using ng-file-upload to post files to my backend. I have setup the drop area to show up via ng-if when someone hit the a button. This works perfectly I can select a file and I also see the name of it like in the demo of ng-file-upload. The user should now be able to upload this file when hitting save but everytime he does that angular tells me that the files are undefined. Here my upload and save method: Upload: $scope.upload = function (files) { console.log($scope.files); if ($scope.files && files.length) { for (var i = 0; i < files.length; i++) { var file = files[i]; $upload.upload({ url: base+'/doc/'+$scope.project_id+'?name='+$scope.doc.name, method: 'POST', doc: file }).progress(function (evt) { var progressPercentage = parseInt(100.0 * evt.loaded / evt.total); console.log('progress: ' + progressPercentage + '% ' + evt.config.file.name); }).success(function (data, status, headers, config) { console.log('file ' + config.file.name + 'uploaded. Response: ' + JSON.stringify(data)); }); } } }; Save: $scope.saveDoc = function(){ console.log($scope.files); } I cannot think of a reason why files should be empty since the ng-repeat in the frontend works. Drop pdfs or images here or click to upload File Drag/Drop is not supported for this browser {{f.name}} It shows me the name perfectly.

http://stackoverflow.com/q/29259945
has title: Bootstrap Table not appearing correctly
possible better answer: http://stackoverflow.com/a/29260402
has body: I am using JavaScript to loop through some data and build a number of tables and am using Bootstrap with the class table table-hover. This works absolutely fine on all tables except the very last table to be produced. The bottom table is always sqashed and the hover over doesn't work. The columns resize to the correct size but that's about it. I can't work it out, both tables have the class declared: No matter how many tables are made it always happens on the very last table. I should point out that I've tried everything I can think of including adding a dummy table within the loop and the last interation but then that makes two squashed tables then. Update: http://jsfiddle.net/si828/1ksyces5/8/ Code: $('#tableContainer').empty(); var div = document.getElementById('tableContainer'); for (var i = 0; i &lt; data.length; i++) { div.innerHTML = div.innerHTML; var para = document.createElement("p"); var logo = document.createElement("a"); logo.setAttribute('class', 'glyphicon glyphicon-user'); para.appendChild(logo); var node = document.createTextNode(" " + data[i].userName + " (" + data[i].userID + ") " ); para.appendChild(node); var aTag = document.createElement("a"); aTag.setAttribute('data-id-proxy' , data[i].userID); aTag.setAttribute('class' , 'open-AddUserModal'); aTag.setAttribute('href' ,'#addUserModal'); var span = document.createElement("span"); span.setAttribute('class', 'glyphicon glyphicon-plus'); aTag.appendChild(span); para.appendChild(node); para.appendChild(aTag); para.setAttribute('class', 'text-primary'); div.appendChild(para); var table = document.createElement('table'), tr, td, row, cell; table.setAttribute('class', 'table table-hover'); table.setAttribute('id', 'table' + data[i].userID); table.setAttribute('border', '1'); var header = table.createTHead(); var row = header.insertRow(0); var cell = row.insertCell(0); cell.setAttribute('style' , 'width: 20%'); cell.style.backgroundColor = '#eee'; cell.style.fontWeight = 'bold'; cell.innerHTML = "SRM";…
has answer: http://stackoverflow.com/a/29260402
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29261161
downvote count: 0
tagged with: jsp
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/46722344
type: Question
score: 1
tagged with: css
tagged with: twitter-bootstrap
answer count: 2
upvote count: 1
has answer: http://stackoverflow.com/a/29261161
has comment: http://stackoverflow.com/comment/46723500

http://stackoverflow.com/a/29289419
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46776534
accepted answer of: http://stackoverflow.com/q/29289164
has comment: http://stackoverflow.com/comment/46804065
type: Answer
has body: ko.renderTemplate accepts an afterRender callback that might be of use. Taken from this tutorial about rendering templates for Bootstrap modals: ko.renderTemplate( "mytemplate", viewModel, { afterRender: function(nodes) { console.log("rendered!"); } }, target ); Here is a quick and dirty example that displays the rendered result as a string: ko.bindingHandlers.templateToString = { init: function(element, valueAccessor, allBindingsAccessor, viewModel, bindingContext) { ko.renderTemplate( "my-template", viewModel, { afterRender: function() { document.getElementById('result').innerText = element.innerHTML; element.innerHTML = null; } }, element ); } }; ko.applyBindings({ 'value': 'Some text' }); pre { background-color: lightgrey; padding: 2rem; } If you wish to use renderTemplate without touching the DOM or outside of a binding, create a DocumentFragment instead: var fragment = document.createDocumentFragment(), container = document.createElement('div'), bindingContext = ko.contextFor(document.body); fragment.appendChild(container); ko.renderTemplate( "my-template", viewModel, { afterRender: function() { console.log(container.innerHTML); } }, container ); Please note that this is likely very un-idiomatic Knockout code, and I would recommend the usage within the binding.
answers question: http://stackoverflow.com/q/29289164
score: 3
has comment: http://stackoverflow.com/comment/46777411
downvote count: 0
has comment: http://stackoverflow.com/comment/46776373
has comment: http://stackoverflow.com/comment/46776689
upvote count: 3

http://stackoverflow.com/q/29278138
downvote count: 0
favorite count: 0
tagged with: angularjs
type: Question
upvote count: 2
has title: expand and collapse row for ng-table
answer count: 0
tagged with: javascript
type: UnansweredQuestion
has body: I am trying to achieve an expand and collapse row for ng-table, basically what we want is if you click on row it expands with more detail. Does anyone know how to achieve this? Any help appreciated thanks // Code goes here var app = angular.module('main', ['ngTable']). controller('DemoCtrl', function($scope, $filter, ngTableParams,$timeout) { var data = [ {ticket: 1,Date: "24-3-2015", Status: "Pending" ,name: "Moroni", Agent: "cherrylabs1" , Item: "test1" , Description: "this is 1" ,age: 50}, {ticket: 2,Date: "25-3-2015", Status: "Pending" ,name: "Tiancum",Agent: "cherrylabs2" , Item: "test2" , Description: "this is 2" ,age: 43}, {ticket: 3,Date: "26-3-2015", Status: "Pending" ,name: "Jacob", Agent: "cherrylabs3" , Item: "test3" , Description: "this is 3" ,age: 27}, {ticket: 4,Date: "27-3-2015", Status: "Pending" ,name: "Nephi", Agent: "cherrylabs4" , Item: "test4" , Description: "this is 4", age: 29}, {ticket: 5,Date: "28-3-2015", Status: "Pending" ,name: "Enos", Agent: "cherrylabs5" , Item: "test5" , Description: "this is 5" ,age: 34}, {ticket: 6,Date: "29-3-2015", Status: "Pending" ,name: "Tiancum", Agent: "cherrylabs6" , Item: "test6" , Description: "this is 6" ,age: 43}, {ticket: 7,Date: "30-3-2015", Status: "Pending" ,name: "Jacob", Agent: "cherrylabs7" , Item: "test7" , Description: "this is 7" ,age: 27}, {ticket: 8,Date: "31-3-2015", Status: "Pending" ,name: "Nephi",Agent: "cherrylabs8" , Item: "test8" , Description: "this is 8" , age: 29} ]; $scope.columns = [ { title: 'Ticket', field: 'ticket', visible: true }, { title: 'Date', field: 'Date', visible: true }, { title: 'Status', field: 'Status', visible: true }, { title: 'Customer', field: 'name', visible: true }, { title: 'Agent', field: 'Agent', visible: true }, { title: 'Item', field: 'Item', visible: true }, { title: 'Description', field: 'Description', visible: true } ]; $scope.$watch("filter.$", function () { $scope.tableParams.reload(); }); $scope.tableParams = new ngTableParams({ page: 1, // show fi…
score: 2

http://stackoverflow.com/a/29219675
has body: This does what you are looking for: &lt;img id="img1" src="http://placehold.it/300x300" onMouseOver="doFlip(true)" onMouseOut="doFlip(false)"&gt; &lt;img id="img2" src="http://placehold.it/200x200" onMouseOver="doFlip(true)" onMouseOut="doFlip(false)"&gt; &lt;script&gt; var img1 = document.getElementById("img1"); var img2 = document.getElementById("img2"); var img1path = "http://placehold.it/300x300"; var img2path = "http://placehold.it/200x200"; function doFlip(isOn) { if (isOn) { img1.src = img2path; img2.src = img1path; } else { img1.src = img1path; img2.src = img2path; } } &lt;/script&gt; See fiddle: http://jsfiddle.net/BenjaminRay/xpmgnas1/
answers question: http://stackoverflow.com/q/29219322
has comment: http://stackoverflow.com/comment/46650353
score: 0
has comment: http://stackoverflow.com/comment/46648873
type: Answer

http://stackoverflow.com/comment/46717887
comment on: http://stackoverflow.com/q/29256675
score: 0
type: QuestionComment
type: Comment
has text: There's nothing wrong with the table. It's just when I call the $('#tableID').dataTable(); - nothing happened / no manipulation happened. @Michel

http://stackoverflow.com/comment/46754057
comment on: http://stackoverflow.com/q/29277771
score: 0
type: Comment
type: QuestionComment
has text: What do you mean by "JS object"?

http://stackoverflow.com/comment/46673091
type: QuestionComment
has text: You probably have a bug in your Crossfilter grouping code, but you'll need to share your code for us to help you.
score: 2
comment on: http://stackoverflow.com/q/29232203
type: Comment

http://stackoverflow.com/q/29243657
upvote count: 2
answer count: 2
tagged with: javascript
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29243698
has title: How to set the text in one select based on the selection in another select
score: 2
downvote count: 0
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/29243694
type: Question
has body: The HTML on the first button is not important. When I set its value, it launches this function: function selectCustomer(str) { c = str; $("select.btn btn-primary options").text("All"); } I want this function to change the text of the following select to "All", instead of its default, "Filter". Filter All <?php foreach ($outputEnd as $name=> $o) { print " $name "; foreach ($o as $p) { print " $p "; } } ?> How would I go about this? This code, $("select.btn btn-primary options").text("All");, is incorrect.

http://stackoverflow.com/comment/46843753
comment on: http://stackoverflow.com/q/29326596
score: 0
type: Comment
type: QuestionComment
has text: Are you getting any errors in your console?

http://stackoverflow.com/q/29259068
type: AnsweredQuestion
has title: Ordered List get only subitems
type: Question
has comment: http://stackoverflow.com/comment/46720759
has comment: http://stackoverflow.com/comment/46722725
has body: HTML $(".something > ol li").each(function () { alert($(this).text()); }); Something Something 2 Something 3 It will alerts Something, Something 2 and Something 3. What I need is to alert only the directly sub-items. So I need to alert only Something and Something 3. How can I do this? Thanks a lot!
tagged with: javascript
has answer: http://stackoverflow.com/a/29259436
score: 0
answer count: 3
has comment: http://stackoverflow.com/comment/46720522
tagged with: jquery
has answer: http://stackoverflow.com/a/29260257
has comment: http://stackoverflow.com/comment/46720460
possible better answer: http://stackoverflow.com/a/29259334
accepted answer: http://stackoverflow.com/a/29259436
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29259334

http://stackoverflow.com/a/29236048
downvote count: 0
upvote count: 6
type: Answer
has body: From you code what I understand is you want to toggle the presents of the class night-time $('.blog-desc').find('a').on('click', function () { $('html').toggleClass('night-time'); }); If you want to do something else depending on the state(night/day) you can test for the presents of the class $('.blog-desc').find('a').on('click', function () { var $html = $('html').toggleClass('night-time'); if ($html.hasClass('night-time')) { console.log('now it is night') } else { console.log('now it is day') } }); In your code the problem is the if condition is evaluated only once when the page is loaded then since the default value is false the if block is executed and addClass() callback is executed, the second handler is not registered at all. If for any reason you want to check a case like this you need to have a single click handler and check the condition within the click handler
answers question: http://stackoverflow.com/q/29235951
has comment: http://stackoverflow.com/comment/46678348
score: 6

modal-dialog
tag name: modal-dialog
tags question: http://stackoverflow.com/q/29305161
tags question: http://stackoverflow.com/q/29259310
type: Tag
tags question: http://stackoverflow.com/q/29265080
tags question: http://stackoverflow.com/q/29320762
tags question: http://stackoverflow.com/q/29329127
tags question: http://stackoverflow.com/q/29357588
tags question: http://stackoverflow.com/q/29277066
tags question: http://stackoverflow.com/q/29230192

http://stackoverflow.com/q/29256496
type: Question
tagged with: arrays
tagged with: javascript
score: 0
has title: Socket.io Timer that displays in minutes, seconds
has body: Here i am trying to create a timer that counts down from a specified value in m:s format, when the timer reaches 0 i want to emit to the clients using a function called selectUser. My HTML and Script.js are working fine. I'm just missing something here, because the numbers aren't decrementing properly, and the emit isn't firing. var timerCall = function() {}; var countdown = 30000; var minutes; var seconds; setInterval(function() { minutes = Math.floor(countdown / 6000); // 7 seconds = countdown % 60; // 30 timerCall(minutes, seconds, countdown); if (seconds &gt; 0) { seconds --; } }, 1000); io.sockets.on('connection', function(socket) { socket.on('reset', function(data) { countdown = 30000; io.sockets.emit('timer', { countdown: countdown }); }); timerCall = function(minutes, seconds, countdown) { if (countdown === 0) { selectUser(myarr, myarr2, myarr3, myarr4); }; if (seconds === 0) { minutes--; seconds = 59; } io.sockets.emit('timer', { countdown: minutes + ':' + seconds }); } Thanks in advance for your help, this is my first post on StackOverflow. So be nice ;)
has comment: http://stackoverflow.com/comment/46716455
type: UnansweredQuestion
tagged with: countdowntimer
answer count: 0
has comment: http://stackoverflow.com/comment/46715974
tagged with: socket.io

http://stackoverflow.com/q/29313925
answer count: 1
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/29314067
favorite count: 0
has body: How to pause angular js audio when browser window is closed and resume again when window is maximized? This is my code. i am new to angular js . i have got no idea about it. anyone help me var app=angular.module("myApp",['ngAudio']); app.controller("myCtrl",function($scope,ngAudio,$window) {$scope.src="aud.mp3"; $scope.play=false; $scope.play=function(){ $scope.audio = ngAudio.load('aud.mp3'); $scope.audio.play(); } $scope.stop=function(){ $scope.audio = ngAudio.load('aud.mp3'); $scope.audio.pause(); } });
tagged with: angularjs
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has title: Angular js audio issue
accepted answer: http://stackoverflow.com/a/29314067
upvote count: 1
type: Question
tagged with: javascript

http://stackoverflow.com/comment/46845504
type: QuestionComment
score: 0
has text: thanks -Skatok for your formatting and helping to explain question better... i have edited the post and explained a bit more and guess the reasoin for the error... please see if you can help me to resolve the issue...
type: Comment
comment on: http://stackoverflow.com/q/29315875

http://stackoverflow.com/comment/46837138
has text: see [Defining methods via prototype vs using this in the constructor - really a performance difference?](http://stackoverflow.com/q/12180790/1048572)
comment on: http://stackoverflow.com/q/29321745
type: QuestionComment
type: Comment
score: 1

http://stackoverflow.com/a/29252567
accepted answer of: http://stackoverflow.com/q/29252284
answers question: http://stackoverflow.com/q/29252284
type: Answer
score: 2
has body: As you are manipulating the dom with javascript so the event would work only once. To bind the click event on the element even if it gets changed by js, you should use event delegation technique, which has a bit of same syntax: $("#info").on('click', ".list", function() { window.data = $("#info").html(); var htmlString = $(this).find('div.hidden').html(); $("#info").html(htmlString); }); $(document).on("click","#back", function() { console.log(window.data); $("#info").html(window.data); }); You can change $("#info") to this too: $(document), $("body").
downvote count: 0
upvote count: 2
has comment: http://stackoverflow.com/comment/46709738
type: AcceptedAnswer

http://stackoverflow.com/comment/46661141
type: Comment
comment on: http://stackoverflow.com/q/29226805
has text: need to know more 1)is your scope variable a primitive or an object.2)in which controllers scope is your html code that needs to be updated.go through this to get a larger picture http://stackoverflow.com/questions/14049480/what-are-the-nuances-of-scope-prototypal-prototypical-inheritance-in-angularjs
score: 0
type: QuestionComment

http://stackoverflow.com/comment/84244569
type: AnswerComment
has text: @alecxe: I fixed the issue regarding: `email.subject` and `email.text` by just changing it to: `email['subject']` and `email['text']`. But now facing the error: `- Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.` when trying to call/invoke the function: `getLastEmail()`. Any idea pls.?
type: Comment
comment on: http://stackoverflow.com/a/29382990
score: 0

http://stackoverflow.com/q/29221938
accepted answer: http://stackoverflow.com/a/29222548
favorite count: 0
has title: How to find an object key that contains a value within it's array?
tagged with: javascript-objects
has comment: http://stackoverflow.com/comment/46653611
has answer: http://stackoverflow.com/a/29222548
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29222481
tagged with: underscore.js
score: 1
has body: I have the following Javascript (Coffeescript) object: urlSets = a: [ 'url-a.com' 'url-b.com' 'url-c.com' ] b: [ 'url-d.com' 'url-e.com' 'url-f.com' ] c: [ 'url-g.com' ] Given i have the value "url-a.com", how do i find the key of urlSets that contains this url? I am already using the underscore.js library, and figured i'd possibly use _.findKey and _.contains. I've been toying with something like this: _.findKey urlSets, (key) -&gt; return _.contains(key, "url-a.com") …but with no luck. It returns TypeError: undefined is not a function.
upvote count: 1
tagged with: coffeescript
type: Question
tagged with: arrays
tagged with: javascript
possible better answer: http://stackoverflow.com/a/29222481
answer count: 2
downvote count: 0

http://stackoverflow.com/comment/46766835
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29284227
has text: If you want fast response/help - create a plnkr.

google-pie-chart
tag name: google-pie-chart
tags question: http://stackoverflow.com/q/29330195
type: Tag

http://stackoverflow.com/comment/46691712
type: AnswerComment
comment on: http://stackoverflow.com/a/29240971
has text: Dude. You can't select your user control using Javascript. I already said that. I also said you have to tell jQuery to select your select. If your select has an ID of "Properties" then you have to tell jQuery to look for "Properties". However, if you do select by id, what happens when you have 2 instances of your user control? You'll have 2 selects with the same id. Like I recommended before, use a CSS class on your select and save yourself the headache.
type: Comment
score: 0

http://stackoverflow.com/comment/46848970
type: AnswerComment
score: 0
has text: right now I do it like this `controls = new THREE.PointerLockControls(this.game.camera.object); new_user.root.add(controls.getObject());` is your suggestion still required then?
type: Comment
comment on: http://stackoverflow.com/a/29312773

http://stackoverflow.com/comment/47848682
type: QuestionComment
comment on: http://stackoverflow.com/q/29352453
has text: Could you please show us your code? What did you try so far?
score: 0
type: Comment

http://stackoverflow.com/q/29337238
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29340288
answer count: 2
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/29337526
accepted answer: http://stackoverflow.com/a/29337526
has body: I am writing attempting to return the id from an insert that's occurring within my Meteor.methods. Server code: Meteor.methods({ newCompanyReview: insertCompanyReview, }); function insertCompanyReview(company,text,rating){ var cid; cid = Companies.insert({ company: company, text: text, rating: rating, }); console.log(cid); return cid; } I am assuming that returning the cid variable in the above block returns the variable. However, when I try this in the chrome inspector. &gt; hello = Meteor.call("newCompanyReview",company="Test"); 5WFHWoXgvs3tv8QTo undefined &gt;hello undefined This does successfully insert into the DB. Why isn't return returning the id?
tagged with: meteor
has title: Meteor method containing insert not returning record ID as result
has answer: http://stackoverflow.com/a/29340288
type: Question

http://stackoverflow.com/comment/46719439
type: AnswerComment
type: Comment
has text: Well, i did have this (err) in third function and it didn't work. Actually, i've managed to reach "finished" today just commenting out all the parsing logic. That's already a victory ;) Thanks all for help.
comment on: http://stackoverflow.com/a/29242374
score: 0

http://stackoverflow.com/comment/46779408
comment on: http://stackoverflow.com/a/29291002
has text: Use Date.now() to obtain the current time in milliseconds and store it somewhere on the first keypress in a given field. When the last digit is entered, compare the stored time to Date.now(). If the difference is small enough, the number was entered via a scanner.
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/a/29318364
has comment: http://stackoverflow.com/comment/46829544
type: Answer
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/29318329
downvote count: 0
has comment: http://stackoverflow.com/comment/46829942
has body: Put an end marker $, like: /.+:\/\/www\.facebook\.com\/$/ but really should have a start marker ^ too, like: /^https?:\/\/www\.facebook\.com\/$/ also if you're matching the current domain, you may as well just match the location.host rather than location.href

http://stackoverflow.com/a/29231801
has comment: http://stackoverflow.com/comment/46672764
type: Answer
has comment: http://stackoverflow.com/comment/46672451
has comment: http://stackoverflow.com/comment/46669804
answers question: http://stackoverflow.com/q/29231699
has comment: http://stackoverflow.com/comment/46678852
has comment: http://stackoverflow.com/comment/46673420
has body: This is how you can compare I am assuming your class name is same for all li tags: $("li.ui-menu-item").each(function(){ if($(this).children().children().text()==10) var id=$(this).children().attr("id"); $("#"+id).on("click", function () { alert("clicked"); }); });
has comment: http://stackoverflow.com/comment/46671910
score: 0

http://stackoverflow.com/q/29286650
tagged with: http://stackoverflow.com/tag/html
has title: Chrome javascript debugger displays json data using $.ajax but no response in browser
has comment: http://stackoverflow.com/comment/46776906
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/6186770
answer count: 0
has body: Please find the below code. while debugging the code using Chrome java script debugger, URL is hit and Debugger is displaying the correct json data from the URL [Under the source column] but there is no response in the browser after button click. I want to display the json data after button click. Can you please help in this ? click
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/46830752
has comment: http://stackoverflow.com/comment/46812482
has comment: http://stackoverflow.com/comment/46844610
type: Question
has comment: http://stackoverflow.com/comment/46830922
has comment: http://stackoverflow.com/comment/46831032
tagged with: javascript
tagged with: ajax
has comment: http://stackoverflow.com/comment/46808435
has comment: http://stackoverflow.com/comment/46807501
score: 0
has comment: http://stackoverflow.com/comment/46810634

tabs
type: Tag
tags question: http://stackoverflow.com/q/29222687
tags question: http://stackoverflow.com/q/29323432
tags question: http://stackoverflow.com/q/29305971
tag name: tabs
tags question: http://stackoverflow.com/q/29238743

http://stackoverflow.com/comment/46905962
score: 0
type: AnswerComment
has text: if i have multiple svg path's ?
type: Comment
comment on: http://stackoverflow.com/a/29294985

http://stackoverflow.com/q/29341725
score: 0
answer count: 2
accepted answer: http://stackoverflow.com/a/29346773
has body: I have a web application and an app variable with the module myApp. I have 3 pages: /login, /registration and /. My $routeChangeStart is defined to behave like follows: Check if a global variable user is defined, if yes go to step 4 Check where the user wants to go: if he doesn't want to go in /login or /registration do an event.preventDefault() and check if there is a valid session (via cookie) and try to authorize the user. If the user is authorized set the user global variable and redirect him to the page he wanted, otherwise send him to the /login page. If he wants to go to either on /login or /registration do nothing (we are in the case no user variable and I want to login or register). Check where the user wants to go: if he wants to go in /login or /registration do an event.preventDefault() and redirect him to the home / page (the user has a valid session, no need to login again). The logic works well, until we hit F5 (I know it wipes the $rootScope, but at the cost of an extra AJAX call we should be fine with it) while in the / page with a valid session cookie. The application simply doesn't redirect to the correct template, the page remains blank. If we instead insert in the URL anything beside / (e.g. /blah) everything works fine. Here's my app.js: (function () { angular.module("myApp", ["controllers", "services", "directives", "ngRoute"]) .config(["$httpProvider", "$routeProvider", function ($httpProvider, $routeProvider) { $httpProvider.defaults.withCredentials = true; $httpProvider.defaults.headers.post['Content-Type'] = 'application/json; charset=utf-8'; $routeProvider .when("/login", { controller: "LoginController", templateUrl: "app/partials/login.html" }) .when("/registration", { controller: "RegistrationController", templateUrl: "app/partials/registration.html" }) .when("/", { controller: "MainController", templateUrl: "app/partials/home.html" }) .otherwise("/"); }]) .run(function ($rootScope, $location, $http) { $rootScope.$on('$routeChangeStart',…
tagged with: angularjs
has answer: http://stackoverflow.com/a/29346773
possible better answer: http://stackoverflow.com/a/29341911
has title: On $routeChangeStart location doesn't find the corresponding template
type: AnsweredQuestion
type: Question
tagged with: angularjs-routing
has answer: http://stackoverflow.com/a/29341911
tagged with: javascript

http://stackoverflow.com/comment/46742568
comment on: http://stackoverflow.com/q/29270346
score: 0
type: Comment
type: QuestionComment
has text: ok this is my last suggestion ;), try to add an alert in the else function and check whether it got called or not. if not then try clean the cache and try this again. because from what i have seen it should be working.

http://stackoverflow.com/comment/46745341
has text: where you have keep this file ?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29272748

http://stackoverflow.com/a/29282683
score: 0
answers question: http://stackoverflow.com/q/29281451
type: Answer
has body: For what you're looking to do, I would just use Google developer tools and just modify the CSS for your example page. This way you can play around with the settings while getting a feel for the code. What you're looking to do can be done just with CSS. The only time it is tricky is if inline styles are being added with JS.

http://stackoverflow.com/comment/46907025
comment on: http://stackoverflow.com/a/29351080
type: AnswerComment
has text: @markE no, it doesn't work in Chrome (it works in FF38 as well though). I got the impression Chromium would lift on this restriction (rather than Mozilla made it more strict), But we'll have to see I guess (off-topic: and I am still waiting for full support of TextMetrics - imagine if we could make competitors to online doc editors.. can't have that.. ;) ).
type: Comment
score: 1

http://stackoverflow.com/q/29223199
downvote count: 0
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/46655476
has body: I'm currently working on a project that will need to display editable tables of arbitrary dimensions. I'm using AngularJS, but as the tables can get very large I expect things will get slow if I don't use some form of bind-once. The problem is, as far as I can tell, bind-once is absolute -- I want it to actually keep or at least reinstate all the watchers for rows currently being edited. Here's the basic idea of how I'm currently doing this. &lt;tr ng-repeat="row in rows track by key" hackonce&gt; &lt;td ng-repeat="col in cols"&gt; &lt;div ng-click="editStuff()"&gt;{{contents}} directive('hackonce', function() etc link: function(scope, elem, attrs) { if (!scope.row.editing) setTimeout(function(){ scope.$destroy() }, 0) } I'm generating a string key on the row from its various identifiers. When the item is flagged for editing, the controller switches it out for a copy and changes its key to include what will eventually be transaction lock data. This triggers a replacement in the ng-repeat, and the next time the tr is constructed with the replaced row data, the scope is left intact and updates as you edit stuff. Somehow, it actually works (so far anyway). It drops me from over 500 watchers on a small list to under 100, and what remains is mostly top-level controls, so I hope it will scale well. It also seems to retain and properly clean up ng-click listeners and such even though the scope is gone. However, it's the sort of hack that I cringed just typing it out in brief, and I get the feeling it may induce vomiting in sane people who know this library better than I do. I was wondering if there was a cleaner and/or safer way to do the same thing. What I'm looking for is a better way to conditionally bind once, or have an element/scope otherwise skip its $digest for itself and all its children based on some exposed flag. Is there any way to do this that doesn't involve taking a meat cleaver to the scope or manually reattaching all the jQuery garbage I was hoping to avoi…
favorite count: 0
has title: AngularJS conditional bind-once?
tagged with: angularjs
type: UnansweredQuestion
upvote count: 1
score: 1
tagged with: bindonce
type: Question
has answer: http://stackoverflow.com/a/29224056

http://stackoverflow.com/comment/46661760
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29226283
has text: How does the markup (HTML) looks like?
score: 0

http://stackoverflow.com/q/29269154
score: 0
has body: I'm supposed to create a trim function for my javascript class. I thought I had everything right, but for some reason it won't work. Can someone check my code to see what I'm missing or how to make it work? window.onload=function() { window.alert(trim(" test")); }; function trim(data) { var result; var whitespace; var start; whitespace="\n\r\t\f"; start=0; if(typeof data === "string") { while(start&lt;data.length, data.charAt(start)===whitespace) { start=start+1; } //end loop scope var end; end=data.length-1; while(end&gt;=0, data.charAt(end)===whitespace) { end=end-1; } //end loop scope if(end&lt;start) { result=""; } else { result=data.substring(start, end+1); } } else //else for first if statement { return result; } return result; }
has comment: http://stackoverflow.com/comment/46739578
type: Question
tagged with: javascript
answer count: 2
has title: Why isn't my trim function working?
has answer: http://stackoverflow.com/a/29269772
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46739592
has answer: http://stackoverflow.com/a/29269823
tagged with: trim
has comment: http://stackoverflow.com/comment/46739621
has comment: http://stackoverflow.com/comment/46739635

http://stackoverflow.com/comment/46829817
comment on: http://stackoverflow.com/a/29318732
type: Comment
has text: I do not have one 'main' view model in the traditional KO sense, I will have several view models eg fixtureViewModel, teamViewModel etc. The fixtureViewModel is the one in the third code sample above, I will be using it to view/add/edit/delete fixtures, which will include team names, date, score etc. The team component I am planning to use in both fixture and team view models and possibly other view models later. AddFixture will add a new fixture to a fixtures array which will be written to the backend db.
score: 0
type: AnswerComment

http://stackoverflow.com/q/29245862
has answer: http://stackoverflow.com/a/29245912
accepted answer: http://stackoverflow.com/a/29245876
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
score: 1
possible better answer: http://stackoverflow.com/a/29245878
upvote count: 1
has answer: http://stackoverflow.com/a/29245878
type: Question
has title: Selecting the next (not immediately) input tag
has answer: http://stackoverflow.com/a/29245876
tagged with: javascript
answer count: 3
has body: If I have three input tags separated by span tags, like this &lt;input class="some-class" type="number" maxlength="4"&gt; &lt;span class="bull"&gt;&amp;bull;&lt;/span&gt; &lt;input class="some-class" type="number"maxlength="4"&gt; &lt;span class="bull"&gt;&amp;bull;&lt;/span&gt; &lt;input class="some-class" type="number" maxlength="4"&gt; How do I select the next input tag using jQuery in order to do something? My jQuery code below does not select the next input tag using .next() function $(':input').keyup(function (e) { if ($(this).val().length == $(this).attr('maxlength')) { $(this).next(':input').focus(); } });
downvote count: 0
tagged with: jquery
favorite count: 0

http://stackoverflow.com/comment/46698524
has text: added fiddle http://jsfiddle.net/6mnLwg0o/2/
type: QuestionComment
type: Comment
score: 0
comment on: http://stackoverflow.com/q/29246564

http://stackoverflow.com/q/29291464
tagged with: dojo
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29307717
has title: Dojo Mobile Set Fields on View Transition
type: Question
answer count: 1
tagged with: javascript
has body: I have created a Bijit (Dojo dijit + business logic) along with a controller class. However in the controller, I am not able to set the field values in the widget. I am able to see the "made it" line on the console but the field values never get set I am trying to fill in data on a form after transitioning to a dojo/mobile/view. Any advice is appreciated. HTML Fragment: Street Number: Street Name: City: Province/State: Country: Zip/Postal: Email: Bijit Class: define([ "dijit/_Widget", "dijit/_TemplatedMixin", "dijit/_WidgetsInTemplateMixin", "dojo/text!customDijits/editAccountTemplate.html", "dojox/mobile/TextBox","dijit/form/TextBox", "dijit/form/NumberTextBox", "dojox/form/Manager", "dojox/mobile/FormLayout" ], function( _Widget, _TemplatedMixin, _WidgetsInTemplateMixin, template) { return dojo.declare([ _Widget, _TemplatedMixin, _WidgetsInTemplateMixin ], { templateString : template, //function to retrieve the data that was typed in getData : function() { if (this.myForm.validate()) { var values = this.myForm.gatherFormValues(); delete values['ownerDocumentBody']; delete values['myForm']; return values; } else { return { "INVALID FORM" : "INVALID" }; } }, //function that sets the fields to the appropriate data fetched setData : function(values) { this.myForm.setFormValues(values); }, //function to clear all the field of the form clearData: function(){ this.myForm.reset(); } }); }); Controller class: define(["dojo/_base/declare", "dojo/on", "dojo/when", "dojo/_base/lang", "dojo/_base/array", "dojo/store/Memory", "dijit/registry", "dojo/Stateful", "dojo/request/xhr", "dijit/Dialog", "dojo/_base/json", "dojo/domReady!" ], function(declare, on, when, lang, array, Memory, registry, Stateful, xhr, Dialog, json) { return declare([ Stateful ], { _customerData : null, _getData : null, _setData : null, _clearData: null, constructor : function() { this._customerData = registry.byId("editAccountWidget"); this._getData = registry.byId("submitEditAccount"); this._setData = reg…
score: 0
has answer: http://stackoverflow.com/a/29307717
tagged with: dijit.form
tagged with: dojox.mobile

http://stackoverflow.com/q/29276353
possible better answer: http://stackoverflow.com/a/29276832
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46757616
accepted answer: http://stackoverflow.com/a/29280091
tagged with: laravel
type: Question
has comment: http://stackoverflow.com/comment/46757230
has answer: http://stackoverflow.com/a/29276832
has answer: http://stackoverflow.com/a/29280091
has title: Adding a HTML form on button click
answer count: 2
has comment: http://stackoverflow.com/comment/46756562
tagged with: javascript
has comment: http://stackoverflow.com/comment/46751371
score: 0
tagged with: http://stackoverflow.com/tag/html
has body: I am making a 'quiz website' for a school project but I am kind off stuck with one part. We need to add questions to a quiz, so I want to make a button "Add Question" which adds 1 (or more) html form(s). I have little JavaScript experience, and know just the basics. My Laravel .blade file: {{ Form::open(array('url'=>'quizzes/edit', 'class' => 'createquiz')) }} Question 1 {{ Form::text('', null, array('placeholder' => 'Question 1', 'size' => '40', 'id' => 'questions')) }} Question 2 {{ Form::text('', null, array('placeholder' => 'Question 2', 'size' => '40', 'id' => 'questions')) }} Question 3 {{ Form::text('', null, array('placeholder' => 'Question 3', 'size' => '40', 'id' => 'questions')) }} Question 4 {{ Form::text('', null, array('placeholder' => 'Question 4', 'size' => '40', 'id' => 'questions')) }} {{ Form::button('Add Question', array('onclick' => 'addQuestion()', 'id' => 'questionadd')) }} {{ Form::submit('Edit Quiz') }} {{ Form::close() }} My JavaScript: function addQuestion() { var node = document.createElement('FORM'); var counter = 1; var limit = 3; if (counter == limit) { alert("You have reached the limit of questions"); } else { node.appendChild(FORM); document.getElementById("questions").appendChild(node); } } So on click of the "Add Question" button I want to have one question added right after the others

http://stackoverflow.com/comment/46859423
has text: The thing is, I have one html page with input column name,age and email . i want these items to be displayed there..
comment on: http://stackoverflow.com/q/29335369
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/46872459
score: 1
comment on: http://stackoverflow.com/q/29342882
type: QuestionComment
has text: I would say avoid using iframe, you will be dealing with IE problems and cache issue, this thing can be done very easily with `jQuery` or best go with `Angular`
type: Comment

http://stackoverflow.com/comment/46947921
comment on: http://stackoverflow.com/q/29360662
type: QuestionComment
has text: can you post the console error ?
type: Comment
score: 0

http://stackoverflow.com/comment/46813063
has text: You want to zoom zoomed img?
type: Comment
comment on: http://stackoverflow.com/a/29309556
type: AnswerComment
score: 0

google-street-view
tags question: http://stackoverflow.com/q/29340833
tag name: google-street-view
tags question: http://stackoverflow.com/q/29221719
type: Tag

http://stackoverflow.com/comment/46839535
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29324189
has text: Why not return out of the function as soon as you get a color? Do you use `i` later? Or do you want to make sure every element is checked?

http://stackoverflow.com/comment/91125671
comment on: http://stackoverflow.com/a/29246795
score: 5
type: AnswerComment
type: Comment
has text: @IsaacLyman, although HTTP headers are case-insensitive, I suggest you follow the proposed documentation, which is: "Cache-Control". Reference: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers

http://stackoverflow.com/comment/46782773
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29293105
has text: Thank you. Doh - yes, shouldn't be using _this_, I'm just over-riding the local scope.
score: 0

http://stackoverflow.com/comment/60274546
has text: This is the sort of annoying thing I've come to expect from Kendo, I'm afraid. They should just make 'bool' work, this is the kind of stuff we spend hours fixing
type: AnswerComment
score: 2
comment on: http://stackoverflow.com/a/29358466
type: Comment

http://stackoverflow.com/comment/46893436
score: 0
type: AnswerComment
type: Comment
has text: @SamJacobs True, but he didnt mention one so Im leaving it out. Either way, the `save` function becomes much easier.
comment on: http://stackoverflow.com/a/29354153

http://stackoverflow.com/q/29277474
has body: // Post Div &lt;div id="post-1"&gt;&lt;img src="art/image01.jpg" /&gt;&lt;/div&gt; &lt;div id="post-2"&gt;&lt;img src="art/image02.jpg" /&gt;&lt;/div&gt; &lt;div id="post-3"&gt;&lt;img src="art/image03.jpg" /&gt;&lt;/div&gt; // MYSQL Json Encode Generated Information var allPosts = [{"type":"tumblr", "link":"www.blah.com"}, {"type":"instagram", "link":"blah.com"}, {"type":"tumblr", "link":"www.blah.com"}] var postTotals = 3; // Generates FancyBox Links for Clickable Post Div function generateFancyBox(){ for(i=1;i&lt;=postTotals;i++){ $("#post-"+i).click(function(){ alert(allPosts[i].link); // This alerts "www.blah.com" just fine. $.fancybox({ "type" : "iframe", "href" : allPosts[i].link // This Variable is always "Undefined". }); }); } } I don't understand why href : allPosts[i].link - always becomes undefined. This code is a shorthand version of a larger project I'm working on. I have html DIVs that I need FancyBox to create clickable links. I can not seem to get the allPosts[i].link to print the URL. However, right above it, when I alert(allPosts[i].link); it prints the URL just fine. What am I doing wrong?
score: 1
has title: Why can't I use javascript variable inside of FancyBox?
downvote count: 0
tagged with: javascript
tagged with: variables
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/29314857
answer count: 3
type: UnansweredQuestion
tagged with: fancybox
has answer: http://stackoverflow.com/a/29277648
has answer: http://stackoverflow.com/a/29277682
has comment: http://stackoverflow.com/comment/46753211
has comment: http://stackoverflow.com/comment/46753325
upvote count: 1
type: Question

http://stackoverflow.com/comment/46737447
score: 0
comment on: http://stackoverflow.com/q/29228144
type: Comment
has text: @noName can you expand on "not working". What is the expected result vs. actual result?
type: QuestionComment

http://stackoverflow.com/comment/46850070
has text: Yes, that's possible though the code will differ in a couple of regards. For example, the `state` would probably need to be an integer instead of a boolean, and the `selectors` would need to be dynamically generated. It may be simpler to do adopt a different approach entirely. Give it a try and if you run into difficulty, then post another question.
type: AnswerComment
comment on: http://stackoverflow.com/a/29328349
score: 0
type: Comment

shadowbox
type: Tag
tag name: shadowbox
tags question: http://stackoverflow.com/q/29334016

http://stackoverflow.com/comment/46813365
has text: @BradleyDotNET I've provided a personal answer.
comment on: http://stackoverflow.com/a/29243293
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/29309945
downvote count: 1
score: 0
has body: You can do something like this: var test = "Atlantic-City-NJ"; test = test.split("-"); var result = ""; for (var i = 0; i &lt; test.length; i++) { if (i == test.length - 1) result += ","; result += " " + test[i]; } //result = "Atlantic City, NJ" alert(result);
type: Answer
answers question: http://stackoverflow.com/q/29309728
upvote count: 1

http://stackoverflow.com/a/29268470
has comment: http://stackoverflow.com/comment/46805104
score: 1
has body: Everything looks good. The issue is that the default regular expression that Rangy uses to determine what constitutes a word is very simplistic. Fortunately you can override it in the options you pass to expand. The example here is also intended just as a starting point to solve the immediate problem; it's obviously too simplistic for general use but should serve as a starting point. sel.expand("word", { trim: true, wordOptions: { wordRegex: /[a-z0-9α]+(['\-][a-z0-9α]+)*/gi } });
upvote count: 1
downvote count: 0
answers question: http://stackoverflow.com/q/29260835
has comment: http://stackoverflow.com/comment/46778704
has comment: http://stackoverflow.com/comment/46791263
has comment: http://stackoverflow.com/comment/46755294
type: Answer

http://stackoverflow.com/comment/46937202
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29359493
has text: How could I make it work with for images instead of three? Thanks.

http://stackoverflow.com/comment/46926898
type: Comment
comment on: http://stackoverflow.com/a/29372748
has text: @EdenSource Yeah, if I was using this in a project I would. But this demonstrates the solution without giving the complete code. That way anyone using it actually has to understand it to make it work in their project.
score: 0
type: AnswerComment

http://stackoverflow.com/q/29227856
score: 4
accepted answer: http://stackoverflow.com/a/29227957
has title: Make object static and still assign and change it
has comment: http://stackoverflow.com/comment/46663083
answer count: 3
has comment: http://stackoverflow.com/comment/46662934
has comment: http://stackoverflow.com/comment/46664008
has answer: http://stackoverflow.com/a/29227957
favorite count: 0
possible better answer: http://stackoverflow.com/a/29227958
upvote count: 4
has answer: http://stackoverflow.com/a/29227958
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29228265
downvote count: 0
has body: I want to use a static object, assign it to a new variable and change it. var MY_STATIC: {message: "I am static"}; var test = MY_STATIC; test.message = "I am not static enough"; console.log(MY_STATIC.messsage); ==&gt; I am not static enough But I want MY_STATIC.message to be still "I am static" to use it later again. How can I make the object stay the same allthough I assign and change it
type: Question
tagged with: object
has comment: http://stackoverflow.com/comment/46662657
has comment: http://stackoverflow.com/comment/46662685
has comment: http://stackoverflow.com/comment/46662759
tagged with: javascript

http://stackoverflow.com/a/29261413
accepted answer of: http://stackoverflow.com/q/29261255
answers question: http://stackoverflow.com/q/29261255
score: 1
has body: Try this snippet of code: $('.togglePlaylist button').on('click', function() { var $this = $(this); if($('.playlistHolder').is(':visible')) { $('.playlistHolder').hide(); $this.text('Hide Playlist'); } else { $('.playlistHolder').show(); $this.text('Show Playlist'); } }); Working JSFiddle
upvote count: 1
type: AcceptedAnswer
downvote count: 0
type: Answer

datepicker
tags question: http://stackoverflow.com/q/29223121
tags question: http://stackoverflow.com/q/29274239
tags question: http://stackoverflow.com/q/29294159
tags question: http://stackoverflow.com/q/29251586
tags question: http://stackoverflow.com/q/29364436
tags question: http://stackoverflow.com/q/29294170
tags question: http://stackoverflow.com/q/29357216
tags question: http://stackoverflow.com/q/29263936
tags question: http://stackoverflow.com/q/29344893
tag name: datepicker
tags question: http://stackoverflow.com/q/29231147
tags question: http://stackoverflow.com/q/29311328
type: Tag
tags question: http://stackoverflow.com/q/29294546
tags question: http://stackoverflow.com/q/29225594
tags question: http://stackoverflow.com/q/29302302
tags question: http://stackoverflow.com/q/29326568
tags question: http://stackoverflow.com/q/29234405
tags question: http://stackoverflow.com/q/29326278
tags question: http://stackoverflow.com/q/29232617
tags question: http://stackoverflow.com/q/29231999
tags question: http://stackoverflow.com/q/29342580
tags question: http://stackoverflow.com/q/29363103
tags question: http://stackoverflow.com/q/29355833
tags question: http://stackoverflow.com/q/29329690

http://stackoverflow.com/comment/46645489
score: 4
comment on: http://stackoverflow.com/q/29218278
type: Comment
type: QuestionComment
has text: First, don't put Java and JavaScript in the same bag, they're really different. Then, post what you have so far, or you'll get downvoted, because your question is too broad, as it's not possible to provide a specific answer.

http://stackoverflow.com/comment/46881455
type: Comment
type: QuestionComment
has text: You have to inspect the `request` and `response` network calls in your browser dev tools. You are already saying **your method is not being hit**, and **that's the issue**. A complete _guess_, because I recall going through similar, is that be wary of `redirect` - e.g. if you have `FriendlyUrls` which, well, redirects your call to a "friendly url" (therefore changing the original request).
score: 1
comment on: http://stackoverflow.com/q/29346288

http://stackoverflow.com/a/29351919
accepted answer of: http://stackoverflow.com/q/29351034
type: Answer
has comment: http://stackoverflow.com/comment/46935656
score: 1
has comment: http://stackoverflow.com/comment/46936876
upvote count: 1
has body: One way to do this is via the Accept header. If the request only accepts JSON then let the request go through to your API. If the request accepts HTML then always serve up your index page. Then once the index page loads angular's router will take care of the rest. // Angular config - default Accept header for all ajax requests $httpProvider.defaults.headers.common = { 'Accept': 'application/json' }; // Middleware in Node to "intercept" non JSON requests // Place this after express.static middleware but before your route definitions. app.use(function(req, res, next) { // keep in mind this applies to all requests, so 404s will need to be handled by your angular app since any url will serve up the index page if(req.header('Accept') !== 'application/json') { console.log('serving the index page'); req.url = '/'; // force the url to serve the index route. } next(); }); One more thing to note about this approach is that obviously you won't be able to see/debug your JSON data by hitting the URL directly anymore. There are several useful tools like Advanced REST Client or POSTman which actually give you better control and more options for things like that. Just make sure you set the Accept header in one of those tools and you'll be able to see the JSON response.
downvote count: 0
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29351034

http://stackoverflow.com/comment/46865599
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29338684
has text: Are you trying to understand what kinds of real world algorithms would result in exponential complexity?

http://stackoverflow.com/comment/46774819
score: 2
comment on: http://stackoverflow.com/q/29288767
has text: How is the variable passing zero? Can we see some more code, please?
type: Comment
type: QuestionComment

http://stackoverflow.com/q/29222387
type: Question
has comment: http://stackoverflow.com/comment/46653735
answer count: 1
tagged with: javascript
has body: I got confused about these two , var a = {} and var a = function(){} a is an object in the first case , a is a function in the second case. And function is also a object. what is the difference?
score: 0
has comment: http://stackoverflow.com/comment/46653623
favorite count: 0
upvote count: 2
linked to: http://stackoverflow.com/q/4125479
downvote count: 2
accepted answer: http://stackoverflow.com/a/29222575
has title: what is the difference between var a = {} and var a = function(){}
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46653615
has answer: http://stackoverflow.com/a/29222575
has comment: http://stackoverflow.com/comment/46653610

http://stackoverflow.com/q/29324882
tagged with: binary-search-tree
tagged with: breadth-first-search
answer count: 0
type: UnansweredQuestion
has title: What is wrong with my code for validating a BST with BFS level order traversal
upvote count: 1
has body: I've been trying to get the test cases on OJ Leetcode to pass for validating a BST using level order traversal and it's not passing. I'm passing 73/74 and can't figure out why. Any advice to point me in the correct direction is much appreciated. Input: {3,#,30,10,#,#,15,#,45} Output: true Expected: false Based on the input, maybe I'm wrong here and please correct me if I am, but I believe the BST should look like the following based on the input: 3 / \ N 30 / \ 10 N / \ N 15 / \ N 45 Here is my code: var isValidBST = function(root) { if (!root || !root.left &amp;&amp; !root.right) { return true; } var i = 0; var j = -1; var queue = {}; var isValid = true; var recurse = function (node, side) { if (!node) { return; } if (node.left) { queue[i++] = node.left; if (node.val &lt;= node.left.val) { isValid = false; } } if (node.right) { queue[i++] = node.right; if (node.val &gt; node.right.val) { isValid = false; } } if (side === 'left') { if (node.val &gt;= root.val) { isValid = false; } } else { if (node.val &lt;= root.val) { isValid = false; } } recurse(queue[++j], side); }; recurse(root.left, 'left'); j = j &gt; 0 ? i - 1 : -1; recurse(root.right, 'right'); return isValid; };
has comment: http://stackoverflow.com/comment/46840625
type: Question
downvote count: 0
tagged with: javascript
score: 1
favorite count: 0
tagged with: binary-tree

http://stackoverflow.com/a/29360806
accepted answer of: http://stackoverflow.com/q/29360616
answers question: http://stackoverflow.com/q/29360616
upvote count: 1
type: Answer
has body: $(document).ready(function() { var value = $("#text").val(); var v1 = value.replace("&lt;p&gt;", ""); v1 = (v1.replace("&lt;/p&gt;", '').trim()); $("#text").val(v1); }); var observe; if (window.attachEvent) { observe = function(element, event, handler) { element.attachEvent('on' + event, handler); }; } else { observe = function(element, event, handler) { element.addEventListener(event, handler, false); }; } function init() { var text = document.getElementById('text'); function resize() { text.style.height = 'auto'; text.style.height = text.scrollHeight + 'px'; } /* 0-timeout to get the already changed text */ function delayedResize() { window.setTimeout(resize, 0); } observe(text, 'change', resize); observe(text, 'cut', delayedResize); observe(text, 'paste', delayedResize); observe(text, 'drop', delayedResize); observe(text, 'keydown', delayedResize); text.focus(); text.select(); resize(); } textarea { width: 400px; border: 1px solid #000; overflow: hidden; padding: 0; outline: none; background-color: #fff; resize:none; } &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"&gt;&lt;/script&gt; &lt;textarea rows="1" style="height:1em;" id="text"&gt; &lt;p&gt; blablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablablabla &lt;/p&gt; &lt;/textarea&gt;
downvote count: 0
score: 1
type: AcceptedAnswer

http://stackoverflow.com/q/29365778
tagged with: cordova
has body: i have some question about angularJs.. how to re init some variable in scope after i used emit . example code: $scope.uiConfig = {title: "example"}; $scope.$emit('myCostumCalendar', 'Data to send'); $scope.$on('myCostumCalendar', function () { $scope.uiConfig = {title: "new Title"}; });
type: UnansweredQuestion
type: Question
score: 0
has answer: http://stackoverflow.com/a/29365888
has answer: http://stackoverflow.com/a/43134704
tagged with: javascript
has answer: http://stackoverflow.com/a/43134473
tagged with: angularjs
answer count: 3
has title: how to reload data after used $emit in angular js

http://stackoverflow.com/comment/49126867
type: Comment
comment on: http://stackoverflow.com/q/29249579
type: QuestionComment
has text: Please refer edited code. This code works fine.
score: 0

http://stackoverflow.com/comment/46735880
score: 0
type: Comment
type: QuestionComment
has text: Not sure this helps, but the jquery show has default duration of 400 ms. Perhaps it is overriding the transition. If you add an option to increase the duration to be more than the transition time it might help. for example show({duration: 500}). Hope this is what you are looking for.
comment on: http://stackoverflow.com/q/29267014

http://stackoverflow.com/q/29289308
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29292476
type: Question
tagged with: aurelia
answer count: 1
downvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29292476
has body: When you set up the an Aurelia computed property you can declare dependencies to avoid polling (see: Is constant polling the way Aurelia&#39;s change detection is working?). get fullName(){ return `${this.firstName} ${this.lastName}`; } } declarePropertyDependencies(Welcome, 'fullName', ['firstName', 'lastName']); But, how would you do this if you want to use the values from properties of an object? this.person = { firstName: 'John', lastName: 'Doe' } get fullName(){ return `${this.person.firstName} ${this.person.lastName}`; } This displays fine, of course, but declaring the dependencies as per below for the computed does not trigger an update when you change the value of person.firstName or person.lastName: declarePropertyDependencies(Welcome, 'fullName', ['person.firstName', 'person.lastName']); Nor this: declarePropertyDependencies(Welcome, 'fullName', ['person']); Is this possible with the current declareDependencies code?
score: 1
linked to: http://stackoverflow.com/q/29028354
favorite count: 0
upvote count: 1
has title: In Aurelia computeds, when setting dependencies, how would declare a dependency on an object property

http://stackoverflow.com/comment/46716496
comment on: http://stackoverflow.com/q/29254871
score: 0
type: Comment
type: QuestionComment
has text: @geocodezip yes will do but the action is not working on my button ? or if the search button will not work as aanadh sp said then is there any other way to do this can you please help me out ?

http://stackoverflow.com/q/29258954
answer count: 2
has answer: http://stackoverflow.com/a/29259105
downvote count: 0
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/46720428
possible better answer: http://stackoverflow.com/a/29259105
has answer: http://stackoverflow.com/a/29259179
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46720638
has body: I am stuck on problem where I try to utilies the addEventListener. I did try to find solutions on the web but I think my knowledge is to limited to pick the suitable answer. What I tried is to invoke a function "addFile()" when a key is pressed in this example enter(13) unfortunatly nothing happens. I could add the onkeypress attribute to the input "add-file" with a slightly edited addFileOnKeyEvent(event) but I'm trying to understand what is wrong with my eventListener. I hope you could follow my explanation, as this is my first question. :) function addFile() { var x = document.getElementById("add-file").value; x = x + ".xml"; var lbl = document.createElement("label"); var node = document.createTextNode(x); lbl.appendChild(node); var element = document.getElementById("appendable"); element.appendChild(lbl); } function addFileOnKeyEvent(event) { var evt = event.keyCode; var textField = document.getElementById("add-file").addEventListener("keypress", function() { if (evt == 13) { addFile(); } }); } Dateien Hinzufügen
upvote count: 1
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29259179
score: 1
has title: can not find the solution to my "addEventListener" function
type: Question

http://stackoverflow.com/comment/46913966
comment on: http://stackoverflow.com/q/29365500
type: Comment
type: QuestionComment
score: 2
has text: please show the code you used for drawing. canvas is transparent by default..

http://stackoverflow.com/a/29337940
type: Answer
upvote count: 1
score: 1
has body: Try this way. You have to put onKeyUp function on inputText not in Button. &lt;html&gt; &lt;head&gt; &lt;script type="text/javascript"&gt; function myFunction() { var name = document.getElementById("name").value; if (name === 'Lianzheng') { alert("!!"); document.getElementById("play").disabled = false; } else { document.getElementById("play").disabled = true; } } &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;input type="text" id="name" onkeyup="myFunction()"/&gt;&lt;br/&gt; &lt;input id="play" class="button" disabled type="submit" value="play" /&gt; &lt;/body&gt; But anyway, you better to check name only after the button clicked. And check name in javascript, if name is correct make submit, if not return false. By this way you can avoid unnecessary submition.
downvote count: 0
answers question: http://stackoverflow.com/q/29337580
has comment: http://stackoverflow.com/comment/46864184

http://stackoverflow.com/q/29301542
type: Question
answer count: 2
tagged with: google-maps
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/59923434
favorite count: 0
tagged with: google-maps-api-3
has title: Google Maps SVG marker with PNG fallback
has body: I've implemented the following code for a Google map with a custom SVG marker: function add_marker( $marker, map ) { // var var latlng = new google.maps.LatLng( $marker.attr('data-lat'), $marker.attr('data-lng') ); // create marker var iconBase = 'http://localhost:8888/theme/wp-content/themes/bananas/images/'; var marker = new google.maps.Marker({ position : latlng, map : map, icon : iconBase + 'marker.svg' }); // add to array map.markers.push( marker ); // if marker contains HTML, add it to an infoWindow if( $marker.html() ) { // create info window var infowindow = new google.maps.InfoWindow({ content : $marker.html() }); // show info window when marker is clicked google.maps.event.addListener(marker, 'click', function() { infowindow.open( map, marker ); }); } } This works great, but I wondered if it's possible to add a PNG fallback for browsers that do not support SVG? Maybe it's possible to display a div instead of an icon and then control the SVG detection with modernizr.
tagged with: http://stackoverflow.com/tag/svg
upvote count: 2
accepted answer: http://stackoverflow.com/a/59923434
score: 2
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29307803
has answer: http://stackoverflow.com/a/29307803

http://stackoverflow.com/a/29304221
has body: var errors = ["First name is blank", "Last name is blank", "Company name is blank", "Email is blank"] errors.forEach( function(error){ $("ul").append(" "+error+" "); })
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/29304130
has comment: http://stackoverflow.com/comment/46803122
downvote count: 1
has comment: http://stackoverflow.com/comment/46803263
has comment: http://stackoverflow.com/comment/46803382
has comment: http://stackoverflow.com/comment/46803012
score: 0

http://stackoverflow.com/comment/46927672
type: Comment
has text: How can I check if there is duplicate key for mapped_field in final object?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29353822

http://stackoverflow.com/comment/46925157
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29370459
has text: That definitely sounds like a horrible bug within the compile process. Please read about submitting a bug to Meteor: https://github.com/meteor/meteor/wiki/Contributing-to-Meteor
score: 0

http://stackoverflow.com/comment/46784913
type: AnswerComment
has text: @vishnu I guess this is what you are looking for, if then dont forget to cast your valuable vote and mark it as answer
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29272956

http://stackoverflow.com/comment/46710122
type: AnswerComment
comment on: http://stackoverflow.com/a/29253083
score: 0
has text: @R3tep when i was giving the answer i couldn't see your answer.It's not duplicate it's just a lag b/w timings answers. An i appreciaite that you won by 33 seconds :-P
type: Comment

http://stackoverflow.com/q/29370988
has comment: http://stackoverflow.com/comment/46926288
has comment: http://stackoverflow.com/comment/46925741
has comment: http://stackoverflow.com/comment/46923830
type: Question
tagged with: reactjs
tagged with: javascript
has title: Improving Flux architecture by reducing unnecessary code
has comment: http://stackoverflow.com/comment/46924025
has comment: http://stackoverflow.com/comment/46923966
downvote count: 0
favorite count: 0
tagged with: flux
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46923036
has body: In our codebase, we have recently migrated a lot of React components to a pure flux architecture. Thus, our data flow looks almost exactly like this image provided by the Facebook team: (source: github.io) One issue we're running into is that there's a lot of boilerplate code required to make a call to the server and get a result. The process is as follows: View propagates an action called something like GET_DATA_FROM_SERVER to an action creator (let's say called ViewActionCreator). ViewActionCreator dispatches this action, which has no payload in most cases, and then calls api.retrieveData Upon receiving data from the server, api.retrieveData dispatches an action, in this case called SERVER_DATA_RECEIVED with the retrieved data as the payload. Stores respond to the two actions dispatched. However, in most cases stores only do something for the second action (SERVER_DATA_RECEIVED), since we've found that optimistic view updates are, with a few exceptions like logging in, not usually required or very helpful. Hence, my question is, is there any reason why we shouldn't have views call api's methods directly, and have those api methods dispatch actions only upon data reception? Another related issue we're running into results from the use of constants, generated using https://github.com/STRML/keyMirror. We repeatedly run into an error where we forget to add a constant used in an action creator and store to our constants file, but this doesn't manifest until runtime, since our stores use switch statements to test which action they're receiving from the dispatcher, and when we use a constant that's undefined, this simply percolates down to the end of the switch statement.
score: 2
answer count: 0
upvote count: 2

http://stackoverflow.com/comment/46735129
type: AnswerComment
score: 1
has text: How can you tell which specific ice candidate, or connection, is being used?
type: Comment
comment on: http://stackoverflow.com/a/29266615

http://stackoverflow.com/q/29354009
has answer: http://stackoverflow.com/a/29354183
has comment: http://stackoverflow.com/comment/46893120
possible better answer: http://stackoverflow.com/a/29354183
accepted answer: http://stackoverflow.com/a/29354091
type: AnsweredQuestion
score: 0
has comment: http://stackoverflow.com/comment/46893152
has title: why is only the last item is showing and not all of them
type: Question
has body: I am using the code below to call a php page that displays all the products and then parse them and display them on the string. This was working fine last week displaying all the results however now it has seem to have broken and only displays the last results from the database and after several days and painful hour staring at my screen i am starting to go mad and could do with some help. function display(results) { article = document.getElementById("homeArticle"); item = ''; for (var i = 0; i < results.length; i++){ var item = results[i]; var name = item.P_NAME; var description = item.P_DESCRIPTION; var price = item.P_PRICE; // next I add to the string that we want to place on the page item = ' Name:' + name + ' Description:' + description + ' Price:' + price + ' '; }; article.innerHTML = item; } function getItems() { var xhr = new XMLHttpRequest(); xhr.onload = function() { var results = JSON.parse(this.responseText); display(results.rows); }; xhr.open("GET", "displayData.php"); xhr.send(); } window.addEventListener("load", getItems); if anyone could have any pointers that would help massively thank you!
has comment: http://stackoverflow.com/comment/46893122
tagged with: javascript
has answer: http://stackoverflow.com/a/29354091
answer count: 2

http://stackoverflow.com/comment/46811847
score: 0
type: AnswerComment
has text: I was trying to do all the shapes just using primitives and not the pre-defined functions.
type: Comment
comment on: http://stackoverflow.com/a/29308965

http://stackoverflow.com/q/29326278
downvote count: 0
has comment: http://stackoverflow.com/comment/46842944
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29328077
tagged with: datepicker
answer count: 1
favorite count: 0
tagged with: codeigniter
has body: I have a problem using jQuery datepicker inside the modal form. But worked when i'm not using it in the modal. Can anyone help me and give me some advice? Sorry for bad english. This is the code i have. Registrasi Pasien nama lengkap Jenis Kelamin Laki - laki Perempuan Alamat Kota Propinsi -- Pilih Propinsi -- Aceh Bali Banten Bengkulu Gorontalo Jakarta Jambi Jawa Barat Jawa Tengah Jawa Timur Kalimantan Barat Kalimantan Selatan Kalimantan Tengah Kalimantan Utara Kepulauan Bangka Belitung Kepulauan Riau Lampung Maluku Maluku Utara Nusa Tenggara Barat Nusa Tenggara Timur Papua Papua Barat Riau Sulawesi Barat Sulawesi Selatan Sulawesi Tengah Sulawesi Utara Sumatera Barat Sumatera Selatan Sumatera Utara Daerah Istimewa Yogyakarta Tempat Lahir Tanggal Lahir Registrasi Batal And this is the code for datepicker inside formelements.js that i used to store the jQuery code : $(document).ready(function() { //Multiselect - Select2 plug-in $("#multi").val(["Jim", "Lucy"]).select2(); //Date Pickers $('#datepicker-range, #datepicker-component, #datepicker-component2').datepicker(); $('#datepicker-embeded').datepicker({ daysOfWeekDisabled: "0,1" }); $('#datepicker-custom').datepicker({ dateFormat: 'dd-mm-yy', minDate: '+5d', changeMonth: true, changeYear: true, }); var enforceModalFocusFn = $.fn.modal.Constructor.prototype.enforceFocus; $.fn.modal.Constructor.prototype.enforceFocus = function() {}; $confModal.on('hidden', function() { $.fn.modal.Constructor.prototype.enforceFocus = enforceModalFocusFn; }); $confModal.modal({ backdrop : false }); Thats all i can inform to you, hope you can help me.
has comment: http://stackoverflow.com/comment/46842974
accepted answer: http://stackoverflow.com/a/29328077
upvote count: 1
tagged with: php
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/46842955
type: Question
has title: jQuery datepicker not work inside the Codeigniter and Bootsrap modal form

http://stackoverflow.com/comment/46778617
comment on: http://stackoverflow.com/q/29290624
score: 0
type: Comment
type: QuestionComment
has text: Because that is not the case in other languages, and is often neglected.

http://stackoverflow.com/q/29240561
tagged with: node.js
has comment: http://stackoverflow.com/comment/46688033
score: 1
has comment: http://stackoverflow.com/comment/46687281
has body: When I run the grunt watch task in my terminal, it doesn't seem to be picking up any changes when I modify files. I'm not sure if it's my file structure or the configuration in my Gruntfile.js. Can anyone let me know what I have done wrong? sass: { dist: { options: { style: 'compressed', require: 'susy' }, files: { 'app/styles/css/main.css': 'app/styles/sass/main.scss' } } }, css: { files: ['css/*.scss'], tasks: ['sass'], options: { spawn: false, } }, watch: { css: { files: 'app/styles/sass/*.scss', tasks: ['sass'], options: { livereload: true, }, } } }); grunt.loadNpmTasks('grunt-contrib-sass'); grunt.loadNpmTasks('grunt-contrib-watch'); grunt.loadNpmTasks('grunt-autoprefixer'); grunt.loadNpmTasks('grunt-contrib-cssmin'); grunt.loadNpmTasks('grunt-contrib-watch'); grunt.loadNpmTasks('grunt-sprite-generator'); grunt.registerTask('watchfiles', ['sass', 'watch' ]);
upvote count: 1
has comment: http://stackoverflow.com/comment/46687310
tagged with: grunt-contrib-watch
type: Question
tagged with: javascript
tagged with: gruntjs
has title: Grunt 'watch' command not working
has comment: http://stackoverflow.com/comment/46697659
answer count: 1
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/46687603
has comment: http://stackoverflow.com/comment/46790741
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/38808301

http://stackoverflow.com/a/29356556
answers question: http://stackoverflow.com/q/29312024
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29312024
has body: Removing the color scale and directly applying the color will fic your problem. Color scale will map scalar numbers to colors. For example: 1 to red, 2 to yellow, etc. Since you already know the color then you don't need to use the color scale.
type: Answer
score: 0

http://stackoverflow.com/q/29354170
has title: Checking if an element has one class vs another alway returns true
has answer: http://stackoverflow.com/a/29354335
has body: I'm trying to check if an element has one of two classes. If it doesn't then it should run some other function. I'm using the || or operator but, regardless of the if statement, it always returns true and runs the inner functionality, which is not what I expect. Is my syntax wrong here? if (!elm.hasClass('report-error') || !elm.hasClass('data-error')) { // Do something }
favorite count: 0
upvote count: 2
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/46893484
has comment: http://stackoverflow.com/comment/46893441
possible better answer: http://stackoverflow.com/a/29354352
type: Question
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/29354335
answer count: 2
has answer: http://stackoverflow.com/a/29354352
downvote count: 0

http://stackoverflow.com/a/29257767
has body: As gulp.src() defines the source of the files that you wish to pipe with gulp, gulp.dest() defines the destination of the files after they have passed through the pipe. In this case, "dist/" is the name of the destination folder, it is a commonly used short form of the distribution folder which is deployed.
score: 3
downvote count: 0
answers question: http://stackoverflow.com/q/29255622
upvote count: 3
type: Answer

http://stackoverflow.com/q/29237609
answer count: 2
tagged with: javascript
tagged with: jquery
has body: I need to attach a plugin function to multiple elements on a page. For a single element, the function is attached like this (limiter being the plugin function): if (fullDescription.length) { fullDescription.limiter(1000, fullDescriptionCounter); } I need to attach this plugin to multiple elements on a page. To achieve it, I came up with this code: if (categoryDescription.length) { $.each(categoryDescription, function(index, value) { value.limiter(180, categoryDescriptionCounter); }); } Unfortunately, limiter is not accessible from within the anonymous function that is a callback to the $.each() iterator. What are my options to get the job done? How can I bind limiter to the anonymous function?
accepted answer: http://stackoverflow.com/a/29237636
score: 0
has answer: http://stackoverflow.com/a/29237644
possible better answer: http://stackoverflow.com/a/29237644
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29237636
has title: Bind a jQuery plugin function to many elements in a loop
type: Question

refluxjs
tags question: http://stackoverflow.com/q/29236964
tag name: refluxjs
tags question: http://stackoverflow.com/q/29286611
type: Tag
tags question: http://stackoverflow.com/q/29242408
tags question: http://stackoverflow.com/q/29240004

http://stackoverflow.com/a/29266533
type: Answer
answers question: http://stackoverflow.com/q/29260664
score: 0
has body: So, found the problem. you have: and you have to change language to type and it should look like this:

http://stackoverflow.com/q/29270799
type: AnsweredQuestion
has body: I have an issue I can't seem to solve, I have a form with a bunch of text-fields but I need to extract their information through AJAX or just through a simple JavaScript function. I need this data to be extracted, string by string into an array which should then be passed to PHP. If understood this correctly, AJAX can be used with JQuery or JavaScript, now I'm not sure I understand JQuery very well. Anyway I've been searching google for good examples, and I really can't find anything good. Nombre de Usuario: Contraseña: Correo Electrónico: Nombre: Primer Apellido: Segundo Apellido: This is my form, some of the values are in Spanish, the website I'm supposed to make has to be in that language. If I understood things right, I should call the function I want with an "OnClick" through my submit input button. This is the first time I've done web development, and understanding CSS and HTML was difficult for me. I was wondering if someone could help me out with an example or something. I'm basically using MVC to organize this, with HTML and JavaScript as the View, PHP as the control and Oracle SQL as the model. I'm using PHP precisely for that reason, I need to connect to the database, and send the information through PHP. I'm not looking for anyone to fix my thing or anything of the sort, all I need is an example and small explanation if possible.
has answer: http://stackoverflow.com/a/47254712
score: 1
type: Question
has comment: http://stackoverflow.com/comment/46743319
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/29270883
tagged with: ajax
possible better answer: http://stackoverflow.com/a/29270876
has comment: http://stackoverflow.com/comment/46742403
answer count: 3
has answer: http://stackoverflow.com/a/29270876
tagged with: http://stackoverflow.com/tag/html
has title: Extracting data from HTML form with inputs with JavaScript or AJAX and then passing it on to PHP
has comment: http://stackoverflow.com/comment/46743776
upvote count: 1
accepted answer: http://stackoverflow.com/a/29270883
tagged with: php
has comment: http://stackoverflow.com/comment/46742620

http://stackoverflow.com/comment/46849181
type: Comment
has text: Thanks for your response but its still not working i dont know whats going on
comment on: http://stackoverflow.com/a/29329512
type: AnswerComment
score: 0

http://stackoverflow.com/a/29290844
type: Answer
score: 2
answers question: http://stackoverflow.com/q/29290712
downvote count: 0
has body: There is a 50% chance that the while condition will be false on the first attempt. In such cases you will never see the loop's body being run. var random = Math.random(); console.log('Initial value of random is', random); if (random &gt;= 0.5) console.warn('the while loop will not run'); while(random &lt; 0.5) { console.log("This is a while loop"); random = Math.random(); } In your case, you may have wanted to write a do..while loop var random; do { // go into this block console.log("This is a while loop"); random = Math.random(); } while (random &lt; 0.5); // if condition true, go back to the `do` If you're just starting with loops, it may be useful to consider how to re-write for loops as while loops var i = 0; while (i &lt; 5) { console.log("This is a while loop"); i++; } This isn't so you use while instead of for when a for is more natural, but so you get a feel for while loops, how they work and how sometimes they will suit the code you're trying to write.
upvote count: 2

http://stackoverflow.com/q/29355628
downvote count: 2
has body: I was told in a JavaScript interview to create a function getPrime(n) to generate an array with only primitive numbers in it. The number in array has to be between 0 and n. How to write it correctly?
tagged with: primes
has title: Create a function that can generate array with only prime numbers
type: AnsweredQuestion
tagged with: primitive
accepted answer: http://stackoverflow.com/a/29356621
type: Question
upvote count: 0
score: -2
tagged with: arrays
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/58838325
has comment: http://stackoverflow.com/comment/46944415
favorite count: 0
has answer: http://stackoverflow.com/a/29356621
has comment: http://stackoverflow.com/comment/46896315

http://stackoverflow.com/a/29297008
has body: The JS: $(document).ready(function hiren(){ // On form's submit... $('form').submit(function(){ // Get input's url var url = $('input[name="url"]').val(); // Do ajax's GET request $.ajax({ type: "GET", url: url, // &lt;-- this is the url from the input contentType: "application/json; charset=utf-8", async: false, dataType: "json", success: function (data, textStatus, jqXHR) { var markup = data.parse.text["*"]; var i = $('&lt;div&gt;&lt;/div&gt;').html(markup); // remove links as they will not work i.find('a').each(function() { $(this).replaceWith($(this).html()); }); // remove any references i.find('sup').remove(); // remove cite error i.find('.mw-ext-cite-error').remove(); $('#article').html($(i).find('p')); }, error: function (errorMessage) { } }); }); });
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29296543

http://stackoverflow.com/q/29271377
has answer: http://stackoverflow.com/a/29271536
has answer: http://stackoverflow.com/a/29271448
has answer: http://stackoverflow.com/a/29271461
tagged with: http://stackoverflow.com/tag/html
downvote count: 1
has answer: http://stackoverflow.com/a/29271439
answer count: 4
has comment: http://stackoverflow.com/comment/46743310
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/29268612
has body: Hi I have 2 submit buttons within one form. The script below works to help prevent empty fields from being submitted by sending an alert msg to the user. However I only need it to run with one of my two submit buttons is clicked. So in other words if one button a if clicked it would submit the form with or without blank fields, and the other button would run the script below and not allow the form to be submitted with blank fields. Any help is greatly appreciated, Thanks. &lt;script type="text/javascript"&gt; $('form').on('submit', function () { var thisForm = $(this); var thisAlert = thisForm.data('alert'); var canSubmit = true; thisForm.find('[data-alert]').each(function(i) { var thisInput = $(this); if ( !$.trim(thisInput.val()) ) { thisAlert += '\n' + thisInput.data('alert'); canSubmit = false; }; }); if( !canSubmit ) { alert( thisAlert ); return false; } }); &lt;/script&gt;
tagged with: php
has comment: http://stackoverflow.com/comment/46743476
type: Question
has title: How can I run a script when 1 of my 2 submit buttons within 1 form is clicked?
score: 1
tagged with: forms
upvote count: 2
tagged with: javascript
tagged with: jquery
favorite count: 0

http://stackoverflow.com/comment/46875148
type: QuestionComment
has text: `myFunction = this.myFunc;` There is no need to make another copy of the function. Instead use your second approach where you referred `this` using myobject
comment on: http://stackoverflow.com/q/29344307
score: 0
type: Comment

http://stackoverflow.com/comment/46656109
type: Comment
type: QuestionComment
has text: disable pop up blocker
comment on: http://stackoverflow.com/q/29223275
score: 0

http://stackoverflow.com/a/29276832
type: Answer
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/29276353
downvote count: 0
has body: You can try using innerHTML with += operator. It allows you to append to the end of what ever you are appending to. Here is all the code: &lt;input type="button" onclick="appendQuestion()" value="Add new question"&gt; Here is that function: function appendQuestion() { Document.getElementById('questionDivContainer').innerHTML = "code for the new question"; } Jquery append() would also work for you. If you are serious about coding visit w3c or mdn. Microsoft also has a great guide for styling things somewhere. www.dribbble.com is an excellent resource for styling and inspiration you can find amazing wesites here http://www.awwwards.com/websites/clean/ Feel free to ask me any questions.

http://stackoverflow.com/comment/46724978
has text: You can take a look at the creational patterns given : http://www.dofactory.com/net/design-patterns
score: 0
comment on: http://stackoverflow.com/q/29261259
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29275178
upvote count: 5
accepted answer of: http://stackoverflow.com/q/29272902
score: 5
answers question: http://stackoverflow.com/q/29272902
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: It's not clear what you mean by "geojson layer" , but when you mean a Data-layer there are 2 options: when you don't need the click-event to be triggered for the feature(e.g. polygon) set the clickable-option of the layer to false: map.data.setStyle({clickable:false}); when the click-event should be triggered for both, map and feature trigger the event for the map programmatically: map.data.addListener('click',function(e){ google.maps.event.trigger(this.getMap(),'click',e); });

http://stackoverflow.com/a/29351974
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/46889337
answers question: http://stackoverflow.com/q/29351598
has body: You're modifying the DOM tree many times, instead create a dom element in memory and append all child elements. At the end append it to the live DOM tree. In your code, the tags are not closed properly so it won't be generated properly. jQuery will automatically close the tags such as which are not closed properly. $("#right").append( "Team Leaders" + " Goals " ); var $div = $(" "); for (var i = 0; i < 5; i++) { $div.append(" "+ topGoals[i].name + ": " + topGoals[i].goals + " " ); } $("#right").append($div); $("#right").accordion();
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29351598
type: Answer

http://stackoverflow.com/comment/46790049
comment on: http://stackoverflow.com/q/29297333
has text: TL;DR. But you have an extra hyphen here: `-col-sm-12` on your the `2`nd line. And also in the `div` parent of `.noticia-info`.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/130646883
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/57881151
has text: @LWC , would you be able to provide a reproducible code of your issue?

http://stackoverflow.com/q/29307587
accepted answer: http://stackoverflow.com/a/29307620
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29307625
score: 1
has comment: http://stackoverflow.com/comment/46809413
upvote count: 1
possible better answer: http://stackoverflow.com/a/29307836
type: Question
has answer: http://stackoverflow.com/a/29307836
linked to: http://stackoverflow.com/q/23191193
has title: String doesn't work with double & single quotes
has body: In my code i have a JavaScript function that has a line like below: var header = "Name"; For some reason this doesn't work. I think the problem is the single or double quotes in the string. The idea is to insert this header as a column header in a table with a clickable link. The issue is, ('T') doesn't work here. I want to call the JS function SortTable with a integer and character argument. I tried the below with escape character and that too doesn't work. var header = "ATO"; How can make this long string properly work?
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/29307620
answer count: 3
favorite count: 0
has comment: http://stackoverflow.com/comment/46809319

http://stackoverflow.com/comment/46718032
has text: PHP Fatal error: Call to undefined function RunQuery() is what I get. I think I modified the getStates.php correct with the connection calls (so the rest of the form now loads again) but the states dont populate. Also, what do I put in the onchange on country select? Anything in state onchange? Because i disable state until country is selected to prevent SQL error.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29241933

http://stackoverflow.com/a/29265708
score: 1
has body: So you want to get the number of non-Array items in an Array? var arr = ['a', [], 'b', []]; arr.filter(function (e) {return !Array.isArray(e);}).length; // 2
has comment: http://stackoverflow.com/comment/46733439
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29265470
type: Answer
answers question: http://stackoverflow.com/q/29265470
has comment: http://stackoverflow.com/comment/46757584
downvote count: 0

http://stackoverflow.com/q/29297677
score: 0
answer count: 1
tagged with: jquery
has title: Execute JavaScript code to get the log from console using selenium webdriver or WatiN
has answer: http://stackoverflow.com/a/29306195
tagged with: watin
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/1979610
tagged with: selenium-webdriver
has body: (Sorry for being a bit descriptive) I wanted to wait for a page to load completely but after searching on Google it seems that browsers react differently, when we try to use readyState or onLoad. Also, for application I am working on, it seems that a particular log message ("TNP is ready") appears in console (chrome console or IE developer tool console), when the required page is loaded. My plan is to execute a small JavaScript code on the browser, using Selenium WebDriver C# and WatiN C# (IE), to get this message from the console log. Can this be done? Can I get the Last Log generated by console.log ? Because when I execute the script it might happen that the message is already gone or yet to come. I need to fire it repeatedly. Any suggestions?
type: Question
tagged with: javascript

http://stackoverflow.com/comment/46908530
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29362406
has text: `.html()` is all you need...
score: 4

http://stackoverflow.com/q/29264748
tagged with: javascript
has body: //Created based off other variables array = ["apple", "john", "monkey"]; for (var i = 0; i &lt; array.length; i++) { var li=document.createElement('li'); ul.appendChild(li); li.innerHTML += '&lt;li&gt;' + array[i]; li.innerHTML += '&lt;a href="#" class="clear"&gt;'+remove+'&lt;/a&gt;&lt;/li&gt;'; } $('a.clear').click(function() { $(this).parent().remove(); return false; }); You can see from above (not complete code, but basic idea), that each created li has a "remove" button associated to it. Clicking on the "remove" will remove the li, but I cannot figure out how exactly to remove it from the array... I attempted to add a value to the associated li like so: li.innerHTML += '&lt;a href="#" value="'+array[i]+'" class="clear"&gt;'+remove+'&lt;/a&gt;&lt;/li&gt;; I was thinking maybe I can use the value when clicked on "remove" as function will match against the array using indexOf and remove it, but I couldn't figure out how exactly to pull any values from the click function. Any suggestion would be helpful.
tagged with: html-lists
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/29265108
has answer: http://stackoverflow.com/a/29265135
has title: Remove li and from array
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29265108
type: Question
accepted answer: http://stackoverflow.com/a/29265135
tagged with: arrays

http://stackoverflow.com/comment/46716838
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/29257083
has text: `else (` should be `else {` for a start which means that you're missing the final close curly bracket on your function. If you formatted your code a little better you might have spotted that.
type: Comment

http://stackoverflow.com/comment/46778422
score: 0
type: Comment
type: QuestionComment
has text: Do you have any code to share? And what have you tried so far?
comment on: http://stackoverflow.com/q/29290677

http://stackoverflow.com/q/29256259
tagged with: c#
answer count: 2
tagged with: asp.net-mvc
tagged with: javascript
tagged with: jquery
tagged with: ajax
score: 0
has comment: http://stackoverflow.com/comment/46715324
has title: Ajax Call not returning Partial View
has comment: http://stackoverflow.com/comment/46715287
has comment: http://stackoverflow.com/comment/46715503
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29256357
has comment: http://stackoverflow.com/comment/48622431
has answer: http://stackoverflow.com/a/30261142
type: Question
has body: I am making an AJAX call, and then returning PartialView from Controller to populate it in a div. The following is my code :- var file = document.getElementById("file").files[0]; jq.ajax({ type: "POST", url: '/Main/getData', data: formData, dataType: 'json', contentType: false, processData: false, success: function (response) { jq('#partialPlaceHolder').html(response); }, error: function (error) { alert("Some Error Occured"); } }); [HttpPost] public ActionResult getData(FormCollection form) { ...... return PartialView("_pageMain", retMod); } As I debug the Code in Controller, there is no Error till the end, But still the AJAX throws the alert("Some Error Occured"). The PartialView is not populated in div. How to solve this?

http://stackoverflow.com/a/29290008
score: 7
answers question: http://stackoverflow.com/q/29275409
upvote count: 7
has body: Yes, as you said you can use Message Passing to get it done. By content scripts to detect the switch on particular pages, then chat with the background page in order to capture screenshot for that page. Your content script should send a message using chrome.runtime.sendMessage, and the background page should listen using chrome.runtime.onMessage.addListener: Sample codes I created and tested it works with me: Content script(myscript.js): chrome.runtime.sendMessage({greeting: "hello"}, function(response) { }); Background.js: var screenshot = { content : document.createElement("canvas"), data : '', init : function() { this.initEvents(); }, saveScreenshot : function() { var image = new Image(); image.onload = function() { var canvas = screenshot.content; canvas.width = image.width; canvas.height = image.height; var context = canvas.getContext("2d"); context.drawImage(image, 0, 0); // save the image var link = document.createElement('a'); link.download = "download.png"; link.href = screenshot.content.toDataURL(); link.click(); screenshot.data = ''; }; image.src = screenshot.data; }, initEvents : function() { chrome.runtime.onMessage.addListener( function(request, sender, sendResponse) { if (request.greeting == "hello") { chrome.tabs.captureVisibleTab(null, {format : "png"}, function(data) { screenshot.data = data; screenshot.saveScreenshot(); }); } }); } }; screenshot.init(); Also keep in mind to register your content script's code and permissions in manifest file: "permissions": ["&lt;all_urls&gt;","tabs"], "content_scripts": [ { "matches": ["http://www.particularpageone.com/*", "http://www.particularpagetwo.com/*"], "js": ["myscript.js"] } ] It captures the screenshot and download the image automatically as .png whenever a particular page is loaded. Cheers!
has comment: http://stackoverflow.com/comment/93436857
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29275409
type: Answer

http://stackoverflow.com/q/29258452
tagged with: ssrs-2012
has body: I have an SSRS report embedded within a silverlight application and I want the links in that report to open in a new tab. I already tried the below and they both didn't work : making the link javascript:void(window.open('http://wwww.google.com')) (It just doesn't execute javascript from within silverlight but when I preview the report in Visual Studio it works) adding target='_blank' in the href tag Adding this parameter at the end &amp;rc:LinkTarget=_blank (It opens in the same window) Any help is appreciated
has comment: http://stackoverflow.com/comment/46720546
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46721168
tagged with: silverlight
tagged with: ssrs-2008
has title: Forcing links in an SSRS report to open in a new window from within silverlight
type: Question
has comment: http://stackoverflow.com/comment/46720305
linked to: http://stackoverflow.com/q/2743361
has comment: http://stackoverflow.com/comment/46720185
tagged with: reporting-services
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/29258981

http://stackoverflow.com/a/29372122
answers question: http://stackoverflow.com/q/29371644
has body: The returned data from each AJAX call are not available outside its own callback function. I'm sure there are more elegant (complex?) solutions, but a couple of simple, Occamic, solutions include global variables, or storing the received data in hidden input elements. Within each callback function, just loop until the data from the other call is present: function getJson1(){ $.getJSON('url1',function(data){ var d2 = ''; $('#hidden1').val(data); while ( d2 == '' ){ //you should use a time delay here d2 = $('#hidden2').val(); } getJson2(); }); } function getJson2(){ $.getJSON('url2',function(d2){ var d1 = ''; $('#hidden2').val(d2); while ( d1 == '' ){ //you should use a time delay here d1 = $('#hidden1').val(); } //Do stuff with json1 and json2 data }); } getJson1();
score: 0
type: Answer

http://stackoverflow.com/comment/51896054
type: AnswerComment
has text: Is there a way to enable these flags from my Javascript code? Just for my page?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/31872585

http://stackoverflow.com/a/29306746
downvote count: 0
has body: Where is your JS files included, in the top or bottom part? Looks like your script has a 'ready' portion which executes as soon as the DOM is ready. Since your script is going to change the page view (for the JS Tree), you want the JS loaded as early as possible so your page does not spend a long time redrawing itself in front of your users. Try including your JS Tree related Javascript in HTML head section.
answers question: http://stackoverflow.com/q/29306587
upvote count: 2
has comment: http://stackoverflow.com/comment/46807977
type: Answer
score: 2

http://stackoverflow.com/a/29233088
has comment: http://stackoverflow.com/comment/46672303
has comment: http://stackoverflow.com/comment/46672216
has comment: http://stackoverflow.com/comment/46672193
has comment: http://stackoverflow.com/comment/46672517
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46672276
has comment: http://stackoverflow.com/comment/46672547
type: Answer
has comment: http://stackoverflow.com/comment/46672209
accepted answer of: http://stackoverflow.com/q/29233004
has comment: http://stackoverflow.com/comment/46672398
answers question: http://stackoverflow.com/q/29233004
has body: Try this...Once you build your res1 variable, just assign it to the a href attribute with js Edited put html before script declaration. something link text
has comment: http://stackoverflow.com/comment/46672446

http://stackoverflow.com/q/29320933
tagged with: ecmascript-5
tagged with: javascript
has title: print properties and values of an object at the same time-Javascript
answer count: 1
favorite count: 0
downvote count: 1
has body: Assuming we have the following Javascript Object var t={name:"John",age:34,zip:"82900"} If I use the following code to print all properties of that object: for(var x in t){ console.log(t[x]); } I will get John, 34, 82900.Now my question is how to to print each propertie's name for example to print age,34 name,John that object might have more properties than i wrote above since the user can add its own properties inside that object
has answer: http://stackoverflow.com/a/29320984
tagged with: object
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/1625208
score: -1
accepted answer: http://stackoverflow.com/a/29320984
has comment: http://stackoverflow.com/comment/46833285
type: Question
upvote count: 0

http://stackoverflow.com/comment/46730631
score: 1
has text: If you just want to avoid writing the call to the plugin manually, you could override jquery html and do something like this: http://jsfiddle.net/rf8jwywk/ (only calls plugin for new elements)
comment on: http://stackoverflow.com/q/29264037
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/46866468
score: 0
type: Comment
type: QuestionComment
has text: yes so where's the question ?
comment on: http://stackoverflow.com/q/29339480

http://stackoverflow.com/comment/46770215
score: 0
type: AnswerComment
has text: But well, never mind, I guess we're quickly sinking to a very specific cases and every rule has its excetion. My rule is `if-your-variables-have-to-look-like-this` it's definitely something wrong with the approach itself. But if you made it that way probably you had enough reasons.
type: Comment
comment on: http://stackoverflow.com/a/29268577

http://stackoverflow.com/comment/91580211
type: Comment
has text: I see this is the React.createElement
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/29288658

http://stackoverflow.com/comment/59296925
score: 2
has text: Workspaces are definitely the best way to go. Once you have them set up with your local project files, you can do 100% of your work right in devtools if you wanted. I've made whole websites this way without ever needing to leave Chrome. It was great and painless, time-saving, and just cool that it's even possible now.
comment on: http://stackoverflow.com/a/29250644
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/46804872
comment on: http://stackoverflow.com/a/29305055
type: AnswerComment
has text: http://stackoverflow.com/questions/3966678/jquery-one-handler-for-multiple-elements-using-variables
score: 0
type: Comment

http://stackoverflow.com/comment/46810991
score: 0
has text: @BaconJuice Check the updated answer ... I added a working fiddle
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29308422

http://stackoverflow.com/comment/47045880
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/29426911
has text: you can count the number of items by keeping an index while looping over the cursor, but if you only need to know the number of items it's better to use the count method
type: Comment

http://stackoverflow.com/comment/46679894
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/29236689
has text: @SelectDistinct Are you referencing jquery.unobtrusive-ajax.js in your partial?
score: 0

http://stackoverflow.com/q/29332964
tagged with: javascript
linked to: http://stackoverflow.com/q/1703047
score: -1
has answer: http://stackoverflow.com/a/29333015
has comment: http://stackoverflow.com/comment/46855052
has comment: http://stackoverflow.com/comment/46855046
answer count: 2
has comment: http://stackoverflow.com/comment/46855007
has comment: http://stackoverflow.com/comment/46854922
favorite count: 0
has comment: http://stackoverflow.com/comment/46855039
upvote count: 2
has answer: http://stackoverflow.com/a/29333081
type: UnansweredQuestion
has title: Execute var Link = "somelink.com" in JavaScript
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/902713
has comment: http://stackoverflow.com/comment/46854908
has comment: http://stackoverflow.com/comment/46854998
downvote count: 3
type: Question
has body: How can I execute the link I have stored in var Link ? I have tried the eval() but that doesn't seem to do much. I have stored the link as a string just like shown. var link = "someURLlink.com"; This is placed inside a function so when I call the function, I want this link to be executed and then I am going to parse the result. Edited: This will make a call to an API for authorization with the client_id hard coded into the URL. After I receive the secret code from the landing page, I am going to redirect back to my original HTML document.
has comment: http://stackoverflow.com/comment/46855092

http://stackoverflow.com/a/29222368
type: AcceptedAnswer
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/29222297
accepted answer of: http://stackoverflow.com/q/29222297
upvote count: 1
has body: You want to first check that you have at least 30 words then, subtract 30 form the word count to get additiona fees. if (count.words &gt; 30) { additionalFees = perWord * (count.words - 30); }
score: 1

http://stackoverflow.com/q/29249106
has answer: http://stackoverflow.com/a/29249296
has comment: http://stackoverflow.com/comment/46703596
has comment: http://stackoverflow.com/comment/46702764
answer count: 3
has answer: http://stackoverflow.com/a/29249403
linked to: http://stackoverflow.com/q/307674
tagged with: arrays
downvote count: 0
has answer: http://stackoverflow.com/a/29249340
has comment: http://stackoverflow.com/comment/46702615
has comment: http://stackoverflow.com/comment/46703333
favorite count: 0
has title: Remove duplicate array value from array in javascript
tagged with: php
has comment: http://stackoverflow.com/comment/46702793
has comment: http://stackoverflow.com/comment/46702632
linked to: http://stackoverflow.com/q/307650
type: UnansweredQuestion
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/46703563
type: Question
duplicate of: http://stackoverflow.com/q/307650
tagged with: javascript
has body: I want to remove duplicate entry from my array and my array is ArrayTotal All Banks,Total All Banks,Total Domestic Banks,Total Domestic Banks,B2B Bank,B2B Bank,Bank of Montreal,Bank of Montreal,The Bank of Nova Scotia,The Bank of Nova Scotia, we want to remove duplicate entry for this I am trying in php unique_array and I also tried in javascript var uniqueNames = []; $.each(names, function(i, el){ if($.inArray(el, uniqueNames) === -1) uniqueNames.push(el); }); console.log(uniqueNames) its gave error Unexpected token A
has comment: http://stackoverflow.com/comment/46703625
has comment: http://stackoverflow.com/comment/46702714

http://stackoverflow.com/comment/46888874
type: AnswerComment
comment on: http://stackoverflow.com/a/29351707
type: Comment
has text: Updated in answer :) In short, it's similar to `if` condition. if the condition `(loopStart != loopMax)` is true then evaluate `+` else print `""` empty string
score: 0

http://stackoverflow.com/comment/46901472
type: QuestionComment
comment on: http://stackoverflow.com/q/29337456
score: 0
has text: Yes thanks. The problem disappeared later on, without changing the metohd. My impression of having this method execute whatever the class was probably a side effect of some sort, due to an external cause.
type: Comment

http://stackoverflow.com/comment/46714694
type: AnswerComment
has text: that fails, it would appear I simply cannot connect to the MySQL DB. The error lies here. how does my web page know to connect to the localhost of my local computer, when I say $server="localhost"; ?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29254454

oauth-2.0
tag name: oauth-2.0
tags question: http://stackoverflow.com/q/29291691
tags question: http://stackoverflow.com/q/29285286
type: Tag
tags question: http://stackoverflow.com/q/29305049

http://stackoverflow.com/q/29283506
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29283787
tagged with: php
has body: I've got one big problem on only 1 page of a web site: Javascript doesn't want to be executed. I tried to copy and paste from another web site i've done where it works perfectly... but not here. Maybe you can help me to figure out why it doesn't work... I tried many ways, no ajax seems to work here. Here is one of them, when i try to send a mail, i got no alert but {"reponse":"Mail sent corretly!"} instead, and the mail is corretly sent. The submit button works! The page is refreshing, so i think the js is not executed. (i'd like to have the information without refreshing the page, like a normal ajax request). I've tried to put the script (and the link to librairies) in the head, nothing changed. Here is my code: <--! Some HTML --> Captcha Submit <--! Some HTML --> $(document).ready(function() { // On submit $('.myForm').on('submit', function(e) { e.preventDefault(); // Prevent default submit var $this = $(this); // Getting values var name = $('#nom').val(); var fname = $('#prenom').val(); var objet = $('#objet').val(); var mail = $('#email').val(); var msg = $('#msg').val(); // Looking for errors if(name === '' || fname === '' || objet === '' || mail === '' || msg === '') { alert('Les champs doivent êtres remplis'); } else { // Sending Ajax query $.ajax({ url: $this.attr('action'), // form's action type: $this.attr('method'), // form's method data: $this.serialize(), // Serializing data success: function(html) { // php's file response alert(html); // Print the result } }); } }); }); And my php file: session_start(); if(isset($_GET['err'])) { $reponse = 'Mail not sent corretly!'; echo json_encode(['reponse' => $reponse]); echo 'An error occurred, please try again '; //Same form } if(isset($_POST["captcha"]) && $_POST["captcha"]!="" && $_SESSION["captcha"]==$_POST["captcha"]) { if(isset($_POST["nom"])) { if(preg_match("/^[a-zA-Z][a-zA-Z]*[a-zA-Z]$/",$_POST['nom'])) { if(isset($_POST["prenom"])) { if (preg_match("/^[a-zA-Z][a-zA-Z]*[a-zA-Z]$/",$_POST['prenom'])) { if(…
tagged with: forms
has title: Form with ajax: JS not executing
type: Question
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: ajax
score: 0

http://stackoverflow.com/a/29303844
has comment: http://stackoverflow.com/comment/46805164
type: Answer
answers question: http://stackoverflow.com/q/29303746
has body: You can use a regex like this: \s(:\)) And grab the content from the capturing group Working demo MATCH 1 1. `:)` You can see the content group like: var myString = "O:) :) 3:)"; var myRegexp = /\s(:\))/g; var match = myRegexp.exec(myString); alert(match[1]); // ":)"
has comment: http://stackoverflow.com/comment/46807752
has comment: http://stackoverflow.com/comment/46837366
has comment: http://stackoverflow.com/comment/46805277
has comment: http://stackoverflow.com/comment/46806023
score: 0
has comment: http://stackoverflow.com/comment/46825864

http://stackoverflow.com/comment/46776705
type: AnswerComment
has text: Hi @floor, I'm trying the code you gave to put after the sql query but for some strange reason the AJAX is always alerting with the second (failed) option, even when the record is added successfully. I'm using your SQL on the database side, and this is what I have in the AJAX file:
type: Comment
comment on: http://stackoverflow.com/a/29264292
score: 0

wcf
type: Tag
tag name: wcf
tags question: http://stackoverflow.com/q/29236137
tags question: http://stackoverflow.com/q/29260966

http://stackoverflow.com/comment/46662831
score: 0
type: Comment
has text: In to any text field on the page
type: QuestionComment
comment on: http://stackoverflow.com/q/29227926

http://stackoverflow.com/a/29292862
type: Answer
downvote count: 1
upvote count: 0
score: -1
has body: events: { 'click #triggerPopup': 'openPopUp' }, openPopUp: function(e) { e.preventDefault() $('#modalSuccessTrigger').popup('open') } Calling the popup programmatically works.
answers question: http://stackoverflow.com/q/29287256

http://stackoverflow.com/a/29290689
score: 2
has body: Can you post the CREATE TABLE statement for the user_saved_data table? In general, I'd recommend just tracing it through and see where the data gets lost. For example, can you echo the query you are generating and run in manually in MySQL? You may have a syntax error in the SQL being generated...
upvote count: 3
downvote count: 1
has comment: http://stackoverflow.com/comment/46778378
answers question: http://stackoverflow.com/q/29290646
type: Answer

http://stackoverflow.com/comment/46817500
type: Comment
type: QuestionComment
has text: Rather than using getelementById, look into jQuery, which will give better cross-browser compatibililty. To get the idea of using jQuery to get a value, look at .[val()](https://api.jquery.com/val/) ,which includes example code. You can also easily handle the events with jQuery.
score: 0
comment on: http://stackoverflow.com/q/29311918

http://stackoverflow.com/comment/46807987
has text: @vihan1086 it probably is faster, but it's not supported in IE < 9. So if you want to have broad browser support you'll have to use a polyfill or something and at some point the trade off isn't worth the extra millisecond.
comment on: http://stackoverflow.com/a/29293511
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/46859121
comment on: http://stackoverflow.com/q/29334507
has text: Your controller module depends on the `todoFactory` from the service module, so it should declare it as a dependency: `angular.module("controller", ["service"])`.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29332123
has body: I figured out what I think I should do in the end, or at least what solves my problem. Code: var Panel = require('../components/panel.react.jsx'); var Dataset = require('../components/dataset.probability.react.jsx'); // Main Column HTML var html = React.renderToStaticMarkup(React.DOM.div(null, Panel( {title:"Title of panel"}, Graph({data: data}) ), Panel( {title:"Title of panel"} Graph({data: data}) ), Panel( {title:"Title of panel"} Graph({data: data}) ) )); // var html now contains the markup, send it to your template.
score: 0
accepted answer of: http://stackoverflow.com/q/29317083
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/29317083
type: Answer

http://stackoverflow.com/q/29335741
answer count: 1
tagged with: javascript
has body: I have a form where the user enters up to 5 subjects and 5 dates which is coded as follows: Input subjects Subject title Subject date The JavaScript validation is this: It's only a simple form - I have tried entering invalid data and it isn't working. How can I get it to work?
score: 0
tagged with: validation
tagged with: http://stackoverflow.com/tag/html
type: UnansweredQuestion
type: Question
has answer: http://stackoverflow.com/a/29335841
has title: JavaScript form validation not working on submit

http://stackoverflow.com/a/29219368
type: Answer
has body: jsFiddle Demo Check the event target for the mouse event. If the target is a span, then return out of the handler $("div").on('click', "p", function(e){ if($(e.target).is("span"))return; alert("p was clicked"); });
score: 2
answers question: http://stackoverflow.com/q/29219272
accepted answer of: http://stackoverflow.com/q/29219272
upvote count: 3
type: AcceptedAnswer
downvote count: 1

http://stackoverflow.com/q/29256797
has comment: http://stackoverflow.com/comment/46716858
tagged with: regex
type: AnsweredQuestion
score: 1
upvote count: 1
accepted answer: http://stackoverflow.com/a/29256853
has answer: http://stackoverflow.com/a/29257136
type: Question
has comment: http://stackoverflow.com/comment/46716846
has answer: http://stackoverflow.com/a/29256819
tagged with: javascript
has body: Here's my current regular expression: ([\d\*]{1,3}[A-Z\*]{0,3}) My problem is with the first portion [\d\*]{1,3} I need this to match at most 3 numbers and at least one number and I need to accept the wild card input too - BUT the wild card character (*) cannot be on its owns which is what this would currently allow is some situations. So I need the first portion to match: 123 12* *23 1* *2 1*3 But not just: *
has comment: http://stackoverflow.com/comment/46716886
has comment: http://stackoverflow.com/comment/46716305
answer count: 3
has title: Regular Expression that contains 1 to 3 members of a set but one of those members cannot be by itself
possible better answer: http://stackoverflow.com/a/29256819
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/29256853
has comment: http://stackoverflow.com/comment/46716352
has comment: http://stackoverflow.com/comment/46716303

http://stackoverflow.com/a/29329423
answers question: http://stackoverflow.com/q/29329336
has comment: http://stackoverflow.com/comment/109305224
has body: The problem is intersting. You are using custom styles for radio buttons, and how it works, is that CSS rules hide native input and display styled CSS radio instead. As the result, radio inputs are hidden, but jQuery validation plugin ignores hidden form elements by default. To fix it you need to instruct plugin that you want hidden fields to be validated too. Use ignore option for this: $('#my-form').validate({ // specify rules ignore: [], rules: { myText: { required: true }, myRadio: { required: true } }, // change name of error class that is assigned to input fields errorClass: 'error_validate', errorPlacement: function (label, element) { // default if (element.is(':radio')) { label.insertAfter(element.next('label')); } else { label.insertAfter(element); } } }); Also note, that you need to fix errorPlacement function in this case too. You can't append error element immediately after input, because (once again due to custom radio styles) then radio check/uncheck won't work (it uses adjacent sibling selector +). Demo: https://jsfiddle.net/d0nf4pqf/1/
upvote count: 10
downvote count: 0
type: Answer
score: 10

http://stackoverflow.com/a/29266815
score: 0
type: Answer
answers question: http://stackoverflow.com/q/29265627
has body: The problem is the parameter you pass in the invokation of convertOptionToNumber() inside of convertOptionToNumber(), I changed your code a little bit and it is working fine: function checkCorrectAnswer(e) { var targ; if (!e) var e = window.event; if (e.target) targ = e.target; else if (e.srcElement) targ = e.srcElement; if (targ.nodeType == 3) // defeat Safari bug targ = targ.parentNode; var userChoice = convertOptionToNumber(targ.parentNode.parentNode.id); var correct = allQuestions[currentQuestion].correctAnswer; parseInt(correct); if (userChoice === correct) { alert('Correct!'); } else { alert('Incorrect!'); } console.log('The correct answer for question one ' + correct); }

http://stackoverflow.com/q/29250995
favorite count: 0
has answer: http://stackoverflow.com/a/29251057
upvote count: 1
answer count: 1
has body: I'm developing a mobile app using Sencha Touch. The problem is my button not switch to new view after I tap it. My code: view/LoginUsername.js Ext.define('RibMobile.view.LoginUsername', { extend: 'Ext.form.Panel', xtype: 'loginusernamepage', requires: ['Ext.form.FieldSet', 'Ext.form.Password', 'Ext.Label', 'Ext.Img' ], config: { title: 'Login', items: [{ /* ? */ }, { xtype: 'button', itemId: 'nextButton', ui: 'action', padding: '10px', text: 'Next' }, { /* ? */ }] } }); controller/Login.js Ext.define('RibMobile.controller.Login', { extend: 'Ext.app.Controller', config: { refs: {}, control: { nextButton: { // On the tap event, call onNewTap tap: 'onPasswordTap' } } }, //called when the Application is launched, remove if not needed launch: function(app) {}, onPasswordTap: function() { // When the user taps on the button, create a new reference of our New view, and set it as the active // item of Ext.Viewport Ext.Viewport.setActiveItem(Ext.create('RibMobile.view.LoginPassword')); } }); app.js Ext.application({ name: 'RibMobile', requires: [ 'Ext.MessageBox' ], controllers: [ 'Main', 'Login' ], views: [ 'Contact', 'Locate', 'LoginUsername', 'LoginPassword', 'Main', 'Promotion' ], /* ? */ How can I trigger the button?
has title: Can't tap button in Sencha
accepted answer: http://stackoverflow.com/a/29251057
type: AnsweredQuestion
downvote count: 0
tagged with: javascript
score: 1
tagged with: sencha-touch-2
type: Question

http://stackoverflow.com/comment/46886958
type: QuestionComment
comment on: http://stackoverflow.com/q/29350708
has text: so remove the first part of the reg exp or Remove the part you do not want in code. Just chop off the part you do not want and reset the value of the textbox.
score: 0
type: Comment

http://stackoverflow.com/comment/46666533
has text: Thanks Thaum. I had left out the part if my code showing that the company of interest is already in context, so that part is addressed. As for the schema, is each value unique? I had originally written my schema using ebitdaLtm, ebitdaFy1 and ebitdaFy2. But I thought that breaking out the period into a level above the value would allow for better screening (e.g., find all LTM values). Them the spacebars reference would show the EBITDA associated with a period of "LTM". Is that use incorrect or have I coded it incorrectly?
type: AnswerComment
comment on: http://stackoverflow.com/a/29226164
score: 0
type: Comment

http://stackoverflow.com/q/29354379
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/29354505
downvote count: 0
tagged with: javascript
tagged with: drop-down-menu
tagged with: jquery
has title: jQuery how to set / unset background color of dropdown menu
tagged with: colors
favorite count: 0
accepted answer: http://stackoverflow.com/a/29354505
upvote count: 2
linked to: http://stackoverflow.com/q/12836227
possible better answer: http://stackoverflow.com/a/29354605
has answer: http://stackoverflow.com/a/29354605
score: 2
type: AnsweredQuestion
has body: The script requires jQuery All works fine but I need to be able to change the color of the selected dropdown when it is selected by the option box, to (bright green). And greyed out again if the other option is chosen. I have tried all the suggested tips I read up on i.e. $( "#mOptions" ).prop (.css('background-color','#ffffff')); any color. please help and many thanks. Did not work The script $(document).ready(function(){ $('input[name="gender"]').click(function() { if($('input[name="gender"]').is(':checked')) { var radioValue = $("input[name='gender']:checked").val(); if(radioValue == "m"){ $( "#mOptions" ).prop( "disabled", false ); $( "#fOptions" ).prop( "disabled", true ); } else { $( "#mOptions" ).prop( "disabled", true ); $( "#fOptions" ).prop( "disabled", false ); } } }); }); The Form: Male Female Select Shirt Pant dhoti Select Saree Bangle handbag

http://stackoverflow.com/comment/54128212
has text: Can you reproduce this in a JsFiddle? From what I see, there is nothing that should cause the event to fire twice. I'm using version 2015.2.902 of Kendo UI MVVM framework and I'm not seeing this issue.
score: 0
comment on: http://stackoverflow.com/q/29287589
type: Comment
type: QuestionComment

backbone.js
tags question: http://stackoverflow.com/q/29357464
tags question: http://stackoverflow.com/q/29296452
tags question: http://stackoverflow.com/q/29363828
tags question: http://stackoverflow.com/q/29368013
tags question: http://stackoverflow.com/q/29254570
tags question: http://stackoverflow.com/q/29327884
tags question: http://stackoverflow.com/q/29272626
tags question: http://stackoverflow.com/q/29294681
tags question: http://stackoverflow.com/q/29274742
tags question: http://stackoverflow.com/q/29349221
tags question: http://stackoverflow.com/q/29339442
tags question: http://stackoverflow.com/q/29361489
tags question: http://stackoverflow.com/q/29334194
tags question: http://stackoverflow.com/q/29233466
tags question: http://stackoverflow.com/q/29240801
tags question: http://stackoverflow.com/q/29368313
tags question: http://stackoverflow.com/q/29272901
tags question: http://stackoverflow.com/q/29234200
tags question: http://stackoverflow.com/q/29314344
tags question: http://stackoverflow.com/q/29353936
tags question: http://stackoverflow.com/q/29359353
tags question: http://stackoverflow.com/q/29314643
tags question: http://stackoverflow.com/q/29268599
tags question: http://stackoverflow.com/q/29242820
tags question: http://stackoverflow.com/q/29295991
tags question: http://stackoverflow.com/q/29295730
tags question: http://stackoverflow.com/q/29271159
tags question: http://stackoverflow.com/q/29369101
tags question: http://stackoverflow.com/q/29287256
tags question: http://stackoverflow.com/q/29236053
tags question: http://stackoverflow.com/q/29351597
tags question: http://stackoverflow.com/q/29314818
type: Tag
tags question: http://stackoverflow.com/q/29356941
tags question: http://stackoverflow.com/q/29238464
tags question: http://stackoverflow.com/q/29369746
tags question: http://stackoverflow.com/q/29324888
tags question: http://stackoverflow.com/q/29292113
tag name: backbone.js

http://stackoverflow.com/q/29308588
favorite count: 0
has comment: http://stackoverflow.com/comment/46811040
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46817127
score: -5
type: Question
has answer: http://stackoverflow.com/a/29308701
downvote count: 5
tagged with: javascript
has comment: http://stackoverflow.com/comment/46811075
answer count: 2
has body: Is there a way to reveald a secon input in a form after the first input has been filled? For example if I have a text input asking how many kids are going on the trip, person responds and a second input appears asking age range...
has answer: http://stackoverflow.com/a/29308705
upvote count: 0
tagged with: jquery
has title: input reveal after first one filled

http://stackoverflow.com/q/29323223
has comment: http://stackoverflow.com/comment/46837342
tagged with: javascript
tagged with: variables
has answer: http://stackoverflow.com/a/29323872
has comment: http://stackoverflow.com/comment/46837396
tagged with: scope
score: 0
answer count: 2
has body: I have had this issue before on another project. When I include my variables in a function with local scope, the function is able to run. When I put the variable outside of function with global scope, the function does not interpret the variables and does not run. I've tried passing the global variables into my functions and it does not run. This example is a snippet of a countdown timer I was working on: LOCAL SCOPE (FUNCTION RUNS) http://jsbin.com/leyicubegu/2/edit function addTime() { var userTime = timeInput.value; var timeString = userTime.toString(); var timeArray = timeString.split(""); var hundrethsValue = timeArray[6].concat(timeArray[7]); var secondsValue = timeArray[3].concat(timeArray[4]); var minutesValue = timeArray[0].concat(timeArray[1]); var hundreths = hundrethsValue; var seconds = secondsValue; var minutes = minutesValue; document.getElementById("time").innerHTML = minutes + ":" + seconds + ":" + hundreths; } GLOBAL SCOPE (FUNCTION DOES NOT RUN) http://jsbin.com/fuxexajozu/2/edit var userTime = timeInput.value; var timeString = userTime.toString(); var timeArray = timeString.split(""); var hundrethsValue = timeArray[6].concat( timeArray[7]); var secondsValue = timeArray[3].concat(timeArray[4]); var minutesValue = timeArray[0].concat(timeArray[1]); var hundreths = hundrethsValue; var seconds = secondsValue; var minutes = minutesValue; function addTime() { document.getElementById("time").innerHTML = minutes + ":" + seconds + ":" + hundreths; } PASSING VARIABLES TO FUNCTION (GLOBAL SCOPE) - (FUNCTION DOES NOT RUN) var userTime = timeInput.value; var timeString = userTime.toString(); var timeArray = timeString.split(""); var hundrethsValue = timeArray[6].concat( timeArray[7]); var secondsValue = timeArray[3].concat(timeArray[4]); var minutesValue = timeArray[0].concat(timeArray[1]); var hundreths = hundrethsValue; var seconds = secondsValue; var minutes = minutesValue; function addTime(minutes, seconds, hundreths) { document.getElementById("time").inn…
has answer: http://stackoverflow.com/a/29323314
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/3434278
has comment: http://stackoverflow.com/comment/46837424
has title: Variables Only Work Locally in a Function, Not globally - Javascript
type: Question

http://stackoverflow.com/a/29355676
type: Answer
has body: Remove the autoplay functionality, and add this to your script: var audio= document.getElementsByTagName('audio')[0]; audio.play(); alert('Now playing ...'); audio.pause(); Fiddle (Turn down your volume before opening the Fiddle!) Also note that you don't need to include language and type in the script tag: &lt;script language="JavaScript" type="text/javascript"&gt; Simply do this: &lt;script&gt;
has comment: http://stackoverflow.com/comment/46898369
score: 0
has comment: http://stackoverflow.com/comment/46898690
answers question: http://stackoverflow.com/q/29355612

http://stackoverflow.com/a/29273159
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29250233
type: Answer
answers question: http://stackoverflow.com/q/29250233
has body: My question have two aspect: first: Cross-browser onload event and the Back button , and answer: cross-browser second: I should use on instead of click: $(document).ready(function(){ $('#news-list').on('click','a',function(){ alert($(this).attr('href')); // Get the ref attribute from the "a" element }); $(window).bind("unload", function() {}); }); attention that : Method on was introduced in jQuery version 1.7.

http://stackoverflow.com/comment/46955127
score: 1
type: Comment
comment on: http://stackoverflow.com/q/29278261
has text: Perhaps this will help: https://github.com/mbostock/d3/wiki/Quantitative-Scales#linear_domain
type: QuestionComment

http://stackoverflow.com/comment/46795078
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/29299994
has text: isnt defined here ?
score: 0

http://stackoverflow.com/a/29279699
type: AcceptedAnswer
downvote count: 0
has body: I took a quick look at the plugin and it doesn't look to support passing your own format function. A quick hack to switch those labels could be (after drawing the pie chart): setTimeout(function() { d3.selectAll('.p0_segmentValue-inner') .each(function(d) { d3.select(this).text('$'+d.value.formatMoney(0)); }) }, 200); Example here. The formatMoney prototype stolen from here.
accepted answer of: http://stackoverflow.com/q/29277141
answers question: http://stackoverflow.com/q/29277141
type: Answer
upvote count: 1
score: 1

http://stackoverflow.com/q/29358815
tagged with: boolean
score: 35
has answer: http://stackoverflow.com/a/29358843
favorite count: 0
has title: Using "Boolean" as the argument to .filter() in JavaScript
downvote count: 1
possible better answer: http://stackoverflow.com/a/67831654
has body: Recently I've learned that you can use the Boolean keyword to check whether a boolean value is false, e.g. this, where the arrayOfSheeps is simply an array of boolean values. function countSheeps(arrayOfSheeps) { return arrayOfSheeps.filter(Boolean).length; } As I've been unable to find anything about using 'Boolean' as a keyword, I was wondering if there are any other uses for the word, or even just any resources I can use to learn about it.
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/67831654
has comment: http://stackoverflow.com/comment/46902176
accepted answer: http://stackoverflow.com/a/29358843
has comment: http://stackoverflow.com/comment/46902001
has comment: http://stackoverflow.com/comment/46902237
type: Question
answer count: 2
upvote count: 36
tagged with: javascript

http://stackoverflow.com/comment/46876091
type: Comment
type: AnswerComment
has text: Ok this has definatly fixed the date format issue although the $time variable doesn't seem to be recognized? Server Response: 2015-04-15 And im getting an error on the backend.php page: ( ! ) Notice: Undefined index: input in C:\wamp\www\gp\backend.php on line 3 and then the ouput: 1970-01-01
comment on: http://stackoverflow.com/a/29344842
score: 0

http://stackoverflow.com/comment/46698963
score: 0
type: AnswerComment
has text: I'm pretty sure you can do this, the same, I advise you to follow this pattern in order to set those "general and top level never changing variables you don't want to request later" at your top lever controller
comment on: http://stackoverflow.com/a/29246620
type: Comment

http://stackoverflow.com/a/29387803
type: Answer
answers question: http://stackoverflow.com/q/29250950
score: 3
has body: Not only is the syntax valid the result does not have to be undefined though in most, if not all sane cases it will. JS is one of the most pure object oriented languages. Most so called OO languages are class oriented, in the sense that you can't change the form (it's tied to the class) of the object once created, only the state of the object. In JS you can change the state as well as the form of the object and this you do more often than you think. This ability makes for some rather obscure code, if you misuse it. Numerals are immutable, so you can't change the object itself, not it's state nor it's form so you could do 0[0] = 1; which is an valid assignment expression that returns 1 but doesn't actually assign anything, The numeral 0 is immutable. Which in itself is somewhat odd. You can have a valid and correct (executable) assingment expression, that doesn't assign anything(*). However the type of the numeral is a mutable object so you can mutate the type, and the changes will cascade down the prototype chain. Number[0] = 1; //print 1 to the console console.log(0[0]); //will also print 1 to the console because all integers have the same type console.log(1[0]); of course it's a far cry from the sane use category but the language is specified to allow for this because in other scenarios, extending the objects capabilities actually makes a lot of sense. It's how jQuery plugins hook into the jQuery object to give an example. (*) It does actually assign the value 1 to the property of an object, however there's no way you can reference that (transcient) object and it will thus be collected at the nexx GC pass
upvote count: 3
downvote count: 0

http://stackoverflow.com/a/29276795
has comment: http://stackoverflow.com/comment/46753162
answers question: http://stackoverflow.com/q/29276502
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/46753264
score: 2
has body: Be careful with the usage of the this keyword. In your function this.getCourseSeriesProducts, the context has changed so this doesn't refer to the same context as when this.test was first defined. I suggest putting a few console.log(this) to understand.
upvote count: 2
accepted answer of: http://stackoverflow.com/q/29276502

http://stackoverflow.com/q/29324282
has comment: http://stackoverflow.com/comment/46839384
accepted answer: http://stackoverflow.com/a/29324311
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
linked to: http://stackoverflow.com/q/6383941
favorite count: 0
has comment: http://stackoverflow.com/comment/46839472
tagged with: http://stackoverflow.com/tag/html
duplicate of: http://stackoverflow.com/q/6383941
type: AnsweredQuestion
upvote count: 1
type: Question
score: 1
has body: I am trying to take a div (in this case "childDiv2") and its contents and move it before its parent. So essentially take this and make it this I know I probably need to use .parent() and .before() to get it to work, but I'm stuck on how the jquery would look. Any ideas?
has answer: http://stackoverflow.com/a/29324311
has title: Move a div before its parent

limit
tags question: http://stackoverflow.com/q/29344120
type: Tag
tag name: limit

http://stackoverflow.com/q/29364035
score: 1
favorite count: 0
tagged with: selenium-ide
has title: Comparing dates in Selenium IDE
has answer: http://stackoverflow.com/a/44615268
possible better answer: http://stackoverflow.com/a/29379027
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29379027
upvote count: 1
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/44615268
has body: The following is meant to compare a Date of Birth and confirm the individual is 10 years old or greater. It appears to work, however I want some advice to improve or ensure my logic is correct for my date comparison within Selenium IDE. Do I need to use Date.parse() to turn these to milliseconds as per this advice or will these proper date formats be sufficient to compare them accurately? storeEval new Date("${DateOfBirthYear}","${DateOfBirthMonth}"-1,"${DateOfBirthDay}"); DateOfBirthAsDate storeEval new Date(); today storeEval (Date.prototype.addMonth = function(month) { var dat = new Date(this.valueOf()); dat.setMonth(dat.getMonth() + month); return dat; }); var dat = storedVars['today'];dat.addMonth(-120) DateOfBirthEleven storeEval (storedVars['DateOfBirthEleven'] < storedVars['DateOfBirthAsDate'] ) ? true : false AgeOK Advice and suggestions welcome.

http://stackoverflow.com/a/29340854
has comment: http://stackoverflow.com/comment/46869285
answers question: http://stackoverflow.com/q/29340778
has comment: http://stackoverflow.com/comment/46869423
has comment: http://stackoverflow.com/comment/46869441
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/46869355
has comment: http://stackoverflow.com/comment/46869005
has body: You can do that in Javascript. Use the following code: if(window.getSelection){ selectedText = window.getSelection(); }else if(document.getSelection){ selectedText = document.getSelection(); }else if(document.selection){ selectedText = document.selection.createRange().text; } Selection | MDN EDIT: Try using the following JS code along with your HTML: function submitForm(){ var listTitle = document.getElementById("newListInput").value; var listNote = document.getElementById("newListNote").value; console.log(listNote); // not sure why you have the following 2 lines //if(newItem){ // don't push when generating from localStorage //allTitles.push(listTitle); var allLists = []; allLists.push({'title': listTitle, 'note': listNote}); localStorage.setItem('allLists',JSON.stringify(allLists)); localStorage.setItem('allTitles',allTitles); // } } //return listContainer; //};
type: Answer
has comment: http://stackoverflow.com/comment/46870502
score: 0
accepted answer of: http://stackoverflow.com/q/29340778

http://stackoverflow.com/a/29260834
has body: You must remove a return false, because it calls a preventDefault(), which blocks a download. It will be enough: $('.scroll-to-bottom-link').click(function(){ $('html, body').animate({scrollTop : $('body').height() }, 800); }); DEMO
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/46724196
downvote count: 0
answers question: http://stackoverflow.com/q/29260569
type: Answer

http://stackoverflow.com/q/29326596
tagged with: responsive-design
tagged with: internet-explorer-11
has title: IE11 ignores javascript matchMedia event listener
type: Question
answer count: 1
tagged with: javascript
tagged with: event-handling
score: 4
has comment: http://stackoverflow.com/comment/46844157
upvote count: 4
has comment: http://stackoverflow.com/comment/46843753
favorite count: 0
has answer: http://stackoverflow.com/a/29327081
accepted answer: http://stackoverflow.com/a/29327081
downvote count: 0
has body: I'm using the following Javascript code to capture changes in the width of the viewport, then add an event listener when the viewport crosses a minimum threshold. var y=window.matchMedia("(min-width: 500px)"); y.addListener(changeWidth); changeWidth(y); The code works for all browsers except IE11, which ignores it. The http://caniuse.com site says the window.matchMedia feature is supported by IE11. What gives?
has comment: http://stackoverflow.com/comment/46844136
type: AnsweredQuestion

http://stackoverflow.com/comment/46694728
has text: I guess not. When I click on the original button I am able to see the modal. The log message I just added is not printed to the log.
comment on: http://stackoverflow.com/q/29244383
type: QuestionComment
type: Comment
score: 1

http://stackoverflow.com/comment/46745962
has text: Yup, try submitting the form. and after submit, when you change the state option so state 2, the city select of state 2 will display blank.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29272815

http://stackoverflow.com/comment/46741036
has text: Thanks for the comment. My actual situation is lil bigger to explain. but in small, i have a 'renderHTML(vm)' function which takes 'vm' as parameter then it constructs HTML input (can be multiple depending on the props in vm) with those bindings init. So instead of looping each prop im looking for a custom binding (or something else) which will do same.
comment on: http://stackoverflow.com/q/29266768
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46875284
comment on: http://stackoverflow.com/a/29343844
has text: Its value is modified within another function btw.
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/46850181
type: Comment
type: QuestionComment
has text: "Console told me it is undefined". Is `undefined` the result of `console.log($scope.SelectedClass.group_id);`, i.e. the line you have in the success handler of the call to `/users`, or is it the result of `console.log($scope.SelectedClass);` ?
comment on: http://stackoverflow.com/q/29330279
score: 0

http://stackoverflow.com/comment/74525686
score: 2
has text: (And you can do `FindReact($0)` to get the element selected with *Right click > Inspect*)
comment on: http://stackoverflow.com/a/39165137
type: AnswerComment
type: Comment

http://stackoverflow.com/q/29267231
has title: Proof of concept model controller calling correct instance
has body: Here is the code in JSFiddle I have a simple proof of concept code were I have 2 controllers which are the same and a model and model listener. The controllers are kicked off individually by two different buttons: require(['jquery', 'Controller1', 'Controller2'], function ($, controller1, controller2) { $(document).ready(function (){ controller1.init(); controller2.init(); $('#controller1Click').on('click', function() { $('#results').val('Controller 1 Click'); controller1.start(); }); $('#controller2Click').on('click', function() { $('#results').val('Controller 2 Click'); controller2.start(); }); }); }); When the controllers start() method is called it calls the models retrieveData() method which then executes the notifyLoadBegin() method. The problem I have is if I click either buttons both controller1 and controller2 loadBegin() method gets called. In each controller I create a new instance of the model and the listener in each controller so I would assume that the controller would only kick off the instance of the model/listener in that controller. Here is the controller. Both controllers are exactly the same except the message that it shows of which controller it is in the loadBegin() method. define('Controller1', [ 'jquery', 'ConfigModel', 'ConfigModelListener' ], function ( $, ConfigModel, ConfigModelListener ) { var self = {}; var configModel = new ConfigModel(); var configModelListener = new ConfigModelListener(); self.init = function() { var modelListener1 = configModelListener.create({ loadBegin: function() { // Controller 1 code var buff = $('#results').val(); $('#results').val(buff + '\r\n' + 'Controller1 loadBegin'); console.log('Controller1 loadBegin'); // Controller 2 code (added here so I dont have to duplicate the code var buff = $('#results').val(); $('#results').val(buff + '\r\n' + 'Controller2 loadBegin'); console.log('Controller2 loadBegin'); } }); configModel.addListeners(modelListener1); } self.start = function() { configModel.retrieveData(); …
score: 0
answer count: 2
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29270439
tagged with: requirejs
has answer: http://stackoverflow.com/a/29270491
type: Question
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/29233254
type: UnansweredQuestion
has body: I am trying to create a button to show the items in cart. so far I created the cart but now I want to create a button showYourCart which will open a box after it with the cart details. I don't want the button to open a new page, I have tried alert box but its not what I want to use. I just want to know what to use to create the box appear on Click.
type: Question
tagged with: javascript
score: 0
has title: HTML button to show cart details in a new box after button
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/46672542
has answer: http://stackoverflow.com/a/29233599

http://stackoverflow.com/q/29236465
has answer: http://stackoverflow.com/a/29241015
tagged with: http://stackoverflow.com/tag/json
has body: I am trying to gain a fundamental understanding of how MongoDB works, and was unable to find this question addressed. I presume this is not possible, but maybe I am wrong? Given the following JSON structure: { "bob": { "height": 68, "gender": "m" }, "sally": { "height": 48, "gender": "f" } } When this structure is deserialized into JavaScript, I am easily able to iterate the properties of this object to get a list of people. Note, that this list of people can/will be dynamic. Thus, sometimes "bob" won't exist, and sometimes "mike" might exist, etc. However, with MongoDB queries, this does not seem to be possible. MongoDB appears to require data like this be in an array. Then I could query down to the "people" array, and then iterate over that. I would like to confirm that, indeed, the MongoDB engine cannot iterate properties like JS can. If this is true, I guess this makes sense. Since the JSON structure represents both the data and the schema all in one, having dynamic properties like this might make the document difficult, if not impossible, to index. So maybe this is the reason? I am hoping someone can confirm. I was hoping I could use MongoDB to store the same JSON structure returned my UI, but I am thinking that the structure will need to be modified to something like the following for data storage. { "people": [{ "name": "bob", "height": 68, "gender": "m" }, { "name": "sally", "height": 48, "gender": "f" }] }
upvote count: 4
tagged with: mongodb
answer count: 1
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/46685175
accepted answer: http://stackoverflow.com/a/29241015
favorite count: 0
has title: MongoDB Property Iteration
has comment: http://stackoverflow.com/comment/46720671
score: 4
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/2298870
type: Question

http://stackoverflow.com/comment/46725122
type: QuestionComment
comment on: http://stackoverflow.com/q/29261449
score: 0
has text: Since both lists seems to be sorted and in the same order, use a https://en.wikipedia.org/wiki/Merge_algorithm
type: Comment

http://stackoverflow.com/comment/46890546
has text: You seem to have understood my post the best. I wanted to know the exact steps. Your answer really helped me figure these out.
comment on: http://stackoverflow.com/a/29351888
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/41681273
type: Answer
has body: Add in your select this: search_contains="true" Example: &lt;select chosen class="form-control" search_contains="true" no-results-text="'Nenhum resultado encontrado para'" &lt;option value=""&gt;&lt;/option&gt; &lt;/select&gt;
score: 0
answers question: http://stackoverflow.com/q/29248666

http://stackoverflow.com/q/29334826
upvote count: 1
has title: setting the color of a stacked bar (google charts)
type: Question
tagged with: charts
tagged with: google-visualization
score: 1
has answer: http://stackoverflow.com/a/29881832
downvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
type: UnansweredQuestion
has body: Using google charts I'm trying to customise the color of certain sections on this stacked bar $(function() { google.load('visualization', '1', { 'callback': drawChart, 'packages': ['corechart'] }); function drawChart() { var data = google.visualization.arrayToDataTable([ ['Grade', 'NG (% of total Results)', 'F (% of total Results)', 'E (% of total Results)', 'D3 (% of total Results)', 'D2(% of total Results)', 'D1 (% of total Results)','C3 (% of total Results)','C2 (% of total Results)','C1 (% of total Results)', 'B3 (% of total Results)','B2 (% of total Results)', 'B1 (% of total Results)','A2 (% of total Results)', 'A1 (% of total Results)', { role: 'annotation' } ], ["English", 5, 5, 5,5, 5, 5, 5, 5,5, 5,5, 5,5 ,35, ''], //use german[2] index of variables for each percent ["Maths", 5, 5, 5,5, 5, 5, 5, 5,5, 5,5, 5,20 ,20, ''] ]); var view = new google.visualization.DataView(data); var options = { width: 600, height: 400, legend: { position: 'none'}, bar: { groupWidth: '75%' }, colors: ['#dfdfdf','#d4d4d4','#d2d2d2','#d8d8d8','#e3e3e3','#d4d4d4','#dcdcdc','d7d7d7','dadada','d9d9d9','d6d6d6'], isStacked: true, hAxis: { viewWindowMode:'explicit', viewWindow: { max:101, min:0 } }, chartArea: {'height': '90%'} }; var chart = new google.visualization.BarChart(document.getElementById("columnchart_values")); chart.draw(view, options); } I want to change the color of one section on each bar, for example the 35 value on English and the last 20 value on Maths. I cannot hard-code it in with a style role column as the value I need to color changes based on user info. I've attempted various ways along the lines of the following to no avail. Thank you. data.setProperty(0,0,{ type: "string", role: "style" }, 'red');

http://stackoverflow.com/q/29309154
type: UnansweredQuestion
has title: How to inspect a function with console.log in karma tests
linked to: http://stackoverflow.com/q/9460826
has answer: http://stackoverflow.com/a/29374436
type: Question
tagged with: javascript
has body: As an example, I am trying to debug this (pseudocode): spyOn(form, 'append').and.callThrough(); baseRecord.$fillForm(form, params, '[namespace]'); console.log(JSON.stringify(form.append)); expect(form.append.argsForCall).toEqual(...); karma gives me: LOG: function () { ... } with no information about the content of the function.
tagged with: karma-jasmine
score: 0
answer count: 1

http://stackoverflow.com/comment/46863010
type: Comment
comment on: http://stackoverflow.com/q/29323719
type: QuestionComment
has text: Can you show us the html for 2 or 3 of your messages, that is the full html for each message including the `.username-text` bits?
score: 0

http://stackoverflow.com/a/29227373
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/29227356
type: Answer
upvote count: 1
has body: I assume by 'display text' you mean the text of the label element adjacent to the selected radio. For that you need to use next(). Try this: $('input[type="radio"]').change(function() { var $radio = $(this); var selectedValue = $radio.val(); var labelText = $radio.next('label').text(); // do something with your variables here... }); You could improve the input[type="radio"] selector to narrow down the elements you want to target by adding a class to them.
score: 1
answers question: http://stackoverflow.com/q/29227356
downvote count: 0

http://stackoverflow.com/comment/46902011
comment on: http://stackoverflow.com/q/29358802
type: Comment
type: QuestionComment
has text: @RobertHarvey Agreed. 0/10 would not learn from this teacher.
score: 1

http://stackoverflow.com/comment/46661434
type: QuestionComment
comment on: http://stackoverflow.com/q/29226410
score: 0
has text: can you show the onSucc method??
type: Comment

http://stackoverflow.com/comment/46803987
has text: the onclick fires, the .getJSON request fails with error "Method Not Allowed"
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29304502
score: 0

http://stackoverflow.com/a/29257102
has body: Here's a couple examples I just put together. The first is the straight d3 way of doing what you are asking. The second is a hacked up plottable.js. With plottable.js I can't find a way to position the axis outside of their table system, I had to resort to manually moving them. The table system they use is designed to relieve the developer of having to manually position things. This is great and easy, of course, until you want to control where to position things. Here's the hack, after you render your plottable: // move the axis... d3.select(".y-axis") .attr('transform',"translate(" + width / 2 + "," + 0 + ")"); d3.select(".x-axis") .attr("transform", "translate(" + 48 + "," + height / 2 + ")"); Note, I didn't remove the left side margin (the 48 above) that plottable puts in. This could be hacked in as well, but at that point, what is plottable providing for you anyway... It should be noted that the different appearance of each plot is entirely controlled through the CSS. Complete d3 scatter plot: // D3 EXAMPLE var margin = { top: 20, right: 20, bottom: 20, left: 20 }, width = 500 - margin.left - margin.right, height = 500 - margin.top - margin.bottom; var x = d3.scale.linear() .range([0, width]); var y = d3.scale.linear() .range([height, 0]); var xAxis = d3.svg.axis() .scale(x) .orient("bottom"); var yAxis = d3.svg.axis() .scale(y) .orient("left"); var svg = d3.select("#d3").append("svg") .attr("width", width + margin.left + margin.right) .attr("height", height + margin.top + margin.bottom) .append("g") .attr("transform", "translate(" + margin.left + "," + margin.top + ")"); x.domain([-100, 100]); y.domain([-100, 100]); svg.append("g") .attr("class", "x axis") .attr("transform", "translate(" + 0 + "," + height / 2 + ")") .call(xAxis); svg.append("g") .attr("class", "y axis") .attr("transform", "translate(" + width / 2 + "," + 0 + ")") .call(yAxis) .append("text"); svg.selectAll(".dot") .data(data) .enter().append("circle") .attr("class", "dot") .attr("r", function(…
answers question: http://stackoverflow.com/q/29236117
has comment: http://stackoverflow.com/comment/46837464
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46837429
has comment: http://stackoverflow.com/comment/46836473
type: Answer
has comment: http://stackoverflow.com/comment/46845826
score: 1
accepted answer of: http://stackoverflow.com/q/29236117
upvote count: 1

http://stackoverflow.com/comment/46865183
comment on: http://stackoverflow.com/a/29296342
type: AnswerComment
type: Comment
has text: Thank you for your response. I tested the above code. There were no changes in output. Moreover, I wasn't able to identify the difference in the code. Could you be kindly explain me the change in script.
score: 0

http://stackoverflow.com/comment/46678627
type: Comment
has text: @DavidP: No, that's completely uncomprehensible. Just do `"youtube.com/watch?v=\"" + $Id + "\""` or `'youtube.com/watch?v="' + $Id + '"'`.
comment on: http://stackoverflow.com/q/29235988
score: 0
type: QuestionComment

http://stackoverflow.com/q/29350121
favorite count: 0
has answer: http://stackoverflow.com/a/29354890
tagged with: http://stackoverflow.com/tag/html
upvote count: 1
tagged with: php
has body: I'm trying to let my page jump to a tab section. I can do it in this way: Go to Add Event Tab then it will go to the Event Tab after I click it. Is there any way I can do it in < form action=" "> or window.location? So when I click on the submit button, it will go to the Add Event tab after insert data into database. Code for tabs: Home Add Event Add Top Story <?php include_once('Welcome.html'); ?> <?php include_once('AddEvent.php'); ?> <?php include_once('AddTopStory.php'); ?> AddEvent.php form: < button name="addevent" class="btn btn-sm btn-primary pull-right" type="submit">Add Event
type: Question
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29354890
has title: How to use data-toggle in a form action or window.location(PHP)?
score: 1
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery

scatter-plot
type: Tag
tags question: http://stackoverflow.com/q/29312024
tags question: http://stackoverflow.com/q/29357160
tag name: scatter-plot

http://stackoverflow.com/comment/46867344
score: 1
comment on: http://stackoverflow.com/a/29339123
type: AnswerComment
has text: @janicehoplin you want to hide all divs when page load ? then base on selection you want to show div? right ?
type: Comment

http://stackoverflow.com/a/29255806
has body: The example you linked to just align the scrollbars to the same height, it does not seem to do any intelligent matching of elements. So a good start is just to align scrollbars.
answers question: http://stackoverflow.com/q/29255744
has comment: http://stackoverflow.com/comment/46714587
upvote count: 1
type: Answer
downvote count: 0
score: 1

http://stackoverflow.com/comment/46897191
has text: I don't see any `ip` parameter in the route
type: Comment
score: 1
type: QuestionComment
comment on: http://stackoverflow.com/q/29355967

http://stackoverflow.com/comment/46980290
has text: Well your latest code works on all the questions correctly except for those that aren't answered and don't have a text box. It's a little confusing, but all the questions should be inserted whether or not they are answered EXCEPT the ones that have a text box that is empty. I think one problem is that the q variable won't have a value if a question is not answered -- it will have a yes or a no assigned to only if it is answered. To summarize, your code works correctly on the empty and filled text box questions but with the non text box questions, the unanswered ones need to be inserted too.
type: AnswerComment
comment on: http://stackoverflow.com/a/29362748
score: 0
type: Comment

http://stackoverflow.com/a/29233774
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/46674540
has comment: http://stackoverflow.com/comment/46674302
has comment: http://stackoverflow.com/comment/46674446
has comment: http://stackoverflow.com/comment/46674597
has body: You need to prevent the default submit action. Otherwise, the button click submits the form, regardless of what you are doing in JavaScript. Your script both validates the input and uses jQuery's .post(), so you need to prevent that default submit action with: event.preventDefault(); I would also recommend returning false when validation fails. Updated JavaScript: $(document).ready(function () { $("#register").click(function () { event.preventDefault(); // &lt;-- ADDED THIS LINE var first_name = $("#first_name").val(); var last_name = $("#last_name").val(); var city = $("#city").val(); var email = $("#email").val(); if (first_name == '' || last_name == '' || email == '' || city == '') { alert("Fill all fields."); return false; // &lt;-- ADDED THIS LINE } else if ((first_name.length) &lt; 3) { alert("Too short first name."); return false; // &lt;-- ADDED THIS LINE } else if ((last_name.length) &lt; 4) { alert("Too short last name."); return false; // &lt;-- ADDED THIS LINE } else { $.post("GetFbId.php", { first_name: first_name, last_name: last_name, city: city, email: email }, function (data) { if (data == 'Success') { $("form")[0].reset(); } alert(data); }); } }); }); See demo: http://jsfiddle.net/BenjaminRay/n6jqvrra/ You can also let the browser handle the required field validation for you by adding "required" to the required fields. Then you only have to handle the $.post() side of things. However, this is not supported by all old browsers (e.g. IE8) so it's not guaranteed to stop the form from being submitted with empty values. E.g.: &lt;input type="text" name="first_name" id="first_name" required&gt; And, of course, you will need to validate the input on the server side (PHP) as well.
has comment: http://stackoverflow.com/comment/46674260
answers question: http://stackoverflow.com/q/29233682

http://stackoverflow.com/q/29289925
tagged with: php
answer count: 0
score: 1
tagged with: wordpress
upvote count: 1
type: Question
tagged with: javascript
has body: I am importing content from a wordpress blog into a static html web page using the following code: (as learned from wordpress's own documentation https://codex.wordpress.org/Integrating_WordPress_with_Your_Website ) &lt;?php //Query 5 recent published post in descending order $args = array( 'category_name' =&gt; 'news', 'posts_per_page' =&gt; '-1', 'order' =&gt; 'DESC','post_status' =&gt; 'publish' ); $recent_posts = wp_get_recent_posts( $args ); //Now lets do something with these posts foreach( $recent_posts as $recent ) { echo "&lt;section class='main'&gt;"; echo ''.$recent["post_category"]; echo '&lt;h4&gt;'.$recent["post_title"]; echo "&lt;/h4&gt;"; echo '&lt;p class="smalls"&gt;'; echo mysql2date('F, j, Y',$recent["post_date"]); echo "&lt;/p&gt;"; echo '&lt;p class="smalls"&gt;'.$recent["post_content"]; echo "&lt;/p&gt;"; echo "&lt;/section&gt;"; //Do whatever else you please with this WordPress post } ?&gt; Photos work fine, but when it comes to video the only solution I can find is using an iframe. Otherwise I end up with only a url displayed How can I display video from an imported wordpress post without the use of an iframe?
has comment: http://stackoverflow.com/comment/46777095
has title: Import Wordpress article video without iframe
downvote count: 0
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/49065663
score: 0
type: Comment
has text: Well, I want the sizing of the orange section of this code pen to change when i click on one of the bars in the row chart. For example in Lon's website, when you change the charts, the chart that we are trying to build changes. I'm looking into this as well, and I think this is on the right track: http://www.acrodatics.com/
comment on: http://stackoverflow.com/a/30466759
type: AnswerComment

http://stackoverflow.com/comment/59612668
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29329183
has text: I'm trying to get the tab object from within the location change function, to attach content scripts and workers to the listeners. Would you know how to it?
type: AnswerComment

http://stackoverflow.com/q/29269184
answer count: 1
has answer: http://stackoverflow.com/a/29269437
has title: Animate array items on position change
tagged with: angularjs
type: UnansweredQuestion
has body: This Plunker shows an array displayed as an unordered list using ng-repeat. Each item has an Up/Down button enabling to swap positions with the item above or below via a javascript splice. There is also an animate directive that adds a class to each moved item: items moving up the array are highlighted green and items moving down are highlighted red. However, the animation is buggy, I think because the directive fires addClass and removeClass on click. Can anybody advise if this is the case and if so, what event should replace it? I tried $scope.$watch unsuccessfully. It occurred to me a better approach might be to watch the array collection, compare index changes and highlight based on whether the item index is > or &lt; before.
type: Question
tagged with: javascript
score: 0

http://stackoverflow.com/comment/46705325
type: QuestionComment
has text: You'll need to create an [MCVE](/help/mcve). Fundamentally, the relevant part of the above works: http://jsbin.com/semetezewu/1
score: 0
comment on: http://stackoverflow.com/q/29250577
type: Comment

http://stackoverflow.com/a/29226346
has comment: http://stackoverflow.com/comment/46660423
has comment: http://stackoverflow.com/comment/46660176
has comment: http://stackoverflow.com/comment/46660401
has comment: http://stackoverflow.com/comment/46660347
score: 1
has comment: http://stackoverflow.com/comment/46661455
upvote count: 1
answers question: http://stackoverflow.com/q/29226318
has comment: http://stackoverflow.com/comment/46661537
type: Answer
has comment: http://stackoverflow.com/comment/46660375
downvote count: 0
has body: You can try this: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/([0-9]|[1-2][0-9]|3[0-2]))$ Source:- IPv4 CIDR range
has comment: http://stackoverflow.com/comment/46660504

http://stackoverflow.com/comment/46844045
type: QuestionComment
has text: `.css('background-color': obj_gallery...`. That syntax doesn't look right.
score: 0
comment on: http://stackoverflow.com/q/29326937
type: Comment

http://stackoverflow.com/comment/46659213
score: 0
has text: This is quickly turning into a riddle, instead of a productive SO question. Arbitrary requirements that force you into writing bad code do not seem like a good fit for this site.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29225466

http://stackoverflow.com/comment/68354558
type: Comment
comment on: http://stackoverflow.com/a/29297028
has text: Thanks for the help! After spending hours in this issue, I fixed the problem doing what you suggest. Except that I only added this "ns1" in the tags instead of change "soap:Envelope" by "SOAP-ENV:Envelope", for example, and make the other modifications.
type: AnswerComment
score: 0

http://stackoverflow.com/q/29263166
upvote count: 7
possible better answer: http://stackoverflow.com/a/32363151
has answer: http://stackoverflow.com/a/32363151
type: Question
score: 7
tagged with: javascript
has answer: http://stackoverflow.com/a/42044819
tagged with: cesiumjs
downvote count: 0
has body: I'd like to detect every time the camera position, heading, pitch or roll changes on Cesium view so that I can update a display showing these values. After quite a bit of searching, I eventually discovered that I can add an event handler to the not-at-all-intuitive preRender or postRender events on the widget's Scene object. However, those events both fire continuously, hundreds of times per second. I would guess they are firing once per clock tick. Is there another event I can register for that will simply fire after the view of the map has been changed? I'm looking for something close to Leaflet's moveend event and preRender and postRender aren't it. Failing that, is there any way I can get preRender or postRender to fire only when something has actually changed?
has answer: http://stackoverflow.com/a/63157445
has answer: http://stackoverflow.com/a/29285465
favorite count: 0
answer count: 5
type: AnsweredQuestion
has title: How to get scene change events in cesium?
has answer: http://stackoverflow.com/a/45051422
accepted answer: http://stackoverflow.com/a/29285465

http://stackoverflow.com/q/29234385
upvote count: 11
favorite count: 0
linked to: http://stackoverflow.com/q/16063394
answer count: 4
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29234474
has body: In the past when creating "classes" in JavaScript, I have done it like this: function Dog(name){ this.name=name; this.sound = function(){ return "Wuf"; }; } However, I just saw someone do it like this instead: var Dog = (function () { function Dog(name) { this.name = name; } Dog.prototype.sound = function () { return "Wuf"; }; return Dog; })(); Can you do it both ways, or is the way I've done it wrong? In that case, why? And what exactly is the difference between the two in terms of what we end up with? In both cases we can create an object by saying: var fido = new Dog("Fido"); fido.sound(); I hope someone will enlighten me.
has comment: http://stackoverflow.com/comment/46695526
downvote count: 1
has answer: http://stackoverflow.com/a/29234488
type: Question
has title: Confusion about how to create classes in JavaScript
linked to: http://stackoverflow.com/q/22906662
score: 10
tagged with: javascript
possible better answer: http://stackoverflow.com/a/29234488
tagged with: class
has answer: http://stackoverflow.com/a/29234505
has answer: http://stackoverflow.com/a/29234474
has answer: http://stackoverflow.com/a/29234968

http://stackoverflow.com/comment/46714279
type: Comment
type: QuestionComment
score: 1
has text: might i suggest using a DOM parser?
comment on: http://stackoverflow.com/q/29255267

http://stackoverflow.com/comment/46723747
type: QuestionComment
has text: Got it. First of all stop building HTML like that. That's one of the reasons you use AngularJS. Second look into AngularJS services. Those are a better way of sharing resources between controllers/directives. Also make sure you understand that `$scope` and `$rootScope` don't exist outside an AngularJS context.
comment on: http://stackoverflow.com/q/29260103
score: 0
type: Comment

http://stackoverflow.com/comment/46710854
type: Comment
comment on: http://stackoverflow.com/a/29253623
has text: I need `slider.reloadSlider();` method in some other modules, not here. So I can use it after some event.
type: AnswerComment
score: 0

http://stackoverflow.com/q/29366395
has answer: http://stackoverflow.com/a/29390207
score: 0
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29366964
has body: I'm looking to make a GANTT chart with Sharepoint 2010. I'm aware of the built in functionality to make them with Sharepoint but need to make a separate one.
has comment: http://stackoverflow.com/comment/46915403
has comment: http://stackoverflow.com/comment/46915491
tagged with: internet-explorer-8
tagged with: javascript
type: Question
answer count: 2
has title: What Javascript or Jquery library can I use for GANTT charts with IE 8?
tagged with: jquery
tagged with: gantt-chart
possible better answer: http://stackoverflow.com/a/29390207
has answer: http://stackoverflow.com/a/29366964

http://stackoverflow.com/q/29252840
linked to: http://stackoverflow.com/q/8266726
answer count: 2
downvote count: 0
has answer: http://stackoverflow.com/a/29252887
tagged with: javascript
tagged with: jquery
favorite count: 0
has body: am using below jquery for change image in every 1 second window.setInterval(function(){ imagechanger(); }, 5000); as automatic changer its working fine. now i need to add next button. I call the same imagechanger() function on the next button click. That is also working fine $('body').on('click','#next',function(){ imagechanger(); }); But suppose after calling the first change and waiting 4 seconds then i press the next button, when i click the button image is changing but the very next second another change call also triggered. So how can i reset the time ??
possible better answer: http://stackoverflow.com/a/29253159
linked to: http://stackoverflow.com/q/8126466
score: 2
has comment: http://stackoverflow.com/comment/46709231
has comment: http://stackoverflow.com/comment/46709285
type: Question
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/18270009
accepted answer: http://stackoverflow.com/a/29252887
has title: I need to call a function in every 5 second with time duration reset
has answer: http://stackoverflow.com/a/29253159
has comment: http://stackoverflow.com/comment/46709267
upvote count: 2

http://stackoverflow.com/comment/48775815
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29315025
score: 0
has text: There seems to be some issue with the fiddle, the source of the image is displayed instead of the images.

http://stackoverflow.com/q/29314905
tagged with: javascript
tagged with: css-animations
has title: CSS - Sliding in text
score: 0
has body: I have a website an I am trying to replicate the 'sliding in' of text as shown here: https://tictail.com/ When the user starts to scroll, the text on that page slides in from the left. I've tried taking a look at the JavaScript files that are being loaded but no use. My application is using AngularJS, so it would be nice to stick with this librabry, rather than having to us jQuery and jQuery ui. Thanks
answer count: 1
tagged with: angular-ui
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
tagged with: css
upvote count: 1
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/29443352

http://stackoverflow.com/comment/46838754
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29292322
has text: Well if they were playing music and wanted to send that stream through webRTC.

http://stackoverflow.com/comment/46837782
comment on: http://stackoverflow.com/a/29323314
has text: thank you. i've switch it so that all the onclick functions are called inside of the JS.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/41442894
answers question: http://stackoverflow.com/q/29323982
type: Answer
score: 41
has body: Nodedemon is looking for its ../lib/cli folder in its own directory and not finding it. You probably have a messed up install. This can happen sometimes when you use finder to copy a project from one folder to another. If you blow away your node_modules directory and reinstall from scratch, you should restore the folder. cd your_project_folder rm -rf node_modules npm install Edit: You might also use yarn. cd your_project_folder rm -rf node_modules yarn
downvote count: 0
upvote count: 41

http://stackoverflow.com/a/29263505
score: 2
has body: This is wrong .config(['$locationProvider', '$stateProvider', '$urlRouterProvider', function($locationProvider, $stateProvider, stripeProvider, $urlRouterProvider) It shoud be: .config(['$locationProvider', '$stateProvider', 'stripeProvider', '$urlRouterProvider', function($locationProvider, $stateProvider, stripeProvider, $urlRouterProvider)
answers question: http://stackoverflow.com/q/29263429
downvote count: 0
type: Answer
upvote count: 2

http://stackoverflow.com/a/29353972
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/46893141
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/29353778
has body: Because className contains multiple classes, this does not work: arr[i].className === "selected" Since arr at that point contains only elements that include the "selected" class, you don't need that check. However, if you need it for a different reason, you can use classList.contains instead: arr[i].classList.contains("selected") Fiddle
answers question: http://stackoverflow.com/q/29353778

http://stackoverflow.com/q/29364436
type: Question
has comment: http://stackoverflow.com/comment/46912401
has comment: http://stackoverflow.com/comment/46912152
has answer: http://stackoverflow.com/a/29364785
tagged with: javascript
tagged with: jquery
has body: I have a search form with a dropdown selection which enables user to search by a specific column.Here's my code: <form action="<?php echo site_url('admin/home/search');?>" method="post" accept-charset="utf-8"> - Search by - Name Address Date I have also used datepicker. Whenever the value of the tag is date, I trigger the datepicker.. And to disable it I think, I have used something like this $("#id").off(); But the problem is, when the value after removing event handlers is date again, the datepicker don't pop-up. To further understand it, here's my jquery code : $('#searchby').on('change', function() { if(this.value=="date"){ $("#key_key").on(); $('#key_key').datepicker(); } else{ // $('#key_key').datepicker("disable"); $("#key_key").off(); } }) Can anyone help me this? Thanks in advance :)
score: 0
answer count: 1
tagged with: datepicker
has comment: http://stackoverflow.com/comment/46913348
has title: How to enable event handlers after using $("#id").off();
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29364785
has comment: http://stackoverflow.com/comment/46911968

http://stackoverflow.com/comment/46901406
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29358472
has text: dang. Added my question as an Answer. Lol. so .PHP won't work? Do you call this php javascript injection?

google-app-engine
tag name: google-app-engine
type: Tag
tags question: http://stackoverflow.com/q/29297873
tags question: http://stackoverflow.com/q/29319244
tags question: http://stackoverflow.com/q/29252939

http://stackoverflow.com/a/29300655
accepted answer of: http://stackoverflow.com/q/29300411
score: 2
upvote count: 2
has body: Try to move stroke inside the Interval. Because in your case stroke are called immediately without lineTo data. And after that lineTo are called in interval function and cannot be rendered without stroke. $(document).ready(function(){ canvas = document.getElementById("test"); ctx = canvas.getContext("2d"); var count = 0; var start_x = 0; var start_y = 100; var end_x = 50; var end_y = 100; var counter = setInterval(countNumbers, 1000); ctx.beginPath(); ctx.moveTo(start_x, start_y); console.log("Start"); function countNumbers(){ count += 1; ctx.lineTo((start_x + count), start_y); console.log(count); if((start_x == end_x) || (count == 10)){ clearInterval(counter); console.log("End"); ctx.lineWidth = 5; // &lt;----- move here ctx.strokeStyle = "white"; ctx.stroke(); } } }) Also ensure that you are not drawing white lines on white background
answers question: http://stackoverflow.com/q/29300411
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/q/29266604
downvote count: 1
type: Question
tagged with: javascript
tagged with: jquery
has body: var x; userList.on( "mouseover", "li", function(e) { console.log('1'); x = setTimeout( function() { doThis(); }, 700); },function(){ console.log('3'); clearInterval(x); }); userList.on( "mouseleave", "li", function(e) { showProfile.css('display', 'none'); }); Now whenever i'm hovering over the userlist it shows me console.log('3') what i'm doing wrong in this case ?
has title: Why doesn't .on() method execute the first handler?
has answer: http://stackoverflow.com/a/29266773
answer count: 1
favorite count: 0
upvote count: 2
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/29266773
has comment: http://stackoverflow.com/comment/46735743
score: 1

http://stackoverflow.com/q/29238137
tagged with: cygwin
tagged with: javascript
has body: I am using ruby on rails in Cygwin to create a blog, and I also installed nodejs and npm. Here is what I got on the web browser: Showing /home/Ellen/blog/app/views/layouts/application.html.erb where line #6 raised: module.js:338 throw err; ^ Error: Cannot find module 'C:\cygwin64\home\Ellen\blog\cygpath -m #{tmpfile.path}' at Function.Module._resolveFilename (module.js:336:15) at Function.Module._load (module.js:278:25) at Function.Module.runMain (module.js:501:10) at startup (node.js:129:16) at node.js:814:3 (in /home/Ellen/.gem/ruby/gems/turbolinks-2.5.3/lib/assets/javascripts/turbolinks.js.coffee) Extracted source (around line #6): Blog <%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %> <%= javascript_include_tag "application", "data-turbolinks-track" => true %> <%= csrf_meta_tags %> Rails.root: /home/Ellen/blog I understand that it is because the program gave a windows like path to cygwin which supposed to be a unix like path, /cygdrive/c/...
score: 2
type: AnsweredQuestion
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/29246594
type: Question
upvote count: 2
has comment: http://stackoverflow.com/comment/46682945
tagged with: ruby-on-rails
tagged with: node.js
has title: rails create windows like path in cygwin
answer count: 1
accepted answer: http://stackoverflow.com/a/29246594

mobile
tags question: http://stackoverflow.com/q/29358726
type: Tag
tags question: http://stackoverflow.com/q/29314868
tags question: http://stackoverflow.com/q/29260971
tags question: http://stackoverflow.com/q/29288237
tags question: http://stackoverflow.com/q/29276766
tags question: http://stackoverflow.com/q/29371619
tags question: http://stackoverflow.com/q/29348034
tag name: mobile
tags question: http://stackoverflow.com/q/29237200

http://stackoverflow.com/q/29255622
has title: What's the difference between `dest` and `dist`?
has comment: http://stackoverflow.com/comment/46714070
answer count: 3
downvote count: 0
tagged with: javascript
tagged with: gulp
favorite count: 0
has body: In gulp or grunt we often write the following code gulp.src('*') .pipe(rev()) .pipe(gulp.dest('dist/')) Here, what's the difference between dest and dist? I have saw some project both use dest. Is it that dest means destination and dist means distribution?
has comment: http://stackoverflow.com/comment/46714124
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29255659
upvote count: 1
has answer: http://stackoverflow.com/a/29257767
type: Question
score: 1
has answer: http://stackoverflow.com/a/29257305

http://stackoverflow.com/q/29302817
has title: Is there a way to prototype a namespace in a limited scope?
has comment: http://stackoverflow.com/comment/46800165
tagged with: revealing-module-pattern
type: Question
has answer: http://stackoverflow.com/a/29304226
accepted answer: http://stackoverflow.com/a/29304226
has body: I have a prototyped function that i would like to use it in a limited scope in order to provide it with a jquery plugin. //Prototype function StringBuilder(str) { this.value = str; } StringBuilder.prototype.append = function (str) { this.value = this.value + str; return this; }; //jQuery plugin with Revealing module pattern jQuery.NameOfThePlugin = (function () { //i would like to be able to use StringBuilder only in this scope helloWorld = new StringBuilder('Hello'); helloWorld.append(' World'); })(window); Is that possible? Thanks
tagged with: javascript
tagged with: prototype
upvote count: 2
has comment: http://stackoverflow.com/comment/46800297
downvote count: 0
answer count: 1
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/46800224
tagged with: design-patterns
linked to: http://stackoverflow.com/q/592396
score: 2
type: AnsweredQuestion

http://stackoverflow.com/q/29260453
has answer: http://stackoverflow.com/a/29264061
has body: I have two java class as public class Abc{ private List&lt;SomeOtherClass&gt; someClass; private String k; private String m; } public class SomeOtherClass{ private String a; private String b; private String c; } I have a jsp page where I am creating bean of class Abc &lt;jsp:useBean id="someId" class="Abc" scope="request" /&gt; Now in this jsp and inside a script tag I am trying to create a javascript array of json objects &lt;script&gt; var abc = (function(){ module._myFunction = { "key1" :"&lt;c:out value = '${someId.k}'/&gt;", "key2" :{ &lt;c:forEach varStatus='status' items='${someId.someClass}' var ="xyz"&gt; "subKey1":"${xyz.a}", "subKey2":${xyz.b} &lt;/c:forEach&gt; } } }(abc || {})) &lt;/script&gt; But this snippet is throwing an error of "Unexpected string " because of the code inside the c:forEach loop. But if I omit the subkey1 &amp; subKey2 it is working fine. Also I think this is expected. Is there any way I can create this json array . And when I am checking abc.key1 is developers tool it is giving right value. Is there any way I can create this json array and check abc.key2.subkey1 or abc.key2.subKey2 in developer console
tagged with: jsp
tagged with: javascript
has title: Create javascript json object on iteration jsp bean using jstl c:forEach
type: Question
score: 0
answer count: 1
tagged with: http://stackoverflow.com/tag/json
type: UnansweredQuestion

http://stackoverflow.com/comment/47043562
has text: idk I think I tried clicking it even though I had already upvoted it. My reputation when down from 15 so now I can't vote. Error in the way the web registers the vote.
type: Comment
comment on: http://stackoverflow.com/a/29356372
score: 0
type: AnswerComment

http://stackoverflow.com/comment/46795948
comment on: http://stackoverflow.com/q/29300542
score: 0
type: QuestionComment
type: Comment
has text: @Mark the element does not have an id. Its Html is:

http://stackoverflow.com/a/29251476
score: 1
answers question: http://stackoverflow.com/q/29238039
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/29238039
type: Answer
upvote count: 1
has body: It is better to use watch functions, especially if values might change in the controller, as this ensures that they stay in sync. This solution also seems easier to see what is going on: plunkr solution Just using a watch function to watch the selected values: $scope.$watch('selectedId', function(newValue){ $scope.d(); }); I am not sure if you want the user to be able to change the value in the textarea or not. If you don't, like in your example, then I suggest that you add the attribute ng-disabled="true" to your text area.

http://stackoverflow.com/comment/46752010
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/29276815
type: Comment
has text: can you give some more info, do you mean like a node command line tool? what would the javascript do and what would be the runtime?

http://stackoverflow.com/a/53333285
answers question: http://stackoverflow.com/q/29372003
has body: The issue is, $(selector).click() events work for static html only. To deal with dynamic html you have to use .on() like: $('static_parent').on('click','.favourate_dextop',function(e){ //your code }); or $('body').on('click','.favourate_dextop',function(e){ //your code }); or $(document).on('click','.favourate_dextop',function(e){ //your code });
score: 0
type: Answer

http://stackoverflow.com/q/29291672
score: 0
has body: Comming from the perl/python world I was wondering if there is a simpler way to filter out multiple captured variables from regexp in javascript: #!/usr/bin/env node var data=[ "DATE: Feb 26,2015", "hello this should not match" ]; for(var i=0; i&lt;data.length; i++) { var re = new RegExp('^DATE:\\s(.*),(.*)$'); if(data[i].match(re)) { //match correctly, but how to get hold of the $1 and $2 ? } if(re.exec(data[i])) { //match correctly, how to get hold of the $1 and $2 ? } var ret = ''; if(data[i].match(re) &amp;&amp; (ret = data[i].replace(re,'$1|$2'))) { console.log("line matched:" + data[i]); console.log("return string:" + ret); ret = ret.split(/\|/g); if (typeof ret !== 'undefined') { console.log("date:" + ret[0], "\nyear:" + ret[1]); } else { console.log("match but unable to parse capturing parentheses"); } } } The last condition works, but you need a temp var and split it, and you need to have a test in front because the replace works on everything. Output is: $ ./reg1.js line matched:DATE: Feb 26,2015 return string:Feb 26|2015 date:Feb 26 year:2015 If I look up: mosdev regexp it says on (x): The matched substring can be recalled from the resulting array's elements 1, ..., [n] or from the predefined RegExp object's properties $1, ..., $9. How do I get hold of the RegExp objects' $1 and $2? Thanks
has answer: http://stackoverflow.com/a/29291962
answer count: 3
tagged with: javascript
favorite count: 0
has title: A simpler way to capture multiple variables in javascript regexps
has comment: http://stackoverflow.com/comment/46780635
has answer: http://stackoverflow.com/a/29291966
tagged with: regex
accepted answer: http://stackoverflow.com/a/29291699
tagged with: node.js
has comment: http://stackoverflow.com/comment/46780237
type: AnsweredQuestion
upvote count: 1
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/46780441
possible better answer: http://stackoverflow.com/a/29291962
has comment: http://stackoverflow.com/comment/46780680
has answer: http://stackoverflow.com/a/29291699

http://stackoverflow.com/comment/46886400
score: 2
has text: Also note that you're currently binding the `afterload` event to the _result of calling_ `this.afterLoad()` (currently `undefined`), not to the function itself.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/29350078

return
tags question: http://stackoverflow.com/q/29266883
type: Tag
tag name: return
tags question: http://stackoverflow.com/q/29289441
tags question: http://stackoverflow.com/q/29248394

http://stackoverflow.com/a/29293884
accepted answer of: http://stackoverflow.com/q/29293841
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/29293841
has body: I'd consider leaving them as strings if possible, then just using substring operations to manipulate them. Then you don't have to worry about whether they'll fit into a numeric data type. By way of example, consider the following script: function makeNum(num) { num = num.replace(/,/g,""); var markers = "万億兆京"; var result = ""; while (num.length &gt; 4) { if (markers.length == 0) { result = "(未詳)" + num.substr(num.length-4) + result; } else { result = markers.substr(0, 1) + num.substr(num.length-4) + result; markers = markers.substr(1); } num = num.substr(0, num.length-4); } return num + result; } alert(makeNum("4,234,322,423,423,424,003")); This first removes all commas then builds up the Japanese number section by section, using markers to select the correct separators. If your number is so big that it runs out of markers, I just use (未詳) instead which, if it doesn't mean "unknown", you can blame on the Japaneses-English online dictionary I used. The result of that script is, as expected, a dialog box containing 423京4322兆4234億2342万4003.
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/46784619

http://stackoverflow.com/q/29225466
has comment: http://stackoverflow.com/comment/46659076
has title: Passing local variable to a refenced method
has comment: http://stackoverflow.com/comment/46659128
downvote count: 1
has comment: http://stackoverflow.com/comment/46659213
type: Question
upvote count: 0
answer count: 1
tagged with: javascript
score: -1
has answer: http://stackoverflow.com/a/29225563
has comment: http://stackoverflow.com/comment/46659160
has body: I'm trying to create a function that passes a variable from my window.onload function to a reference of another function. I want the var i in my window.onload to be used as the actual parameter for i in the function definition of markTheSquare. edit Sorry, I forgot to add this in the OP but the specifications specifically say that markTheSquare does not have any formal parameters. var boardState; var markCount;// Global variable that stores the value of the number of marks. var winningCombinations; window.onload = function() { var i; i = 0; markCount = setMarkCount(0); // calls the mutator function setMarkCount to change the value of markCount to 0. winningCombinations = "012345678036147258246048"; boardState = "012345678036147258246048"; while ( i &lt; 9) { document.getElementById("box" + i).onclick = markTheSquare; i = i + 1; } } function markTheSquare() // uses the this keyword to concatenate "X" to the inner HTML of the current element. { this.onclick = null; // Disassociates the oncliick function with clicked() this.innerHTML = getXorO(); // Concatenates the result of getXorO to the current innherHTML of the element. updateBoardState(getXorO(), i); window.alert(updateBoardState(getXorO(), i)); setMarkCount(getMarkCount() + 1) // Increment markCount by 1. } function updateBoardState(getXorO, squareNumber) { var boardState; var loc; var winners; winners = getWinningCombinations(); boardState = getBoardState() loc = winners.indexOf(squareNumber); squareNumber = "" + squareNumber; while(loc &gt;= 0) { replaceCharacterInString(boardState, loc, getXorO); loc = winners.indexOf(squareNumber); } return setBoardState(boardState); }
has comment: http://stackoverflow.com/comment/46659215
favorite count: 0
has comment: http://stackoverflow.com/comment/46659179
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46658985

http://stackoverflow.com/comment/46918989
type: Comment
score: 0
comment on: http://stackoverflow.com/a/29368354
type: AnswerComment
has text: I think it should be a problem of defining the array as mentioned by adeneo in comments. Can you show the code where you define vector_bricks?

http://stackoverflow.com/q/29290250
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has body: I am having trouble having a dropdown with my code. This is my html: Name About Comming Up Brendon Baughn I am a 16-year-old programmer, still learning some HTML and CSS, JavaScript and jQuery. I am going to go to college for Computer Science and Programming, and hopefully become successful in life And this is my jQuery: $(document).ready(function(){ $('.tabs li').click(function(){ if ($(this).hasClass("selected") === false){ $('.tabs li').removeClass('selected'); $(this).addClass('selected'); } var selectionId = $(this).attr('id'); $('div .page').css('display', 'none'); $('.page#' + selectionId).css('display', 'block'); }); }); I really need help with this. It will make my webpage look really neat (I have more information, but this is just some). http://jsfiddle.net/BBaughn/so2bmkgg/ (the link doesn't go from tab to tab for some reason)
tagged with: css
has title: Hover over tabs and have it drop down
type: Question
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/29290387
answer count: 1
tagged with: jquery

http://stackoverflow.com/comment/46912609
score: 0
has text: this is useful for me. I have problem in this. When i drop image it will useful. I need to do drop some Excel files and some text files also. In that case how can I proceed. Is there any thing excel to image conversation.
type: Comment
comment on: http://stackoverflow.com/a/29351367
type: AnswerComment